diff --git a/classes/class_@gdscript.rst b/classes/class_@gdscript.rst index b308f639601..bf1f9bfb704 100644 --- a/classes/class_@gdscript.rst +++ b/classes/class_@gdscript.rst @@ -787,7 +787,7 @@ Add a custom icon to the current script. The icon specified at ``icon_path`` is \ **Note:** As annotations describe their subject, the :ref:`@icon` annotation must be placed before the class definition and inheritance. -\ **Note:** Unlike other annotations, the argument of the :ref:`@icon` annotation must be a string literal (constant expressions are not supported). +\ **Note:** Unlike most other annotations, the argument of the :ref:`@icon` annotation must be a string literal (constant expressions are not supported). .. rst-class:: classref-item-separator @@ -803,7 +803,7 @@ Mark the following property as assigned when the :ref:`Node` is read :: - @onready var character_name: Label = $Label + @onready var character_name = $Label .. rst-class:: classref-item-separator @@ -893,6 +893,48 @@ Mark the following statement to ignore the specified ``warning``. See :doc:`GDSc @warning_ignore("unreachable_code") print("unreachable") +See also :ref:`@warning_ignore_start` and :ref:`@warning_ignore_restore`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_@GDScript_annotation_@warning_ignore_restore: + +.. rst-class:: classref-annotation + +**@warning_ignore_restore**\ (\ warning\: :ref:`String`, ...\ ) |vararg| :ref:`๐Ÿ”—` + +Stops ignoring the listed warning types after :ref:`@warning_ignore_start`. Ignoring the specified warning types will be reset to Project Settings. This annotation can be omitted to ignore the warning types until the end of the file. + +\ **Note:** Unlike most other annotations, arguments of the :ref:`@warning_ignore_restore` annotation must be string literals (constant expressions are not supported). + +.. rst-class:: classref-item-separator + +---- + +.. _class_@GDScript_annotation_@warning_ignore_start: + +.. rst-class:: classref-annotation + +**@warning_ignore_start**\ (\ warning\: :ref:`String`, ...\ ) |vararg| :ref:`๐Ÿ”—` + +Starts ignoring the listed warning types until the end of the file or the :ref:`@warning_ignore_restore` annotation with the given warning type. + +:: + + func test(): + var a = 1 # Warning (if enabled in the Project Settings). + @warning_ignore_start("unused_variable") + var b = 2 # No warning. + var c = 3 # No warning. + @warning_ignore_restore("unused_variable") + var d = 4 # Warning (if enabled in the Project Settings). + +\ **Note:** To suppress a single warning, use :ref:`@warning_ignore` instead. + +\ **Note:** Unlike most other annotations, arguments of the :ref:`@warning_ignore_start` annotation must be string literals (constant expressions are not supported). + .. rst-class:: classref-section-separator ---- diff --git a/classes/class_@globalscope.rst b/classes/class_@globalscope.rst index 68588c7bad5..ab1ee76ea6b 100644 --- a/classes/class_@globalscope.rst +++ b/classes/class_@globalscope.rst @@ -1425,7 +1425,7 @@ Help key. :ref:`Key` **KEY_BACK** = ``4194376`` -Media back key. Not to be confused with the Back button on an Android device. +Back key. .. _class_@GlobalScope_constant_KEY_FORWARD: @@ -1433,7 +1433,7 @@ Media back key. Not to be confused with the Back button on an Android device. :ref:`Key` **KEY_FORWARD** = ``4194377`` -Media forward key. +Forward key. .. _class_@GlobalScope_constant_KEY_STOP: @@ -1449,7 +1449,7 @@ Media stop key. :ref:`Key` **KEY_REFRESH** = ``4194379`` -Media refresh key. +Refresh key. .. _class_@GlobalScope_constant_KEY_VOLUMEDOWN: @@ -1753,7 +1753,7 @@ Space key. :ref:`Key` **KEY_EXCLAM** = ``33`` -! key. +Exclamation mark (``!``) key. .. _class_@GlobalScope_constant_KEY_QUOTEDBL: @@ -1761,7 +1761,7 @@ Space key. :ref:`Key` **KEY_QUOTEDBL** = ``34`` -" key. +Double quotation mark (``"``) key. .. _class_@GlobalScope_constant_KEY_NUMBERSIGN: @@ -1769,7 +1769,7 @@ Space key. :ref:`Key` **KEY_NUMBERSIGN** = ``35`` -# key. +Number sign or *hash* (``#``) key. .. _class_@GlobalScope_constant_KEY_DOLLAR: @@ -1777,7 +1777,7 @@ Space key. :ref:`Key` **KEY_DOLLAR** = ``36`` -$ key. +Dollar sign (``$``) key. .. _class_@GlobalScope_constant_KEY_PERCENT: @@ -1785,7 +1785,7 @@ $ key. :ref:`Key` **KEY_PERCENT** = ``37`` -% key. +Percent sign (``%``) key. .. _class_@GlobalScope_constant_KEY_AMPERSAND: @@ -1793,7 +1793,7 @@ $ key. :ref:`Key` **KEY_AMPERSAND** = ``38`` -& key. +Ampersand (``&``) key. .. _class_@GlobalScope_constant_KEY_APOSTROPHE: @@ -1801,7 +1801,7 @@ $ key. :ref:`Key` **KEY_APOSTROPHE** = ``39`` -' key. +Apostrophe (``'``) key. .. _class_@GlobalScope_constant_KEY_PARENLEFT: @@ -1809,7 +1809,7 @@ $ key. :ref:`Key` **KEY_PARENLEFT** = ``40`` -( key. +Left parenthesis (``(``) key. .. _class_@GlobalScope_constant_KEY_PARENRIGHT: @@ -1817,7 +1817,7 @@ $ key. :ref:`Key` **KEY_PARENRIGHT** = ``41`` -) key. +Right parenthesis (``)``) key. .. _class_@GlobalScope_constant_KEY_ASTERISK: @@ -1825,7 +1825,7 @@ $ key. :ref:`Key` **KEY_ASTERISK** = ``42`` -\* key. +Asterisk (``*``) key. .. _class_@GlobalScope_constant_KEY_PLUS: @@ -1833,7 +1833,7 @@ $ key. :ref:`Key` **KEY_PLUS** = ``43`` -+ key. +Plus (``+``) key. .. _class_@GlobalScope_constant_KEY_COMMA: @@ -1841,7 +1841,7 @@ $ key. :ref:`Key` **KEY_COMMA** = ``44`` -, key. +Comma (``,``) key. .. _class_@GlobalScope_constant_KEY_MINUS: @@ -1849,7 +1849,7 @@ $ key. :ref:`Key` **KEY_MINUS** = ``45`` -- key. +Minus (``-``) key. .. _class_@GlobalScope_constant_KEY_PERIOD: @@ -1857,7 +1857,7 @@ $ key. :ref:`Key` **KEY_PERIOD** = ``46`` -. key. +Period (``.``) key. .. _class_@GlobalScope_constant_KEY_SLASH: @@ -1865,7 +1865,7 @@ $ key. :ref:`Key` **KEY_SLASH** = ``47`` -/ key. +Slash (``/``) key. .. _class_@GlobalScope_constant_KEY_0: @@ -1953,7 +1953,7 @@ Number 9 key. :ref:`Key` **KEY_COLON** = ``58`` -: key. +Colon (``:``) key. .. _class_@GlobalScope_constant_KEY_SEMICOLON: @@ -1961,7 +1961,7 @@ Number 9 key. :ref:`Key` **KEY_SEMICOLON** = ``59`` -; key. +Semicolon (``;``) key. .. _class_@GlobalScope_constant_KEY_LESS: @@ -1969,7 +1969,7 @@ Number 9 key. :ref:`Key` **KEY_LESS** = ``60`` -< key. +Less-than sign (``<``) key. .. _class_@GlobalScope_constant_KEY_EQUAL: @@ -1977,7 +1977,7 @@ Number 9 key. :ref:`Key` **KEY_EQUAL** = ``61`` -= key. +Equal sign (``=``) key. .. _class_@GlobalScope_constant_KEY_GREATER: @@ -1985,7 +1985,7 @@ Number 9 key. :ref:`Key` **KEY_GREATER** = ``62`` -> key. +Greater-than sign (``>``) key. .. _class_@GlobalScope_constant_KEY_QUESTION: @@ -1993,7 +1993,7 @@ Number 9 key. :ref:`Key` **KEY_QUESTION** = ``63`` -? key. +Question mark (``?``) key. .. _class_@GlobalScope_constant_KEY_AT: @@ -2001,7 +2001,7 @@ Number 9 key. :ref:`Key` **KEY_AT** = ``64`` -@ key. +At sign (``@``) key. .. _class_@GlobalScope_constant_KEY_A: @@ -2217,7 +2217,7 @@ Z key. :ref:`Key` **KEY_BRACKETLEFT** = ``91`` -[ key. +Left bracket (``[lb]``) key. .. _class_@GlobalScope_constant_KEY_BACKSLASH: @@ -2225,7 +2225,7 @@ Z key. :ref:`Key` **KEY_BACKSLASH** = ``92`` -\\ key. +Backslash (``\``) key. .. _class_@GlobalScope_constant_KEY_BRACKETRIGHT: @@ -2233,7 +2233,7 @@ Z key. :ref:`Key` **KEY_BRACKETRIGHT** = ``93`` -] key. +Right bracket (``[rb]``) key. .. _class_@GlobalScope_constant_KEY_ASCIICIRCUM: @@ -2241,7 +2241,7 @@ Z key. :ref:`Key` **KEY_ASCIICIRCUM** = ``94`` -^ key. +Caret (``^``) key. .. _class_@GlobalScope_constant_KEY_UNDERSCORE: @@ -2249,7 +2249,7 @@ Z key. :ref:`Key` **KEY_UNDERSCORE** = ``95`` -\_ key. +Underscore (``_``) key. .. _class_@GlobalScope_constant_KEY_QUOTELEFT: @@ -2257,7 +2257,7 @@ Z key. :ref:`Key` **KEY_QUOTELEFT** = ``96`` -` key. +Backtick (`````) key. .. _class_@GlobalScope_constant_KEY_BRACELEFT: @@ -2265,7 +2265,7 @@ Z key. :ref:`Key` **KEY_BRACELEFT** = ``123`` -{ key. +Left brace (``{``) key. .. _class_@GlobalScope_constant_KEY_BAR: @@ -2273,7 +2273,7 @@ Z key. :ref:`Key` **KEY_BAR** = ``124`` -| key. +Vertical bar or *pipe* (``|``) key. .. _class_@GlobalScope_constant_KEY_BRACERIGHT: @@ -2281,7 +2281,7 @@ Z key. :ref:`Key` **KEY_BRACERIGHT** = ``125`` -} key. +Right brace (``}``) key. .. _class_@GlobalScope_constant_KEY_ASCIITILDE: @@ -2289,7 +2289,7 @@ Z key. :ref:`Key` **KEY_ASCIITILDE** = ``126`` -~ key. +Tilde (``~``) key. .. _class_@GlobalScope_constant_KEY_YEN: @@ -2297,7 +2297,7 @@ Z key. :ref:`Key` **KEY_YEN** = ``165`` -ยฅ key. +Yen symbol (``ยฅ``) key. .. _class_@GlobalScope_constant_KEY_SECTION: @@ -2305,7 +2305,7 @@ Z key. :ref:`Key` **KEY_SECTION** = ``167`` -ยง key. +Section sign (``ยง``) key. .. rst-class:: classref-item-separator @@ -3867,11 +3867,19 @@ Hints that a :ref:`Callable` property should be displayed as a c \ **Note:** A :ref:`Callable` cannot be properly serialized and stored in a file, so it is recommended to use :ref:`PROPERTY_USAGE_EDITOR` instead of :ref:`PROPERTY_USAGE_DEFAULT`. +.. _class_@GlobalScope_constant_PROPERTY_HINT_ONESHOT: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_ONESHOT** = ``40`` + +Hints that a property will be changed on its own after setting, such as :ref:`AudioStreamPlayer.playing` or :ref:`GPUParticles3D.emitting`. + .. _class_@GlobalScope_constant_PROPERTY_HINT_MAX: .. rst-class:: classref-enumeration-constant -:ref:`PropertyHint` **PROPERTY_HINT_MAX** = ``40`` +:ref:`PropertyHint` **PROPERTY_HINT_MAX** = ``42`` Represents the size of the :ref:`PropertyHint` enum. @@ -5733,7 +5741,7 @@ Returns an "eased" value of ``x`` based on an easing function defined with ``cur .. code:: text - Lower than -1.0 (exclusive): Ease in-out - - 1.0: Linear + - -1.0: Linear - Between -1.0 and 0.0 (exclusive): Ease out-in - 0.0: Constant - Between 0.0 to 1.0 (exclusive): Ease out @@ -6465,8 +6473,6 @@ Converts one or more arguments of any type to string in the best way possible an The following BBCode tags are supported: ``b``, ``i``, ``u``, ``s``, ``indent``, ``code``, ``url``, ``center``, ``right``, ``color``, ``bgcolor``, ``fgcolor``. -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. diff --git a/classes/class_aabb.rst b/classes/class_aabb.rst index 74368d2655c..40a2d498fa0 100644 --- a/classes/class_aabb.rst +++ b/classes/class_aabb.rst @@ -163,7 +163,7 @@ Property Descriptions :ref:`Vector3` **end** = ``Vector3(0, 0, 0)`` :ref:`๐Ÿ”—` -The ending point. This is usually the corner on the top-right and forward of the bounding box, and is equivalent to ``position + size``. Setting this point affects the :ref:`size`. +The ending point. This is usually the corner on the top-right and back of the bounding box, and is equivalent to ``position + size``. Setting this point affects the :ref:`size`. .. rst-class:: classref-item-separator @@ -175,7 +175,7 @@ The ending point. This is usually the corner on the top-right and forward of the :ref:`Vector3` **position** = ``Vector3(0, 0, 0)`` :ref:`๐Ÿ”—` -The origin point. This is usually the corner on the bottom-left and back of the bounding box. +The origin point. This is usually the corner on the bottom-left and forward of the bounding box. .. rst-class:: classref-item-separator @@ -189,7 +189,7 @@ The origin point. This is usually the corner on the bottom-left and back of the The bounding box's width, height, and depth starting from :ref:`position`. Setting this value also affects the :ref:`end` point. -\ **Note:** It's recommended setting the width, height, and depth to non-negative values. This is because most methods in Redot assume that the :ref:`position` is the bottom-left-back corner, and the :ref:`end` is the top-right-forward corner. To get an equivalent bounding box with non-negative size, use :ref:`abs`. +\ **Note:** It's recommended setting the width, height, and depth to non-negative values. This is because most methods in Redot assume that the :ref:`position` is the bottom-left-forward corner, and the :ref:`end` is the top-right-back corner. To get an equivalent bounding box with non-negative size, use :ref:`abs`. .. rst-class:: classref-section-separator @@ -252,8 +252,8 @@ Returns an **AABB** equivalent to this bounding box, with its width, height, and var box = AABB(Vector3(5, 0, 5), Vector3(-20, -10, -5)) var absolute = box.abs() - print(absolute.position) # Prints (-15, -10, 0) - print(absolute.size) # Prints (20, 10, 5) + print(absolute.position) # Prints (-15.0, -10.0, 0.0) + print(absolute.size) # Prints (20.0, 10.0, 5.0) .. code-tab:: csharp @@ -323,12 +323,12 @@ Returns a copy of this bounding box expanded to align the edges with the given ` var box = AABB(Vector3(0, 0, 0), Vector3(5, 2, 5)) box = box.expand(Vector3(10, 0, 0)) - print(box.position) # Prints (0, 0, 0) - print(box.size) # Prints (10, 2, 5) + print(box.position) # Prints (0.0, 0.0, 0.0) + print(box.size) # Prints (10.0, 2.0, 5.0) box = box.expand(Vector3(-5, 0, 5)) - print(box.position) # Prints (-5, 0, 0) - print(box.size) # Prints (15, 2, 5) + print(box.position) # Prints (-5.0, 0.0, 0.0) + print(box.size) # Prints (15.0, 2.0, 5.0) .. code-tab:: csharp @@ -387,16 +387,16 @@ Returns the longest normalized axis of this bounding box's :ref:`size`\[:ref:`StringName`\] | :ref:`get_animation_list`\ (\ ) |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_animation_list_size`\ (\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_animation`\ (\ name\: :ref:`StringName`\ ) |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`remove_animation`\ (\ name\: :ref:`StringName`\ ) | @@ -150,6 +152,18 @@ Returns the keys for the :ref:`Animation`\ s stored in the libr ---- +.. _class_AnimationLibrary_method_get_animation_list_size: + +.. rst-class:: classref-method + +:ref:`int` **get_animation_list_size**\ (\ ) |const| :ref:`๐Ÿ”—` + +Returns the key count for the :ref:`Animation`\ s stored in the library. + +.. rst-class:: classref-item-separator + +---- + .. _class_AnimationLibrary_method_has_animation: .. rst-class:: classref-method diff --git a/classes/class_animationmixer.rst b/classes/class_animationmixer.rst index 736729b33e4..9bab5d9b10c 100644 --- a/classes/class_animationmixer.rst +++ b/classes/class_animationmixer.rst @@ -55,6 +55,8 @@ Properties +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+--------------------+ | :ref:`bool` | :ref:`reset_on_save` | ``true`` | +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+--------------------+ + | :ref:`bool` | :ref:`root_motion_local` | | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+--------------------+ | :ref:`NodePath` | :ref:`root_motion_track` | ``NodePath("")`` | +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+--------------------+ | :ref:`NodePath` | :ref:`root_node` | ``NodePath("..")`` | @@ -474,6 +476,23 @@ This makes it more convenient to preview and edit animations in the editor, as c ---- +.. _class_AnimationMixer_property_root_motion_local: + +.. rst-class:: classref-property + +:ref:`bool` **root_motion_local** :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_root_motion_local**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_root_motion_local**\ (\ ) + +If ``true``, :ref:`get_root_motion_position` value is extracted as a local translation value before blending. In other words, it is treated like the translation is done after the rotation. + +.. rst-class:: classref-item-separator + +---- + .. _class_AnimationMixer_property_root_motion_track: .. rst-class:: classref-property @@ -684,13 +703,13 @@ The most basic example is applying position to :ref:`CharacterBody3D` is ``true``, return the pre-multiplied translation value with the inverted rotation. + +In this case, the code can be written as follows: + + +.. tabs:: + + .. code-tab:: gdscript + + func _process(delta): + if Input.is_action_just_pressed("animate"): + state_machine.travel("Animate") + set_quaternion(get_quaternion() * animation_tree.get_root_motion_rotation()) + var velocity = get_quaternion() * animation_tree.get_root_motion_position() / delta set_velocity(velocity) move_and_slide() @@ -734,13 +772,13 @@ For example, if an animation with only one key ``Vector3(0, 0, 0)`` is played in .. code-tab:: gdscript - var prev_root_motion_position_accumulator: Vector3 + var prev_root_motion_position_accumulator func _process(delta): if Input.is_action_just_pressed("animate"): state_machine.travel("Animate") - var current_root_motion_position_accumulator: Vector3 = animation_tree.get_root_motion_position_accumulator() - var difference: Vector3 = current_root_motion_position_accumulator - prev_root_motion_position_accumulator + var current_root_motion_position_accumulator = animation_tree.get_root_motion_position_accumulator() + var difference = current_root_motion_position_accumulator - prev_root_motion_position_accumulator prev_root_motion_position_accumulator = current_root_motion_position_accumulator transform.origin += difference @@ -801,13 +839,13 @@ For example, if an animation with only one key ``Quaternion(0, 0, 0, 1)`` is pla .. code-tab:: gdscript - var prev_root_motion_rotation_accumulator: Quaternion + var prev_root_motion_rotation_accumulator func _process(delta): if Input.is_action_just_pressed("animate"): state_machine.travel("Animate") - var current_root_motion_rotation_accumulator: Quaternion = animation_tree.get_root_motion_rotation_accumulator() - var difference: Quaternion = prev_root_motion_rotation_accumulator.inverse() * current_root_motion_rotation_accumulator + var current_root_motion_rotation_accumulator = animation_tree.get_root_motion_rotation_accumulator() + var difference = prev_root_motion_rotation_accumulator.inverse() * current_root_motion_rotation_accumulator prev_root_motion_rotation_accumulator = current_root_motion_rotation_accumulator transform.basis *= Basis(difference) @@ -838,8 +876,8 @@ The most basic example is applying scale to :ref:`CharacterBody3D` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`AnimationNodeOutput`, :ref:`AnimationNodeSync`, :ref:`AnimationNodeTimeScale`, :ref:`AnimationNodeTimeSeek`, :ref:`AnimationRootNode` +**Inherited By:** :ref:`AnimationNodeExtension`, :ref:`AnimationNodeOutput`, :ref:`AnimationNodeSync`, :ref:`AnimationNodeTimeScale`, :ref:`AnimationNodeTimeSeek`, :ref:`AnimationRootNode` Base class for :ref:`AnimationTree` nodes. Not related to scene nodes. @@ -95,8 +95,12 @@ Methods +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`get_parameter`\ (\ name\: :ref:`StringName`\ ) |const| | +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_processing_animation_tree_instance_id`\ (\ ) |const| | + +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_path_filtered`\ (\ path\: :ref:`NodePath`\ ) |const| | +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_process_testing`\ (\ ) |const| | + +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`remove_input`\ (\ index\: :ref:`int`\ ) | +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_filter_path`\ (\ path\: :ref:`NodePath`, enable\: :ref:`bool`\ ) | @@ -425,13 +429,39 @@ Gets the value of a parameter. Parameters are custom local memory used for your ---- +.. _class_AnimationNode_method_get_processing_animation_tree_instance_id: + +.. rst-class:: classref-method + +:ref:`int` **get_processing_animation_tree_instance_id**\ (\ ) |const| :ref:`๐Ÿ”—` + +Returns the object id of the :ref:`AnimationTree` that owns this node. + +\ **Note:** This method should only be called from within the :ref:`AnimationNodeExtension._process_animation_node` method, and will return an invalid id otherwise. + +.. rst-class:: classref-item-separator + +---- + .. _class_AnimationNode_method_is_path_filtered: .. rst-class:: classref-method :ref:`bool` **is_path_filtered**\ (\ path\: :ref:`NodePath`\ ) |const| :ref:`๐Ÿ”—` -Returns whether the given path is filtered. +Returns ``true`` if the given path is filtered. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationNode_method_is_process_testing: + +.. rst-class:: classref-method + +:ref:`bool` **is_process_testing**\ (\ ) |const| :ref:`๐Ÿ”—` + +Returns ``true`` if this animation node is being processed in test-only mode. .. rst-class:: classref-item-separator diff --git a/classes/class_animationnodeextension.rst b/classes/class_animationnodeextension.rst new file mode 100644 index 00000000000..3d835dd0d0e --- /dev/null +++ b/classes/class_animationnodeextension.rst @@ -0,0 +1,94 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/doc/classes/AnimationNodeExtension.xml. + +.. _class_AnimationNodeExtension: + +AnimationNodeExtension +====================== + +**Experimental:** This class may be changed or removed in future versions. + +**Inherits:** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +Base class for extending :ref:`AnimationRootNode`\ s from GDScript, C#, or C++. + +.. rst-class:: classref-introduction-group + +Description +----------- + +**AnimationNodeExtension** exposes the APIs of :ref:`AnimationRootNode` to allow users to extend it from GDScript, C#, or C++. This class is not meant to be used directly, but to be extended by other classes. It is used to create custom nodes for the :ref:`AnimationTree` system. + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array` | :ref:`_process_animation_node`\ (\ playback_info\: :ref:`PackedFloat64Array`, test_only\: :ref:`bool`\ ) |virtual| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_remaining_time`\ (\ node_info\: :ref:`PackedFloat32Array`, break_loop\: :ref:`bool`\ ) |static| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_looping`\ (\ node_info\: :ref:`PackedFloat32Array`\ ) |static| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_AnimationNodeExtension_private_method__process_animation_node: + +.. rst-class:: classref-method + +:ref:`PackedFloat32Array` **_process_animation_node**\ (\ playback_info\: :ref:`PackedFloat64Array`, test_only\: :ref:`bool`\ ) |virtual| :ref:`๐Ÿ”—` + +A version of the :ref:`AnimationNode._process` method that is meant to be overridden by custom nodes. It returns a :ref:`PackedFloat32Array` with the processed animation data. + +The :ref:`PackedFloat64Array` parameter contains the playback information, containing the following values encoded as floating point numbers (in order): playback time and delta, start and end times, whether a seek was requested (encoded as a float greater than ``0``), whether the seek request was externally requested (encoded as a float greater than ``0``), the current :ref:`LoopedFlag` (encoded as a float), and the current blend weight. + +The function must return a :ref:`PackedFloat32Array` of the node's time info, containing the following values (in order): animation length, time position, delta, :ref:`LoopMode` (encoded as a float), whether the animation is about to end (encoded as a float greater than ``0``) and whether the animation is infinite (encoded as a float greater than ``0``). All values must be included in the returned array. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationNodeExtension_method_get_remaining_time: + +.. rst-class:: classref-method + +:ref:`float` **get_remaining_time**\ (\ node_info\: :ref:`PackedFloat32Array`, break_loop\: :ref:`bool`\ ) |static| :ref:`๐Ÿ”—` + +Returns the animation's remaining time for the given node info. For looping animations, it will only return the remaining time if ``break_loop`` is ``true``, a large integer value will be returned otherwise. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationNodeExtension_method_is_looping: + +.. rst-class:: classref-method + +:ref:`bool` **is_looping**\ (\ node_info\: :ref:`PackedFloat32Array`\ ) |static| :ref:`๐Ÿ”—` + +Returns ``true`` if the animation for the given ``node_info`` is looping. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_animationnodeoneshot.rst b/classes/class_animationnodeoneshot.rst index e70fc349afc..d5ee1dfab12 100644 --- a/classes/class_animationnodeoneshot.rst +++ b/classes/class_animationnodeoneshot.rst @@ -272,7 +272,7 @@ If ``true``, breaks the loop at the end of the loop cycle for transition, even i - |void| **set_fadein_curve**\ (\ value\: :ref:`Curve`\ ) - :ref:`Curve` **get_fadein_curve**\ (\ ) -Determines how cross-fading between animations is eased. If empty, the transition will be linear. +Determines how cross-fading between animations is eased. If empty, the transition will be linear. Should be a unit :ref:`Curve`. .. rst-class:: classref-item-separator @@ -308,7 +308,7 @@ The fade-in duration. For example, setting this to ``1.0`` for a 5 second length - |void| **set_fadeout_curve**\ (\ value\: :ref:`Curve`\ ) - :ref:`Curve` **get_fadeout_curve**\ (\ ) -Determines how cross-fading between animations is eased. If empty, the transition will be linear. +Determines how cross-fading between animations is eased. If empty, the transition will be linear. Should be a unit :ref:`Curve`. .. rst-class:: classref-item-separator diff --git a/classes/class_animationnodestatemachinetransition.rst b/classes/class_animationnodestatemachinetransition.rst index 0187136885b..dc914535acf 100644 --- a/classes/class_animationnodestatemachinetransition.rst +++ b/classes/class_animationnodestatemachinetransition.rst @@ -300,7 +300,7 @@ The transition type. - |void| **set_xfade_curve**\ (\ value\: :ref:`Curve`\ ) - :ref:`Curve` **get_xfade_curve**\ (\ ) -Ease curve for better control over cross-fade between this state and the next. +Ease curve for better control over cross-fade between this state and the next. Should be a unit :ref:`Curve`. .. rst-class:: classref-item-separator diff --git a/classes/class_animationnodetimeseek.rst b/classes/class_animationnodetimeseek.rst index 8ab737c672c..fa3145ded64 100644 --- a/classes/class_animationnodetimeseek.rst +++ b/classes/class_animationnodetimeseek.rst @@ -55,6 +55,40 @@ Tutorials - :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-------------------------+------------------------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`explicit_elapse` | ``true`` | + +-------------------------+------------------------------------------------------------------------------+----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_AnimationNodeTimeSeek_property_explicit_elapse: + +.. rst-class:: classref-property + +:ref:`bool` **explicit_elapse** = ``true`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_explicit_elapse**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_explicit_elapse**\ (\ ) + +If ``true``, some processes are executed to handle keys between seeks, such as calculating root motion and finding the nearest discrete key. + .. |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_animationnodetransition.rst b/classes/class_animationnodetransition.rst index 821b8b9b4a9..1b4f7226d9a 100644 --- a/classes/class_animationnodetransition.rst +++ b/classes/class_animationnodetransition.rst @@ -163,7 +163,7 @@ The number of enabled input ports for this animation node. - |void| **set_xfade_curve**\ (\ value\: :ref:`Curve`\ ) - :ref:`Curve` **get_xfade_curve**\ (\ ) -Determines how cross-fading between animations is eased. If empty, the transition will be linear. +Determines how cross-fading between animations is eased. If empty, the transition will be linear. Should be a unit :ref:`Curve`. .. rst-class:: classref-item-separator diff --git a/classes/class_array.rst b/classes/class_array.rst index 6fef92f55d8..1dd896a3070 100644 --- a/classes/class_array.rst +++ b/classes/class_array.rst @@ -444,17 +444,17 @@ The ``method`` should take one :ref:`Variant` parameter (the curr public override void _Ready() { - // Prints true (3/3 elements evaluate to true). + // Prints True (3/3 elements evaluate to true). GD.Print(new Godot.Collections.Array>int< { 6, 10, 6 }.All(GreaterThan5)); - // Prints false (1/3 elements evaluate to true). + // Prints False (1/3 elements evaluate to true). GD.Print(new Godot.Collections.Array>int< { 4, 10, 4 }.All(GreaterThan5)); - // Prints false (0/3 elements evaluate to true). + // Prints False (0/3 elements evaluate to true). GD.Print(new Godot.Collections.Array>int< { 4, 4, 4 }.All(GreaterThan5)); - // Prints true (0/0 elements evaluate to true). + // Prints True (0/0 elements evaluate to true). GD.Print(new Godot.Collections.Array>int< { }.All(GreaterThan5)); // Same as the first line above, but using a lambda function. - GD.Print(new Godot.Collections.Array>int< { 6, 10, 6 }.All(element => element > 5)); // Prints true + GD.Print(new Godot.Collections.Array>int< { 6, 10, 6 }.All(element => element > 5)); // Prints True } @@ -876,10 +876,10 @@ Returns ``true`` if the array contains the given ``value``. var arr = new Godot.Collections.Array { "inside", 7 }; // By C# convention, this method is renamed to `Contains`. - GD.Print(arr.Contains("inside")); // Prints true - GD.Print(arr.Contains("outside")); // Prints false - GD.Print(arr.Contains(7)); // Prints true - GD.Print(arr.Contains("7")); // Prints false + GD.Print(arr.Contains("inside")); // Prints True + GD.Print(arr.Contains("outside")); // Prints False + GD.Print(arr.Contains(7)); // Prints True + GD.Print(arr.Contains("7")); // Prints False diff --git a/classes/class_arraymesh.rst b/classes/class_arraymesh.rst index c1e35566760..a536b5e3b51 100644 --- a/classes/class_arraymesh.rst +++ b/classes/class_arraymesh.rst @@ -134,6 +134,8 @@ Methods +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PrimitiveType` | :ref:`surface_get_primitive_type`\ (\ surf_idx\: :ref:`int`\ ) |const| | +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`surface_remove`\ (\ surf_idx\: :ref:`int`\ ) | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`surface_set_name`\ (\ surf_idx\: :ref:`int`, name\: :ref:`String`\ ) | +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`surface_update_attribute_region`\ (\ surf_idx\: :ref:`int`, offset\: :ref:`int`, data\: :ref:`PackedByteArray`\ ) | @@ -402,6 +404,18 @@ Returns the primitive type of the requested surface (see :ref:`add_surface_from_ ---- +.. _class_ArrayMesh_method_surface_remove: + +.. rst-class:: classref-method + +|void| **surface_remove**\ (\ surf_idx\: :ref:`int`\ ) :ref:`๐Ÿ”—` + +Removes the surface at the given index from the Mesh, shifting surfaces with higher index down by one. + +.. rst-class:: classref-item-separator + +---- + .. _class_ArrayMesh_method_surface_set_name: .. rst-class:: classref-method diff --git a/classes/class_astar3d.rst b/classes/class_astar3d.rst index 69862aa1a5b..c18872fff7f 100644 --- a/classes/class_astar3d.rst +++ b/classes/class_astar3d.rst @@ -23,34 +23,48 @@ A\* (A star) is a computer algorithm used in pathfinding and graph traversal, th 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. +It is also possible to use non-Euclidean distances. To do so, create a script that extends **AStar3D** and override the methods :ref:`_compute_cost` and :ref:`_estimate_cost`. Both should take two point IDs and return the distance between the corresponding points. + +\ **Example:** Use Manhattan distance instead of Euclidean distance: .. tabs:: .. code-tab:: gdscript - class MyAStar: - extends AStar3D + class_name MyAStar3D + extends AStar3D - func _compute_cost(u, v): - return abs(u - v) + func _compute_cost(u, v): + var u_pos = get_point_position(u) + var v_pos = get_point_position(v) + return abs(u_pos.x - v_pos.x) + abs(u_pos.y - v_pos.y) + abs(u_pos.z - v_pos.z) - func _estimate_cost(u, v): - return min(0, abs(u - v) - 1) + func _estimate_cost(u, v): + var u_pos = get_point_position(u) + var v_pos = get_point_position(v) + return abs(u_pos.x - v_pos.x) + abs(u_pos.y - v_pos.y) + abs(u_pos.z - v_pos.z) .. code-tab:: csharp - public partial class MyAStar : AStar3D + using Godot; + + [GlobalClass] + public partial class MyAStar3D : AStar3D { public override float _ComputeCost(long fromId, long toId) { - return Mathf.Abs((int)(fromId - toId)); + Vector3 fromPoint = GetPointPosition(fromId); + Vector3 toPoint = GetPointPosition(toId); + + return Mathf.Abs(fromPoint.X - toPoint.X) + Mathf.Abs(fromPoint.Y - toPoint.Y) + Mathf.Abs(fromPoint.Z - toPoint.Z); } public override float _EstimateCost(long fromId, long toId) { - return Mathf.Min(0, Mathf.Abs((int)(fromId - toId)) - 1); + Vector3 fromPoint = GetPointPosition(fromId); + Vector3 toPoint = GetPointPosition(toId); + return Mathf.Abs(fromPoint.X - toPoint.X) + Mathf.Abs(fromPoint.Y - toPoint.Y) + Mathf.Abs(fromPoint.Z - toPoint.Z); } } diff --git a/classes/class_astargrid2d.rst b/classes/class_astargrid2d.rst index 6206a99536f..c7e8641207e 100644 --- a/classes/class_astargrid2d.rst +++ b/classes/class_astargrid2d.rst @@ -32,8 +32,8 @@ To use **AStarGrid2D**, you only need to set the :ref:`region` | :ref:`volume_db` | ``0.0`` | - +---------------------------+---------------------------------------------------------------+---------+ + +---------------------------+-----------------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`volume_db` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`volume_linear` | | + +---------------------------+-----------------------------------------------------------------------+---------+ .. rst-class:: classref-section-separator @@ -62,6 +64,25 @@ Property Descriptions Amount of amplification in decibels. Positive values make the sound louder, negative values make it quieter. Value can range from -80 to 24. +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioEffectAmplify_property_volume_linear: + +.. rst-class:: classref-property + +:ref:`float` **volume_linear** :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_volume_linear**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_volume_linear**\ (\ ) + +Amount of amplification as a linear value. + +\ **Note:** This member modifies :ref:`volume_db` for convenience. The returned value is equivalent to the result of :ref:`@GlobalScope.db_to_linear` on :ref:`volume_db`. Setting this member is equivalent to setting :ref:`volume_db` to the result of :ref:`@GlobalScope.linear_to_db` on a value. + .. |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_audioserver.rst b/classes/class_audioserver.rst index ea8356adc96..c0f40d3357b 100644 --- a/classes/class_audioserver.rst +++ b/classes/class_audioserver.rst @@ -87,6 +87,8 @@ Methods +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_bus_volume_db`\ (\ bus_idx\: :ref:`int`\ ) |const| | +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_bus_volume_linear`\ (\ bus_idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_driver_name`\ (\ ) |const| | +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`get_input_device_list`\ (\ ) | @@ -141,6 +143,8 @@ Methods +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_bus_volume_db`\ (\ bus_idx\: :ref:`int`, volume_db\: :ref:`float`\ ) | +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bus_volume_linear`\ (\ bus_idx\: :ref:`int`, volume_linear\: :ref:`float`\ ) | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_enable_tagging_used_audio_streams`\ (\ enable\: :ref:`bool`\ ) | +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`swap_bus_effects`\ (\ bus_idx\: :ref:`int`, effect_idx\: :ref:`int`, by_effect_idx\: :ref:`int`\ ) | @@ -518,6 +522,20 @@ Returns the volume of the bus at index ``bus_idx`` in dB. ---- +.. _class_AudioServer_method_get_bus_volume_linear: + +.. rst-class:: classref-method + +:ref:`float` **get_bus_volume_linear**\ (\ bus_idx\: :ref:`int`\ ) |const| :ref:`๐Ÿ”—` + +Returns the volume of the bus at index ``bus_idx`` as a linear value. + +\ **Note:** The returned value is equivalent to the result of :ref:`@GlobalScope.db_to_linear` on the result of :ref:`get_bus_volume_db`. + +.. rst-class:: classref-item-separator + +---- + .. _class_AudioServer_method_get_driver_name: .. rst-class:: classref-method @@ -850,7 +868,21 @@ If ``true``, the bus at index ``bus_idx`` is in solo mode. |void| **set_bus_volume_db**\ (\ bus_idx\: :ref:`int`, volume_db\: :ref:`float`\ ) :ref:`๐Ÿ”—` -Sets the volume of the bus at index ``bus_idx`` to ``volume_db``. +Sets the volume in decibels of the bus at index ``bus_idx`` to ``volume_db``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioServer_method_set_bus_volume_linear: + +.. rst-class:: classref-method + +|void| **set_bus_volume_linear**\ (\ bus_idx\: :ref:`int`, volume_linear\: :ref:`float`\ ) :ref:`๐Ÿ”—` + +Sets the volume as a linear value of the bus at index ``bus_idx`` to ``volume_linear``. + +\ **Note:** Using this method is equivalent to calling :ref:`set_bus_volume_db` with the result of :ref:`@GlobalScope.linear_to_db` on a value. .. rst-class:: classref-item-separator diff --git a/classes/class_audiostream.rst b/classes/class_audiostream.rst index 29e5956d5e8..504bd968144 100644 --- a/classes/class_audiostream.rst +++ b/classes/class_audiostream.rst @@ -44,6 +44,8 @@ Methods .. table:: :widths: auto + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_bar_beats`\ (\ ) |virtual| |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_get_beat_count`\ (\ ) |virtual| |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ @@ -55,6 +57,8 @@ Methods +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`_get_stream_name`\ (\ ) |virtual| |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_has_loop`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | :ref:`AudioStreamPlayback` | :ref:`_instantiate_playback`\ (\ ) |virtual| |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`_is_monophonic`\ (\ ) |virtual| |const| | @@ -98,6 +102,18 @@ Signal to be emitted to notify when the parameter list changed. Method Descriptions ------------------- +.. _class_AudioStream_private_method__get_bar_beats: + +.. rst-class:: classref-method + +:ref:`int` **_get_bar_beats**\ (\ ) |virtual| |const| :ref:`๐Ÿ”—` + +Override this method to return the bar beats of this stream. + +.. rst-class:: classref-item-separator + +---- + .. _class_AudioStream_private_method__get_beat_count: .. rst-class:: classref-method @@ -162,13 +178,25 @@ Override this method to customize the name assigned to this audio stream. Unused ---- +.. _class_AudioStream_private_method__has_loop: + +.. rst-class:: classref-method + +:ref:`bool` **_has_loop**\ (\ ) |virtual| |const| :ref:`๐Ÿ”—` + +Override this method to return ``true`` if this stream has a loop. + +.. rst-class:: classref-item-separator + +---- + .. _class_AudioStream_private_method__instantiate_playback: .. rst-class:: classref-method :ref:`AudioStreamPlayback` **_instantiate_playback**\ (\ ) |virtual| |const| :ref:`๐Ÿ”—` -Override this method to customize the returned value of :ref:`instantiate_playback`. Should returned a new :ref:`AudioStreamPlayback` created when the stream is played (such as by an :ref:`AudioStreamPlayer`).. +Override this method to customize the returned value of :ref:`instantiate_playback`. Should return a new :ref:`AudioStreamPlayback` created when the stream is played (such as by an :ref:`AudioStreamPlayer`). .. rst-class:: classref-item-separator diff --git a/classes/class_audiostreamplaybackinteractive.rst b/classes/class_audiostreamplaybackinteractive.rst index 660a1cf72f7..d51f037faf7 100644 --- a/classes/class_audiostreamplaybackinteractive.rst +++ b/classes/class_audiostreamplaybackinteractive.rst @@ -29,11 +29,13 @@ Methods .. table:: :widths: auto - +--------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`switch_to_clip`\ (\ clip_index\: :ref:`int`\ ) | - +--------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`switch_to_clip_by_name`\ (\ clip_name\: :ref:`StringName`\ ) | - +--------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_current_clip_index`\ (\ ) |const| | + +-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`switch_to_clip`\ (\ clip_index\: :ref:`int`\ ) | + +-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`switch_to_clip_by_name`\ (\ clip_name\: :ref:`StringName`\ ) | + +-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -44,6 +46,29 @@ Methods Method Descriptions ------------------- +.. _class_AudioStreamPlaybackInteractive_method_get_current_clip_index: + +.. rst-class:: classref-method + +:ref:`int` **get_current_clip_index**\ (\ ) |const| :ref:`๐Ÿ”—` + +Return the index of the currently playing clip. You can use this to get the name of the currently playing clip with :ref:`AudioStreamInteractive.get_clip_name`. + +\ **Example:** Get the currently playing clip name from inside an :ref:`AudioStreamPlayer` node. + + +.. tabs:: + + .. code-tab:: gdscript + + var playing_clip_name = stream.get_clip_name(get_stream_playback().get_current_clip_index()) + + + +.. rst-class:: classref-item-separator + +---- + .. _class_AudioStreamPlaybackInteractive_method_switch_to_clip: .. rst-class:: classref-method diff --git a/classes/class_audiostreamplayer.rst b/classes/class_audiostreamplayer.rst index 5db1b7ee774..8ec3e96e943 100644 --- a/classes/class_audiostreamplayer.rst +++ b/classes/class_audiostreamplayer.rst @@ -74,6 +74,8 @@ Properties +----------------------------------------------------+----------------------------------------------------------------------+---------------+ | :ref:`float` | :ref:`volume_db` | ``0.0`` | +----------------------------------------------------+----------------------------------------------------------------------+---------------+ + | :ref:`float` | :ref:`volume_linear` | | + +----------------------------------------------------+----------------------------------------------------------------------+---------------+ .. rst-class:: classref-reftable-group @@ -332,9 +334,28 @@ If ``true``, the sounds are paused. Setting :ref:`stream_paused`\ ) - :ref:`float` **get_volume_db**\ (\ ) -Volume of sound, in decibel. This is an offset of the :ref:`stream`'s volume. +Volume of sound, in decibels. This is an offset of the :ref:`stream`'s volume. + +\ **Note:** To convert between decibel and linear energy (like most volume sliders do), use :ref:`volume_linear`, or :ref:`@GlobalScope.db_to_linear` and :ref:`@GlobalScope.linear_to_db`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamPlayer_property_volume_linear: -\ **Note:** To convert between decibel and linear energy (like most volume sliders do), use :ref:`@GlobalScope.db_to_linear` and :ref:`@GlobalScope.linear_to_db`. +.. rst-class:: classref-property + +:ref:`float` **volume_linear** :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_volume_linear**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_volume_linear**\ (\ ) + +Volume of sound, as a linear value. + +\ **Note:** This member modifies :ref:`volume_db` for convenience. The returned value is equivalent to the result of :ref:`@GlobalScope.db_to_linear` on :ref:`volume_db`. Setting this member is equivalent to setting :ref:`volume_db` to the result of :ref:`@GlobalScope.linear_to_db` on a value. .. rst-class:: classref-section-separator @@ -355,6 +376,8 @@ Returns the position in the :ref:`AudioStream` of the latest \ **Note:** The position is not always accurate, as the :ref:`AudioServer` does not mix audio every processed frame. To get more accurate results, add :ref:`AudioServer.get_time_since_last_mix` to the returned position. +\ **Note:** This method always returns ``0.0`` if the :ref:`stream` is an :ref:`AudioStreamInteractive`, since it can have multiple clips playing at once. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_audiostreamplayer2d.rst b/classes/class_audiostreamplayer2d.rst index 9119512e02e..089af165b40 100644 --- a/classes/class_audiostreamplayer2d.rst +++ b/classes/class_audiostreamplayer2d.rst @@ -72,6 +72,8 @@ Properties +----------------------------------------------------+------------------------------------------------------------------------------+---------------+ | :ref:`float` | :ref:`volume_db` | ``0.0`` | +----------------------------------------------------+------------------------------------------------------------------------------+---------------+ + | :ref:`float` | :ref:`volume_linear` | | + +----------------------------------------------------+------------------------------------------------------------------------------+---------------+ .. rst-class:: classref-reftable-group @@ -340,7 +342,26 @@ If ``true``, the playback is paused. You can resume it by setting :ref:`stream_p - |void| **set_volume_db**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_volume_db**\ (\ ) -Base volume before attenuation. +Base volume before attenuation, in decibels. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamPlayer2D_property_volume_linear: + +.. rst-class:: classref-property + +:ref:`float` **volume_linear** :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_volume_linear**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_volume_linear**\ (\ ) + +Base volume before attenuation, as a linear value. + +\ **Note:** This member modifies :ref:`volume_db` for convenience. The returned value is equivalent to the result of :ref:`@GlobalScope.db_to_linear` on :ref:`volume_db`. Setting this member is equivalent to setting :ref:`volume_db` to the result of :ref:`@GlobalScope.linear_to_db` on a value. .. rst-class:: classref-section-separator diff --git a/classes/class_audiostreamplayer3d.rst b/classes/class_audiostreamplayer3d.rst index f436ca4129a..e6132685359 100644 --- a/classes/class_audiostreamplayer3d.rst +++ b/classes/class_audiostreamplayer3d.rst @@ -88,6 +88,8 @@ Properties +--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+---------------+ | :ref:`float` | :ref:`volume_db` | ``0.0`` | +--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+---------------+ + | :ref:`float` | :ref:`volume_linear` | | + +--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+---------------+ .. rst-class:: classref-reftable-group @@ -575,6 +577,25 @@ The factor for the attenuation effect. Higher values make the sound audible over The base sound level before attenuation, in decibels. +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamPlayer3D_property_volume_linear: + +.. rst-class:: classref-property + +:ref:`float` **volume_linear** :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_volume_linear**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_volume_linear**\ (\ ) + +The base sound level before attenuation, as a linear value. + +\ **Note:** This member modifies :ref:`volume_db` for convenience. The returned value is equivalent to the result of :ref:`@GlobalScope.db_to_linear` on :ref:`volume_db`. Setting this member is equivalent to setting :ref:`volume_db` to the result of :ref:`@GlobalScope.linear_to_db` on a value. + .. rst-class:: classref-section-separator ---- diff --git a/classes/class_audiostreamwav.rst b/classes/class_audiostreamwav.rst index 952c786a1fc..97cbb5cad5a 100644 --- a/classes/class_audiostreamwav.rst +++ b/classes/class_audiostreamwav.rst @@ -62,9 +62,13 @@ Methods .. table:: :widths: auto - +---------------------------------------+-------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`save_to_wav`\ (\ path\: :ref:`String`\ ) | - +---------------------------------------+-------------------------------------------------------------------------------------------------------+ + +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioStreamWAV` | :ref:`load_from_buffer`\ (\ buffer\: :ref:`PackedByteArray`, options\: :ref:`Dictionary` = {}\ ) |static| | + +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioStreamWAV` | :ref:`load_from_file`\ (\ path\: :ref:`String`, options\: :ref:`Dictionary` = {}\ ) |static| | + +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`save_to_wav`\ (\ path\: :ref:`String`\ ) | + +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -298,6 +302,49 @@ If ``true``, audio is stereo. Method Descriptions ------------------- +.. _class_AudioStreamWAV_method_load_from_buffer: + +.. rst-class:: classref-method + +:ref:`AudioStreamWAV` **load_from_buffer**\ (\ buffer\: :ref:`PackedByteArray`, options\: :ref:`Dictionary` = {}\ ) |static| :ref:`๐Ÿ”—` + +Creates a new **AudioStreamWAV** instance from the given buffer. The keys and values of ``options`` match the properties of :ref:`ResourceImporterWAV`. + +The usage of ``options`` is identical to :ref:`load_from_file`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamWAV_method_load_from_file: + +.. rst-class:: classref-method + +:ref:`AudioStreamWAV` **load_from_file**\ (\ path\: :ref:`String`, options\: :ref:`Dictionary` = {}\ ) |static| :ref:`๐Ÿ”—` + +Creates a new **AudioStreamWAV** instance from the given file path. The keys and values of ``options`` match the properties of :ref:`ResourceImporterWAV`. + +\ **Example:** Load the first file dropped as a WAV and play it: + +:: + + @onready var audio_player = $AudioStreamPlayer + + func _ready(): + get_window().files_dropped.connect(_on_files_dropped) + + func _on_files_dropped(files): + if files[0].get_extension() == "wav": + audio_player.stream = AudioStreamWAV.load_from_file(files[0], { + "force/max_rate": true, + "force/max_rate_hz": 11025 + }) + audio_player.play() + +.. rst-class:: classref-item-separator + +---- + .. _class_AudioStreamWAV_method_save_to_wav: .. rst-class:: classref-method diff --git a/classes/class_basematerial3d.rst b/classes/class_basematerial3d.rst index 8471b411c48..4c8bcfd14bc 100644 --- a/classes/class_basematerial3d.rst +++ b/classes/class_basematerial3d.rst @@ -1536,7 +1536,7 @@ The strength of the anisotropy effect. This is multiplied by :ref:`anisotropy_fl - |void| **set_feature**\ (\ feature\: :ref:`Feature`, enable\: :ref:`bool`\ ) - :ref:`bool` **get_feature**\ (\ feature\: :ref:`Feature`\ ) |const| -If ``true``, anisotropy is enabled. Anisotropy changes the shape of the specular blob and aligns it to tangent space. This is useful for brushed aluminium and hair reflections. +If ``true``, anisotropy is enabled. Anisotropy changes the shape of the specular blob and aligns it to tangent space. This is useful for brushed aluminum and hair reflections. \ **Note:** Mesh tangents are needed for anisotropy to work. If the mesh does not contain tangents, the anisotropy effect will appear broken. @@ -1731,8 +1731,6 @@ If ``true``, the shader will keep the scale set for the mesh. Otherwise, the sca Controls how the object faces the camera. See :ref:`BillboardMode`. -\ **Note:** When billboarding is enabled and the material also casts shadows, billboards will face **the** camera in the scene when rendering shadows. In scenes with multiple cameras, the intended shadow cannot be determined and this will result in undefined behavior. See `GitHub Pull Request #72638 `__ for details. - \ **Note:** Billboard mode is not suitable for VR because the left-right vector of the camera is not horizontal when the screen is attached to your head instead of on the table. See `GitHub issue #41567 `__ for details. .. rst-class:: classref-item-separator @@ -2740,6 +2738,8 @@ If ``true``, the proximity fade effect is enabled. The proximity fade effect fad If ``true``, the refraction effect is enabled. Distorts transparency based on light from behind the object. +\ **Note:** Refraction is implemented using the screen texture. Only opaque materials will appear in the refraction, since transparent materials do not appear in the screen texture. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_basis.rst b/classes/class_basis.rst index b5a09c0fbdd..2b9fe5d168e 100644 --- a/classes/class_basis.rst +++ b/classes/class_basis.rst @@ -21,7 +21,17 @@ The **Basis** built-in :ref:`Variant` type is a 3ร—3 `matrix `, :ref:`y`, and :ref:`z`. The length of each axis (:ref:`Vector3.length`) influences the basis's scale, while the direction of all axes influence the rotation. Usually, these axes are perpendicular to one another. However, when you rotate any axis individually, the basis becomes sheared. Applying a sheared basis to a 3D model will make the model appear distorted. -A **Basis** is **orthogonal** if its axes are perpendicular to each other. A basis is **normalized** if the length of every axis is ``1``. A basis is **uniform** if all axes share the same length (see :ref:`get_scale`). A basis is **orthonormal** if it is both orthogonal and normalized, which allows it to only represent rotations. A basis is **conformal** if it is both orthogonal and uniform, which ensures it is not distorted. +A **Basis** is: + +- **Orthogonal** if its axes are perpendicular to each other. + +- **Normalized** if the length of every axis is ``1.0``. + +- **Uniform** if all axes share the same length (see :ref:`get_scale`). + +- **Orthonormal** if it is both orthogonal and normalized, which allows it to only represent rotations (see :ref:`orthonormalized`). + +- **Conformal** if it is both orthogonal and uniform, which ensures it is not distorted. For a general introduction, see the :doc:`Matrices and transforms <../tutorials/math/matrices_and_transforms>` tutorial. @@ -179,7 +189,7 @@ Constants **IDENTITY** = ``Basis(1, 0, 0, 0, 1, 0, 0, 0, 1)`` :ref:`๐Ÿ”—` -The identity basis. This is a basis with no rotation, no shear, and its scale being ``1``. This means that: +The identity **Basis**. This is an orthonormal basis with no rotation, no shear, and a scale of :ref:`Vector3.ONE`. This also means that: - The :ref:`x` points right (:ref:`Vector3.RIGHT`); @@ -189,18 +199,20 @@ The identity basis. This is a basis with no rotation, no shear, and its scale be :: - var basis := Basis.IDENTITY + var basis = Basis.IDENTITY print("| X | Y | Z") - print("| %s | %s | %s" % [basis.x.x, basis.y.x, basis.z.x]) - print("| %s | %s | %s" % [basis.x.y, basis.y.y, basis.z.y]) - print("| %s | %s | %s" % [basis.x.z, basis.y.z, basis.z.z]) + print("| %.f | %.f | %.f" % [basis.x.x, basis.y.x, basis.z.x]) + print("| %.f | %.f | %.f" % [basis.x.y, basis.y.y, basis.z.y]) + print("| %.f | %.f | %.f" % [basis.x.z, basis.y.z, basis.z.z]) # Prints: # | X | Y | Z # | 1 | 0 | 0 # | 0 | 1 | 0 # | 0 | 0 | 1 -This is identical to creating :ref:`Basis` without any parameters. This constant can be used to make your code clearer, and for consistency with C#. +If a :ref:`Vector3` or another **Basis** is transformed (multiplied) by this constant, no transformation occurs. + +\ **Note:** In GDScript, this constant is equivalent to creating a :ref:`Basis` without any arguments. It can be used to make your code clearer, and for consistency with C#. .. _class_Basis_constant_FLIP_X: @@ -294,7 +306,7 @@ Constructor Descriptions :ref:`Basis` **Basis**\ (\ ) :ref:`๐Ÿ”—` -Constructs a **Basis** identical to the :ref:`IDENTITY`. +Constructs a **Basis** identical to :ref:`IDENTITY`. \ **Note:** In C#, this constructs a **Basis** with all of its components set to :ref:`Vector3.ZERO`. @@ -359,7 +371,7 @@ Method Descriptions Returns the `determinant `__ of this basis's matrix. For advanced math, this number can be used to determine a few attributes: -- If the determinant is exactly ``0``, the basis is not invertible (see :ref:`inverse`). +- If the determinant is exactly ``0.0``, the basis is not invertible (see :ref:`inverse`). - If the determinant is a negative number, the basis represents a negative scale. @@ -377,9 +389,9 @@ Returns the `determinant `__ of this Constructs a new **Basis** that only represents rotation from the given :ref:`Vector3` of `Euler angles `__, in radians. -- The :ref:`Vector3.x` should contain the angle around the :ref:`x` axis (pitch). +- The :ref:`Vector3.x` should contain the angle around the :ref:`x` axis (pitch); -- The :ref:`Vector3.y` should contain the angle around the :ref:`y` axis (yaw). +- The :ref:`Vector3.y` should contain the angle around the :ref:`y` axis (yaw); - The :ref:`Vector3.z` should contain the angle around the :ref:`z` axis (roll). @@ -391,14 +403,14 @@ Constructs a new **Basis** that only represents rotation from the given :ref:`Ve # Creates a Basis whose z axis points down. var my_basis = Basis.from_euler(Vector3(TAU / 4, 0, 0)) - print(my_basis.z) # Prints (0, -1, 0). + print(my_basis.z) # Prints (0.0, -1.0, 0.0) .. code-tab:: csharp // Creates a Basis whose z axis points down. var myBasis = Basis.FromEuler(new Vector3(Mathf.Tau / 4.0f, 0.0f, 0.0f)); - GD.Print(myBasis.Z); // Prints (0, -1, 0). + GD.Print(myBasis.Z); // Prints (0, -1, 0) @@ -423,17 +435,17 @@ Constructs a new **Basis** that only represents scale, with no rotation or shear var my_basis = Basis.from_scale(Vector3(2, 4, 8)) - print(my_basis.x) # Prints (2, 0, 0). - print(my_basis.y) # Prints (0, 4, 0). - print(my_basis.z) # Prints (0, 0, 8). + print(my_basis.x) # Prints (2.0, 0.0, 0.0) + print(my_basis.y) # Prints (0.0, 4.0, 0.0) + print(my_basis.z) # Prints (0.0, 0.0, 8.0) .. code-tab:: csharp var myBasis = Basis.FromScale(new Vector3(2.0f, 4.0f, 8.0f)); - GD.Print(myBasis.X); // Prints (2, 0, 0). - GD.Print(myBasis.Y); // Prints (0, 4, 0). - GD.Print(myBasis.Z); // Prints (0, 0, 8). + GD.Print(myBasis.X); // Prints (2, 0, 0) + GD.Print(myBasis.Y); // Prints (0, 4, 0) + GD.Print(myBasis.Z); // Prints (0, 0, 8) @@ -449,7 +461,7 @@ Constructs a new **Basis** that only represents scale, with no rotation or shear :ref:`Vector3` **get_euler**\ (\ order\: :ref:`int` = 2\ ) |const| :ref:`๐Ÿ”—` -Returns this basis's rotation as a :ref:`Vector3` of `Euler angles `__, in radians. +Returns this basis's rotation as a :ref:`Vector3` of `Euler angles `__, in radians. For the returned value: - The :ref:`Vector3.x` contains the angle around the :ref:`x` axis (pitch); @@ -459,6 +471,8 @@ Returns this basis's rotation as a :ref:`Vector3` of `Euler angle The order of each consecutive rotation can be changed with ``order`` (see :ref:`EulerOrder` constants). By default, the YXZ convention is used (:ref:`@GlobalScope.EULER_ORDER_YXZ`): Z (roll) is calculated first, then X (pitch), and lastly Y (yaw). When using the opposite method :ref:`from_euler`, this order is reversed. +\ **Note:** For this method to return correctly, the basis needs to be *orthonormal* (see :ref:`orthonormalized`). + \ **Note:** Euler angles are much more intuitive but are not suitable for 3D math. Because of this, consider using the :ref:`get_rotation_quaternion` method instead, which returns a :ref:`Quaternion`. \ **Note:** In the Inspector dock, a basis's rotation is often displayed in Euler angles (in degrees), as is the case with the :ref:`Node3D.rotation` property. @@ -487,7 +501,7 @@ Returns this basis's rotation as a :ref:`Quaternion`. :ref:`Vector3` **get_scale**\ (\ ) |const| :ref:`๐Ÿ”—` -Returns the length of each axis of this basis, as a :ref:`Vector3`. If the basis is not sheared, this is the scaling factor. It is not affected by rotation. +Returns the length of each axis of this basis, as a :ref:`Vector3`. If the basis is not sheared, this value is the scaling factor. It is not affected by rotation. .. tabs:: @@ -503,7 +517,7 @@ Returns the length of each axis of this basis, as a :ref:`Vector3 my_basis = my_basis.rotated(Vector3.UP, TAU / 2) my_basis = my_basis.rotated(Vector3.RIGHT, TAU / 4) - print(my_basis.get_scale()) # Prints (2, 4, 8). + print(my_basis.get_scale()) # Prints (2.0, 4.0, 8.0) .. code-tab:: csharp @@ -516,7 +530,7 @@ Returns the length of each axis of this basis, as a :ref:`Vector3 myBasis = myBasis.Rotated(Vector3.Up, Mathf.Tau / 2.0f); myBasis = myBasis.Rotated(Vector3.Right, Mathf.Tau / 4.0f); - GD.Print(myBasis.Scale); // Prints (2, 4, 8). + GD.Print(myBasis.Scale); // Prints (2, 4, 8) @@ -596,7 +610,7 @@ The up axis (+Y) points as close to the ``up`` vector as possible while staying :ref:`Basis` **orthonormalized**\ (\ ) |const| :ref:`๐Ÿ”—` -Returns the orthonormalized version of this basis. An orthonormal basis is both *orthogonal* (the axes are perpendicular to each other) and *normalized* (the axes have a length of ``1``), which also means it can only represent rotation. +Returns the orthonormalized version of this basis. An orthonormal basis is both *orthogonal* (the axes are perpendicular to each other) and *normalized* (the axes have a length of ``1.0``), which also means it can only represent a rotation. It is often useful to call this method to avoid rounding errors on a rotating basis: @@ -634,9 +648,9 @@ It is often useful to call this method to avoid rounding errors on a rotating ba :ref:`Basis` **rotated**\ (\ axis\: :ref:`Vector3`, angle\: :ref:`float`\ ) |const| :ref:`๐Ÿ”—` -Returns this basis rotated around the given ``axis`` by ``angle`` (in radians). The ``axis`` must be a normalized vector (see :ref:`Vector3.normalized`). +Returns a copy of this basis rotated around the given ``axis`` by the given ``angle`` (in radians). -Positive values rotate this basis clockwise around the axis, while negative values rotate it counterclockwise. +The ``axis`` must be a normalized vector (see :ref:`Vector3.normalized`). If ``angle`` is positive, the basis is rotated counter-clockwise around the axis. .. tabs:: @@ -687,9 +701,9 @@ The basis matrix's rows are multiplied by ``scale``'s components. This operation ) my_basis = my_basis.scaled(Vector3(0, 2, -2)) - print(my_basis.x) # Prints (0, 2, -2). - print(my_basis.y) # Prints (0, 4, -4). - print(my_basis.z) # Prints (0, 6, -6). + print(my_basis.x) # Prints (0.0, 2.0, -2.0) + print(my_basis.y) # Prints (0.0, 4.0, -4.0) + print(my_basis.z) # Prints (0.0, 6.0, -6.0) .. code-tab:: csharp @@ -700,9 +714,9 @@ The basis matrix's rows are multiplied by ``scale``'s components. This operation ); myBasis = myBasis.Scaled(new Vector3(0.0f, 2.0f, -2.0f)); - GD.Print(myBasis.X); // Prints (0, 2, -2). - GD.Print(myBasis.Y); // Prints (0, 4, -4). - GD.Print(myBasis.Z); // Prints (0, 6, -6). + GD.Print(myBasis.X); // Prints (0, 2, -2) + GD.Print(myBasis.Y); // Prints (0, 4, -4) + GD.Print(myBasis.Z); // Prints (0, 6, -6) @@ -797,9 +811,9 @@ Returns the transposed version of this basis. This turns the basis matrix's colu ) my_basis = my_basis.transposed() - print(my_basis.x) # Prints (1, 4, 7). - print(my_basis.y) # Prints (2, 5, 8). - print(my_basis.z) # Prints (3, 6, 9). + print(my_basis.x) # Prints (1.0, 4.0, 7.0) + print(my_basis.y) # Prints (2.0, 5.0, 8.0) + print(my_basis.z) # Prints (3.0, 6.0, 9.0) .. code-tab:: csharp @@ -810,9 +824,9 @@ Returns the transposed version of this basis. This turns the basis matrix's colu ); myBasis = myBasis.Transposed(); - GD.Print(myBasis.X); // Prints (1, 4, 7). - GD.Print(myBasis.Y); // Prints (2, 5, 8). - GD.Print(myBasis.Z); // Prints (3, 6, 9). + GD.Print(myBasis.X); // Prints (1, 4, 7) + GD.Print(myBasis.Y); // Prints (2, 5, 8) + GD.Print(myBasis.Z); // Prints (3, 6, 9) @@ -868,7 +882,7 @@ Transforms (multiplies) the ``right`` vector by this basis, returning a :ref:`Ve # Basis that swaps the X/Z axes and doubles the scale. var my_basis = Basis(Vector3(0, 2, 0), Vector3(2, 0, 0), Vector3(0, 0, 2)) - print(my_basis * Vector3(1, 2, 3)) # Prints (4, 2, 6) + print(my_basis * Vector3(1, 2, 3)) # Prints (4.0, 2.0, 6.0) .. code-tab:: csharp diff --git a/classes/class_button.rst b/classes/class_button.rst index f6b06d6e4dc..82b5b4476b9 100644 --- a/classes/class_button.rst +++ b/classes/class_button.rst @@ -231,7 +231,7 @@ If set to something other than :ref:`TextServer.AUTOWRAP_OFF`\ ) - :ref:`bool` **get_clip_text**\ (\ ) -When this property is enabled, text that is too large to fit the button is clipped, when disabled the Button will always be wide enough to hold the text. +If ``true``, text that is too large to fit the button is clipped horizontally. If ``false``, the button will always be wide enough to hold the text. The text is not vertically clipped, and the button's height is not affected by this property. .. rst-class:: classref-item-separator diff --git a/classes/class_callable.rst b/classes/class_callable.rst index a4fc8289730..7a027e9b2fc 100644 --- a/classes/class_callable.rst +++ b/classes/class_callable.rst @@ -30,7 +30,7 @@ Description func test(): var callable = Callable(self, "print_args") callable.call("hello", "world") # Prints "hello world ". - callable.call(Vector2.UP, 42, callable) # Prints "(0, -1) 42 Node(node.gd)::print_args". + callable.call(Vector2.UP, 42, callable) # Prints "(0.0, -1.0) 42 Node(node.gd)::print_args". callable.call("invalid") # Invalid call, should have at least 2 arguments. .. code-tab:: csharp diff --git a/classes/class_camerafeed.rst b/classes/class_camerafeed.rst index 2859a60a92d..99d331c9a8c 100644 --- a/classes/class_camerafeed.rst +++ b/classes/class_camerafeed.rst @@ -23,6 +23,8 @@ A camera feed gives you access to a single physical camera attached to your devi \ **Note:** Many cameras will return YCbCr images which are split into two textures and need to be combined in a shader. Redot does this automatically for you if you set the environment to show the camera image in the background. +\ **Note:** This class is currently only implemented on Linux, macOS, and iOS. On other platforms no **CameraFeed**\ s will be available. To get a **CameraFeed** on iOS, the camera plugin from `godot-ios-plugins `__ is required. + .. rst-class:: classref-reftable-group Properties @@ -47,6 +49,10 @@ Methods .. table:: :widths: auto + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_activate_feed`\ (\ ) |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_deactivate_feed`\ (\ ) |virtual| | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`FeedDataType` | :ref:`get_datatype`\ (\ ) |const| | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ @@ -253,6 +259,30 @@ Formats supported by the feed. Each entry is a :ref:`Dictionary` **_activate_feed**\ (\ ) |virtual| :ref:`๐Ÿ”—` + +Called when the camera feed is activated. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CameraFeed_private_method__deactivate_feed: + +.. rst-class:: classref-method + +|void| **_deactivate_feed**\ (\ ) |virtual| :ref:`๐Ÿ”—` + +Called when the camera feed is deactivated. + +.. rst-class:: classref-item-separator + +---- + .. _class_CameraFeed_method_get_datatype: .. rst-class:: classref-method diff --git a/classes/class_cameraserver.rst b/classes/class_cameraserver.rst index a7861ed72dc..c5542f95298 100644 --- a/classes/class_cameraserver.rst +++ b/classes/class_cameraserver.rst @@ -23,7 +23,7 @@ The **CameraServer** keeps track of different cameras accessible in Redot. These It is notably used to provide AR modules with a video feed from the camera. -\ **Note:** This class is currently only implemented on Linux, macOS, and iOS, on other platforms no :ref:`CameraFeed`\ s will be available. To get a :ref:`CameraFeed` on iOS, the camera plugin from `godot-ios-plugins `__ is required. +\ **Note:** This class is currently only implemented on Linux, macOS, and iOS. On other platforms no :ref:`CameraFeed`\ s will be available. To get a :ref:`CameraFeed` on iOS, the camera plugin from `godot-ios-plugins `__ is required. .. rst-class:: classref-reftable-group diff --git a/classes/class_canvasitem.rst b/classes/class_canvasitem.rst index 01ed515d909..54e0b6f33e8 100644 --- a/classes/class_canvasitem.rst +++ b/classes/class_canvasitem.rst @@ -169,6 +169,8 @@ Methods +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform2D` | :ref:`get_global_transform_with_canvas`\ (\ ) |const| | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_instance_shader_parameter`\ (\ name\: :ref:`StringName`\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_local_mouse_position`\ (\ ) |const| | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform2D` | :ref:`get_screen_transform`\ (\ ) |const| | @@ -199,6 +201,8 @@ Methods +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`queue_redraw`\ (\ ) | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_instance_shader_parameter`\ (\ name\: :ref:`StringName`, value\: :ref:`Variant`\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_notify_local_transform`\ (\ enable\: :ref:`bool`\ ) | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_notify_transform`\ (\ enable\: :ref:`bool`\ ) | @@ -1346,6 +1350,18 @@ Returns the transform from the local coordinate system of this **CanvasItem** to ---- +.. _class_CanvasItem_method_get_instance_shader_parameter: + +.. rst-class:: classref-method + +:ref:`Variant` **get_instance_shader_parameter**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`๐Ÿ”—` + +Get the value of a shader parameter as set on this instance. + +.. rst-class:: classref-item-separator + +---- + .. _class_CanvasItem_method_get_local_mouse_position: .. rst-class:: classref-method @@ -1540,6 +1556,22 @@ Queues the **CanvasItem** to redraw. During idle time, if **CanvasItem** is visi ---- +.. _class_CanvasItem_method_set_instance_shader_parameter: + +.. rst-class:: classref-method + +|void| **set_instance_shader_parameter**\ (\ name\: :ref:`StringName`, value\: :ref:`Variant`\ ) :ref:`๐Ÿ”—` + +Set the value of a shader uniform for this instance only (`per-instance uniform <../tutorials/shaders/shader_reference/shading_language.html#per-instance-uniforms>`__). See also :ref:`ShaderMaterial.set_shader_parameter` to assign a uniform on all instances using the same :ref:`ShaderMaterial`. + +\ **Note:** For a shader uniform to be assignable on a per-instance basis, it *must* be defined with ``instance uniform ...`` rather than ``uniform ...`` in the shader code. + +\ **Note:** ``name`` is case-sensitive and must match the name of the uniform in the code exactly (not the capitalized name in the inspector). + +.. rst-class:: classref-item-separator + +---- + .. _class_CanvasItem_method_set_notify_local_transform: .. rst-class:: classref-method diff --git a/classes/class_canvaslayer.rst b/classes/class_canvaslayer.rst index 96fcc7ee453..f95e14b7137 100644 --- a/classes/class_canvaslayer.rst +++ b/classes/class_canvaslayer.rst @@ -140,9 +140,9 @@ The custom :ref:`Viewport` node assigned to the **CanvasLayer**. - |void| **set_follow_viewport**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_following_viewport**\ (\ ) -If enabled, the **CanvasLayer** will use the viewport's transform, so it will move when camera moves instead of being anchored in a fixed position on the screen. +If enabled, the **CanvasLayer** stays in a fixed position on the screen. If disabled, the **CanvasLayer** maintains its position in world space. -Together with :ref:`follow_viewport_scale` it can be used for a pseudo 3D effect. +Together with :ref:`follow_viewport_scale`, this can be used for a pseudo-3D effect. .. rst-class:: classref-item-separator diff --git a/classes/class_codeedit.rst b/classes/class_codeedit.rst index bba2c5a4bc5..9fd7cea2690 100644 --- a/classes/class_codeedit.rst +++ b/classes/class_codeedit.rst @@ -74,6 +74,8 @@ Properties +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`symbol_lookup_on_click` | ``false`` | +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`symbol_tooltip_on_hover` | ``false`` | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`TextDirection` | text_direction | ``1`` (overrides :ref:`TextEdit`) | +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ @@ -320,7 +322,21 @@ Emitted when a breakpoint is added or removed from a line. If the line is moved **code_completion_requested**\ (\ ) :ref:`๐Ÿ”—` -Emitted when the user requests code completion. +Emitted when the user requests code completion. This signal will not be sent if :ref:`_request_code_completion` is overridden or :ref:`code_completion_enabled` is ``false``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CodeEdit_signal_symbol_hovered: + +.. rst-class:: classref-signal + +**symbol_hovered**\ (\ symbol\: :ref:`String`, line\: :ref:`int`, column\: :ref:`int`\ ) :ref:`๐Ÿ”—` + +Emitted when the user hovers over a symbol. Unlike :ref:`Control.mouse_entered`, this signal is not emitted immediately, but when the cursor is over the symbol for :ref:`ProjectSettings.gui/timers/tooltip_delay_sec` seconds. + +\ **Note:** :ref:`symbol_tooltip_on_hover` must be ``true`` for this signal to be emitted. .. rst-class:: classref-item-separator @@ -346,6 +362,8 @@ Emitted when the user has clicked on a valid symbol. Emitted when the user hovers over a symbol. The symbol should be validated and responded to, by calling :ref:`set_symbol_lookup_word_as_valid`. +\ **Note:** :ref:`symbol_lookup_on_click` must be ``true`` for this signal to be emitted. + .. rst-class:: classref-section-separator ---- @@ -503,7 +521,7 @@ Property Descriptions - |void| **set_auto_brace_completion_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_auto_brace_completion_enabled**\ (\ ) -Sets whether brace pairs should be autocompleted. +If ``true``, uses :ref:`auto_brace_completion_pairs` to automatically insert the closing brace when the opening brace is inserted by typing or autocompletion. Also automatically removes the closing brace when using backspace on the opening brace. .. rst-class:: classref-item-separator @@ -520,7 +538,7 @@ Sets whether brace pairs should be autocompleted. - |void| **set_highlight_matching_braces_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_highlight_matching_braces_enabled**\ (\ ) -Highlight mismatching brace pairs. +If ``true``, highlights brace pairs when the caret is on either one, using :ref:`auto_brace_completion_pairs`. If matching, the pairs will be underlined. If a brace is unmatched, it is colored with :ref:`brace_mismatch_color`. .. rst-class:: classref-item-separator @@ -537,7 +555,7 @@ Highlight mismatching brace pairs. - |void| **set_auto_brace_completion_pairs**\ (\ value\: :ref:`Dictionary`\ ) - :ref:`Dictionary` **get_auto_brace_completion_pairs**\ (\ ) -Sets the brace pairs to be autocompleted. +Sets the brace pairs to be autocompleted. For each entry in the dictionary, the key is the opening brace and the value is the closing brace that matches it. A brace is a :ref:`String` made of symbols. See :ref:`auto_brace_completion_enabled` and :ref:`auto_brace_completion_highlight_matching`. .. rst-class:: classref-item-separator @@ -554,7 +572,7 @@ Sets the brace pairs to be autocompleted. - |void| **set_code_completion_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_code_completion_enabled**\ (\ ) -Sets whether code completion is allowed. +If ``true``, the :ref:`ProjectSettings.input/ui_text_completion_query` action requests code completion. To handle it, see :ref:`_request_code_completion` or :ref:`code_completion_requested`. .. rst-class:: classref-item-separator @@ -622,7 +640,7 @@ Sets the string delimiters. All existing string delimiters will be removed. - |void| **set_draw_bookmarks_gutter**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_drawing_bookmarks_gutter**\ (\ ) -Sets if bookmarked should be drawn in the gutter. This gutter is shared with breakpoints and executing lines. +If ``true``, bookmarks are drawn in the gutter. This gutter is shared with breakpoints and executing lines. See :ref:`set_line_as_bookmarked`. .. rst-class:: classref-item-separator @@ -639,7 +657,7 @@ Sets if bookmarked should be drawn in the gutter. This gutter is shared with bre - |void| **set_draw_breakpoints_gutter**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_drawing_breakpoints_gutter**\ (\ ) -Sets if breakpoints should be drawn in the gutter. This gutter is shared with bookmarks and executing lines. +If ``true``, breakpoints are drawn in the gutter. This gutter is shared with bookmarks and executing lines. Clicking the gutter will toggle the breakpoint for the line, see :ref:`set_line_as_breakpoint`. .. rst-class:: classref-item-separator @@ -656,7 +674,7 @@ Sets if breakpoints should be drawn in the gutter. This gutter is shared with bo - |void| **set_draw_executing_lines_gutter**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_drawing_executing_lines_gutter**\ (\ ) -Sets if executing lines should be marked in the gutter. This gutter is shared with breakpoints and bookmarks lines. +If ``true``, executing lines are marked in the gutter. This gutter is shared with breakpoints and bookmarks. See :ref:`set_line_as_executing`. .. rst-class:: classref-item-separator @@ -673,7 +691,7 @@ Sets if executing lines should be marked in the gutter. This gutter is shared wi - |void| **set_draw_fold_gutter**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_drawing_fold_gutter**\ (\ ) -Sets if foldable lines icons should be drawn in the gutter. +If ``true``, the fold gutter is drawn. In this gutter, the :ref:`can_fold_code_region` icon is drawn for each foldable line (see :ref:`can_fold_line`) and the :ref:`folded_code_region` icon is drawn for each folded line (see :ref:`is_line_folded`). These icons can be clicked to toggle the fold state, see :ref:`toggle_foldable_line`. :ref:`line_folding` must be ``true`` to show icons. .. rst-class:: classref-item-separator @@ -690,7 +708,7 @@ Sets if foldable lines icons should be drawn in the gutter. - |void| **set_draw_line_numbers**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_draw_line_numbers_enabled**\ (\ ) -Sets if line numbers should be drawn in the gutter. +If ``true``, the line number gutter is drawn. Line numbers start at ``1`` and are incremented for each line of text. Clicking and dragging in the line number gutter will select entire lines of text. .. rst-class:: classref-item-separator @@ -707,7 +725,7 @@ Sets if line numbers should be drawn in the gutter. - |void| **set_line_numbers_zero_padded**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_line_numbers_zero_padded**\ (\ ) -Sets if line numbers drawn in the gutter are zero padded. +If ``true``, line numbers drawn in the gutter are zero padded based on the total line count. Requires :ref:`gutters_draw_line_numbers` to be set to ``true``. .. rst-class:: classref-item-separator @@ -724,7 +742,7 @@ Sets if line numbers drawn in the gutter are zero padded. - |void| **set_auto_indent_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_auto_indent_enabled**\ (\ ) -Sets whether automatic indent are enabled, this will add an extra indent if a prefix or brace is found. +If ``true``, an extra indent is automatically inserted when a new line is added and a prefix in :ref:`indent_automatic_prefixes` is found. If a brace pair opening key is found, the matching closing brace will be moved to another new line (see :ref:`auto_brace_completion_pairs`). .. rst-class:: classref-item-separator @@ -741,7 +759,7 @@ Sets whether automatic indent are enabled, this will add an extra indent if a pr - |void| **set_auto_indent_prefixes**\ (\ value\: :ref:`Array`\[:ref:`String`\]\ ) - :ref:`Array`\[:ref:`String`\] **get_auto_indent_prefixes**\ (\ ) -Prefixes to trigger an automatic indent. +Prefixes to trigger an automatic indent. Used when :ref:`indent_automatic` is set to ``true``. .. rst-class:: classref-item-separator @@ -792,7 +810,7 @@ Use spaces instead of tabs for indentation. - |void| **set_line_folding_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_line_folding_enabled**\ (\ ) -Sets whether line folding is allowed. +If ``true``, lines can be folded. Otherwise, line folding methods like :ref:`fold_line` will not work and :ref:`can_fold_line` will always return ``false``. See :ref:`gutters_draw_fold_gutter`. .. rst-class:: classref-item-separator @@ -828,6 +846,23 @@ Draws vertical lines at the provided columns. The first entry is considered a ma Set when a validated word from :ref:`symbol_validate` is clicked, the :ref:`symbol_lookup` should be emitted. +.. rst-class:: classref-item-separator + +---- + +.. _class_CodeEdit_property_symbol_tooltip_on_hover: + +.. rst-class:: classref-property + +:ref:`bool` **symbol_tooltip_on_hover** = ``false`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_symbol_tooltip_on_hover_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_symbol_tooltip_on_hover_enabled**\ (\ ) + +Set when a word is hovered, the :ref:`symbol_hovered` should be emitted. + .. rst-class:: classref-section-separator ---- @@ -939,7 +974,7 @@ If ``line_only`` is ``true`` or ``end_key`` is an empty :ref:`String` **can_fold_line**\ (\ line\: :ref:`int`\ ) |const| :ref:`๐Ÿ”—` -Returns if the given line is foldable, that is, it has indented lines right below it or a comment / string block. +Returns ``true`` if the given line is foldable. A line is foldable if it is the start of a valid code region (see :ref:`get_code_region_start_tag`), if it is the start of a comment or string block, or if the next non-empty line is more indented (see :ref:`TextEdit.get_indent_level`). .. rst-class:: classref-item-separator @@ -1079,7 +1114,7 @@ Deletes all lines that are selected or have a caret on them. |void| **do_indent**\ (\ ) :ref:`๐Ÿ”—` -Perform an indent as if the user activated the "ui_text_indent" action. +If there is no selection, indentation is inserted at the caret. Otherwise, the selected lines are indented like :ref:`indent_lines`. Equivalent to the :ref:`ProjectSettings.input/ui_text_indent` action. The indentation characters used depend on :ref:`indent_use_spaces` and :ref:`indent_size`. .. rst-class:: classref-item-separator @@ -1307,7 +1342,7 @@ Gets all executing lines. :ref:`Array`\[:ref:`int`\] **get_folded_lines**\ (\ ) |const| :ref:`๐Ÿ”—` -Returns all lines that are current folded. +Returns all lines that are currently folded. .. rst-class:: classref-item-separator @@ -1403,7 +1438,7 @@ Returns ``true`` if string ``start_key`` exists. |void| **indent_lines**\ (\ ) :ref:`๐Ÿ”—` -Indents selected lines, or in the case of no selection the caret line by one. +Indents all lines that are selected or have a caret on them. Uses spaces or a tab depending on :ref:`indent_use_spaces`. See :ref:`unindent_lines`. .. rst-class:: classref-item-separator @@ -1439,7 +1474,7 @@ Returns the delimiter index if ``line`` ``column`` is in a string. If ``column`` :ref:`bool` **is_line_bookmarked**\ (\ line\: :ref:`int`\ ) |const| :ref:`๐Ÿ”—` -Returns whether the line at the specified index is bookmarked or not. +Returns ``true`` if the given line is bookmarked. See :ref:`set_line_as_bookmarked`. .. rst-class:: classref-item-separator @@ -1451,7 +1486,7 @@ Returns whether the line at the specified index is bookmarked or not. :ref:`bool` **is_line_breakpointed**\ (\ line\: :ref:`int`\ ) |const| :ref:`๐Ÿ”—` -Returns whether the line at the specified index is breakpointed or not. +Returns ``true`` if the given line is breakpointed. See :ref:`set_line_as_breakpoint`. .. rst-class:: classref-item-separator @@ -1463,7 +1498,7 @@ Returns whether the line at the specified index is breakpointed or not. :ref:`bool` **is_line_code_region_end**\ (\ line\: :ref:`int`\ ) |const| :ref:`๐Ÿ”—` -Returns whether the line at the specified index is a code region end. +Returns ``true`` if the given line is a code region end. See :ref:`set_code_region_tags`. .. rst-class:: classref-item-separator @@ -1475,7 +1510,7 @@ Returns whether the line at the specified index is a code region end. :ref:`bool` **is_line_code_region_start**\ (\ line\: :ref:`int`\ ) |const| :ref:`๐Ÿ”—` -Returns whether the line at the specified index is a code region start. +Returns ``true`` if the given line is a code region start. See :ref:`set_code_region_tags`. .. rst-class:: classref-item-separator @@ -1487,7 +1522,7 @@ Returns whether the line at the specified index is a code region start. :ref:`bool` **is_line_executing**\ (\ line\: :ref:`int`\ ) |const| :ref:`๐Ÿ”—` -Returns whether the line at the specified index is marked as executing or not. +Returns ``true`` if the given line is marked as executing. See :ref:`set_line_as_executing`. .. rst-class:: classref-item-separator @@ -1499,7 +1534,7 @@ Returns whether the line at the specified index is marked as executing or not. :ref:`bool` **is_line_folded**\ (\ line\: :ref:`int`\ ) |const| :ref:`๐Ÿ”—` -Returns whether the line at the specified index is folded or not. +Returns ``true`` if the given line is folded. See :ref:`fold_line`. .. rst-class:: classref-item-separator @@ -1595,7 +1630,7 @@ Sets the code hint text. Pass an empty string to clear. |void| **set_code_hint_draw_below**\ (\ draw_below\: :ref:`bool`\ ) :ref:`๐Ÿ”—` -Sets if the code hint should draw below the text. +If ``true``, the code hint will draw below the main caret. If ``false``, the code hint will draw above the main caret. See :ref:`set_code_hint`. .. rst-class:: classref-item-separator @@ -1619,7 +1654,7 @@ Sets the code region start and end tags (without comment delimiter). |void| **set_line_as_bookmarked**\ (\ line\: :ref:`int`, bookmarked\: :ref:`bool`\ ) :ref:`๐Ÿ”—` -Sets the line as bookmarked. +Sets the given line as bookmarked. If ``true`` and :ref:`gutters_draw_bookmarks` is ``true``, draws the :ref:`bookmark` icon in the gutter for this line. See :ref:`get_bookmarked_lines` and :ref:`is_line_bookmarked`. .. rst-class:: classref-item-separator @@ -1631,7 +1666,7 @@ Sets the line as bookmarked. |void| **set_line_as_breakpoint**\ (\ line\: :ref:`int`, breakpointed\: :ref:`bool`\ ) :ref:`๐Ÿ”—` -Sets the line as breakpointed. +Sets the given line as a breakpoint. If ``true`` and :ref:`gutters_draw_breakpoints_gutter` is ``true``, draws the :ref:`breakpoint` icon in the gutter for this line. See :ref:`get_breakpointed_lines` and :ref:`is_line_breakpointed`. .. rst-class:: classref-item-separator @@ -1643,7 +1678,7 @@ Sets the line as breakpointed. |void| **set_line_as_executing**\ (\ line\: :ref:`int`, executing\: :ref:`bool`\ ) :ref:`๐Ÿ”—` -Sets the line as executing. +Sets the given line as executing. If ``true`` and :ref:`gutters_draw_executing_lines` is ``true``, draws the :ref:`executing_line` icon in the gutter for this line. See :ref:`get_executing_lines` and :ref:`is_line_executing`. .. rst-class:: classref-item-separator @@ -1691,7 +1726,7 @@ Toggle the folding of the code block on all lines with a caret on them. |void| **unfold_all_lines**\ (\ ) :ref:`๐Ÿ”—` -Unfolds all lines, folded or not. +Unfolds all lines that are folded. .. rst-class:: classref-item-separator @@ -1703,7 +1738,7 @@ Unfolds all lines, folded or not. |void| **unfold_line**\ (\ line\: :ref:`int`\ ) :ref:`๐Ÿ”—` -Unfolds all lines that were previously folded. +Unfolds the given line if it is folded or if it is hidden under a folded line. .. rst-class:: classref-item-separator @@ -1715,7 +1750,7 @@ Unfolds all lines that were previously folded. |void| **unindent_lines**\ (\ ) :ref:`๐Ÿ”—` -Unindents selected lines, or in the case of no selection the caret line by one. Same as performing "ui_text_unindent" action. +Unindents all lines that are selected or have a caret on them. Uses spaces or a tab depending on :ref:`indent_use_spaces`. Equivalent to the :ref:`ProjectSettings.input/ui_text_dedent` action. See :ref:`indent_lines`. .. rst-class:: classref-item-separator diff --git a/classes/class_collisionshape2d.rst b/classes/class_collisionshape2d.rst index 082b0620bce..69abc486149 100644 --- a/classes/class_collisionshape2d.rst +++ b/classes/class_collisionshape2d.rst @@ -43,7 +43,7 @@ Properties :widths: auto +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`Color` | :ref:`debug_color` | ``Color(0, 0, 0, 1)`` | + | :ref:`Color` | :ref:`debug_color` | ``Color(0, 0, 0, 0)`` | +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ | :ref:`bool` | :ref:`disabled` | ``false`` | +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ @@ -67,16 +67,16 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Color` **debug_color** = ``Color(0, 0, 0, 1)`` :ref:`๐Ÿ”—` +:ref:`Color` **debug_color** = ``Color(0, 0, 0, 0)`` :ref:`๐Ÿ”—` .. rst-class:: classref-property-setget - |void| **set_debug_color**\ (\ value\: :ref:`Color`\ ) - :ref:`Color` **get_debug_color**\ (\ ) -The collision shape debug color. +The collision shape color that is displayed in the editor, or in the running project if **Debug > Visible Collision Shapes** is checked at the top of the editor. -\ **Note:** The default value is :ref:`ProjectSettings.debug/shapes/collision/shape_color`. The ``Color(0, 0, 0, 1)`` value documented here is a placeholder, and not the actual default debug color. +\ **Note:** The default value is :ref:`ProjectSettings.debug/shapes/collision/shape_color`. The ``Color(0, 0, 0, 0)`` value documented here is a placeholder, and not the actual default debug color. .. rst-class:: classref-item-separator diff --git a/classes/class_collisionshape3d.rst b/classes/class_collisionshape3d.rst index 3744462324e..b8b337ab08f 100644 --- a/classes/class_collisionshape3d.rst +++ b/classes/class_collisionshape3d.rst @@ -44,11 +44,15 @@ Properties .. table:: :widths: auto - +-------------------------------+-----------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`disabled` | ``false`` | - +-------------------------------+-----------------------------------------------------------+-----------+ - | :ref:`Shape3D` | :ref:`shape` | | - +-------------------------------+-----------------------------------------------------------+-----------+ + +-------------------------------+-----------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`debug_color` | ``Color(0, 0, 0, 0)`` | + +-------------------------------+-----------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`debug_fill` | ``true`` | + +-------------------------------+-----------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`disabled` | ``false`` | + +-------------------------------+-----------------------------------------------------------------+-----------------------+ + | :ref:`Shape3D` | :ref:`shape` | | + +-------------------------------+-----------------------------------------------------------------+-----------------------+ .. rst-class:: classref-reftable-group @@ -73,6 +77,42 @@ Methods Property Descriptions --------------------- +.. _class_CollisionShape3D_property_debug_color: + +.. rst-class:: classref-property + +:ref:`Color` **debug_color** = ``Color(0, 0, 0, 0)`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_debug_color**\ (\ value\: :ref:`Color`\ ) +- :ref:`Color` **get_debug_color**\ (\ ) + +The collision shape color that is displayed in the editor, or in the running project if **Debug > Visible Collision Shapes** is checked at the top of the editor. + +\ **Note:** The default value is :ref:`ProjectSettings.debug/shapes/collision/shape_color`. The ``Color(0, 0, 0, 0)`` value documented here is a placeholder, and not the actual default debug color. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CollisionShape3D_property_debug_fill: + +.. rst-class:: classref-property + +:ref:`bool` **debug_fill** = ``true`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_enable_debug_fill**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_enable_debug_fill**\ (\ ) + +If ``true``, when the shape is displayed, it will show a solid fill color in addition to its wireframe. + +.. rst-class:: classref-item-separator + +---- + .. _class_CollisionShape3D_property_disabled: .. rst-class:: classref-property diff --git a/classes/class_colorpalette.rst b/classes/class_colorpalette.rst new file mode 100644 index 00000000000..2f1d086b5f0 --- /dev/null +++ b/classes/class_colorpalette.rst @@ -0,0 +1,67 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/doc/classes/ColorPalette.xml. + +.. _class_ColorPalette: + +ColorPalette +============ + +**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +A resource class for managing a palette of colors, which can be loaded and saved using :ref:`ColorPicker`. + +.. rst-class:: classref-introduction-group + +Description +----------- + +The **ColorPalette** resource is designed to store and manage a collection of colors. This resource is useful in scenarios where a predefined set of colors is required, such as for creating themes, designing user interfaces, or managing game assets. The built-in :ref:`ColorPicker` control can also make use of **ColorPalette** without additional code. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-------------------------------------------------+---------------------------------------------------+------------------------+ + | :ref:`PackedColorArray` | :ref:`colors` | ``PackedColorArray()`` | + +-------------------------------------------------+---------------------------------------------------+------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_ColorPalette_property_colors: + +.. rst-class:: classref-property + +:ref:`PackedColorArray` **colors** = ``PackedColorArray()`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_colors**\ (\ value\: :ref:`PackedColorArray`\ ) +- :ref:`PackedColorArray` **get_colors**\ (\ ) + +A :ref:`PackedColorArray` containing the colors in the palette. + +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedColorArray` for more details. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_colorpicker.rst b/classes/class_colorpicker.rst index 76c871f2ffa..56c8d995a2e 100644 --- a/classes/class_colorpicker.rst +++ b/classes/class_colorpicker.rst @@ -121,6 +121,8 @@ Theme Properties +-----------------------------------+----------------------------------------------------------------------------------------+---------+ | :ref:`Texture2D` | :ref:`folded_arrow` | | +-----------------------------------+----------------------------------------------------------------------------------------+---------+ + | :ref:`Texture2D` | :ref:`menu_option` | | + +-----------------------------------+----------------------------------------------------------------------------------------+---------+ | :ref:`Texture2D` | :ref:`overbright_indicator` | | +-----------------------------------+----------------------------------------------------------------------------------------+---------+ | :ref:`Texture2D` | :ref:`picker_cursor` | | @@ -742,6 +744,18 @@ The icon for color preset drop down menu when folded. ---- +.. _class_ColorPicker_theme_icon_menu_option: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **menu_option** :ref:`๐Ÿ”—` + +The icon for color preset option menu. + +.. rst-class:: classref-item-separator + +---- + .. _class_ColorPicker_theme_icon_overbright_indicator: .. rst-class:: classref-themeproperty diff --git a/classes/class_compositoreffect.rst b/classes/class_compositoreffect.rst index c307fef977b..d0191447b80 100644 --- a/classes/class_compositoreffect.rst +++ b/classes/class_compositoreffect.rst @@ -155,7 +155,7 @@ If ``true`` and MSAA is enabled, this will trigger a color buffer resolve before :: - var render_scene_buffers : RenderSceneBuffersRD = render_data.get_render_scene_buffers() + var render_scene_buffers = render_data.get_render_scene_buffers() var color_buffer = render_scene_buffers.get_texture("render_buffers", "color") .. rst-class:: classref-item-separator @@ -179,7 +179,7 @@ If ``true`` and MSAA is enabled, this will trigger a depth buffer resolve before :: - var render_scene_buffers : RenderSceneBuffersRD = render_data.get_render_scene_buffers() + var render_scene_buffers = render_data.get_render_scene_buffers() var depth_buffer = render_scene_buffers.get_texture("render_buffers", "depth") .. rst-class:: classref-item-separator @@ -237,7 +237,7 @@ If ``true`` this triggers motion vectors being calculated during the opaque rend :: - var render_scene_buffers : RenderSceneBuffersRD = render_data.get_render_scene_buffers() + var render_scene_buffers = render_data.get_render_scene_buffers() var motion_buffer = render_scene_buffers.get_velocity_texture() .. rst-class:: classref-item-separator @@ -261,7 +261,7 @@ If ``true`` this triggers normal and roughness data to be output during our dept :: - var render_scene_buffers : RenderSceneBuffersRD = render_data.get_render_scene_buffers() + var render_scene_buffers = render_data.get_render_scene_buffers() var roughness_buffer = render_scene_buffers.get_texture("forward_clustered", "normal_roughness") The raw normal and roughness buffer is stored in an optimized format, different than the one available in Spatial shaders. When sampling the buffer, a conversion function must be applied. Use this function, copied from `here `__: diff --git a/classes/class_control.rst b/classes/class_control.rst index 23fdf244e25..3f4f20b3ba4 100644 --- a/classes/class_control.rst +++ b/classes/class_control.rst @@ -25,6 +25,8 @@ Base class for all UI-related nodes. **Control** features a bounding rectangle t For more information on Redot's UI system, anchors, offsets, and containers, see the related tutorials in the manual. To build flexible UIs, you'll need a mix of UI elements that inherit from **Control** and :ref:`Container` nodes. +\ **Note:** Since both :ref:`Node2D` and **Control** inherit from :ref:`CanvasItem`, they share several concepts from the class such as the :ref:`CanvasItem.z_index` and :ref:`CanvasItem.visible` properties. + \ **User Interface nodes and input**\ Redot propagates input events via viewports. Each :ref:`Viewport` is responsible for propagating :ref:`InputEvent`\ s to their child nodes. As the :ref:`SceneTree.root` is a :ref:`Window`, this already happens automatically for all UI elements in your game. @@ -37,7 +39,7 @@ Only one **Control** node can be in focus. Only the node in focus will receive e Sets :ref:`mouse_filter` to :ref:`MOUSE_FILTER_IGNORE` to tell a **Control** node to ignore mouse or touch events. You'll need it if you place an icon on top of a button. -\ :ref:`Theme` resources change the Control's appearance. If you change the :ref:`Theme` on a **Control** node, it affects all of its children. To override some of the theme's parameters, call one of the ``add_theme_*_override`` methods, like :ref:`add_theme_font_override`. You can override the theme with the Inspector. +\ :ref:`Theme` resources change the control's appearance. The :ref:`theme` of a **Control** node affects all of its direct and indirect children (as long as a chain of controls is uninterrupted). To override some of the theme items, call one of the ``add_theme_*_override`` methods, like :ref:`add_theme_font_override`. You can also override theme items in the Inspector. \ **Note:** Theme items are *not* :ref:`Object` properties. This means you can't access their values using :ref:`Object.get` and :ref:`Object.set`. Instead, use the ``get_theme_*`` and ``add_theme_*_override`` methods provided by this class. @@ -1945,7 +1947,9 @@ Defines if tooltip text should automatically change to its translated version de - |void| **set_tooltip_text**\ (\ value\: :ref:`String`\ ) - :ref:`String` **get_tooltip_text**\ (\ ) -The default tooltip text. The tooltip appears when the user's mouse cursor stays idle over this control for a few moments, provided that the :ref:`mouse_filter` property is not :ref:`MOUSE_FILTER_IGNORE`. The time required for the tooltip to appear can be changed with the :ref:`ProjectSettings.gui/timers/tooltip_delay_sec` option. See also :ref:`get_tooltip`. +The default tooltip text. The tooltip appears when the user's mouse cursor stays idle over this control for a few moments, provided that the :ref:`mouse_filter` property is not :ref:`MOUSE_FILTER_IGNORE`. The time required for the tooltip to appear can be changed with the :ref:`ProjectSettings.gui/timers/tooltip_delay_sec` setting. + +This string is the default return value of :ref:`get_tooltip`. Override :ref:`_get_tooltip` to generate tooltip text dynamically. Override :ref:`_make_custom_tooltip` to customize the tooltip interface and behavior. The tooltip popup will use either a default implementation, or a custom one that you can provide by overriding :ref:`_make_custom_tooltip`. The default tooltip includes a :ref:`PopupPanel` and :ref:`Label` whose theme properties can be customized using :ref:`Theme` methods with the ``"TooltipPanel"`` and ``"TooltipLabel"`` respectively. For example: @@ -2112,7 +2116,7 @@ If not overridden, defaults to :ref:`Vector2.ZERO`. 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. +\ **Note:** If this method returns an empty :ref:`String` and :ref:`_make_custom_tooltip` is not overridden, no tooltip is displayed. .. rst-class:: classref-item-separator @@ -2193,7 +2197,7 @@ If not overridden, default behavior is checking if the point is within control's :ref:`Object` **_make_custom_tooltip**\ (\ for_text\: :ref:`String`\ ) |virtual| |const| :ref:`๐Ÿ”—` -Virtual method to be implemented by the user. Returns a **Control** node that should be used as a tooltip instead of the default one. The ``for_text`` includes the contents of the :ref:`tooltip_text` property. +Virtual method to be implemented by the user. Returns a **Control** node that should be used as a tooltip instead of the default one. ``for_text`` is the return value of :ref:`get_tooltip`. The returned node must be of type **Control** or Control-derived. It can have child nodes of any type. It is freed when the tooltip disappears, so make sure you always provide a new instance (if you want to use a pre-existing node from your scene tree, you can duplicate it and pass the duplicated instance). When ``null`` or a non-Control node is returned, the default tooltip will be used instead. @@ -2203,6 +2207,8 @@ The returned node will be added as child to a :ref:`PopupPanel \ **Note:** The node (and any relevant children) should have their :ref:`CanvasItem.visible` set to ``true`` when returned, otherwise, the viewport that instantiates it will not be able to calculate its minimum size reliably. +\ **Note:** If overridden, this method is called even if :ref:`get_tooltip` returns an empty string. When this happens with the default tooltip, it is not displayed. To copy this behavior, return ``null`` in this method when ``for_text`` is empty. + \ **Example:** Use a constructed node as a tooltip: @@ -2832,7 +2838,7 @@ Returns the tooltip text for the position ``at_position`` in control's local coo This method can be overridden to customize its behavior. See :ref:`_get_tooltip`. -\ **Note:** If this method returns an empty :ref:`String`, no tooltip is displayed. +\ **Note:** If this method returns an empty :ref:`String` and :ref:`_make_custom_tooltip` is not overridden, no tooltip is displayed. .. rst-class:: classref-item-separator diff --git a/classes/class_cpuparticles2d.rst b/classes/class_cpuparticles2d.rst index efd6478c7db..1a772e52267 100644 --- a/classes/class_cpuparticles2d.rst +++ b/classes/class_cpuparticles2d.rst @@ -507,7 +507,7 @@ Number of particles emitted in one emission cycle. - |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) - :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| -Each particle's rotation will be animated along this :ref:`Curve`. +Each particle's rotation will be animated along this :ref:`Curve`. Should be a unit :ref:`Curve`. .. rst-class:: classref-item-separator @@ -558,7 +558,7 @@ Minimum equivalent of :ref:`angle_max`. - |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) - :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| -Each particle's angular velocity will vary along this :ref:`Curve`. +Each particle's angular velocity will vary along this :ref:`Curve`. Should be a unit :ref:`Curve`. .. rst-class:: classref-item-separator @@ -609,7 +609,7 @@ Minimum equivalent of :ref:`angular_velocity_max`, curve\: :ref:`Curve`\ ) - :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| -Each particle's animation offset will vary along this :ref:`Curve`. +Each particle's animation offset will vary along this :ref:`Curve`. Should be a unit :ref:`Curve`. .. rst-class:: classref-item-separator @@ -660,7 +660,7 @@ Minimum equivalent of :ref:`anim_offset_max`, curve\: :ref:`Curve`\ ) - :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| -Each particle's animation speed will vary along this :ref:`Curve`. +Each particle's animation speed will vary along this :ref:`Curve`. Should be a unit :ref:`Curve`. .. rst-class:: classref-item-separator @@ -764,7 +764,7 @@ Each particle's color will vary along this :ref:`Gradient` (mult - |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) - :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| -Damping will vary along this :ref:`Curve`. +Damping will vary along this :ref:`Curve`. Should be a unit :ref:`Curve`. .. rst-class:: classref-item-separator @@ -1042,7 +1042,7 @@ Gravity applied to every particle. - |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) - :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| -Each particle's hue will vary along this :ref:`Curve`. +Each particle's hue will vary along this :ref:`Curve`. Should be a unit :ref:`Curve`. .. rst-class:: classref-item-separator @@ -1161,7 +1161,7 @@ Particle lifetime randomness ratio. - |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) - :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| -Each particle's linear acceleration will vary along this :ref:`Curve`. +Each particle's linear acceleration will vary along this :ref:`Curve`. Should be a unit :ref:`Curve`. .. rst-class:: classref-item-separator @@ -1246,7 +1246,7 @@ If ``true``, only one emission cycle occurs. If set ``true`` during a cycle, emi - |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) - :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| -Each particle's orbital velocity will vary along this :ref:`Curve`. +Each particle's orbital velocity will vary along this :ref:`Curve`. Should be a unit :ref:`Curve`. .. rst-class:: classref-item-separator @@ -1331,7 +1331,7 @@ Particle system starts as if it had already run for this many seconds. - |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) - :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| -Each particle's radial acceleration will vary along this :ref:`Curve`. +Each particle's radial acceleration will vary along this :ref:`Curve`. Should be a unit :ref:`Curve`. .. rst-class:: classref-item-separator @@ -1399,7 +1399,7 @@ Emission lifetime randomness ratio. - |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) - :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| -Each particle's scale will vary along this :ref:`Curve`. +Each particle's scale will vary along this :ref:`Curve`. Should be a unit :ref:`Curve`. .. rst-class:: classref-item-separator @@ -1450,7 +1450,7 @@ Minimum equivalent of :ref:`scale_amount_max`\ ) - :ref:`Curve` **get_scale_curve_x**\ (\ ) -Each particle's horizontal scale will vary along this :ref:`Curve`. +Each particle's horizontal scale will vary along this :ref:`Curve`. Should be a unit :ref:`Curve`. \ :ref:`split_scale` must be enabled. @@ -1469,7 +1469,7 @@ Each particle's horizontal scale will vary along this :ref:`Curve`. - |void| **set_scale_curve_y**\ (\ value\: :ref:`Curve`\ ) - :ref:`Curve` **get_scale_curve_y**\ (\ ) -Each particle's vertical scale will vary along this :ref:`Curve`. +Each particle's vertical scale will vary along this :ref:`Curve`. Should be a unit :ref:`Curve`. \ :ref:`split_scale` must be enabled. @@ -1539,7 +1539,7 @@ Each particle's initial direction range from ``+spread`` to ``-spread`` degrees. - |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) - :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| -Each particle's tangential acceleration will vary along this :ref:`Curve`. +Each particle's tangential acceleration will vary along this :ref:`Curve`. Should be a unit :ref:`Curve`. .. rst-class:: classref-item-separator @@ -1679,7 +1679,7 @@ Restarts the particle emitter. |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) :ref:`๐Ÿ”—` -Sets the :ref:`Curve` of the parameter specified by :ref:`Parameter`. +Sets the :ref:`Curve` of the parameter specified by :ref:`Parameter`. Should be a unit :ref:`Curve`. .. rst-class:: classref-item-separator diff --git a/classes/class_cpuparticles3d.rst b/classes/class_cpuparticles3d.rst index d92312e254e..99418a53cb4 100644 --- a/classes/class_cpuparticles3d.rst +++ b/classes/class_cpuparticles3d.rst @@ -545,7 +545,7 @@ Number of particles emitted in one emission cycle. - |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) - :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| -Each particle's rotation will be animated along this :ref:`Curve`. +Each particle's rotation will be animated along this :ref:`Curve`. Should be a unit :ref:`Curve`. .. rst-class:: classref-item-separator @@ -596,7 +596,7 @@ Minimum angle. - |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) - :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| -Each particle's angular velocity (rotation speed) will vary along this :ref:`Curve` over its lifetime. +Each particle's angular velocity (rotation speed) will vary along this :ref:`Curve` over its lifetime. Should be a unit :ref:`Curve`. .. rst-class:: classref-item-separator @@ -647,7 +647,7 @@ Minimum initial angular velocity (rotation speed) applied to each particle in *d - |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) - :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| -Each particle's animation offset will vary along this :ref:`Curve`. +Each particle's animation offset will vary along this :ref:`Curve`. Should be a unit :ref:`Curve`. .. rst-class:: classref-item-separator @@ -698,7 +698,7 @@ Minimum animation offset. - |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) - :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| -Each particle's animation speed will vary along this :ref:`Curve`. +Each particle's animation speed will vary along this :ref:`Curve`. Should be a unit :ref:`Curve`. .. rst-class:: classref-item-separator @@ -806,7 +806,7 @@ Each particle's color will vary along this :ref:`GradientTexture1D`, curve\: :ref:`Curve`\ ) - :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| -Damping will vary along this :ref:`Curve`. +Damping will vary along this :ref:`Curve`. Should be a unit :ref:`Curve`. .. rst-class:: classref-item-separator @@ -1190,7 +1190,7 @@ Gravity applied to every particle. - |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) - :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| -Each particle's hue will vary along this :ref:`Curve`. +Each particle's hue will vary along this :ref:`Curve`. Should be a unit :ref:`Curve`. .. rst-class:: classref-item-separator @@ -1309,7 +1309,7 @@ Particle lifetime randomness ratio. - |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) - :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| -Each particle's linear acceleration will vary along this :ref:`Curve`. +Each particle's linear acceleration will vary along this :ref:`Curve`. Should be a unit :ref:`Curve`. .. rst-class:: classref-item-separator @@ -1411,7 +1411,7 @@ If ``true``, only one emission cycle occurs. If set ``true`` during a cycle, emi - |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) - :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| -Each particle's orbital velocity will vary along this :ref:`Curve`. +Each particle's orbital velocity will vary along this :ref:`Curve`. Should be a unit :ref:`Curve`. .. rst-class:: classref-item-separator @@ -1530,7 +1530,7 @@ Particle system starts as if it had already run for this many seconds. - |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) - :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| -Each particle's radial acceleration will vary along this :ref:`Curve`. +Each particle's radial acceleration will vary along this :ref:`Curve`. Should be a unit :ref:`Curve`. .. rst-class:: classref-item-separator @@ -1598,7 +1598,7 @@ Emission lifetime randomness ratio. - |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) - :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| -Each particle's scale will vary along this :ref:`Curve`. +Each particle's scale will vary along this :ref:`Curve`. Should be a unit :ref:`Curve`. .. rst-class:: classref-item-separator @@ -1751,7 +1751,7 @@ Each particle's initial direction range from ``+spread`` to ``-spread`` degrees. - |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) - :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| -Each particle's tangential acceleration will vary along this :ref:`Curve`. +Each particle's tangential acceleration will vary along this :ref:`Curve`. Should be a unit :ref:`Curve`. .. rst-class:: classref-item-separator @@ -1905,7 +1905,7 @@ Restarts the particle emitter. |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) :ref:`๐Ÿ”—` -Sets the :ref:`Curve` of the parameter specified by :ref:`Parameter`. +Sets the :ref:`Curve` of the parameter specified by :ref:`Parameter`. Should be a unit :ref:`Curve`. .. rst-class:: classref-item-separator diff --git a/classes/class_csgmesh3d.rst b/classes/class_csgmesh3d.rst index 3b3a146ef23..e5dc417c6de 100644 --- a/classes/class_csgmesh3d.rst +++ b/classes/class_csgmesh3d.rst @@ -19,7 +19,7 @@ A CSG Mesh shape that uses a mesh resource. Description ----------- -This CSG node allows you to use any mesh resource as a CSG shape, provided it is closed, does not self-intersect, does not contain internal faces and has no edges that connect to more than two faces. See also :ref:`CSGPolygon3D` for drawing 2D extruded polygons to be used as CSG nodes. +This CSG node allows you to use any mesh resource as a CSG shape, provided it is *manifold*. A manifold shape is closed, does not self-intersect, does not contain internal faces and has no edges that connect to more than two faces. See also :ref:`CSGPolygon3D` for drawing 2D extruded polygons to be used as CSG nodes. \ **Note:** CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a :ref:`MeshInstance3D` with a :ref:`PrimitiveMesh`. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay. @@ -83,6 +83,8 @@ The :ref:`Material` used in drawing the CSG shape. The :ref:`Mesh` resource to use as a CSG shape. +\ **Note:** Some :ref:`Mesh` types such as :ref:`PlaneMesh`, :ref:`PointMesh`, :ref:`QuadMesh`, and :ref:`RibbonTrailMesh` are excluded from the type hint for this property, as these primitives are non-*manifold* and thus not compatible with the CSG algorithm. + \ **Note:** When using an :ref:`ArrayMesh`, all vertex attributes except :ref:`Mesh.ARRAY_VERTEX`, :ref:`Mesh.ARRAY_NORMAL` and :ref:`Mesh.ARRAY_TEX_UV` are left unused. Only :ref:`Mesh.ARRAY_VERTEX` and :ref:`Mesh.ARRAY_TEX_UV` will be passed to the GPU. \ :ref:`Mesh.ARRAY_NORMAL` is only used to determine which faces require the use of flat shading. By default, CSGMesh will ignore the mesh's vertex normals, recalculate them for each vertex and use a smooth shader. If a flat shader is required for a face, ensure that all vertex normals of the face are approximately equal. diff --git a/classes/class_csgshape3d.rst b/classes/class_csgshape3d.rst index b3dbcab4cdc..b0f946e68e1 100644 --- a/classes/class_csgshape3d.rst +++ b/classes/class_csgshape3d.rst @@ -21,7 +21,7 @@ The CSG base class. Description ----------- -This is the CSG base class that provides CSG operation support to the various CSG nodes in Godot. +This is the CSG base class that provides CSG operation support to the various CSG nodes in Redot. \ **Performance:** CSG nodes are only intended for prototyping as they have a significant CPU performance cost. @@ -59,7 +59,7 @@ Properties +---------------------------------------------+-------------------------------------------------------------------------+-----------+ | :ref:`Operation` | :ref:`operation` | ``0`` | +---------------------------------------------+-------------------------------------------------------------------------+-----------+ - | :ref:`float` | :ref:`snap` | ``0.001`` | + | :ref:`float` | :ref:`snap` | | +---------------------------------------------+-------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`use_collision` | ``false`` | +---------------------------------------------+-------------------------------------------------------------------------+-----------+ @@ -231,14 +231,16 @@ The operation that is performed on this shape. This is ignored for the first CSG .. rst-class:: classref-property -:ref:`float` **snap** = ``0.001`` :ref:`๐Ÿ”—` +:ref:`float` **snap** :ref:`๐Ÿ”—` .. rst-class:: classref-property-setget - |void| **set_snap**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_snap**\ (\ ) -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. The top-level CSG shape's snap value is used for the entire CSG tree. +**Deprecated:** The CSG library no longer uses snapping. + +This property does nothing. .. rst-class:: classref-item-separator diff --git a/classes/class_csharpscript.rst b/classes/class_csharpscript.rst index f73c0b1a463..13c5f86ffa3 100644 --- a/classes/class_csharpscript.rst +++ b/classes/class_csharpscript.rst @@ -19,7 +19,7 @@ A script implemented in the C# programming language, saved with the ``.cs`` exte Description ----------- -This class represents a C# script. It is the C# equivalent of the :ref:`GDScript` class and is only available in Mono-enabled Godot builds. +This class represents a C# script. It is the C# equivalent of the :ref:`GDScript` class and is only available in Mono-enabled Redot builds. .. rst-class:: classref-introduction-group diff --git a/classes/class_cubemaparray.rst b/classes/class_cubemaparray.rst index bad67b72537..a9f5aec0550 100644 --- a/classes/class_cubemaparray.rst +++ b/classes/class_cubemaparray.rst @@ -25,7 +25,7 @@ The primary benefit of **CubemapArray**\ s is that they can be accessed in shade \ **Note:** Redot uses **CubemapArray**\ s internally for many effects, including the :ref:`Sky` if you set :ref:`ProjectSettings.rendering/reflections/sky_reflections/texture_array_reflections` to ``true``. To create such a texture file yourself, reimport your image files using the import presets of the File System dock. -\ **Note:** **CubemapArray** is not supported in the OpenGL 3 rendering backend. +\ **Note:** **CubemapArray** is not supported in the Compatibility renderer. .. rst-class:: classref-reftable-group diff --git a/classes/class_curve.rst b/classes/class_curve.rst index 908e0d01c37..1175151dce0 100644 --- a/classes/class_curve.rst +++ b/classes/class_curve.rst @@ -19,9 +19,9 @@ A mathematical curve. Description ----------- -This resource describes a mathematical curve by defining a set of points and tangents at each point. By default, it ranges between ``0`` and ``1`` on the Y axis and positions points relative to the ``0.5`` Y position. +This resource describes a mathematical curve by defining a set of points and tangents at each point. By default, it ranges between ``0`` and ``1`` on the X and Y axes, but these ranges can be changed. -See also :ref:`Gradient` which is designed for color interpolation. See also :ref:`Curve2D` and :ref:`Curve3D`. +Please note that many resources and nodes assume they are given *unit curves*. A unit curve is a curve whose domain (the X axis) is between ``0`` and ``1``. Some examples of unit curve usage are :ref:`CPUParticles2D.angle_curve` and :ref:`Line2D.width_curve`. .. rst-class:: classref-reftable-group @@ -34,8 +34,12 @@ Properties +---------------------------+--------------------------------------------------------------+---------+ | :ref:`int` | :ref:`bake_resolution` | ``100`` | +---------------------------+--------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`max_domain` | ``1.0`` | + +---------------------------+--------------------------------------------------------------+---------+ | :ref:`float` | :ref:`max_value` | ``1.0`` | +---------------------------+--------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`min_domain` | ``0.0`` | + +---------------------------+--------------------------------------------------------------+---------+ | :ref:`float` | :ref:`min_value` | ``0.0`` | +---------------------------+--------------------------------------------------------------+---------+ | :ref:`int` | :ref:`point_count` | ``0`` | @@ -58,6 +62,8 @@ Methods +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`clear_points`\ (\ ) | +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_domain_range`\ (\ ) |const| | + +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`TangentMode` | :ref:`get_point_left_mode`\ (\ index\: :ref:`int`\ ) |const| | +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_point_left_tangent`\ (\ index\: :ref:`int`\ ) |const| | @@ -68,6 +74,8 @@ Methods +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_point_right_tangent`\ (\ index\: :ref:`int`\ ) |const| | +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_value_range`\ (\ ) |const| | + +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`remove_point`\ (\ index\: :ref:`int`\ ) | +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`sample`\ (\ offset\: :ref:`float`\ ) |const| | @@ -96,6 +104,18 @@ Methods Signals ------- +.. _class_Curve_signal_domain_changed: + +.. rst-class:: classref-signal + +**domain_changed**\ (\ ) :ref:`๐Ÿ”—` + +Emitted when :ref:`max_domain` or :ref:`min_domain` is changed. + +.. rst-class:: classref-item-separator + +---- + .. _class_Curve_signal_range_changed: .. rst-class:: classref-signal @@ -169,6 +189,23 @@ The number of points to include in the baked (i.e. cached) curve data. ---- +.. _class_Curve_property_max_domain: + +.. rst-class:: classref-property + +:ref:`float` **max_domain** = ``1.0`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_max_domain**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_max_domain**\ (\ ) + +The maximum domain (x-coordinate) that points can have. + +.. rst-class:: classref-item-separator + +---- + .. _class_Curve_property_max_value: .. rst-class:: classref-property @@ -180,7 +217,24 @@ The number of points to include in the baked (i.e. cached) curve data. - |void| **set_max_value**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_max_value**\ (\ ) -The maximum value the curve can reach. +The maximum value (y-coordinate) that points can have. Tangents can cause higher values between points. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Curve_property_min_domain: + +.. rst-class:: classref-property + +:ref:`float` **min_domain** = ``0.0`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_min_domain**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_min_domain**\ (\ ) + +The minimum domain (x-coordinate) that points can have. .. rst-class:: classref-item-separator @@ -197,7 +251,7 @@ The maximum value the curve can reach. - |void| **set_min_value**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_min_value**\ (\ ) -The minimum value the curve can reach. +The minimum value (y-coordinate) that points can have. Tangents can cause lower values between points. .. rst-class:: classref-item-separator @@ -273,6 +327,18 @@ Removes all points from the curve. ---- +.. _class_Curve_method_get_domain_range: + +.. rst-class:: classref-method + +:ref:`float` **get_domain_range**\ (\ ) |const| :ref:`๐Ÿ”—` + +Returns the difference between :ref:`min_domain` and :ref:`max_domain`. + +.. rst-class:: classref-item-separator + +---- + .. _class_Curve_method_get_point_left_mode: .. rst-class:: classref-method @@ -333,6 +399,18 @@ Returns the right tangent angle (in degrees) for the point at ``index``. ---- +.. _class_Curve_method_get_value_range: + +.. rst-class:: classref-method + +:ref:`float` **get_value_range**\ (\ ) |const| :ref:`๐Ÿ”—` + +Returns the difference between :ref:`min_value` and :ref:`max_value`. + +.. rst-class:: classref-item-separator + +---- + .. _class_Curve_method_remove_point: .. rst-class:: classref-method diff --git a/classes/class_curve3d.rst b/classes/class_curve3d.rst index 969f951d86e..48aece00eef 100644 --- a/classes/class_curve3d.rst +++ b/classes/class_curve3d.rst @@ -31,13 +31,15 @@ Properties .. table:: :widths: auto - +---------------------------+--------------------------------------------------------------------+----------+ - | :ref:`float` | :ref:`bake_interval` | ``0.2`` | - +---------------------------+--------------------------------------------------------------------+----------+ - | :ref:`int` | :ref:`point_count` | ``0`` | - +---------------------------+--------------------------------------------------------------------+----------+ - | :ref:`bool` | :ref:`up_vector_enabled` | ``true`` | - +---------------------------+--------------------------------------------------------------------+----------+ + +---------------------------+--------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`bake_interval` | ``0.2`` | + +---------------------------+--------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`closed` | ``false`` | + +---------------------------+--------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`point_count` | ``0`` | + +---------------------------+--------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`up_vector_enabled` | ``true`` | + +---------------------------+--------------------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group @@ -123,6 +125,23 @@ The distance in meters between two adjacent cached points. Changing it forces th ---- +.. _class_Curve3D_property_closed: + +.. rst-class:: classref-property + +:ref:`bool` **closed** = ``false`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_closed**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_closed**\ (\ ) + +If ``true``, and the curve has more than 2 control points, the last point and the first one will be connected in a loop. + +.. rst-class:: classref-item-separator + +---- + .. _class_Curve3D_property_point_count: .. rst-class:: classref-property diff --git a/classes/class_curvetexture.rst b/classes/class_curvetexture.rst index a13b6821069..4419167528a 100644 --- a/classes/class_curvetexture.rst +++ b/classes/class_curvetexture.rst @@ -19,7 +19,7 @@ A 1D texture where pixel brightness corresponds to points on a curve. Description ----------- -A 1D texture where pixel brightness corresponds to points on a :ref:`Curve` resource, either in grayscale or in red. This visual representation simplifies the task of saving curves as image files. +A 1D texture where pixel brightness corresponds to points on a unit :ref:`Curve` resource, either in grayscale or in red. This visual representation simplifies the task of saving curves as image files. If you need to store up to 3 curves within a single texture, use :ref:`CurveXYZTexture` instead. See also :ref:`GradientTexture1D` and :ref:`GradientTexture2D`. @@ -92,7 +92,7 @@ Property Descriptions - |void| **set_curve**\ (\ value\: :ref:`Curve`\ ) - :ref:`Curve` **get_curve**\ (\ ) -The :ref:`Curve` that is rendered onto the texture. +The :ref:`Curve` that is rendered onto the texture. Should be a unit :ref:`Curve`. .. rst-class:: classref-item-separator diff --git a/classes/class_curvexyztexture.rst b/classes/class_curvexyztexture.rst index f4c5ae8c18b..171eb9e350b 100644 --- a/classes/class_curvexyztexture.rst +++ b/classes/class_curvexyztexture.rst @@ -19,7 +19,7 @@ A 1D texture where the red, green, and blue color channels correspond to points Description ----------- -A 1D texture where the red, green, and blue color channels correspond to points on 3 :ref:`Curve` resources. Compared to using separate :ref:`CurveTexture`\ s, this further simplifies the task of saving curves as image files. +A 1D texture where the red, green, and blue color channels correspond to points on 3 unit :ref:`Curve` resources. Compared to using separate :ref:`CurveTexture`\ s, this further simplifies the task of saving curves as image files. If you only need to store one curve within a single texture, use :ref:`CurveTexture` instead. See also :ref:`GradientTexture1D` and :ref:`GradientTexture2D`. @@ -63,7 +63,7 @@ Property Descriptions - |void| **set_curve_x**\ (\ value\: :ref:`Curve`\ ) - :ref:`Curve` **get_curve_x**\ (\ ) -The :ref:`Curve` that is rendered onto the texture's red channel. +The :ref:`Curve` that is rendered onto the texture's red channel. Should be a unit :ref:`Curve`. .. rst-class:: classref-item-separator @@ -80,7 +80,7 @@ The :ref:`Curve` that is rendered onto the texture's red channel. - |void| **set_curve_y**\ (\ value\: :ref:`Curve`\ ) - :ref:`Curve` **get_curve_y**\ (\ ) -The :ref:`Curve` that is rendered onto the texture's green channel. +The :ref:`Curve` that is rendered onto the texture's green channel. Should be a unit :ref:`Curve`. .. rst-class:: classref-item-separator @@ -97,7 +97,7 @@ The :ref:`Curve` that is rendered onto the texture's green channel. - |void| **set_curve_z**\ (\ value\: :ref:`Curve`\ ) - :ref:`Curve` **get_curve_z**\ (\ ) -The :ref:`Curve` that is rendered onto the texture's blue channel. +The :ref:`Curve` that is rendered onto the texture's blue channel. Should be a unit :ref:`Curve`. .. rst-class:: classref-item-separator diff --git a/classes/class_dictionary.rst b/classes/class_dictionary.rst index 2813e80ead0..414acd34735 100644 --- a/classes/class_dictionary.rst +++ b/classes/class_dictionary.rst @@ -548,9 +548,9 @@ Returns ``true`` if the dictionary contains an entry with the given ``key``. { 210, default }, }; - GD.Print(myDict.ContainsKey("Redot")); // Prints true - GD.Print(myDict.ContainsKey(210)); // Prints true - GD.Print(myDict.ContainsKey(4)); // Prints false + GD.Print(myDict.ContainsKey("Redot")); // Prints True + GD.Print(myDict.ContainsKey(210)); // Prints True + GD.Print(myDict.ContainsKey(4)); // Prints False @@ -608,7 +608,7 @@ Returns a hashed 32-bit integer value representing the dictionary contents. var dict2 = new Godot.Collections.Dictionary{{"A", 10}, {"B", 2}}; // Godot.Collections.Dictionary has no Hash() method. Use GD.Hash() instead. - GD.Print(GD.Hash(dict1) == GD.Hash(dict2)); // Prints true + GD.Print(GD.Hash(dict1) == GD.Hash(dict2)); // Prints True diff --git a/classes/class_diraccess.rst b/classes/class_diraccess.rst index f8045f9c8cd..d82b8bc1720 100644 --- a/classes/class_diraccess.rst +++ b/classes/class_diraccess.rst @@ -129,6 +129,8 @@ Methods +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`create_link`\ (\ source\: :ref:`String`, target\: :ref:`String`\ ) | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`DirAccess` | :ref:`create_temp`\ (\ prefix\: :ref:`String` = "", keep\: :ref:`bool` = false\ ) |static| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`current_is_dir`\ (\ ) |const| | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`dir_exists`\ (\ path\: :ref:`String`\ ) | @@ -159,6 +161,8 @@ Methods +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_space_left`\ (\ ) | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_bundle`\ (\ path\: :ref:`String`\ ) |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_case_sensitive`\ (\ path\: :ref:`String`\ ) |const| | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_link`\ (\ path\: :ref:`String`\ ) | @@ -300,6 +304,24 @@ Creates symbolic link between files or folders. ---- +.. _class_DirAccess_method_create_temp: + +.. rst-class:: classref-method + +:ref:`DirAccess` **create_temp**\ (\ prefix\: :ref:`String` = "", keep\: :ref:`bool` = false\ ) |static| :ref:`๐Ÿ”—` + +Creates a temporary directory. This directory will be freed when the returned **DirAccess** is freed. + +If ``prefix`` is not empty, it will be prefixed to the directory name, separated by a ``-``. + +If ``keep`` is ``true``, the directory is not deleted when the returned **DirAccess** is freed. + +Returns ``null`` if opening the directory failed. You can use :ref:`get_open_error` to check the error that occurred. + +.. rst-class:: classref-item-separator + +---- + .. _class_DirAccess_method_current_is_dir: .. rst-class:: classref-method @@ -518,6 +540,20 @@ Returns the available space on the current directory's disk, in bytes. Returns ` ---- +.. _class_DirAccess_method_is_bundle: + +.. rst-class:: classref-method + +:ref:`bool` **is_bundle**\ (\ path\: :ref:`String`\ ) |const| :ref:`๐Ÿ”—` + +Returns ``true`` if the directory is a macOS bundle. + +\ **Note:** This method is implemented on macOS. + +.. rst-class:: classref-item-separator + +---- + .. _class_DirAccess_method_is_case_sensitive: .. rst-class:: classref-method diff --git a/classes/class_displayserver.rst b/classes/class_displayserver.rst index bbaa631b1b7..6611e3d47f9 100644 --- a/classes/class_displayserver.rst +++ b/classes/class_displayserver.rst @@ -31,6 +31,8 @@ Methods .. table:: :widths: auto + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`beep`\ (\ ) |const| | +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`clipboard_get`\ (\ ) |const| | +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -240,6 +242,8 @@ Methods +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Image` | :ref:`screen_get_image`\ (\ screen\: :ref:`int` = -1\ ) |const| | +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image` | :ref:`screen_get_image_rect`\ (\ rect\: :ref:`Rect2i`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`screen_get_max_scale`\ (\ ) |const| | +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`ScreenOrientation` | :ref:`screen_get_orientation`\ (\ screen\: :ref:`int` = -1\ ) |const| | @@ -402,6 +406,8 @@ Methods +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`window_set_window_event_callback`\ (\ callback\: :ref:`Callable`, window_id\: :ref:`int` = 0\ ) | +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_start_drag`\ (\ window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -628,6 +634,30 @@ Display server supports spawning dialogs for selecting files or directories usin The display server supports all features of :ref:`FEATURE_NATIVE_DIALOG_FILE`, with the added functionality of Options and native dialog file access to ``res://`` and ``user://`` paths. See :ref:`file_dialog_show` and :ref:`file_dialog_with_options_show`. **Windows, macOS, Linux (X11/Wayland)** +.. _class_DisplayServer_constant_FEATURE_WINDOW_DRAG: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_WINDOW_DRAG** = ``27`` + +The display server supports initiating window drag operation on demand. See :ref:`window_start_drag`. + +.. _class_DisplayServer_constant_FEATURE_SCREEN_EXCLUDE_FROM_CAPTURE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_SCREEN_EXCLUDE_FROM_CAPTURE** = ``28`` + +Display server supports :ref:`WINDOW_FLAG_EXCLUDE_FROM_CAPTURE` window flag. + +.. _class_DisplayServer_constant_FEATURE_WINDOW_EMBEDDING: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_WINDOW_EMBEDDING** = ``29`` + +Display server supports embedding a window from another process. **Windows, Linux (X11)** + .. rst-class:: classref-item-separator ---- @@ -1192,11 +1222,23 @@ Window style is overridden, forcing sharp corners. \ **Note:** This flag is implemented only on Windows (11). +.. _class_DisplayServer_constant_WINDOW_FLAG_EXCLUDE_FROM_CAPTURE: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowFlags` **WINDOW_FLAG_EXCLUDE_FROM_CAPTURE** = ``9`` + +Windows is excluded from screenshots taken by :ref:`screen_get_image`, :ref:`screen_get_image_rect`, and :ref:`screen_get_pixel`. + +\ **Note:** This flag is implemented on macOS and Windows. + +\ **Note:** Setting this flag will **NOT** prevent other apps from capturing an image, it should not be used as a security measure. + .. _class_DisplayServer_constant_WINDOW_FLAG_MAX: .. rst-class:: classref-enumeration-constant -:ref:`WindowFlags` **WINDOW_FLAG_MAX** = ``9`` +:ref:`WindowFlags` **WINDOW_FLAG_MAX** = ``10`` Max value of the :ref:`WindowFlags`. @@ -1376,7 +1418,7 @@ Window handle: Window view: -- Windows: ``HDC`` for the window (only with the GL Compatibility renderer). +- Windows: ``HDC`` for the window (only with the Compatibility renderer). - macOS: ``NSView*`` for the window main view. @@ -1388,7 +1430,7 @@ Window view: :ref:`HandleType` **OPENGL_CONTEXT** = ``3`` -OpenGL context (only with the GL Compatibility renderer): +OpenGL context (only with the Compatibility renderer): - Windows: ``HGLRC`` for the window (native GL), or ``EGLContext`` for the window (ANGLE). @@ -1548,6 +1590,20 @@ The ID that refers to a nonexistent application status indicator. Method Descriptions ------------------- +.. _class_DisplayServer_method_beep: + +.. rst-class:: classref-method + +|void| **beep**\ (\ ) |const| :ref:`๐Ÿ”—` + +Plays the beep sound from the operative system, if possible. Because it comes from the OS, the beep sound will be audible even if the application is muted. It may also be disabled for the entire OS by the user. + +\ **Note:** This method is implemented on macOS, Linux (X11/Wayland), and Windows. + +.. rst-class:: classref-item-separator + +---- + .. _class_DisplayServer_method_clipboard_get: .. rst-class:: classref-method @@ -1842,7 +1898,7 @@ Returns OS theme accent color. Returns ``Color(0, 0, 0, 0)``, if accent color is Returns the OS theme base color (default control background). Returns ``Color(0, 0, 0, 0)`` if the base color is unknown. -\ **Note:** This method is implemented on macOS and Windows. +\ **Note:** This method is implemented on macOS, Windows, and Android. .. rst-class:: classref-item-separator @@ -3290,6 +3346,22 @@ Returns screenshot of the ``screen``. ---- +.. _class_DisplayServer_method_screen_get_image_rect: + +.. rst-class:: classref-method + +:ref:`Image` **screen_get_image_rect**\ (\ rect\: :ref:`Rect2i`\ ) |const| :ref:`๐Ÿ”—` + +Returns screenshot of the screen ``rect``. + +\ **Note:** This method is implemented on 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 @@ -3395,7 +3467,7 @@ Returns the scale factor of the specified screen by index. \ **Note:** On Linux (Wayland), the returned value is accurate only when ``screen`` is :ref:`SCREEN_OF_MAIN_WINDOW`. Due to API limitations, passing a direct index will return a rounded-up integer, if the screen has a fractional scale (e.g. ``1.25`` would get rounded up to ``2.0``). -\ **Note:** This method is implemented only on macOS and Linux (Wayland). +\ **Note:** This method is implemented on Android, iOS, Web, macOS, and Linux (Wayland). .. rst-class:: classref-item-separator @@ -4521,6 +4593,20 @@ Sets the ``callback`` that will be called when an event occurs in the window spe \ **Warning:** Advanced users only! Adding such a callback to a :ref:`Window` node will override its default implementation, which can introduce bugs. +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_window_start_drag: + +.. rst-class:: classref-method + +|void| **window_start_drag**\ (\ window_id\: :ref:`int` = 0\ ) :ref:`๐Ÿ”—` + +Starts a drag operation on the window with the given ``window_id``, using the current mouse position. Call this method when handling a mouse button being pressed to simulate a pressed event on the window's title bar. Using this method allows the window to participate in space switching, tiling, and other system features. + +\ **Note:** This method is implemented on Linux(X11/Wayland), macOS, and Windows. + .. |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_dtlsserver.rst b/classes/class_dtlsserver.rst index dae4d9bb143..2d87b3242d0 100644 --- a/classes/class_dtlsserver.rst +++ b/classes/class_dtlsserver.rst @@ -31,8 +31,8 @@ Below a small example of how to use it: # server_node.gd extends Node - var dtls := DTLSServer.new() - var server := UDPServer.new() + var dtls = DTLSServer.new() + var server = UDPServer.new() var peers = [] func _ready(): @@ -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 = server.take_connection() + var dtls_peer = 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!") @@ -115,8 +115,8 @@ Below a small example of how to use it: # client_node.gd extends Node - var dtls := PacketPeerDTLS.new() - var udp := PacketPeerUDP.new() + var dtls = PacketPeerDTLS.new() + var udp = PacketPeerUDP.new() var connected = false func _ready(): diff --git a/classes/class_editorexportplatform.rst b/classes/class_editorexportplatform.rst index 9ce8e3aed05..39f545d3e02 100644 --- a/classes/class_editorexportplatform.rst +++ b/classes/class_editorexportplatform.rst @@ -67,6 +67,8 @@ Methods +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`get_forced_export_files`\ (\ ) |static| | +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_internal_export_files`\ (\ ) |static| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_message_category`\ (\ index\: :ref:`int`\ ) |const| | +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_message_count`\ (\ ) |const| | @@ -366,6 +368,18 @@ Returns array of core file names that always should be exported regardless of pr ---- +.. _class_EditorExportPlatform_method_get_internal_export_files: + +.. rst-class:: classref-method + +:ref:`Dictionary` **get_internal_export_files**\ (\ ) |static| :ref:`๐Ÿ”—` + +Returns additional files that should always be exported regardless of preset configuration, and are not part of the project source. The returned :ref:`Dictionary` contains filename keys (:ref:`String`) and their corresponding raw data (:ref:`PackedByteArray`). + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlatform_method_get_message_category: .. rst-class:: classref-method diff --git a/classes/class_editorexportplatformandroid.rst b/classes/class_editorexportplatformandroid.rst index 49984b4ccff..a9761943dde 100644 --- a/classes/class_editorexportplatformandroid.rst +++ b/classes/class_editorexportplatformandroid.rst @@ -430,6 +430,8 @@ Properties +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`version/name` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`wear_os/swipe_to_dismiss` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`xr_features/xr_mode` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -2860,6 +2862,20 @@ Application version visible to the user. Falls back to :ref:`ProjectSettings.app ---- +.. _class_EditorExportPlatformAndroid_property_wear_os/swipe_to_dismiss: + +.. rst-class:: classref-property + +:ref:`bool` **wear_os/swipe_to_dismiss** :ref:`๐Ÿ”—` + +If ``true``, `Swipe to dismiss `__ will be enabled on Wear OS. + +\ **Note:** This is ``true`` by default. To disable this behavior, :ref:`gradle_build/use_gradle_build` is required. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlatformAndroid_property_xr_features/xr_mode: .. rst-class:: classref-property diff --git a/classes/class_editorexportplatformios.rst b/classes/class_editorexportplatformios.rst index 3f83baeac66..6daf10c1a51 100644 --- a/classes/class_editorexportplatformios.rst +++ b/classes/class_editorexportplatformios.rst @@ -56,6 +56,10 @@ Properties +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`application/min_ios_version` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/provisioning_profile_specifier_debug` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/provisioning_profile_specifier_release` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`application/provisioning_profile_uuid_debug` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`application/provisioning_profile_uuid_release` | @@ -72,16 +76,24 @@ Properties +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`capabilities/access_wifi` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`capabilities/additional` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`capabilities/performance_a12` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`capabilities/performance_gaming_tier` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`capabilities/push_notifications` | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`custom_template/debug` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`custom_template/release` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`entitlements/additional` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`entitlements/game_center` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`entitlements/increased_memory_limit` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`entitlements/push_notifications` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`icons/app_store_1024x1024` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`icons/app_store_1024x1024_dark` | @@ -621,7 +633,7 @@ Application distribution target (release export). :ref:`bool` **application/export_project_only** :ref:`๐Ÿ”—` -If ``true``, exports iOS project files without building an XCArchive or ``.ipa`` file. If ``false``, exports iOS project files and builds an XCArchive and ``.ipa`` file at the same time. When combining Godot with Fastlane or other build pipelines, you may want to set this to ``true``. +If ``true``, exports iOS project files without building an XCArchive or ``.ipa`` file. If ``false``, exports iOS project files and builds an XCArchive and ``.ipa`` file at the same time. When combining Redot with Fastlane or other build pipelines, you may want to set this to ``true``. .. rst-class:: classref-item-separator @@ -663,6 +675,34 @@ Minimum version of iOS required for this application to run in the ``major.minor ---- +.. _class_EditorExportPlatformIOS_property_application/provisioning_profile_specifier_debug: + +.. rst-class:: classref-property + +:ref:`String` **application/provisioning_profile_specifier_debug** :ref:`๐Ÿ”—` + +Name of the provisioning profile. Sets XCode PROVISIONING_PROFILE_SPECIFIER for debug. `Used for manual provisioning `__. + +Can be overridden with the environment variable ``GODOT_IOS_PROFILE_SPECIFIER_DEBUG``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_application/provisioning_profile_specifier_release: + +.. rst-class:: classref-property + +:ref:`String` **application/provisioning_profile_specifier_release** :ref:`๐Ÿ”—` + +Name of the provisioning profile. Sets XCode PROVISIONING_PROFILE_SPECIFIER for release. `Used for manual provisioning `__. + +Can be overridden with the environment variable ``GODOT_IOS_PROFILE_SPECIFIER_RELEASE``. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlatformIOS_property_application/provisioning_profile_uuid_debug: .. rst-class:: classref-property @@ -763,6 +803,20 @@ If ``true``, networking features related to Wi-Fi access are enabled. See `Requi ---- +.. _class_EditorExportPlatformIOS_property_capabilities/additional: + +.. rst-class:: classref-property + +:ref:`PackedStringArray` **capabilities/additional** :ref:`๐Ÿ”—` + +Additional data added to the ``UIRequiredDeviceCapabilities`` array of the ``Info.plist`` file. + +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray` for more details. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlatformIOS_property_capabilities/performance_a12: .. rst-class:: classref-property @@ -791,23 +845,23 @@ Enabling this option limits supported devices to: iPhone 15 Pro and newer. ---- -.. _class_EditorExportPlatformIOS_property_capabilities/push_notifications: +.. _class_EditorExportPlatformIOS_property_custom_template/debug: .. rst-class:: classref-property -:ref:`bool` **capabilities/push_notifications** :ref:`๐Ÿ”—` +:ref:`String` **custom_template/debug** :ref:`๐Ÿ”—` -If ``true``, push notifications are enabled. See `Required Device Capabilities `__. +Path to the custom export template. If left empty, default template is used. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformIOS_property_custom_template/debug: +.. _class_EditorExportPlatformIOS_property_custom_template/release: .. rst-class:: classref-property -:ref:`String` **custom_template/debug** :ref:`๐Ÿ”—` +:ref:`String` **custom_template/release** :ref:`๐Ÿ”—` Path to the custom export template. If left empty, default template is used. @@ -815,13 +869,54 @@ Path to the custom export template. If left empty, default template is used. ---- -.. _class_EditorExportPlatformIOS_property_custom_template/release: +.. _class_EditorExportPlatformIOS_property_entitlements/additional: .. rst-class:: classref-property -:ref:`String` **custom_template/release** :ref:`๐Ÿ”—` +:ref:`String` **entitlements/additional** :ref:`๐Ÿ”—` -Path to the custom export template. If left empty, default template is used. +Additional data added to the root ```` section of the `.entitlements `__ file. The value should be an XML section with pairs of key-value elements, for example: + +.. code:: text + + key_name + value + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_entitlements/game_center: + +.. rst-class:: classref-property + +:ref:`bool` **entitlements/game_center** :ref:`๐Ÿ”—` + +Enable to allow access to Game Center features. `com.apple.developer.game-center `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_entitlements/increased_memory_limit: + +.. rst-class:: classref-property + +:ref:`bool` **entitlements/increased_memory_limit** :ref:`๐Ÿ”—` + +Enable if app may perform better with a higher memory limit. `com.apple.developer.kernel.increased-memory-limit `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_entitlements/push_notifications: + +.. rst-class:: classref-property + +:ref:`String` **entitlements/push_notifications** :ref:`๐Ÿ”—` + +Environment for Apple Push Notification service. See `aps-environment `__. .. rst-class:: classref-item-separator diff --git a/classes/class_editorexportplatformlinuxbsd.rst b/classes/class_editorexportplatformlinuxbsd.rst index 2476d5a7f59..082c9a7912d 100644 --- a/classes/class_editorexportplatformlinuxbsd.rst +++ b/classes/class_editorexportplatformlinuxbsd.rst @@ -76,7 +76,7 @@ Property Descriptions Application executable architecture. -Supported architectures: ``x86_32``, ``x86_64``, ``arm64``, ``arm32``, ``rv64``, ``ppc64``, and ``ppc32``. +Supported architectures: ``x86_32``, ``x86_64``, ``arm64``, ``arm32``, ``rv64``, ``ppc64``, ``ppc32``, and ``loongarch64``. Official export templates include ``x86_32`` and ``x86_64`` binaries only. diff --git a/classes/class_editorexportplatformmacos.rst b/classes/class_editorexportplatformmacos.rst index 0d03df65713..90d54ea7440 100644 --- a/classes/class_editorexportplatformmacos.rst +++ b/classes/class_editorexportplatformmacos.rst @@ -761,7 +761,7 @@ Array of the additional command line arguments passed to the code signing tool. :ref:`String` **codesign/entitlements/additional** :ref:`๐Ÿ”—` -Additional data added to the root ```` section of the `.entitlements `__ file. The value should be an XML section with pairs of key-value elements, e.g.: +Additional data added to the root ```` section of the `.entitlements `__ file. The value should be an XML section with pairs of key-value elements, for example: .. code:: text diff --git a/classes/class_editorexportplatformweb.rst b/classes/class_editorexportplatformweb.rst index 9f5a68045c1..42c1a0207c4 100644 --- a/classes/class_editorexportplatformweb.rst +++ b/classes/class_editorexportplatformweb.rst @@ -21,7 +21,7 @@ Description The Web exporter customizes how a web build is handled. In the editor's "Export" window, it is created when adding a new "Web" preset. -\ **Note:** Godot on Web is rendered inside a ```` tag. Normally, the canvas cannot be positioned or resized manually, but otherwise acts as the main :ref:`Window` of the application. +\ **Note:** Redot on Web is rendered inside a ```` tag. Normally, the canvas cannot be positioned or resized manually, but otherwise acts as the main :ref:`Window` of the application. .. rst-class:: classref-introduction-group @@ -123,7 +123,7 @@ File path to the custom export template used for release builds. If left empty, :ref:`int` **html/canvas_resize_policy** :ref:`๐Ÿ”—` -Determines how the canvas should be resized by Godot. +Determines how the canvas should be resized by Redot. - **None:** The canvas is not automatically resized. diff --git a/classes/class_editorfiledialog.rst b/classes/class_editorfiledialog.rst index 4d8f8bf2c55..c739d3ed75f 100644 --- a/classes/class_editorfiledialog.rst +++ b/classes/class_editorfiledialog.rst @@ -70,8 +70,12 @@ Methods +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`add_side_menu`\ (\ menu\: :ref:`Control`, title\: :ref:`String` = ""\ ) | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_filename_filter`\ (\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`clear_filters`\ (\ ) | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_filename_filter`\ (\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`LineEdit` | :ref:`get_line_edit`\ (\ ) | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_option_default`\ (\ option\: :ref:`int`\ ) |const| | @@ -88,6 +92,8 @@ Methods +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`popup_file_dialog`\ (\ ) | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_filename_filter`\ (\ filter\: :ref:`String`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_option_default`\ (\ option\: :ref:`int`, default_value_index\: :ref:`int`\ ) | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_option_name`\ (\ option\: :ref:`int`, name\: :ref:`String`\ ) | @@ -128,6 +134,18 @@ Emitted when a file is selected. ---- +.. _class_EditorFileDialog_signal_filename_filter_changed: + +.. rst-class:: classref-signal + +**filename_filter_changed**\ (\ filter\: :ref:`String`\ ) :ref:`๐Ÿ”—` + +Emitted when the filter for file names changes. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorFileDialog_signal_files_selected: .. rst-class:: classref-signal @@ -479,13 +497,37 @@ Adds the given ``menu`` to the side of the file dialog with the given ``title`` ---- +.. _class_EditorFileDialog_method_clear_filename_filter: + +.. rst-class:: classref-method + +|void| **clear_filename_filter**\ (\ ) :ref:`๐Ÿ”—` + +Clear the filter for file names. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorFileDialog_method_clear_filters: .. rst-class:: classref-method |void| **clear_filters**\ (\ ) :ref:`๐Ÿ”—` -Removes all filters except for "All Files (\*)". +Removes all filters except for "All Files (\*.\*)". + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorFileDialog_method_get_filename_filter: + +.. rst-class:: classref-method + +:ref:`String` **get_filename_filter**\ (\ ) |const| :ref:`๐Ÿ”—` + +Returns the value of the filter for file names. .. rst-class:: classref-item-separator @@ -591,6 +633,18 @@ Shows the **EditorFileDialog** at the default size and position for file dialogs ---- +.. _class_EditorFileDialog_method_set_filename_filter: + +.. rst-class:: classref-method + +|void| **set_filename_filter**\ (\ filter\: :ref:`String`\ ) :ref:`๐Ÿ”—` + +Sets the value of the filter for file names. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorFileDialog_method_set_option_default: .. rst-class:: classref-method diff --git a/classes/class_editorimportplugin.rst b/classes/class_editorimportplugin.rst index e028a7636ee..7ccb2b25985 100644 --- a/classes/class_editorimportplugin.rst +++ b/classes/class_editorimportplugin.rst @@ -157,6 +157,8 @@ Methods +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`_can_import_threaded`\ (\ ) |virtual| |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_format_version`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`_get_import_options`\ (\ path\: :ref:`String`, preset_index\: :ref:`int`\ ) |virtual| |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_get_import_order`\ (\ ) |virtual| |const| | @@ -209,6 +211,18 @@ If this importer's implementation is thread-safe and can be run in parallel, ove ---- +.. _class_EditorImportPlugin_private_method__get_format_version: + +.. rst-class:: classref-method + +:ref:`int` **_get_format_version**\ (\ ) |virtual| |const| :ref:`๐Ÿ”—` + +Gets the format version of this importer. Increment this version when making incompatible changes to the format of the imported resources. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorImportPlugin_private_method__get_import_options: .. rst-class:: classref-method diff --git a/classes/class_editorinspector.rst b/classes/class_editorinspector.rst index efb53b2c90d..0ae74125c56 100644 --- a/classes/class_editorinspector.rst +++ b/classes/class_editorinspector.rst @@ -39,6 +39,10 @@ Properties .. table:: :widths: auto + +----------------------------------------------------+------------------------+-------------------------------------------------------------------------------------------------+ + | :ref:`bool` | draw_focus_border | ``true`` (overrides :ref:`ScrollContainer`) | + +----------------------------------------------------+------------------------+-------------------------------------------------------------------------------------------------+ + | :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | +----------------------------------------------------+------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`bool` | follow_focus | ``true`` (overrides :ref:`ScrollContainer`) | +----------------------------------------------------+------------------------+-------------------------------------------------------------------------------------------------+ @@ -53,11 +57,15 @@ Methods .. table:: :widths: auto - +-----------------------------+----------------------------------------------------------------------------------------+ - | :ref:`Object` | :ref:`get_edited_object`\ (\ ) | - +-----------------------------+----------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_selected_path`\ (\ ) |const| | - +-----------------------------+----------------------------------------------------------------------------------------+ + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`edit`\ (\ object\: :ref:`Object`\ ) | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`get_edited_object`\ (\ ) | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_selected_path`\ (\ ) |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorProperty` | :ref:`instantiate_property_editor`\ (\ object\: :ref:`Object`, type\: :ref:`Variant.Type`, path\: :ref:`String`, hint\: :ref:`PropertyHint`, hint_text\: :ref:`String`, usage\: :ref:`int`, wide\: :ref:`bool` = false\ ) |static| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -183,6 +191,20 @@ Emitted when a property that requires a restart to be applied is edited in the i Method Descriptions ------------------- +.. _class_EditorInspector_method_edit: + +.. rst-class:: classref-method + +|void| **edit**\ (\ object\: :ref:`Object`\ ) :ref:`๐Ÿ”—` + +Shows the properties of the given ``object`` in this inspector for editing. To clear the inspector, call this method with ``null``. + +\ **Note:** If you want to edit an object in the editor's main inspector, use the ``edit_*`` methods in :ref:`EditorInterface` instead. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorInspector_method_get_edited_object: .. rst-class:: classref-method @@ -203,6 +225,18 @@ Returns the object currently selected in this inspector. Gets the path of the currently selected property. +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorInspector_method_instantiate_property_editor: + +.. rst-class:: classref-method + +:ref:`EditorProperty` **instantiate_property_editor**\ (\ object\: :ref:`Object`, type\: :ref:`Variant.Type`, path\: :ref:`String`, hint\: :ref:`PropertyHint`, hint_text\: :ref:`String`, usage\: :ref:`int`, wide\: :ref:`bool` = false\ ) |static| :ref:`๐Ÿ”—` + +Creates a property editor that can be used by plugin UI to edit the specified property of an ``object``. + .. |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_editorinterface.rst b/classes/class_editorinterface.rst index 859864a6c1a..5f227c64846 100644 --- a/classes/class_editorinterface.rst +++ b/classes/class_editorinterface.rst @@ -59,117 +59,119 @@ Methods .. table:: :widths: auto - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`edit_node`\ (\ node\: :ref:`Node`\ ) | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`edit_resource`\ (\ resource\: :ref:`Resource`\ ) | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`edit_script`\ (\ script\: :ref:`Script`, line\: :ref:`int` = -1, column\: :ref:`int` = 0, grab_focus\: :ref:`bool` = 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_feature_profile`\ (\ ) |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:`Theme` | :ref:`get_editor_theme`\ (\ ) |const| | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorToaster` | :ref:`get_editor_toaster`\ (\ ) |const| | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorUndoRedoManager` | :ref:`get_editor_undo_redo`\ (\ ) |const| | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`SubViewport` | :ref:`get_editor_viewport_2d`\ (\ ) |const| | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`SubViewport` | :ref:`get_editor_viewport_3d`\ (\ idx\: :ref:`int` = 0\ ) |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`\ (\ object\: :ref:`Object`, for_property\: :ref:`String` = "", inspector_only\: :ref:`bool` = false\ ) | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_multi_window_enabled`\ (\ ) |const| | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_playing_scene`\ (\ ) |const| | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_plugin_enabled`\ (\ plugin\: :ref:`String`\ ) |const| | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`Texture2D`\] | :ref:`make_mesh_previews`\ (\ meshes\: :ref:`Array`\[:ref:`Mesh`\], preview_size\: :ref:`int`\ ) | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`mark_scene_as_unsaved`\ (\ ) | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`open_scene_from_path`\ (\ scene_filepath\: :ref:`String`\ ) | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`play_current_scene`\ (\ ) | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`play_custom_scene`\ (\ scene_filepath\: :ref:`String`\ ) | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`play_main_scene`\ (\ ) | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`popup_dialog`\ (\ dialog\: :ref:`Window`, rect\: :ref:`Rect2i` = Rect2i(0, 0, 0, 0)\ ) | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`popup_dialog_centered`\ (\ dialog\: :ref:`Window`, minsize\: :ref:`Vector2i` = Vector2i(0, 0)\ ) | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`popup_dialog_centered_clamped`\ (\ dialog\: :ref:`Window`, minsize\: :ref:`Vector2i` = Vector2i(0, 0), fallback_ratio\: :ref:`float` = 0.75\ ) | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`popup_dialog_centered_ratio`\ (\ dialog\: :ref:`Window`, ratio\: :ref:`float` = 0.8\ ) | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`popup_method_selector`\ (\ object\: :ref:`Object`, callback\: :ref:`Callable`, current_value\: :ref:`String` = ""\ ) | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`popup_node_selector`\ (\ callback\: :ref:`Callable`, valid_types\: :ref:`Array`\[:ref:`StringName`\] = [], current_value\: :ref:`Node` = null\ ) | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`popup_property_selector`\ (\ object\: :ref:`Object`, callback\: :ref:`Callable`, type_filter\: :ref:`PackedInt32Array` = PackedInt32Array(), current_value\: :ref:`String` = ""\ ) | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`popup_quick_open`\ (\ callback\: :ref:`Callable`, base_types\: :ref:`Array`\[:ref:`StringName`\] = []\ ) | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`reload_scene_from_path`\ (\ scene_filepath\: :ref:`String`\ ) | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`restart_editor`\ (\ save\: :ref:`bool` = true\ ) | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`save_all_scenes`\ (\ ) | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`save_scene`\ (\ ) | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`save_scene_as`\ (\ path\: :ref:`String`, with_preview\: :ref:`bool` = true\ ) | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`select_file`\ (\ file\: :ref:`String`\ ) | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_current_feature_profile`\ (\ profile_name\: :ref:`String`\ ) | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_main_screen_editor`\ (\ name\: :ref:`String`\ ) | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_plugin_enabled`\ (\ plugin\: :ref:`String`, enabled\: :ref:`bool`\ ) | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`stop_playing_scene`\ (\ ) | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`edit_node`\ (\ node\: :ref:`Node`\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`edit_resource`\ (\ resource\: :ref:`Resource`\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`edit_script`\ (\ script\: :ref:`Script`, line\: :ref:`int` = -1, column\: :ref:`int` = 0, grab_focus\: :ref:`bool` = 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_feature_profile`\ (\ ) |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:`Theme` | :ref:`get_editor_theme`\ (\ ) |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorToaster` | :ref:`get_editor_toaster`\ (\ ) |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorUndoRedoManager` | :ref:`get_editor_undo_redo`\ (\ ) |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SubViewport` | :ref:`get_editor_viewport_2d`\ (\ ) |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SubViewport` | :ref:`get_editor_viewport_3d`\ (\ idx\: :ref:`int` = 0\ ) |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`\ (\ object\: :ref:`Object`, for_property\: :ref:`String` = "", inspector_only\: :ref:`bool` = false\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_multi_window_enabled`\ (\ ) |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_playing_scene`\ (\ ) |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_plugin_enabled`\ (\ plugin\: :ref:`String`\ ) |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Texture2D`\] | :ref:`make_mesh_previews`\ (\ meshes\: :ref:`Array`\[:ref:`Mesh`\], preview_size\: :ref:`int`\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`mark_scene_as_unsaved`\ (\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`open_scene_from_path`\ (\ scene_filepath\: :ref:`String`, set_inherited\: :ref:`bool` = false\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`play_current_scene`\ (\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`play_custom_scene`\ (\ scene_filepath\: :ref:`String`\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`play_main_scene`\ (\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_create_dialog`\ (\ callback\: :ref:`Callable`, base_type\: :ref:`StringName` = "", current_type\: :ref:`String` = "", dialog_title\: :ref:`String` = "", type_blocklist\: :ref:`Array`\[:ref:`StringName`\] = [], type_suffixes\: :ref:`Dictionary` = {}\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_dialog`\ (\ dialog\: :ref:`Window`, rect\: :ref:`Rect2i` = Rect2i(0, 0, 0, 0)\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_dialog_centered`\ (\ dialog\: :ref:`Window`, minsize\: :ref:`Vector2i` = Vector2i(0, 0)\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_dialog_centered_clamped`\ (\ dialog\: :ref:`Window`, minsize\: :ref:`Vector2i` = Vector2i(0, 0), fallback_ratio\: :ref:`float` = 0.75\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_dialog_centered_ratio`\ (\ dialog\: :ref:`Window`, ratio\: :ref:`float` = 0.8\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_method_selector`\ (\ object\: :ref:`Object`, callback\: :ref:`Callable`, current_value\: :ref:`String` = ""\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_node_selector`\ (\ callback\: :ref:`Callable`, valid_types\: :ref:`Array`\[:ref:`StringName`\] = [], current_value\: :ref:`Node` = null\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_property_selector`\ (\ object\: :ref:`Object`, callback\: :ref:`Callable`, type_filter\: :ref:`PackedInt32Array` = PackedInt32Array(), current_value\: :ref:`String` = ""\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_quick_open`\ (\ callback\: :ref:`Callable`, base_types\: :ref:`Array`\[:ref:`StringName`\] = []\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reload_scene_from_path`\ (\ scene_filepath\: :ref:`String`\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`restart_editor`\ (\ save\: :ref:`bool` = true\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`save_all_scenes`\ (\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`save_scene`\ (\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`save_scene_as`\ (\ path\: :ref:`String`, with_preview\: :ref:`bool` = true\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`select_file`\ (\ file\: :ref:`String`\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_current_feature_profile`\ (\ profile_name\: :ref:`String`\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_main_screen_editor`\ (\ name\: :ref:`String`\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_plugin_enabled`\ (\ plugin\: :ref:`String`, enabled\: :ref:`bool`\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`stop_playing_scene`\ (\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -647,9 +649,9 @@ Marks the current scene tab as unsaved. .. rst-class:: classref-method -|void| **open_scene_from_path**\ (\ scene_filepath\: :ref:`String`\ ) :ref:`๐Ÿ”—` +|void| **open_scene_from_path**\ (\ scene_filepath\: :ref:`String`, set_inherited\: :ref:`bool` = false\ ) :ref:`๐Ÿ”—` -Opens the scene at the given path. +Opens the scene at the given path. If ``set_inherited`` is ``true``, creates a new inherited scene. .. rst-class:: classref-item-separator @@ -691,6 +693,46 @@ Plays the main scene. ---- +.. _class_EditorInterface_method_popup_create_dialog: + +.. rst-class:: classref-method + +|void| **popup_create_dialog**\ (\ callback\: :ref:`Callable`, base_type\: :ref:`StringName` = "", current_type\: :ref:`String` = "", dialog_title\: :ref:`String` = "", type_blocklist\: :ref:`Array`\[:ref:`StringName`\] = [], type_suffixes\: :ref:`Dictionary` = {}\ ) :ref:`๐Ÿ”—` + +Pops up an editor dialog for creating an object. + +The ``callback`` must take a single argument of type :ref:`StringName` which will contain the type name of the selected object or be empty if no item is selected. + +The ``base_type`` specifies the base type of objects to display. For example, if you set this to "Resource", all types derived from :ref:`Resource` will display in the create dialog. + +The ``current_type`` will be passed in the search box of the create dialog, and the specified type can be immediately selected when the dialog pops up. If the ``current_type`` is not derived from ``base_type``, there will be no result of the type in the dialog. + +The ``dialog_title`` allows you to define a custom title for the dialog. This is useful if you want to accurately hint the usage of the dialog. If the ``dialog_title`` is an empty string, the dialog will use "Create New 'Base Type'" as the default title. + +The ``type_blocklist`` contains a list of type names, and the types in the blocklist will be hidden from the create dialog. + +The ``type_suffixes`` is a dictionary, with keys being :ref:`StringName`\ s and values being :ref:`String`\ s. Custom suffixes override the default suffixes which are file names of their scripts. For example, if you set a custom suffix as "Custom Suffix" for a global script type, + +.. code:: text + + Node + |- MyCustomNode (my_custom_node.gd) + +will be + +.. code:: text + + Node + |- MyCustomNode (Custom Suffix) + +Bear in mind that when a built-in type does not have any custom suffix, its suffix will be removed. The suffix of a type created from a script will fall back to its script file name. For global types by scripts, if you customize their suffixes to an empty string, their suffixes will be removed. + +\ **Note:** Trying to list the base type in the ``type_blocklist`` will hide all types derived from the base type from the create dialog. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorInterface_method_popup_dialog: .. rst-class:: classref-method diff --git a/classes/class_editorpaths.rst b/classes/class_editorpaths.rst index 9d4e2253105..f027e563d49 100644 --- a/classes/class_editorpaths.rst +++ b/classes/class_editorpaths.rst @@ -75,9 +75,9 @@ Returns the absolute path to the user's cache folder. This folder should be used .. code:: text - - Windows: %LOCALAPPDATA%\Godot\ - - macOS: ~/Library/Caches/Godot/ - - Linux: ~/.cache/godot/ + - Windows: %LOCALAPPDATA%\Redot\ + - macOS: ~/Library/Caches/Redot/ + - Linux: ~/.cache/redot/ .. rst-class:: classref-item-separator @@ -95,9 +95,9 @@ Returns the absolute path to the user's configuration folder. This folder should .. code:: text - - Windows: %APPDATA%\Godot\ (same as `get_data_dir()`) - - macOS: ~/Library/Application Support/Godot/ (same as `get_data_dir()`) - - Linux: ~/.config/godot/ + - Windows: %APPDATA%\Redot\ (same as `get_data_dir()`) + - macOS: ~/Library/Application Support/Redot/ (same as `get_data_dir()`) + - Linux: ~/.config/redot/ .. rst-class:: classref-item-separator @@ -115,9 +115,9 @@ Returns the absolute path to the user's data folder. This folder should be used .. code:: text - - Windows: %APPDATA%\Godot\ (same as `get_config_dir()`) - - macOS: ~/Library/Application Support/Godot/ (same as `get_config_dir()`) - - Linux: ~/.local/share/godot/ + - Windows: %APPDATA%\Redot\ (same as `get_config_dir()`) + - macOS: ~/Library/Application Support/Redot/ (same as `get_config_dir()`) + - Linux: ~/.local/share/redot/ .. rst-class:: classref-item-separator diff --git a/classes/class_editorplugin.rst b/classes/class_editorplugin.rst index fe1f06f9476..81a22005ba2 100644 --- a/classes/class_editorplugin.rst +++ b/classes/class_editorplugin.rst @@ -12,6 +12,8 @@ EditorPlugin **Inherits:** :ref:`Node` **<** :ref:`Object` +**Inherited By:** :ref:`GridMapEditorPlugin` + Used by the editor to extend its functionality. .. rst-class:: classref-introduction-group diff --git a/classes/class_editorproperty.rst b/classes/class_editorproperty.rst index 53dfd3073fb..ace6bcf63c7 100644 --- a/classes/class_editorproperty.rst +++ b/classes/class_editorproperty.rst @@ -29,21 +29,27 @@ Properties .. table:: :widths: auto - +-----------------------------+-----------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`checkable` | ``false`` | - +-----------------------------+-----------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`checked` | ``false`` | - +-----------------------------+-----------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`deletable` | ``false`` | - +-----------------------------+-----------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`draw_warning` | ``false`` | - +-----------------------------+-----------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`keying` | ``false`` | - +-----------------------------+-----------------------------------------------------------------+-----------+ - | :ref:`String` | :ref:`label` | ``""`` | - +-----------------------------+-----------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`read_only` | ``false`` | - +-----------------------------+-----------------------------------------------------------------+-----------+ + +-----------------------------+-------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`checkable` | ``false`` | + +-----------------------------+-------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`checked` | ``false`` | + +-----------------------------+-------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`deletable` | ``false`` | + +-----------------------------+-------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`draw_warning` | ``false`` | + +-----------------------------+-------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`keying` | ``false`` | + +-----------------------------+-------------------------------------------------------------------------+-----------+ + | :ref:`String` | :ref:`label` | ``""`` | + +-----------------------------+-------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`name_split_ratio` | ``0.5`` | + +-----------------------------+-------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`read_only` | ``false`` | + +-----------------------------+-------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`selectable` | ``true`` | + +-----------------------------+-------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`use_folding` | ``false`` | + +-----------------------------+-------------------------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group @@ -60,14 +66,24 @@ Methods +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`add_focusable`\ (\ control\: :ref:`Control`\ ) | +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`deselect`\ (\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`emit_changed`\ (\ property\: :ref:`StringName`, value\: :ref:`Variant`, field\: :ref:`StringName` = &"", changing\: :ref:`bool` = false\ ) | +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Object` | :ref:`get_edited_object`\ (\ ) | +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`StringName` | :ref:`get_edited_property`\ (\ ) |const| | +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_selected`\ (\ ) |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`select`\ (\ focusable\: :ref:`int` = -1\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_bottom_editor`\ (\ editor\: :ref:`Control`\ ) | +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_label_reference`\ (\ control\: :ref:`Control`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_object_and_property`\ (\ object\: :ref:`Object`, property\: :ref:`StringName`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`update_property`\ (\ ) | +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -333,6 +349,23 @@ Set this property to change the label (if you want to show one). ---- +.. _class_EditorProperty_property_name_split_ratio: + +.. rst-class:: classref-property + +:ref:`float` **name_split_ratio** = ``0.5`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_name_split_ratio**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_name_split_ratio**\ (\ ) + +Space distribution ratio between the label and the editing field. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorProperty_property_read_only: .. rst-class:: classref-property @@ -346,6 +379,40 @@ Set this property to change the label (if you want to show one). Used by the inspector, set to ``true`` when the property is read-only. +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorProperty_property_selectable: + +.. rst-class:: classref-property + +:ref:`bool` **selectable** = ``true`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_selectable**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_selectable**\ (\ ) + +Used by the inspector, set to ``true`` when the property is selectable. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorProperty_property_use_folding: + +.. rst-class:: classref-property + +:ref:`bool` **use_folding** = ``false`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_use_folding**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_using_folding**\ (\ ) + +Used by the inspector, set to ``true`` when the property is using folding. + .. rst-class:: classref-section-separator ---- @@ -391,6 +458,18 @@ If any of the controls added can gain keyboard focus, add it here. This ensures ---- +.. _class_EditorProperty_method_deselect: + +.. rst-class:: classref-method + +|void| **deselect**\ (\ ) :ref:`๐Ÿ”—` + +Draw property as not selected. Used by the inspector. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorProperty_method_emit_changed: .. rst-class:: classref-method @@ -427,6 +506,30 @@ Gets the edited property. If your editor is for a single property (added via :re ---- +.. _class_EditorProperty_method_is_selected: + +.. rst-class:: classref-method + +:ref:`bool` **is_selected**\ (\ ) |const| :ref:`๐Ÿ”—` + +Returns ``true`` if property is drawn as selected. Used by the inspector. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorProperty_method_select: + +.. rst-class:: classref-method + +|void| **select**\ (\ focusable\: :ref:`int` = -1\ ) :ref:`๐Ÿ”—` + +Draw property as selected. Used by the inspector. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorProperty_method_set_bottom_editor: .. rst-class:: classref-method @@ -439,6 +542,30 @@ Puts the ``editor`` control below the property label. The control must be previo ---- +.. _class_EditorProperty_method_set_label_reference: + +.. rst-class:: classref-method + +|void| **set_label_reference**\ (\ control\: :ref:`Control`\ ) :ref:`๐Ÿ”—` + +Used by the inspector, set to a control that will be used as a reference to calculate the size of the label. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorProperty_method_set_object_and_property: + +.. rst-class:: classref-method + +|void| **set_object_and_property**\ (\ object\: :ref:`Object`, property\: :ref:`StringName`\ ) :ref:`๐Ÿ”—` + +Assigns object and property to edit. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorProperty_method_update_property: .. rst-class:: classref-method diff --git a/classes/class_editorscript.rst b/classes/class_editorscript.rst index 63765d10973..5f8b9e7b068 100644 --- a/classes/class_editorscript.rst +++ b/classes/class_editorscript.rst @@ -23,7 +23,7 @@ Scripts extending this class and implementing its :ref:`_run` | :ref:`debugger/auto_switch_to_remote_scene_tree` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`debugger/auto_switch_to_stack_trace` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`debugger/profile_native_calls` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`debugger/profiler_frame_history_size` | @@ -189,6 +191,8 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`editors/3d/navigation_feel/translation_inertia` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`editors/3d/navigation_feel/translation_sensitivity` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`editors/3d/navigation_feel/zoom_inertia` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`editors/3d/primary_grid_color` | @@ -725,6 +729,8 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`text_editor/completion/idle_parse_delay` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`text_editor/completion/idle_parse_delay_with_errors_found` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`text_editor/completion/put_callhint_tooltip_below_current_line` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`text_editor/completion/use_single_quotes` | @@ -961,6 +967,18 @@ If ``true``, automatically switches to the **Remote** scene tree when running th ---- +.. _class_EditorSettings_property_debugger/auto_switch_to_stack_trace: + +.. rst-class:: classref-property + +:ref:`bool` **debugger/auto_switch_to_stack_trace** :ref:`๐Ÿ”—` + +If ``true``, automatically switches to the **Stack Trace** panel when the debugger hits a breakpoint or steps. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_debugger/profile_native_calls: .. rst-class:: classref-property @@ -1615,7 +1633,7 @@ If ``true``, invert the vertical mouse axis when panning, orbiting, or using fre :ref:`int` **editors/3d/navigation/navigation_scheme** :ref:`๐Ÿ”—` -The navigation scheme preset to use in the 3D editor. Changing this setting will affect the mouse button and modifier controls used to navigate the 3D editor viewport. +The navigation scheme preset to use in the 3D editor. Changing this setting will affect the mouse button and modifier keys used to navigate the 3D editor viewport. All schemes can use :kbd:`Mouse wheel` to zoom. @@ -1625,7 +1643,9 @@ All schemes can use :kbd:`Mouse wheel` to zoom. - **Modo:** :kbd:`Alt + Left mouse button` to orbit. :kbd:`Alt + Shift + Left mouse button` to pan. :kbd:`Ctrl + Alt + Left mouse button` to zoom. -See also :ref:`editors/3d/navigation/orbit_mouse_button`, :ref:`editors/3d/navigation/pan_mouse_button`, :ref:`editors/3d/navigation/zoom_mouse_button`, and :ref:`editors/3d/freelook/freelook_navigation_scheme`. +- **Tablet/Trackpad:** :kbd:`Alt` to orbit. :kbd:`Shift` to pan. :kbd:`Ctrl` to zoom. Enables 3-button mouse emulation mode. + +See also :ref:`editors/3d/navigation/orbit_mouse_button`, :ref:`editors/3d/navigation/pan_mouse_button`, :ref:`editors/3d/navigation/zoom_mouse_button`, :ref:`editors/3d/freelook/freelook_navigation_scheme`, and :ref:`editors/3d/navigation/emulate_3_button_mouse`. \ **Note:** On certain window managers on Linux, the :kbd:`Alt` key will be intercepted by the window manager when clicking a mouse button at the same time. This means Redot will not see the modifier key as being pressed. @@ -1753,6 +1773,18 @@ The inertia to use when panning in the 3D editor. Higher values make the camera ---- +.. _class_EditorSettings_property_editors/3d/navigation_feel/translation_sensitivity: + +.. rst-class:: classref-property + +:ref:`float` **editors/3d/navigation_feel/translation_sensitivity** :ref:`๐Ÿ”—` + +The mouse sensitivity to use when panning in the 3D editor. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_editors/3d/navigation_feel/zoom_inertia: .. rst-class:: classref-property @@ -4181,7 +4213,7 @@ The editor theme spacing preset to use. See also :ref:`interface/theme/base_spac If ``true``, set accent color based on system settings. -\ **Note:** This setting is only effective on Windows and MacOS. +\ **Note:** This setting is only effective on Windows, MacOS, and Android. .. rst-class:: classref-item-separator @@ -5107,7 +5139,7 @@ If ``true``, adds :doc:`GDScript static typing <../tutorials/scripting/gdscript/ :ref:`bool` **text_editor/completion/auto_brace_complete** :ref:`๐Ÿ”—` -If ``true``, automatically completes braces when making use of code completion. +If ``true``, automatically inserts the matching closing brace when the opening brace is inserted by typing or autocompletion. Also automatically removes the closing brace when pressing :kbd:`Backspace` on the opening brace. This includes brackets (``()``, ``[]``, ``{}``), string quotation marks (``''``, ``""``), and comments (``/**/``) if the language supports it. .. rst-class:: classref-item-separator @@ -5173,6 +5205,18 @@ The delay in seconds after which the script editor should check for errors when ---- +.. _class_EditorSettings_property_text_editor/completion/idle_parse_delay_with_errors_found: + +.. rst-class:: classref-property + +:ref:`float` **text_editor/completion/idle_parse_delay_with_errors_found** :ref:`๐Ÿ”—` + +The delay used instead of :ref:`text_editor/completion/idle_parse_delay`, when the parser has found errors. A lower value should feel more responsive while fixing code, but may cause notable stuttering and increase CPU usage. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_text_editor/completion/put_callhint_tooltip_below_current_line: .. rst-class:: classref-property diff --git a/classes/class_editorspinslider.rst b/classes/class_editorspinslider.rst index 9a18957a1ad..90da8882eac 100644 --- a/classes/class_editorspinslider.rst +++ b/classes/class_editorspinslider.rst @@ -96,6 +96,18 @@ Emitted when the spinner/slider is ungrabbed. ---- +.. _class_EditorSpinSlider_signal_updown_pressed: + +.. rst-class:: classref-signal + +**updown_pressed**\ (\ ) :ref:`๐Ÿ”—` + +Emitted when the updown button is pressed. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSpinSlider_signal_value_focus_entered: .. rst-class:: classref-signal diff --git a/classes/class_enetconnection.rst b/classes/class_enetconnection.rst index 92a44bb6efd..470c7fa6fca 100644 --- a/classes/class_enetconnection.rst +++ b/classes/class_enetconnection.rst @@ -344,7 +344,7 @@ Destroys the host and all resources associated with it. :ref:`Error` **dtls_client_setup**\ (\ hostname\: :ref:`String`, client_options\: :ref:`TLSOptions` = null\ ) :ref:`๐Ÿ”—` -Configure this ENetHost to use the custom Godot extension allowing DTLS encryption for ENet clients. Call this before :ref:`connect_to_host` to have ENet connect using DTLS validating the server certificate against ``hostname``. You can pass the optional ``client_options`` parameter to customize the trusted certification authorities, or disable the common name verification. See :ref:`TLSOptions.client` and :ref:`TLSOptions.client_unsafe`. +Configure this ENetHost to use the custom Redot extension allowing DTLS encryption for ENet clients. Call this before :ref:`connect_to_host` to have ENet connect using DTLS validating the server certificate against ``hostname``. You can pass the optional ``client_options`` parameter to customize the trusted certification authorities, or disable the common name verification. See :ref:`TLSOptions.client` and :ref:`TLSOptions.client_unsafe`. .. rst-class:: classref-item-separator @@ -356,7 +356,7 @@ Configure this ENetHost to use the custom Godot extension allowing DTLS encrypti :ref:`Error` **dtls_server_setup**\ (\ server_options\: :ref:`TLSOptions`\ ) :ref:`๐Ÿ”—` -Configure this ENetHost to use the custom Godot extension allowing DTLS encryption for ENet servers. Call this right after :ref:`create_host_bound` to have ENet expect peers to connect using DTLS. See :ref:`TLSOptions.server`. +Configure this ENetHost to use the custom Redot extension allowing DTLS encryption for ENet servers. Call this right after :ref:`create_host_bound` to have ENet expect peers to connect using DTLS. See :ref:`TLSOptions.server`. .. rst-class:: classref-item-separator diff --git a/classes/class_engine.rst b/classes/class_engine.rst index 5a7403c211f..d92ced63b95 100644 --- a/classes/class_engine.rst +++ b/classes/class_engine.rst @@ -100,6 +100,8 @@ Methods +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_editor_hint`\ (\ ) |const| | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_embedded_in_editor`\ (\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_in_physics_frame`\ (\ ) |const| | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`register_script_language`\ (\ language\: :ref:`ScriptLanguage`\ ) | @@ -286,26 +288,7 @@ Method Descriptions Returns the name of the CPU architecture the Redot binary was built for. Possible return values include ``"x86_64"``, ``"x86_32"``, ``"arm64"``, ``"arm32"``, ``"rv64"``, ``"riscv"``, ``"ppc64"``, ``"ppc"``, ``"wasm64"``, and ``"wasm32"``. -To detect whether the current build is 64-bit, you can use the fact that all 64-bit architecture names contain ``64`` in their name: - - -.. tabs:: - - .. code-tab:: gdscript - - if "64" in Engine.get_architecture_name(): - print("Running a 64-bit build of Redot.") - else: - print("Running a 32-bit build of Redot.") - - .. code-tab:: csharp - - if (Engine.GetArchitectureName().Contains("64")) - GD.Print("Running a 64-bit build of Redot."); - else - GD.Print("Running a 32-bit build of Redot."); - - +To detect whether the current build is 64-bit, or the type of architecture, don't use the architecture name. Instead, use :ref:`OS.has_feature` to check for the ``"64"`` feature tag, or tags such as ``"x86"`` or ``"arm"``. See the :doc:`Feature Tags <../tutorials/export/feature_tags>` documentation for more details. \ **Note:** This method does *not* return the name of the system's CPU architecture (like :ref:`OS.get_processor_name`). For example, when running an ``x86_32`` Redot binary on an ``x86_64`` system, the returned value will still be ``"x86_32"``. @@ -411,7 +394,7 @@ See also :ref:`get_author_info` for Redot's :ref:`Dictionary` **get_godot_compatible_version_info**\ (\ ) |const| :ref:`๐Ÿ”—` -Returns the current engine minimal version compatibility info in relation to Redot as a :ref:`Dictionary` containing the following entries: +Returns the current engine minimal version compatibility info in relation to Godot as a :ref:`Dictionary` containing the following entries: - ``major`` - Major version number as an int; @@ -741,10 +724,10 @@ Returns ``true`` if a singleton with the given ``name`` exists in the global sco .. code-tab:: csharp - GD.Print(Engine.HasSingleton("OS")); // Prints true - GD.Print(Engine.HasSingleton("Engine")); // Prints true - GD.Print(Engine.HasSingleton("AudioServer")); // Prints true - GD.Print(Engine.HasSingleton("Unknown")); // Prints false + GD.Print(Engine.HasSingleton("OS")); // Prints True + GD.Print(Engine.HasSingleton("Engine")); // Prints True + GD.Print(Engine.HasSingleton("AudioServer")); // Prints True + GD.Print(Engine.HasSingleton("Unknown")); // Prints False @@ -789,6 +772,18 @@ See :doc:`Running code in the editor <../tutorials/plugins/running_code_in_the_e ---- +.. _class_Engine_method_is_embedded_in_editor: + +.. rst-class:: classref-method + +:ref:`bool` **is_embedded_in_editor**\ (\ ) |const| :ref:`๐Ÿ”—` + +Returns ``true`` if the engine is running embedded in the editor. This is useful to prevent attempting to update window mode or window flags that are not supported when running the project embedded in the editor. + +.. rst-class:: classref-item-separator + +---- + .. _class_Engine_method_is_in_physics_frame: .. rst-class:: classref-method diff --git a/classes/class_fileaccess.rst b/classes/class_fileaccess.rst index 37e290f9dae..3935083d922 100644 --- a/classes/class_fileaccess.rst +++ b/classes/class_fileaccess.rst @@ -19,7 +19,7 @@ Provides methods for file reading and writing operations. Description ----------- -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. +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 storing game save data or player configuration files. Here's a sample on how to write and read from a file: @@ -96,6 +96,8 @@ Methods +-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`close`\ (\ ) | +-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`FileAccess` | :ref:`create_temp`\ (\ mode_flags\: :ref:`int`, prefix\: :ref:`String` = "", extension\: :ref:`String` = "", keep\: :ref:`bool` = false\ ) |static| | + +-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`eof_reached`\ (\ ) |const| | +-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`file_exists`\ (\ path\: :ref:`String`\ ) |static| | @@ -126,6 +128,8 @@ Methods +-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_float`\ (\ ) |const| | +-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_half`\ (\ ) |const| | + +-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`get_hidden_attribute`\ (\ file\: :ref:`String`\ ) |static| | +-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_length`\ (\ ) |const| | @@ -178,31 +182,33 @@ Methods +-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`set_unix_permissions`\ (\ file\: :ref:`String`, permissions\: |bitfield|\[:ref:`UnixPermissionFlags`\]\ ) |static| | +-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`store_8`\ (\ value\: :ref:`int`\ ) | + | :ref:`bool` | :ref:`store_8`\ (\ value\: :ref:`int`\ ) | + +-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`store_16`\ (\ value\: :ref:`int`\ ) | +-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`store_16`\ (\ value\: :ref:`int`\ ) | + | :ref:`bool` | :ref:`store_32`\ (\ value\: :ref:`int`\ ) | +-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`store_32`\ (\ value\: :ref:`int`\ ) | + | :ref:`bool` | :ref:`store_64`\ (\ value\: :ref:`int`\ ) | +-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`store_64`\ (\ value\: :ref:`int`\ ) | + | :ref:`bool` | :ref:`store_buffer`\ (\ buffer\: :ref:`PackedByteArray`\ ) | +-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`store_buffer`\ (\ buffer\: :ref:`PackedByteArray`\ ) | + | :ref:`bool` | :ref:`store_csv_line`\ (\ values\: :ref:`PackedStringArray`, delim\: :ref:`String` = ","\ ) | +-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`store_csv_line`\ (\ values\: :ref:`PackedStringArray`, delim\: :ref:`String` = ","\ ) | + | :ref:`bool` | :ref:`store_double`\ (\ value\: :ref:`float`\ ) | +-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`store_double`\ (\ value\: :ref:`float`\ ) | + | :ref:`bool` | :ref:`store_float`\ (\ value\: :ref:`float`\ ) | +-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`store_float`\ (\ value\: :ref:`float`\ ) | + | :ref:`bool` | :ref:`store_half`\ (\ value\: :ref:`float`\ ) | +-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`store_line`\ (\ line\: :ref:`String`\ ) | + | :ref:`bool` | :ref:`store_line`\ (\ line\: :ref:`String`\ ) | +-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`store_pascal_string`\ (\ string\: :ref:`String`\ ) | + | :ref:`bool` | :ref:`store_pascal_string`\ (\ string\: :ref:`String`\ ) | +-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`store_real`\ (\ value\: :ref:`float`\ ) | + | :ref:`bool` | :ref:`store_real`\ (\ value\: :ref:`float`\ ) | +-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`store_string`\ (\ string\: :ref:`String`\ ) | + | :ref:`bool` | :ref:`store_string`\ (\ string\: :ref:`String`\ ) | +-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`store_var`\ (\ value\: :ref:`Variant`, full_objects\: :ref:`bool` = false\ ) | + | :ref:`bool` | :ref:`store_var`\ (\ value\: :ref:`Variant`, full_objects\: :ref:`bool` = false\ ) | +-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -461,6 +467,26 @@ Closes the currently opened file and prevents subsequent read/write operations. ---- +.. _class_FileAccess_method_create_temp: + +.. rst-class:: classref-method + +:ref:`FileAccess` **create_temp**\ (\ mode_flags\: :ref:`int`, prefix\: :ref:`String` = "", extension\: :ref:`String` = "", keep\: :ref:`bool` = false\ ) |static| :ref:`๐Ÿ”—` + +Creates a temporary file. This file will be freed when the returned **FileAccess** is freed. + +If ``prefix`` is not empty, it will be prefixed to the file name, separated by a ``-``. + +If ``extension`` is not empty, it will be appended to the temporary file name. + +If ``keep`` is ``true``, the file is not deleted when the returned **FileAccess** is freed. + +Returns ``null`` if opening the file failed. You can use :ref:`get_open_error` to check the error that occurred. + +.. rst-class:: classref-item-separator + +---- + .. _class_FileAccess_method_eof_reached: .. rst-class:: classref-method @@ -684,6 +710,18 @@ Returns the next 32 bits from the file as a floating-point number. ---- +.. _class_FileAccess_method_get_half: + +.. rst-class:: classref-method + +:ref:`float` **get_half**\ (\ ) |const| :ref:`๐Ÿ”—` + +Returns the next 16 bits from the file as a half-precision floating-point number. + +.. rst-class:: classref-item-separator + +---- + .. _class_FileAccess_method_get_hidden_attribute: .. rst-class:: classref-method @@ -1034,12 +1072,14 @@ Sets file UNIX permissions. .. rst-class:: classref-method -|void| **store_8**\ (\ value\: :ref:`int`\ ) :ref:`๐Ÿ”—` +:ref:`bool` **store_8**\ (\ value\: :ref:`int`\ ) :ref:`๐Ÿ”—` 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. +\ **Note:** If an error occurs, the resulting value of the file position indicator is indeterminate. + To store a signed integer, use :ref:`store_64`, or convert it manually (see :ref:`store_16` for an example). .. rst-class:: classref-item-separator @@ -1050,12 +1090,14 @@ To store a signed integer, use :ref:`store_64` .. rst-class:: classref-method -|void| **store_16**\ (\ value\: :ref:`int`\ ) :ref:`๐Ÿ”—` +:ref:`bool` **store_16**\ (\ value\: :ref:`int`\ ) :ref:`๐Ÿ”—` Stores an integer as 16 bits in the file. \ **Note:** The ``value`` should lie in the interval ``[0, 2^16 - 1]``. Any other value will overflow and wrap around. +\ **Note:** If an error occurs, the resulting value of the file position indicator is indeterminate. + To store a signed integer, use :ref:`store_64` or store a signed integer from the interval ``[-2^15, 2^15 - 1]`` (i.e. keeping one bit for the signedness) and compute its sign manually when reading. For example: @@ -1103,12 +1145,14 @@ To store a signed integer, use :ref:`store_64` .. rst-class:: classref-method -|void| **store_32**\ (\ value\: :ref:`int`\ ) :ref:`๐Ÿ”—` +:ref:`bool` **store_32**\ (\ value\: :ref:`int`\ ) :ref:`๐Ÿ”—` Stores an integer as 32 bits in the file. \ **Note:** The ``value`` should lie in the interval ``[0, 2^32 - 1]``. Any other value will overflow and wrap around. +\ **Note:** If an error occurs, the resulting value of the file position indicator is indeterminate. + To store a signed integer, use :ref:`store_64`, or convert it manually (see :ref:`store_16` for an example). .. rst-class:: classref-item-separator @@ -1119,12 +1163,14 @@ To store a signed integer, use :ref:`store_64` .. rst-class:: classref-method -|void| **store_64**\ (\ value\: :ref:`int`\ ) :ref:`๐Ÿ”—` +:ref:`bool` **store_64**\ (\ value\: :ref:`int`\ ) :ref:`๐Ÿ”—` Stores an integer as 64 bits in the file. \ **Note:** The ``value`` must lie in the interval ``[-2^63, 2^63 - 1]`` (i.e. be a valid :ref:`int` value). +\ **Note:** If an error occurs, the resulting value of the file position indicator is indeterminate. + .. rst-class:: classref-item-separator ---- @@ -1133,10 +1179,12 @@ Stores an integer as 64 bits in the file. .. rst-class:: classref-method -|void| **store_buffer**\ (\ buffer\: :ref:`PackedByteArray`\ ) :ref:`๐Ÿ”—` +:ref:`bool` **store_buffer**\ (\ buffer\: :ref:`PackedByteArray`\ ) :ref:`๐Ÿ”—` Stores the given array of bytes in the file. +\ **Note:** If an error occurs, the resulting value of the file position indicator is indeterminate. + .. rst-class:: classref-item-separator ---- @@ -1145,12 +1193,14 @@ Stores the given array of bytes in the file. .. rst-class:: classref-method -|void| **store_csv_line**\ (\ values\: :ref:`PackedStringArray`, delim\: :ref:`String` = ","\ ) :ref:`๐Ÿ”—` +:ref:`bool` **store_csv_line**\ (\ values\: :ref:`PackedStringArray`, delim\: :ref:`String` = ","\ ) :ref:`๐Ÿ”—` Store the given :ref:`PackedStringArray` in the file as a line formatted in the CSV (Comma-Separated Values) format. You can pass a different delimiter ``delim`` to use other than the default ``","`` (comma). This delimiter must be one-character long. Text will be encoded as UTF-8. +\ **Note:** If an error occurs, the resulting value of the file position indicator is indeterminate. + .. rst-class:: classref-item-separator ---- @@ -1159,10 +1209,12 @@ Text will be encoded as UTF-8. .. rst-class:: classref-method -|void| **store_double**\ (\ value\: :ref:`float`\ ) :ref:`๐Ÿ”—` +:ref:`bool` **store_double**\ (\ value\: :ref:`float`\ ) :ref:`๐Ÿ”—` Stores a floating-point number as 64 bits in the file. +\ **Note:** If an error occurs, the resulting value of the file position indicator is indeterminate. + .. rst-class:: classref-item-separator ---- @@ -1171,10 +1223,24 @@ Stores a floating-point number as 64 bits in the file. .. rst-class:: classref-method -|void| **store_float**\ (\ value\: :ref:`float`\ ) :ref:`๐Ÿ”—` +:ref:`bool` **store_float**\ (\ value\: :ref:`float`\ ) :ref:`๐Ÿ”—` Stores a floating-point number as 32 bits in the file. +\ **Note:** If an error occurs, the resulting value of the file position indicator is indeterminate. + +.. rst-class:: classref-item-separator + +---- + +.. _class_FileAccess_method_store_half: + +.. rst-class:: classref-method + +:ref:`bool` **store_half**\ (\ value\: :ref:`float`\ ) :ref:`๐Ÿ”—` + +Stores a half-precision floating-point number as 16 bits in the file. + .. rst-class:: classref-item-separator ---- @@ -1183,10 +1249,12 @@ Stores a floating-point number as 32 bits in the file. .. rst-class:: classref-method -|void| **store_line**\ (\ line\: :ref:`String`\ ) :ref:`๐Ÿ”—` +:ref:`bool` **store_line**\ (\ line\: :ref:`String`\ ) :ref:`๐Ÿ”—` Stores ``line`` in the file followed by a newline character (``\n``), encoding the text as UTF-8. +\ **Note:** If an error occurs, the resulting value of the file position indicator is indeterminate. + .. rst-class:: classref-item-separator ---- @@ -1195,12 +1263,14 @@ Stores ``line`` in the file followed by a newline character (``\n``), encoding t .. rst-class:: classref-method -|void| **store_pascal_string**\ (\ string\: :ref:`String`\ ) :ref:`๐Ÿ”—` +:ref:`bool` **store_pascal_string**\ (\ string\: :ref:`String`\ ) :ref:`๐Ÿ”—` Stores the given :ref:`String` as a line in the file in Pascal format (i.e. also store the length of the string). Text will be encoded as UTF-8. +\ **Note:** If an error occurs, the resulting value of the file position indicator is indeterminate. + .. rst-class:: classref-item-separator ---- @@ -1209,10 +1279,12 @@ Text will be encoded as UTF-8. .. rst-class:: classref-method -|void| **store_real**\ (\ value\: :ref:`float`\ ) :ref:`๐Ÿ”—` +:ref:`bool` **store_real**\ (\ value\: :ref:`float`\ ) :ref:`๐Ÿ”—` Stores a floating-point number in the file. +\ **Note:** If an error occurs, the resulting value of the file position indicator is indeterminate. + .. rst-class:: classref-item-separator ---- @@ -1221,12 +1293,14 @@ Stores a floating-point number in the file. .. rst-class:: classref-method -|void| **store_string**\ (\ string\: :ref:`String`\ ) :ref:`๐Ÿ”—` +:ref:`bool` **store_string**\ (\ string\: :ref:`String`\ ) :ref:`๐Ÿ”—` Stores ``string`` in the file without a newline character (``\n``), encoding the text as UTF-8. \ **Note:** This method is intended to be used to write text files. The string is stored as a UTF-8 encoded buffer without string length or terminating zero, which means that it can't be loaded back easily. If you want to store a retrievable string in a binary file, consider using :ref:`store_pascal_string` instead. For retrieving strings from a text file, you can use ``get_buffer(length).get_string_from_utf8()`` (if you know the length) or :ref:`get_as_text`. +\ **Note:** If an error occurs, the resulting value of the file position indicator is indeterminate. + .. rst-class:: classref-item-separator ---- @@ -1235,7 +1309,7 @@ Stores ``string`` in the file without a newline character (``\n``), encoding the .. rst-class:: classref-method -|void| **store_var**\ (\ value\: :ref:`Variant`, full_objects\: :ref:`bool` = false\ ) :ref:`๐Ÿ”—` +:ref:`bool` **store_var**\ (\ value\: :ref:`Variant`, full_objects\: :ref:`bool` = false\ ) :ref:`๐Ÿ”—` Stores any Variant value in the file. If ``full_objects`` is ``true``, encoding objects is allowed (and can potentially include code). @@ -1243,6 +1317,8 @@ Internally, this uses the same encoding mechanism as the :ref:`@GlobalScope.var_ \ **Note:** Not all properties are included. Only properties that are configured with the :ref:`@GlobalScope.PROPERTY_USAGE_STORAGE` flag set will be serialized. You can add a new usage flag to a property by overriding the :ref:`Object._get_property_list` method in your class. You can also check how property usage is configured by calling :ref:`Object._get_property_list`. See :ref:`PropertyUsageFlags` for the possible usage flags. +\ **Note:** If an error occurs, the resulting value of the file position indicator is indeterminate. + .. |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_float.rst b/classes/class_float.rst index 9dc6dba6a92..34a5fbf478a 100644 --- a/classes/class_float.rst +++ b/classes/class_float.rst @@ -272,7 +272,7 @@ Multiplies each component of the :ref:`Vector2i` by the given ** :: - print(0.9 * Vector2i(10, 15)) # Prints "(9, 13.5)" + print(0.9 * Vector2i(10, 15)) # Prints (9.0, 13.5) .. rst-class:: classref-item-separator @@ -300,7 +300,7 @@ Multiplies each component of the :ref:`Vector3i` by the given ** :: - print(0.9 * Vector3i(10, 15, 20)) # Prints "(9, 13.5, 18)" + print(0.9 * Vector3i(10, 15, 20)) # Prints (9.0, 13.5, 18.0) .. rst-class:: classref-item-separator @@ -328,7 +328,7 @@ Multiplies each component of the :ref:`Vector4i` by the given ** :: - print(0.9 * Vector4i(10, 15, 20, -10)) # Prints "(9, 13.5, 18, -9)" + print(0.9 * Vector4i(10, 15, 20, -10)) # Prints (9.0, 13.5, 18.0, -9.0) .. rst-class:: classref-item-separator diff --git a/classes/class_fontfile.rst b/classes/class_fontfile.rst index 5bb0c08d8b2..9d4a0e4ead7 100644 --- a/classes/class_fontfile.rst +++ b/classes/class_fontfile.rst @@ -98,6 +98,8 @@ Properties +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`Hinting` | :ref:`hinting` | ``1`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`keep_rounding_remainders` | ``true`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`int` | :ref:`msdf_pixel_range` | ``16`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`int` | :ref:`msdf_size` | ``48`` | @@ -489,6 +491,23 @@ Font hinting mode. Used by dynamic fonts only. ---- +.. _class_FontFile_property_keep_rounding_remainders: + +.. rst-class:: classref-property + +:ref:`bool` **keep_rounding_remainders** = ``true`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_keep_rounding_remainders**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_keep_rounding_remainders**\ (\ ) + +If set to ``true``, when aligning glyphs to the pixel boundaries rounding remainders are accumulated to ensure more uniform glyph distribution. This setting has no effect if subpixel positioning is enabled. + +.. rst-class:: classref-item-separator + +---- + .. _class_FontFile_property_msdf_pixel_range: .. rst-class:: classref-property diff --git a/classes/class_geometry2d.rst b/classes/class_geometry2d.rst index 5f023867d15..46b315af6f1 100644 --- a/classes/class_geometry2d.rst +++ b/classes/class_geometry2d.rst @@ -496,14 +496,14 @@ The operation may result in an outer polygon (boundary) and inner polygon (hole) var polygon = PackedVector2Array([Vector2(0, 0), Vector2(100, 0), Vector2(100, 100), Vector2(0, 100)]) var offset = Vector2(50, 50) polygon = Transform2D(0, offset) * polygon - print(polygon) # prints [(50, 50), (150, 50), (150, 150), (50, 150)] + print(polygon) # Prints [(50.0, 50.0), (150.0, 50.0), (150.0, 150.0), (50.0, 150.0)] .. code-tab:: csharp var polygon = new Vector2[] { new Vector2(0, 0), new Vector2(100, 0), new Vector2(100, 100), new Vector2(0, 100) }; var offset = new Vector2(50, 50); polygon = new Transform2D(0, offset) * polygon; - GD.Print((Variant)polygon); // prints [(50, 50), (150, 50), (150, 150), (50, 150)] + GD.Print((Variant)polygon); // Prints [(50, 50), (150, 50), (150, 150), (50, 150)] diff --git a/classes/class_geometry3d.rst b/classes/class_geometry3d.rst index 527c1158a2b..cc7b5792ab7 100644 --- a/classes/class_geometry3d.rst +++ b/classes/class_geometry3d.rst @@ -32,9 +32,9 @@ Methods +--------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`Plane`\] | :ref:`build_box_planes`\ (\ extents\: :ref:`Vector3`\ ) | +--------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`Plane`\] | :ref:`build_capsule_planes`\ (\ radius\: :ref:`float`, height\: :ref:`float`, sides\: :ref:`int`, lats\: :ref:`int`, axis\: Vector3.Axis = 2\ ) | + | :ref:`Array`\[:ref:`Plane`\] | :ref:`build_capsule_planes`\ (\ radius\: :ref:`float`, height\: :ref:`float`, sides\: :ref:`int`, lats\: :ref:`int`, axis\: :ref:`Axis` = 2\ ) | +--------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`Plane`\] | :ref:`build_cylinder_planes`\ (\ radius\: :ref:`float`, height\: :ref:`float`, sides\: :ref:`int`, axis\: Vector3.Axis = 2\ ) | + | :ref:`Array`\[:ref:`Plane`\] | :ref:`build_cylinder_planes`\ (\ radius\: :ref:`float`, height\: :ref:`float`, sides\: :ref:`int`, axis\: :ref:`Axis` = 2\ ) | +--------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedVector3Array` | :ref:`clip_polygon`\ (\ points\: :ref:`PackedVector3Array`, plane\: :ref:`Plane`\ ) | +--------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -86,7 +86,7 @@ Returns an array with 6 :ref:`Plane`\ s that describe the sides of .. rst-class:: classref-method -:ref:`Array`\[:ref:`Plane`\] **build_capsule_planes**\ (\ radius\: :ref:`float`, height\: :ref:`float`, sides\: :ref:`int`, lats\: :ref:`int`, axis\: Vector3.Axis = 2\ ) :ref:`๐Ÿ”—` +:ref:`Array`\[:ref:`Plane`\] **build_capsule_planes**\ (\ radius\: :ref:`float`, height\: :ref:`float`, sides\: :ref:`int`, lats\: :ref:`int`, axis\: :ref:`Axis` = 2\ ) :ref:`๐Ÿ”—` Returns an array of :ref:`Plane`\ s closely bounding a faceted capsule centered at the origin with radius ``radius`` and height ``height``. The parameter ``sides`` defines how many planes will be generated for the side part of the capsule, whereas ``lats`` gives the number of latitudinal steps at the bottom and top of the capsule. The parameter ``axis`` describes the axis along which the capsule is oriented (0 for X, 1 for Y, 2 for Z). @@ -98,7 +98,7 @@ Returns an array of :ref:`Plane`\ s closely bounding a faceted caps .. rst-class:: classref-method -:ref:`Array`\[:ref:`Plane`\] **build_cylinder_planes**\ (\ radius\: :ref:`float`, height\: :ref:`float`, sides\: :ref:`int`, axis\: Vector3.Axis = 2\ ) :ref:`๐Ÿ”—` +:ref:`Array`\[:ref:`Plane`\] **build_cylinder_planes**\ (\ radius\: :ref:`float`, height\: :ref:`float`, sides\: :ref:`int`, axis\: :ref:`Axis` = 2\ ) :ref:`๐Ÿ”—` Returns an array of :ref:`Plane`\ s closely bounding a faceted cylinder centered at the origin with radius ``radius`` and height ``height``. The parameter ``sides`` defines how many planes will be generated for the round part of the cylinder. The parameter ``axis`` describes the axis along which the cylinder is oriented (0 for X, 1 for Y, 2 for Z). diff --git a/classes/class_geometryinstance3d.rst b/classes/class_geometryinstance3d.rst index 29ff823f8c1..3ac580850b1 100644 --- a/classes/class_geometryinstance3d.rst +++ b/classes/class_geometryinstance3d.rst @@ -605,7 +605,7 @@ Set the value of a shader uniform for this instance only (`per-instance uniform \ **Note:** ``name`` is case-sensitive and must match the name of the uniform in the code exactly (not the capitalized name in the inspector). -\ **Note:** Per-instance shader uniforms are currently only available in 3D, so there is no 2D equivalent of this method. +\ **Note:** Per-instance shader uniforms are only available in Spatial and CanvasItem shaders, but not for Fog, Sky, or Particles shaders. .. |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_gltfcamera.rst b/classes/class_gltfcamera.rst index a9618d31411..c890557ac8d 100644 --- a/classes/class_gltfcamera.rst +++ b/classes/class_gltfcamera.rst @@ -124,7 +124,7 @@ The distance to the near culling boundary for this camera relative to its local - |void| **set_fov**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_fov**\ (\ ) -The FOV of the camera. This class and glTF define the camera FOV in radians, while Godot uses degrees. This maps to glTF's ``yfov`` property. This value is only used for perspective cameras, when :ref:`perspective` is ``true``. +The FOV of the camera. This class and glTF define the camera FOV in radians, while Redot uses degrees. This maps to glTF's ``yfov`` property. This value is only used for perspective cameras, when :ref:`perspective` is ``true``. .. rst-class:: classref-item-separator @@ -158,7 +158,7 @@ If ``true``, the camera is in perspective mode. Otherwise, the camera is in orth - |void| **set_size_mag**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_size_mag**\ (\ ) -The size of the camera. This class and glTF define the camera size magnitude as a radius in meters, while Godot defines it as a diameter in meters. This maps to glTF's ``ymag`` property. This value is only used for orthographic/orthogonal cameras, when :ref:`perspective` is ``false``. +The size of the camera. This class and glTF define the camera size magnitude as a radius in meters, while Redot defines it as a diameter in meters. This maps to glTF's ``ymag`` property. This value is only used for orthographic/orthogonal cameras, when :ref:`perspective` is ``false``. .. rst-class:: classref-section-separator @@ -187,7 +187,7 @@ Creates a new GLTFCamera instance by parsing the given :ref:`Dictionary` **from_node**\ (\ camera_node\: :ref:`Camera3D`\ ) |static| :ref:`๐Ÿ”—` -Create a new GLTFCamera instance from the given Godot :ref:`Camera3D` node. +Create a new GLTFCamera instance from the given Redot :ref:`Camera3D` node. .. rst-class:: classref-item-separator @@ -211,7 +211,7 @@ Serializes this GLTFCamera instance into a :ref:`Dictionary`. :ref:`Camera3D` **to_node**\ (\ ) |const| :ref:`๐Ÿ”—` -Converts this GLTFCamera instance into a Godot :ref:`Camera3D` node. +Converts this GLTFCamera instance into a Redot :ref:`Camera3D` 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_gltfdocument.rst b/classes/class_gltfdocument.rst index a0afa07e684..c3a3c45d7d9 100644 --- a/classes/class_gltfdocument.rst +++ b/classes/class_gltfdocument.rst @@ -14,14 +14,14 @@ GLTFDocument **Inherited By:** :ref:`FBXDocument` -Class for importing and exporting glTF files in and out of Godot. +Class for importing and exporting glTF files in and out of Redot. .. rst-class:: classref-introduction-group Description ----------- -GLTFDocument supports reading data from a glTF file, buffer, or Godot scene. This data can then be written to the filesystem, buffer, or used to create a Godot scene. +GLTFDocument supports reading data from a glTF file, buffer, or Redot scene. This data can then be written to the filesystem, buffer, or used to create a Redot scene. All of the data in a glTF scene is stored in the :ref:`GLTFState` class. GLTFDocument processes state objects, but does not contain any scene data itself. GLTFDocument has member variables to store export configuration settings such as the image format, but is otherwise stateless. Multiple scenes can be processed with the same settings using the same GLTFDocument object and different :ref:`GLTFState` objects. @@ -107,7 +107,7 @@ enum **RootNodeMode**: :ref:`๐Ÿ”—` :ref:`RootNodeMode` **ROOT_NODE_MODE_SINGLE_ROOT** = ``0`` -Treat the Godot scene's root node as the root node of the glTF file, and mark it as the single root node via the ``GODOT_single_root`` glTF extension. This will be parsed the same as :ref:`ROOT_NODE_MODE_KEEP_ROOT` if the implementation does not support ``GODOT_single_root``. +Treat the Redot scene's root node as the root node of the glTF file, and mark it as the single root node via the ``GODOT_single_root`` glTF extension. This will be parsed the same as :ref:`ROOT_NODE_MODE_KEEP_ROOT` if the implementation does not support ``GODOT_single_root``. .. _class_GLTFDocument_constant_ROOT_NODE_MODE_KEEP_ROOT: @@ -115,7 +115,7 @@ Treat the Godot scene's root node as the root node of the glTF file, and mark it :ref:`RootNodeMode` **ROOT_NODE_MODE_KEEP_ROOT** = ``1`` -Treat the Godot scene's root node as the root node of the glTF file, but do not mark it as anything special. An extra root node will be generated when importing into Godot. This uses only vanilla glTF features. This is equivalent to the behavior in Godot 4.1 and earlier. +Treat the Redot scene's root node as the root node of the glTF file, but do not mark it as anything special. An extra root node will be generated when importing into Redot. This uses only vanilla glTF features. This is equivalent to the behavior in Redot 4.1 and earlier. .. _class_GLTFDocument_constant_ROOT_NODE_MODE_MULTI_ROOT: @@ -123,7 +123,7 @@ Treat the Godot scene's root node as the root node of the glTF file, but do not :ref:`RootNodeMode` **ROOT_NODE_MODE_MULTI_ROOT** = ``2`` -Treat the Godot scene's root node as the name of the glTF scene, and add all of its children as root nodes of the glTF file. This uses only vanilla glTF features. This avoids an extra root node, but only the name of the Godot scene's root node will be preserved, as it will not be saved as a node. +Treat the Redot scene's root node as the name of the glTF scene, and add all of its children as root nodes of the glTF file. This uses only vanilla glTF features. This avoids an extra root node, but only the name of the Redot scene's root node will be preserved, as it will not be saved as a node. .. rst-class:: classref-section-separator @@ -147,7 +147,7 @@ Property Descriptions The user-friendly name of the export image format. This is used when exporting the glTF file, including writing to a file and writing to a byte array. -By default, Godot allows the following options: "None", "PNG", "JPEG", "Lossless WebP", and "Lossy WebP". Support for more image formats can be added in :ref:`GLTFDocumentExtension` classes. +By default, Redot allows the following options: "None", "PNG", "JPEG", "Lossless WebP", and "Lossy WebP". Support for more image formats can be added in :ref:`GLTFDocumentExtension` classes. .. rst-class:: classref-item-separator @@ -228,7 +228,7 @@ Takes a path to a glTF file and imports the data at that file path to the given :ref:`Error` **append_from_scene**\ (\ node\: :ref:`Node`, state\: :ref:`GLTFState`, flags\: :ref:`int` = 0\ ) :ref:`๐Ÿ”—` -Takes a Godot Engine scene node and exports it and its descendants to the given :ref:`GLTFState` object through the ``state`` parameter. +Takes a Redot Engine scene node and exports it and its descendants to the given :ref:`GLTFState` object through the ``state`` parameter. .. rst-class:: classref-item-separator @@ -240,7 +240,7 @@ Takes a Godot Engine scene node and exports it and its descendants to the given :ref:`GLTFObjectModelProperty` **export_object_model_property**\ (\ state\: :ref:`GLTFState`, node_path\: :ref:`NodePath`, godot_node\: :ref:`Node`, gltf_node_index\: :ref:`int`\ ) |static| :ref:`๐Ÿ”—` -Determines a mapping between the given Godot ``node_path`` and the corresponding glTF Object Model JSON pointer(s) in the generated glTF file. The details of this mapping are returned in a :ref:`GLTFObjectModelProperty` object. Additional mappings can be supplied via the :ref:`GLTFDocumentExtension._import_object_model_property` callback method. +Determines a mapping between the given Redot ``node_path`` and the corresponding glTF Object Model JSON pointer(s) in the generated glTF file. The details of this mapping are returned in a :ref:`GLTFObjectModelProperty` object. Additional mappings can be supplied via the :ref:`GLTFDocumentExtension._import_object_model_property` callback method. .. rst-class:: classref-item-separator @@ -264,7 +264,7 @@ Takes a :ref:`GLTFState` object through the ``state`` parameter :ref:`Node` **generate_scene**\ (\ state\: :ref:`GLTFState`, bake_fps\: :ref:`float` = 30, trimming\: :ref:`bool` = false, remove_immutable_tracks\: :ref:`bool` = true\ ) :ref:`๐Ÿ”—` -Takes a :ref:`GLTFState` object through the ``state`` parameter and returns a Godot Engine scene node. +Takes a :ref:`GLTFState` object through the ``state`` parameter and returns a Redot Engine scene node. The ``bake_fps`` parameter overrides the bake_fps in ``state``. @@ -292,7 +292,7 @@ Returns a list of all support glTF extensions, including extensions supported di :ref:`GLTFObjectModelProperty` **import_object_model_property**\ (\ state\: :ref:`GLTFState`, json_pointer\: :ref:`String`\ ) |static| :ref:`๐Ÿ”—` -Determines a mapping between the given glTF Object Model ``json_pointer`` and the corresponding Godot node path(s) in the generated Godot scene. The details of this mapping are returned in a :ref:`GLTFObjectModelProperty` object. Additional mappings can be supplied via the :ref:`GLTFDocumentExtension._export_object_model_property` callback method. +Determines a mapping between the given glTF Object Model ``json_pointer`` and the corresponding Redot node path(s) in the generated Redot scene. The details of this mapping are returned in a :ref:`GLTFObjectModelProperty` object. Additional mappings can be supplied via the :ref:`GLTFDocumentExtension._export_object_model_property` callback method. .. rst-class:: classref-item-separator diff --git a/classes/class_gltfdocumentextension.rst b/classes/class_gltfdocumentextension.rst index ece6dbd2680..a1911abff4b 100644 --- a/classes/class_gltfdocumentextension.rst +++ b/classes/class_gltfdocumentextension.rst @@ -107,7 +107,7 @@ Method Descriptions Part of the export process. This method is run after :ref:`_export_preflight` and before :ref:`_export_post_convert`. -Runs when converting the data from a Godot scene node. This method can be used to process the Godot scene node data into a format that can be used by :ref:`_export_node`. +Runs when converting the data from a Redot scene node. This method can be used to process the Redot scene node data into a format that can be used by :ref:`_export_node`. .. rst-class:: classref-item-separator @@ -121,7 +121,7 @@ Runs when converting the data from a Godot scene node. This method can be used t Part of the export process. This method is run after :ref:`_get_saveable_image_formats` and before :ref:`_export_post`. If this **GLTFDocumentExtension** is used for exporting images, this runs after :ref:`_serialize_texture_json`. -This method can be used to modify the final JSON of each node. Data should be primarily stored in ``gltf_node`` prior to serializing the JSON, but the original Godot :ref:`Node` is also provided if available. ``node`` may be ``null`` if not available, such as when exporting glTF data not generated from a Godot scene. +This method can be used to modify the final JSON of each node. Data should be primarily stored in ``gltf_node`` prior to serializing the JSON, but the original Redot :ref:`Node` is also provided if available. ``node`` may be ``null`` if not available, such as when exporting glTF data not generated from a Redot scene. .. rst-class:: classref-item-separator @@ -133,11 +133,11 @@ This method can be used to modify the final JSON of each node. Data should be pr :ref:`GLTFObjectModelProperty` **_export_object_model_property**\ (\ state\: :ref:`GLTFState`, node_path\: :ref:`NodePath`, godot_node\: :ref:`Node`, gltf_node_index\: :ref:`int`, target_object\: :ref:`Object`, target_depth\: :ref:`int`\ ) |virtual| :ref:`๐Ÿ”—` -Part of the export process. Allows GLTFDocumentExtension classes to provide mappings for properties of nodes in the Godot scene tree, to JSON pointers to glTF properties, as defined by the glTF object model. +Part of the export process. Allows GLTFDocumentExtension classes to provide mappings for properties of nodes in the Redot scene tree, to JSON pointers to glTF properties, as defined by the glTF object model. Returns a :ref:`GLTFObjectModelProperty` instance that defines how the property should be mapped. If your extension can't handle the property, return ``null`` or an instance without any JSON pointers (see :ref:`GLTFObjectModelProperty.has_json_pointers`). You should use :ref:`GLTFObjectModelProperty.set_types` to set the types, and set the JSON pointer(s) using the :ref:`GLTFObjectModelProperty.json_pointers` property. -The parameters provide context for the property, including the NodePath, the Godot node, the GLTF node index, and the target object. The ``target_object`` will be equal to ``godot_node`` if no sub-object can be found, otherwise it will point to a sub-object. For example, if the path is ``^"A/B/C/MeshInstance3D:mesh:surface_0/material:emission_intensity"``, it will get the node, then the mesh, and then the material, so ``target_object`` will be the :ref:`Material` resource, and ``target_depth`` will be 2 because 2 levels were traversed to get to the target. +The parameters provide context for the property, including the NodePath, the Redot node, the GLTF node index, and the target object. The ``target_object`` will be equal to ``godot_node`` if no sub-object can be found, otherwise it will point to a sub-object. For example, if the path is ``^"A/B/C/MeshInstance3D:mesh:surface_0/material:emission_intensity"``, it will get the node, then the mesh, and then the material, so ``target_object`` will be the :ref:`Material` resource, and ``target_depth`` will be 2 because 2 levels were traversed to get to the target. .. rst-class:: classref-item-separator @@ -207,7 +207,7 @@ This method can be used to alter the state before performing serialization. It r Part of the import process. This method is run after :ref:`_import_pre_generate` and before :ref:`_import_node`. -Runs when generating a Godot scene node from a GLTFNode. The returned node will be added to the scene tree. Multiple nodes can be generated in this step if they are added as a child of the returned node. +Runs when generating a Redot scene node from a GLTFNode. The returned node will be added to the scene tree. Multiple nodes can be generated in this step if they are added as a child of the returned node. \ **Note:** The ``scene_parent`` parameter may be ``null`` if this is the single root node. @@ -221,7 +221,7 @@ Runs when generating a Godot scene node from a GLTFNode. The returned node will :ref:`String` **_get_image_file_extension**\ (\ ) |virtual| :ref:`๐Ÿ”—` -Returns the file extension to use for saving image data into, for example, ``".png"``. If defined, when this extension is used to handle images, and the images are saved to a separate file, the image bytes will be copied to a file with this extension. If this is set, there should be a :ref:`ResourceImporter` class able to import the file. If not defined or empty, Godot will save the image into a PNG file. +Returns the file extension to use for saving image data into, for example, ``".png"``. If defined, when this extension is used to handle images, and the images are saved to a separate file, the image bytes will be copied to a file with this extension. If this is set, there should be a :ref:`ResourceImporter` class able to import the file. If not defined or empty, Redot will save the image into a PNG file. .. rst-class:: classref-item-separator @@ -263,7 +263,7 @@ Returns an array of the glTF extensions supported by this GLTFDocumentExtension Part of the import process. This method is run after :ref:`_generate_scene_node` and before :ref:`_import_post`. -This method can be used to make modifications to each of the generated Godot scene nodes. +This method can be used to make modifications to each of the generated Redot scene nodes. .. rst-class:: classref-item-separator @@ -275,11 +275,11 @@ This method can be used to make modifications to each of the generated Godot sce :ref:`GLTFObjectModelProperty` **_import_object_model_property**\ (\ state\: :ref:`GLTFState`, split_json_pointer\: :ref:`PackedStringArray`, partial_paths\: :ref:`Array`\[:ref:`NodePath`\]\ ) |virtual| :ref:`๐Ÿ”—` -Part of the import process. Allows GLTFDocumentExtension classes to provide mappings for JSON pointers to glTF properties, as defined by the glTF object model, to properties of nodes in the Godot scene tree. +Part of the import process. Allows GLTFDocumentExtension classes to provide mappings for JSON pointers to glTF properties, as defined by the glTF object model, to properties of nodes in the Redot scene tree. Returns a :ref:`GLTFObjectModelProperty` instance that defines how the property should be mapped. If your extension can't handle the property, return ``null`` or an instance without any NodePaths (see :ref:`GLTFObjectModelProperty.has_node_paths`). You should use :ref:`GLTFObjectModelProperty.set_types` to set the types, and :ref:`GLTFObjectModelProperty.append_path_to_property` function is useful for most simple cases. -In many cases, ``partial_paths`` will contain the start of a path, allowing the extension to complete the path. For example, for ``/nodes/3/extensions/MY_ext/prop``, Godot will pass you a NodePath that leads to node 3, so the GLTFDocumentExtension class only needs to resolve the last ``MY_ext/prop`` part of the path. In this example, the extension should check ``split.size() > 4 and split[0] == "nodes" and split[2] == "extensions" and split[3] == "MY_ext"`` at the start of the function to check if this JSON pointer applies to it, then it can use ``partial_paths`` and handle ``split[4]``. +In many cases, ``partial_paths`` will contain the start of a path, allowing the extension to complete the path. For example, for ``/nodes/3/extensions/MY_ext/prop``, Redot will pass you a NodePath that leads to node 3, so the GLTFDocumentExtension class only needs to resolve the last ``MY_ext/prop`` part of the path. In this example, the extension should check ``split.size() > 4 and split[0] == "nodes" and split[2] == "extensions" and split[3] == "MY_ext"`` at the start of the function to check if this JSON pointer applies to it, then it can use ``partial_paths`` and handle ``split[4]``. .. rst-class:: classref-item-separator @@ -293,7 +293,7 @@ In many cases, ``partial_paths`` will contain the start of a path, allowing the Part of the import process. This method is run last, after all other parts of the import process. -This method can be used to modify the final Godot scene generated by the import process. +This method can be used to modify the final Redot scene generated by the import process. .. rst-class:: classref-item-separator diff --git a/classes/class_gltflight.rst b/classes/class_gltflight.rst index 3a4378e79aa..afe154d00b4 100644 --- a/classes/class_gltflight.rst +++ b/classes/class_gltflight.rst @@ -113,7 +113,7 @@ The :ref:`Color` of the light. Defaults to white. A black color cau The inner angle of the cone in a spotlight. Must be less than or equal to the outer cone angle. -Within this angle, the light is at full brightness. Between the inner and outer cone angles, there is a transition from full brightness to zero brightness. When creating a Godot :ref:`SpotLight3D`, the ratio between the inner and outer cone angles is used to calculate the attenuation of the light. +Within this angle, the light is at full brightness. Between the inner and outer cone angles, there is a transition from full brightness to zero brightness. When creating a Redot :ref:`SpotLight3D`, the ratio between the inner and outer cone angles is used to calculate the attenuation of the light. .. rst-class:: classref-item-separator @@ -130,7 +130,7 @@ Within this angle, the light is at full brightness. Between the inner and outer - |void| **set_intensity**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_intensity**\ (\ ) -The intensity of the light. This is expressed in candelas (lumens per steradian) for point and spot lights, and lux (lumens per mยฒ) for directional lights. When creating a Godot light, this value is converted to a unitless multiplier. +The intensity of the light. This is expressed in candelas (lumens per steradian) for point and spot lights, and lux (lumens per mยฒ) for directional lights. When creating a Redot light, this value is converted to a unitless multiplier. .. rst-class:: classref-item-separator @@ -147,7 +147,7 @@ The intensity of the light. This is expressed in candelas (lumens per steradian) - |void| **set_light_type**\ (\ value\: :ref:`String`\ ) - :ref:`String` **get_light_type**\ (\ ) -The type of the light. The values accepted by Godot are "point", "spot", and "directional", which correspond to Godot's :ref:`OmniLight3D`, :ref:`SpotLight3D`, and :ref:`DirectionalLight3D` respectively. +The type of the light. The values accepted by Redot are "point", "spot", and "directional", which correspond to Redot's :ref:`OmniLight3D`, :ref:`SpotLight3D`, and :ref:`DirectionalLight3D` respectively. .. rst-class:: classref-item-separator @@ -166,7 +166,7 @@ The type of the light. The values accepted by Godot are "point", "spot", and "di The outer angle of the cone in a spotlight. Must be greater than or equal to the inner angle. -At this angle, the light drops off to zero brightness. Between the inner and outer cone angles, there is a transition from full brightness to zero brightness. If this angle is a half turn, then the spotlight emits in all directions. When creating a Godot :ref:`SpotLight3D`, the outer cone angle is used as the angle of the spotlight. +At this angle, the light drops off to zero brightness. Between the inner and outer cone angles, there is a transition from full brightness to zero brightness. If this angle is a half turn, then the spotlight emits in all directions. When creating a Redot :ref:`SpotLight3D`, the outer cone angle is used as the angle of the spotlight. .. rst-class:: classref-item-separator @@ -183,7 +183,7 @@ At this angle, the light drops off to zero brightness. Between the inner and out - |void| **set_range**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_range**\ (\ ) -The range of the light, beyond which the light has no effect. glTF lights with no range defined behave like physical lights (which have infinite range). When creating a Godot light, the range is clamped to 4096. +The range of the light, beyond which the light has no effect. glTF lights with no range defined behave like physical lights (which have infinite range). When creating a Redot light, the range is clamped to 4096. .. rst-class:: classref-section-separator @@ -212,7 +212,7 @@ Creates a new GLTFLight instance by parsing the given :ref:`Dictionary` **from_node**\ (\ light_node\: :ref:`Light3D`\ ) |static| :ref:`๐Ÿ”—` -Create a new GLTFLight instance from the given Godot :ref:`Light3D` node. +Create a new GLTFLight instance from the given Redot :ref:`Light3D` node. .. rst-class:: classref-item-separator @@ -264,7 +264,7 @@ Serializes this GLTFLight instance into a :ref:`Dictionary`. :ref:`Light3D` **to_node**\ (\ ) |const| :ref:`๐Ÿ”—` -Converts this GLTFLight instance into a Godot :ref:`Light3D` node. +Converts this GLTFLight instance into a Redot :ref:`Light3D` 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_gltfnode.rst b/classes/class_gltfnode.rst index 951977cccbd..20985c10559 100644 --- a/classes/class_gltfnode.rst +++ b/classes/class_gltfnode.rst @@ -355,7 +355,7 @@ The argument should be the :ref:`GLTFDocumentExtension` **get_scene_node_path**\ (\ gltf_state\: :ref:`GLTFState`, handle_skeletons\: :ref:`bool` = true\ ) :ref:`๐Ÿ”—` -Returns the :ref:`NodePath` that this GLTF node will have in the Godot scene tree after being imported. This is useful when importing glTF object model pointers with :ref:`GLTFObjectModelProperty`, for handling extensions such as ``KHR_animation_pointer`` or ``KHR_interactivity``. +Returns the :ref:`NodePath` that this GLTF node will have in the Redot scene tree after being imported. This is useful when importing glTF object model pointers with :ref:`GLTFObjectModelProperty`, for handling extensions such as ``KHR_animation_pointer`` or ``KHR_interactivity``. If ``handle_skeletons`` is ``true``, paths to skeleton bone glTF nodes will be resolved properly. For example, a path that would be ``^"A/B/C/Bone1/Bone2/Bone3"`` if ``false`` will become ``^"A/B/C/Skeleton3D:Bone3"``. diff --git a/classes/class_gltfobjectmodelproperty.rst b/classes/class_gltfobjectmodelproperty.rst index b94c5865439..fea3f34840e 100644 --- a/classes/class_gltfobjectmodelproperty.rst +++ b/classes/class_gltfobjectmodelproperty.rst @@ -19,11 +19,11 @@ Describes how to access a property as defined in the glTF object model. Description ----------- -GLTFObjectModelProperty defines a mapping between a property in the glTF object model and a NodePath in the Godot scene tree. This can be used to animate properties in a glTF file using the ``KHR_animation_pointer`` extension, or to access them through an engine-agnostic script such as a behavior graph as defined by the ``KHR_interactivity`` extension. +GLTFObjectModelProperty defines a mapping between a property in the glTF object model and a NodePath in the Redot scene tree. This can be used to animate properties in a glTF file using the ``KHR_animation_pointer`` extension, or to access them through an engine-agnostic script such as a behavior graph as defined by the ``KHR_interactivity`` extension. -The glTF property is identified by JSON pointer(s) stored in :ref:`json_pointers`, while the Godot property it maps to is defined by :ref:`node_paths`. In most cases :ref:`json_pointers` and :ref:`node_paths` will each only have one item, but in some cases a single glTF JSON pointer will map to multiple Godot properties, or a single Godot property will be mapped to multiple glTF JSON pointers, or it might be a many-to-many relationship. +The glTF property is identified by JSON pointer(s) stored in :ref:`json_pointers`, while the Redot property it maps to is defined by :ref:`node_paths`. In most cases :ref:`json_pointers` and :ref:`node_paths` will each only have one item, but in some cases a single glTF JSON pointer will map to multiple Redot properties, or a single Redot property will be mapped to multiple glTF JSON pointers, or it might be a many-to-many relationship. -\ :ref:`Expression` objects can be used to define conversions between the data, such as when glTF defines an angle in radians and Godot uses degrees. The :ref:`object_model_type` property defines the type of data stored in the glTF file as defined by the object model, see :ref:`GLTFObjectModelType` for possible values. +\ :ref:`Expression` objects can be used to define conversions between the data, such as when glTF defines an angle in radians and Redot uses degrees. The :ref:`object_model_type` property defines the type of data stored in the glTF file as defined by the object model, see :ref:`GLTFObjectModelType` for possible values. .. rst-class:: classref-introduction-group @@ -201,7 +201,7 @@ Property Descriptions - |void| **set_gltf_to_godot_expression**\ (\ value\: :ref:`Expression`\ ) - :ref:`Expression` **get_gltf_to_godot_expression**\ (\ ) -If set, this :ref:`Expression` will be used to convert the property value from the glTF object model to the value expected by the Godot property. This is useful when the glTF object model uses a different unit system, or when the data needs to be transformed in some way. If ``null``, the value will be copied as-is. +If set, this :ref:`Expression` will be used to convert the property value from the glTF object model to the value expected by the Redot property. This is useful when the glTF object model uses a different unit system, or when the data needs to be transformed in some way. If ``null``, the value will be copied as-is. .. rst-class:: classref-item-separator @@ -218,7 +218,7 @@ If set, this :ref:`Expression` will be used to convert the pro - |void| **set_godot_to_gltf_expression**\ (\ value\: :ref:`Expression`\ ) - :ref:`Expression` **get_godot_to_gltf_expression**\ (\ ) -If set, this :ref:`Expression` will be used to convert the property value from the Godot property to the value expected by the glTF object model. This is useful when the glTF object model uses a different unit system, or when the data needs to be transformed in some way. If ``null``, the value will be copied as-is. +If set, this :ref:`Expression` will be used to convert the property value from the Redot property to the value expected by the glTF object model. This is useful when the glTF object model uses a different unit system, or when the data needs to be transformed in some way. If ``null``, the value will be copied as-is. .. rst-class:: classref-item-separator @@ -252,9 +252,9 @@ The glTF object model JSON pointers used to identify the property in the glTF ob - |void| **set_node_paths**\ (\ value\: :ref:`Array`\[:ref:`NodePath`\]\ ) - :ref:`Array`\[:ref:`NodePath`\] **get_node_paths**\ (\ ) -An array of :ref:`NodePath`\ s that point to a property, or multiple properties, in the Godot scene tree. On import, this will either be set by :ref:`GLTFDocument`, or by a :ref:`GLTFDocumentExtension` class. For simple cases, use :ref:`append_path_to_property` to add properties to this array. +An array of :ref:`NodePath`\ s that point to a property, or multiple properties, in the Redot scene tree. On import, this will either be set by :ref:`GLTFDocument`, or by a :ref:`GLTFDocumentExtension` class. For simple cases, use :ref:`append_path_to_property` to add properties to this array. -In most cases :ref:`node_paths` will only have one item, but in some cases a single glTF JSON pointer will map to multiple Godot properties. For example, a :ref:`GLTFCamera` or :ref:`GLTFLight` used on multiple glTF nodes will be represented by multiple Godot nodes. +In most cases :ref:`node_paths` will only have one item, but in some cases a single glTF JSON pointer will map to multiple Redot properties. For example, a :ref:`GLTFCamera` or :ref:`GLTFLight` used on multiple glTF nodes will be represented by multiple Redot nodes. .. rst-class:: classref-item-separator @@ -288,7 +288,7 @@ The type of data stored in the glTF file as defined by the object model. This is - |void| **set_variant_type**\ (\ value\: :ref:`Variant.Type`\ ) - :ref:`Variant.Type` **get_variant_type**\ (\ ) -The type of data stored in the Godot property. This is the type of the property that the :ref:`node_paths` point to. +The type of data stored in the Redot property. This is the type of the property that the :ref:`node_paths` point to. .. rst-class:: classref-section-separator @@ -305,7 +305,7 @@ Method Descriptions |void| **append_node_path**\ (\ node_path\: :ref:`NodePath`\ ) :ref:`๐Ÿ”—` -Appends a :ref:`NodePath` to :ref:`node_paths`. This can be used by :ref:`GLTFDocumentExtension` classes to define how a glTF object model property maps to a Godot property, or multiple Godot properties. Prefer using :ref:`append_path_to_property` for simple cases. Be sure to also call :ref:`set_types` once (the order does not matter). +Appends a :ref:`NodePath` to :ref:`node_paths`. This can be used by :ref:`GLTFDocumentExtension` classes to define how a glTF object model property maps to a Redot property, or multiple Redot properties. Prefer using :ref:`append_path_to_property` for simple cases. Be sure to also call :ref:`set_types` once (the order does not matter). .. rst-class:: classref-item-separator @@ -341,7 +341,7 @@ The GLTF accessor type associated with this property's :ref:`object_model_type` **has_json_pointers**\ (\ ) |const| :ref:`๐Ÿ”—` -Returns ``true`` if :ref:`json_pointers` is not empty. This is used during export to determine if a **GLTFObjectModelProperty** can handle converting a Godot property to a glTF object model property. +Returns ``true`` if :ref:`json_pointers` is not empty. This is used during export to determine if a **GLTFObjectModelProperty** can handle converting a Redot property to a glTF object model property. .. rst-class:: classref-item-separator @@ -353,7 +353,7 @@ Returns ``true`` if :ref:`json_pointers` **has_node_paths**\ (\ ) |const| :ref:`๐Ÿ”—` -Returns ``true`` if :ref:`node_paths` is not empty. This is used during import to determine if a **GLTFObjectModelProperty** can handle converting a glTF object model property to a Godot property. +Returns ``true`` if :ref:`node_paths` is not empty. This is used during import to determine if a **GLTFObjectModelProperty** can handle converting a glTF object model property to a Redot property. .. rst-class:: classref-item-separator diff --git a/classes/class_gltfphysicsbody.rst b/classes/class_gltfphysicsbody.rst index ba402f759fc..9e03a38df77 100644 --- a/classes/class_gltfphysicsbody.rst +++ b/classes/class_gltfphysicsbody.rst @@ -19,7 +19,7 @@ Represents a glTF physics body. Description ----------- -Represents a physics body as an intermediary between the ``OMI_physics_body`` 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. +Represents a physics body as an intermediary between the ``OMI_physics_body`` glTF data and Redot'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 @@ -111,7 +111,7 @@ The angular velocity of the physics body, in radians per second. This is only us - |void| **set_body_type**\ (\ value\: :ref:`String`\ ) - :ref:`String` **get_body_type**\ (\ ) -The type of the body. When importing, this controls what type of :ref:`CollisionObject3D` node Godot should generate. Valid values are "static", "animatable", "character", "rigid", "vehicle", and "trigger". When exporting, this will be squashed down to one of "static", "kinematic", or "dynamic" motion types, or the "trigger" property. +The type of the body. When importing, this controls what type of :ref:`CollisionObject3D` node Redot should generate. Valid values are "static", "animatable", "character", "rigid", "vehicle", and "trigger". When exporting, this will be squashed down to one of "static", "kinematic", or "dynamic" motion types, or the "trigger" property. .. rst-class:: classref-item-separator @@ -147,7 +147,7 @@ The center of mass of the body, in meters. This is in local space relative to th The inertia strength of the physics body, in kilogram meter squared (kgโ‹…mยฒ). This represents the inertia around the principle axes, the diagonal of the inertia tensor matrix. 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. +When converted to a Redot :ref:`RigidBody3D` node, if this value is zero, then the inertia will be calculated automatically. .. rst-class:: classref-item-separator @@ -185,7 +185,7 @@ The inertia orientation of the physics body. This defines the rotation of the in 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. +When converted to a Redot :ref:`RigidBody3D` node, if this value is zero, then the inertia will be calculated automatically. .. rst-class:: classref-item-separator @@ -248,7 +248,7 @@ Creates a new GLTFPhysicsBody instance by parsing the given :ref:`Dictionary` **from_node**\ (\ body_node\: :ref:`CollisionObject3D`\ ) |static| :ref:`๐Ÿ”—` -Creates a new GLTFPhysicsBody instance from the given Godot :ref:`CollisionObject3D` node. +Creates a new GLTFPhysicsBody instance from the given Redot :ref:`CollisionObject3D` node. .. rst-class:: classref-item-separator @@ -272,7 +272,7 @@ Serializes this GLTFPhysicsBody instance into a :ref:`Dictionary` **to_node**\ (\ ) |const| :ref:`๐Ÿ”—` -Converts this GLTFPhysicsBody instance into a Godot :ref:`CollisionObject3D` node. +Converts this GLTFPhysicsBody instance into a Redot :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.)` diff --git a/classes/class_gltfphysicsshape.rst b/classes/class_gltfphysicsshape.rst index fca1e765dbe..22aa4f5595b 100644 --- a/classes/class_gltfphysicsshape.rst +++ b/classes/class_gltfphysicsshape.rst @@ -19,7 +19,7 @@ Represents a glTF physics shape. Description ----------- -Represents a physics shape as defined by the ``OMI_physics_shape`` or ``OMI_collider`` glTF extensions. 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. +Represents a physics shape as defined by the ``OMI_physics_shape`` or ``OMI_collider`` glTF extensions. This class is an intermediary between the glTF data and Redot'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 @@ -132,7 +132,7 @@ The :ref:`ImporterMesh` resource of the shape. This is only - |void| **set_is_trigger**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **get_is_trigger**\ (\ ) -If ``true``, indicates that this shape is a trigger. For Godot, this means that the shape should be a child of an Area3D node. +If ``true``, indicates that this shape is a trigger. For Redot, this means that the shape should be a child of an Area3D node. This is the only variable not used in the :ref:`to_node` method, it's intended to be used alongside when deciding where to add the generated node as a child. @@ -231,7 +231,7 @@ Creates a new GLTFPhysicsShape instance by parsing the given :ref:`Dictionary` **from_node**\ (\ shape_node\: :ref:`CollisionShape3D`\ ) |static| :ref:`๐Ÿ”—` -Creates a new GLTFPhysicsShape instance from the given Godot :ref:`CollisionShape3D` node. +Creates a new GLTFPhysicsShape instance from the given Redot :ref:`CollisionShape3D` node. .. rst-class:: classref-item-separator @@ -243,7 +243,7 @@ Creates a new GLTFPhysicsShape instance from the given Godot :ref:`CollisionShap :ref:`GLTFPhysicsShape` **from_resource**\ (\ shape_resource\: :ref:`Shape3D`\ ) |static| :ref:`๐Ÿ”—` -Creates a new GLTFPhysicsShape instance from the given Godot :ref:`Shape3D` resource. +Creates a new GLTFPhysicsShape instance from the given Redot :ref:`Shape3D` resource. .. rst-class:: classref-item-separator @@ -267,7 +267,7 @@ Serializes this GLTFPhysicsShape instance into a :ref:`Dictionary` **to_node**\ (\ cache_shapes\: :ref:`bool` = false\ ) :ref:`๐Ÿ”—` -Converts this GLTFPhysicsShape instance into a Godot :ref:`CollisionShape3D` node. +Converts this GLTFPhysicsShape instance into a Redot :ref:`CollisionShape3D` node. .. rst-class:: classref-item-separator @@ -279,7 +279,7 @@ Converts this GLTFPhysicsShape instance into a Godot :ref:`CollisionShape3D` **to_resource**\ (\ cache_shapes\: :ref:`bool` = false\ ) :ref:`๐Ÿ”—` -Converts this GLTFPhysicsShape instance into a Godot :ref:`Shape3D` resource. +Converts this GLTFPhysicsShape instance into a Redot :ref:`Shape3D` resource. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_gltfskeleton.rst b/classes/class_gltfskeleton.rst index abdac1921c4..a1f148e2ede 100644 --- a/classes/class_gltfskeleton.rst +++ b/classes/class_gltfskeleton.rst @@ -151,7 +151,7 @@ Method Descriptions :ref:`Dictionary` **get_godot_bone_node**\ (\ ) :ref:`๐Ÿ”—` -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. +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 Redot converts skeleton bones to glTF nodes. .. rst-class:: classref-item-separator @@ -191,7 +191,7 @@ Returns a :ref:`Dictionary` that maps skeleton bone indices to |void| **set_godot_bone_node**\ (\ godot_bone_node\: :ref:`Dictionary`\ ) :ref:`๐Ÿ”—` -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. +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 Redot converts skeleton bones to glTF nodes. .. rst-class:: classref-item-separator diff --git a/classes/class_gltfstate.rst b/classes/class_gltfstate.rst index 9998b17ecfd..cfcf00690bf 100644 --- a/classes/class_gltfstate.rst +++ b/classes/class_gltfstate.rst @@ -23,7 +23,7 @@ Description 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. +GLTFState can be populated by :ref:`GLTFDocument` reading a file or by converting a Redot scene. Then the data can either be used to create a Redot scene or save to a glTF file. The code that converts to/from a Redot 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 Redot nodes. .. rst-class:: classref-introduction-group @@ -350,7 +350,7 @@ The binary buffer attached to a .glb file. - |void| **set_import_as_skeleton_bones**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **get_import_as_skeleton_bones**\ (\ ) -If ``true``, forces all GLTFNodes in the document to be bones of a single :ref:`Skeleton3D` Godot node. +If ``true``, forces all GLTFNodes in the document to be bones of a single :ref:`Skeleton3D` Redot node. .. rst-class:: classref-item-separator @@ -422,7 +422,7 @@ The original raw JSON document corresponding to this GLTFState. - |void| **set_root_nodes**\ (\ value\: :ref:`PackedInt32Array`\ ) - :ref:`PackedInt32Array` **get_root_nodes**\ (\ ) -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. +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 Redot scene. **Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt32Array` for more details. @@ -501,9 +501,9 @@ Appends the given byte array data to the buffers and creates a :ref:`GLTFBufferV :ref:`int` **append_gltf_node**\ (\ gltf_node\: :ref:`GLTFNode`, godot_scene_node\: :ref:`Node`, parent_node_index\: :ref:`int`\ ) :ref:`๐Ÿ”—` -Append the given :ref:`GLTFNode` to the state, and return its new index. This can be used to export one Godot node as multiple glTF nodes, or inject new glTF nodes at import time. On import, this must be called before :ref:`GLTFDocumentExtension._generate_scene_node` finishes for the parent node. On export, this must be called before :ref:`GLTFDocumentExtension._export_node` runs for the parent node. +Append the given :ref:`GLTFNode` to the state, and return its new index. This can be used to export one Redot node as multiple glTF nodes, or inject new glTF nodes at import time. On import, this must be called before :ref:`GLTFDocumentExtension._generate_scene_node` finishes for the parent node. On export, this must be called before :ref:`GLTFDocumentExtension._export_node` runs for the parent node. -The ``godot_scene_node`` parameter is the Godot scene node that corresponds to this glTF node. This is highly recommended to be set to a valid node, but may be ``null`` if there is no corresponding Godot scene node. One Godot scene node may be used for multiple glTF nodes, so if exporting multiple glTF nodes for one Godot scene node, use the same Godot scene node for each. +The ``godot_scene_node`` parameter is the Redot scene node that corresponds to this glTF node. This is highly recommended to be set to a valid node, but may be ``null`` if there is no corresponding Redot scene node. One Redot scene node may be used for multiple glTF nodes, so if exporting multiple glTF nodes for one Redot scene node, use the same Redot scene node for each. The ``parent_node_index`` parameter is the index of the parent :ref:`GLTFNode` in the state. If ``-1``, the node will be a root node, otherwise the new node will be added to the parent's list of children. The index will also be written to the :ref:`GLTFNode.parent` property of the new node. @@ -545,7 +545,7 @@ The argument should be the :ref:`GLTFDocumentExtension` **get_animation_player**\ (\ idx\: :ref:`int`\ ) :ref:`๐Ÿ”—` -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. +Returns the :ref:`AnimationPlayer` node with the given index. These nodes are only used during the export process when converting Redot :ref:`AnimationPlayer` nodes to glTF animations. .. rst-class:: classref-item-separator @@ -557,7 +557,7 @@ Returns the :ref:`AnimationPlayer` node with the given in :ref:`int` **get_animation_players_count**\ (\ idx\: :ref:`int`\ ) :ref:`๐Ÿ”—` -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. +Returns the number of :ref:`AnimationPlayer` nodes in this **GLTFState**. These nodes are only used during the export process when converting Redot :ref:`AnimationPlayer` nodes to glTF animations. .. rst-class:: classref-item-separator @@ -569,7 +569,7 @@ Returns the number of :ref:`AnimationPlayer` nodes in thi :ref:`Array`\[:ref:`GLTFAnimation`\] **get_animations**\ (\ ) :ref:`๐Ÿ”—` -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. +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 Redot :ref:`AnimationPlayer` nodes. .. rst-class:: classref-item-separator @@ -671,9 +671,9 @@ Returns an array of all :ref:`GLTFMesh`\ es in the glTF file. Th :ref:`int` **get_node_index**\ (\ scene_node\: :ref:`Node`\ ) :ref:`๐Ÿ”—` -Returns the index of the :ref:`GLTFNode` corresponding to this Godot scene node. This is the inverse of :ref:`get_scene_node`. Useful during the export process. +Returns the index of the :ref:`GLTFNode` corresponding to this Redot 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. +\ **Note:** Not every Redot 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 @@ -685,7 +685,7 @@ Returns the index of the :ref:`GLTFNode` corresponding to this G :ref:`Array`\[:ref:`GLTFNode`\] **get_nodes**\ (\ ) :ref:`๐Ÿ”—` -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. +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 Redot scene, or nodes that may generate multiple Redot scene nodes. .. rst-class:: classref-item-separator @@ -697,7 +697,7 @@ Returns an array of all :ref:`GLTFNode`\ s in the glTF file. The :ref:`Node` **get_scene_node**\ (\ idx\: :ref:`int`\ ) :ref:`๐Ÿ”—` -Returns the Godot scene node that corresponds to the same index as the :ref:`GLTFNode` it was generated from. This is the inverse of :ref:`get_node_index`. Useful during the import process. +Returns the Redot scene node that corresponds to the same index as the :ref:`GLTFNode` it was generated from. This is the inverse of :ref:`get_node_index`. Useful during the import process. \ **Note:** Not every :ref:`GLTFNode` will have a scene node generated, and not every generated scene node will have a corresponding :ref:`GLTFNode`. If there is no scene node for this :ref:`GLTFNode` index, ``null`` is returned. @@ -813,7 +813,7 @@ The first argument should be the :ref:`GLTFDocumentExtension`\[:ref:`GLTFAnimation`\]\ ) :ref:`๐Ÿ”—` -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. +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 Redot :ref:`AnimationPlayer` nodes. .. rst-class:: classref-item-separator @@ -915,7 +915,7 @@ Sets the :ref:`GLTFMesh`\ es in the state. These are the meshes |void| **set_nodes**\ (\ nodes\: :ref:`Array`\[:ref:`GLTFNode`\]\ ) :ref:`๐Ÿ”—` -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. +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 Redot scene, or may generate multiple Redot scene nodes. .. rst-class:: classref-item-separator diff --git a/classes/class_gpuparticles2d.rst b/classes/class_gpuparticles2d.rst index e0b5c6ed888..91e1df4afa8 100644 --- a/classes/class_gpuparticles2d.rst +++ b/classes/class_gpuparticles2d.rst @@ -477,6 +477,8 @@ If ``true``, only one emission cycle occurs. If set ``true`` during a cycle, emi Particle system starts as if it had already run for this many seconds. +\ **Note:** This can be very expensive if set to a high number as it requires running the particle shader a number of times equal to the :ref:`fixed_fps` (or 30, if :ref:`fixed_fps` is 0) for every second. In extreme cases it can even lead to a GPU crash due to the volume of work done in a single frame. + .. rst-class:: classref-item-separator ---- @@ -700,6 +702,8 @@ Emits a single particle. Whether ``xform``, ``velocity``, ``color`` and ``custom The default ParticleProcessMaterial will overwrite ``color`` and use the contents of ``custom`` as ``(rotation, age, animation, lifetime)``. +\ **Note:** :ref:`emit_particle` is only supported on the Forward+ and Mobile rendering methods, not Compatibility. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_gpuparticles3d.rst b/classes/class_gpuparticles3d.rst index 945ed0380df..73c963a0162 100644 --- a/classes/class_gpuparticles3d.rst +++ b/classes/class_gpuparticles3d.rst @@ -676,6 +676,8 @@ If ``true``, only the number of particles equal to :ref:`amount` (or 30, if :ref:`fixed_fps` is 0) for every second. In extreme cases it can even lead to a GPU crash due to the volume of work done in a single frame. + .. rst-class:: classref-item-separator ---- @@ -867,6 +869,8 @@ Emits a single particle. Whether ``xform``, ``velocity``, ``color`` and ``custom The default ParticleProcessMaterial will overwrite ``color`` and use the contents of ``custom`` as ``(rotation, age, animation, lifetime)``. +\ **Note:** :ref:`emit_particle` is only supported on the Forward+ and Mobile rendering methods, not Compatibility. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_graphedit.rst b/classes/class_graphedit.rst index 63f183a657e..2c9d636521d 100644 --- a/classes/class_graphedit.rst +++ b/classes/class_graphedit.rst @@ -37,57 +37,59 @@ Properties .. table:: :widths: auto - +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`bool` | clip_contents | ``true`` (overrides :ref:`Control`) | - +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`connection_lines_antialiased` | ``true`` | - +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`float` | :ref:`connection_lines_curvature` | ``0.5`` | - +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`float` | :ref:`connection_lines_thickness` | ``4.0`` | - +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | - +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`GridPattern` | :ref:`grid_pattern` | ``0`` | - +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`minimap_enabled` | ``true`` | - +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`float` | :ref:`minimap_opacity` | ``0.65`` | - +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`minimap_size` | ``Vector2(240, 160)`` | - +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`PanningScheme` | :ref:`panning_scheme` | ``0`` | - +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`right_disconnects` | ``false`` | - +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`scroll_offset` | ``Vector2(0, 0)`` | - +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`show_arrange_button` | ``true`` | - +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`show_grid` | ``true`` | - +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`show_grid_buttons` | ``true`` | - +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`show_menu` | ``true`` | - +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`show_minimap_button` | ``true`` | - +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`show_zoom_buttons` | ``true`` | - +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`show_zoom_label` | ``false`` | - +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`int` | :ref:`snapping_distance` | ``20`` | - +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`snapping_enabled` | ``true`` | - +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`float` | :ref:`zoom` | ``1.0`` | - +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`float` | :ref:`zoom_max` | ``2.0736`` | - +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`float` | :ref:`zoom_min` | ``0.232568`` | - +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`float` | :ref:`zoom_step` | ``1.2`` | - +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | clip_contents | ``true`` (overrides :ref:`Control`) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`connection_lines_antialiased` | ``true`` | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`float` | :ref:`connection_lines_curvature` | ``0.5`` | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`float` | :ref:`connection_lines_thickness` | ``4.0`` | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`connections` | ``[]`` | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`GridPattern` | :ref:`grid_pattern` | ``0`` | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`minimap_enabled` | ``true`` | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`float` | :ref:`minimap_opacity` | ``0.65`` | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`minimap_size` | ``Vector2(240, 160)`` | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`PanningScheme` | :ref:`panning_scheme` | ``0`` | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`right_disconnects` | ``false`` | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`scroll_offset` | ``Vector2(0, 0)`` | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`show_arrange_button` | ``true`` | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`show_grid` | ``true`` | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`show_grid_buttons` | ``true`` | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`show_menu` | ``true`` | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`show_minimap_button` | ``true`` | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`show_zoom_buttons` | ``true`` | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`show_zoom_label` | ``false`` | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`int` | :ref:`snapping_distance` | ``20`` | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`snapping_enabled` | ``true`` | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`float` | :ref:`zoom` | ``1.0`` | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`float` | :ref:`zoom_max` | ``2.0736`` | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`float` | :ref:`zoom_min` | ``0.232568`` | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`float` | :ref:`zoom_step` | ``1.2`` | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -118,7 +120,7 @@ Methods +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`clear_connections`\ (\ ) | +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`connect_node`\ (\ from_node\: :ref:`StringName`, from_port\: :ref:`int`, to_node\: :ref:`StringName`, to_port\: :ref:`int`\ ) | + | :ref:`Error` | :ref:`connect_node`\ (\ from_node\: :ref:`StringName`, from_port\: :ref:`int`, to_node\: :ref:`StringName`, to_port\: :ref:`int`, keep_alive\: :ref:`bool` = false\ ) | +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`detach_graph_element_from_frame`\ (\ element\: :ref:`StringName`\ ) | +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -130,9 +132,9 @@ Methods +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Dictionary` | :ref:`get_closest_connection_at_point`\ (\ point\: :ref:`Vector2`, max_distance\: :ref:`float` = 4.0\ ) |const| | +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array` | :ref:`get_connection_line`\ (\ from_node\: :ref:`Vector2`, to_node\: :ref:`Vector2`\ ) |const| | + | :ref:`int` | :ref:`get_connection_count`\ (\ from_node\: :ref:`StringName`, from_port\: :ref:`int`\ ) | +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`get_connection_list`\ (\ ) |const| | + | :ref:`PackedVector2Array` | :ref:`get_connection_line`\ (\ from_node\: :ref:`Vector2`, to_node\: :ref:`Vector2`\ ) |const| | +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`get_connections_intersecting_with_rect`\ (\ rect\: :ref:`Rect2`\ ) |const| | +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -180,6 +182,8 @@ Theme Properties +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+ | :ref:`Color` | :ref:`selection_stroke` | ``Color(1, 1, 1, 0.8)`` | +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+ + | :ref:`int` | :ref:`connection_hover_thickness` | ``0`` | + +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+ | :ref:`int` | :ref:`port_hotzone_inner_extent` | ``22`` | +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+ | :ref:`int` | :ref:`port_hotzone_outer_extent` | ``26`` | @@ -557,6 +561,37 @@ The thickness of the lines between the nodes. ---- +.. _class_GraphEdit_property_connections: + +.. rst-class:: classref-property + +:ref:`Array`\[:ref:`Dictionary`\] **connections** = ``[]`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_connections**\ (\ value\: :ref:`Array`\[:ref:`Dictionary`\]\ ) +- :ref:`Array`\[:ref:`Dictionary`\] **get_connection_list**\ (\ ) + +The connections between :ref:`GraphNode`\ s. + +A connection is represented as a :ref:`Dictionary` in the form of: + +:: + + { + from_node: StringName, + from_port: int, + to_node: StringName, + to_port: int, + keep_alive: bool + } + +Connections with ``keep_alive`` set to ``false`` may be deleted automatically if invalid during a redraw. + +.. rst-class:: classref-item-separator + +---- + .. _class_GraphEdit_property_grid_pattern: .. rst-class:: classref-property @@ -929,8 +964,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_input_port_position(in_port) - port_size / 2 + var port_size = Vector2(get_theme_constant("port_grab_distance_horizontal"), get_theme_constant("port_grab_distance_vertical")) + var port_pos = in_node.get_position() + in_node.get_input_port_position(in_port) - port_size / 2 var rect = Rect2(port_pos, port_size) return rect.has_point(mouse_position) @@ -952,8 +987,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_output_port_position(in_port) - port_size / 2 + var port_size = Vector2(get_theme_constant("port_grab_distance_horizontal"), get_theme_constant("port_grab_distance_vertical")) + var port_pos = in_node.get_position() + in_node.get_output_port_position(in_port) - port_size / 2 var rect = Rect2(port_pos, port_size) return rect.has_point(mouse_position) @@ -1073,10 +1108,12 @@ Removes all connections between nodes. .. rst-class:: classref-method -:ref:`Error` **connect_node**\ (\ from_node\: :ref:`StringName`, from_port\: :ref:`int`, to_node\: :ref:`StringName`, to_port\: :ref:`int`\ ) :ref:`๐Ÿ”—` +:ref:`Error` **connect_node**\ (\ from_node\: :ref:`StringName`, from_port\: :ref:`int`, to_node\: :ref:`StringName`, to_port\: :ref:`int`, keep_alive\: :ref:`bool` = false\ ) :ref:`๐Ÿ”—` Create a connection between the ``from_port`` of the ``from_node`` :ref:`GraphNode` and the ``to_port`` of the ``to_node`` :ref:`GraphNode`. If the connection already exists, no connection is created. +Connections with ``keep_alive`` set to ``false`` may be deleted automatically if invalid during a redraw. + .. rst-class:: classref-item-separator ---- @@ -1141,7 +1178,17 @@ Returns an array of node names that are attached to the :ref:`GraphFrame` is returned. -A connection consists in a structure of the form ``{ from_port: 0, from_node: "GraphNode name 0", to_port: 1, to_node: "GraphNode name 1" }``. +A connection is represented as a :ref:`Dictionary` in the form of: + +:: + + { + from_node: StringName, + from_port: int, + to_node: StringName, + to_port: int, + keep_alive: bool + } For example, getting a connection at a given mouse position can be achieved like this: @@ -1158,25 +1205,25 @@ For example, getting a connection at a given mouse position can be achieved like ---- -.. _class_GraphEdit_method_get_connection_line: +.. _class_GraphEdit_method_get_connection_count: .. rst-class:: classref-method -:ref:`PackedVector2Array` **get_connection_line**\ (\ from_node\: :ref:`Vector2`, to_node\: :ref:`Vector2`\ ) |const| :ref:`๐Ÿ”—` +:ref:`int` **get_connection_count**\ (\ from_node\: :ref:`StringName`, from_port\: :ref:`int`\ ) :ref:`๐Ÿ”—` -Returns the points which would make up a connection between ``from_node`` and ``to_node``. +Returns the number of connections from ``from_port`` of ``from_node``. .. rst-class:: classref-item-separator ---- -.. _class_GraphEdit_method_get_connection_list: +.. _class_GraphEdit_method_get_connection_line: .. rst-class:: classref-method -:ref:`Array`\[:ref:`Dictionary`\] **get_connection_list**\ (\ ) |const| :ref:`๐Ÿ”—` +:ref:`PackedVector2Array` **get_connection_line**\ (\ from_node\: :ref:`Vector2`, to_node\: :ref:`Vector2`\ ) |const| :ref:`๐Ÿ”—` -Returns an :ref:`Array` containing the list of connections. A connection consists in a structure of the form ``{ from_port: 0, from_node: "GraphNode name 0", to_port: 1, to_node: "GraphNode name 1" }``. +Returns the points which would make up a connection between ``from_node`` and ``to_node``. .. rst-class:: classref-item-separator @@ -1188,7 +1235,19 @@ Returns an :ref:`Array` containing the list of connections. A conne :ref:`Array`\[:ref:`Dictionary`\] **get_connections_intersecting_with_rect**\ (\ rect\: :ref:`Rect2`\ ) |const| :ref:`๐Ÿ”—` -Returns an :ref:`Array` containing the list of connections that intersect with the given :ref:`Rect2`. A connection consists in a structure of the form ``{ from_port: 0, from_node: "GraphNode name 0", to_port: 1, to_node: "GraphNode name 1" }``. +Returns an :ref:`Array` containing the list of connections that intersect with the given :ref:`Rect2`. + +A connection is represented as a :ref:`Dictionary` in the form of: + +:: + + { + from_node: StringName, + from_port: int, + to_node: StringName, + to_port: int, + keep_alive: bool + } .. rst-class:: classref-item-separator @@ -1409,6 +1468,18 @@ The outline color of the selection rectangle. ---- +.. _class_GraphEdit_theme_constant_connection_hover_thickness: + +.. rst-class:: classref-themeproperty + +:ref:`int` **connection_hover_thickness** = ``0`` :ref:`๐Ÿ”—` + +Widen the line of the connection when the mouse is hovering over it by a percentage factor. A value of ``0`` disables the highlight. A value of ``100`` doubles the line width. + +.. rst-class:: classref-item-separator + +---- + .. _class_GraphEdit_theme_constant_port_hotzone_inner_extent: .. rst-class:: classref-themeproperty diff --git a/classes/class_gridmap.rst b/classes/class_gridmap.rst index dad279f804c..f298e53e842 100644 --- a/classes/class_gridmap.rst +++ b/classes/class_gridmap.rst @@ -457,7 +457,7 @@ Returns an array of :ref:`ArrayMesh`\ es and :ref:`Transform3D< :ref:`Basis` **get_basis_with_orthogonal_index**\ (\ index\: :ref:`int`\ ) |const| :ref:`๐Ÿ”—` -Returns one of 24 possible rotations that lie along the vectors (x,y,z) with each component being either -1, 0, or 1. For further details, refer to the Godot source code. +Returns one of 24 possible rotations that lie along the vectors (x,y,z) with each component being either -1, 0, or 1. For further details, refer to the Redot source code. .. rst-class:: classref-item-separator @@ -555,7 +555,7 @@ This function returns always the map set on the GridMap node and not the map on :ref:`int` **get_orthogonal_index_from_basis**\ (\ basis\: :ref:`Basis`\ ) |const| :ref:`๐Ÿ”—` -This function considers a discretization of rotations into 24 points on unit sphere, lying along the vectors (x,y,z) with each component being either -1, 0, or 1, and returns the index (in the range from 0 to 23) of the point best representing the orientation of the object. For further details, refer to the Godot source code. +This function considers a discretization of rotations into 24 points on unit sphere, lying along the vectors (x,y,z) with each component being either -1, 0, or 1, and returns the index (in the range from 0 to 23) of the point best representing the orientation of the object. For further details, refer to the Redot source code. .. rst-class:: classref-item-separator diff --git a/classes/class_gridmapeditorplugin.rst b/classes/class_gridmapeditorplugin.rst new file mode 100644 index 00000000000..198cd4196ba --- /dev/null +++ b/classes/class_gridmapeditorplugin.rst @@ -0,0 +1,165 @@ +:github_url: hide + +.. meta:: + :keywords: tilemap + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/modules/gridmap/doc_classes/GridMapEditorPlugin.xml. + +.. _class_GridMapEditorPlugin: + +GridMapEditorPlugin +=================== + +**Inherits:** :ref:`EditorPlugin` **<** :ref:`Node` **<** :ref:`Object` + +Editor for :ref:`GridMap` nodes. + +.. rst-class:: classref-introduction-group + +Description +----------- + +GridMapEditorPlugin provides access to the :ref:`GridMap` editor functionality. + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_selection`\ (\ ) | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GridMap` | :ref:`get_current_grid_map`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`get_selected_cells`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_selected_palette_item`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB` | :ref:`get_selection`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_selection`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_selected_palette_item`\ (\ item\: :ref:`int`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_selection`\ (\ begin\: :ref:`Vector3i`, end\: :ref:`Vector3i`\ ) | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_GridMapEditorPlugin_method_clear_selection: + +.. rst-class:: classref-method + +|void| **clear_selection**\ (\ ) :ref:`๐Ÿ”—` + +Deselects any currently selected cells. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GridMapEditorPlugin_method_get_current_grid_map: + +.. rst-class:: classref-method + +:ref:`GridMap` **get_current_grid_map**\ (\ ) |const| :ref:`๐Ÿ”—` + +Returns the :ref:`GridMap` node currently edited by the grid map editor. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GridMapEditorPlugin_method_get_selected_cells: + +.. rst-class:: classref-method + +:ref:`Array` **get_selected_cells**\ (\ ) |const| :ref:`๐Ÿ”—` + +Returns an array of :ref:`Vector3i`\ s with the selected cells' coordinates. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GridMapEditorPlugin_method_get_selected_palette_item: + +.. rst-class:: classref-method + +:ref:`int` **get_selected_palette_item**\ (\ ) |const| :ref:`๐Ÿ”—` + +Returns the index of the selected :ref:`MeshLibrary` item in the grid map editor's palette or ``-1`` if no item is selected. + +\ **Note:** The indices might not be in the same order as they appear in the editor's interface. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GridMapEditorPlugin_method_get_selection: + +.. rst-class:: classref-method + +:ref:`AABB` **get_selection**\ (\ ) |const| :ref:`๐Ÿ”—` + +Returns the cell coordinate bounds of the current selection. Use :ref:`has_selection` to check if there is an active selection. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GridMapEditorPlugin_method_has_selection: + +.. rst-class:: classref-method + +:ref:`bool` **has_selection**\ (\ ) |const| :ref:`๐Ÿ”—` + +Returns ``true`` if there are selected cells. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GridMapEditorPlugin_method_set_selected_palette_item: + +.. rst-class:: classref-method + +|void| **set_selected_palette_item**\ (\ item\: :ref:`int`\ ) |const| :ref:`๐Ÿ”—` + +Selects the :ref:`MeshLibrary` item with the given index in the grid map editor's palette. If a negative index is given, no item will be selected. If a value greater than the last index is given, the last item will be selected. + +\ **Note:** The indices might not be in the same order as they appear in the editor's interface. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GridMapEditorPlugin_method_set_selection: + +.. rst-class:: classref-method + +|void| **set_selection**\ (\ begin\: :ref:`Vector3i`, end\: :ref:`Vector3i`\ ) :ref:`๐Ÿ”—` + +Selects the cells inside the given bounds from ``begin`` to ``end``. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_hboxcontainer.rst b/classes/class_hboxcontainer.rst index 1d49dde3436..68675b780ec 100644 --- a/classes/class_hboxcontainer.rst +++ b/classes/class_hboxcontainer.rst @@ -12,7 +12,7 @@ HBoxContainer **Inherits:** :ref:`BoxContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`EditorResourcePicker`, :ref:`EditorToaster` +**Inherited By:** :ref:`EditorResourcePicker`, :ref:`EditorToaster`, :ref:`OpenXRInteractionProfileEditorBase` A container that arranges its child controls horizontally. diff --git a/classes/class_heightmapshape3d.rst b/classes/class_heightmapshape3d.rst index dc488e3dfd9..89a7ab44df7 100644 --- a/classes/class_heightmapshape3d.rst +++ b/classes/class_heightmapshape3d.rst @@ -30,12 +30,12 @@ A heightmap collision shape can also be build by using an :ref:`Image`. diff --git a/classes/class_input.rst b/classes/class_input.rst index ff2b8e30464..53e880cf3e4 100644 --- a/classes/class_input.rst +++ b/classes/class_input.rst @@ -644,7 +644,9 @@ Returns the current value of the joypad axis at given index (see :ref:`JoyAxis` **get_joy_guid**\ (\ device\: :ref:`int`\ ) |const| :ref:`๐Ÿ”—` -Returns an SDL2-compatible device GUID on platforms that use gamepad remapping, e.g. ``030000004c050000c405000000010000``. Returns ``"Default Gamepad"`` otherwise. Redot uses the `SDL2 game controller database `__ to determine gamepad names and mappings based on this GUID. +Returns an SDL2-compatible device GUID on platforms that use gamepad remapping, e.g. ``030000004c050000c405000000010000``. Returns an empty string if it cannot be found. Redot uses the `SDL2 game controller database `__ to determine gamepad names and mappings based on this GUID. + +On Windows, all XInput joypad GUIDs will be overridden by Redot to ``__XINPUT_DEVICE__``, because their mappings are the same. .. rst-class:: classref-item-separator @@ -658,9 +660,13 @@ Returns an SDL2-compatible device GUID on platforms that use gamepad remapping, Returns a dictionary with extra platform-specific information about the device, e.g. the raw gamepad name from the OS or the Steam Input index. -On Windows the dictionary contains the following fields: +On Windows, the dictionary contains the following fields: + +\ ``xinput_index``: The index of the controller in the XInput system. Undefined for DirectInput devices. -\ ``xinput_index``: The index of the controller in the XInput system. +\ ``vendor_id``: The USB vendor ID of the device. + +\ ``product_id``: The USB product ID of the device. On Linux: diff --git a/classes/class_inputeventmidi.rst b/classes/class_inputeventmidi.rst index 425a73ba2cc..ff72a79e1a2 100644 --- a/classes/class_inputeventmidi.rst +++ b/classes/class_inputeventmidi.rst @@ -82,6 +82,8 @@ By default, Redot does not detect MIDI devices. You need to call :ref:`OS.open_m \ **Note:** Redot does not support MIDI output, so there is no way to emit MIDI messages from Redot. Only MIDI input is supported. +\ **Note:** On the Web platform, using MIDI input requires a browser permission to be granted first. This permission request is performed when calling :ref:`OS.open_midi_inputs`. MIDI input will not work until the user accepts the permission request. + .. rst-class:: classref-introduction-group Tutorials diff --git a/classes/class_itemlist.rst b/classes/class_itemlist.rst index dedac9354c0..e657437484f 100644 --- a/classes/class_itemlist.rst +++ b/classes/class_itemlist.rst @@ -185,45 +185,51 @@ Theme Properties .. table:: :widths: auto - +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ - | :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(0, 0, 0, 1)`` | - +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ - | :ref:`Color` | :ref:`font_selected_color` | ``Color(1, 1, 1, 1)`` | - +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ - | :ref:`Color` | :ref:`guide_color` | ``Color(0.7, 0.7, 0.7, 0.25)`` | - +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ - | :ref:`int` | :ref:`h_separation` | ``4`` | - +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ - | :ref:`int` | :ref:`icon_margin` | ``4`` | - +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ - | :ref:`int` | :ref:`line_separation` | ``2`` | - +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ - | :ref:`int` | :ref:`outline_size` | ``0`` | - +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ - | :ref:`int` | :ref:`v_separation` | ``4`` | - +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ - | :ref:`Font` | :ref:`font` | | - +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ - | :ref:`int` | :ref:`font_size` | | - +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ - | :ref:`StyleBox` | :ref:`cursor` | | - +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ - | :ref:`StyleBox` | :ref:`cursor_unfocused` | | - +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ - | :ref:`StyleBox` | :ref:`focus` | | - +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ - | :ref:`StyleBox` | :ref:`hovered` | | - +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ - | :ref:`StyleBox` | :ref:`panel` | | - +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ - | :ref:`StyleBox` | :ref:`selected` | | - +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ - | :ref:`StyleBox` | :ref:`selected_focus` | | - +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ + +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+ + | :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_hovered_selected_color` | ``Color(1, 1, 1, 1)`` | + +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+ + | :ref:`Color` | :ref:`font_outline_color` | ``Color(0, 0, 0, 1)`` | + +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+ + | :ref:`Color` | :ref:`font_selected_color` | ``Color(1, 1, 1, 1)`` | + +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+ + | :ref:`Color` | :ref:`guide_color` | ``Color(0.7, 0.7, 0.7, 0.25)`` | + +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+ + | :ref:`int` | :ref:`h_separation` | ``4`` | + +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+ + | :ref:`int` | :ref:`icon_margin` | ``4`` | + +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+ + | :ref:`int` | :ref:`line_separation` | ``2`` | + +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+ + | :ref:`int` | :ref:`outline_size` | ``0`` | + +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+ + | :ref:`int` | :ref:`v_separation` | ``4`` | + +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+ + | :ref:`Font` | :ref:`font` | | + +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+ + | :ref:`int` | :ref:`font_size` | | + +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+ + | :ref:`StyleBox` | :ref:`cursor` | | + +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+ + | :ref:`StyleBox` | :ref:`cursor_unfocused` | | + +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+ + | :ref:`StyleBox` | :ref:`focus` | | + +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+ + | :ref:`StyleBox` | :ref:`hovered` | | + +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+ + | :ref:`StyleBox` | :ref:`hovered_selected` | | + +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+ + | :ref:`StyleBox` | :ref:`hovered_selected_focus` | | + +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+ + | :ref:`StyleBox` | :ref:`panel` | | + +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+ + | :ref:`StyleBox` | :ref:`selected` | | + +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+ + | :ref:`StyleBox` | :ref:`selected_focus` | | + +---------------------------------+--------------------------------------------------------------------------------------------+--------------------------------+ .. rst-class:: classref-section-separator @@ -353,6 +359,14 @@ Only allow selecting a single item. Allows selecting multiple items by holding :kbd:`Ctrl` or :kbd:`Shift`. +.. _class_ItemList_constant_SELECT_TOGGLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`SelectMode` **SELECT_TOGGLE** = ``2`` + +Allows selecting multiple items by toggling them on and off. + .. rst-class:: classref-section-separator ---- @@ -1245,6 +1259,18 @@ Text :ref:`Color` used when the item is hovered and not selected ye ---- +.. _class_ItemList_theme_color_font_hovered_selected_color: + +.. rst-class:: classref-themeproperty + +:ref:`Color` **font_hovered_selected_color** = ``Color(1, 1, 1, 1)`` :ref:`๐Ÿ”—` + +Text :ref:`Color` used when the item is hovered and selected. + +.. rst-class:: classref-item-separator + +---- + .. _class_ItemList_theme_color_font_outline_color: .. rst-class:: classref-themeproperty @@ -1263,7 +1289,7 @@ The tint of text outline of the item. :ref:`Color` **font_selected_color** = ``Color(1, 1, 1, 1)`` :ref:`๐Ÿ”—` -Text :ref:`Color` used when the item is selected. +Text :ref:`Color` used when the item is selected, but not hovered. .. rst-class:: classref-item-separator @@ -1415,6 +1441,30 @@ The focused style for the **ItemList**, drawn on top of the background, but belo ---- +.. _class_ItemList_theme_style_hovered_selected: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **hovered_selected** :ref:`๐Ÿ”—` + +:ref:`StyleBox` for the hovered and selected items, used when the **ItemList** is not being focused. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ItemList_theme_style_hovered_selected_focus: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **hovered_selected_focus** :ref:`๐Ÿ”—` + +:ref:`StyleBox` for the hovered and selected items, used when the **ItemList** is being focused. + +.. rst-class:: classref-item-separator + +---- + .. _class_ItemList_theme_style_panel: .. rst-class:: classref-themeproperty diff --git a/classes/class_json.rst b/classes/class_json.rst index e529ecee827..23c9203764d 100644 --- a/classes/class_json.rst +++ b/classes/class_json.rst @@ -80,7 +80,7 @@ Methods :widths: auto +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`from_native`\ (\ variant\: :ref:`Variant`, allow_classes\: :ref:`bool` = false, allow_scripts\: :ref:`bool` = false\ ) |static| | + | :ref:`Variant` | :ref:`from_native`\ (\ variant\: :ref:`Variant`, full_objects\: :ref:`bool` = false\ ) |static| | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_error_line`\ (\ ) |const| | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -94,7 +94,7 @@ Methods +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`stringify`\ (\ data\: :ref:`Variant`, indent\: :ref:`String` = "", sort_keys\: :ref:`bool` = true, full_precision\: :ref:`bool` = false\ ) |static| | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`to_native`\ (\ json\: :ref:`Variant`, allow_classes\: :ref:`bool` = false, allow_scripts\: :ref:`bool` = false\ ) |static| | + | :ref:`Variant` | :ref:`to_native`\ (\ json\: :ref:`Variant`, allow_objects\: :ref:`bool` = false\ ) |static| | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -132,11 +132,18 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Variant` **from_native**\ (\ variant\: :ref:`Variant`, allow_classes\: :ref:`bool` = false, allow_scripts\: :ref:`bool` = false\ ) |static| :ref:`๐Ÿ”—` +:ref:`Variant` **from_native**\ (\ variant\: :ref:`Variant`, full_objects\: :ref:`bool` = false\ ) |static| :ref:`๐Ÿ”—` -Converts a native engine type to a JSON-compliant dictionary. +Converts a native engine type to a JSON-compliant value. -By default, classes and scripts are ignored for security reasons, unless ``allow_classes`` or ``allow_scripts`` are specified. +By default, objects are ignored for security reasons, unless ``full_objects`` is ``true``. + +You can convert a native value to a JSON string like this: + +:: + + func encode_data(value, full_objects = false): + return JSON.stringify(JSON.from_native(value, full_objects)) .. rst-class:: classref-item-separator @@ -269,11 +276,18 @@ The ``indent`` parameter controls if and how something is indented; its contents .. rst-class:: classref-method -:ref:`Variant` **to_native**\ (\ json\: :ref:`Variant`, allow_classes\: :ref:`bool` = false, allow_scripts\: :ref:`bool` = false\ ) |static| :ref:`๐Ÿ”—` +:ref:`Variant` **to_native**\ (\ json\: :ref:`Variant`, allow_objects\: :ref:`bool` = false\ ) |static| :ref:`๐Ÿ”—` -Converts a JSON-compliant dictionary that was created with :ref:`from_native` back to native engine types. +Converts a JSON-compliant value that was created with :ref:`from_native` back to native engine types. + +By default, objects are ignored for security reasons, unless ``allow_objects`` is ``true``. + +You can convert a JSON string back to a native value like this: + +:: -By default, classes and scripts are ignored for security reasons, unless ``allow_classes`` or ``allow_scripts`` are specified. + func decode_data(string, allow_objects = false): + return JSON.to_native(JSON.parse_string(string), allow_objects) .. |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_label.rst b/classes/class_label.rst index 262220f393e..9d2c8a6f026 100644 --- a/classes/class_label.rst +++ b/classes/class_label.rst @@ -60,6 +60,8 @@ Properties +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ | :ref:`MouseFilter` | mouse_filter | ``2`` (overrides :ref:`Control`) | +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`paragraph_separator` | ``"\\n"`` | + +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ | |bitfield|\[:ref:`SizeFlags`\] | size_flags_vertical | ``4`` (overrides :ref:`Control`) | +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ | :ref:`StructuredTextParser` | :ref:`structured_text_bidi_override` | ``0`` | @@ -124,6 +126,8 @@ Theme Properties +---------------------------------+----------------------------------------------------------------------------+-----------------------+ | :ref:`int` | :ref:`outline_size` | ``0`` | +---------------------------------+----------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`paragraph_spacing` | ``0`` | + +---------------------------------+----------------------------------------------------------------------------+-----------------------+ | :ref:`int` | :ref:`shadow_offset_x` | ``1`` | +---------------------------------+----------------------------------------------------------------------------+-----------------------+ | :ref:`int` | :ref:`shadow_offset_y` | ``1`` | @@ -299,6 +303,23 @@ Limits the lines of text the node shows on screen. ---- +.. _class_Label_property_paragraph_separator: + +.. rst-class:: classref-property + +:ref:`String` **paragraph_separator** = ``"\\n"`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_paragraph_separator**\ (\ value\: :ref:`String`\ ) +- :ref:`String` **get_paragraph_separator**\ (\ ) + +String used as a paragraph separator. Each paragraph is processed independently, in its own BiDi context. + +.. rst-class:: classref-item-separator + +---- + .. _class_Label_property_structured_text_bidi_override: .. rst-class:: classref-property @@ -630,6 +651,18 @@ Text outline size. ---- +.. _class_Label_theme_constant_paragraph_spacing: + +.. rst-class:: classref-themeproperty + +:ref:`int` **paragraph_spacing** = ``0`` :ref:`๐Ÿ”—` + +Vertical space between paragraphs. Added on top of :ref:`line_spacing`. + +.. rst-class:: classref-item-separator + +---- + .. _class_Label_theme_constant_shadow_offset_x: .. rst-class:: classref-themeproperty diff --git a/classes/class_labelsettings.rst b/classes/class_labelsettings.rst index b3b5228bbfd..21e0b83191b 100644 --- a/classes/class_labelsettings.rst +++ b/classes/class_labelsettings.rst @@ -29,25 +29,27 @@ Properties .. table:: :widths: auto - +-------------------------------+------------------------------------------------------------------+-----------------------+ - | :ref:`Font` | :ref:`font` | | - +-------------------------------+------------------------------------------------------------------+-----------------------+ - | :ref:`Color` | :ref:`font_color` | ``Color(1, 1, 1, 1)`` | - +-------------------------------+------------------------------------------------------------------+-----------------------+ - | :ref:`int` | :ref:`font_size` | ``16`` | - +-------------------------------+------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`line_spacing` | ``3.0`` | - +-------------------------------+------------------------------------------------------------------+-----------------------+ - | :ref:`Color` | :ref:`outline_color` | ``Color(1, 1, 1, 1)`` | - +-------------------------------+------------------------------------------------------------------+-----------------------+ - | :ref:`int` | :ref:`outline_size` | ``0`` | - +-------------------------------+------------------------------------------------------------------+-----------------------+ - | :ref:`Color` | :ref:`shadow_color` | ``Color(0, 0, 0, 0)`` | - +-------------------------------+------------------------------------------------------------------+-----------------------+ - | :ref:`Vector2` | :ref:`shadow_offset` | ``Vector2(1, 1)`` | - +-------------------------------+------------------------------------------------------------------+-----------------------+ - | :ref:`int` | :ref:`shadow_size` | ``1`` | - +-------------------------------+------------------------------------------------------------------+-----------------------+ + +-------------------------------+--------------------------------------------------------------------------+-----------------------+ + | :ref:`Font` | :ref:`font` | | + +-------------------------------+--------------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`font_color` | ``Color(1, 1, 1, 1)`` | + +-------------------------------+--------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`font_size` | ``16`` | + +-------------------------------+--------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`line_spacing` | ``3.0`` | + +-------------------------------+--------------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`outline_color` | ``Color(1, 1, 1, 1)`` | + +-------------------------------+--------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`outline_size` | ``0`` | + +-------------------------------+--------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`paragraph_spacing` | ``0.0`` | + +-------------------------------+--------------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`shadow_color` | ``Color(0, 0, 0, 0)`` | + +-------------------------------+--------------------------------------------------------------------------+-----------------------+ + | :ref:`Vector2` | :ref:`shadow_offset` | ``Vector2(1, 1)`` | + +-------------------------------+--------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`shadow_size` | ``1`` | + +-------------------------------+--------------------------------------------------------------------------+-----------------------+ .. rst-class:: classref-section-separator @@ -160,6 +162,23 @@ Text outline size. ---- +.. _class_LabelSettings_property_paragraph_spacing: + +.. rst-class:: classref-property + +:ref:`float` **paragraph_spacing** = ``0.0`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_paragraph_spacing**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_paragraph_spacing**\ (\ ) + +Vertical space between paragraphs. Added on top of :ref:`line_spacing`. + +.. rst-class:: classref-item-separator + +---- + .. _class_LabelSettings_property_shadow_color: .. rst-class:: classref-property diff --git a/classes/class_light3d.rst b/classes/class_light3d.rst index a50ad36ee06..a74e1bb88ce 100644 --- a/classes/class_light3d.rst +++ b/classes/class_light3d.rst @@ -75,7 +75,7 @@ Properties +----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ | :ref:`float` | :ref:`light_size` | ``0.0`` | +----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`light_specular` | ``0.5`` | + | :ref:`float` | :ref:`light_specular` | ``1.0`` | +----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ | :ref:`float` | :ref:`light_temperature` | | +----------------------------------------+----------------------------------------------------------------------------------------+-----------------------+ @@ -658,7 +658,7 @@ The size of the light in Redot units. Only available for :ref:`OmniLight3D` **light_specular** = ``0.5`` :ref:`๐Ÿ”—` +:ref:`float` **light_specular** = ``1.0`` :ref:`๐Ÿ”—` .. rst-class:: classref-property-setget diff --git a/classes/class_lightmapgi.rst b/classes/class_lightmapgi.rst index 3456cfed42f..9089967d527 100644 --- a/classes/class_lightmapgi.rst +++ b/classes/class_lightmapgi.rst @@ -29,7 +29,9 @@ The **LightmapGI** node is used to compute and store baked lightmaps. Lightmaps \ **Note:** Lightmap baking on :ref:`CSGShape3D`\ s and :ref:`PrimitiveMesh`\ es is not supported, as these cannot store UV2 data required for baking. -\ **Note:** If no custom lightmappers are installed, **LightmapGI** can only be baked from devices that support the Forward+ or Mobile rendering backends. +\ **Note:** If no custom lightmappers are installed, **LightmapGI** can only be baked from devices that support the Forward+ or Mobile renderers. + +\ **Note:** The **LightmapGI** node only bakes light data for child nodes of its parent. Nodes further up the hierarchy of the scene will not be baked. .. rst-class:: classref-introduction-group @@ -46,45 +48,47 @@ Properties .. table:: :widths: auto - +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ - | :ref:`float` | :ref:`bias` | ``0.0005`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ - | :ref:`float` | :ref:`bounce_indirect_energy` | ``1.0`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ - | :ref:`int` | :ref:`bounces` | ``3`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ - | :ref:`CameraAttributes` | :ref:`camera_attributes` | | - +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ - | :ref:`int` | :ref:`denoiser_range` | ``10`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ - | :ref:`float` | :ref:`denoiser_strength` | ``0.1`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ - | :ref:`bool` | :ref:`directional` | ``false`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ - | :ref:`Color` | :ref:`environment_custom_color` | | - +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ - | :ref:`float` | :ref:`environment_custom_energy` | | - +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ - | :ref:`Sky` | :ref:`environment_custom_sky` | | - +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ - | :ref:`EnvironmentMode` | :ref:`environment_mode` | ``1`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ - | :ref:`GenerateProbes` | :ref:`generate_probes_subdiv` | ``2`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ - | :ref:`bool` | :ref:`interior` | ``false`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ - | :ref:`LightmapGIData` | :ref:`light_data` | | - +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ - | :ref:`int` | :ref:`max_texture_size` | ``16384`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ - | :ref:`BakeQuality` | :ref:`quality` | ``1`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ - | :ref:`float` | :ref:`texel_scale` | ``1.0`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ - | :ref:`bool` | :ref:`use_denoiser` | ``true`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ - | :ref:`bool` | :ref:`use_texture_for_bounces` | ``true`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + +-----------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`bias` | ``0.0005`` | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`bounce_indirect_energy` | ``1.0`` | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`int` | :ref:`bounces` | ``3`` | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`CameraAttributes` | :ref:`camera_attributes` | | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`int` | :ref:`denoiser_range` | ``10`` | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`denoiser_strength` | ``0.1`` | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`bool` | :ref:`directional` | ``false`` | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`Color` | :ref:`environment_custom_color` | | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`environment_custom_energy` | | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`Sky` | :ref:`environment_custom_sky` | | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`EnvironmentMode` | :ref:`environment_mode` | ``1`` | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`GenerateProbes` | :ref:`generate_probes_subdiv` | ``2`` | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`bool` | :ref:`interior` | ``false`` | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`LightmapGIData` | :ref:`light_data` | | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`int` | :ref:`max_texture_size` | ``16384`` | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`BakeQuality` | :ref:`quality` | ``1`` | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`ShadowmaskMode` | :ref:`shadowmask_mode` | ``0`` | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`texel_scale` | ``1.0`` | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`bool` | :ref:`use_denoiser` | ``true`` | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`bool` | :ref:`use_texture_for_bounces` | ``true`` | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ .. rst-class:: classref-section-separator @@ -624,6 +628,29 @@ To further speed up bake times, decrease :ref:`bounces` **shadowmask_mode** = ``0`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_shadowmask_mode**\ (\ value\: :ref:`ShadowmaskMode`\ ) +- :ref:`ShadowmaskMode` **get_shadowmask_mode**\ (\ ) + +**Experimental:** This property may be changed or removed in future versions. + +The shadowmasking policy to use for directional shadows on static objects that are baked with this **LightmapGI** instance. + +Shadowmasking allows :ref:`DirectionalLight3D` nodes to cast shadows even outside the range defined by their :ref:`DirectionalLight3D.directional_shadow_max_distance` property. This is done by baking a texture that contains a shadowmap for the directional light, then using this texture according to the current shadowmask mode. + +\ **Note:** The shadowmask texture is only created if :ref:`shadowmask_mode` is not :ref:`LightmapGIData.SHADOWMASK_MODE_NONE`. To see a difference, you need to bake lightmaps again after switching from :ref:`LightmapGIData.SHADOWMASK_MODE_NONE` to any other mode. + +.. rst-class:: classref-item-separator + +---- + .. _class_LightmapGI_property_texel_scale: .. rst-class:: classref-property diff --git a/classes/class_lightmapgidata.rst b/classes/class_lightmapgidata.rst index 973e8978559..8415cca7e26 100644 --- a/classes/class_lightmapgidata.rst +++ b/classes/class_lightmapgidata.rst @@ -29,11 +29,13 @@ Properties .. table:: :widths: auto - +--------------------------------------------------------------------------+---------------------------------------------------------------------------+--------+ - | :ref:`TextureLayered` | :ref:`light_texture` | | - +--------------------------------------------------------------------------+---------------------------------------------------------------------------+--------+ - | :ref:`Array`\[:ref:`TextureLayered`\] | :ref:`lightmap_textures` | ``[]`` | - +--------------------------------------------------------------------------+---------------------------------------------------------------------------+--------+ + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------+--------+ + | :ref:`TextureLayered` | :ref:`light_texture` | | + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------+--------+ + | :ref:`Array`\[:ref:`TextureLayered`\] | :ref:`lightmap_textures` | ``[]`` | + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------+--------+ + | :ref:`Array`\[:ref:`TextureLayered`\] | :ref:`shadowmask_textures` | ``[]`` | + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------+--------+ .. rst-class:: classref-reftable-group @@ -63,6 +65,45 @@ Methods .. rst-class:: classref-descriptions-group +Enumerations +------------ + +.. _enum_LightmapGIData_ShadowmaskMode: + +.. rst-class:: classref-enumeration + +enum **ShadowmaskMode**: :ref:`๐Ÿ”—` + +.. _class_LightmapGIData_constant_SHADOWMASK_MODE_NONE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShadowmaskMode` **SHADOWMASK_MODE_NONE** = ``0`` + +Shadowmasking is disabled. No shadowmask texture will be created when baking lightmaps. Existing shadowmask textures will be removed during baking. + +.. _class_LightmapGIData_constant_SHADOWMASK_MODE_REPLACE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShadowmaskMode` **SHADOWMASK_MODE_REPLACE** = ``1`` + +Shadowmasking is enabled. Directional shadows that are outside the :ref:`DirectionalLight3D.directional_shadow_max_distance` will be rendered using the shadowmask texture. Shadows that are inside the range will be rendered using real-time shadows exclusively. This mode allows for more precise real-time shadows up close, without the potential "smearing" effect that can occur when using lightmaps with a high texel size. The downside is that when the camera moves fast, the transition between the real-time light and shadowmask can be obvious. Also, objects that only have shadows baked in the shadowmask (and no real-time shadows) won't display any shadows up close. + +.. _class_LightmapGIData_constant_SHADOWMASK_MODE_OVERLAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`ShadowmaskMode` **SHADOWMASK_MODE_OVERLAY** = ``2`` + +Shadowmasking is enabled. Directional shadows will be rendered with real-time shadows overlaid on top of the shadowmask texture. This mode makes for smoother shadow transitions when the camera moves fast, at the cost of a potential smearing effect for directional shadows that are up close (due to the real-time shadow being mixed with a low-resolution shadowmask). Objects that only have shadows baked in the shadowmask (and no real-time shadows) will keep their shadows up close. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- @@ -98,6 +139,23 @@ The lightmap atlas texture generated by the lightmapper. The lightmap atlas textures generated by the lightmapper. +.. rst-class:: classref-item-separator + +---- + +.. _class_LightmapGIData_property_shadowmask_textures: + +.. rst-class:: classref-property + +:ref:`Array`\[:ref:`TextureLayered`\] **shadowmask_textures** = ``[]`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_shadowmask_textures**\ (\ value\: :ref:`Array`\[:ref:`TextureLayered`\]\ ) +- :ref:`Array`\[:ref:`TextureLayered`\] **get_shadowmask_textures**\ (\ ) + +The shadowmask atlas textures generated by the lightmapper. + .. rst-class:: classref-section-separator ---- diff --git a/classes/class_lightmapperrd.rst b/classes/class_lightmapperrd.rst index dbd666c900e..b003d41d1e7 100644 --- a/classes/class_lightmapperrd.rst +++ b/classes/class_lightmapperrd.rst @@ -21,7 +21,7 @@ Description LightmapperRD ("RD" stands for :ref:`RenderingDevice`) is the built-in GPU-based lightmapper for use with :ref:`LightmapGI`. On most dedicated GPUs, it can bake lightmaps much faster than most CPU-based lightmappers. LightmapperRD uses compute shaders to bake lightmaps, so it does not require CUDA or OpenCL libraries to be installed to be usable. -\ **Note:** Only usable when using the Vulkan backend (Forward+ or Mobile), not OpenGL. +\ **Note:** Only usable when using the RenderingDevice backend (Forward+ or Mobile renderers), not Compatibility. .. |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_line2d.rst b/classes/class_line2d.rst index 1fc93187e1e..be60504283a 100644 --- a/classes/class_line2d.rst +++ b/classes/class_line2d.rst @@ -450,7 +450,7 @@ The polyline's width. - |void| **set_curve**\ (\ value\: :ref:`Curve`\ ) - :ref:`Curve` **get_curve**\ (\ ) -The polyline's width curve. The width of the polyline over its length will be equivalent to the value of the width curve over its domain. +The polyline's width curve. The width of the polyline over its length will be equivalent to the value of the width curve over its domain. The width curve should be a unit :ref:`Curve`. .. rst-class:: classref-section-separator diff --git a/classes/class_lookatmodifier3d.rst b/classes/class_lookatmodifier3d.rst index 4bd2f62fe8c..6e67af65bac 100644 --- a/classes/class_lookatmodifier3d.rst +++ b/classes/class_lookatmodifier3d.rst @@ -12,14 +12,14 @@ LookAtModifier3D **Inherits:** :ref:`SkeletonModifier3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -The :ref:`SkeletonModifier3D` rotates a bone to look a target. +The **LookAtModifier3D** rotates a bone to look at a target. .. rst-class:: classref-introduction-group Description ----------- -This :ref:`SkeletonModifier3D` rotates a bone to look a target. This is helpful for moving character's head to look at the player, rotating a turret to look at a target, or any other case where you want to make a bone rotate towards something quickly and easily. +This :ref:`SkeletonModifier3D` rotates a bone to look at a target. This is helpful for moving a character's head to look at the player, rotating a turret to look at a target, or any other case where you want to make a bone rotate towards something quickly and easily. When applying multiple **LookAtModifier3D**\ s, the **LookAtModifier3D** assigned to the parent bone must be put above the **LookAtModifier3D** assigned to the child bone in the list in order for the child bone results to be correct. @@ -32,7 +32,9 @@ Properties :widths: auto +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+ - | :ref:`int` | :ref:`bone` | ``0`` | + | :ref:`int` | :ref:`bone` | ``-1`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`String` | :ref:`bone_name` | ``""`` | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+ | :ref:`float` | :ref:`duration` | ``0.0`` | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+ @@ -42,6 +44,8 @@ Properties +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+ | :ref:`int` | :ref:`origin_bone` | | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`String` | :ref:`origin_bone_name` | | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+ | :ref:`NodePath` | :ref:`origin_external_node` | | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+ | :ref:`OriginFrom` | :ref:`origin_from` | ``0`` | @@ -62,7 +66,7 @@ Properties +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+ | :ref:`float` | :ref:`primary_positive_limit_angle` | | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+ - | Vector3.Axis | :ref:`primary_rotation_axis` | ``1`` | + | :ref:`Axis` | :ref:`primary_rotation_axis` | ``1`` | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+ | :ref:`float` | :ref:`secondary_damp_threshold` | | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+ @@ -217,14 +221,31 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int` **bone** = ``0`` :ref:`๐Ÿ”—` +:ref:`int` **bone** = ``-1`` :ref:`๐Ÿ”—` .. rst-class:: classref-property-setget - |void| **set_bone**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_bone**\ (\ ) -The bone index of the :ref:`Skeleton3D` that the modification will operate on. +Index of the :ref:`bone_name` in the parent :ref:`Skeleton3D`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LookAtModifier3D_property_bone_name: + +.. rst-class:: classref-property + +:ref:`String` **bone_name** = ``""`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_bone_name**\ (\ value\: :ref:`String`\ ) +- :ref:`String` **get_bone_name**\ (\ ) + +The bone name of the :ref:`Skeleton3D` that the modification will operate on. .. rst-class:: classref-item-separator @@ -298,6 +319,23 @@ The forward axis of the bone. This :ref:`SkeletonModifier3D`\ ) - :ref:`int` **get_origin_bone**\ (\ ) +Index of the :ref:`origin_bone_name` in the parent :ref:`Skeleton3D`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LookAtModifier3D_property_origin_bone_name: + +.. rst-class:: classref-property + +:ref:`String` **origin_bone_name** :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_origin_bone_name**\ (\ value\: :ref:`String`\ ) +- :ref:`String` **get_origin_bone_name**\ (\ ) + If :ref:`origin_from` is :ref:`ORIGIN_FROM_SPECIFIC_BONE`, the bone global pose position specified for this is used as origin. .. rst-class:: classref-item-separator @@ -482,12 +520,12 @@ The limit angle of positive side of the primary rotation when :ref:`symmetry_lim .. rst-class:: classref-property -Vector3.Axis **primary_rotation_axis** = ``1`` :ref:`๐Ÿ”—` +:ref:`Axis` **primary_rotation_axis** = ``1`` :ref:`๐Ÿ”—` .. rst-class:: classref-property-setget -- |void| **set_primary_rotation_axis**\ (\ value\: Vector3.Axis\ ) -- Vector3.Axis **get_primary_rotation_axis**\ (\ ) +- |void| **set_primary_rotation_axis**\ (\ value\: :ref:`Axis`\ ) +- :ref:`Axis` **get_primary_rotation_axis**\ (\ ) The axis of the first rotation. This :ref:`SkeletonModifier3D` works by compositing the rotation by Euler angles to prevent to rotate the :ref:`forward_axis`. diff --git a/classes/class_mainloop.rst b/classes/class_mainloop.rst index a8354fc6a57..31dea51d09b 100644 --- a/classes/class_mainloop.rst +++ b/classes/class_mainloop.rst @@ -266,6 +266,8 @@ Called each physics frame with the time since the last physics frame as argument If implemented, the method must return a boolean value. ``true`` ends the main loop, while ``false`` lets it proceed to the next frame. +\ **Note:** ``delta`` will be larger than expected if running at a framerate lower than :ref:`Engine.physics_ticks_per_second` / :ref:`Engine.max_physics_steps_per_frame` FPS. This is done to avoid "spiral of death" scenarios where performance would plummet due to an ever-increasing number of physics steps per frame. This behavior affects both :ref:`_process` and :ref:`_physics_process`. As a result, avoid using ``delta`` for time measurements in real-world seconds. Use the :ref:`Time` singleton's methods for this purpose instead, such as :ref:`Time.get_ticks_usec`. + .. rst-class:: classref-item-separator ---- @@ -280,6 +282,8 @@ Called each process (idle) frame with the time since the last process frame as a If implemented, the method must return a boolean value. ``true`` ends the main loop, while ``false`` lets it proceed to the next frame. +\ **Note:** ``delta`` will be larger than expected if running at a framerate lower than :ref:`Engine.physics_ticks_per_second` / :ref:`Engine.max_physics_steps_per_frame` FPS. This is done to avoid "spiral of death" scenarios where performance would plummet due to an ever-increasing number of physics steps per frame. This behavior affects both :ref:`_process` and :ref:`_physics_process`. As a result, avoid using ``delta`` for time measurements in real-world seconds. Use the :ref:`Time` singleton's methods for this purpose instead, such as :ref:`Time.get_ticks_usec`. + .. |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_menubar.rst b/classes/class_menubar.rst index eb42ac43fa9..94f16679b13 100644 --- a/classes/class_menubar.rst +++ b/classes/class_menubar.rst @@ -19,7 +19,7 @@ A horizontal menu bar that creates a menu for each :ref:`PopupMenu` child. New items are created by adding :ref:`PopupMenu`\ s to this node. +A horizontal menu bar that creates a menu for each :ref:`PopupMenu` child. New items are created by adding :ref:`PopupMenu`\ s to this node. Item title is determined by :ref:`Window.title`, or node name if :ref:`Window.title` is empty. Item title can be overridden using :ref:`set_menu_title`. .. rst-class:: classref-reftable-group diff --git a/classes/class_meshlibrary.rst b/classes/class_meshlibrary.rst index f0078f9ce7d..3fb9610304d 100644 --- a/classes/class_meshlibrary.rst +++ b/classes/class_meshlibrary.rst @@ -38,51 +38,55 @@ Methods .. table:: :widths: auto - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`clear`\ (\ ) | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`create_item`\ (\ id\: :ref:`int`\ ) | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`find_item_by_name`\ (\ name\: :ref:`String`\ ) |const| | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array` | :ref:`get_item_list`\ (\ ) |const| | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Mesh` | :ref:`get_item_mesh`\ (\ id\: :ref:`int`\ ) |const| | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`get_item_mesh_transform`\ (\ id\: :ref:`int`\ ) |const| | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_item_name`\ (\ id\: :ref:`int`\ ) |const| | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_item_navigation_layers`\ (\ id\: :ref:`int`\ ) |const| | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`NavigationMesh` | :ref:`get_item_navigation_mesh`\ (\ id\: :ref:`int`\ ) |const| | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`get_item_navigation_mesh_transform`\ (\ id\: :ref:`int`\ ) |const| | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D` | :ref:`get_item_preview`\ (\ id\: :ref:`int`\ ) |const| | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`get_item_shapes`\ (\ id\: :ref:`int`\ ) |const| | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_last_unused_item_id`\ (\ ) |const| | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`remove_item`\ (\ id\: :ref:`int`\ ) | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_item_mesh`\ (\ id\: :ref:`int`, mesh\: :ref:`Mesh`\ ) | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_item_mesh_transform`\ (\ id\: :ref:`int`, mesh_transform\: :ref:`Transform3D`\ ) | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_item_name`\ (\ id\: :ref:`int`, name\: :ref:`String`\ ) | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_item_navigation_layers`\ (\ id\: :ref:`int`, navigation_layers\: :ref:`int`\ ) | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_item_navigation_mesh`\ (\ id\: :ref:`int`, navigation_mesh\: :ref:`NavigationMesh`\ ) | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_item_navigation_mesh_transform`\ (\ id\: :ref:`int`, navigation_mesh\: :ref:`Transform3D`\ ) | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_item_preview`\ (\ id\: :ref:`int`, texture\: :ref:`Texture2D`\ ) | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_item_shapes`\ (\ id\: :ref:`int`, shapes\: :ref:`Array`\ ) | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear`\ (\ ) | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`create_item`\ (\ id\: :ref:`int`\ ) | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`find_item_by_name`\ (\ name\: :ref:`String`\ ) |const| | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_item_list`\ (\ ) |const| | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Mesh` | :ref:`get_item_mesh`\ (\ id\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ShadowCastingSetting` | :ref:`get_item_mesh_cast_shadow`\ (\ id\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`get_item_mesh_transform`\ (\ id\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_item_name`\ (\ id\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_item_navigation_layers`\ (\ id\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NavigationMesh` | :ref:`get_item_navigation_mesh`\ (\ id\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`get_item_navigation_mesh_transform`\ (\ id\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`get_item_preview`\ (\ id\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`get_item_shapes`\ (\ id\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_last_unused_item_id`\ (\ ) |const| | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_item`\ (\ id\: :ref:`int`\ ) | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_mesh`\ (\ id\: :ref:`int`, mesh\: :ref:`Mesh`\ ) | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_mesh_cast_shadow`\ (\ id\: :ref:`int`, shadow_casting_setting\: :ref:`ShadowCastingSetting`\ ) | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_mesh_transform`\ (\ id\: :ref:`int`, mesh_transform\: :ref:`Transform3D`\ ) | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_name`\ (\ id\: :ref:`int`, name\: :ref:`String`\ ) | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_navigation_layers`\ (\ id\: :ref:`int`, navigation_layers\: :ref:`int`\ ) | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_navigation_mesh`\ (\ id\: :ref:`int`, navigation_mesh\: :ref:`NavigationMesh`\ ) | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_navigation_mesh_transform`\ (\ id\: :ref:`int`, navigation_mesh\: :ref:`Transform3D`\ ) | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_preview`\ (\ id\: :ref:`int`, texture\: :ref:`Texture2D`\ ) | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_shapes`\ (\ id\: :ref:`int`, shapes\: :ref:`Array`\ ) | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -155,6 +159,18 @@ Returns the item's mesh. ---- +.. _class_MeshLibrary_method_get_item_mesh_cast_shadow: + +.. rst-class:: classref-method + +:ref:`ShadowCastingSetting` **get_item_mesh_cast_shadow**\ (\ id\: :ref:`int`\ ) |const| :ref:`๐Ÿ”—` + +Returns the item's shadow casting mode. See :ref:`ShadowCastingSetting` for possible values. + +.. rst-class:: classref-item-separator + +---- + .. _class_MeshLibrary_method_get_item_mesh_transform: .. rst-class:: classref-method @@ -277,6 +293,18 @@ Sets the item's mesh. ---- +.. _class_MeshLibrary_method_set_item_mesh_cast_shadow: + +.. rst-class:: classref-method + +|void| **set_item_mesh_cast_shadow**\ (\ id\: :ref:`int`, shadow_casting_setting\: :ref:`ShadowCastingSetting`\ ) :ref:`๐Ÿ”—` + +Sets the item's shadow casting mode. See :ref:`ShadowCastingSetting` for possible values. + +.. rst-class:: classref-item-separator + +---- + .. _class_MeshLibrary_method_set_item_mesh_transform: .. rst-class:: classref-method diff --git a/classes/class_navigationpathqueryparameters2d.rst b/classes/class_navigationpathqueryparameters2d.rst index 701368d5750..df4110c29de 100644 --- a/classes/class_navigationpathqueryparameters2d.rst +++ b/classes/class_navigationpathqueryparameters2d.rst @@ -107,6 +107,14 @@ Applies a funnel algorithm to the raw path corridor found by the pathfinding alg Centers every path position in the middle of the traveled navigation mesh polygon edge. This creates better paths for tile- or gridbased layouts that restrict the movement to the cells center. +.. _class_NavigationPathQueryParameters2D_constant_PATH_POSTPROCESSING_NONE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PathPostProcessing` **PATH_POSTPROCESSING_NONE** = ``2`` + +Applies no postprocessing and returns the raw path corridor as found by the pathfinding algorithm. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_navigationpathqueryparameters3d.rst b/classes/class_navigationpathqueryparameters3d.rst index 39e6a727ae7..07c44786d00 100644 --- a/classes/class_navigationpathqueryparameters3d.rst +++ b/classes/class_navigationpathqueryparameters3d.rst @@ -107,6 +107,14 @@ Applies a funnel algorithm to the raw path corridor found by the pathfinding alg Centers every path position in the middle of the traveled navigation mesh polygon edge. This creates better paths for tile- or gridbased layouts that restrict the movement to the cells center. +.. _class_NavigationPathQueryParameters3D_constant_PATH_POSTPROCESSING_NONE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PathPostProcessing` **PATH_POSTPROCESSING_NONE** = ``2`` + +Applies no postprocessing and returns the raw path corridor as found by the pathfinding algorithm. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_navigationserver2d.rst b/classes/class_navigationserver2d.rst index dbfa770dcb4..088416cf317 100644 --- a/classes/class_navigationserver2d.rst +++ b/classes/class_navigationserver2d.rst @@ -193,7 +193,7 @@ Methods +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`RID`\] | :ref:`map_get_obstacles`\ (\ map\: :ref:`RID`\ ) |const| | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array` | :ref:`map_get_path`\ (\ map\: :ref:`RID`, origin\: :ref:`Vector2`, destination\: :ref:`Vector2`, optimize\: :ref:`bool`, navigation_layers\: :ref:`int` = 1\ ) |const| | + | :ref:`PackedVector2Array` | :ref:`map_get_path`\ (\ map\: :ref:`RID`, origin\: :ref:`Vector2`, destination\: :ref:`Vector2`, optimize\: :ref:`bool`, navigation_layers\: :ref:`int` = 1\ ) | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`map_get_random_point`\ (\ map\: :ref:`RID`, navigation_layers\: :ref:`int`, uniformly\: :ref:`bool`\ ) |const| | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -249,7 +249,7 @@ Methods +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`parse_source_geometry_data`\ (\ navigation_polygon\: :ref:`NavigationPolygon`, source_geometry_data\: :ref:`NavigationMeshSourceGeometryData2D`, root_node\: :ref:`Node`, callback\: :ref:`Callable` = Callable()\ ) | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`query_path`\ (\ parameters\: :ref:`NavigationPathQueryParameters2D`, result\: :ref:`NavigationPathQueryResult2D`\ ) |const| | + | |void| | :ref:`query_path`\ (\ parameters\: :ref:`NavigationPathQueryParameters2D`, result\: :ref:`NavigationPathQueryResult2D`, callback\: :ref:`Callable` = Callable()\ ) | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`region_create`\ (\ ) | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -1190,7 +1190,7 @@ Returns all navigation obstacle :ref:`RID`\ s that are currently assi .. rst-class:: classref-method -:ref:`PackedVector2Array` **map_get_path**\ (\ map\: :ref:`RID`, origin\: :ref:`Vector2`, destination\: :ref:`Vector2`, optimize\: :ref:`bool`, navigation_layers\: :ref:`int` = 1\ ) |const| :ref:`๐Ÿ”—` +:ref:`PackedVector2Array` **map_get_path**\ (\ map\: :ref:`RID`, origin\: :ref:`Vector2`, destination\: :ref:`Vector2`, optimize\: :ref:`bool`, navigation_layers\: :ref:`int` = 1\ ) :ref:`๐Ÿ”—` Returns the navigation path to reach the destination from the origin. ``navigation_layers`` is a bitmask of all region navigation layers that are allowed to be in the path. @@ -1534,9 +1534,9 @@ Parses the :ref:`SceneTree` for source geometry according to th .. rst-class:: classref-method -|void| **query_path**\ (\ parameters\: :ref:`NavigationPathQueryParameters2D`, result\: :ref:`NavigationPathQueryResult2D`\ ) |const| :ref:`๐Ÿ”—` +|void| **query_path**\ (\ parameters\: :ref:`NavigationPathQueryParameters2D`, result\: :ref:`NavigationPathQueryResult2D`, callback\: :ref:`Callable` = Callable()\ ) :ref:`๐Ÿ”—` -Queries a path in a given navigation map. Start and target position and other parameters are defined through :ref:`NavigationPathQueryParameters2D`. Updates the provided :ref:`NavigationPathQueryResult2D` result object with the path among other results requested by the query. +Queries a path in a given navigation map. Start and target position and other parameters are defined through :ref:`NavigationPathQueryParameters2D`. Updates the provided :ref:`NavigationPathQueryResult2D` result object with the path among other results requested by the query. After the process is finished the optional ``callback`` will be called. .. rst-class:: classref-item-separator diff --git a/classes/class_navigationserver3d.rst b/classes/class_navigationserver3d.rst index 322e1c4c8d0..c719cc9c143 100644 --- a/classes/class_navigationserver3d.rst +++ b/classes/class_navigationserver3d.rst @@ -211,7 +211,7 @@ Methods +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`RID`\] | :ref:`map_get_obstacles`\ (\ map\: :ref:`RID`\ ) |const| | +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector3Array` | :ref:`map_get_path`\ (\ map\: :ref:`RID`, origin\: :ref:`Vector3`, destination\: :ref:`Vector3`, optimize\: :ref:`bool`, navigation_layers\: :ref:`int` = 1\ ) |const| | + | :ref:`PackedVector3Array` | :ref:`map_get_path`\ (\ map\: :ref:`RID`, origin\: :ref:`Vector3`, destination\: :ref:`Vector3`, optimize\: :ref:`bool`, navigation_layers\: :ref:`int` = 1\ ) | +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`map_get_random_point`\ (\ map\: :ref:`RID`, navigation_layers\: :ref:`int`, uniformly\: :ref:`bool`\ ) |const| | +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -283,7 +283,7 @@ Methods +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`parse_source_geometry_data`\ (\ navigation_mesh\: :ref:`NavigationMesh`, source_geometry_data\: :ref:`NavigationMeshSourceGeometryData3D`, root_node\: :ref:`Node`, callback\: :ref:`Callable` = Callable()\ ) | +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`query_path`\ (\ parameters\: :ref:`NavigationPathQueryParameters3D`, result\: :ref:`NavigationPathQueryResult3D`\ ) |const| | + | |void| | :ref:`query_path`\ (\ parameters\: :ref:`NavigationPathQueryParameters3D`, result\: :ref:`NavigationPathQueryResult3D`, callback\: :ref:`Callable` = Callable()\ ) | +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`region_bake_navigation_mesh`\ (\ navigation_mesh\: :ref:`NavigationMesh`, root_node\: :ref:`Node`\ ) | +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -1453,7 +1453,7 @@ Returns all navigation obstacle :ref:`RID`\ s that are currently assi .. rst-class:: classref-method -:ref:`PackedVector3Array` **map_get_path**\ (\ map\: :ref:`RID`, origin\: :ref:`Vector3`, destination\: :ref:`Vector3`, optimize\: :ref:`bool`, navigation_layers\: :ref:`int` = 1\ ) |const| :ref:`๐Ÿ”—` +:ref:`PackedVector3Array` **map_get_path**\ (\ map\: :ref:`RID`, origin\: :ref:`Vector3`, destination\: :ref:`Vector3`, optimize\: :ref:`bool`, navigation_layers\: :ref:`int` = 1\ ) :ref:`๐Ÿ”—` Returns the navigation path to reach the destination from the origin. ``navigation_layers`` is a bitmask of all region navigation layers that are allowed to be in the path. @@ -1893,9 +1893,9 @@ Parses the :ref:`SceneTree` for source geometry according to th .. rst-class:: classref-method -|void| **query_path**\ (\ parameters\: :ref:`NavigationPathQueryParameters3D`, result\: :ref:`NavigationPathQueryResult3D`\ ) |const| :ref:`๐Ÿ”—` +|void| **query_path**\ (\ parameters\: :ref:`NavigationPathQueryParameters3D`, result\: :ref:`NavigationPathQueryResult3D`, callback\: :ref:`Callable` = Callable()\ ) :ref:`๐Ÿ”—` -Queries a path in a given navigation map. Start and target position and other parameters are defined through :ref:`NavigationPathQueryParameters3D`. Updates the provided :ref:`NavigationPathQueryResult3D` result object with the path among other results requested by the query. +Queries a path in a given navigation map. Start and target position and other parameters are defined through :ref:`NavigationPathQueryParameters3D`. Updates the provided :ref:`NavigationPathQueryResult3D` result object with the path among other results requested by the query. After the process is finished the optional ``callback`` will be called. .. rst-class:: classref-item-separator diff --git a/classes/class_node.rst b/classes/class_node.rst index 941d0605238..82d0e57e485 100644 --- a/classes/class_node.rst +++ b/classes/class_node.rst @@ -369,6 +369,18 @@ Emitted when the node's editor description field changed. ---- +.. _class_Node_signal_editor_state_changed: + +.. rst-class:: classref-signal + +**editor_state_changed**\ (\ ) :ref:`๐Ÿ”—` + +Emitted when an attribute of the node that is relevant to the editor is changed. Only emitted in the editor. + +.. rst-class:: classref-item-separator + +---- + .. _class_Node_signal_ready: .. rst-class:: classref-signal @@ -642,7 +654,7 @@ Duplicate the node's script (also overriding the duplicated children's scripts, :ref:`DuplicateFlags` **DUPLICATE_USE_INSTANTIATION** = ``8`` -Duplicate using :ref:`PackedScene.instantiate`. If the node comes from a scene saved on disk, re-uses :ref:`PackedScene.instantiate` as the base for the duplicated node and its children. +Duplicate using :ref:`PackedScene.instantiate`. If the node comes from a scene saved on disk, reuses :ref:`PackedScene.instantiate` as the base for the duplicated node and its children. .. rst-class:: classref-item-separator @@ -1477,7 +1489,7 @@ For gameplay input, :ref:`_unhandled_input`\ ) |virtual| :ref:`๐Ÿ”—` -Called during the physics processing step of the main loop. Physics processing means that the frame rate is synced to the physics, i.e. the ``delta`` variable should be constant. ``delta`` is in seconds. +Called during the physics processing step of the main loop. Physics processing means that the frame rate is synced to the physics, i.e. the ``delta`` parameter will *generally* be constant (see exceptions below). ``delta`` is in seconds. It is only called if physics processing is enabled, which is done automatically if this method is overridden, and can be toggled with :ref:`set_physics_process`. @@ -1487,6 +1499,8 @@ Corresponds to the :ref:`NOTIFICATION_PHYSICS_PROCESS` / :ref:`Engine.max_physics_steps_per_frame` FPS. This is done to avoid "spiral of death" scenarios where performance would plummet due to an ever-increasing number of physics steps per frame. This behavior affects both :ref:`_process` and :ref:`_physics_process`. As a result, avoid using ``delta`` for time measurements in real-world seconds. Use the :ref:`Time` singleton's methods for this purpose instead, such as :ref:`Time.get_ticks_usec`. + .. rst-class:: classref-item-separator ---- @@ -1507,6 +1521,8 @@ Corresponds to the :ref:`NOTIFICATION_PROCESS` / :ref:`Engine.max_physics_steps_per_frame` FPS. This is done to avoid "spiral of death" scenarios where performance would plummet due to an ever-increasing number of physics steps per frame. This behavior affects both :ref:`_process` and :ref:`_physics_process`. As a result, avoid using ``delta`` for time measurements in real-world seconds. Use the :ref:`Time` singleton's methods for this purpose instead, such as :ref:`Time.get_ticks_usec`. + .. rst-class:: classref-item-separator ---- @@ -1597,7 +1613,7 @@ For gameplay input, this and :ref:`_unhandled_input`\ ) |virtual| :ref:`๐Ÿ”—` -Called when an :ref:`InputEventKey` hasn't been consumed by physics picking. The input event propagates up through the node tree in the current :ref:`Viewport` until a node consumes it. +Called when an :ref:`InputEvent` hasn't been consumed by physics picking. The input event propagates up through the node tree in the current :ref:`Viewport` until a node consumes it. It is only called if unhandled picking input processing is enabled, which is done automatically if this method is overridden, and can be toggled with :ref:`set_process_unhandled_picking_input`. @@ -2179,6 +2195,8 @@ If ``use_unique_path`` is ``true``, returns the shortest path accounting for thi Returns the time elapsed (in seconds) since the last physics callback. This value is identical to :ref:`_physics_process`'s ``delta`` parameter, and is often consistent at run-time, unless :ref:`Engine.physics_ticks_per_second` is changed. See also :ref:`NOTIFICATION_PHYSICS_PROCESS`. +\ **Note:** The returned value will be larger than expected if running at a framerate lower than :ref:`Engine.physics_ticks_per_second` / :ref:`Engine.max_physics_steps_per_frame` FPS. This is done to avoid "spiral of death" scenarios where performance would plummet due to an ever-increasing number of physics steps per frame. This behavior affects both :ref:`_process` and :ref:`_physics_process`. As a result, avoid using ``delta`` for time measurements in real-world seconds. Use the :ref:`Time` singleton's methods for this purpose instead, such as :ref:`Time.get_ticks_usec`. + .. rst-class:: classref-item-separator ---- @@ -2191,6 +2209,8 @@ Returns the time elapsed (in seconds) since the last physics callback. This valu Returns the time elapsed (in seconds) since the last process callback. This value is identical to :ref:`_process`'s ``delta`` parameter, and may vary from frame to frame. See also :ref:`NOTIFICATION_PROCESS`. +\ **Note:** The returned value will be larger than expected if running at a framerate lower than :ref:`Engine.physics_ticks_per_second` / :ref:`Engine.max_physics_steps_per_frame` FPS. This is done to avoid "spiral of death" scenarios where performance would plummet due to an ever-increasing number of physics steps per frame. This behavior affects both :ref:`_process` and :ref:`_physics_process`. As a result, avoid using ``delta`` for time measurements in real-world seconds. Use the :ref:`Time` singleton's methods for this purpose instead, such as :ref:`Time.get_ticks_usec`. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_node2d.rst b/classes/class_node2d.rst index b83c62c905c..c4ee91a17b6 100644 --- a/classes/class_node2d.rst +++ b/classes/class_node2d.rst @@ -14,7 +14,7 @@ Node2D **Inherited By:** :ref:`AnimatedSprite2D`, :ref:`AudioListener2D`, :ref:`AudioStreamPlayer2D`, :ref:`BackBufferCopy`, :ref:`Bone2D`, :ref:`Camera2D`, :ref:`CanvasGroup`, :ref:`CanvasModulate`, :ref:`CollisionObject2D`, :ref:`CollisionPolygon2D`, :ref:`CollisionShape2D`, :ref:`CPUParticles2D`, :ref:`GPUParticles2D`, :ref:`Joint2D`, :ref:`Light2D`, :ref:`LightOccluder2D`, :ref:`Line2D`, :ref:`Marker2D`, :ref:`MeshInstance2D`, :ref:`MultiMeshInstance2D`, :ref:`NavigationLink2D`, :ref:`NavigationObstacle2D`, :ref:`NavigationRegion2D`, :ref:`Parallax2D`, :ref:`ParallaxLayer`, :ref:`Path2D`, :ref:`PathFollow2D`, :ref:`Polygon2D`, :ref:`RayCast2D`, :ref:`RemoteTransform2D`, :ref:`ShapeCast2D`, :ref:`Skeleton2D`, :ref:`Sprite2D`, :ref:`TileMap`, :ref:`TileMapLayer`, :ref:`TouchScreenButton`, :ref:`VisibleOnScreenNotifier2D` -A 2D game object, inherited by all 2D-related nodes. Has a position, rotation, scale, and Z index. +A 2D game object, inherited by all 2D-related nodes. Has a position, rotation, scale, and skew. .. rst-class:: classref-introduction-group @@ -23,6 +23,8 @@ Description A 2D game object, with a transform (position, rotation, and scale). All 2D nodes, including physics objects and sprites, inherit from Node2D. Use Node2D as a parent node to move, scale and rotate children in a 2D project. Also gives control of the node's render order. +\ **Note:** Since both **Node2D** and :ref:`Control` inherit from :ref:`CanvasItem`, they share several concepts from the class such as the :ref:`CanvasItem.z_index` and :ref:`CanvasItem.visible` properties. + .. rst-class:: classref-introduction-group Tutorials diff --git a/classes/class_object.rst b/classes/class_object.rst index 71d9859f4f9..06b961a7a61 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:`EditorInterface`, :ref:`EditorPaths`, :ref:`EditorSelection`, :ref:`EditorUndoRedoManager`, :ref:`EditorVCSInterface`, :ref:`Engine`, :ref:`EngineDebugger`, :ref:`FramebufferCacheRD`, :ref:`GDExtensionManager`, :ref:`Geometry2D`, :ref:`Geometry3D`, :ref:`Input`, :ref:`InputMap`, :ref:`IP`, :ref:`JavaClassWrapper`, :ref:`JavaScriptBridge`, :ref:`JNISingleton`, :ref:`JSONRPC`, :ref:`MainLoop`, :ref:`Marshalls`, :ref:`MovieWriter`, :ref:`NativeMenu`, :ref:`NavigationMeshGenerator`, :ref:`NavigationServer2D`, :ref:`NavigationServer3D`, :ref:`Node`, :ref:`OpenXRExtensionWrapperExtension`, :ref:`OpenXRInteractionProfileMetadata`, :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:`RenderData`, :ref:`RenderingDevice`, :ref:`RenderingServer`, :ref:`RenderSceneData`, :ref:`ResourceLoader`, :ref:`ResourceSaver`, :ref:`ResourceUID`, :ref:`ScriptLanguage`, :ref:`TextServerManager`, :ref:`ThemeDB`, :ref:`TileData`, :ref:`Time`, :ref:`TranslationServer`, :ref:`TreeItem`, :ref:`UndoRedo`, :ref:`UniformSetCacheRD`, :ref:`WorkerThreadPool`, :ref:`XRServer`, :ref:`XRVRS` +**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:`FramebufferCacheRD`, :ref:`GDExtensionManager`, :ref:`Geometry2D`, :ref:`Geometry3D`, :ref:`Input`, :ref:`InputMap`, :ref:`IP`, :ref:`JavaClassWrapper`, :ref:`JavaScriptBridge`, :ref:`JNISingleton`, :ref:`JSONRPC`, :ref:`MainLoop`, :ref:`Marshalls`, :ref:`MovieWriter`, :ref:`NativeMenu`, :ref:`NavigationMeshGenerator`, :ref:`NavigationServer2D`, :ref:`NavigationServer3D`, :ref:`Node`, :ref:`OpenXRExtensionWrapperExtension`, :ref:`OpenXRInteractionProfileMetadata`, :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:`RenderData`, :ref:`RenderingDevice`, :ref:`RenderingServer`, :ref:`RenderSceneData`, :ref:`ResourceLoader`, :ref:`ResourceSaver`, :ref:`ResourceUID`, :ref:`ScriptLanguage`, :ref:`ShaderIncludeDB`, :ref:`TextServerManager`, :ref:`ThemeDB`, :ref:`TileData`, :ref:`Time`, :ref:`TranslationServer`, :ref:`TreeItem`, :ref:`UndoRedo`, :ref:`UniformSetCacheRD`, :ref:`WorkerThreadPool`, :ref:`XRServer`, :ref:`XRVRS` Base class for all other classes in the engine. @@ -49,6 +49,8 @@ Lastly, every object can also contain metadata (data about data). :ref:`set_meta \ **Note:** The ``script`` is not exposed like most properties. To set or get an object's :ref:`Script` in code, use :ref:`set_script` and :ref:`get_script`, respectively. +\ **Note:** In a boolean context, an **Object** will evaluate to ``false`` if it is equal to ``null`` or it has been freed. Otherwise, an **Object** will always evaluate to ``true``. See also :ref:`@GlobalScope.is_instance_valid`. + .. rst-class:: classref-introduction-group Tutorials @@ -58,7 +60,7 @@ Tutorials - :doc:`When and how to avoid using nodes for everything <../tutorials/best_practices/node_alternatives>` -- :doc:`Object notifications <../tutorials/best_practices/godot_notifications>` +- :doc:`Object notifications <../tutorials/best_practices/redot_notifications>` .. rst-class:: classref-reftable-group @@ -1702,13 +1704,13 @@ Assigns ``value`` to the given ``property``. If the property does not exist or t var node = Node2D.new() node.set("global_scale", Vector2(8, 2.5)) - print(node.global_scale) # Prints (8, 2.5) + print(node.global_scale) # Prints (8.0, 2.5) .. code-tab:: csharp var node = new Node2D(); - node.Set(Node2D.PropertyName.GlobalScale, new Vector2(8, 2.5)); - GD.Print(node.GlobalScale); // Prints Vector2(8, 2.5) + node.Set(Node2D.PropertyName.GlobalScale, new Vector2(8, 2.5f)); + GD.Print(node.GlobalScale); // Prints (8, 2.5) @@ -1787,7 +1789,7 @@ Assigns a new ``value`` to the property identified by the ``property_path``. The var node = Node2D.new() node.set_indexed("position", Vector2(42, 0)) node.set_indexed("position:y", -10) - print(node.position) # Prints (42, -10) + print(node.position) # Prints (42.0, -10.0) .. code-tab:: csharp diff --git a/classes/class_offlinemultiplayerpeer.rst b/classes/class_offlinemultiplayerpeer.rst index e6495f09245..02ac6fde4e7 100644 --- a/classes/class_offlinemultiplayerpeer.rst +++ b/classes/class_offlinemultiplayerpeer.rst @@ -3,7 +3,7 @@ .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Redot engine sources. .. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. -.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/doc/classes/OfflineMultiplayerPeer.xml. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/modules/multiplayer/doc_classes/OfflineMultiplayerPeer.xml. .. _class_OfflineMultiplayerPeer: diff --git a/classes/class_omnilight3d.rst b/classes/class_omnilight3d.rst index 0b84b90090c..66c04bbb9f0 100644 --- a/classes/class_omnilight3d.rst +++ b/classes/class_omnilight3d.rst @@ -45,6 +45,8 @@ Properties .. table:: :widths: auto + +------------------------------------------------+----------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | light_specular | ``0.5`` (overrides :ref:`Light3D`) | +------------------------------------------------+----------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`float` | :ref:`omni_attenuation` | ``1.0`` | +------------------------------------------------+----------------------------------------------------------------------+-------------------------------------------------------------------------------+ diff --git a/classes/class_openxractionbindingmodifier.rst b/classes/class_openxractionbindingmodifier.rst new file mode 100644 index 00000000000..1caa9480a0f --- /dev/null +++ b/classes/class_openxractionbindingmodifier.rst @@ -0,0 +1,33 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/modules/openxr/doc_classes/OpenXRActionBindingModifier.xml. + +.. _class_OpenXRActionBindingModifier: + +OpenXRActionBindingModifier +=========================== + +**Inherits:** :ref:`OpenXRBindingModifier` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +**Inherited By:** :ref:`OpenXRAnalogThresholdModifier` + +Binding modifier that applies on individual actions related to an interaction profile. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Binding modifier that applies on individual actions related to an interaction profile. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_openxractionmap.rst b/classes/class_openxractionmap.rst index 957b13f8ff3..c38f3985d14 100644 --- a/classes/class_openxractionmap.rst +++ b/classes/class_openxractionmap.rst @@ -19,7 +19,7 @@ Collection of :ref:`OpenXRActionSet` and :ref:`OpenXRInte Description ----------- -OpenXR uses an action system similar to Godots Input map system to bind inputs and outputs on various types of XR controllers to named actions. OpenXR specifies more detail on these inputs and outputs than Godot supports. +OpenXR uses an action system similar to Redots Input map system to bind inputs and outputs on various types of XR controllers to named actions. OpenXR specifies more detail on these inputs and outputs than Redot supports. Another important distinction is that OpenXR offers no control over these bindings. The bindings we register are suggestions, it is up to the XR runtime to offer users the ability to change these bindings. This allows the XR runtime to fill in the gaps if new hardware becomes available. diff --git a/classes/class_openxranalogthresholdmodifier.rst b/classes/class_openxranalogthresholdmodifier.rst new file mode 100644 index 00000000000..e5a91429052 --- /dev/null +++ b/classes/class_openxranalogthresholdmodifier.rst @@ -0,0 +1,124 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/modules/openxr/doc_classes/OpenXRAnalogThresholdModifier.xml. + +.. _class_OpenXRAnalogThresholdModifier: + +OpenXRAnalogThresholdModifier +============================= + +**Inherits:** :ref:`OpenXRActionBindingModifier` **<** :ref:`OpenXRBindingModifier` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +The analog threshold binding modifier can modify a float input to a boolean input with specified thresholds. + +.. rst-class:: classref-introduction-group + +Description +----------- + +The analog threshold binding modifier can modify a float input to a boolean input with specified thresholds. + +See `XR_VALVE_analog_threshold `__ for in-depth details. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-------------------------------------------------+----------------------------------------------------------------------------------+---------+ + | :ref:`OpenXRHapticBase` | :ref:`off_haptic` | | + +-------------------------------------------------+----------------------------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`off_threshold` | ``0.4`` | + +-------------------------------------------------+----------------------------------------------------------------------------------+---------+ + | :ref:`OpenXRHapticBase` | :ref:`on_haptic` | | + +-------------------------------------------------+----------------------------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`on_threshold` | ``0.6`` | + +-------------------------------------------------+----------------------------------------------------------------------------------+---------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_OpenXRAnalogThresholdModifier_property_off_haptic: + +.. rst-class:: classref-property + +:ref:`OpenXRHapticBase` **off_haptic** :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_off_haptic**\ (\ value\: :ref:`OpenXRHapticBase`\ ) +- :ref:`OpenXRHapticBase` **get_off_haptic**\ (\ ) + +Haptic pulse to emit when the user releases the input. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRAnalogThresholdModifier_property_off_threshold: + +.. rst-class:: classref-property + +:ref:`float` **off_threshold** = ``0.4`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_off_threshold**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_off_threshold**\ (\ ) + +When our input value falls below this, our output becomes false. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRAnalogThresholdModifier_property_on_haptic: + +.. rst-class:: classref-property + +:ref:`OpenXRHapticBase` **on_haptic** :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_on_haptic**\ (\ value\: :ref:`OpenXRHapticBase`\ ) +- :ref:`OpenXRHapticBase` **get_on_haptic**\ (\ ) + +Haptic pulse to emit when the user presses the input. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRAnalogThresholdModifier_property_on_threshold: + +.. rst-class:: classref-property + +:ref:`float` **on_threshold** = ``0.6`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_on_threshold**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_on_threshold**\ (\ ) + +When our input value is equal or larger than this value, our output becomes true. It stays true until it falls under the :ref:`off_threshold` value. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_openxrapiextension.rst b/classes/class_openxrapiextension.rst index faa704e2f10..2dd8adb4c24 100644 --- a/classes/class_openxrapiextension.rst +++ b/classes/class_openxrapiextension.rst @@ -50,55 +50,83 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`begin_debug_label_region`\ (\ label_name\: :ref:`String`\ ) | - +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`can_render`\ (\ ) | - +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`end_debug_label_region`\ (\ ) | - +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_error_string`\ (\ result\: :ref:`int`\ ) | - +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_hand_tracker`\ (\ hand_index\: :ref:`int`\ ) | - +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_instance`\ (\ ) | - +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_instance_proc_addr`\ (\ name\: :ref:`String`\ ) | - +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_next_frame_time`\ (\ ) | - +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_play_space`\ (\ ) | - +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_predicted_display_time`\ (\ ) | - +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_session`\ (\ ) | - +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_swapchain_format_name`\ (\ swapchain_format\: :ref:`int`\ ) | - +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_system_id`\ (\ ) | - +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`insert_debug_label`\ (\ label_name\: :ref:`String`\ ) | - +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`OpenXRAlphaBlendModeSupport` | :ref:`is_environment_blend_mode_alpha_supported`\ (\ ) | - +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_initialized`\ (\ ) | - +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_running`\ (\ ) | - +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`openxr_is_enabled`\ (\ check_run_in_editor\: :ref:`bool`\ ) |static| | - +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`register_composition_layer_provider`\ (\ extension\: :ref:`OpenXRExtensionWrapperExtension`\ ) | - +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_emulate_environment_blend_mode_alpha_blend`\ (\ enabled\: :ref:`bool`\ ) | - +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_object_name`\ (\ object_type\: :ref:`int`, object_handle\: :ref:`int`, object_name\: :ref:`String`\ ) | - +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`transform_from_pose`\ (\ pose\: ``const void*``\ ) | - +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`unregister_composition_layer_provider`\ (\ extension\: :ref:`OpenXRExtensionWrapperExtension`\ ) | - +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`xr_result`\ (\ result\: :ref:`int`, format\: :ref:`String`, args\: :ref:`Array`\ ) | - +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`begin_debug_label_region`\ (\ label_name\: :ref:`String`\ ) | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`can_render`\ (\ ) | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`end_debug_label_region`\ (\ ) | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_error_string`\ (\ result\: :ref:`int`\ ) | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_hand_tracker`\ (\ hand_index\: :ref:`int`\ ) | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_instance`\ (\ ) | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_instance_proc_addr`\ (\ name\: :ref:`String`\ ) | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_next_frame_time`\ (\ ) | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_play_space`\ (\ ) | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_predicted_display_time`\ (\ ) | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_render_state_z_far`\ (\ ) | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_render_state_z_near`\ (\ ) | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_session`\ (\ ) | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt64Array` | :ref:`get_supported_swapchain_formats`\ (\ ) | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_swapchain_format_name`\ (\ swapchain_format\: :ref:`int`\ ) | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_system_id`\ (\ ) | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`insert_debug_label`\ (\ label_name\: :ref:`String`\ ) | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`OpenXRAlphaBlendModeSupport` | :ref:`is_environment_blend_mode_alpha_supported`\ (\ ) | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_initialized`\ (\ ) | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_running`\ (\ ) | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`openxr_is_enabled`\ (\ check_run_in_editor\: :ref:`bool`\ ) |static| | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`openxr_swapchain_acquire`\ (\ swapchain\: :ref:`int`\ ) | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`openxr_swapchain_create`\ (\ create_flags\: :ref:`int`, usage_flags\: :ref:`int`, swapchain_format\: :ref:`int`, width\: :ref:`int`, height\: :ref:`int`, sample_count\: :ref:`int`, array_size\: :ref:`int`\ ) | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`openxr_swapchain_free`\ (\ swapchain\: :ref:`int`\ ) | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`openxr_swapchain_get_image`\ (\ swapchain\: :ref:`int`\ ) | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`openxr_swapchain_get_swapchain`\ (\ swapchain\: :ref:`int`\ ) | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`openxr_swapchain_release`\ (\ swapchain\: :ref:`int`\ ) | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`register_composition_layer_provider`\ (\ extension\: :ref:`OpenXRExtensionWrapperExtension`\ ) | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`register_projection_views_extension`\ (\ extension\: :ref:`OpenXRExtensionWrapperExtension`\ ) | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_emulate_environment_blend_mode_alpha_blend`\ (\ enabled\: :ref:`bool`\ ) | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_object_name`\ (\ object_type\: :ref:`int`, object_handle\: :ref:`int`, object_name\: :ref:`String`\ ) | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_velocity_depth_texture`\ (\ render_target\: :ref:`RID`\ ) | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_velocity_target_size`\ (\ target_size\: :ref:`Vector2i`\ ) | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_velocity_texture`\ (\ render_target\: :ref:`RID`\ ) | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`transform_from_pose`\ (\ pose\: ``const void*``\ ) | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`unregister_composition_layer_provider`\ (\ extension\: :ref:`OpenXRExtensionWrapperExtension`\ ) | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`unregister_projection_views_extension`\ (\ extension\: :ref:`OpenXRExtensionWrapperExtension`\ ) | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`xr_result`\ (\ result\: :ref:`int`, format\: :ref:`String`, args\: :ref:`Array`\ ) | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -270,6 +298,34 @@ Returns the predicted display timing for the current frame. ---- +.. _class_OpenXRAPIExtension_method_get_render_state_z_far: + +.. rst-class:: classref-method + +:ref:`float` **get_render_state_z_far**\ (\ ) :ref:`๐Ÿ”—` + +Returns the far boundary value of the camera frustum. + +\ **Note:** This is only accessible in the render thread. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRAPIExtension_method_get_render_state_z_near: + +.. rst-class:: classref-method + +:ref:`float` **get_render_state_z_near**\ (\ ) :ref:`๐Ÿ”—` + +Returns the near boundary value of the camera frustum. + +\ **Note:** This is only accessible in the render thread. + +.. rst-class:: classref-item-separator + +---- + .. _class_OpenXRAPIExtension_method_get_session: .. rst-class:: classref-method @@ -282,6 +338,18 @@ Returns the OpenXR session, which is an `XrSession ` **get_supported_swapchain_formats**\ (\ ) :ref:`๐Ÿ”—` + +Returns an array of supported swapchain formats. + +.. rst-class:: classref-item-separator + +---- + .. _class_OpenXRAPIExtension_method_get_swapchain_format_name: .. rst-class:: classref-method @@ -366,6 +434,78 @@ Returns ``true`` if OpenXR is enabled. ---- +.. _class_OpenXRAPIExtension_method_openxr_swapchain_acquire: + +.. rst-class:: classref-method + +|void| **openxr_swapchain_acquire**\ (\ swapchain\: :ref:`int`\ ) :ref:`๐Ÿ”—` + +Acquires the image of the provided swapchain. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRAPIExtension_method_openxr_swapchain_create: + +.. rst-class:: classref-method + +:ref:`int` **openxr_swapchain_create**\ (\ create_flags\: :ref:`int`, usage_flags\: :ref:`int`, swapchain_format\: :ref:`int`, width\: :ref:`int`, height\: :ref:`int`, sample_count\: :ref:`int`, array_size\: :ref:`int`\ ) :ref:`๐Ÿ”—` + +Returns a pointer to a new swapchain created using the provided parameters. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRAPIExtension_method_openxr_swapchain_free: + +.. rst-class:: classref-method + +|void| **openxr_swapchain_free**\ (\ swapchain\: :ref:`int`\ ) :ref:`๐Ÿ”—` + +Destroys the provided swapchain and frees it from memory. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRAPIExtension_method_openxr_swapchain_get_image: + +.. rst-class:: classref-method + +:ref:`RID` **openxr_swapchain_get_image**\ (\ swapchain\: :ref:`int`\ ) :ref:`๐Ÿ”—` + +Returns the RID of the provided swapchain's image. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRAPIExtension_method_openxr_swapchain_get_swapchain: + +.. rst-class:: classref-method + +:ref:`int` **openxr_swapchain_get_swapchain**\ (\ swapchain\: :ref:`int`\ ) :ref:`๐Ÿ”—` + +Returns the ``XrSwapchain`` handle of the provided swapchain. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRAPIExtension_method_openxr_swapchain_release: + +.. rst-class:: classref-method + +|void| **openxr_swapchain_release**\ (\ swapchain\: :ref:`int`\ ) :ref:`๐Ÿ”—` + +Releases the image of the provided swapchain. + +.. rst-class:: classref-item-separator + +---- + .. _class_OpenXRAPIExtension_method_register_composition_layer_provider: .. rst-class:: classref-method @@ -378,6 +518,18 @@ Registers the given extension as a composition layer provider. ---- +.. _class_OpenXRAPIExtension_method_register_projection_views_extension: + +.. rst-class:: classref-method + +|void| **register_projection_views_extension**\ (\ extension\: :ref:`OpenXRExtensionWrapperExtension`\ ) :ref:`๐Ÿ”—` + +Registers the given extension as a provider of additional data structures to projections views. + +.. rst-class:: classref-item-separator + +---- + .. _class_OpenXRAPIExtension_method_set_emulate_environment_blend_mode_alpha_blend: .. rst-class:: classref-method @@ -402,6 +554,42 @@ Set the object name of an OpenXR object, used for debug output. ``object_type`` ---- +.. _class_OpenXRAPIExtension_method_set_velocity_depth_texture: + +.. rst-class:: classref-method + +|void| **set_velocity_depth_texture**\ (\ render_target\: :ref:`RID`\ ) :ref:`๐Ÿ”—` + +Sets the render target of the velocity depth texture. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRAPIExtension_method_set_velocity_target_size: + +.. rst-class:: classref-method + +|void| **set_velocity_target_size**\ (\ target_size\: :ref:`Vector2i`\ ) :ref:`๐Ÿ”—` + +Sets the target size of the velocity and velocity depth textures. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRAPIExtension_method_set_velocity_texture: + +.. rst-class:: classref-method + +|void| **set_velocity_texture**\ (\ render_target\: :ref:`RID`\ ) :ref:`๐Ÿ”—` + +Sets the render target of the velocity texture. + +.. rst-class:: classref-item-separator + +---- + .. _class_OpenXRAPIExtension_method_transform_from_pose: .. rst-class:: classref-method @@ -426,6 +614,18 @@ Unregisters the given extension as a composition layer provider. ---- +.. _class_OpenXRAPIExtension_method_unregister_projection_views_extension: + +.. rst-class:: classref-method + +|void| **unregister_projection_views_extension**\ (\ extension\: :ref:`OpenXRExtensionWrapperExtension`\ ) :ref:`๐Ÿ”—` + +Unregisters the given extension as a provider of additional data structures to projections views. + +.. rst-class:: classref-item-separator + +---- + .. _class_OpenXRAPIExtension_method_xr_result: .. rst-class:: classref-method diff --git a/classes/class_openxrbindingmodifier.rst b/classes/class_openxrbindingmodifier.rst new file mode 100644 index 00000000000..0349111e1e3 --- /dev/null +++ b/classes/class_openxrbindingmodifier.rst @@ -0,0 +1,78 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/modules/openxr/doc_classes/OpenXRBindingModifier.xml. + +.. _class_OpenXRBindingModifier: + +OpenXRBindingModifier +===================== + +**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +**Inherited By:** :ref:`OpenXRActionBindingModifier`, :ref:`OpenXRIPBindingModifier` + +Binding modifier base class. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Binding modifier base class. Subclasses implement various modifiers that alter how an OpenXR runtime processes inputs. + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_description`\ (\ ) |virtual| |const| | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`_get_ip_modification`\ (\ ) |virtual| | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_OpenXRBindingModifier_private_method__get_description: + +.. rst-class:: classref-method + +:ref:`String` **_get_description**\ (\ ) |virtual| |const| :ref:`๐Ÿ”—` + +Return the description of this class that is used for the title bar of the binding modifier editor. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRBindingModifier_private_method__get_ip_modification: + +.. rst-class:: classref-method + +:ref:`PackedByteArray` **_get_ip_modification**\ (\ ) |virtual| :ref:`๐Ÿ”—` + +Returns the data that is sent to OpenXR when submitting the suggested interacting bindings this modifier is a part of. + +\ **Note:** This must be data compatible with a ``XrBindingModificationBaseHeaderKHR`` structure. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_openxrbindingmodifiereditor.rst b/classes/class_openxrbindingmodifiereditor.rst new file mode 100644 index 00000000000..4518baff631 --- /dev/null +++ b/classes/class_openxrbindingmodifiereditor.rst @@ -0,0 +1,103 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/modules/openxr/doc_classes/OpenXRBindingModifierEditor.xml. + +.. _class_OpenXRBindingModifierEditor: + +OpenXRBindingModifierEditor +=========================== + +**Inherits:** :ref:`PanelContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` + +Binding modifier editor. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This is the default binding modifier editor used in the OpenXR action map. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +--------------------------------------------------------+-----------------------+--------------------------------------------------------------------------------+ + | |bitfield|\[:ref:`SizeFlags`\] | size_flags_horizontal | ``3`` (overrides :ref:`Control`) | + +--------------------------------------------------------+-----------------------+--------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`OpenXRBindingModifier` | :ref:`get_binding_modifier`\ (\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`setup`\ (\ action_map\: :ref:`OpenXRActionMap`, binding_modifier\: :ref:`OpenXRBindingModifier`\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Signals +------- + +.. _class_OpenXRBindingModifierEditor_signal_binding_modifier_removed: + +.. rst-class:: classref-signal + +**binding_modifier_removed**\ (\ binding_modifier_editor\: :ref:`Object`\ ) :ref:`๐Ÿ”—` + +Signal emitted when the user presses the delete binding modifier button for this modifier. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_OpenXRBindingModifierEditor_method_get_binding_modifier: + +.. rst-class:: classref-method + +:ref:`OpenXRBindingModifier` **get_binding_modifier**\ (\ ) |const| :ref:`๐Ÿ”—` + +Returns the :ref:`OpenXRBindingModifier` currently being edited. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRBindingModifierEditor_method_setup: + +.. rst-class:: classref-method + +|void| **setup**\ (\ action_map\: :ref:`OpenXRActionMap`, binding_modifier\: :ref:`OpenXRBindingModifier`\ ) :ref:`๐Ÿ”—` + +Setup this editor for the provided ``action_map`` and ``binding_modifier``. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_openxrcompositionlayer.rst b/classes/class_openxrcompositionlayer.rst index 2417e68763c..c4acc3b23e0 100644 --- a/classes/class_openxrcompositionlayer.rst +++ b/classes/class_openxrcompositionlayer.rst @@ -121,9 +121,9 @@ The size of the Android surface to create if :ref:`use_android_surface`\ ) - :ref:`bool` **get_enable_hole_punch**\ (\ ) -Enables a technique called "hole punching", which allows putting the composition layer behind the main projection layer (i.e. setting :ref:`sort_order` to a negative value) while "punching a hole" through everything rendered by Godot so that the layer is still visible. +Enables a technique called "hole punching", which allows putting the composition layer behind the main projection layer (i.e. setting :ref:`sort_order` to a negative value) while "punching a hole" through everything rendered by Redot so that the layer is still visible. -This can be used to create the illusion that the composition layer exists in the same 3D space as everything rendered by Godot, allowing objects to appear to pass both behind or in front of the composition layer. +This can be used to create the illusion that the composition layer exists in the same 3D space as everything rendered by Redot, allowing objects to appear to pass both behind or in front of the composition layer. .. rst-class:: classref-item-separator diff --git a/classes/class_openxrdpadbindingmodifier.rst b/classes/class_openxrdpadbindingmodifier.rst new file mode 100644 index 00000000000..43927eb2116 --- /dev/null +++ b/classes/class_openxrdpadbindingmodifier.rst @@ -0,0 +1,223 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/modules/openxr/doc_classes/OpenXRDpadBindingModifier.xml. + +.. _class_OpenXRDpadBindingModifier: + +OpenXRDpadBindingModifier +========================= + +**Inherits:** :ref:`OpenXRIPBindingModifier` **<** :ref:`OpenXRBindingModifier` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +The DPad binding modifier converts an axis input to a dpad output. + +.. rst-class:: classref-introduction-group + +Description +----------- + +The DPad binding modifier converts an axis input to a dpad output, emulating a DPad. New input paths for each dpad direction will be added to the interaction profile. When bound to actions the DPad emulation will be activated. You should **not** combine dpad inputs with normal inputs in the same action set for the same control, this will result in an error being returned when suggested bindings are submitted to OpenXR. + +See `XR_EXT_dpad_binding `__ for in-depth details. + +\ **Note:** If the DPad binding modifier extension is enabled, all dpad binding paths will be available in the action map. Adding the modifier to an interaction profile allows you to further customize the behavior. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-------------------------------------------------+----------------------------------------------------------------------------------------+------------+ + | :ref:`OpenXRActionSet` | :ref:`action_set` | | + +-------------------------------------------------+----------------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`center_region` | ``0.1`` | + +-------------------------------------------------+----------------------------------------------------------------------------------------+------------+ + | :ref:`String` | :ref:`input_path` | ``""`` | + +-------------------------------------------------+----------------------------------------------------------------------------------------+------------+ + | :ref:`bool` | :ref:`is_sticky` | ``false`` | + +-------------------------------------------------+----------------------------------------------------------------------------------------+------------+ + | :ref:`OpenXRHapticBase` | :ref:`off_haptic` | | + +-------------------------------------------------+----------------------------------------------------------------------------------------+------------+ + | :ref:`OpenXRHapticBase` | :ref:`on_haptic` | | + +-------------------------------------------------+----------------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`threshold` | ``0.6`` | + +-------------------------------------------------+----------------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`threshold_released` | ``0.4`` | + +-------------------------------------------------+----------------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`wedge_angle` | ``1.5708`` | + +-------------------------------------------------+----------------------------------------------------------------------------------------+------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_OpenXRDpadBindingModifier_property_action_set: + +.. rst-class:: classref-property + +:ref:`OpenXRActionSet` **action_set** :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_action_set**\ (\ value\: :ref:`OpenXRActionSet`\ ) +- :ref:`OpenXRActionSet` **get_action_set**\ (\ ) + +Action set for which this dpad binding modifier is active. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRDpadBindingModifier_property_center_region: + +.. rst-class:: classref-property + +:ref:`float` **center_region** = ``0.1`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_center_region**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_center_region**\ (\ ) + +Center region in which our center position of our dpad return ``true``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRDpadBindingModifier_property_input_path: + +.. rst-class:: classref-property + +:ref:`String` **input_path** = ``""`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_input_path**\ (\ value\: :ref:`String`\ ) +- :ref:`String` **get_input_path**\ (\ ) + +Input path for this dpad binding modifier. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRDpadBindingModifier_property_is_sticky: + +.. rst-class:: classref-property + +:ref:`bool` **is_sticky** = ``false`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_is_sticky**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_is_sticky**\ (\ ) + +If ``false``, when the joystick enters a new dpad zone this becomes true. + +If ``true``, when the joystick remains in active dpad zone, this remains true even if we overlap with another zone. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRDpadBindingModifier_property_off_haptic: + +.. rst-class:: classref-property + +:ref:`OpenXRHapticBase` **off_haptic** :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_off_haptic**\ (\ value\: :ref:`OpenXRHapticBase`\ ) +- :ref:`OpenXRHapticBase` **get_off_haptic**\ (\ ) + +Haptic pulse to emit when the user releases the input. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRDpadBindingModifier_property_on_haptic: + +.. rst-class:: classref-property + +:ref:`OpenXRHapticBase` **on_haptic** :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_on_haptic**\ (\ value\: :ref:`OpenXRHapticBase`\ ) +- :ref:`OpenXRHapticBase` **get_on_haptic**\ (\ ) + +Haptic pulse to emit when the user presses the input. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRDpadBindingModifier_property_threshold: + +.. rst-class:: classref-property + +:ref:`float` **threshold** = ``0.6`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_threshold**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_threshold**\ (\ ) + +When our input value is equal or larger than this value, our dpad in that direction becomes true. It stays true until it falls under the :ref:`threshold_released` value. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRDpadBindingModifier_property_threshold_released: + +.. rst-class:: classref-property + +:ref:`float` **threshold_released** = ``0.4`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_threshold_released**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_threshold_released**\ (\ ) + +When our input value falls below this, our output becomes false. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRDpadBindingModifier_property_wedge_angle: + +.. rst-class:: classref-property + +:ref:`float` **wedge_angle** = ``1.5708`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_wedge_angle**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_wedge_angle**\ (\ ) + +The angle of each wedge that identifies the 4 directions of the emulated dpad. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_openxrextensionwrapperextension.rst b/classes/class_openxrextensionwrapperextension.rst index 8592f2af842..74e940cdf62 100644 --- a/classes/class_openxrextensionwrapperextension.rst +++ b/classes/class_openxrextensionwrapperextension.rst @@ -92,6 +92,8 @@ Methods +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_set_instance_create_info_and_get_next_pointer`\ (\ next_pointer\: ``void*``\ ) |virtual| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_set_projection_views_and_get_next_pointer`\ (\ view_index\: :ref:`int`, next_pointer\: ``void*``\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_set_session_create_and_get_next_pointer`\ (\ next_pointer\: ``void*``\ ) |virtual| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_set_swapchain_create_info_and_get_next_pointer`\ (\ next_pointer\: ``void*``\ ) |virtual| | @@ -504,6 +506,18 @@ Adds additional data structures when the OpenXR instance is created. ---- +.. _class_OpenXRExtensionWrapperExtension_private_method__set_projection_views_and_get_next_pointer: + +.. rst-class:: classref-method + +:ref:`int` **_set_projection_views_and_get_next_pointer**\ (\ view_index\: :ref:`int`, next_pointer\: ``void*``\ ) |virtual| :ref:`๐Ÿ”—` + +Adds additional data structures to the projection view of the given ``view_index``. + +.. rst-class:: classref-item-separator + +---- + .. _class_OpenXRExtensionWrapperExtension_private_method__set_session_create_and_get_next_pointer: .. rst-class:: classref-method diff --git a/classes/class_openxrhapticbase.rst b/classes/class_openxrhapticbase.rst new file mode 100644 index 00000000000..4e0c5d74bca --- /dev/null +++ b/classes/class_openxrhapticbase.rst @@ -0,0 +1,33 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/modules/openxr/doc_classes/OpenXRHapticBase.xml. + +.. _class_OpenXRHapticBase: + +OpenXRHapticBase +================ + +**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +**Inherited By:** :ref:`OpenXRHapticVibration` + +OpenXR Haptic feedback base class. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This is a base class for haptic feedback resources. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_openxrhapticvibration.rst b/classes/class_openxrhapticvibration.rst new file mode 100644 index 00000000000..0e81ebc5cc8 --- /dev/null +++ b/classes/class_openxrhapticvibration.rst @@ -0,0 +1,103 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/modules/openxr/doc_classes/OpenXRHapticVibration.xml. + +.. _class_OpenXRHapticVibration: + +OpenXRHapticVibration +===================== + +**Inherits:** :ref:`OpenXRHapticBase` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +Vibration haptic feedback. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This haptic feedback resource makes it possible to define a vibration based haptic feedback pulse that can be triggered through actions in the OpenXR action map. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +---------------------------+------------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`amplitude` | ``1.0`` | + +---------------------------+------------------------------------------------------------------+---------+ + | :ref:`int` | :ref:`duration` | ``-1`` | + +---------------------------+------------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`frequency` | ``0.0`` | + +---------------------------+------------------------------------------------------------------+---------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_OpenXRHapticVibration_property_amplitude: + +.. rst-class:: classref-property + +:ref:`float` **amplitude** = ``1.0`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_amplitude**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_amplitude**\ (\ ) + +The amplitude of the pulse between ``0.0`` and ``1.0``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRHapticVibration_property_duration: + +.. rst-class:: classref-property + +:ref:`int` **duration** = ``-1`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_duration**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_duration**\ (\ ) + +The duration of the pulse in nanoseconds. Use ``-1`` for a minimum duration pulse for the current XR runtime. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRHapticVibration_property_frequency: + +.. rst-class:: classref-property + +:ref:`float` **frequency** = ``0.0`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_frequency**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_frequency**\ (\ ) + +The frequency of the pulse in Hz. ``0.0`` will let the XR runtime chose an optimal frequency for the device used. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_openxrinteractionprofile.rst b/classes/class_openxrinteractionprofile.rst index b69cb576a44..c46c7fd037a 100644 --- a/classes/class_openxrinteractionprofile.rst +++ b/classes/class_openxrinteractionprofile.rst @@ -31,6 +31,8 @@ Properties .. table:: :widths: auto + +-----------------------------+---------------------------------------------------------------------------------------------------+--------+ + | :ref:`Array` | :ref:`binding_modifiers` | ``[]`` | +-----------------------------+---------------------------------------------------------------------------------------------------+--------+ | :ref:`Array` | :ref:`bindings` | ``[]`` | +-----------------------------+---------------------------------------------------------------------------------------------------+--------+ @@ -45,11 +47,15 @@ Methods .. table:: :widths: auto - +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ - | :ref:`OpenXRIPBinding` | :ref:`get_binding`\ (\ index\: :ref:`int`\ ) |const| | - +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_binding_count`\ (\ ) |const| | - +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`OpenXRIPBinding` | :ref:`get_binding`\ (\ index\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_binding_count`\ (\ ) |const| | + +---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`OpenXRIPBindingModifier` | :ref:`get_binding_modifier`\ (\ index\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_binding_modifier_count`\ (\ ) |const| | + +---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -60,6 +66,23 @@ Methods Property Descriptions --------------------- +.. _class_OpenXRInteractionProfile_property_binding_modifiers: + +.. rst-class:: classref-property + +:ref:`Array` **binding_modifiers** = ``[]`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_binding_modifiers**\ (\ value\: :ref:`Array`\ ) +- :ref:`Array` **get_binding_modifiers**\ (\ ) + +Binding modifiers for this interaction profile. + +.. rst-class:: classref-item-separator + +---- + .. _class_OpenXRInteractionProfile_property_bindings: .. rst-class:: classref-property @@ -119,6 +142,30 @@ Retrieve the binding at this index. Get the number of bindings in this interaction profile. +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRInteractionProfile_method_get_binding_modifier: + +.. rst-class:: classref-method + +:ref:`OpenXRIPBindingModifier` **get_binding_modifier**\ (\ index\: :ref:`int`\ ) |const| :ref:`๐Ÿ”—` + +Get the :ref:`OpenXRBindingModifier` at this index. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRInteractionProfile_method_get_binding_modifier_count: + +.. rst-class:: classref-method + +:ref:`int` **get_binding_modifier_count**\ (\ ) |const| :ref:`๐Ÿ”—` + +Get the number of binding modifiers in this interaction profile. + .. |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_openxrinteractionprofileeditor.rst b/classes/class_openxrinteractionprofileeditor.rst new file mode 100644 index 00000000000..e39725aba1c --- /dev/null +++ b/classes/class_openxrinteractionprofileeditor.rst @@ -0,0 +1,31 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/modules/openxr/doc_classes/OpenXRInteractionProfileEditor.xml. + +.. _class_OpenXRInteractionProfileEditor: + +OpenXRInteractionProfileEditor +============================== + +**Inherits:** :ref:`OpenXRInteractionProfileEditorBase` **<** :ref:`HBoxContainer` **<** :ref:`BoxContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` + +Default OpenXR interaction profile editor. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This is the default OpenXR interaction profile editor that provides a generic interface for editing any interaction profile for which no custom editor has been defined. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_openxrinteractionprofileeditorbase.rst b/classes/class_openxrinteractionprofileeditorbase.rst new file mode 100644 index 00000000000..606efd691d9 --- /dev/null +++ b/classes/class_openxrinteractionprofileeditorbase.rst @@ -0,0 +1,76 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/modules/openxr/doc_classes/OpenXRInteractionProfileEditorBase.xml. + +.. _class_OpenXRInteractionProfileEditorBase: + +OpenXRInteractionProfileEditorBase +================================== + +**Inherits:** :ref:`HBoxContainer` **<** :ref:`BoxContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` + +**Inherited By:** :ref:`OpenXRInteractionProfileEditor` + +Base class for editing interaction profiles. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This is a base class for interaction profile editors used by the OpenXR action map editor. It can be used to create bespoke editors for specific interaction profiles. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +--------------------------------------------------------+-----------------------+--------------------------------------------------------------------------------+ + | |bitfield|\[:ref:`SizeFlags`\] | size_flags_horizontal | ``3`` (overrides :ref:`Control`) | + +--------------------------------------------------------+-----------------------+--------------------------------------------------------------------------------+ + | |bitfield|\[:ref:`SizeFlags`\] | size_flags_vertical | ``3`` (overrides :ref:`Control`) | + +--------------------------------------------------------+-----------------------+--------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +--------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`setup`\ (\ action_map\: :ref:`OpenXRActionMap`, interaction_profile\: :ref:`OpenXRInteractionProfile`\ ) | + +--------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_OpenXRInteractionProfileEditorBase_method_setup: + +.. rst-class:: classref-method + +|void| **setup**\ (\ action_map\: :ref:`OpenXRActionMap`, interaction_profile\: :ref:`OpenXRInteractionProfile`\ ) :ref:`๐Ÿ”—` + +Setup this editor for the provided ``action_map`` and ``interaction_profile``. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_openxrinterface.rst b/classes/class_openxrinterface.rst index 54cccd08e71..f538b4b9026 100644 --- a/classes/class_openxrinterface.rst +++ b/classes/class_openxrinterface.rst @@ -19,9 +19,9 @@ Our OpenXR interface. Description ----------- -The OpenXR interface allows Godot to interact with OpenXR runtimes and make it possible to create XR experiences and games. +The OpenXR interface allows Redot to interact with OpenXR runtimes and make it possible to create XR experiences and games. -Due to the needs of OpenXR this interface works slightly different than other plugin based XR interfaces. It needs to be initialized when Godot starts. You need to enable OpenXR, settings for this can be found in your games project settings under the XR heading. You do need to mark a viewport for use with XR in order for Godot to know which render result should be output to the headset. +Due to the needs of OpenXR this interface works slightly different than other plugin based XR interfaces. It needs to be initialized when Redot starts. You need to enable OpenXR, settings for this can be found in your games project settings under the XR heading. You do need to mark a viewport for use with XR in order for Redot to know which render result should be output to the headset. .. rst-class:: classref-introduction-group @@ -736,7 +736,7 @@ Method Descriptions :ref:`Array` **get_action_sets**\ (\ ) |const| :ref:`๐Ÿ”—` -Returns a list of action sets registered with Godot (loaded from the action map at runtime). +Returns a list of action sets registered with Redot (loaded from the action map at runtime). .. rst-class:: classref-item-separator diff --git a/classes/class_openxripbinding.rst b/classes/class_openxripbinding.rst index 3cd8deca157..44858888f24 100644 --- a/classes/class_openxripbinding.rst +++ b/classes/class_openxripbinding.rst @@ -29,13 +29,15 @@ Properties .. table:: :widths: auto - +---------------------------------------------------+------------------------------------------------------------------+--------+ - | :ref:`OpenXRAction` | :ref:`action` | | - +---------------------------------------------------+------------------------------------------------------------------+--------+ - | :ref:`String` | :ref:`binding_path` | ``""`` | - +---------------------------------------------------+------------------------------------------------------------------+--------+ - | :ref:`PackedStringArray` | :ref:`paths` | | - +---------------------------------------------------+------------------------------------------------------------------+--------+ + +---------------------------------------------------+----------------------------------------------------------------------------+--------+ + | :ref:`OpenXRAction` | :ref:`action` | | + +---------------------------------------------------+----------------------------------------------------------------------------+--------+ + | :ref:`Array` | :ref:`binding_modifiers` | ``[]`` | + +---------------------------------------------------+----------------------------------------------------------------------------+--------+ + | :ref:`String` | :ref:`binding_path` | ``""`` | + +---------------------------------------------------+----------------------------------------------------------------------------+--------+ + | :ref:`PackedStringArray` | :ref:`paths` | | + +---------------------------------------------------+----------------------------------------------------------------------------+--------+ .. rst-class:: classref-reftable-group @@ -45,15 +47,19 @@ Methods .. table:: :widths: auto - +-------------------------+----------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`add_path`\ (\ path\: :ref:`String`\ ) | - +-------------------------+----------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_path_count`\ (\ ) |const| | - +-------------------------+----------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_path`\ (\ path\: :ref:`String`\ ) |const| | - +-------------------------+----------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`remove_path`\ (\ path\: :ref:`String`\ ) | - +-------------------------+----------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_path`\ (\ path\: :ref:`String`\ ) | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ + | :ref:`OpenXRActionBindingModifier` | :ref:`get_binding_modifier`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_binding_modifier_count`\ (\ ) |const| | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_path_count`\ (\ ) |const| | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_path`\ (\ path\: :ref:`String`\ ) |const| | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_path`\ (\ path\: :ref:`String`\ ) | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -81,6 +87,23 @@ Property Descriptions ---- +.. _class_OpenXRIPBinding_property_binding_modifiers: + +.. rst-class:: classref-property + +:ref:`Array` **binding_modifiers** = ``[]`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_binding_modifiers**\ (\ value\: :ref:`Array`\ ) +- :ref:`Array` **get_binding_modifiers**\ (\ ) + +Binding modifiers for this binding. + +.. rst-class:: classref-item-separator + +---- + .. _class_OpenXRIPBinding_property_binding_path: .. rst-class:: classref-property @@ -140,6 +163,30 @@ Add an input/output path to this binding. ---- +.. _class_OpenXRIPBinding_method_get_binding_modifier: + +.. rst-class:: classref-method + +:ref:`OpenXRActionBindingModifier` **get_binding_modifier**\ (\ index\: :ref:`int`\ ) |const| :ref:`๐Ÿ”—` + +Get the :ref:`OpenXRBindingModifier` at this index. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRIPBinding_method_get_binding_modifier_count: + +.. rst-class:: classref-method + +:ref:`int` **get_binding_modifier_count**\ (\ ) |const| :ref:`๐Ÿ”—` + +Get the number of binding modifiers for this binding. + +.. rst-class:: classref-item-separator + +---- + .. _class_OpenXRIPBinding_method_get_path_count: .. rst-class:: classref-method diff --git a/classes/class_openxripbindingmodifier.rst b/classes/class_openxripbindingmodifier.rst new file mode 100644 index 00000000000..1515935888e --- /dev/null +++ b/classes/class_openxripbindingmodifier.rst @@ -0,0 +1,33 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/modules/openxr/doc_classes/OpenXRIPBindingModifier.xml. + +.. _class_OpenXRIPBindingModifier: + +OpenXRIPBindingModifier +======================= + +**Inherits:** :ref:`OpenXRBindingModifier` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +**Inherited By:** :ref:`OpenXRDpadBindingModifier` + +Binding modifier that applies directly on an interaction profile. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Binding modifier that applies directly on an interaction profile. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_os.rst b/classes/class_os.rst index 68569110cf2..beae9441787 100644 --- a/classes/class_os.rst +++ b/classes/class_os.rst @@ -141,6 +141,8 @@ Methods +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`get_system_fonts`\ (\ ) |const| | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_temp_dir`\ (\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_thread_caller_id`\ (\ ) |const| | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_unique_id`\ (\ ) |const| | @@ -149,6 +151,8 @@ Methods +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_version`\ (\ ) |const| | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_version_alias`\ (\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`get_video_adapter_driver_info`\ (\ ) |const| | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_environment`\ (\ variable\: :ref:`String`\ ) |const| | @@ -345,7 +349,7 @@ Standard I/O device is invalid. No data can be received from or sent to these st :ref:`StdHandleType` **STD_HANDLE_CONSOLE** = ``1`` -Standard I/O device is a console. This typically occurs when Godot is run from a terminal with no redirection. This is also used for all standard I/O devices when running Godot from the editor, at least on desktop platforms. +Standard I/O device is a console. This typically occurs when Redot is run from a terminal with no redirection. This is also used for all standard I/O devices when running Redot from the editor, at least on desktop platforms. .. _class_OS_constant_STD_HANDLE_FILE: @@ -353,7 +357,7 @@ Standard I/O device is a console. This typically occurs when Godot is run from a :ref:`StdHandleType` **STD_HANDLE_FILE** = ``2`` -Standard I/O device is a regular file. This typically occurs with redirection from a terminal, e.g. ``godot > stdout.txt``, ``godot < stdin.txt`` or ``godot > stdout_stderr.txt 2>&1``. +Standard I/O device is a regular file. This typically occurs with redirection from a terminal, e.g. ``redot > stdout.txt``, ``redot < stdin.txt`` or ``redot > stdout_stderr.txt 2>&1``. .. _class_OS_constant_STD_HANDLE_PIPE: @@ -361,7 +365,7 @@ Standard I/O device is a regular file. This typically occurs with redirection fr :ref:`StdHandleType` **STD_HANDLE_PIPE** = ``3`` -Standard I/O device is a FIFO/pipe. This typically occurs with pipe usage from a terminal, e.g. ``echo "Hello" | godot``. +Standard I/O device is a FIFO/pipe. This typically occurs with pipe usage from a terminal, e.g. ``echo "Hello" | redot``. .. _class_OS_constant_STD_HANDLE_UNKNOWN: @@ -462,7 +466,7 @@ Displays a modal dialog box using the host platform's implementation. The engine Shuts down the system MIDI driver. Redot will no longer receive :ref:`InputEventMIDI`. See also :ref:`open_midi_inputs` and :ref:`get_connected_midi_inputs`. -\ **Note:** This method is implemented on Linux, macOS, and Windows. +\ **Note:** This method is implemented on Linux, macOS, Windows, and Web. .. rst-class:: classref-item-separator @@ -819,7 +823,11 @@ Not to be confused with :ref:`get_user_data_dir`. See also :ref:`close_midi_inputs`. -\ **Note:** This method is implemented on Linux, macOS, and Windows. +\ **Note:** This method is implemented on Linux, macOS, Windows, and Web. + +\ **Note:** On the Web platform, Web MIDI needs to be supported by the browser. `For the time being `__, it is currently supported by all major browsers, except Safari. + +\ **Note:** On the Web platform, using MIDI input requires a browser permission to be granted first. This permission request is performed when calling :ref:`open_midi_inputs`. The browser will refrain from processing MIDI input until the user accepts the permission request. .. rst-class:: classref-item-separator @@ -1325,6 +1333,18 @@ Returns the list of font family names available. ---- +.. _class_OS_method_get_temp_dir: + +.. rst-class:: classref-method + +:ref:`String` **get_temp_dir**\ (\ ) |const| :ref:`๐Ÿ”—` + +Returns the *global* temporary data directory according to the operating system's standards. + +.. rst-class:: classref-item-separator + +---- + .. _class_OS_method_get_thread_caller_id: .. rst-class:: classref-method @@ -1363,11 +1383,11 @@ Returns a string that is unique to the device. Returns the absolute directory path where user data is written (the ``user://`` directory in Redot). The path depends on the project name and :ref:`ProjectSettings.application/config/use_custom_user_dir`. -- On Windows, this is ``%AppData%\Godot\app_userdata\[project_name]``, or ``%AppData%\[custom_name]`` if ``use_custom_user_dir`` is set. ``%AppData%`` expands to ``%UserProfile%\AppData\Roaming``. +- On Windows, this is ``%AppData%\Redot\app_userdata\[project_name]``, or ``%AppData%\[custom_name]`` if ``use_custom_user_dir`` is set. ``%AppData%`` expands to ``%UserProfile%\AppData\Roaming``. -- On macOS, this is ``~/Library/Application Support/Godot/app_userdata/[project_name]``, or ``~/Library/Application Support/[custom_name]`` if ``use_custom_user_dir`` is set. +- On macOS, this is ``~/Library/Application Support/Redot/app_userdata/[project_name]``, or ``~/Library/Application Support/[custom_name]`` if ``use_custom_user_dir`` is set. -- On Linux and BSD, this is ``~/.local/share/godot/app_userdata/[project_name]``, or ``~/.local/share/[custom_name]`` if ``use_custom_user_dir`` is set. +- On Linux and BSD, this is ``~/.local/share/redot/app_userdata/[project_name]``, or ``~/.local/share/[custom_name]`` if ``use_custom_user_dir`` is set. - On Android and iOS, this is a sandboxed directory in either internal or external storage, depending on the user's configuration. @@ -1403,6 +1423,20 @@ Returns the exact production and build version of the operating system. This is ---- +.. _class_OS_method_get_version_alias: + +.. rst-class:: classref-method + +:ref:`String` **get_version_alias**\ (\ ) |const| :ref:`๐Ÿ”—` + +Returns the branded version used in marketing, followed by the build number (on Windows) or the version number (on macOS). Examples include ``11 (build 22000)`` and ``Sequoia (15.0.0)``. This value can then be appended to :ref:`get_name` to get a full, human-readable operating system name and version combination for the operating system. Windows feature updates such as 24H2 are not contained in the resulting string, but Windows Server is recognized as such (e.g. ``2025 (build 26100)`` for Windows Server 2025). + +\ **Note:** This method is only supported on Windows and macOS. On other operating systems, it returns the same value as :ref:`get_version`. + +.. rst-class:: classref-item-separator + +---- + .. _class_OS_method_get_video_adapter_driver_info: .. rst-class:: classref-method @@ -1487,10 +1521,10 @@ Returns ``true`` if the input keycode corresponds to a Unicode character. For a .. code-tab:: csharp - GD.Print(OS.IsKeycodeUnicode((long)Key.G)); // Prints true - GD.Print(OS.IsKeycodeUnicode((long)Key.Kp4)); // Prints true - GD.Print(OS.IsKeycodeUnicode((long)Key.Tab)); // Prints false - GD.Print(OS.IsKeycodeUnicode((long)Key.Escape)); // Prints false + GD.Print(OS.IsKeycodeUnicode((long)Key.G)); // Prints True + GD.Print(OS.IsKeycodeUnicode((long)Key.Kp4)); // Prints True + GD.Print(OS.IsKeycodeUnicode((long)Key.Tab)); // Prints False + GD.Print(OS.IsKeycodeUnicode((long)Key.Escape)); // Prints False @@ -1621,7 +1655,11 @@ Returns :ref:`@GlobalScope.FAILED` if the fi Initializes the singleton for the system MIDI driver, allowing Redot to receive :ref:`InputEventMIDI`. See also :ref:`get_connected_midi_inputs` and :ref:`close_midi_inputs`. -\ **Note:** This method is implemented on Linux, macOS, and Windows. +\ **Note:** This method is implemented on Linux, macOS, Windows, and Web. + +\ **Note:** On the Web platform, Web MIDI needs to be supported by the browser. `For the time being `__, it is currently supported by all major browsers, except Safari. + +\ **Note:** On the Web platform, using MIDI input requires a browser permission to be granted first. This permission request is performed when calling :ref:`open_midi_inputs`. The browser will refrain from processing MIDI input until the user accepts the permission request. .. rst-class:: classref-item-separator @@ -1663,6 +1701,8 @@ Reads a user input as a UTF-8 encoded string from the standard input. This opera - If standard input is a file, this method will read a specific amount of data (or less if end-of-file is reached) and return immediately. +\ **Note:** This method automatically replaces ``\r\n`` line breaks with ``\n`` and removes them from the end of the string. Use :ref:`read_buffer_from_stdin` to read the unprocessed data. + \ **Note:** This method is implemented on Linux, macOS, and Windows. \ **Note:** On exported Windows builds, run the console wrapper executable to access the terminal. If standard input is console, calling this method without console wrapped will freeze permanently. If standard input is pipe or file, it can be used without console wrapper. If you need a single executable with full console support, use a custom build compiled with the ``windows_subsystem=console`` flag. diff --git a/classes/class_packedfloat32array.rst b/classes/class_packedfloat32array.rst index 30b649c635f..2bc6c68381c 100644 --- a/classes/class_packedfloat32array.rst +++ b/classes/class_packedfloat32array.rst @@ -437,7 +437,7 @@ Sorts the elements of the array in ascending order. :ref:`PackedByteArray` **to_byte_array**\ (\ ) |const| :ref:`๐Ÿ”—` -Returns a copy of the data converted to a :ref:`PackedByteArray`, where each element have been encoded as 4 bytes. +Returns a copy of the data converted to a :ref:`PackedByteArray`, where each element has been encoded as 4 bytes. The size of the new array will be ``float32_array.size() * 4``. diff --git a/classes/class_packedfloat64array.rst b/classes/class_packedfloat64array.rst index 9752c056337..b4165efe2a6 100644 --- a/classes/class_packedfloat64array.rst +++ b/classes/class_packedfloat64array.rst @@ -439,7 +439,7 @@ Sorts the elements of the array in ascending order. :ref:`PackedByteArray` **to_byte_array**\ (\ ) |const| :ref:`๐Ÿ”—` -Returns a copy of the data converted to a :ref:`PackedByteArray`, where each element have been encoded as 8 bytes. +Returns a copy of the data converted to a :ref:`PackedByteArray`, where each element has been encoded as 8 bytes. The size of the new array will be ``float64_array.size() * 8``. diff --git a/classes/class_packedint32array.rst b/classes/class_packedint32array.rst index 50417acf23c..b4eba0272d9 100644 --- a/classes/class_packedint32array.rst +++ b/classes/class_packedint32array.rst @@ -425,7 +425,7 @@ Sorts the elements of the array in ascending order. :ref:`PackedByteArray` **to_byte_array**\ (\ ) |const| :ref:`๐Ÿ”—` -Returns a copy of the data converted to a :ref:`PackedByteArray`, where each element have been encoded as 4 bytes. +Returns a copy of the data converted to a :ref:`PackedByteArray`, where each element has been encoded as 4 bytes. The size of the new array will be ``int32_array.size() * 4``. diff --git a/classes/class_packedint64array.rst b/classes/class_packedint64array.rst index 66e426b07e1..8f13118a375 100644 --- a/classes/class_packedint64array.rst +++ b/classes/class_packedint64array.rst @@ -21,7 +21,7 @@ An array specifically designed to hold 64-bit integer values. Packs data tightly \ **Note:** This type stores signed 64-bit integers, which means it can take values in the interval ``[-2^63, 2^63 - 1]``, i.e. ``[-9223372036854775808, 9223372036854775807]``. Exceeding those bounds will wrap around. If you only need to pack 32-bit integers tightly, see :ref:`PackedInt32Array` for a more memory-friendly alternative. -\ **Differences between packed arrays, typed arrays, and untyped arrays:** Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. :ref:`PackedInt32Array` versus ``Array[int]``). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as :ref:`Array.map`. Typed arrays are in turn faster to iterate on and modify than untyped arrays. +\ **Differences between packed arrays, typed arrays, and untyped arrays:** Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. **PackedInt64Array** versus ``Array[int]``). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as :ref:`Array.map`. Typed arrays are in turn faster to iterate on and modify than untyped arrays. \ **Note:** Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use :ref:`duplicate`. This is *not* the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will *not* affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again. @@ -427,7 +427,7 @@ Sorts the elements of the array in ascending order. :ref:`PackedByteArray` **to_byte_array**\ (\ ) |const| :ref:`๐Ÿ”—` -Returns a copy of the data converted to a :ref:`PackedByteArray`, where each element have been encoded as 8 bytes. +Returns a copy of the data converted to a :ref:`PackedByteArray`, where each element has been encoded as 8 bytes. The size of the new array will be ``int64_array.size() * 8``. diff --git a/classes/class_packedvector4array.rst b/classes/class_packedvector4array.rst index 21c939a40a8..aa54c9a2bd1 100644 --- a/classes/class_packedvector4array.rst +++ b/classes/class_packedvector4array.rst @@ -19,6 +19,8 @@ Description An array specifically designed to hold :ref:`Vector4`. Packs data tightly, so it saves memory for large array sizes. +\ **Differences between packed arrays, typed arrays, and untyped arrays:** Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. **PackedVector4Array** versus ``Array[Vector4]``). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as :ref:`Array.map`. Typed arrays are in turn faster to iterate on and modify than untyped arrays. + \ **Note:** Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use :ref:`duplicate`. This is *not* the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will *not* affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again. .. note:: diff --git a/classes/class_panelcontainer.rst b/classes/class_panelcontainer.rst index a0be817aa7b..b85075d5182 100644 --- a/classes/class_panelcontainer.rst +++ b/classes/class_panelcontainer.rst @@ -12,7 +12,7 @@ PanelContainer **Inherits:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`ScriptEditor` +**Inherited By:** :ref:`OpenXRBindingModifierEditor`, :ref:`ScriptEditor` A container that keeps its child controls within the area of a :ref:`StyleBox`. diff --git a/classes/class_pckpacker.rst b/classes/class_pckpacker.rst index bf5cd6d6ea5..9b548f880ba 100644 --- a/classes/class_pckpacker.rst +++ b/classes/class_pckpacker.rst @@ -42,6 +42,8 @@ The **PCKPacker** is used to create packages that can be loaded into a running p The above **PCKPacker** creates package ``test.pck``, then adds a file named ``text.txt`` at the root of the package. +\ **Note:** PCK is Redot's own pack file format. To create ZIP archives that can be read by any program, use :ref:`ZIPPacker` instead. + .. rst-class:: classref-reftable-group Methods diff --git a/classes/class_physicsserver3d.rst b/classes/class_physicsserver3d.rst index 8b8a40a0e16..8c89447023a 100644 --- a/classes/class_physicsserver3d.rst +++ b/classes/class_physicsserver3d.rst @@ -228,13 +228,13 @@ Methods +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`free_rid`\ (\ rid\: :ref:`RID`\ ) | +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`generic_6dof_joint_get_flag`\ (\ joint\: :ref:`RID`, axis\: Vector3.Axis, flag\: :ref:`G6DOFJointAxisFlag`\ ) |const| | + | :ref:`bool` | :ref:`generic_6dof_joint_get_flag`\ (\ joint\: :ref:`RID`, axis\: :ref:`Axis`, flag\: :ref:`G6DOFJointAxisFlag`\ ) |const| | +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`generic_6dof_joint_get_param`\ (\ joint\: :ref:`RID`, axis\: Vector3.Axis, param\: :ref:`G6DOFJointAxisParam`\ ) |const| | + | :ref:`float` | :ref:`generic_6dof_joint_get_param`\ (\ joint\: :ref:`RID`, axis\: :ref:`Axis`, param\: :ref:`G6DOFJointAxisParam`\ ) |const| | +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`generic_6dof_joint_set_flag`\ (\ joint\: :ref:`RID`, axis\: Vector3.Axis, flag\: :ref:`G6DOFJointAxisFlag`, enable\: :ref:`bool`\ ) | + | |void| | :ref:`generic_6dof_joint_set_flag`\ (\ joint\: :ref:`RID`, axis\: :ref:`Axis`, flag\: :ref:`G6DOFJointAxisFlag`, enable\: :ref:`bool`\ ) | +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`generic_6dof_joint_set_param`\ (\ joint\: :ref:`RID`, axis\: Vector3.Axis, param\: :ref:`G6DOFJointAxisParam`, value\: :ref:`float`\ ) | + | |void| | :ref:`generic_6dof_joint_set_param`\ (\ joint\: :ref:`RID`, axis\: :ref:`Axis`, param\: :ref:`G6DOFJointAxisParam`, value\: :ref:`float`\ ) | +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_process_info`\ (\ process_info\: :ref:`ProcessInfo`\ ) | +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -3043,7 +3043,7 @@ Destroys any of the objects created by PhysicsServer3D. If the :ref:`RID` **generic_6dof_joint_get_flag**\ (\ joint\: :ref:`RID`, axis\: Vector3.Axis, flag\: :ref:`G6DOFJointAxisFlag`\ ) |const| :ref:`๐Ÿ”—` +:ref:`bool` **generic_6dof_joint_get_flag**\ (\ joint\: :ref:`RID`, axis\: :ref:`Axis`, flag\: :ref:`G6DOFJointAxisFlag`\ ) |const| :ref:`๐Ÿ”—` Returns the value of a generic 6DOF joint flag. See :ref:`G6DOFJointAxisFlag` for the list of available flags. @@ -3055,7 +3055,7 @@ Returns the value of a generic 6DOF joint flag. See :ref:`G6DOFJointAxisFlag` **generic_6dof_joint_get_param**\ (\ joint\: :ref:`RID`, axis\: Vector3.Axis, param\: :ref:`G6DOFJointAxisParam`\ ) |const| :ref:`๐Ÿ”—` +:ref:`float` **generic_6dof_joint_get_param**\ (\ joint\: :ref:`RID`, axis\: :ref:`Axis`, param\: :ref:`G6DOFJointAxisParam`\ ) |const| :ref:`๐Ÿ”—` Returns the value of a generic 6DOF joint parameter. See :ref:`G6DOFJointAxisParam` for the list of available parameters. @@ -3067,7 +3067,7 @@ Returns the value of a generic 6DOF joint parameter. See :ref:`G6DOFJointAxisPar .. rst-class:: classref-method -|void| **generic_6dof_joint_set_flag**\ (\ joint\: :ref:`RID`, axis\: Vector3.Axis, flag\: :ref:`G6DOFJointAxisFlag`, enable\: :ref:`bool`\ ) :ref:`๐Ÿ”—` +|void| **generic_6dof_joint_set_flag**\ (\ joint\: :ref:`RID`, axis\: :ref:`Axis`, flag\: :ref:`G6DOFJointAxisFlag`, enable\: :ref:`bool`\ ) :ref:`๐Ÿ”—` Sets the value of a given generic 6DOF joint flag. See :ref:`G6DOFJointAxisFlag` for the list of available flags. @@ -3079,7 +3079,7 @@ Sets the value of a given generic 6DOF joint flag. See :ref:`G6DOFJointAxisFlag< .. rst-class:: classref-method -|void| **generic_6dof_joint_set_param**\ (\ joint\: :ref:`RID`, axis\: Vector3.Axis, param\: :ref:`G6DOFJointAxisParam`, value\: :ref:`float`\ ) :ref:`๐Ÿ”—` +|void| **generic_6dof_joint_set_param**\ (\ joint\: :ref:`RID`, axis\: :ref:`Axis`, param\: :ref:`G6DOFJointAxisParam`, value\: :ref:`float`\ ) :ref:`๐Ÿ”—` Sets the value of a given generic 6DOF joint parameter. See :ref:`G6DOFJointAxisParam` for the list of available parameters. diff --git a/classes/class_physicsserver3dextension.rst b/classes/class_physicsserver3dextension.rst index 956dbc8c60b..05c47015c85 100644 --- a/classes/class_physicsserver3dextension.rst +++ b/classes/class_physicsserver3dextension.rst @@ -230,13 +230,13 @@ Methods +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_free_rid`\ (\ rid\: :ref:`RID`\ ) |virtual| | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_generic_6dof_joint_get_flag`\ (\ joint\: :ref:`RID`, axis\: Vector3.Axis, flag\: :ref:`G6DOFJointAxisFlag`\ ) |virtual| |const| | + | :ref:`bool` | :ref:`_generic_6dof_joint_get_flag`\ (\ joint\: :ref:`RID`, axis\: :ref:`Axis`, flag\: :ref:`G6DOFJointAxisFlag`\ ) |virtual| |const| | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_generic_6dof_joint_get_param`\ (\ joint\: :ref:`RID`, axis\: Vector3.Axis, param\: :ref:`G6DOFJointAxisParam`\ ) |virtual| |const| | + | :ref:`float` | :ref:`_generic_6dof_joint_get_param`\ (\ joint\: :ref:`RID`, axis\: :ref:`Axis`, param\: :ref:`G6DOFJointAxisParam`\ ) |virtual| |const| | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_generic_6dof_joint_set_flag`\ (\ joint\: :ref:`RID`, axis\: Vector3.Axis, flag\: :ref:`G6DOFJointAxisFlag`, enable\: :ref:`bool`\ ) |virtual| | + | |void| | :ref:`_generic_6dof_joint_set_flag`\ (\ joint\: :ref:`RID`, axis\: :ref:`Axis`, flag\: :ref:`G6DOFJointAxisFlag`, enable\: :ref:`bool`\ ) |virtual| | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_generic_6dof_joint_set_param`\ (\ joint\: :ref:`RID`, axis\: Vector3.Axis, param\: :ref:`G6DOFJointAxisParam`, value\: :ref:`float`\ ) |virtual| | + | |void| | :ref:`_generic_6dof_joint_set_param`\ (\ joint\: :ref:`RID`, axis\: :ref:`Axis`, param\: :ref:`G6DOFJointAxisParam`, value\: :ref:`float`\ ) |virtual| | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_get_process_info`\ (\ process_info\: :ref:`ProcessInfo`\ ) |virtual| | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -1812,7 +1812,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool` **_generic_6dof_joint_get_flag**\ (\ joint\: :ref:`RID`, axis\: Vector3.Axis, flag\: :ref:`G6DOFJointAxisFlag`\ ) |virtual| |const| :ref:`๐Ÿ”—` +:ref:`bool` **_generic_6dof_joint_get_flag**\ (\ joint\: :ref:`RID`, axis\: :ref:`Axis`, flag\: :ref:`G6DOFJointAxisFlag`\ ) |virtual| |const| :ref:`๐Ÿ”—` .. container:: contribute @@ -1826,7 +1826,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float` **_generic_6dof_joint_get_param**\ (\ joint\: :ref:`RID`, axis\: Vector3.Axis, param\: :ref:`G6DOFJointAxisParam`\ ) |virtual| |const| :ref:`๐Ÿ”—` +:ref:`float` **_generic_6dof_joint_get_param**\ (\ joint\: :ref:`RID`, axis\: :ref:`Axis`, param\: :ref:`G6DOFJointAxisParam`\ ) |virtual| |const| :ref:`๐Ÿ”—` .. container:: contribute @@ -1840,7 +1840,7 @@ Method Descriptions .. rst-class:: classref-method -|void| **_generic_6dof_joint_set_flag**\ (\ joint\: :ref:`RID`, axis\: Vector3.Axis, flag\: :ref:`G6DOFJointAxisFlag`, enable\: :ref:`bool`\ ) |virtual| :ref:`๐Ÿ”—` +|void| **_generic_6dof_joint_set_flag**\ (\ joint\: :ref:`RID`, axis\: :ref:`Axis`, flag\: :ref:`G6DOFJointAxisFlag`, enable\: :ref:`bool`\ ) |virtual| :ref:`๐Ÿ”—` .. container:: contribute @@ -1854,7 +1854,7 @@ Method Descriptions .. rst-class:: classref-method -|void| **_generic_6dof_joint_set_param**\ (\ joint\: :ref:`RID`, axis\: Vector3.Axis, param\: :ref:`G6DOFJointAxisParam`, value\: :ref:`float`\ ) |virtual| :ref:`๐Ÿ”—` +|void| **_generic_6dof_joint_set_param**\ (\ joint\: :ref:`RID`, axis\: :ref:`Axis`, param\: :ref:`G6DOFJointAxisParam`, value\: :ref:`float`\ ) |virtual| :ref:`๐Ÿ”—` .. container:: contribute diff --git a/classes/class_polygonpathfinder.rst b/classes/class_polygonpathfinder.rst index 58e61c956d6..3c775831fcb 100644 --- a/classes/class_polygonpathfinder.rst +++ b/classes/class_polygonpathfinder.rst @@ -152,8 +152,8 @@ Returns ``true`` if ``point`` falls inside the polygon area. }; var connections = new int[] { 0, 1, 1, 2, 2, 0 }; polygonPathFinder.Setup(points, connections); - GD.Print(polygonPathFinder.IsPointInside(new Vector2(0.2f, 0.2f))); // Prints true - GD.Print(polygonPathFinder.IsPointInside(new Vector2(1.0f, 1.0f))); // Prints false + GD.Print(polygonPathFinder.IsPointInside(new Vector2(0.2f, 0.2f))); // Prints True + GD.Print(polygonPathFinder.IsPointInside(new Vector2(1.0f, 1.0f))); // Prints False diff --git a/classes/class_projection.rst b/classes/class_projection.rst index 29f3785587a..6ef13a0bbc3 100644 --- a/classes/class_projection.rst +++ b/classes/class_projection.rst @@ -151,57 +151,72 @@ Operators .. rst-class:: classref-descriptions-group -Constants ---------- +Enumerations +------------ + +.. _enum_Projection_Planes: + +.. rst-class:: classref-enumeration + +enum **Planes**: :ref:`๐Ÿ”—` .. _class_Projection_constant_PLANE_NEAR: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**PLANE_NEAR** = ``0`` :ref:`๐Ÿ”—` +:ref:`Planes` **PLANE_NEAR** = ``0`` The index value of the projection's near clipping plane. .. _class_Projection_constant_PLANE_FAR: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**PLANE_FAR** = ``1`` :ref:`๐Ÿ”—` +:ref:`Planes` **PLANE_FAR** = ``1`` The index value of the projection's far clipping plane. .. _class_Projection_constant_PLANE_LEFT: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**PLANE_LEFT** = ``2`` :ref:`๐Ÿ”—` +:ref:`Planes` **PLANE_LEFT** = ``2`` The index value of the projection's left clipping plane. .. _class_Projection_constant_PLANE_TOP: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**PLANE_TOP** = ``3`` :ref:`๐Ÿ”—` +:ref:`Planes` **PLANE_TOP** = ``3`` The index value of the projection's top clipping plane. .. _class_Projection_constant_PLANE_RIGHT: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**PLANE_RIGHT** = ``4`` :ref:`๐Ÿ”—` +:ref:`Planes` **PLANE_RIGHT** = ``4`` The index value of the projection's right clipping plane. .. _class_Projection_constant_PLANE_BOTTOM: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**PLANE_BOTTOM** = ``5`` :ref:`๐Ÿ”—` +:ref:`Planes` **PLANE_BOTTOM** = ``5`` The index value of the projection bottom clipping plane. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Constants +--------- + .. _class_Projection_constant_IDENTITY: .. rst-class:: classref-constant diff --git a/classes/class_projectsettings.rst b/classes/class_projectsettings.rst index 5e78b9710e2..3956dcd92d6 100644 --- a/classes/class_projectsettings.rst +++ b/classes/class_projectsettings.rst @@ -1209,6 +1209,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`navigation/baking/use_crash_prevention_checks` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`navigation/pathfinding/max_threads` | ``4`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`network/limits/debugger/max_chars_per_second` | ``32768`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`network/limits/debugger/max_errors_per_second` | ``400`` | @@ -1293,9 +1295,75 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`physics/common/physics_ticks_per_second` | ``60`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`physics/jolt_physics_3d/collisions/active_edge_threshold` | ``0.872665`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`physics/jolt_physics_3d/collisions/collision_margin_fraction` | ``0.08`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`physics/jolt_physics_3d/joints/world_node` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`physics/jolt_physics_3d/limits/max_angular_velocity` | ``47.1239`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`physics/jolt_physics_3d/limits/max_bodies` | ``10240`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`physics/jolt_physics_3d/limits/max_body_pairs` | ``65536`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`physics/jolt_physics_3d/limits/max_contact_constraints` | ``20480`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`physics/jolt_physics_3d/limits/max_linear_velocity` | ``500.0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`physics/jolt_physics_3d/limits/temporary_memory_buffer_size` | ``32`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`physics/jolt_physics_3d/limits/world_boundary_shape_size` | ``2000.0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`physics/jolt_physics_3d/motion_queries/recovery_amount` | ``0.4`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`physics/jolt_physics_3d/motion_queries/recovery_iterations` | ``4`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`physics/jolt_physics_3d/motion_queries/use_enhanced_internal_edge_removal` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`physics/jolt_physics_3d/queries/enable_ray_cast_face_index` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`physics/jolt_physics_3d/queries/use_enhanced_internal_edge_removal` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`physics/jolt_physics_3d/simulation/allow_sleep` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`physics/jolt_physics_3d/simulation/areas_detect_static_bodies` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`physics/jolt_physics_3d/simulation/baumgarte_stabilization_factor` | ``0.2`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`physics/jolt_physics_3d/simulation/body_pair_contact_cache_angle_threshold` | ``0.0349066`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`physics/jolt_physics_3d/simulation/body_pair_contact_cache_distance_threshold` | ``0.001`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`physics/jolt_physics_3d/simulation/body_pair_contact_cache_enabled` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`physics/jolt_physics_3d/simulation/bounce_velocity_threshold` | ``1.0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`physics/jolt_physics_3d/simulation/continuous_cd_max_penetration` | ``0.25`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`physics/jolt_physics_3d/simulation/continuous_cd_movement_threshold` | ``0.75`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`physics/jolt_physics_3d/simulation/generate_all_kinematic_contacts` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`physics/jolt_physics_3d/simulation/penetration_slop` | ``0.02`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`physics/jolt_physics_3d/simulation/position_steps` | ``2`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`physics/jolt_physics_3d/simulation/sleep_time_threshold` | ``0.5`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`physics/jolt_physics_3d/simulation/sleep_velocity_threshold` | ``0.03`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`physics/jolt_physics_3d/simulation/soft_body_point_radius` | ``0.01`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`physics/jolt_physics_3d/simulation/speculative_contact_distance` | ``0.02`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`physics/jolt_physics_3d/simulation/use_enhanced_internal_edge_removal` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`physics/jolt_physics_3d/simulation/velocity_steps` | ``10`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/2d/batching/item_buffer_size` | ``16384`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`rendering/2d/batching/uniform_set_cache_size` | ``256`` | + | :ref:`int` | :ref:`rendering/2d/batching/uniform_set_cache_size` | ``4096`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/2d/sdf/oversize` | ``1`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ @@ -1421,6 +1489,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/lightmapping/bake_performance/max_rays_per_probe_pass` | ``64`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/lightmapping/bake_performance/max_transparency_rays` | ``8`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/lightmapping/bake_performance/region_size` | ``512`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/lightmapping/bake_quality/high_quality_probe_ray_count` | ``512`` | @@ -1563,6 +1633,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/rendering_device/staging_buffer/max_size_mb` | ``128`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/rendering_device/staging_buffer/texture_download_region_size_px` | ``64`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/rendering_device/staging_buffer/texture_upload_region_size_px` | ``64`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/rendering_device/vsync/frame_queue_size` | ``2`` | @@ -1633,6 +1705,10 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`threading/worker_pool/max_threads` | ``-1`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`xr/openxr/binding_modifiers/analog_threshold` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`xr/openxr/binding_modifiers/dpad_binding` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`xr/openxr/default_action_map` | ``"res://openxr_action_map.tres"`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`xr/openxr/enabled` | ``false`` | @@ -1966,7 +2042,7 @@ If ``true``, the application quits automatically when navigating back (e.g. usin :ref:`bool` **application/config/use_custom_user_dir** = ``false`` :ref:`๐Ÿ”—` -If ``true``, the project will save user data to its own user directory. If :ref:`application/config/custom_user_dir_name` is empty, ``/`` directory will be used. If ``false``, the project will save user data to ``/Godot/app_userdata/``. +If ``true``, the project will save user data to its own user directory. If :ref:`application/config/custom_user_dir_name` is empty, ``/`` directory will be used. If ``false``, the project will save user data to ``/Redot/app_userdata/``. See also `File paths in Redot projects <../tutorials/io/data_paths.html#accessing-persistent-user-data-user>`__. This setting is only effective on desktop platforms. @@ -9108,6 +9184,18 @@ If enabled, and baking would potentially lead to an engine crash, the baking wil ---- +.. _class_ProjectSettings_property_navigation/pathfinding/max_threads: + +.. rst-class:: classref-property + +:ref:`int` **navigation/pathfinding/max_threads** = ``4`` :ref:`๐Ÿ”—` + +Maximum number of threads that can run pathfinding queries simultaneously on the same pathfinding graph, for example the same navigation map. Additional threads increase memory consumption and synchronization time due to the need for extra data copies prepared for each thread. A value of ``-1`` means unlimited and the maximum available OS processor count is used. Defaults to ``1`` when the OS does not support threads. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_network/limits/debugger/max_chars_per_second: .. rst-class:: classref-property @@ -9744,6 +9832,466 @@ The number of fixed iterations per second. This controls how often physics simul ---- +.. _class_ProjectSettings_property_physics/jolt_physics_3d/collisions/active_edge_threshold: + +.. rst-class:: classref-property + +:ref:`float` **physics/jolt_physics_3d/collisions/active_edge_threshold** = ``0.872665`` :ref:`๐Ÿ”—` + +The maximum angle, in radians, between two adjacent triangles in a :ref:`ConcavePolygonShape3D` or :ref:`HeightMapShape3D` for which the edge between those triangles is considered inactive. + +Collisions against an inactive edge will have its normal overridden to instead be the surface normal of the triangle. This can help alleviate ghost collisions. + +\ **Note:** Setting this too high can result in objects not depenetrating properly. + +\ **Note:** This applies to all shape queries, as well as physics bodies within the simulation. + +\ **Note:** This does not apply when enabling Jolt's enhanced internal edge removal, which supersedes this. + +\ **Note:** This setting will only be read once during the lifetime of the application. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_physics/jolt_physics_3d/collisions/collision_margin_fraction: + +.. rst-class:: classref-property + +:ref:`float` **physics/jolt_physics_3d/collisions/collision_margin_fraction** = ``0.08`` :ref:`๐Ÿ”—` + +The amount of collision margin to use for certain convex collision shapes, such as :ref:`BoxShape3D`, :ref:`CylinderShape3D` and :ref:`ConvexPolygonShape3D`, as a fraction of the shape's shortest axis, with :ref:`Shape3D.margin` as the upper bound. This is mainly used to speed up collision detection with convex shapes. + +\ **Note:** Collision margins in Jolt do not add any extra size to the shape. Instead the shape is first shrunk by the margin and then expanded by the same amount, resulting in a shape with rounded corners. + +\ **Note:** Setting this value too close to ``0.0`` may also negatively affect the accuracy of the collision detection with convex shapes. + +\ **Note:** This setting will only be read once during the lifetime of the application. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_physics/jolt_physics_3d/joints/world_node: + +.. rst-class:: classref-property + +:ref:`int` **physics/jolt_physics_3d/joints/world_node** = ``0`` :ref:`๐Ÿ”—` + +Which of the two nodes bound by a joint should represent the world when one of the two is omitted, as either :ref:`Joint3D.node_a` or :ref:`Joint3D.node_b`. This can be thought of as having the omitted node be a :ref:`StaticBody3D` at the joint's position. Joint limits are more easily expressed when :ref:`Joint3D.node_a` represents the world. + +\ **Note:** In Godot Physics, only :ref:`Joint3D.node_b` can represent the world. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_physics/jolt_physics_3d/limits/max_angular_velocity: + +.. rst-class:: classref-property + +:ref:`float` **physics/jolt_physics_3d/limits/max_angular_velocity** = ``47.1239`` :ref:`๐Ÿ”—` + +The maximum angular velocity that a :ref:`RigidBody3D` can reach, in radians per second. + +This is mainly used as a fail-safe, to prevent the simulation from exploding, as fast-moving objects colliding with complex physics structures can otherwise cause them to go out of control. Fast-moving objects can also cause a lot of stress on the collision detection system, which can slow down the simulation considerably. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_physics/jolt_physics_3d/limits/max_bodies: + +.. rst-class:: classref-property + +:ref:`int` **physics/jolt_physics_3d/limits/max_bodies** = ``10240`` :ref:`๐Ÿ”—` + +The maximum number of :ref:`PhysicsBody3D` to support at the same time, awake or sleeping. When this limit is exceeded, an error is reported and anything past that point is undefined behavior. + +\ **Note:** This limit also applies within the editor. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_physics/jolt_physics_3d/limits/max_body_pairs: + +.. rst-class:: classref-property + +:ref:`int` **physics/jolt_physics_3d/limits/max_body_pairs** = ``65536`` :ref:`๐Ÿ”—` + +The maximum number of body pairs to allow processing of. When this limit is exceeded, a warning is reported and collisions will randomly be ignored while bodies pass through each other. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_physics/jolt_physics_3d/limits/max_contact_constraints: + +.. rst-class:: classref-property + +:ref:`int` **physics/jolt_physics_3d/limits/max_contact_constraints** = ``20480`` :ref:`๐Ÿ”—` + +The maximum number of contact constraints to allow processing of. When this limit is exceeded, a warning is reported and collisions will randomly be ignored while bodies pass through each other. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_physics/jolt_physics_3d/limits/max_linear_velocity: + +.. rst-class:: classref-property + +:ref:`float` **physics/jolt_physics_3d/limits/max_linear_velocity** = ``500.0`` :ref:`๐Ÿ”—` + +The maximum linear velocity that a :ref:`RigidBody3D` can reach, in meters per second. + +This is mainly used as a fail-safe, to prevent the simulation from exploding, as fast-moving objects colliding with complex physics structures can otherwise cause them to go out of control. Fast-moving objects can also cause a lot of stress on the collision detection system, which can slow down the simulation considerably. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_physics/jolt_physics_3d/limits/temporary_memory_buffer_size: + +.. rst-class:: classref-property + +:ref:`int` **physics/jolt_physics_3d/limits/temporary_memory_buffer_size** = ``32`` :ref:`๐Ÿ”—` + +The amount of memory to pre-allocate for the stack allocator used within Jolt, in MiB. This allocator is used within the physics step to store things that are only needed during it, like which bodies are in contact, how they form islands and the data needed to solve the contacts. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_physics/jolt_physics_3d/limits/world_boundary_shape_size: + +.. rst-class:: classref-property + +:ref:`float` **physics/jolt_physics_3d/limits/world_boundary_shape_size** = ``2000.0`` :ref:`๐Ÿ”—` + +The size of :ref:`WorldBoundaryShape3D` boundaries, for all three dimensions. The plane is effectively centered within a box of this size, and anything outside of the box will not collide with it. This is necessary as :ref:`WorldBoundaryShape3D` is not unbounded when using Jolt, in order to prevent precision issues. + +\ **Note:** Setting this value too high can make collision detection less accurate. + +\ **Note:** Collisions against the effective edges of a :ref:`WorldBoundaryShape3D` will be inconsistent. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_physics/jolt_physics_3d/motion_queries/recovery_amount: + +.. rst-class:: classref-property + +:ref:`float` **physics/jolt_physics_3d/motion_queries/recovery_amount** = ``0.4`` :ref:`๐Ÿ”—` + +Fraction of the total penetration to depenetrate per iteration during motion queries. + +\ **Note:** This affects methods :ref:`CharacterBody3D.move_and_slide`, :ref:`PhysicsBody3D.move_and_collide`, :ref:`PhysicsBody3D.test_move` and :ref:`PhysicsServer3D.body_test_motion`. + +\ **Note:** This setting will only be read once during the lifetime of the application. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_physics/jolt_physics_3d/motion_queries/recovery_iterations: + +.. rst-class:: classref-property + +:ref:`int` **physics/jolt_physics_3d/motion_queries/recovery_iterations** = ``4`` :ref:`๐Ÿ”—` + +The number of iterations to run when depenetrating during motion queries. + +\ **Note:** This affects methods :ref:`CharacterBody3D.move_and_slide`, :ref:`PhysicsBody3D.move_and_collide`, :ref:`PhysicsBody3D.test_move` and :ref:`PhysicsServer3D.body_test_motion`. + +\ **Note:** This setting will only be read once during the lifetime of the application. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_physics/jolt_physics_3d/motion_queries/use_enhanced_internal_edge_removal: + +.. rst-class:: classref-property + +:ref:`bool` **physics/jolt_physics_3d/motion_queries/use_enhanced_internal_edge_removal** = ``true`` :ref:`๐Ÿ”—` + +If ``true``, enables Jolt's enhanced internal edge removal during motion queries. This can help alleviate ghost collisions, but only with edges within a single body, meaning edges between separate bodies can still cause ghost collisions. + +\ **Note:** This affects methods :ref:`CharacterBody3D.move_and_slide`, :ref:`PhysicsBody3D.move_and_collide`, :ref:`PhysicsBody3D.test_move` and :ref:`PhysicsServer3D.body_test_motion`. + +\ **Note:** This setting will only be read once during the lifetime of the application. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_physics/jolt_physics_3d/queries/enable_ray_cast_face_index: + +.. rst-class:: classref-property + +:ref:`bool` **physics/jolt_physics_3d/queries/enable_ray_cast_face_index** = ``false`` :ref:`๐Ÿ”—` + +If ``true``, populates the ``face_index`` field in the results of :ref:`PhysicsDirectSpaceState3D.intersect_ray`, also accessed through :ref:`RayCast3D.get_collision_face_index`. If ``false``, the ``face_index`` field will be left at its default value of ``-1``. + +\ **Note:** Enabling this setting will increase Jolt's memory usage for :ref:`ConcavePolygonShape3D` by around 25%. + +\ **Note:** This setting will only be read once during the lifetime of the application. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_physics/jolt_physics_3d/queries/use_enhanced_internal_edge_removal: + +.. rst-class:: classref-property + +:ref:`bool` **physics/jolt_physics_3d/queries/use_enhanced_internal_edge_removal** = ``false`` :ref:`๐Ÿ”—` + +If ``true``, enables Jolt's enhanced internal edge removal during shape queries. This can help alleviate ghost collisions when using shape queries for things like character movement, but only with edges within a single body, meaning edges between separate bodies can still cause ghost collisions. + +\ **Note:** This affects methods :ref:`PhysicsDirectSpaceState3D.cast_motion`, :ref:`PhysicsDirectSpaceState3D.collide_shape`, :ref:`PhysicsDirectSpaceState3D.get_rest_info` and :ref:`PhysicsDirectSpaceState3D.intersect_shape`. + +\ **Note:** Enabling this setting can cause certain shapes to be culled from the results entirely, but you will get at least one intersection per body. + +\ **Note:** This setting will only be read once during the lifetime of the application. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_physics/jolt_physics_3d/simulation/allow_sleep: + +.. rst-class:: classref-property + +:ref:`bool` **physics/jolt_physics_3d/simulation/allow_sleep** = ``true`` :ref:`๐Ÿ”—` + +If ``true``, :ref:`RigidBody3D` nodes are allowed to go to sleep if their velocity is below the threshold defined in :ref:`physics/jolt_physics_3d/simulation/sleep_velocity_threshold` for the duration set in :ref:`physics/jolt_physics_3d/simulation/sleep_time_threshold`. This can improve physics simulation performance when there are non-moving :ref:`RigidBody3D` nodes, at the cost of some nodes possibly failing to wake up in certain scenarios. Consider disabling this temporarily to troubleshoot :ref:`RigidBody3D` nodes not moving when they should. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_physics/jolt_physics_3d/simulation/areas_detect_static_bodies: + +.. rst-class:: classref-property + +:ref:`bool` **physics/jolt_physics_3d/simulation/areas_detect_static_bodies** = ``false`` :ref:`๐Ÿ”—` + +If ``true``, :ref:`Area3D` nodes are able to detect overlaps with :ref:`StaticBody3D` nodes. + +\ **Note:** Enabling this setting can come at a heavy CPU and memory cost if you allow many/large :ref:`Area3D` to overlap with complex static geometry, such as :ref:`ConcavePolygonShape3D` or :ref:`HeightMapShape3D`. It is strongly recommended that you set up your collision layers and masks in such a way that only a few small :ref:`Area3D` nodes can detect :ref:`StaticBody3D` nodes. + +\ **Note:** This also applies to overlaps with a :ref:`RigidBody3D` frozen with :ref:`RigidBody3D.FREEZE_MODE_STATIC`. + +\ **Note:** This is not needed to detect overlaps with :ref:`AnimatableBody3D`, as it is a kinematic body, despite inheriting from :ref:`StaticBody3D`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_physics/jolt_physics_3d/simulation/baumgarte_stabilization_factor: + +.. rst-class:: classref-property + +:ref:`float` **physics/jolt_physics_3d/simulation/baumgarte_stabilization_factor** = ``0.2`` :ref:`๐Ÿ”—` + +How much of the position error of a :ref:`RigidBody3D` to fix during a physics step, where ``0.0`` is none and ``1.0`` is the full amount. This affects things like how quickly bodies depenetrate. + +\ **Note:** Setting this value too high can make :ref:`RigidBody3D` nodes unstable. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_physics/jolt_physics_3d/simulation/body_pair_contact_cache_angle_threshold: + +.. rst-class:: classref-property + +:ref:`float` **physics/jolt_physics_3d/simulation/body_pair_contact_cache_angle_threshold** = ``0.0349066`` :ref:`๐Ÿ”—` + +The maximum relative angle by which a body pair can move and still reuse the collision results from the previous physics step, in radians. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_physics/jolt_physics_3d/simulation/body_pair_contact_cache_distance_threshold: + +.. rst-class:: classref-property + +:ref:`float` **physics/jolt_physics_3d/simulation/body_pair_contact_cache_distance_threshold** = ``0.001`` :ref:`๐Ÿ”—` + +The maximum relative distance by which a body pair can move and still reuse the collision results from the previous physics step, in meters. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_physics/jolt_physics_3d/simulation/body_pair_contact_cache_enabled: + +.. rst-class:: classref-property + +:ref:`bool` **physics/jolt_physics_3d/simulation/body_pair_contact_cache_enabled** = ``true`` :ref:`๐Ÿ”—` + +If ``true``, enables the body pair contact cache, which removes the need for potentially expensive collision detection when the relative orientation between two bodies hasn't changed much. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_physics/jolt_physics_3d/simulation/bounce_velocity_threshold: + +.. rst-class:: classref-property + +:ref:`float` **physics/jolt_physics_3d/simulation/bounce_velocity_threshold** = ``1.0`` :ref:`๐Ÿ”—` + +The minimum velocity needed before a collision can be bouncy, in meters per second. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_physics/jolt_physics_3d/simulation/continuous_cd_max_penetration: + +.. rst-class:: classref-property + +:ref:`float` **physics/jolt_physics_3d/simulation/continuous_cd_max_penetration** = ``0.25`` :ref:`๐Ÿ”—` + +Fraction of a body's inner radius that may penetrate another body while using continuous collision detection. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_physics/jolt_physics_3d/simulation/continuous_cd_movement_threshold: + +.. rst-class:: classref-property + +:ref:`float` **physics/jolt_physics_3d/simulation/continuous_cd_movement_threshold** = ``0.75`` :ref:`๐Ÿ”—` + +Fraction of a body's inner radius that the body must move per step to make use of continuous collision detection. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_physics/jolt_physics_3d/simulation/generate_all_kinematic_contacts: + +.. rst-class:: classref-property + +:ref:`bool` **physics/jolt_physics_3d/simulation/generate_all_kinematic_contacts** = ``false`` :ref:`๐Ÿ”—` + +If ``true``, a :ref:`RigidBody3D` frozen with :ref:`RigidBody3D.FREEZE_MODE_KINEMATIC` is able to collide with other kinematic and static bodies, and therefore generate contacts for them. + +\ **Note:** This setting can come at a heavy CPU and memory cost if you allow many/large frozen kinematic bodies with a non-zero :ref:`RigidBody3D.max_contacts_reported` to overlap with complex static geometry, such as :ref:`ConcavePolygonShape3D` or :ref:`HeightMapShape3D`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_physics/jolt_physics_3d/simulation/penetration_slop: + +.. rst-class:: classref-property + +:ref:`float` **physics/jolt_physics_3d/simulation/penetration_slop** = ``0.02`` :ref:`๐Ÿ”—` + +How much bodies are allowed to penetrate each other, in meters. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_physics/jolt_physics_3d/simulation/position_steps: + +.. rst-class:: classref-property + +:ref:`int` **physics/jolt_physics_3d/simulation/position_steps** = ``2`` :ref:`๐Ÿ”—` + +Number of solver position iterations. The greater the number of iterations, the more accurate the simulation will be, at the cost of CPU performance. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_physics/jolt_physics_3d/simulation/sleep_time_threshold: + +.. rst-class:: classref-property + +:ref:`float` **physics/jolt_physics_3d/simulation/sleep_time_threshold** = ``0.5`` :ref:`๐Ÿ”—` + +Time in seconds a :ref:`RigidBody3D` will spend below the sleep velocity threshold before going to sleep. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_physics/jolt_physics_3d/simulation/sleep_velocity_threshold: + +.. rst-class:: classref-property + +:ref:`float` **physics/jolt_physics_3d/simulation/sleep_velocity_threshold** = ``0.03`` :ref:`๐Ÿ”—` + +The linear velocity of specific points on the bounding box of a :ref:`RigidBody3D`, below which it can be put to sleep, in meters per second. These points help capture both the linear and angular motion of a :ref:`RigidBody3D`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_physics/jolt_physics_3d/simulation/soft_body_point_radius: + +.. rst-class:: classref-property + +:ref:`float` **physics/jolt_physics_3d/simulation/soft_body_point_radius** = ``0.01`` :ref:`๐Ÿ”—` + +How big the points of a :ref:`SoftBody3D` are, in meters. A higher value can prevent behavior such as cloth laying perfectly flush against other surfaces and causing Z-fighting. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_physics/jolt_physics_3d/simulation/speculative_contact_distance: + +.. rst-class:: classref-property + +:ref:`float` **physics/jolt_physics_3d/simulation/speculative_contact_distance** = ``0.02`` :ref:`๐Ÿ”—` + +Radius around physics bodies, inside which speculative contact points will be detected, in meters. This is mainly used to prevent tunneling/penetration for :ref:`RigidBody3D` nodes during simulation. + +\ **Note:** Setting this too high may result in ghost collisions, as speculative contacts are based on the closest points during the collision detection step which may not be the actual closest points by the time the two bodies hit. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_physics/jolt_physics_3d/simulation/use_enhanced_internal_edge_removal: + +.. rst-class:: classref-property + +:ref:`bool` **physics/jolt_physics_3d/simulation/use_enhanced_internal_edge_removal** = ``true`` :ref:`๐Ÿ”—` + +If ``true``, enables Jolt's enhanced internal edge removal for :ref:`RigidBody3D`. This can help alleviate ghost collisions when, for example, a :ref:`RigidBody3D` collides with the edges of two perfectly joined :ref:`BoxShape3D`. The removal only applies to edges internal to a single body, meaning edges between separate bodies can still cause ghost collisions. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_physics/jolt_physics_3d/simulation/velocity_steps: + +.. rst-class:: classref-property + +:ref:`int` **physics/jolt_physics_3d/simulation/velocity_steps** = ``10`` :ref:`๐Ÿ”—` + +Number of solver velocity iterations. The greater the number of iterations, the more accurate the simulation will be, at the cost of CPU performance. + +\ **Note:** This needs to be at least ``2`` in order for friction to work, as friction is applied using the non-penetration impulse from the previous iteration. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_rendering/2d/batching/item_buffer_size: .. rst-class:: classref-property @@ -9760,7 +10308,7 @@ Maximum number of canvas item commands that can be batched into a single draw ca .. rst-class:: classref-property -:ref:`int` **rendering/2d/batching/uniform_set_cache_size** = ``256`` :ref:`๐Ÿ”—` +:ref:`int` **rendering/2d/batching/uniform_set_cache_size** = ``4096`` :ref:`๐Ÿ”—` Maximum number of uniform sets that will be cached by the 2D renderer when batching draw calls. @@ -10594,6 +11142,18 @@ The maximum number of rays that can be thrown per pass when baking dynamic objec ---- +.. _class_ProjectSettings_property_rendering/lightmapping/bake_performance/max_transparency_rays: + +.. rst-class:: classref-property + +:ref:`int` **rendering/lightmapping/bake_performance/max_transparency_rays** = ``8`` :ref:`๐Ÿ”—` + +The maximum number of retry rays that can be thrown per pass when hitting a transparent surface when baking lightmaps with :ref:`LightmapGI`. Depending on the scene, reducing this value may lead to faster bake times. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_rendering/lightmapping/bake_performance/region_size: .. rst-class:: classref-property @@ -10990,7 +11550,7 @@ Decreasing this value may improve GPU performance on certain setups, even if the The maximum number of uniforms that can be used by the global shader uniform buffer. Each item takes up one slot. In other words, a single uniform float and a uniform vec4 will take the same amount of space in the buffer. -\ **Note:** When using the Compatibility backend, most mobile devices (and all web exports) will be limited to a maximum size of 1024 due to hardware constraints. +\ **Note:** When using the Compatibility renderer, most mobile devices (and all web exports) will be limited to a maximum size of 1024 due to hardware constraints. .. rst-class:: classref-item-separator @@ -11266,11 +11826,11 @@ Lower-end override for :ref:`rendering/reflections/sky_reflections/texture_array Sets the renderer that will be used by the project. Options are: -\ **Forward Plus**: High-end renderer designed for Desktop devices. Has a higher base overhead, but scales well with complex scenes. Not suitable for older devices or mobile. +\ **forward_plus** (Forward+): High-end renderer designed for desktop devices. Has a higher base overhead, but scales well with complex scenes. Not suitable for older devices or mobile. -\ **Mobile**: Modern renderer designed for mobile devices. Has a lower base overhead than Forward Plus, but does not scale as well to large scenes with many elements. +\ **mobile** (Mobile): Modern renderer designed for mobile devices. Has a lower base overhead than Forward+, but does not scale as well to large scenes with many elements. -\ **GL Compatibility**: Low-end renderer designed for older devices. Based on the limitations of the OpenGL 3.3/ OpenGL ES 3.0 / WebGL 2 APIs. +\ **gl_compatibility** (Compatibility): Low-end renderer designed for older devices. Based on the limitations of the OpenGL 3.3 / OpenGL ES 3.0 / WebGL 2 APIs. This can be overridden using the ``--rendering-method `` command line argument. @@ -11364,7 +11924,7 @@ Depending on the complexity of scenes, this value may be lowered or may need to :ref:`String` **rendering/rendering_device/driver** :ref:`๐Ÿ”—` -Sets the driver to be used by the renderer when using a RenderingDevice-based renderer like the clustered renderer or the mobile renderer. This property can't be edited directly. Instead, set the driver using the platform-specific overrides. This can be overridden using the ``--rendering-driver `` command line argument. +Sets the driver to be used by the renderer when using a RenderingDevice-based renderer like the Forward+ or Mobile renderers. This property can't be edited directly. Instead, set the driver using the platform-specific overrides. This can be overridden using the ``--rendering-driver `` command line argument. \ **Note:** The actual rendering driver may be automatically changed by the engine as a result of a fallback, or a user-specified command line argument. To get the actual rendering driver that is used at runtime, use :ref:`RenderingServer.get_current_rendering_driver_name` instead of reading this project setting's value. @@ -11506,9 +12066,9 @@ Determines at which interval pipeline cache is saved to disk. The lower the valu :ref:`int` **rendering/rendering_device/staging_buffer/block_size_kb** = ``256`` :ref:`๐Ÿ”—` -.. container:: contribute +The size of a block allocated in the staging buffers. Staging buffers are the intermediate resources the engine uses to upload or download data to the GPU. This setting determines the max amount of data that can be transferred in a copy operation. Increasing this will result in faster data transfers at the cost of extra memory. - 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. There is currently no way to change this value at run-time. .. rst-class:: classref-item-separator @@ -11520,9 +12080,25 @@ Determines at which interval pipeline cache is saved to disk. The lower the valu :ref:`int` **rendering/rendering_device/staging_buffer/max_size_mb** = ``128`` :ref:`๐Ÿ”—` -.. container:: contribute +The maximum amount of memory allowed to be used by staging buffers. If the amount of data being uploaded or downloaded exceeds this amount, the GPU will stall and wait for previous frames to finish. - 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. There is currently no way to change this value at run-time. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_rendering/rendering_device/staging_buffer/texture_download_region_size_px: + +.. rst-class:: classref-property + +:ref:`int` **rendering/rendering_device/staging_buffer/texture_download_region_size_px** = ``64`` :ref:`๐Ÿ”—` + +The region size in pixels used to download texture data from the GPU when using methods like :ref:`RenderingDevice.texture_get_data_async`. + +\ **Note:** This property's upper limit is controlled by :ref:`rendering/rendering_device/staging_buffer/block_size_kb` and whether it's possible to allocate a single block of texture data with this region size in the format that is requested. + +\ **Note:** This property is only read when the project starts. There is currently no way to change this value at run-time. .. rst-class:: classref-item-separator @@ -11534,9 +12110,11 @@ Determines at which interval pipeline cache is saved to disk. The lower the valu :ref:`int` **rendering/rendering_device/staging_buffer/texture_upload_region_size_px** = ``64`` :ref:`๐Ÿ”—` -.. container:: contribute +The region size in pixels used to upload texture data from the GPU when using methods like :ref:`RenderingDevice.texture_update`. - There is currently no description for this property. Please help us by :ref:`contributing one `! +\ **Note:** This property's upper limit is controlled by :ref:`rendering/rendering_device/staging_buffer/block_size_kb` and whether it's possible to allocate a single block of texture data with this region size in the format that is requested. + +\ **Note:** This property is only read when the project starts. There is currently no way to change this value at run-time. .. rst-class:: classref-item-separator @@ -11588,9 +12166,11 @@ Try the `V-Sync Simulator `__, an :ref:`int` **rendering/rendering_device/vulkan/max_descriptors_per_pool** = ``64`` :ref:`๐Ÿ”—` -.. container:: contribute +The number of descriptors per pool. Redot's Vulkan backend uses linear pools for descriptors that will be created and destroyed within a single frame. Instead of destroying every single descriptor every frame, they all can be destroyed at once by resetting the pool they belong to. - There is currently no description for this property. Please help us by :ref:`contributing one `! +A larger number is more efficient up to a limit, after that it will only waste RAM (maximum efficiency is achieved when there is no more than 1 pool per frame). A small number could end up with one pool per descriptor, which negatively impacts performance. + +\ **Note:** Changing this property requires a restart to take effect. .. rst-class:: classref-item-separator @@ -11786,9 +12366,11 @@ Sets the maximum number of samples to take when using anisotropic filtering on t The anisotropic filtering level also affects decals and light projectors if they are configured to use anisotropic filtering. See :ref:`rendering/textures/decals/filter` and :ref:`rendering/textures/light_projectors/filter`. -\ **Note:** For performance reasons, anisotropic filtering *is not enabled by default* on 2D and 3D materials. For this setting to have an effect in 3D, set :ref:`BaseMaterial3D.texture_filter` to :ref:`BaseMaterial3D.TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC` or :ref:`BaseMaterial3D.TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC` on materials. For this setting to have an effect in 2D, set :ref:`CanvasItem.texture_filter` to :ref:`CanvasItem.TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC` or :ref:`CanvasItem.TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC` on the :ref:`CanvasItem` node displaying the texture (or in :ref:`CanvasTexture`). However, anisotropic filtering is rarely useful in 2D, so only enable it for textures in 2D if it makes a meaningful visual difference. +\ **Note:** In 3D, for this setting to have an effect, set :ref:`BaseMaterial3D.texture_filter` to :ref:`BaseMaterial3D.TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC` or :ref:`BaseMaterial3D.TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC` on materials. -\ **Note:** This property is only read when the project starts. There is currently no way to change this setting at run-time. +\ **Note:** In 2D, for this setting to have an effect, set :ref:`CanvasItem.texture_filter` to :ref:`CanvasItem.TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC` or :ref:`CanvasItem.TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC` on the :ref:`CanvasItem` node displaying the texture (or in :ref:`CanvasTexture`). However, anisotropic filtering is rarely useful in 2D, so only enable it for textures in 2D if it makes a meaningful visual difference. + +\ **Note:** This property is only read when the project starts. To change the anisotropic filtering level at runtime, set :ref:`Viewport.anisotropic_filtering_level` on the root :ref:`Viewport` instead. .. rst-class:: classref-item-separator @@ -11868,9 +12450,9 @@ If ``true``, the GPU texture compressor will cache the local RenderingDevice and If ``true``, the texture importer will utilize the GPU for compressing textures, improving the import time of large images. -\ **Note:** This only functions on a device which supports either Vulkan, D3D12, or Metal available as a rendering backend. +\ **Note:** This only functions on a device which supports either Vulkan, Direct3D 12, or Metal as a rendering driver. -\ **Note:** Currently this only affects certain compressed formats (BC1, BC4, and BC6), all of which are exclusive to desktop platforms and consoles. +\ **Note:** Currently this only affects certain compressed formats (BC1, BC3, BC4, BC5, and BC6), all of which are exclusive to desktop platforms and consoles. .. rst-class:: classref-item-separator @@ -11940,7 +12522,7 @@ The default compression factor for lossless WebP. Decompression speed is mostly If ``true``, enables :ref:`Viewport.use_hdr_2d` on the root viewport. 2D rendering will use an high dynamic range (HDR) format framebuffer matching the bit depth of the 3D framebuffer. When using the Forward+ renderer this will be an ``RGBA16`` framebuffer, while when using the Mobile renderer it will be an ``RGB10_A2`` framebuffer. Additionally, 2D rendering will take place in linear color space and will be converted to sRGB space immediately before blitting to the screen. Practically speaking, this means that the end result of the Viewport will not be clamped into the ``0-1`` range and can be used in 3D rendering without color space adjustments. This allows 2D rendering to take advantage of effects requiring high dynamic range (e.g. 2D glow) as well as substantially improves the appearance of effects requiring highly detailed gradients. -\ **Note:** This setting will have no effect when using the GL Compatibility renderer as the GL Compatibility renderer always renders in low dynamic range for performance reasons. +\ **Note:** This setting will have no effect when using the Compatibility renderer, which always renders in low dynamic range for performance reasons. \ **Note:** This property is only read when the project starts. To toggle HDR 2D at runtime, set :ref:`Viewport.use_hdr_2d` on the root :ref:`Viewport`. @@ -12023,6 +12605,30 @@ Maximum number of threads to be used by :ref:`WorkerThreadPool` **xr/openxr/binding_modifiers/analog_threshold** = ``false`` :ref:`๐Ÿ”—` + +If ``true``, enables the analog threshold binding modifier if supported by the XR runtime. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_xr/openxr/binding_modifiers/dpad_binding: + +.. rst-class:: classref-property + +:ref:`bool` **xr/openxr/binding_modifiers/dpad_binding** = ``false`` :ref:`๐Ÿ”—` + +If ``true``, enables the D-pad binding modifier if supported by the XR runtime. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_xr/openxr/default_action_map: .. rst-class:: classref-property diff --git a/classes/class_propertytweener.rst b/classes/class_propertytweener.rst index 3dd7367dcbd..e58a82bbc57 100644 --- a/classes/class_propertytweener.rst +++ b/classes/class_propertytweener.rst @@ -68,11 +68,21 @@ When called, the final value will be used as a relative value instead. \ **Example:** Move the node by ``100`` pixels to the right. -:: + +.. tabs:: + + .. code-tab:: gdscript var tween = get_tree().create_tween() tween.tween_property(self, "position", Vector2.RIGHT * 100, 1).as_relative() + .. code-tab:: csharp + + Tween tween = GetTree().CreateTween(); + tween.TweenProperty(this, "position", Vector2.Right * 100.0f, 1.0f).AsRelative(); + + + .. rst-class:: classref-item-separator ---- @@ -87,11 +97,21 @@ Sets a custom initial value to the **PropertyTweener**. \ **Example:** Move the node from position ``(100, 100)`` to ``(200, 100)``. -:: + +.. tabs:: + + .. code-tab:: gdscript var tween = get_tree().create_tween() tween.tween_property(self, "position", Vector2(200, 100), 1).from(Vector2(100, 100)) + .. code-tab:: csharp + + Tween tween = GetTree().CreateTween(); + tween.TweenProperty(this, "position", new Vector2(200.0f, 100.0f), 1.0f).From(new Vector2(100.0f, 100.0f)); + + + .. rst-class:: classref-item-separator ---- @@ -104,11 +124,21 @@ Sets a custom initial value to the **PropertyTweener**. Makes the **PropertyTweener** use the current property value (i.e. at the time of creating this **PropertyTweener**) as a starting point. This is equivalent of using :ref:`from` with the current value. These two calls will do the same: -:: + +.. tabs:: + + .. code-tab:: gdscript tween.tween_property(self, "position", Vector2(200, 100), 1).from(position) tween.tween_property(self, "position", Vector2(200, 100), 1).from_current() + .. code-tab:: csharp + + tween.TweenProperty(this, "position", new Vector2(200.0f, 100.0f), 1.0f).From(Position); + tween.TweenProperty(this, "position", new Vector2(200.0f, 100.0f), 1.0f).FromCurrent(); + + + .. rst-class:: classref-item-separator ---- @@ -121,7 +151,10 @@ Makes the **PropertyTweener** use the current property value (i.e. at the time o Allows interpolating the value with a custom easing function. The provided ``interpolator_method`` will be called with a value ranging from ``0.0`` to ``1.0`` and is expected to return a value within the same range (values outside the range can be used for overshoot). The return value of the method is then used for interpolation between initial and final value. Note that the parameter passed to the method is still subject to the tweener's own easing. -:: + +.. tabs:: + + .. code-tab:: gdscript @export var curve: Curve @@ -133,6 +166,26 @@ Allows interpolating the value with a custom easing function. The provided ``int func tween_curve(v): return curve.sample_baked(v) + .. code-tab:: csharp + + [Export] + public Curve Curve { get; set; } + + public override void _Ready() + { + Tween tween = CreateTween(); + // Interpolate the value using a custom curve. + Callable tweenCurveCallable = Callable.From(TweenCurve); + tween.TweenProperty(this, "position:x", 300.0f, 1.0f).AsRelative().SetCustomInterpolator(tweenCurveCallable); + } + + private float TweenCurve(float value) + { + return Curve.SampleBaked(value); + } + + + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_quaternion.rst b/classes/class_quaternion.rst index 4735c8e9b70..ce4b8872f72 100644 --- a/classes/class_quaternion.rst +++ b/classes/class_quaternion.rst @@ -189,6 +189,8 @@ The identity quaternion, representing no rotation. This has the same rotation as If a :ref:`Vector3` is rotated (multiplied) by this quaternion, it does not change. +\ **Note:** In GDScript, this constant is equivalent to creating a :ref:`Quaternion` without any arguments. It can be used to make your code clearer, and for consistency with C#. + .. rst-class:: classref-section-separator ---- @@ -265,7 +267,7 @@ Constructor Descriptions :ref:`Quaternion` **Quaternion**\ (\ ) :ref:`๐Ÿ”—` -Constructs a **Quaternion** identical to the :ref:`IDENTITY`. +Constructs a **Quaternion** identical to :ref:`IDENTITY`. \ **Note:** In C#, this constructs a **Quaternion** with all of its components set to ``0.0``. @@ -442,7 +444,7 @@ Returns the inverse version of this quaternion, inverting the sign of every comp :ref:`bool` **is_equal_approx**\ (\ to\: :ref:`Quaternion`\ ) |const| :ref:`๐Ÿ”—` -Returns ``true`` if this quaternion and ``to`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx` on each component. +Returns ``true`` if this quaternion and ``to`` are approximately equal, by calling :ref:`@GlobalScope.is_equal_approx` on each component. .. rst-class:: classref-item-separator diff --git a/classes/class_rdtextureformat.rst b/classes/class_rdtextureformat.rst index d88ce159816..13538cbd212 100644 --- a/classes/class_rdtextureformat.rst +++ b/classes/class_rdtextureformat.rst @@ -29,25 +29,29 @@ Properties .. table:: :widths: auto - +------------------------------------------------------------------------------+------------------------------------------------------------------+-------+ - | :ref:`int` | :ref:`array_layers` | ``1`` | - +------------------------------------------------------------------------------+------------------------------------------------------------------+-------+ - | :ref:`int` | :ref:`depth` | ``1`` | - +------------------------------------------------------------------------------+------------------------------------------------------------------+-------+ - | :ref:`DataFormat` | :ref:`format` | ``8`` | - +------------------------------------------------------------------------------+------------------------------------------------------------------+-------+ - | :ref:`int` | :ref:`height` | ``1`` | - +------------------------------------------------------------------------------+------------------------------------------------------------------+-------+ - | :ref:`int` | :ref:`mipmaps` | ``1`` | - +------------------------------------------------------------------------------+------------------------------------------------------------------+-------+ - | :ref:`TextureSamples` | :ref:`samples` | ``0`` | - +------------------------------------------------------------------------------+------------------------------------------------------------------+-------+ - | :ref:`TextureType` | :ref:`texture_type` | ``1`` | - +------------------------------------------------------------------------------+------------------------------------------------------------------+-------+ - | |bitfield|\[:ref:`TextureUsageBits`\] | :ref:`usage_bits` | ``0`` | - +------------------------------------------------------------------------------+------------------------------------------------------------------+-------+ - | :ref:`int` | :ref:`width` | ``1`` | - +------------------------------------------------------------------------------+------------------------------------------------------------------+-------+ + +------------------------------------------------------------------------------+----------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`array_layers` | ``1`` | + +------------------------------------------------------------------------------+----------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`depth` | ``1`` | + +------------------------------------------------------------------------------+----------------------------------------------------------------------------+-----------+ + | :ref:`DataFormat` | :ref:`format` | ``8`` | + +------------------------------------------------------------------------------+----------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`height` | ``1`` | + +------------------------------------------------------------------------------+----------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`is_discardable` | ``false`` | + +------------------------------------------------------------------------------+----------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`is_resolve_buffer` | ``false`` | + +------------------------------------------------------------------------------+----------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`mipmaps` | ``1`` | + +------------------------------------------------------------------------------+----------------------------------------------------------------------------+-----------+ + | :ref:`TextureSamples` | :ref:`samples` | ``0`` | + +------------------------------------------------------------------------------+----------------------------------------------------------------------------+-----------+ + | :ref:`TextureType` | :ref:`texture_type` | ``1`` | + +------------------------------------------------------------------------------+----------------------------------------------------------------------------+-----------+ + | |bitfield|\[:ref:`TextureUsageBits`\] | :ref:`usage_bits` | ``0`` | + +------------------------------------------------------------------------------+----------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`width` | ``1`` | + +------------------------------------------------------------------------------+----------------------------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group @@ -140,6 +144,42 @@ The texture's height (in pixels). ---- +.. _class_RDTextureFormat_property_is_discardable: + +.. rst-class:: classref-property + +:ref:`bool` **is_discardable** = ``false`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_is_discardable**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_is_discardable**\ (\ ) + +If a texture is discardable, its contents do not need to be preserved between frames. This flag is only relevant when the texture is used as target in a draw list. + +This information is used by :ref:`RenderingDevice` to figure out if a texture's contents can be discarded, eliminating unnecessary writes to memory and boosting performance. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RDTextureFormat_property_is_resolve_buffer: + +.. rst-class:: classref-property + +:ref:`bool` **is_resolve_buffer** = ``false`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_is_resolve_buffer**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_is_resolve_buffer**\ (\ ) + +The texture will be used as the destination of a resolve operation. + +.. rst-class:: classref-item-separator + +---- + .. _class_RDTextureFormat_property_mipmaps: .. rst-class:: classref-property diff --git a/classes/class_rdvertexattribute.rst b/classes/class_rdvertexattribute.rst index 15399f2bc0a..9a75c62fb45 100644 --- a/classes/class_rdvertexattribute.rst +++ b/classes/class_rdvertexattribute.rst @@ -61,9 +61,7 @@ Property Descriptions - |void| **set_format**\ (\ value\: :ref:`DataFormat`\ ) - :ref:`DataFormat` **get_format**\ (\ ) -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The way that this attribute's data is interpreted when sent to a shader. .. rst-class:: classref-item-separator @@ -80,9 +78,7 @@ Property Descriptions - |void| **set_frequency**\ (\ value\: :ref:`VertexFrequency`\ ) - :ref:`VertexFrequency` **get_frequency**\ (\ ) -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The rate at which this attribute is pulled from its vertex buffer. .. rst-class:: classref-item-separator @@ -99,9 +95,7 @@ Property Descriptions - |void| **set_location**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_location**\ (\ ) -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The location in the shader that this attribute is bound to. .. rst-class:: classref-item-separator @@ -118,9 +112,7 @@ Property Descriptions - |void| **set_offset**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_offset**\ (\ ) -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The number of bytes between the start of the vertex buffer and the first instance of this attribute. .. rst-class:: classref-item-separator @@ -137,9 +129,7 @@ Property Descriptions - |void| **set_stride**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_stride**\ (\ ) -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The number of bytes between the starts of consecutive instances of this attribute. .. |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_reflectionprobe.rst b/classes/class_reflectionprobe.rst index c033e2df834..d41e84a8b17 100644 --- a/classes/class_reflectionprobe.rst +++ b/classes/class_reflectionprobe.rst @@ -54,6 +54,8 @@ Properties +------------------------------------------------------+----------------------------------------------------------------------------------+-------------------------+ | :ref:`AmbientMode` | :ref:`ambient_mode` | ``1`` | +------------------------------------------------------+----------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`blend_distance` | ``1.0`` | + +------------------------------------------------------+----------------------------------------------------------------------------------+-------------------------+ | :ref:`bool` | :ref:`box_projection` | ``false`` | +------------------------------------------------------+----------------------------------------------------------------------------------+-------------------------+ | :ref:`int` | :ref:`cull_mask` | ``1048575`` | @@ -202,6 +204,23 @@ The ambient color to use within the **ReflectionProbe**'s box defined by its :re ---- +.. _class_ReflectionProbe_property_blend_distance: + +.. rst-class:: classref-property + +:ref:`float` **blend_distance** = ``1.0`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_blend_distance**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_blend_distance**\ (\ ) + +Defines the distance in meters over which a probe blends into the scene. + +.. rst-class:: classref-item-separator + +---- + .. _class_ReflectionProbe_property_box_projection: .. rst-class:: classref-property diff --git a/classes/class_regex.rst b/classes/class_regex.rst index 42b14f5961d..2bb7519a170 100644 --- a/classes/class_regex.rst +++ b/classes/class_regex.rst @@ -71,7 +71,7 @@ If you need to process multiple results, :ref:`search_all`__ library. You can view the full pattern reference `here `__. +\ **Note:** Redot's regex implementation is based on the `PCRE2 `__ library. You can view the full pattern reference `here `__. \ **Tip:** You can use `Regexr `__ to test regular expressions online. diff --git a/classes/class_renderingdevice.rst b/classes/class_renderingdevice.rst index 1ad572eb51f..aff80c7a38e 100644 --- a/classes/class_renderingdevice.rst +++ b/classes/class_renderingdevice.rst @@ -19,7 +19,7 @@ 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. 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 Redot 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. +**RenderingDevice** is an abstraction for working with modern low-level graphics APIs such as Vulkan. Compared to :ref:`RenderingServer` (which works with Redot's own rendering subsystems), **RenderingDevice** is much lower-level and allows working more directly with the underlying graphics APIs. **RenderingDevice** is used in Redot 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, Redot creates a global **RenderingDevice** which can be retrieved using :ref:`RenderingServer.get_rendering_device`. This global **RenderingDevice** performs drawing to the screen. @@ -53,6 +53,8 @@ Methods +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedByteArray` | :ref:`buffer_get_data`\ (\ buffer\: :ref:`RID`, offset_bytes\: :ref:`int` = 0, size_bytes\: :ref:`int` = 0\ ) | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`buffer_get_data_async`\ (\ buffer\: :ref:`RID`, callback\: :ref:`Callable`, offset_bytes\: :ref:`int` = 0, size_bytes\: :ref:`int` = 0\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`buffer_update`\ (\ buffer\: :ref:`RID`, offset\: :ref:`int`, size_bytes\: :ref:`int`, data\: :ref:`PackedByteArray`\ ) | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`capture_timestamp`\ (\ name\: :ref:`String`\ ) | @@ -85,7 +87,7 @@ Methods +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`draw_command_insert_label`\ (\ name\: :ref:`String`, color\: :ref:`Color`\ ) | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`draw_list_begin`\ (\ framebuffer\: :ref:`RID`, initial_color_action\: :ref:`InitialAction`, final_color_action\: :ref:`FinalAction`, initial_depth_action\: :ref:`InitialAction`, final_depth_action\: :ref:`FinalAction`, clear_color_values\: :ref:`PackedColorArray` = PackedColorArray(), clear_depth\: :ref:`float` = 1.0, clear_stencil\: :ref:`int` = 0, region\: :ref:`Rect2` = Rect2(0, 0, 0, 0), breadcrumb\: :ref:`int` = 0\ ) | + | :ref:`int` | :ref:`draw_list_begin`\ (\ framebuffer\: :ref:`RID`, draw_flags\: |bitfield|\[:ref:`DrawFlags`\] = 0, clear_color_values\: :ref:`PackedColorArray` = PackedColorArray(), clear_depth_value\: :ref:`float` = 1.0, clear_stencil_value\: :ref:`int` = 0, region\: :ref:`Rect2` = Rect2(0, 0, 0, 0), breadcrumb\: :ref:`int` = 0\ ) | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`draw_list_begin_for_screen`\ (\ screen\: :ref:`int` = 0, clear_color\: :ref:`Color` = Color(0, 0, 0, 1)\ ) | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -241,10 +243,14 @@ Methods +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedByteArray` | :ref:`texture_get_data`\ (\ texture\: :ref:`RID`, layer\: :ref:`int`\ ) | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`texture_get_data_async`\ (\ texture\: :ref:`RID`, layer\: :ref:`int`, callback\: :ref:`Callable`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RDTextureFormat` | :ref:`texture_get_format`\ (\ texture\: :ref:`RID`\ ) | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`texture_get_native_handle`\ (\ texture\: :ref:`RID`\ ) | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`texture_is_discardable`\ (\ texture\: :ref:`RID`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`texture_is_format_supported_for_usage`\ (\ format\: :ref:`DataFormat`, usage_flags\: |bitfield|\[:ref:`TextureUsageBits`\]\ ) |const| | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`texture_is_shared`\ (\ texture\: :ref:`RID`\ ) | @@ -253,6 +259,8 @@ Methods +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`texture_resolve_multisample`\ (\ from_texture\: :ref:`RID`, to_texture\: :ref:`RID`\ ) | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`texture_set_discardable`\ (\ texture\: :ref:`RID`, discardable\: :ref:`bool`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`texture_update`\ (\ texture\: :ref:`RID`, layer\: :ref:`int`, data\: :ref:`PackedByteArray`\ ) | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`uniform_buffer_create`\ (\ size_bytes\: :ref:`int`, data\: :ref:`PackedByteArray` = PackedByteArray()\ ) | @@ -3905,6 +3913,8 @@ enum **InitialAction**: :ref:`๐Ÿ”—` :ref:`InitialAction` **INITIAL_ACTION_LOAD** = ``0`` +**Deprecated:** Initial actions are solved automatically by RenderingDevice. + Load the previous contents of the framebuffer. .. _class_RenderingDevice_constant_INITIAL_ACTION_CLEAR: @@ -3913,6 +3923,8 @@ Load the previous contents of the framebuffer. :ref:`InitialAction` **INITIAL_ACTION_CLEAR** = ``1`` +**Deprecated:** Initial actions are solved automatically by RenderingDevice. + Clear the whole framebuffer or its specified region. .. _class_RenderingDevice_constant_INITIAL_ACTION_DISCARD: @@ -3921,6 +3933,8 @@ Clear the whole framebuffer or its specified region. :ref:`InitialAction` **INITIAL_ACTION_DISCARD** = ``2`` +**Deprecated:** Initial actions are solved automatically by RenderingDevice. + Ignore the previous contents of the framebuffer. This is the fastest option if you'll overwrite all of the pixels and don't need to read any of them. .. _class_RenderingDevice_constant_INITIAL_ACTION_MAX: @@ -3929,6 +3943,8 @@ Ignore the previous contents of the framebuffer. This is the fastest option if y :ref:`InitialAction` **INITIAL_ACTION_MAX** = ``3`` +**Deprecated:** Initial actions are solved automatically by RenderingDevice. + Represents the size of the :ref:`InitialAction` enum. .. _class_RenderingDevice_constant_INITIAL_ACTION_CLEAR_REGION: @@ -3937,7 +3953,7 @@ Represents the size of the :ref:`InitialAction` **INITIAL_ACTION_CLEAR_REGION** = ``1`` -**Deprecated:** Use :ref:`INITIAL_ACTION_CLEAR` instead. +**Deprecated:** Initial actions are solved automatically by RenderingDevice. @@ -3947,7 +3963,7 @@ Represents the size of the :ref:`InitialAction` **INITIAL_ACTION_CLEAR_REGION_CONTINUE** = ``1`` -**Deprecated:** Use :ref:`INITIAL_ACTION_LOAD` instead. +**Deprecated:** Initial actions are solved automatically by RenderingDevice. @@ -3957,7 +3973,7 @@ Represents the size of the :ref:`InitialAction` **INITIAL_ACTION_KEEP** = ``0`` -**Deprecated:** Use :ref:`INITIAL_ACTION_LOAD` instead. +**Deprecated:** Initial actions are solved automatically by RenderingDevice. @@ -3967,7 +3983,7 @@ Represents the size of the :ref:`InitialAction` **INITIAL_ACTION_DROP** = ``2`` -**Deprecated:** Use :ref:`INITIAL_ACTION_DISCARD` instead. +**Deprecated:** Initial actions are solved automatically by RenderingDevice. @@ -3977,7 +3993,7 @@ Represents the size of the :ref:`InitialAction` **INITIAL_ACTION_CONTINUE** = ``0`` -**Deprecated:** Use :ref:`INITIAL_ACTION_LOAD` instead. +**Deprecated:** Initial actions are solved automatically by RenderingDevice. @@ -3997,6 +4013,8 @@ enum **FinalAction**: :ref:`๐Ÿ”—` :ref:`FinalAction` **FINAL_ACTION_STORE** = ``0`` +**Deprecated:** Final actions are solved automatically by RenderingDevice. + Store the result of the draw list in the framebuffer. This is generally what you want to do. .. _class_RenderingDevice_constant_FINAL_ACTION_DISCARD: @@ -4005,6 +4023,8 @@ Store the result of the draw list in the framebuffer. This is generally what you :ref:`FinalAction` **FINAL_ACTION_DISCARD** = ``1`` +**Deprecated:** Final actions are solved automatically by RenderingDevice. + Discard the contents of the framebuffer. This is the fastest option if you don't need to use the results of the draw list. .. _class_RenderingDevice_constant_FINAL_ACTION_MAX: @@ -4013,6 +4033,8 @@ Discard the contents of the framebuffer. This is the fastest option if you don't :ref:`FinalAction` **FINAL_ACTION_MAX** = ``2`` +**Deprecated:** Final actions are solved automatically by RenderingDevice. + Represents the size of the :ref:`FinalAction` enum. .. _class_RenderingDevice_constant_FINAL_ACTION_READ: @@ -4021,7 +4043,7 @@ Represents the size of the :ref:`FinalAction` :ref:`FinalAction` **FINAL_ACTION_READ** = ``0`` -**Deprecated:** Use :ref:`FINAL_ACTION_STORE` instead. +**Deprecated:** Final actions are solved automatically by RenderingDevice. @@ -4031,7 +4053,7 @@ Represents the size of the :ref:`FinalAction` :ref:`FinalAction` **FINAL_ACTION_CONTINUE** = ``0`` -**Deprecated:** Use :ref:`FINAL_ACTION_STORE` instead. +**Deprecated:** Final actions are solved automatically by RenderingDevice. @@ -4149,7 +4171,7 @@ enum **ShaderLanguage**: :ref:`๐Ÿ”—` :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. +Khronos' GLSL shading language (used natively by OpenGL and Vulkan). This is the language used for core Redot Shaders. .. _class_RenderingDevice_constant_SHADER_LANGUAGE_HLSL: @@ -4699,6 +4721,232 @@ enum **BreadcrumbMarker**: :ref:`๐Ÿ”—` +.. rst-class:: classref-item-separator + +---- + +.. _enum_RenderingDevice_DrawFlags: + +.. rst-class:: classref-enumeration + +flags **DrawFlags**: :ref:`๐Ÿ”—` + +.. _class_RenderingDevice_constant_DRAW_DEFAULT_ALL: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawFlags` **DRAW_DEFAULT_ALL** = ``0`` + +Do not clear or ignore any attachments. + +.. _class_RenderingDevice_constant_DRAW_CLEAR_COLOR_0: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawFlags` **DRAW_CLEAR_COLOR_0** = ``1`` + +Clear the first color attachment. + +.. _class_RenderingDevice_constant_DRAW_CLEAR_COLOR_1: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawFlags` **DRAW_CLEAR_COLOR_1** = ``2`` + +Clear the second color attachment. + +.. _class_RenderingDevice_constant_DRAW_CLEAR_COLOR_2: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawFlags` **DRAW_CLEAR_COLOR_2** = ``4`` + +Clear the third color attachment. + +.. _class_RenderingDevice_constant_DRAW_CLEAR_COLOR_3: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawFlags` **DRAW_CLEAR_COLOR_3** = ``8`` + +Clear the fourth color attachment. + +.. _class_RenderingDevice_constant_DRAW_CLEAR_COLOR_4: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawFlags` **DRAW_CLEAR_COLOR_4** = ``16`` + +Clear the fifth color attachment. + +.. _class_RenderingDevice_constant_DRAW_CLEAR_COLOR_5: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawFlags` **DRAW_CLEAR_COLOR_5** = ``32`` + +Clear the sixth color attachment. + +.. _class_RenderingDevice_constant_DRAW_CLEAR_COLOR_6: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawFlags` **DRAW_CLEAR_COLOR_6** = ``64`` + +Clear the seventh color attachment. + +.. _class_RenderingDevice_constant_DRAW_CLEAR_COLOR_7: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawFlags` **DRAW_CLEAR_COLOR_7** = ``128`` + +Clear the eighth color attachment. + +.. _class_RenderingDevice_constant_DRAW_CLEAR_COLOR_MASK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawFlags` **DRAW_CLEAR_COLOR_MASK** = ``255`` + +Mask for clearing all color attachments. + +.. _class_RenderingDevice_constant_DRAW_CLEAR_COLOR_ALL: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawFlags` **DRAW_CLEAR_COLOR_ALL** = ``255`` + +Clear all color attachments. + +.. _class_RenderingDevice_constant_DRAW_IGNORE_COLOR_0: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawFlags` **DRAW_IGNORE_COLOR_0** = ``256`` + +Ignore the previous contents of the first color attachment. + +.. _class_RenderingDevice_constant_DRAW_IGNORE_COLOR_1: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawFlags` **DRAW_IGNORE_COLOR_1** = ``512`` + +Ignore the previous contents of the second color attachment. + +.. _class_RenderingDevice_constant_DRAW_IGNORE_COLOR_2: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawFlags` **DRAW_IGNORE_COLOR_2** = ``1024`` + +Ignore the previous contents of the third color attachment. + +.. _class_RenderingDevice_constant_DRAW_IGNORE_COLOR_3: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawFlags` **DRAW_IGNORE_COLOR_3** = ``2048`` + +Ignore the previous contents of the fourth color attachment. + +.. _class_RenderingDevice_constant_DRAW_IGNORE_COLOR_4: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawFlags` **DRAW_IGNORE_COLOR_4** = ``4096`` + +Ignore the previous contents of the fifth color attachment. + +.. _class_RenderingDevice_constant_DRAW_IGNORE_COLOR_5: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawFlags` **DRAW_IGNORE_COLOR_5** = ``8192`` + +Ignore the previous contents of the sixth color attachment. + +.. _class_RenderingDevice_constant_DRAW_IGNORE_COLOR_6: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawFlags` **DRAW_IGNORE_COLOR_6** = ``16384`` + +Ignore the previous contents of the seventh color attachment. + +.. _class_RenderingDevice_constant_DRAW_IGNORE_COLOR_7: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawFlags` **DRAW_IGNORE_COLOR_7** = ``32768`` + +Ignore the previous contents of the eighth color attachment. + +.. _class_RenderingDevice_constant_DRAW_IGNORE_COLOR_MASK: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawFlags` **DRAW_IGNORE_COLOR_MASK** = ``65280`` + +Mask for ignoring all the previous contents of the color attachments. + +.. _class_RenderingDevice_constant_DRAW_IGNORE_COLOR_ALL: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawFlags` **DRAW_IGNORE_COLOR_ALL** = ``65280`` + +Ignore the previous contents of all color attachments. + +.. _class_RenderingDevice_constant_DRAW_CLEAR_DEPTH: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawFlags` **DRAW_CLEAR_DEPTH** = ``65536`` + +Clear the depth attachment. + +.. _class_RenderingDevice_constant_DRAW_IGNORE_DEPTH: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawFlags` **DRAW_IGNORE_DEPTH** = ``131072`` + +Ignore the previous contents of the depth attachment. + +.. _class_RenderingDevice_constant_DRAW_CLEAR_STENCIL: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawFlags` **DRAW_CLEAR_STENCIL** = ``262144`` + +Clear the stencil attachment. + +.. _class_RenderingDevice_constant_DRAW_IGNORE_STENCIL: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawFlags` **DRAW_IGNORE_STENCIL** = ``524288`` + +Ignore the previous contents of the stencil attachment. + +.. _class_RenderingDevice_constant_DRAW_CLEAR_ALL: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawFlags` **DRAW_CLEAR_ALL** = ``327935`` + +Clear all attachments. + +.. _class_RenderingDevice_constant_DRAW_IGNORE_ALL: + +.. rst-class:: classref-enumeration-constant + +:ref:`DrawFlags` **DRAW_IGNORE_ALL** = ``720640`` + +Ignore the previous contents of all attachments. + .. rst-class:: classref-section-separator ---- @@ -4797,6 +5045,33 @@ Prints an error if: Returns a copy of the data of the specified ``buffer``, optionally ``offset_bytes`` and ``size_bytes`` can be set to copy only a portion of the buffer. +\ **Note:** This method will block the GPU from working until the data is retrieved. Refer to :ref:`buffer_get_data_async` for an alternative that returns the data in more performant way. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderingDevice_method_buffer_get_data_async: + +.. rst-class:: classref-method + +:ref:`Error` **buffer_get_data_async**\ (\ buffer\: :ref:`RID`, callback\: :ref:`Callable`, offset_bytes\: :ref:`int` = 0, size_bytes\: :ref:`int` = 0\ ) :ref:`๐Ÿ”—` + +Asynchronous version of :ref:`buffer_get_data`. RenderingDevice will call ``callback`` in a certain amount of frames with the data the buffer had at the time of the request. + +\ **Note:** At the moment, the delay corresponds to the amount of frames specified by :ref:`ProjectSettings.rendering/rendering_device/vsync/frame_queue_size`. + +\ **Note:** Downloading large buffers can have a prohibitive cost for real-time even when using the asynchronous method due to hardware bandwidth limitations. When dealing with large resources, you can adjust settings such as :ref:`ProjectSettings.rendering/rendering_device/staging_buffer/block_size_kb` to improve the transfer speed at the cost of extra memory. + +:: + + func _buffer_get_data_callback(array): + value = array.decode_u32(0) + + ... + + rd.buffer_get_data_async(buffer, _buffer_get_data_callback) + .. rst-class:: classref-item-separator ---- @@ -5031,7 +5306,7 @@ This method does nothing. .. rst-class:: classref-method -:ref:`int` **draw_list_begin**\ (\ framebuffer\: :ref:`RID`, initial_color_action\: :ref:`InitialAction`, final_color_action\: :ref:`FinalAction`, initial_depth_action\: :ref:`InitialAction`, final_depth_action\: :ref:`FinalAction`, clear_color_values\: :ref:`PackedColorArray` = PackedColorArray(), clear_depth\: :ref:`float` = 1.0, clear_stencil\: :ref:`int` = 0, region\: :ref:`Rect2` = Rect2(0, 0, 0, 0), breadcrumb\: :ref:`int` = 0\ ) :ref:`๐Ÿ”—` +:ref:`int` **draw_list_begin**\ (\ framebuffer\: :ref:`RID`, draw_flags\: |bitfield|\[:ref:`DrawFlags`\] = 0, clear_color_values\: :ref:`PackedColorArray` = PackedColorArray(), clear_depth_value\: :ref:`float` = 1.0, clear_stencil_value\: :ref:`int` = 0, region\: :ref:`Rect2` = Rect2(0, 0, 0, 0), breadcrumb\: :ref:`int` = 0\ ) :ref:`๐Ÿ”—` Starts a list of raster drawing commands created with the ``draw_*`` methods. The returned value should be passed to other ``draw_list_*`` functions. @@ -5043,7 +5318,7 @@ 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, RenderingDevice.OPAQUE_PASS) + var draw_list = rd.draw_list_begin(framebuffers[i], RenderingDevice.CLEAR_COLOR_ALL, clear_colors, true, 1.0f, true, 0, Rect2(), RenderingDevice.OPAQUE_PASS) # Draw opaque. rd.draw_list_bind_render_pipeline(draw_list, raster_pipeline) @@ -5058,13 +5333,15 @@ A simple drawing operation might look like this (code is not a complete example) rd.draw_list_end() +The ``draw_flags`` indicates if the texture attachments of the framebuffer should be cleared or ignored. Only one of the two flags can be used for each individual attachment. Ignoring an attachment means that any contents that existed before the draw list will be completely discarded, reducing the memory bandwidth used by the render pass but producing garbage results if the pixels aren't replaced. The default behavior allows the engine to figure out the right operation to use if the texture is discardable, which can result in increased performance. See :ref:`RDTextureFormat` or :ref:`texture_set_discardable`. + The ``breadcrumb`` parameter can be an arbitrary 32-bit integer that is useful to diagnose GPU crashes. If Redot is built in dev or debug mode; when the GPU crashes Redot will dump all shaders that were being executed at the time of the crash and the breadcrumb is useful to diagnose what passes did those shaders belong to. It does not affect rendering behavior and can be set to 0. It is recommended to use :ref:`BreadcrumbMarker` enumerations for consistency but it's not required. It is also possible to use bitwise operations to add extra data. e.g. :: - rd.draw_list_begin(fb[i], RenderingDevice.INITIAL_ACTION_CLEAR, RenderingDevice.FINAL_ACTION_READ, RenderingDevice.INITIAL_ACTION_CLEAR, RenderingDevice.FINAL_ACTION_DISCARD, clear_colors, RenderingDevice.OPAQUE_PASS | 5) + rd.draw_list_begin(fb[i], RenderingDevice.CLEAR_COLOR_ALL, clear_colors, true, 1.0f, true, 0, Rect2(), RenderingDevice.OPAQUE_PASS | 5) .. rst-class:: classref-item-separator @@ -5912,7 +6189,7 @@ Compiles a binary shader from ``spirv_data`` and returns the compiled binary dat Compiles a SPIR-V from the shader source code in ``shader_source`` and returns the SPIR-V as a :ref:`RDShaderSPIRV`. This intermediate language shader is portable across different GPU models and driver versions, but cannot be run directly by GPUs until compiled into a binary shader using :ref:`shader_compile_binary_from_spirv`. -If ``allow_cache`` is ``true``, make use of the shader cache generated by Godot. This avoids a potentially lengthy shader compilation step if the shader is already in cache. If ``allow_cache`` is ``false``, Godot's shader cache is ignored and the shader will always be recompiled. +If ``allow_cache`` is ``true``, make use of the shader cache generated by Redot. This avoids a potentially lengthy shader compilation step if the shader is already in cache. If ``allow_cache`` is ``false``, Redot's shader cache is ignored and the shader will always be recompiled. .. rst-class:: classref-item-separator @@ -6132,6 +6409,33 @@ Returns the ``texture`` data for the specified ``layer`` as raw binary data. For \ **Note:** ``texture`` requires the :ref:`TEXTURE_USAGE_CAN_COPY_FROM_BIT` to be retrieved. Otherwise, an error is printed and a empty :ref:`PackedByteArray` is returned. +\ **Note:** This method will block the GPU from working until the data is retrieved. Refer to :ref:`texture_get_data_async` for an alternative that returns the data in more performant way. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderingDevice_method_texture_get_data_async: + +.. rst-class:: classref-method + +:ref:`Error` **texture_get_data_async**\ (\ texture\: :ref:`RID`, layer\: :ref:`int`, callback\: :ref:`Callable`\ ) :ref:`๐Ÿ”—` + +Asynchronous version of :ref:`texture_get_data`. RenderingDevice will call ``callback`` in a certain amount of frames with the data the texture had at the time of the request. + +\ **Note:** At the moment, the delay corresponds to the amount of frames specified by :ref:`ProjectSettings.rendering/rendering_device/vsync/frame_queue_size`. + +\ **Note:** Downloading large textures can have a prohibitive cost for real-time even when using the asynchronous method due to hardware bandwidth limitations. When dealing with large resources, you can adjust settings such as :ref:`ProjectSettings.rendering/rendering_device/staging_buffer/texture_download_region_size_px` and :ref:`ProjectSettings.rendering/rendering_device/staging_buffer/block_size_kb` to improve the transfer speed at the cost of extra memory. + +:: + + func _texture_get_data_callback(array): + value = array.decode_u32(0) + + ... + + rd.texture_get_data_async(texture, 0, _texture_get_data_callback) + .. rst-class:: classref-item-separator ---- @@ -6164,6 +6468,18 @@ Returns the internal graphics handle for this texture object. For use when commu ---- +.. _class_RenderingDevice_method_texture_is_discardable: + +.. rst-class:: classref-method + +:ref:`bool` **texture_is_discardable**\ (\ texture\: :ref:`RID`\ ) :ref:`๐Ÿ”—` + +Returns ``true`` if the ``texture`` is discardable, ``false`` otherwise. See :ref:`RDTextureFormat` or :ref:`texture_set_discardable`. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingDevice_method_texture_is_format_supported_for_usage: .. rst-class:: classref-method @@ -6226,6 +6542,22 @@ Resolves the ``from_texture`` texture onto ``to_texture`` with multisample antia ---- +.. _class_RenderingDevice_method_texture_set_discardable: + +.. rst-class:: classref-method + +|void| **texture_set_discardable**\ (\ texture\: :ref:`RID`, discardable\: :ref:`bool`\ ) :ref:`๐Ÿ”—` + +Updates the discardable property of ``texture``. + +If a texture is discardable, its contents do not need to be preserved between frames. This flag is only relevant when the texture is used as target in a draw list. + +This information is used by **RenderingDevice** to figure out if a texture's contents can be discarded, eliminating unnecessary writes to memory and boosting performance. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingDevice_method_texture_update: .. rst-class:: classref-method diff --git a/classes/class_renderingserver.rst b/classes/class_renderingserver.rst index 1727039963b..ab797535bd2 100644 --- a/classes/class_renderingserver.rst +++ b/classes/class_renderingserver.rst @@ -147,6 +147,12 @@ Methods +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`canvas_item_create`\ (\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`canvas_item_get_instance_shader_parameter`\ (\ instance\: :ref:`RID`, parameter\: :ref:`StringName`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`canvas_item_get_instance_shader_parameter_default_value`\ (\ instance\: :ref:`RID`, parameter\: :ref:`StringName`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`canvas_item_get_instance_shader_parameter_list`\ (\ instance\: :ref:`RID`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`canvas_item_reset_physics_interpolation`\ (\ item\: :ref:`RID`\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`canvas_item_set_canvas_group_mode`\ (\ item\: :ref:`RID`, mode\: :ref:`CanvasGroupMode`, clear_margin\: :ref:`float` = 5.0, fit_empty\: :ref:`bool` = false, fit_margin\: :ref:`float` = 0.0, blur_mipmaps\: :ref:`bool` = false\ ) | @@ -167,6 +173,8 @@ Methods +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`canvas_item_set_draw_index`\ (\ item\: :ref:`RID`, index\: :ref:`int`\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_set_instance_shader_parameter`\ (\ instance\: :ref:`RID`, parameter\: :ref:`StringName`, value\: :ref:`Variant`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`canvas_item_set_interpolated`\ (\ item\: :ref:`RID`, interpolated\: :ref:`bool`\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`canvas_item_set_light_mask`\ (\ item\: :ref:`RID`, mask\: :ref:`int`\ ) | @@ -633,6 +641,8 @@ Methods +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`mesh_surface_get_material`\ (\ mesh\: :ref:`RID`, surface\: :ref:`int`\ ) |const| | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`mesh_surface_remove`\ (\ mesh\: :ref:`RID`, surface\: :ref:`int`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`mesh_surface_set_material`\ (\ mesh\: :ref:`RID`, surface\: :ref:`int`, material\: :ref:`RID`\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`mesh_surface_update_attribute_region`\ (\ mesh\: :ref:`RID`, surface\: :ref:`int`, offset\: :ref:`int`, data\: :ref:`PackedByteArray`\ ) | @@ -649,6 +659,8 @@ Methods +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedFloat32Array` | :ref:`multimesh_get_buffer`\ (\ multimesh\: :ref:`RID`\ ) |const| | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`multimesh_get_buffer_rd_rid`\ (\ multimesh\: :ref:`RID`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`AABB` | :ref:`multimesh_get_custom_aabb`\ (\ multimesh\: :ref:`RID`\ ) |const| | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`multimesh_get_instance_count`\ (\ multimesh\: :ref:`RID`\ ) |const| | @@ -797,6 +809,8 @@ Methods +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`reflection_probe_set_as_interior`\ (\ probe\: :ref:`RID`, enable\: :ref:`bool`\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reflection_probe_set_blend_distance`\ (\ probe\: :ref:`RID`, blend_distance\: :ref:`float`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`reflection_probe_set_cull_mask`\ (\ probe\: :ref:`RID`, layers\: :ref:`int`\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`reflection_probe_set_enable_box_projection`\ (\ probe\: :ref:`RID`, enable\: :ref:`bool`\ ) | @@ -955,6 +969,8 @@ Methods +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`viewport_set_active`\ (\ viewport\: :ref:`RID`, active\: :ref:`bool`\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_anisotropic_filtering_level`\ (\ viewport\: :ref:`RID`, anisotropic_filtering_level\: :ref:`ViewportAnisotropicFiltering`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`viewport_set_canvas_cull_mask`\ (\ viewport\: :ref:`RID`, canvas_cull_mask\: :ref:`int`\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`viewport_set_canvas_stacking`\ (\ viewport\: :ref:`RID`, canvas\: :ref:`RID`, layer\: :ref:`int`, sublayer\: :ref:`int`\ ) | @@ -3302,6 +3318,64 @@ Represents the size of the :ref:`ViewportMSAA ---- +.. _enum_RenderingServer_ViewportAnisotropicFiltering: + +.. rst-class:: classref-enumeration + +enum **ViewportAnisotropicFiltering**: :ref:`๐Ÿ”—` + +.. _class_RenderingServer_constant_VIEWPORT_ANISOTROPY_DISABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportAnisotropicFiltering` **VIEWPORT_ANISOTROPY_DISABLED** = ``0`` + +Anisotropic filtering is disabled. + +.. _class_RenderingServer_constant_VIEWPORT_ANISOTROPY_2X: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportAnisotropicFiltering` **VIEWPORT_ANISOTROPY_2X** = ``1`` + +Use 2ร— anisotropic filtering. + +.. _class_RenderingServer_constant_VIEWPORT_ANISOTROPY_4X: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportAnisotropicFiltering` **VIEWPORT_ANISOTROPY_4X** = ``2`` + +Use 4ร— anisotropic filtering. This is the default value. + +.. _class_RenderingServer_constant_VIEWPORT_ANISOTROPY_8X: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportAnisotropicFiltering` **VIEWPORT_ANISOTROPY_8X** = ``3`` + +Use 8ร— anisotropic filtering. + +.. _class_RenderingServer_constant_VIEWPORT_ANISOTROPY_16X: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportAnisotropicFiltering` **VIEWPORT_ANISOTROPY_16X** = ``4`` + +Use 16ร— anisotropic filtering. + +.. _class_RenderingServer_constant_VIEWPORT_ANISOTROPY_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportAnisotropicFiltering` **VIEWPORT_ANISOTROPY_MAX** = ``5`` + +Represents the size of the :ref:`ViewportAnisotropicFiltering` enum. + +.. rst-class:: classref-item-separator + +---- + .. _enum_RenderingServer_ViewportScreenSpaceAA: .. rst-class:: classref-enumeration @@ -3502,6 +3576,8 @@ Objects are displayed semi-transparent with additive blending so you can see whe Debug draw draws objects in wireframe. +\ **Note:** :ref:`set_debug_generate_wireframes` must be called before loading any meshes for wireframes to be visible when using the Compatibility renderer. + .. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_NORMAL_BUFFER: .. rst-class:: classref-enumeration-constant @@ -5662,7 +5738,7 @@ Buffer memory used (in bytes). This includes vertex data, uniform buffers, and m :ref:`RenderingInfo` **RENDERING_INFO_VIDEO_MEM_USED** = ``5`` -Video memory used (in bytes). When using the Forward+ or mobile rendering backends, 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. When using the GL Compatibility backend, this is equal to the sum of :ref:`RENDERING_INFO_TEXTURE_MEM_USED` and :ref:`RENDERING_INFO_BUFFER_MEM_USED`. +Video memory used (in bytes). When using the Forward+ or Mobile renderers, 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. When using the Compatibility renderer, this is equal to the sum of :ref:`RENDERING_INFO_TEXTURE_MEM_USED` and :ref:`RENDERING_INFO_BUFFER_MEM_USED`. .. _class_RenderingServer_constant_RENDERING_INFO_PIPELINE_COMPILATIONS_CANVAS: @@ -6508,6 +6584,44 @@ Once finished with your RID, you will want to free the RID using the RenderingSe ---- +.. _class_RenderingServer_method_canvas_item_get_instance_shader_parameter: + +.. rst-class:: classref-method + +:ref:`Variant` **canvas_item_get_instance_shader_parameter**\ (\ instance\: :ref:`RID`, parameter\: :ref:`StringName`\ ) |const| :ref:`๐Ÿ”—` + +Returns the value of the per-instance shader uniform from the specified canvas item instance. Equivalent to :ref:`CanvasItem.get_instance_shader_parameter`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderingServer_method_canvas_item_get_instance_shader_parameter_default_value: + +.. rst-class:: classref-method + +:ref:`Variant` **canvas_item_get_instance_shader_parameter_default_value**\ (\ instance\: :ref:`RID`, parameter\: :ref:`StringName`\ ) |const| :ref:`๐Ÿ”—` + +Returns the default value of the per-instance shader uniform from the specified canvas item instance. Equivalent to :ref:`CanvasItem.get_instance_shader_parameter`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderingServer_method_canvas_item_get_instance_shader_parameter_list: + +.. rst-class:: classref-method + +:ref:`Array`\[:ref:`Dictionary`\] **canvas_item_get_instance_shader_parameter_list**\ (\ instance\: :ref:`RID`\ ) |const| :ref:`๐Ÿ”—` + +Returns a dictionary of per-instance shader uniform names of the per-instance shader uniform from the specified canvas item instance. + +The returned dictionary is in PropertyInfo format, with the keys ``name``, ``class_name``, ``type``, ``hint``, ``hint_string``, and ``usage``. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_canvas_item_reset_physics_interpolation: .. rst-class:: classref-method @@ -6634,6 +6748,18 @@ Sets the index for the :ref:`CanvasItem`. ---- +.. _class_RenderingServer_method_canvas_item_set_instance_shader_parameter: + +.. rst-class:: classref-method + +|void| **canvas_item_set_instance_shader_parameter**\ (\ instance\: :ref:`RID`, parameter\: :ref:`StringName`, value\: :ref:`Variant`\ ) :ref:`๐Ÿ”—` + +Sets the per-instance shader uniform on the specified canvas item instance. Equivalent to :ref:`CanvasItem.set_instance_shader_parameter`. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_canvas_item_set_interpolated: .. rst-class:: classref-method @@ -7484,7 +7610,7 @@ Sets the compositor effects for the specified compositor RID. ``effects`` should Creates a RenderingDevice that can be used to do draw and compute operations on a separate thread. Cannot draw to the screen nor share data with the global RenderingDevice. -\ **Note:** When using the OpenGL backend or when running in headless mode, this function always returns ``null``. +\ **Note:** When using the OpenGL rendering driver or when running in headless mode, this function always returns ``null``. .. rst-class:: classref-item-separator @@ -8178,7 +8304,7 @@ Returns the time taken to setup rendering on the CPU in milliseconds. This value Returns the global RenderingDevice. -\ **Note:** When using the OpenGL backend or when running in headless mode, this function always returns ``null``. +\ **Note:** When using the OpenGL rendering driver or when running in headless mode, this function always returns ``null``. .. rst-class:: classref-item-separator @@ -8290,7 +8416,7 @@ Returns the name of the video adapter (e.g. "GeForce GTX 1080/PCIe/SSE2"). Returns the type of the video adapter. Since dedicated graphics cards from a given generation will *usually* be significantly faster than integrated graphics made in the same generation, the device type can be used as a basis for automatic graphics settings adjustment. However, this is not always true, so make sure to provide users with a way to manually override graphics settings. -\ **Note:** When using the OpenGL backend or when running in headless mode, this function always returns :ref:`RenderingDevice.DEVICE_TYPE_OTHER`. +\ **Note:** When using the OpenGL rendering driver or when running in headless mode, this function always returns :ref:`RenderingDevice.DEVICE_TYPE_OTHER`. .. rst-class:: classref-item-separator @@ -9616,6 +9742,18 @@ Returns a mesh's surface's material. ---- +.. _class_RenderingServer_method_mesh_surface_remove: + +.. rst-class:: classref-method + +|void| **mesh_surface_remove**\ (\ mesh\: :ref:`RID`, surface\: :ref:`int`\ ) :ref:`๐Ÿ”—` + +Removes the surface at the given index from the Mesh, shifting surfaces with higher index down by one. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_mesh_surface_set_material: .. rst-class:: classref-method @@ -9728,6 +9866,18 @@ Returns the MultiMesh data (such as instance transforms, colors, etc.). See :ref ---- +.. _class_RenderingServer_method_multimesh_get_buffer_rd_rid: + +.. rst-class:: classref-method + +:ref:`RID` **multimesh_get_buffer_rd_rid**\ (\ multimesh\: :ref:`RID`\ ) |const| :ref:`๐Ÿ”—` + +Returns the :ref:`RenderingDevice` :ref:`RID` handle of the :ref:`MultiMesh`, which can be used as any other buffer on the Rendering Device. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_multimesh_get_custom_aabb: .. rst-class:: classref-method @@ -10681,6 +10831,18 @@ If ``true``, reflections will ignore sky contribution. Equivalent to :ref:`Refle ---- +.. _class_RenderingServer_method_reflection_probe_set_blend_distance: + +.. rst-class:: classref-method + +|void| **reflection_probe_set_blend_distance**\ (\ probe\: :ref:`RID`, blend_distance\: :ref:`float`\ ) :ref:`๐Ÿ”—` + +Sets the distance in meters over which a probe blends into the scene. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_reflection_probe_set_cull_mask: .. rst-class:: classref-method @@ -10919,7 +11081,9 @@ Sets a boot image. The color defines the background color. If ``scale`` is ``tru |void| **set_debug_generate_wireframes**\ (\ generate\: :ref:`bool`\ ) :ref:`๐Ÿ”—` -This method is currently unimplemented and does nothing if called with ``generate`` set to ``true``. +If ``generate`` is ``true``, generates debug wireframes for all meshes that are loaded when using the Compatibility renderer. By default, the engine does not generate debug wireframes at runtime, since they slow down loading of assets and take up VRAM. + +\ **Note:** You must call this method before loading any meshes when using the Compatibility renderer, otherwise wireframes will not be used. .. rst-class:: classref-item-separator @@ -11750,6 +11914,24 @@ If ``true``, sets the viewport active, else sets it inactive. ---- +.. _class_RenderingServer_method_viewport_set_anisotropic_filtering_level: + +.. rst-class:: classref-method + +|void| **viewport_set_anisotropic_filtering_level**\ (\ viewport\: :ref:`RID`, anisotropic_filtering_level\: :ref:`ViewportAnisotropicFiltering`\ ) :ref:`๐Ÿ”—` + +Sets the maximum number of samples to take when using anisotropic filtering on textures (as a power of two). A higher sample count will result in sharper textures at oblique angles, but is more expensive to compute. A value of ``0`` forcibly disables anisotropic filtering, even on materials where it is enabled. + +The anisotropic filtering level also affects decals and light projectors if they are configured to use anisotropic filtering. See :ref:`ProjectSettings.rendering/textures/decals/filter` and :ref:`ProjectSettings.rendering/textures/light_projectors/filter`. + +\ **Note:** In 3D, for this setting to have an effect, set :ref:`BaseMaterial3D.texture_filter` to :ref:`BaseMaterial3D.TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC` or :ref:`BaseMaterial3D.TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC` on materials. + +\ **Note:** In 2D, for this setting to have an effect, set :ref:`CanvasItem.texture_filter` to :ref:`CanvasItem.TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC` or :ref:`CanvasItem.TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC` on the :ref:`CanvasItem` node displaying the texture (or in :ref:`CanvasTexture`). However, anisotropic filtering is rarely useful in 2D, so only enable it for textures in 2D if it makes a meaningful visual difference. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_viewport_set_canvas_cull_mask: .. rst-class:: classref-method @@ -12162,7 +12344,7 @@ If ``true``, enables debanding on the specified viewport. Equivalent to :ref:`Pr If ``true``, 2D rendering will use a high dynamic range (HDR) format framebuffer matching the bit depth of the 3D framebuffer. When using the Forward+ renderer this will be an ``RGBA16`` framebuffer, while when using the Mobile renderer it will be an ``RGB10_A2`` framebuffer. Additionally, 2D rendering will take place in linear color space and will be converted to sRGB space immediately before blitting to the screen (if the Viewport is attached to the screen). Practically speaking, this means that the end result of the Viewport will not be clamped into the ``0-1`` range and can be used in 3D rendering without color space adjustments. This allows 2D rendering to take advantage of effects requiring high dynamic range (e.g. 2D glow) as well as substantially improves the appearance of effects requiring highly detailed gradients. This setting has the same effect as :ref:`Viewport.use_hdr_2d`. -\ **Note:** This setting will have no effect when using the GL Compatibility renderer as the GL Compatibility renderer always renders in low dynamic range for performance reasons. +\ **Note:** This setting will have no effect when using the Compatibility renderer, which always renders in low dynamic range for performance reasons. .. rst-class:: classref-item-separator diff --git a/classes/class_renderscenebuffersconfiguration.rst b/classes/class_renderscenebuffersconfiguration.rst index e726ef60d20..36bf362bdac 100644 --- a/classes/class_renderscenebuffersconfiguration.rst +++ b/classes/class_renderscenebuffersconfiguration.rst @@ -29,25 +29,27 @@ Properties .. table:: :widths: auto - +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ - | :ref:`float` | :ref:`fsr_sharpness` | ``0.0`` | - +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ - | :ref:`Vector2i` | :ref:`internal_size` | ``Vector2i(0, 0)`` | - +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ - | :ref:`ViewportMSAA` | :ref:`msaa_3d` | ``0`` | - +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ - | :ref:`RID` | :ref:`render_target` | ``RID()`` | - +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ - | :ref:`ViewportScaling3DMode` | :ref:`scaling_3d_mode` | ``255`` | - +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ - | :ref:`ViewportScreenSpaceAA` | :ref:`screen_space_aa` | ``0`` | - +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ - | :ref:`Vector2i` | :ref:`target_size` | ``Vector2i(0, 0)`` | - +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ - | :ref:`float` | :ref:`texture_mipmap_bias` | ``0.0`` | - +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ - | :ref:`int` | :ref:`view_count` | ``1`` | - +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+--------------------+ + | :ref:`ViewportAnisotropicFiltering` | :ref:`anisotropic_filtering_level` | ``2`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+--------------------+ + | :ref:`float` | :ref:`fsr_sharpness` | ``0.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+--------------------+ + | :ref:`Vector2i` | :ref:`internal_size` | ``Vector2i(0, 0)`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+--------------------+ + | :ref:`ViewportMSAA` | :ref:`msaa_3d` | ``0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+--------------------+ + | :ref:`RID` | :ref:`render_target` | ``RID()`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+--------------------+ + | :ref:`ViewportScaling3DMode` | :ref:`scaling_3d_mode` | ``255`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+--------------------+ + | :ref:`ViewportScreenSpaceAA` | :ref:`screen_space_aa` | ``0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+--------------------+ + | :ref:`Vector2i` | :ref:`target_size` | ``Vector2i(0, 0)`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+--------------------+ + | :ref:`float` | :ref:`texture_mipmap_bias` | ``0.0`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+--------------------+ + | :ref:`int` | :ref:`view_count` | ``1`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+--------------------+ .. rst-class:: classref-section-separator @@ -58,6 +60,23 @@ Properties Property Descriptions --------------------- +.. _class_RenderSceneBuffersConfiguration_property_anisotropic_filtering_level: + +.. rst-class:: classref-property + +:ref:`ViewportAnisotropicFiltering` **anisotropic_filtering_level** = ``2`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_anisotropic_filtering_level**\ (\ value\: :ref:`ViewportAnisotropicFiltering`\ ) +- :ref:`ViewportAnisotropicFiltering` **get_anisotropic_filtering_level**\ (\ ) + +Level of the anisotropic filter. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderSceneBuffersConfiguration_property_fsr_sharpness: .. rst-class:: classref-property diff --git a/classes/class_renderscenebuffersextension.rst b/classes/class_renderscenebuffersextension.rst index 8e12035bc15..5bf10a43c44 100644 --- a/classes/class_renderscenebuffersextension.rst +++ b/classes/class_renderscenebuffersextension.rst @@ -29,15 +29,17 @@ Methods .. table:: :widths: auto - +--------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_configure`\ (\ config\: :ref:`RenderSceneBuffersConfiguration`\ ) |virtual| | - +--------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_set_fsr_sharpness`\ (\ fsr_sharpness\: :ref:`float`\ ) |virtual| | - +--------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_set_texture_mipmap_bias`\ (\ texture_mipmap_bias\: :ref:`float`\ ) |virtual| | - +--------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_set_use_debanding`\ (\ use_debanding\: :ref:`bool`\ ) |virtual| | - +--------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_configure`\ (\ config\: :ref:`RenderSceneBuffersConfiguration`\ ) |virtual| | + +--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_anisotropic_filtering_level`\ (\ anisotropic_filtering_level\: :ref:`int`\ ) |virtual| | + +--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_fsr_sharpness`\ (\ fsr_sharpness\: :ref:`float`\ ) |virtual| | + +--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_texture_mipmap_bias`\ (\ texture_mipmap_bias\: :ref:`float`\ ) |virtual| | + +--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_use_debanding`\ (\ use_debanding\: :ref:`bool`\ ) |virtual| | + +--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -60,6 +62,18 @@ Implement this in GDExtension to handle the (re)sizing of a viewport. ---- +.. _class_RenderSceneBuffersExtension_private_method__set_anisotropic_filtering_level: + +.. rst-class:: classref-method + +|void| **_set_anisotropic_filtering_level**\ (\ anisotropic_filtering_level\: :ref:`int`\ ) |virtual| :ref:`๐Ÿ”—` + +Implement this in GDExtension to change the anisotropic filtering level. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderSceneBuffersExtension_private_method__set_fsr_sharpness: .. rst-class:: classref-method diff --git a/classes/class_renderscenebuffersrd.rst b/classes/class_renderscenebuffersrd.rst index 39002abc251..b4a0d548f1f 100644 --- a/classes/class_renderscenebuffersrd.rst +++ b/classes/class_renderscenebuffersrd.rst @@ -35,61 +35,61 @@ Methods .. table:: :widths: auto - +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`clear_context`\ (\ context\: :ref:`StringName`\ ) | - +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`create_texture`\ (\ context\: :ref:`StringName`, name\: :ref:`StringName`, data_format\: :ref:`DataFormat`, usage_bits\: :ref:`int`, texture_samples\: :ref:`TextureSamples`, size\: :ref:`Vector2i`, layers\: :ref:`int`, mipmaps\: :ref:`int`, unique\: :ref:`bool`\ ) | - +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`create_texture_from_format`\ (\ context\: :ref:`StringName`, name\: :ref:`StringName`, format\: :ref:`RDTextureFormat`, view\: :ref:`RDTextureView`, unique\: :ref:`bool`\ ) | - +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`create_texture_view`\ (\ context\: :ref:`StringName`, name\: :ref:`StringName`, view_name\: :ref:`StringName`, view\: :ref:`RDTextureView`\ ) | - +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_color_layer`\ (\ layer\: :ref:`int`, msaa\: :ref:`bool` = false\ ) | - +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_color_texture`\ (\ msaa\: :ref:`bool` = false\ ) | - +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_depth_layer`\ (\ layer\: :ref:`int`, msaa\: :ref:`bool` = false\ ) | - +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_depth_texture`\ (\ msaa\: :ref:`bool` = false\ ) | - +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_fsr_sharpness`\ (\ ) |const| | - +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i` | :ref:`get_internal_size`\ (\ ) |const| | - +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ViewportMSAA` | :ref:`get_msaa_3d`\ (\ ) |const| | - +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_render_target`\ (\ ) |const| | - +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ViewportScaling3DMode` | :ref:`get_scaling_3d_mode`\ (\ ) |const| | - +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ViewportScreenSpaceAA` | :ref:`get_screen_space_aa`\ (\ ) |const| | - +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i` | :ref:`get_target_size`\ (\ ) |const| | - +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_texture`\ (\ context\: :ref:`StringName`, name\: :ref:`StringName`\ ) |const| | - +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RDTextureFormat` | :ref:`get_texture_format`\ (\ context\: :ref:`StringName`, name\: :ref:`StringName`\ ) |const| | - +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TextureSamples` | :ref:`get_texture_samples`\ (\ ) |const| | - +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_texture_slice`\ (\ context\: :ref:`StringName`, name\: :ref:`StringName`, layer\: :ref:`int`, mipmap\: :ref:`int`, layers\: :ref:`int`, mipmaps\: :ref:`int`\ ) | - +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i` | :ref:`get_texture_slice_size`\ (\ context\: :ref:`StringName`, name\: :ref:`StringName`, mipmap\: :ref:`int`\ ) | - +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_texture_slice_view`\ (\ context\: :ref:`StringName`, name\: :ref:`StringName`, layer\: :ref:`int`, mipmap\: :ref:`int`, layers\: :ref:`int`, mipmaps\: :ref:`int`, view\: :ref:`RDTextureView`\ ) | - +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_use_debanding`\ (\ ) |const| | - +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_use_taa`\ (\ ) |const| | - +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_velocity_layer`\ (\ layer\: :ref:`int`, msaa\: :ref:`bool` = false\ ) | - +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_velocity_texture`\ (\ msaa\: :ref:`bool` = false\ ) | - +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_view_count`\ (\ ) |const| | - +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_texture`\ (\ context\: :ref:`StringName`, name\: :ref:`StringName`\ ) |const| | - +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_context`\ (\ context\: :ref:`StringName`\ ) | + +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`create_texture`\ (\ context\: :ref:`StringName`, name\: :ref:`StringName`, data_format\: :ref:`DataFormat`, usage_bits\: :ref:`int`, texture_samples\: :ref:`TextureSamples`, size\: :ref:`Vector2i`, layers\: :ref:`int`, mipmaps\: :ref:`int`, unique\: :ref:`bool`, discardable\: :ref:`bool`\ ) | + +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`create_texture_from_format`\ (\ context\: :ref:`StringName`, name\: :ref:`StringName`, format\: :ref:`RDTextureFormat`, view\: :ref:`RDTextureView`, unique\: :ref:`bool`\ ) | + +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`create_texture_view`\ (\ context\: :ref:`StringName`, name\: :ref:`StringName`, view_name\: :ref:`StringName`, view\: :ref:`RDTextureView`\ ) | + +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_color_layer`\ (\ layer\: :ref:`int`, msaa\: :ref:`bool` = false\ ) | + +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_color_texture`\ (\ msaa\: :ref:`bool` = false\ ) | + +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_depth_layer`\ (\ layer\: :ref:`int`, msaa\: :ref:`bool` = false\ ) | + +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_depth_texture`\ (\ msaa\: :ref:`bool` = false\ ) | + +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_fsr_sharpness`\ (\ ) |const| | + +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`get_internal_size`\ (\ ) |const| | + +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ViewportMSAA` | :ref:`get_msaa_3d`\ (\ ) |const| | + +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_render_target`\ (\ ) |const| | + +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ViewportScaling3DMode` | :ref:`get_scaling_3d_mode`\ (\ ) |const| | + +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ViewportScreenSpaceAA` | :ref:`get_screen_space_aa`\ (\ ) |const| | + +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`get_target_size`\ (\ ) |const| | + +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_texture`\ (\ context\: :ref:`StringName`, name\: :ref:`StringName`\ ) |const| | + +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RDTextureFormat` | :ref:`get_texture_format`\ (\ context\: :ref:`StringName`, name\: :ref:`StringName`\ ) |const| | + +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TextureSamples` | :ref:`get_texture_samples`\ (\ ) |const| | + +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_texture_slice`\ (\ context\: :ref:`StringName`, name\: :ref:`StringName`, layer\: :ref:`int`, mipmap\: :ref:`int`, layers\: :ref:`int`, mipmaps\: :ref:`int`\ ) | + +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`get_texture_slice_size`\ (\ context\: :ref:`StringName`, name\: :ref:`StringName`, mipmap\: :ref:`int`\ ) | + +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_texture_slice_view`\ (\ context\: :ref:`StringName`, name\: :ref:`StringName`, layer\: :ref:`int`, mipmap\: :ref:`int`, layers\: :ref:`int`, mipmaps\: :ref:`int`, view\: :ref:`RDTextureView`\ ) | + +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_use_debanding`\ (\ ) |const| | + +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_use_taa`\ (\ ) |const| | + +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_velocity_layer`\ (\ layer\: :ref:`int`, msaa\: :ref:`bool` = false\ ) | + +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_velocity_texture`\ (\ msaa\: :ref:`bool` = false\ ) | + +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_view_count`\ (\ ) |const| | + +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_texture`\ (\ context\: :ref:`StringName`, name\: :ref:`StringName`\ ) |const| | + +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -116,7 +116,7 @@ Frees all buffers related to this context. .. rst-class:: classref-method -:ref:`RID` **create_texture**\ (\ context\: :ref:`StringName`, name\: :ref:`StringName`, data_format\: :ref:`DataFormat`, usage_bits\: :ref:`int`, texture_samples\: :ref:`TextureSamples`, size\: :ref:`Vector2i`, layers\: :ref:`int`, mipmaps\: :ref:`int`, unique\: :ref:`bool`\ ) :ref:`๐Ÿ”—` +:ref:`RID` **create_texture**\ (\ context\: :ref:`StringName`, name\: :ref:`StringName`, data_format\: :ref:`DataFormat`, usage_bits\: :ref:`int`, texture_samples\: :ref:`TextureSamples`, size\: :ref:`Vector2i`, layers\: :ref:`int`, mipmaps\: :ref:`int`, unique\: :ref:`bool`, discardable\: :ref:`bool`\ ) :ref:`๐Ÿ”—` Create a new texture with the given definition and cache this under the given name. Will return the existing texture if it already exists. diff --git a/classes/class_resource.rst b/classes/class_resource.rst index abcda2bcd28..1f00c3b43de 100644 --- a/classes/class_resource.rst +++ b/classes/class_resource.rst @@ -12,7 +12,7 @@ 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:`Compositor`, :ref:`CompositorEffect`, :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:`GLTFPhysicsBody`, :ref:`GLTFPhysicsShape`, :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:`NavigationMeshSourceGeometryData2D`, :ref:`NavigationMeshSourceGeometryData3D`, :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:`ColorPalette`, :ref:`Compositor`, :ref:`CompositorEffect`, :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:`GLTFPhysicsBody`, :ref:`GLTFPhysicsShape`, :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:`NavigationMeshSourceGeometryData2D`, :ref:`NavigationMeshSourceGeometryData3D`, :ref:`NavigationPolygon`, :ref:`Noise`, :ref:`Occluder3D`, :ref:`OccluderPolygon2D`, :ref:`OggPacketSequence`, :ref:`OpenXRAction`, :ref:`OpenXRActionMap`, :ref:`OpenXRActionSet`, :ref:`OpenXRBindingModifier`, :ref:`OpenXRHapticBase`, :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 serializable objects. diff --git a/classes/class_resourceimporter.rst b/classes/class_resourceimporter.rst index 940ce73f2bb..81115fa5040 100644 --- a/classes/class_resourceimporter.rst +++ b/classes/class_resourceimporter.rst @@ -21,7 +21,7 @@ Base class for resource importers. Description ----------- -This is the base class for Godot's resource importers. To implement your own resource importers using editor plugins, see :ref:`EditorImportPlugin`. +This is the base class for Redot'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_resourceimporterdynamicfont.rst b/classes/class_resourceimporterdynamicfont.rst index ae11c81be28..1b331c44569 100644 --- a/classes/class_resourceimporterdynamicfont.rst +++ b/classes/class_resourceimporterdynamicfont.rst @@ -57,6 +57,8 @@ Properties +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-----------+ | :ref:`int` | :ref:`hinting` | ``1`` | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`keep_rounding_remainders` | ``true`` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-----------+ | :ref:`Dictionary` | :ref:`language_support` | ``{}`` | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-----------+ | :ref:`int` | :ref:`msdf_pixel_range` | ``8`` | @@ -197,6 +199,18 @@ The hinting mode to use. This controls how aggressively glyph edges should be sn ---- +.. _class_ResourceImporterDynamicFont_property_keep_rounding_remainders: + +.. rst-class:: classref-property + +:ref:`bool` **keep_rounding_remainders** = ``true`` :ref:`๐Ÿ”—` + +If set to ``true``, when aligning glyphs to the pixel boundaries rounding remainders are accumulated to ensure more uniform glyph distribution. This setting has no effect if subpixel positioning is enabled. + +.. rst-class:: classref-item-separator + +---- + .. _class_ResourceImporterDynamicFont_property_language_support: .. rst-class:: classref-property diff --git a/classes/class_retargetmodifier3d.rst b/classes/class_retargetmodifier3d.rst new file mode 100644 index 00000000000..5895cdf8a30 --- /dev/null +++ b/classes/class_retargetmodifier3d.rst @@ -0,0 +1,153 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/doc/classes/RetargetModifier3D.xml. + +.. _class_RetargetModifier3D: + +RetargetModifier3D +================== + +**Inherits:** :ref:`SkeletonModifier3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` + +A modifier to transfer parent skeleton poses (or global poses) to child skeletons in model space with different rests. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Retrieves the pose (or global pose) relative to the parent Skeleton's rest in model space and transfers it to the child Skeleton. + +This modifier rewrites the pose of the child skeleton directly in the parent skeleton's update process. This means that it overwrites the mapped bone pose set in the normal process on the target skeleton. If you want to set the target skeleton bone pose after retargeting, you will need to add a :ref:`SkeletonModifier3D` child to the target skeleton and thereby modify the pose. + +\ **Note:** When the :ref:`use_global_pose` is enabled, even if it is an unmapped bone, it can cause visual problems because the global pose is applied ignoring the parent bone's pose **if it has mapped bone children**. See also :ref:`use_global_pose`. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------------------------------+-----------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`position_enabled` | ``true`` | + +-----------------------------------------------+-----------------------------------------------------------------------------+-----------+ + | :ref:`SkeletonProfile` | :ref:`profile` | | + +-----------------------------------------------+-----------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`rotation_enabled` | ``true`` | + +-----------------------------------------------+-----------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`scale_enabled` | ``true`` | + +-----------------------------------------------+-----------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`use_global_pose` | ``false`` | + +-----------------------------------------------+-----------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_RetargetModifier3D_property_position_enabled: + +.. rst-class:: classref-property + +:ref:`bool` **position_enabled** = ``true`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_position_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_position_enabled**\ (\ ) + +If ``true``, allows to retarget the position. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RetargetModifier3D_property_profile: + +.. rst-class:: classref-property + +:ref:`SkeletonProfile` **profile** :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_profile**\ (\ value\: :ref:`SkeletonProfile`\ ) +- :ref:`SkeletonProfile` **get_profile**\ (\ ) + +:ref:`SkeletonProfile` for retargeting bones with names matching the bone list. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RetargetModifier3D_property_rotation_enabled: + +.. rst-class:: classref-property + +:ref:`bool` **rotation_enabled** = ``true`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_rotation_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_rotation_enabled**\ (\ ) + +If ``true``, allows to retarget the rotation. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RetargetModifier3D_property_scale_enabled: + +.. rst-class:: classref-property + +:ref:`bool` **scale_enabled** = ``true`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_scale_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_scale_enabled**\ (\ ) + +If ``true``, allows to retarget the scale. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RetargetModifier3D_property_use_global_pose: + +.. rst-class:: classref-property + +:ref:`bool` **use_global_pose** = ``false`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_use_global_pose**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_using_global_pose**\ (\ ) + +If ``false``, in case the target skeleton has fewer bones than the source skeleton, the source bone parent's transform will be ignored. + +Instead, it is possible to retarget between models with different body shapes, and position, rotation, and scale can be retargeted separately. + +If ``true``, retargeting is performed taking into account global pose. + +In case the target skeleton has fewer bones than the source skeleton, the source bone parent's transform is taken into account. However, bone length between skeletons must match exactly, if not, the bones will be forced to expand or shrink. + +This is useful for using dummy bone with length ``0`` to match postures when retargeting between models with different number of bones. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_ribbontrailmesh.rst b/classes/class_ribbontrailmesh.rst index 49920d8df0b..fe248a2aa40 100644 --- a/classes/class_ribbontrailmesh.rst +++ b/classes/class_ribbontrailmesh.rst @@ -105,7 +105,7 @@ Property Descriptions - |void| **set_curve**\ (\ value\: :ref:`Curve`\ ) - :ref:`Curve` **get_curve**\ (\ ) -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. +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. Should be a unit :ref:`Curve`. .. rst-class:: classref-item-separator diff --git a/classes/class_richtextlabel.rst b/classes/class_richtextlabel.rst index 5f598d0499b..9deabc33922 100644 --- a/classes/class_richtextlabel.rst +++ b/classes/class_richtextlabel.rst @@ -21,6 +21,8 @@ Description A control for displaying text that can contain custom fonts, images, and basic formatting. **RichTextLabel** manages these as an internal tag stack. It also adapts itself to given width/heights. +\ **Note:** :ref:`newline`, :ref:`push_paragraph`, ``"\n"``, ``"\r\n"``, ``p`` tag, and alignment tags start a new paragraph. Each paragraph is processed independently, in its own BiDi context. If you want to force line wrapping within paragraph, any other line breaking character can be used, for example, Form Feed (U+000C), Next Line (U+0085), Line Separator (U+2028). + \ **Note:** 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]``. @@ -99,6 +101,8 @@ Properties +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`threaded` | ``false`` | +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`VerticalAlignment` | :ref:`vertical_alignment` | ``0`` | + +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`int` | :ref:`visible_characters` | ``-1`` | +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`VisibleCharactersBehavior` | :ref:`visible_characters_behavior` | ``0`` | @@ -137,6 +141,8 @@ Methods +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_line_offset`\ (\ line\: :ref:`int`\ ) | +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`get_line_range`\ (\ line\: :ref:`int`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PopupMenu` | :ref:`get_menu`\ (\ ) |const| | +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_paragraph_count`\ (\ ) |const| | @@ -215,7 +221,7 @@ Methods +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`push_list`\ (\ level\: :ref:`int`, type\: :ref:`ListType`, capitalize\: :ref:`bool`, bullet\: :ref:`String` = "โ€ข"\ ) | +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`push_meta`\ (\ data\: :ref:`Variant`, underline_mode\: :ref:`MetaUnderline` = 1\ ) | + | |void| | :ref:`push_meta`\ (\ data\: :ref:`Variant`, underline_mode\: :ref:`MetaUnderline` = 1, tooltip\: :ref:`String` = ""\ ) | +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`push_mono`\ (\ ) | +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -1008,6 +1014,23 @@ If ``true``, text processing is done in a background thread. ---- +.. _class_RichTextLabel_property_vertical_alignment: + +.. rst-class:: classref-property + +:ref:`VerticalAlignment` **vertical_alignment** = ``0`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_vertical_alignment**\ (\ value\: :ref:`VerticalAlignment`\ ) +- :ref:`VerticalAlignment` **get_vertical_alignment**\ (\ ) + +Controls the text's vertical alignment. Supports top, center, bottom, and fill. Set it to one of the :ref:`VerticalAlignment` constants. + +.. rst-class:: classref-item-separator + +---- + .. _class_RichTextLabel_property_visible_characters: .. rst-class:: classref-property @@ -1206,6 +1229,8 @@ Returns the width of the content. Returns the total number of lines in the text. Wrapped text is counted as multiple lines. +\ **Note:** If :ref:`visible_characters_behavior` is set to :ref:`TextServer.VC_CHARS_BEFORE_SHAPING` only visible wrapped lines are counted. + \ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_finished` or :ref:`finished` to determine whether document is fully loaded. .. rst-class:: classref-item-separator @@ -1226,6 +1251,22 @@ Returns the vertical offset of the line found at the provided index. ---- +.. _class_RichTextLabel_method_get_line_range: + +.. rst-class:: classref-method + +:ref:`Vector2i` **get_line_range**\ (\ line\: :ref:`int`\ ) :ref:`๐Ÿ”—` + +Returns the indexes of the first and last visible characters for the given ``line``, as a :ref:`Vector2i`. + +\ **Note:** If :ref:`visible_characters_behavior` is set to :ref:`TextServer.VC_CHARS_BEFORE_SHAPING` only visible wrapped lines are counted. + +\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_finished` or :ref:`finished` to determine whether document is fully loaded. + +.. rst-class:: classref-item-separator + +---- + .. _class_RichTextLabel_method_get_menu: .. rst-class:: classref-method @@ -1782,7 +1823,7 @@ Adds ``[ol]`` or ``[ul]`` tag to the tag stack. Multiplies ``level`` by current .. rst-class:: classref-method -|void| **push_meta**\ (\ data\: :ref:`Variant`, underline_mode\: :ref:`MetaUnderline` = 1\ ) :ref:`๐Ÿ”—` +|void| **push_meta**\ (\ data\: :ref:`Variant`, underline_mode\: :ref:`MetaUnderline` = 1, tooltip\: :ref:`String` = ""\ ) :ref:`๐Ÿ”—` Adds a meta tag to the tag stack. Similar to the BBCode ``[url=something]{text}[/url]``, but supports non-:ref:`String` metadata types. diff --git a/classes/class_scenemultiplayer.rst b/classes/class_scenemultiplayer.rst index 1e816ecc9d8..91edf55a505 100644 --- a/classes/class_scenemultiplayer.rst +++ b/classes/class_scenemultiplayer.rst @@ -19,7 +19,7 @@ High-level multiplayer API implementation. Description ----------- -This class is the default implementation of :ref:`MultiplayerAPI`, used to provide multiplayer functionalities in Godot Engine. +This class is the default implementation of :ref:`MultiplayerAPI`, used to provide multiplayer functionalities in Redot Engine. This implementation supports RPCs via :ref:`Node.rpc` and :ref:`Node.rpc_id` and requires :ref:`MultiplayerAPI.rpc` to be passed a :ref:`Node` (it will fail for other object types). diff --git a/classes/class_scenetree.rst b/classes/class_scenetree.rst index 3b683a855d2..43bb65c078c 100644 --- a/classes/class_scenetree.rst +++ b/classes/class_scenetree.rst @@ -730,7 +730,7 @@ Returns ``true`` if a node added to the given group ``name`` exists in the tree. |void| **notify_group**\ (\ group\: :ref:`StringName`, notification\: :ref:`int`\ ) :ref:`๐Ÿ”—` -Calls :ref:`Object.notification` with the given ``notification`` to all nodes inside this tree added to the ``group``. See also :doc:`Redot notifications <../tutorials/best_practices/godot_notifications>` and :ref:`call_group` and :ref:`set_group`. +Calls :ref:`Object.notification` with the given ``notification`` to all nodes inside this tree added to the ``group``. See also :doc:`Redot notifications <../tutorials/best_practices/redot_notifications>` and :ref:`call_group` and :ref:`set_group`. \ **Note:** This method acts immediately on all selected nodes at once, which may cause stuttering in some performance-intensive situations. diff --git a/classes/class_scriptextension.rst b/classes/class_scriptextension.rst index 6b3c185dbb3..38c884bc734 100644 --- a/classes/class_scriptextension.rst +++ b/classes/class_scriptextension.rst @@ -35,6 +35,8 @@ Methods +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Dictionary` | :ref:`_get_constants`\ (\ ) |virtual| |const| | +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`_get_doc_class_name`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`_get_documentation`\ (\ ) |virtual| |const| | +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`StringName` | :ref:`_get_global_name`\ (\ ) |virtual| |const| | @@ -177,6 +179,20 @@ Method Descriptions ---- +.. _class_ScriptExtension_private_method__get_doc_class_name: + +.. rst-class:: classref-method + +:ref:`StringName` **_get_doc_class_name**\ (\ ) |virtual| |const| :ref:`๐Ÿ”—` + +.. container:: contribute + + There is currently no description for this method. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + .. _class_ScriptExtension_private_method__get_documentation: .. rst-class:: classref-method diff --git a/classes/class_scriptlanguageextension.rst b/classes/class_scriptlanguageextension.rst index 2d71507dcc6..909db9abfee 100644 --- a/classes/class_scriptlanguageextension.rst +++ b/classes/class_scriptlanguageextension.rst @@ -251,17 +251,39 @@ enum **LookupResultType**: :ref:`๐Ÿ”—` **LOOKUP_RESULT_CLASS_TBD_GLOBALSCOPE** = ``7`` +**Deprecated:** This constant may be changed or removed in future versions. + + + +.. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_CLASS_ANNOTATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`LookupResultType` **LOOKUP_RESULT_CLASS_ANNOTATION** = ``8`` + .. container:: contribute There is currently no description for this enum. Please help us by :ref:`contributing one `! -.. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_CLASS_ANNOTATION: +.. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_LOCAL_CONSTANT: .. rst-class:: classref-enumeration-constant -:ref:`LookupResultType` **LOOKUP_RESULT_CLASS_ANNOTATION** = ``8`` +:ref:`LookupResultType` **LOOKUP_RESULT_LOCAL_CONSTANT** = ``9`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one `! + + + +.. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_LOCAL_VARIABLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`LookupResultType` **LOOKUP_RESULT_LOCAL_VARIABLE** = ``10`` .. container:: contribute @@ -273,7 +295,7 @@ enum **LookupResultType**: :ref:`๐Ÿ”—` **LOOKUP_RESULT_MAX** = ``9`` +:ref:`LookupResultType` **LOOKUP_RESULT_MAX** = ``11`` .. container:: contribute diff --git a/classes/class_scrollcontainer.rst b/classes/class_scrollcontainer.rst index f32c72c1106..74cfd59150c 100644 --- a/classes/class_scrollcontainer.rst +++ b/classes/class_scrollcontainer.rst @@ -41,6 +41,8 @@ Properties +----------------------------------------------------+----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | clip_contents | ``true`` (overrides :ref:`Control`) | +----------------------------------------------------+----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`draw_focus_border` | ``false`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`follow_focus` | ``false`` | +----------------------------------------------------+----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`ScrollMode` | :ref:`horizontal_scroll_mode` | ``1`` | @@ -82,6 +84,8 @@ Theme Properties .. table:: :widths: auto + +---------------------------------+-------------------------------------------------------+ + | :ref:`StyleBox` | :ref:`focus` | +---------------------------------+-------------------------------------------------------+ | :ref:`StyleBox` | :ref:`panel` | +---------------------------------+-------------------------------------------------------+ @@ -183,6 +187,23 @@ Combines :ref:`SCROLL_MODE_AUTO Property Descriptions --------------------- +.. _class_ScrollContainer_property_draw_focus_border: + +.. rst-class:: classref-property + +:ref:`bool` **draw_focus_border** = ``false`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_draw_focus_border**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_draw_focus_border**\ (\ ) + +If ``true``, :ref:`focus` is drawn when the ScrollContainer or one of its descendant nodes is focused. + +.. rst-class:: classref-item-separator + +---- + .. _class_ScrollContainer_property_follow_focus: .. rst-class:: classref-property @@ -391,6 +412,18 @@ Returns the vertical scrollbar :ref:`VScrollBar` of this **Scr Theme Property Descriptions --------------------------- +.. _class_ScrollContainer_theme_style_focus: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **focus** :ref:`๐Ÿ”—` + +The focus border :ref:`StyleBox` of the **ScrollContainer**. Only used if :ref:`draw_focus_border` is ``true``. + +.. rst-class:: classref-item-separator + +---- + .. _class_ScrollContainer_theme_style_panel: .. rst-class:: classref-themeproperty diff --git a/classes/class_shaderincludedb.rst b/classes/class_shaderincludedb.rst new file mode 100644 index 00000000000..3aa03cae82a --- /dev/null +++ b/classes/class_shaderincludedb.rst @@ -0,0 +1,88 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/doc/classes/ShaderIncludeDB.xml. + +.. _class_ShaderIncludeDB: + +ShaderIncludeDB +=============== + +**Inherits:** :ref:`Object` + +Internal database of built in shader include files. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This object contains shader fragments from Redot's internal shaders. These can be used when access to internal uniform buffers and/or internal functions is required for instance when composing compositor effects or compute shaders. Only fragments for the current rendering device are loaded. + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_built_in_include_file`\ (\ filename\: :ref:`String`\ ) |static| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_built_in_include_file`\ (\ filename\: :ref:`String`\ ) |static| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`list_built_in_include_files`\ (\ ) |static| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_ShaderIncludeDB_method_get_built_in_include_file: + +.. rst-class:: classref-method + +:ref:`String` **get_built_in_include_file**\ (\ filename\: :ref:`String`\ ) |static| :ref:`๐Ÿ”—` + +Returns the code for the built-in shader fragment. You can also access this in your shader code through ``#include "filename"``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ShaderIncludeDB_method_has_built_in_include_file: + +.. rst-class:: classref-method + +:ref:`bool` **has_built_in_include_file**\ (\ filename\: :ref:`String`\ ) |static| :ref:`๐Ÿ”—` + +Returns ``true`` if an include file with this name exists. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ShaderIncludeDB_method_list_built_in_include_files: + +.. rst-class:: classref-method + +:ref:`PackedStringArray` **list_built_in_include_files**\ (\ ) |static| :ref:`๐Ÿ”—` + +Returns a list of built-in include files that are currently registered. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_skeleton3d.rst b/classes/class_skeleton3d.rst index 242234e5079..a551ce2c3cc 100644 --- a/classes/class_skeleton3d.rst +++ b/classes/class_skeleton3d.rst @@ -203,6 +203,18 @@ Emitted when the pose is updated. ---- +.. _class_Skeleton3D_signal_rest_updated: + +.. rst-class:: classref-signal + +**rest_updated**\ (\ ) :ref:`๐Ÿ”—` + +Emitted when the rest is updated. + +.. rst-class:: classref-item-separator + +---- + .. _class_Skeleton3D_signal_show_rest_only_changed: .. rst-class:: classref-signal diff --git a/classes/class_skeletonmodifier3d.rst b/classes/class_skeletonmodifier3d.rst index 785f0cd42fa..0f0d01c9807 100644 --- a/classes/class_skeletonmodifier3d.rst +++ b/classes/class_skeletonmodifier3d.rst @@ -12,7 +12,7 @@ SkeletonModifier3D **Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`LookAtModifier3D`, :ref:`PhysicalBoneSimulator3D`, :ref:`SkeletonIK3D`, :ref:`XRBodyModifier3D`, :ref:`XRHandModifier3D` +**Inherited By:** :ref:`LookAtModifier3D`, :ref:`PhysicalBoneSimulator3D`, :ref:`RetargetModifier3D`, :ref:`SkeletonIK3D`, :ref:`XRBodyModifier3D`, :ref:`XRHandModifier3D` A Node that may modify Skeleton3D's bone. diff --git a/classes/class_softbody3d.rst b/classes/class_softbody3d.rst index e05c258a900..f9c9e0b74f8 100644 --- a/classes/class_softbody3d.rst +++ b/classes/class_softbody3d.rst @@ -223,7 +223,7 @@ Defines the behavior in physics when :ref:`Node.process_mode` | light_specular | ``0.5`` (overrides :ref:`Light3D`) | +---------------------------+----------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`float` | shadow_bias | ``0.03`` (overrides :ref:`Light3D`) | +---------------------------+----------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ diff --git a/classes/class_spritebase3d.rst b/classes/class_spritebase3d.rst index 7b7ce5cc2b0..f66d7db1358 100644 --- a/classes/class_spritebase3d.rst +++ b/classes/class_spritebase3d.rst @@ -42,7 +42,7 @@ Properties +-----------------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ | :ref:`float` | :ref:`alpha_scissor_threshold` | ``0.5`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | Vector3.Axis | :ref:`axis` | ``2`` | + | :ref:`Axis` | :ref:`axis` | ``2`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ | :ref:`BillboardMode` | :ref:`billboard` | ``0`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ @@ -294,12 +294,12 @@ Threshold at which the alpha scissor will discard values. .. rst-class:: classref-property -Vector3.Axis **axis** = ``2`` :ref:`๐Ÿ”—` +:ref:`Axis` **axis** = ``2`` :ref:`๐Ÿ”—` .. rst-class:: classref-property-setget -- |void| **set_axis**\ (\ value\: Vector3.Axis\ ) -- Vector3.Axis **get_axis**\ (\ ) +- |void| **set_axis**\ (\ value\: :ref:`Axis`\ ) +- :ref:`Axis` **get_axis**\ (\ ) The direction in which the front of the texture faces. diff --git a/classes/class_streampeer.rst b/classes/class_streampeer.rst index 4a4f447eda7..12369e4254a 100644 --- a/classes/class_streampeer.rst +++ b/classes/class_streampeer.rst @@ -62,6 +62,8 @@ Methods +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_float`\ (\ ) | +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_half`\ (\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`get_partial_data`\ (\ bytes\: :ref:`int`\ ) | +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_string`\ (\ bytes\: :ref:`int` = -1\ ) | @@ -92,6 +94,8 @@ Methods +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`put_float`\ (\ value\: :ref:`float`\ ) | +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`put_half`\ (\ value\: :ref:`float`\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`put_partial_data`\ (\ data\: :ref:`PackedByteArray`\ ) | +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`put_string`\ (\ value\: :ref:`String`\ ) | @@ -236,6 +240,18 @@ Gets a single-precision float from the stream. ---- +.. _class_StreamPeer_method_get_half: + +.. rst-class:: classref-method + +:ref:`float` **get_half**\ (\ ) :ref:`๐Ÿ”—` + +Gets a half-precision float from the stream. + +.. rst-class:: classref-item-separator + +---- + .. _class_StreamPeer_method_get_partial_data: .. rst-class:: classref-method @@ -420,6 +436,18 @@ Puts a single-precision float into the stream. ---- +.. _class_StreamPeer_method_put_half: + +.. rst-class:: classref-method + +|void| **put_half**\ (\ value\: :ref:`float`\ ) :ref:`๐Ÿ”—` + +Puts a half-precision float into the stream. + +.. rst-class:: classref-item-separator + +---- + .. _class_StreamPeer_method_put_partial_data: .. rst-class:: classref-method diff --git a/classes/class_string.rst b/classes/class_string.rst index 6328e896503..cb9bc3722cd 100644 --- a/classes/class_string.rst +++ b/classes/class_string.rst @@ -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. -To convert any Variant to or from a string, see :ref:`@GlobalScope.str`, :ref:`@GlobalScope.str_to_var`, and :ref:`@GlobalScope.var_to_str`. +To convert any :ref:`Variant` to or from a string, see :ref:`@GlobalScope.str`, :ref:`@GlobalScope.str_to_var`, and :ref:`@GlobalScope.var_to_str`. \ **Note:** In a boolean context, a string will evaluate to ``false`` if it is empty (``""``). Otherwise, a string will always evaluate to ``true``. @@ -536,8 +536,8 @@ Returns ``true`` if the string contains ``what``. In GDScript, this corresponds .. code-tab:: csharp - GD.Print("Node".Contains("de")); // Prints true - GD.Print("team".Contains("I")); // Prints false + GD.Print("Node".Contains("de")); // Prints True + GD.Print("team".Contains("I")); // Prints False diff --git a/classes/class_stringname.rst b/classes/class_stringname.rst index 99a5f9bda39..4cf0fd0975c 100644 --- a/classes/class_stringname.rst +++ b/classes/class_stringname.rst @@ -490,8 +490,8 @@ Returns ``true`` if the string contains ``what``. In GDScript, this corresponds .. code-tab:: csharp - GD.Print("Node".Contains("de")); // Prints true - GD.Print("team".Contains("I")); // Prints false + GD.Print("Node".Contains("de")); // Prints True + GD.Print("team".Contains("I")); // Prints False diff --git a/classes/class_subviewportcontainer.rst b/classes/class_subviewportcontainer.rst index 98dbbc4e88b..edeb1d295f9 100644 --- a/classes/class_subviewportcontainer.rst +++ b/classes/class_subviewportcontainer.rst @@ -36,6 +36,8 @@ Properties +------------------------------------------+---------------------------------------------------------------------------+---------------------------------------------------------------------+ | :ref:`FocusMode` | focus_mode | ``1`` (overrides :ref:`Control`) | +------------------------------------------+---------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`bool` | :ref:`mouse_target` | ``false`` | + +------------------------------------------+---------------------------------------------------------------------------+---------------------------------------------------------------------+ | :ref:`bool` | :ref:`stretch` | ``false`` | +------------------------------------------+---------------------------------------------------------------------------+---------------------------------------------------------------------+ | :ref:`int` | :ref:`stretch_shrink` | ``1`` | @@ -62,6 +64,27 @@ Methods Property Descriptions --------------------- +.. _class_SubViewportContainer_property_mouse_target: + +.. rst-class:: classref-property + +:ref:`bool` **mouse_target** = ``false`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_mouse_target**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_mouse_target_enabled**\ (\ ) + +Configure, if either the **SubViewportContainer** or alternatively the :ref:`Control` nodes of its :ref:`SubViewport` children should be available as targets of mouse-related functionalities, like identifying the drop target in drag-and-drop operations or cursor shape of hovered :ref:`Control` node. + +If ``false``, the :ref:`Control` nodes inside its :ref:`SubViewport` children are considered as targets. + +If ``true``, the **SubViewportContainer** itself will be considered as a target. + +.. rst-class:: classref-item-separator + +---- + .. _class_SubViewportContainer_property_stretch: .. rst-class:: classref-property diff --git a/classes/class_surfacetool.rst b/classes/class_surfacetool.rst index d2038a968c4..4b607689c92 100644 --- a/classes/class_surfacetool.rst +++ b/classes/class_surfacetool.rst @@ -443,7 +443,7 @@ Generates normals from vertices so you do not have to do it manually. If ``flip` |void| **generate_tangents**\ (\ ) :ref:`๐Ÿ”—` -Generates a tangent vector for each vertex. Requires that each vertex have UVs and normals set already (see :ref:`generate_normals`). +Generates a tangent vector for each vertex. Requires that each vertex already has UVs and normals set (see :ref:`generate_normals`). .. rst-class:: classref-item-separator diff --git a/classes/class_systemfont.rst b/classes/class_systemfont.rst index c921f387e6a..2f4b10d8cee 100644 --- a/classes/class_systemfont.rst +++ b/classes/class_systemfont.rst @@ -58,6 +58,8 @@ Properties +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`Hinting` | :ref:`hinting` | ``1`` | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`bool` | :ref:`keep_rounding_remainders` | ``true`` | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`int` | :ref:`msdf_pixel_range` | ``16`` | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`int` | :ref:`msdf_size` | ``48`` | @@ -250,6 +252,23 @@ Font hinting mode. ---- +.. _class_SystemFont_property_keep_rounding_remainders: + +.. rst-class:: classref-property + +:ref:`bool` **keep_rounding_remainders** = ``true`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_keep_rounding_remainders**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_keep_rounding_remainders**\ (\ ) + +If set to ``true``, when aligning glyphs to the pixel boundaries rounding remainders are accumulated to ensure more uniform glyph distribution. This setting has no effect if subpixel positioning is enabled. + +.. rst-class:: classref-item-separator + +---- + .. _class_SystemFont_property_msdf_pixel_range: .. rst-class:: classref-property diff --git a/classes/class_textedit.rst b/classes/class_textedit.rst index 75f6576f4e0..83366e0f066 100644 --- a/classes/class_textedit.rst +++ b/classes/class_textedit.rst @@ -1204,7 +1204,7 @@ If ``false``, the context menu ignores mouse location. - |void| **set_multiple_carets_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_multiple_carets_enabled**\ (\ ) -Sets if multiple carets are allowed. +If ``true``, multiple carets are allowed. Left-clicking with :kbd:`Alt` adds a new caret. See :ref:`add_caret` and :ref:`get_caret_count`. .. rst-class:: classref-item-separator @@ -2270,7 +2270,7 @@ Returns the wrap index the editing caret is on. :ref:`int` **get_first_non_whitespace_column**\ (\ line\: :ref:`int`\ ) |const| :ref:`๐Ÿ”—` -Returns the first column containing a non-whitespace character. +Returns the first column containing a non-whitespace character on the given line. If there is only whitespace, returns the number of characters. .. rst-class:: classref-item-separator @@ -2354,7 +2354,7 @@ Returns the :ref:`HScrollBar` used by **TextEdit**. :ref:`int` **get_indent_level**\ (\ line\: :ref:`int`\ ) |const| :ref:`๐Ÿ”—` -Returns the number of spaces and ``tab * tab_size`` before the first char. +Returns the indent level of the given line. This is the number of spaces and tabs at the beginning of the line, with the tabs taking the tab size into account (see :ref:`get_tab_size`). .. rst-class:: classref-item-separator @@ -2414,7 +2414,7 @@ Returns the text of a specific line. :ref:`Color` **get_line_background_color**\ (\ line\: :ref:`int`\ ) |const| :ref:`๐Ÿ”—` -Returns the current background color of the line. ``Color(0, 0, 0, 0)`` is returned if no color is set. +Returns the custom background color of the given line. If no color is set, returns ``Color(0, 0, 0, 0)``. .. rst-class:: classref-item-separator @@ -2550,7 +2550,7 @@ Returns the number of times the given line is wrapped. :ref:`int` **get_line_wrap_index_at_column**\ (\ line\: :ref:`int`, column\: :ref:`int`\ ) |const| :ref:`๐Ÿ”—` -Returns the wrap index of the given line column. +Returns the wrap index of the given column on the given line. This ranges from ``0`` to :ref:`get_line_wrap_count`. .. rst-class:: classref-item-separator @@ -2921,7 +2921,7 @@ Returns the total width of all gutters and internal padding. :ref:`int` **get_total_visible_line_count**\ (\ ) |const| :ref:`๐Ÿ”—` -Returns the number of lines that may be drawn. +Returns the total number of lines in the text. This includes wrapped lines and excludes folded lines. If :ref:`wrap_mode` is set to :ref:`LINE_WRAPPING_NONE` and no lines are folded (see :ref:`CodeEdit.is_line_folded`) then this is equivalent to :ref:`get_line_count`. See :ref:`get_visible_line_count_in_range` for a limited range of lines. .. rst-class:: classref-item-separator @@ -2957,7 +2957,7 @@ Returns the current version of the **TextEdit**. The version is a count of recor :ref:`int` **get_visible_line_count**\ (\ ) |const| :ref:`๐Ÿ”—` -Returns the number of visible lines, including wrapped text. +Returns the number of lines that can visually fit, rounded down, based on this control's height. .. rst-class:: classref-item-separator @@ -2969,7 +2969,7 @@ Returns the number of visible lines, including wrapped text. :ref:`int` **get_visible_line_count_in_range**\ (\ from_line\: :ref:`int`, to_line\: :ref:`int`\ ) |const| :ref:`๐Ÿ”—` -Returns the total number of visible + wrapped lines between the two lines. +Returns the total number of lines between ``from_line`` and ``to_line`` (inclusive) in the text. This includes wrapped lines and excludes folded lines. If the range covers all lines it is equivalent to :ref:`get_total_visible_line_count`. .. rst-class:: classref-item-separator @@ -3131,7 +3131,7 @@ Returns ``true`` if the user is dragging their mouse for scrolling, selecting, o :ref:`bool` **is_gutter_clickable**\ (\ gutter\: :ref:`int`\ ) |const| :ref:`๐Ÿ”—` -Returns whether the gutter is clickable. +Returns ``true`` if the gutter at the given index is clickable. See :ref:`set_gutter_clickable`. .. rst-class:: classref-item-separator @@ -3143,7 +3143,7 @@ Returns whether the gutter is clickable. :ref:`bool` **is_gutter_drawn**\ (\ gutter\: :ref:`int`\ ) |const| :ref:`๐Ÿ”—` -Returns whether the gutter is currently drawn. +Returns ``true`` if the gutter at the given index is currently drawn. See :ref:`set_gutter_draw`. .. rst-class:: classref-item-separator @@ -3155,7 +3155,7 @@ Returns whether the gutter is currently drawn. :ref:`bool` **is_gutter_overwritable**\ (\ gutter\: :ref:`int`\ ) |const| :ref:`๐Ÿ”—` -Returns whether the gutter is overwritable. +Returns ``true`` if the gutter at the given index is overwritable. See :ref:`set_gutter_overwritable`. .. rst-class:: classref-item-separator @@ -3179,7 +3179,7 @@ Returns ``true`` if a :ref:`begin_multicaret_edit` **is_line_gutter_clickable**\ (\ line\: :ref:`int`, gutter\: :ref:`int`\ ) |const| :ref:`๐Ÿ”—` -Returns whether the gutter on the given line is clickable. +Returns ``true`` if the gutter at the given index on the given line is clickable. See :ref:`set_line_gutter_clickable`. .. rst-class:: classref-item-separator @@ -3203,7 +3203,7 @@ Returns if the given line is wrapped. :ref:`bool` **is_menu_visible**\ (\ ) |const| :ref:`๐Ÿ”—` -Returns whether the menu is visible. Use this instead of ``get_menu().visible`` to improve performance (so the creation of the menu is avoided). +Returns ``true`` if the menu is visible. Use this instead of ``get_menu().visible`` to improve performance (so the creation of the menu is avoided). See :ref:`get_menu`. .. rst-class:: classref-item-separator @@ -3215,7 +3215,7 @@ Returns whether the menu is visible. Use this instead of ``get_menu().visible`` :ref:`bool` **is_mouse_over_selection**\ (\ edges\: :ref:`bool`, caret_index\: :ref:`int` = -1\ ) |const| :ref:`๐Ÿ”—` -Returns whether the mouse is over selection. If ``edges`` is ``true``, the edges are considered part of the selection. +Returns ``true`` if the mouse is over a selection. If ``edges`` is ``true``, the edges are considered part of the selection. .. rst-class:: classref-item-separator @@ -3227,7 +3227,7 @@ Returns whether the mouse is over selection. If ``edges`` is ``true``, the edges :ref:`bool` **is_overtype_mode_enabled**\ (\ ) |const| :ref:`๐Ÿ”—` -Returns whether the user is in overtype mode. +Returns ``true`` if overtype mode is enabled. See :ref:`set_overtype_mode_enabled`. .. rst-class:: classref-item-separator @@ -3251,7 +3251,7 @@ Executes a given action as defined in the :ref:`MenuItems`, to_line\: :ref:`int`\ ) :ref:`๐Ÿ”—` -Merge the gutters from ``from_line`` into ``to_line``. Only overwritable gutters will be copied. +Merge the gutters from ``from_line`` into ``to_line``. Only overwritable gutters will be copied. See :ref:`set_gutter_overwritable`. .. rst-class:: classref-item-separator @@ -3343,7 +3343,7 @@ Removes the given caret index. |void| **remove_gutter**\ (\ gutter\: :ref:`int`\ ) :ref:`๐Ÿ”—` -Removes the gutter from this **TextEdit**. +Removes the gutter at the given index. .. rst-class:: classref-item-separator @@ -3508,7 +3508,7 @@ If ``wrap_index`` is ``-1``, the caret column will be clamped to the ``line``'s |void| **set_gutter_clickable**\ (\ gutter\: :ref:`int`, clickable\: :ref:`bool`\ ) :ref:`๐Ÿ”—` -Sets the gutter as clickable. This will change the mouse cursor to a pointing hand when hovering over the gutter. +If ``true``, the mouse cursor will change to a pointing hand (:ref:`Control.CURSOR_POINTING_HAND`) when hovering over the gutter at the given index. See :ref:`is_gutter_clickable` and :ref:`set_line_gutter_clickable`. .. rst-class:: classref-item-separator @@ -3520,7 +3520,7 @@ Sets the gutter as clickable. This will change the mouse cursor to a pointing ha |void| **set_gutter_custom_draw**\ (\ column\: :ref:`int`, draw_callback\: :ref:`Callable`\ ) :ref:`๐Ÿ”—` -Set a custom draw method for the gutter. The callback method must take the following args: ``line: int, gutter: int, Area: Rect2``. This only works when the gutter type is :ref:`GUTTER_TYPE_CUSTOM` (see :ref:`set_gutter_type`). +Set a custom draw callback for the gutter at the given index. ``draw_callback`` must take the following arguments: A line index :ref:`int`, a gutter index :ref:`int`, and an area :ref:`Rect2`. This callback only works when the gutter type is :ref:`GUTTER_TYPE_CUSTOM` (see :ref:`set_gutter_type`). .. rst-class:: classref-item-separator @@ -3532,7 +3532,7 @@ Set a custom draw method for the gutter. The callback method must take the follo |void| **set_gutter_draw**\ (\ gutter\: :ref:`int`, draw\: :ref:`bool`\ ) :ref:`๐Ÿ”—` -Sets whether the gutter should be drawn. +If ``true``, the gutter at the given index is drawn. The gutter type (:ref:`set_gutter_type`) determines how it is drawn. See :ref:`is_gutter_drawn`. .. rst-class:: classref-item-separator @@ -3544,7 +3544,7 @@ Sets whether the gutter should be drawn. |void| **set_gutter_name**\ (\ gutter\: :ref:`int`, name\: :ref:`String`\ ) :ref:`๐Ÿ”—` -Sets the name of the gutter. +Sets the name of the gutter at the given index. .. rst-class:: classref-item-separator @@ -3556,7 +3556,7 @@ Sets the name of the gutter. |void| **set_gutter_overwritable**\ (\ gutter\: :ref:`int`, overwritable\: :ref:`bool`\ ) :ref:`๐Ÿ”—` -Sets the gutter to overwritable. See :ref:`merge_gutters`. +If ``true``, the line data of the gutter at the given index can be overridden when using :ref:`merge_gutters`. See :ref:`is_gutter_overwritable`. .. rst-class:: classref-item-separator @@ -3568,7 +3568,7 @@ Sets the gutter to overwritable. See :ref:`merge_gutters`, type\: :ref:`GutterType`\ ) :ref:`๐Ÿ”—` -Sets the type of gutter. Gutters can contain icons, text, or custom visuals. See :ref:`GutterType` for options. +Sets the type of gutter at the given index. Gutters can contain icons, text, or custom visuals. See :ref:`GutterType` for options. .. rst-class:: classref-item-separator @@ -3580,7 +3580,7 @@ Sets the type of gutter. Gutters can contain icons, text, or custom visuals. See |void| **set_gutter_width**\ (\ gutter\: :ref:`int`, width\: :ref:`int`\ ) :ref:`๐Ÿ”—` -Set the width of the gutter. +Set the width of the gutter at the given index. .. rst-class:: classref-item-separator @@ -3642,7 +3642,7 @@ Positions the ``wrap_index`` of ``line`` at the bottom of the viewport. |void| **set_line_background_color**\ (\ line\: :ref:`int`, color\: :ref:`Color`\ ) :ref:`๐Ÿ”—` -Sets the current background color of the line. Set to ``Color(0, 0, 0, 0)`` for no color. +Sets the custom background color of the given line. If transparent, this color is applied on top of the default background color (See :ref:`background_color`). If set to ``Color(0, 0, 0, 0)``, no additional color is applied. .. rst-class:: classref-item-separator @@ -3654,7 +3654,7 @@ Sets the current background color of the line. Set to ``Color(0, 0, 0, 0)`` for |void| **set_line_gutter_clickable**\ (\ line\: :ref:`int`, gutter\: :ref:`int`, clickable\: :ref:`bool`\ ) :ref:`๐Ÿ”—` -If ``clickable`` is ``true``, makes the ``gutter`` on ``line`` clickable. See :ref:`gutter_clicked`. +If ``clickable`` is ``true``, makes the ``gutter`` on the given ``line`` clickable. This is like :ref:`set_gutter_clickable`, but for a single line. If :ref:`is_gutter_clickable` is ``true``, this will not have any effect. See :ref:`is_line_gutter_clickable` and :ref:`gutter_clicked`. .. rst-class:: classref-item-separator @@ -3714,7 +3714,7 @@ Sets the text for ``gutter`` on ``line`` to ``text``. This only works when the g |void| **set_overtype_mode_enabled**\ (\ enabled\: :ref:`bool`\ ) :ref:`๐Ÿ”—` -If ``true``, sets the user into overtype mode. When the user types in this mode, it will override existing text. +If ``true``, enables overtype mode. In this mode, typing overrides existing text instead of inserting text. The :ref:`ProjectSettings.input/ui_text_toggle_insert_mode` action toggles overtype mode. See :ref:`is_overtype_mode_enabled`. .. rst-class:: classref-item-separator diff --git a/classes/class_textserver.rst b/classes/class_textserver.rst index 14f5723b107..2baecbb811b 100644 --- a/classes/class_textserver.rst +++ b/classes/class_textserver.rst @@ -117,6 +117,8 @@ Methods +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Hinting` | :ref:`font_get_hinting`\ (\ font_rid\: :ref:`RID`\ ) |const| | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`font_get_keep_rounding_remainders`\ (\ font_rid\: :ref:`RID`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`font_get_kerning`\ (\ font_rid\: :ref:`RID`, size\: :ref:`int`, glyph_pair\: :ref:`Vector2i`\ ) |const| | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`Vector2i`\] | :ref:`font_get_kerning_list`\ (\ font_rid\: :ref:`RID`, size\: :ref:`int`\ ) |const| | @@ -243,6 +245,8 @@ Methods +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`font_set_hinting`\ (\ font_rid\: :ref:`RID`, hinting\: :ref:`Hinting`\ ) | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_keep_rounding_remainders`\ (\ font_rid\: :ref:`RID`, keep_rounding_remainders\: :ref:`bool`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`font_set_kerning`\ (\ font_rid\: :ref:`RID`, size\: :ref:`int`, glyph_pair\: :ref:`Vector2i`, kerning\: :ref:`Vector2`\ ) | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`font_set_language_support_override`\ (\ font_rid\: :ref:`RID`, language\: :ref:`String`, supported\: :ref:`bool`\ ) | @@ -301,6 +305,8 @@ Methods +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_name`\ (\ ) |const| | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`get_support_data`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_support_data_filename`\ (\ ) |const| | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_support_data_info`\ (\ ) |const| | @@ -857,6 +863,8 @@ enum **VisibleCharactersBehavior**: :ref:`๐Ÿ”—` or :ref:`RichTextLabel.visible_characters` value is visually identical to typing the text. +\ **Note:** In this mode, trimmed text is not processed at all. It is not accounted for in line breaking and size calculations. + .. _class_TextServer_constant_VC_CHARS_AFTER_SHAPING: .. rst-class:: classref-enumeration-constant @@ -2022,6 +2030,18 @@ Returns the font hinting mode. Used by dynamic fonts only. ---- +.. _class_TextServer_method_font_get_keep_rounding_remainders: + +.. rst-class:: classref-method + +:ref:`bool` **font_get_keep_rounding_remainders**\ (\ font_rid\: :ref:`RID`\ ) |const| :ref:`๐Ÿ”—` + +Returns glyph position rounding behavior. If set to ``true``, when aligning glyphs to the pixel boundaries rounding remainders are accumulated to ensure more uniform glyph distribution. This setting has no effect if subpixel positioning is enabled. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServer_method_font_get_kerning: .. rst-class:: classref-method @@ -2786,6 +2806,18 @@ Sets font hinting mode. Used by dynamic fonts only. ---- +.. _class_TextServer_method_font_set_keep_rounding_remainders: + +.. rst-class:: classref-method + +|void| **font_set_keep_rounding_remainders**\ (\ font_rid\: :ref:`RID`, keep_rounding_remainders\: :ref:`bool`\ ) :ref:`๐Ÿ”—` + +Sets glyph position rounding behavior. If set to ``true``, when aligning glyphs to the pixel boundaries rounding remainders are accumulated to ensure more uniform glyph distribution. This setting has no effect if subpixel positioning is enabled. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServer_method_font_set_kerning: .. rst-class:: classref-method @@ -3146,6 +3178,18 @@ Returns the name of the server interface. ---- +.. _class_TextServer_method_get_support_data: + +.. rst-class:: classref-method + +:ref:`PackedByteArray` **get_support_data**\ (\ ) |const| :ref:`๐Ÿ”—` + +Returns default TextServer database (e.g. ICU break iterators and dictionaries). + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServer_method_get_support_data_filename: .. rst-class:: classref-method diff --git a/classes/class_textserveradvanced.rst b/classes/class_textserveradvanced.rst index 8c09f988119..d92ca7b9537 100644 --- a/classes/class_textserveradvanced.rst +++ b/classes/class_textserveradvanced.rst @@ -12,14 +12,14 @@ TextServerAdvanced **Inherits:** :ref:`TextServerExtension` **<** :ref:`TextServer` **<** :ref:`RefCounted` **<** :ref:`Object` -An advanced text server with support for BiDi, complex text layout, and contextual OpenType features. Used in Godot by default. +An advanced text server with support for BiDi, complex text layout, and contextual OpenType features. Used in Redot 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. +An implementation of :ref:`TextServer` that uses HarfBuzz, ICU and SIL Graphite to support BiDi, complex text layouts and contextual OpenType features. This is Redot'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_textserverextension.rst b/classes/class_textserverextension.rst index 968fbbd3089..c97aaf1a536 100644 --- a/classes/class_textserverextension.rst +++ b/classes/class_textserverextension.rst @@ -102,6 +102,8 @@ Methods +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Hinting` | :ref:`_font_get_hinting`\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_font_get_keep_rounding_remainders`\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`_font_get_kerning`\ (\ font_rid\: :ref:`RID`, size\: :ref:`int`, glyph_pair\: :ref:`Vector2i`\ ) |virtual| |const| | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`Vector2i`\] | :ref:`_font_get_kerning_list`\ (\ font_rid\: :ref:`RID`, size\: :ref:`int`\ ) |virtual| |const| | @@ -230,6 +232,8 @@ Methods +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_font_set_hinting`\ (\ font_rid\: :ref:`RID`, hinting\: :ref:`Hinting`\ ) |virtual| | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_keep_rounding_remainders`\ (\ font_rid\: :ref:`RID`, keep_rounding_remainders\: :ref:`bool`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_font_set_kerning`\ (\ font_rid\: :ref:`RID`, size\: :ref:`int`, glyph_pair\: :ref:`Vector2i`, kerning\: :ref:`Vector2`\ ) |virtual| | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_font_set_language_support_override`\ (\ font_rid\: :ref:`RID`, language\: :ref:`String`, supported\: :ref:`bool`\ ) |virtual| | @@ -288,6 +292,8 @@ Methods +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`_get_name`\ (\ ) |virtual| |const| | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`_get_support_data`\ (\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`_get_support_data_filename`\ (\ ) |virtual| |const| | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`_get_support_data_info`\ (\ ) |virtual| |const| | @@ -966,6 +972,20 @@ Returns the font hinting mode. Used by dynamic fonts only. ---- +.. _class_TextServerExtension_private_method__font_get_keep_rounding_remainders: + +.. rst-class:: classref-method + +:ref:`bool` **_font_get_keep_rounding_remainders**\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| :ref:`๐Ÿ”—` + +**Optional.**\ + +Returns glyph position rounding behavior. If set to ``true``, when aligning glyphs to the pixel boundaries rounding remainders are accumulated to ensure more uniform glyph distribution. This setting has no effect if subpixel positioning is enabled. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServerExtension_private_method__font_get_kerning: .. rst-class:: classref-method @@ -1860,6 +1880,20 @@ Sets font hinting mode. Used by dynamic fonts only. ---- +.. _class_TextServerExtension_private_method__font_set_keep_rounding_remainders: + +.. rst-class:: classref-method + +|void| **_font_set_keep_rounding_remainders**\ (\ font_rid\: :ref:`RID`, keep_rounding_remainders\: :ref:`bool`\ ) |virtual| :ref:`๐Ÿ”—` + +**Optional.**\ + +Sets glyph position rounding behavior. If set to ``true``, when aligning glyphs to the pixel boundaries rounding remainders are accumulated to ensure more uniform glyph distribution. This setting has no effect if subpixel positioning is enabled. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServerExtension_private_method__font_set_kerning: .. rst-class:: classref-method @@ -2266,6 +2300,20 @@ Returns the name of the server interface. ---- +.. _class_TextServerExtension_private_method__get_support_data: + +.. rst-class:: classref-method + +:ref:`PackedByteArray` **_get_support_data**\ (\ ) |virtual| |const| :ref:`๐Ÿ”—` + +**Optional.**\ + +Returns default TextServer database (e.g. ICU break iterators and dictionaries). + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServerExtension_private_method__get_support_data_filename: .. rst-class:: classref-method diff --git a/classes/class_textserverfallback.rst b/classes/class_textserverfallback.rst index 59e3740cab2..2e87477eeb9 100644 --- a/classes/class_textserverfallback.rst +++ b/classes/class_textserverfallback.rst @@ -12,16 +12,16 @@ TextServerFallback **Inherits:** :ref:`TextServerExtension` **<** :ref:`TextServer` **<** :ref:`RefCounted` **<** :ref:`Object` -A fallback implementation of Godot's text server, without support for BiDi and complex text layout. +A fallback implementation of Redot'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. +A fallback implementation of Redot's text server. This fallback is faster than :ref:`TextServerAdvanced` for processing a lot of text, but it does not support BiDi and complex text layout. -\ **Note:** This text server is not part of official Godot binaries. If you want to use it, compile the engine with the option ``module_text_server_fb_enabled=yes``. +\ **Note:** This text server is not part of official Redot 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_texture2d.rst b/classes/class_texture2d.rst index cb387348d12..fa94f64f01f 100644 --- a/classes/class_texture2d.rst +++ b/classes/class_texture2d.rst @@ -240,7 +240,7 @@ Returns an :ref:`Image` that is a copy of data from this **Texture2 \ **Note:** This will return ``null`` if this **Texture2D** is invalid. -\ **Note:** This will fetch the texture data from the GPU, which might cause performance problems when overused. +\ **Note:** This will fetch the texture data from the GPU, which might cause performance problems when overused. Avoid calling :ref:`get_image` every frame, especially on large textures. .. rst-class:: classref-item-separator diff --git a/classes/class_texturebutton.rst b/classes/class_texturebutton.rst index fee3b606afe..c0048594b79 100644 --- a/classes/class_texturebutton.rst +++ b/classes/class_texturebutton.rst @@ -21,10 +21,10 @@ Description **TextureButton** has the same functionality as :ref:`Button`, except it uses sprites instead of Redot's :ref:`Theme` resource. It is faster to create, but it doesn't support localization like more complex :ref:`Control`\ s. -The "normal" state must contain a texture (:ref:`texture_normal`); other textures are optional. - See also :ref:`BaseButton` which contains common properties and methods associated with this node. +\ **Note:** Setting a texture for the "normal" state (:ref:`texture_normal`) is recommended. If :ref:`texture_normal` is not set, the **TextureButton** will still receive input events and be clickable, but the user will not be able to see it unless they activate another one of its states with a texture assigned (e.g., hover over it to show :ref:`texture_hover`). + .. rst-class:: classref-introduction-group Tutorials @@ -238,7 +238,7 @@ Pure black and white :ref:`BitMap` image to use for click detectio - |void| **set_texture_disabled**\ (\ value\: :ref:`Texture2D`\ ) - :ref:`Texture2D` **get_texture_disabled**\ (\ ) -Texture to display when the node is disabled. See :ref:`BaseButton.disabled`. +Texture to display when the node is disabled. See :ref:`BaseButton.disabled`. If not assigned, the **TextureButton** displays :ref:`texture_normal` instead. .. rst-class:: classref-item-separator @@ -255,7 +255,7 @@ Texture to display when the node is disabled. See :ref:`BaseButton.disabled`\ ) - :ref:`Texture2D` **get_texture_focused**\ (\ ) -Texture to display when the node has mouse or keyboard focus. :ref:`texture_focused` is displayed *over* the base texture, so a partially transparent texture should be used to ensure the base texture remains visible. A texture that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a fully transparent texture of any size. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons. +Texture to *overlay on the base texture* when the node has mouse or keyboard focus. Because :ref:`texture_focused` is displayed on top of the base texture, a partially transparent texture should be used to ensure the base texture remains visible. A texture that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a fully transparent texture of any size. 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 @@ -272,7 +272,7 @@ Texture to display when the node has mouse or keyboard focus. :ref:`texture_focu - |void| **set_texture_hover**\ (\ value\: :ref:`Texture2D`\ ) - :ref:`Texture2D` **get_texture_hover**\ (\ ) -Texture to display when the mouse hovers the node. +Texture to display when the mouse hovers over the node. If not assigned, the **TextureButton** displays :ref:`texture_normal` instead when hovered over. .. rst-class:: classref-item-separator @@ -306,7 +306,7 @@ Texture to display by default, when the node is **not** in the disabled, hover o - |void| **set_texture_pressed**\ (\ value\: :ref:`Texture2D`\ ) - :ref:`Texture2D` **get_texture_pressed**\ (\ ) -Texture to display on mouse down over the node, if the node has keyboard focus and the player presses the Enter key or if the player presses the :ref:`BaseButton.shortcut` key. +Texture to display on mouse down over the node, if the node has keyboard focus and the player presses the Enter key or if the player presses the :ref:`BaseButton.shortcut` key. If not assigned, the **TextureButton** displays :ref:`texture_hover` instead when pressed. .. |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_textureprogressbar.rst b/classes/class_textureprogressbar.rst index f579c7b2dc2..7f4d03c5337 100644 --- a/classes/class_textureprogressbar.rst +++ b/classes/class_textureprogressbar.rst @@ -226,6 +226,8 @@ If ``true``, Redot treats the bar's textures like in :ref:`NinePatchRect` if :ref:`fill_mode` is :ref:`FILL_CLOCKWISE`, :ref:`FILL_COUNTER_CLOCKWISE`, or :ref:`FILL_CLOCKWISE_AND_COUNTER_CLOCKWISE`. +\ **Note:** The effective radial center always stays within the :ref:`texture_progress` bounds. If you need to move it outside the texture's bounds, modify the :ref:`texture_progress` to contain additional empty space where needed. + .. rst-class:: classref-item-separator ---- @@ -262,6 +264,8 @@ See :ref:`Range.value`, :ref:`Range.max_value` if :ref:`fill_mode` is :ref:`FILL_CLOCKWISE`, :ref:`FILL_COUNTER_CLOCKWISE`, or :ref:`FILL_CLOCKWISE_AND_COUNTER_CLOCKWISE`. When the node's ``value`` is equal to its ``min_value``, the texture doesn't show up at all. When the ``value`` increases, the texture fills and tends towards :ref:`radial_fill_degrees`. +\ **Note:** :ref:`radial_initial_angle` is wrapped between ``0`` and ``360`` degrees (inclusive). + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_tilesetatlassource.rst b/classes/class_tilesetatlassource.rst index 76c29e6fb21..06918010153 100644 --- a/classes/class_tilesetatlassource.rst +++ b/classes/class_tilesetatlassource.rst @@ -282,7 +282,7 @@ The atlas texture. - |void| **set_texture_region_size**\ (\ value\: :ref:`Vector2i`\ ) - :ref:`Vector2i` **get_texture_region_size**\ (\ ) -The base tile size in the texture (in pixel). This size must be bigger than the TileSet's ``tile_size`` value. +The base tile size in the texture (in pixel). This size must be bigger than or equal to the TileSet's ``tile_size`` value. .. rst-class:: classref-item-separator diff --git a/classes/class_timer.rst b/classes/class_timer.rst index 75357b2ca20..75dee989cc7 100644 --- a/classes/class_timer.rst +++ b/classes/class_timer.rst @@ -49,19 +49,21 @@ Properties .. table:: :widths: auto - +--------------------------------------------------------------+----------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`autostart` | ``false`` | - +--------------------------------------------------------------+----------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`one_shot` | ``false`` | - +--------------------------------------------------------------+----------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`paused` | | - +--------------------------------------------------------------+----------------------------------------------------------------+-----------+ - | :ref:`TimerProcessCallback` | :ref:`process_callback` | ``1`` | - +--------------------------------------------------------------+----------------------------------------------------------------+-----------+ - | :ref:`float` | :ref:`time_left` | | - +--------------------------------------------------------------+----------------------------------------------------------------+-----------+ - | :ref:`float` | :ref:`wait_time` | ``1.0`` | - +--------------------------------------------------------------+----------------------------------------------------------------+-----------+ + +--------------------------------------------------------------+------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`autostart` | ``false`` | + +--------------------------------------------------------------+------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`ignore_time_scale` | ``false`` | + +--------------------------------------------------------------+------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`one_shot` | ``false`` | + +--------------------------------------------------------------+------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`paused` | | + +--------------------------------------------------------------+------------------------------------------------------------------+-----------+ + | :ref:`TimerProcessCallback` | :ref:`process_callback` | ``1`` | + +--------------------------------------------------------------+------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`time_left` | | + +--------------------------------------------------------------+------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`wait_time` | ``1.0`` | + +--------------------------------------------------------------+------------------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group @@ -157,6 +159,23 @@ If ``true``, the timer will start immediately when it enters the scene tree. ---- +.. _class_Timer_property_ignore_time_scale: + +.. rst-class:: classref-property + +:ref:`bool` **ignore_time_scale** = ``false`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_ignore_time_scale**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_ignore_time_scale**\ (\ ) + +If ``true``, the timer will ignore :ref:`Engine.time_scale` and update with the real, elapsed time. + +.. rst-class:: classref-item-separator + +---- + .. _class_Timer_property_one_shot: .. rst-class:: classref-property diff --git a/classes/class_transform2d.rst b/classes/class_transform2d.rst index b4fda5dba10..b34f67809fb 100644 --- a/classes/class_transform2d.rst +++ b/classes/class_transform2d.rst @@ -177,7 +177,7 @@ Constants **IDENTITY** = ``Transform2D(1, 0, 0, 1, 0, 0)`` :ref:`๐Ÿ”—` -The identity **Transform2D**. A transform with no translation, no rotation, and its scale being ``1``. When multiplied by another :ref:`Variant` such as :ref:`Rect2` or another **Transform2D**, no transformation occurs. This means that: +The identity **Transform2D**. This is a transform with no translation, no rotation, and a scale of :ref:`Vector2.ONE`. This also means that: - The :ref:`x` points right (:ref:`Vector2.RIGHT`); @@ -187,14 +187,16 @@ The identity **Transform2D**. A transform with no translation, no rotation, and var transform = Transform2D.IDENTITY print("| X | Y | Origin") - print("| %s | %s | %s" % [transform.x.x, transform.y.x, transform.origin.x]) - print("| %s | %s | %s" % [transform.x.y, transform.y.y, transform.origin.y]) + print("| %.f | %.f | %.f" % [transform.x.x, transform.y.x, transform.origin.x]) + print("| %.f | %.f | %.f" % [transform.x.y, transform.y.y, transform.origin.y]) # Prints: # | X | Y | Origin # | 1 | 0 | 0 # | 0 | 1 | 0 -This is identical to creating :ref:`Transform2D` without any parameters. This constant can be used to make your code clearer, and for consistency with C#. +If a :ref:`Vector2`, a :ref:`Rect2`, a :ref:`PackedVector2Array`, or another **Transform2D** is transformed (multiplied) by this constant, no transformation occurs. + +\ **Note:** In GDScript, this constant is equivalent to creating a :ref:`Transform2D` without any arguments. It can be used to make your code clearer, and for consistency with C#. .. _class_Transform2D_constant_FLIP_X: @@ -204,7 +206,7 @@ This is identical to creating :ref:`Transform2D`, it negates all components of the :ref:`x` axis (the X column). -When :ref:`FLIP_X` is multiplied by any basis, it negates the :ref:`Vector2.x` component of all axes (the X row). +When :ref:`FLIP_X` is multiplied by any transform, it negates the :ref:`Vector2.x` component of all axes (the X row). .. _class_Transform2D_constant_FLIP_Y: @@ -214,7 +216,7 @@ When :ref:`FLIP_X` is multiplied by any basis When any transform is multiplied by :ref:`FLIP_Y`, it negates all components of the :ref:`y` axis (the Y column). -When :ref:`FLIP_Y` is multiplied by any basis, it negates the :ref:`Vector2.y` component of all axes (the Y row). +When :ref:`FLIP_Y` is multiplied by any transform, it negates the :ref:`Vector2.y` component of all axes (the Y row). .. rst-class:: classref-section-separator @@ -335,9 +337,9 @@ Method Descriptions :ref:`Transform2D` **affine_inverse**\ (\ ) |const| :ref:`๐Ÿ”—` -Returns the inverted version of this transform. Unlike :ref:`inverse`, this method works with almost any basis, including non-uniform ones, but is slower. See also :ref:`inverse`. +Returns the inverted version of this transform. Unlike :ref:`inverse`, this method works with almost any basis, including non-uniform ones, but is slower. -\ **Note:** For this method to return correctly, the transform's basis needs to have a determinant that is not exactly ``0`` (see :ref:`determinant`). +\ **Note:** For this method to return correctly, the transform's basis needs to have a determinant that is not exactly ``0.0`` (see :ref:`determinant`). .. rst-class:: classref-item-separator @@ -377,7 +379,7 @@ Returns a copy of the ``v`` vector, transformed (multiplied) by the inverse tran Returns the `determinant `__ of this transform basis's matrix. For advanced math, this number can be used to determine a few attributes: -- If the determinant is exactly ``0``, the basis is not invertible (see :ref:`inverse`). +- If the determinant is exactly ``0.0``, the basis is not invertible (see :ref:`inverse`). - If the determinant is a negative number, the basis represents a negative scale. @@ -432,7 +434,7 @@ Returns the length of both :ref:`x` and :ref:`y` and :ref:`y`__. -\ **Note:** For this method to return correctly, the transform's basis needs to be *orthonormal* (see :ref:`orthonormalized`). That means, the basis should only represent a rotation. If it does not, use :ref:`affine_inverse` instead. +\ **Note:** For this method to return correctly, the transform's basis needs to be *orthonormal* (see :ref:`orthonormalized`). That means the basis should only represent a rotation. If it does not, use :ref:`affine_inverse` instead. .. rst-class:: classref-item-separator @@ -548,7 +550,7 @@ Returns a copy of the transform rotated such that the rotated X-axis points towa :ref:`Transform2D` **orthonormalized**\ (\ ) |const| :ref:`๐Ÿ”—` -Returns a copy of this transform with its basis orthonormalized. An orthonormal basis is both *orthogonal* (the axes are perpendicular to each other) and *normalized* (the axes have a length of ``1``), which also means it can only represent rotation. +Returns a copy of this transform with its basis orthonormalized. An orthonormal basis is both *orthogonal* (the axes are perpendicular to each other) and *normalized* (the axes have a length of ``1.0``), which also means it can only represent a rotation. .. rst-class:: classref-item-separator @@ -560,7 +562,9 @@ Returns a copy of this transform with its basis orthonormalized. An orthonormal :ref:`Transform2D` **rotated**\ (\ angle\: :ref:`float`\ ) |const| :ref:`๐Ÿ”—` -Returns a copy of the transform rotated by the given ``angle`` (in radians). +Returns a copy of this transform rotated by the given ``angle`` (in radians). + +If ``angle`` is positive, the transform is rotated clockwise. 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``. diff --git a/classes/class_transform3d.rst b/classes/class_transform3d.rst index f1a2a549414..529d22cbd35 100644 --- a/classes/class_transform3d.rst +++ b/classes/class_transform3d.rst @@ -161,9 +161,31 @@ Constants **IDENTITY** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` :ref:`๐Ÿ”—` -A transform with no translation, no rotation, and its scale being ``1``. Its :ref:`basis` is equal to :ref:`Basis.IDENTITY`. +The identity **Transform3D**. This is a transform with no translation, no rotation, and a scale of :ref:`Vector3.ONE`. Its :ref:`basis` is equal to :ref:`Basis.IDENTITY`. This also means that: -When multiplied by another :ref:`Variant` such as :ref:`AABB` or another **Transform3D**, no transformation occurs. +- Its :ref:`Basis.x` points right (:ref:`Vector3.RIGHT`); + +- Its :ref:`Basis.y` points up (:ref:`Vector3.UP`); + +- Its :ref:`Basis.z` points back (:ref:`Vector3.BACK`). + +:: + + var transform = Transform3D.IDENTITY + var basis = transform.basis + print("| X | Y | Z | Origin") + print("| %.f | %.f | %.f | %.f" % [basis.x.x, basis.y.x, basis.z.x, transform.origin.x]) + print("| %.f | %.f | %.f | %.f" % [basis.x.y, basis.y.y, basis.z.y, transform.origin.y]) + print("| %.f | %.f | %.f | %.f" % [basis.x.z, basis.y.z, basis.z.z, transform.origin.z]) + # Prints: + # | X | Y | Z | Origin + # | 1 | 0 | 0 | 0 + # | 0 | 1 | 0 | 0 + # | 0 | 0 | 1 | 0 + +If a :ref:`Vector3`, an :ref:`AABB`, a :ref:`Plane`, a :ref:`PackedVector3Array`, or another **Transform3D** is transformed (multiplied) by this constant, no transformation occurs. + +\ **Note:** In GDScript, this constant is equivalent to creating a :ref:`Transform3D` without any arguments. It can be used to make your code clearer, and for consistency with C#. .. _class_Transform3D_constant_FLIP_X: @@ -233,7 +255,7 @@ Constructor Descriptions :ref:`Transform3D` **Transform3D**\ (\ ) :ref:`๐Ÿ”—` -Constructs a **Transform3D** identical to the :ref:`IDENTITY`. +Constructs a **Transform3D** identical to :ref:`IDENTITY`. \ **Note:** In C#, this constructs a **Transform3D** with its :ref:`origin` and the components of its :ref:`basis` set to :ref:`Vector3.ZERO`. @@ -296,7 +318,7 @@ Method Descriptions Returns the inverted version of this transform. Unlike :ref:`inverse`, this method works with almost any :ref:`basis`, including non-uniform ones, but is slower. See also :ref:`Basis.inverse`. -\ **Note:** For this method to return correctly, the transform's :ref:`basis` needs to have a determinant that is not exactly ``0`` (see :ref:`Basis.determinant`). +\ **Note:** For this method to return correctly, the transform's :ref:`basis` needs to have a determinant that is not exactly ``0.0`` (see :ref:`Basis.determinant`). .. rst-class:: classref-item-separator @@ -322,9 +344,9 @@ The ``weight`` should be between ``0.0`` and ``1.0`` (inclusive). Values outside :ref:`Transform3D` **inverse**\ (\ ) |const| :ref:`๐Ÿ”—` -Returns the inverted version of this transform. See also :ref:`Basis.inverse`. +Returns the `inverted version of this transform `__. See also :ref:`Basis.inverse`. -\ **Note:** For this method to return correctly, the transform's :ref:`basis` needs to be *orthonormal* (see :ref:`Basis.orthonormalized`). That means, the basis should only represent a rotation. If it does not, use :ref:`affine_inverse` instead. +\ **Note:** For this method to return correctly, the transform's :ref:`basis` needs to be *orthonormal* (see :ref:`orthonormalized`). That means the basis should only represent a rotation. If it does not, use :ref:`affine_inverse` instead. .. rst-class:: classref-item-separator @@ -376,7 +398,7 @@ If ``use_model_front`` is ``true``, the +Z axis (asset front) is treated as forw :ref:`Transform3D` **orthonormalized**\ (\ ) |const| :ref:`๐Ÿ”—` -Returns a copy of this transform with its :ref:`basis` orthonormalized. An orthonormal basis is both *orthogonal* (the axes are perpendicular to each other) and *normalized* (the axes have a length of ``1``), which also means it can only represent rotation. See also :ref:`Basis.orthonormalized`. +Returns a copy of this transform with its :ref:`basis` orthonormalized. An orthonormal basis is both *orthogonal* (the axes are perpendicular to each other) and *normalized* (the axes have a length of ``1.0``), which also means it can only represent a rotation. See also :ref:`Basis.orthonormalized`. .. rst-class:: classref-item-separator @@ -390,7 +412,7 @@ Returns a copy of this transform with its :ref:`basis`). If ``angle`` is positive, the basis is rotated counter-clockwise around the axis. 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``. diff --git a/classes/class_translationserver.rst b/classes/class_translationserver.rst index b840f0cb569..ef10c37ba27 100644 --- a/classes/class_translationserver.rst +++ b/classes/class_translationserver.rst @@ -95,7 +95,7 @@ Methods +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_locale`\ (\ locale\: :ref:`String`\ ) | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`standardize_locale`\ (\ locale\: :ref:`String`\ ) |const| | + | :ref:`String` | :ref:`standardize_locale`\ (\ locale\: :ref:`String`, add_defaults\: :ref:`bool` = false\ ) |const| | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`StringName` | :ref:`translate`\ (\ message\: :ref:`StringName`, context\: :ref:`StringName` = &""\ ) |const| | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -399,9 +399,9 @@ If translations have been loaded beforehand for the new locale, they will be app .. rst-class:: classref-method -:ref:`String` **standardize_locale**\ (\ locale\: :ref:`String`\ ) |const| :ref:`๐Ÿ”—` +:ref:`String` **standardize_locale**\ (\ locale\: :ref:`String`, add_defaults\: :ref:`bool` = false\ ) |const| :ref:`๐Ÿ”—` -Returns a ``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``). If ``add_defaults`` is ``true``, the locale may have a default script or country added. .. rst-class:: classref-item-separator diff --git a/classes/class_tree.rst b/classes/class_tree.rst index 60d0a39b76b..7b1ea5bcb48 100644 --- a/classes/class_tree.rst +++ b/classes/class_tree.rst @@ -71,6 +71,8 @@ Properties +------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`allow_search` | ``true`` | +------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`auto_tooltip` | ``true`` | + +------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | clip_contents | ``true`` (overrides :ref:`Control`) | +------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`column_titles_visible` | ``false`` | @@ -654,6 +656,23 @@ If ``true``, allows navigating the **Tree** with letter keys through incremental ---- +.. _class_Tree_property_auto_tooltip: + +.. rst-class:: classref-property + +:ref:`bool` **auto_tooltip** = ``true`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_auto_tooltip**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_auto_tooltip_enabled**\ (\ ) + +If ``true``, tree items with no tooltip assigned display their text as their tooltip. See also :ref:`TreeItem.get_tooltip_text` and :ref:`TreeItem.get_button_tooltip_text`. + +.. rst-class:: classref-item-separator + +---- + .. _class_Tree_property_column_titles_visible: .. rst-class:: classref-property diff --git a/classes/class_treeitem.rst b/classes/class_treeitem.rst index 64392570eb1..6d897db379a 100644 --- a/classes/class_treeitem.rst +++ b/classes/class_treeitem.rst @@ -58,6 +58,8 @@ Methods +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`call_recursive`\ (\ method\: :ref:`StringName`, ...\ ) |vararg| | +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_buttons`\ (\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`clear_custom_bg_color`\ (\ column\: :ref:`int`\ ) | +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`clear_custom_color`\ (\ column\: :ref:`int`\ ) | @@ -446,6 +448,18 @@ Calls the ``method`` on the actual TreeItem and its children recursively. Pass p ---- +.. _class_TreeItem_method_clear_buttons: + +.. rst-class:: classref-method + +|void| **clear_buttons**\ (\ ) :ref:`๐Ÿ”—` + +Removes all buttons from all columns of this item. + +.. rst-class:: classref-item-separator + +---- + .. _class_TreeItem_method_clear_custom_bg_color: .. rst-class:: classref-method diff --git a/classes/class_tubetrailmesh.rst b/classes/class_tubetrailmesh.rst index 01d00786a77..fd0d79468e9 100644 --- a/classes/class_tubetrailmesh.rst +++ b/classes/class_tubetrailmesh.rst @@ -112,7 +112,7 @@ If ``true``, generates a cap at the top of the tube. This can be set to ``false` - |void| **set_curve**\ (\ value\: :ref:`Curve`\ ) - :ref:`Curve` **get_curve**\ (\ ) -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. +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. Should be a unit :ref:`Curve`. .. rst-class:: classref-item-separator diff --git a/classes/class_tween.rst b/classes/class_tween.rst index 459671e8fe6..3a37e5803fa 100644 --- a/classes/class_tween.rst +++ b/classes/class_tween.rst @@ -141,7 +141,7 @@ Some :ref:`Tweener`\ s use transitions and eases. The first accep \ `Tween easing and transition types cheatsheet `__\ -\ **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:** Tweens are not designed to be reused and trying to do so results in an undefined behavior. Create a new Tween for each animation and every time you replay an animation from start. Keep in mind that Tweens start immediately, so only create a Tween when you want to start animating. \ **Note:** The tween is processed after all of the nodes in the current frame, i.e. node's :ref:`Node._process` method would be called before the tween (or :ref:`Node._physics_process` depending on the value passed to :ref:`set_process_mode`). diff --git a/classes/class_udpserver.rst b/classes/class_udpserver.rst index 88d50d49db9..1d453368f32 100644 --- a/classes/class_udpserver.rst +++ b/classes/class_udpserver.rst @@ -34,7 +34,7 @@ Below a small example of how it can be used: class_name ServerNode extends Node - var server := UDPServer.new() + var server = UDPServer.new() var peers = [] func _ready(): @@ -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 = 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()]) @@ -103,7 +103,7 @@ Below a small example of how it can be used: class_name ClientNode extends Node - var udp := PacketPeerUDP.new() + var udp = PacketPeerUDP.new() var connected = false func _ready(): diff --git a/classes/class_upnp.rst b/classes/class_upnp.rst index 21e832ff42e..5afe462349d 100644 --- a/classes/class_upnp.rst +++ b/classes/class_upnp.rst @@ -83,7 +83,7 @@ To close a specific port (e.g. after you have finished using it): - Consider what happens on mapping conflicts. Maybe multiple users on the same network would like to play your game at the same time, or maybe another application uses the same port. Make the port configurable, and optimally choose a port automatically (re-trying with a different port on failure). -\ **Further reading:** If you want to know more about UPnP (and the Internet Gateway Device (IGD) and Port Control Protocol (PCP) specifically), `Wikipedia `__ is a good first stop, the specification can be found at the `Open Connectivity Foundation `__ and Godot's implementation is based on the `MiniUPnP client `__. +\ **Further reading:** If you want to know more about UPnP (and the Internet Gateway Device (IGD) and Port Control Protocol (PCP) specifically), `Wikipedia `__ is a good first stop, the specification can be found at the `Open Connectivity Foundation `__ and Redot's implementation is based on the `MiniUPnP client `__. .. rst-class:: classref-reftable-group diff --git a/classes/class_vector2.rst b/classes/class_vector2.rst index b61c513055c..e01d2ddaec9 100644 --- a/classes/class_vector2.rst +++ b/classes/class_vector2.rst @@ -232,25 +232,40 @@ Operators .. rst-class:: classref-descriptions-group -Constants ---------- +Enumerations +------------ + +.. _enum_Vector2_Axis: + +.. rst-class:: classref-enumeration + +enum **Axis**: :ref:`๐Ÿ”—` .. _class_Vector2_constant_AXIS_X: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**AXIS_X** = ``0`` :ref:`๐Ÿ”—` +:ref:`Axis` **AXIS_X** = ``0`` Enumerated value for the X axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. .. _class_Vector2_constant_AXIS_Y: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**AXIS_Y** = ``1`` :ref:`๐Ÿ”—` +:ref:`Axis` **AXIS_Y** = ``1`` Enumerated value for the Y axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Constants +--------- + .. _class_Vector2_constant_ZERO: .. rst-class:: classref-constant @@ -658,9 +673,9 @@ Creates a unit **Vector2** rotated to the given ``angle`` in radians. This is eq :: - print(Vector2.from_angle(0)) # Prints (1, 0). - print(Vector2(1, 0).angle()) # Prints 0, which is the angle used above. - print(Vector2.from_angle(PI / 2)) # Prints (0, 1). + print(Vector2.from_angle(0)) # Prints (1.0, 0.0). + print(Vector2(1, 0).angle()) # Prints 0.0, which is the angle used above. + print(Vector2.from_angle(PI / 2)) # Prints (0.0, 1.0). .. rst-class:: classref-item-separator @@ -760,7 +775,7 @@ Returns the result of the linear interpolation between this vector and ``to`` by :ref:`Vector2` **limit_length**\ (\ length\: :ref:`float` = 1.0\ ) |const| :ref:`๐Ÿ”—` -Returns the vector with a maximum length by limiting its length to ``length``. +Returns the vector with a maximum length by limiting its length to ``length``. If the vector is non-finite, the result is undefined. .. rst-class:: classref-item-separator @@ -1063,7 +1078,7 @@ Multiplies each component of the **Vector2** by the components of the given **Ve :: - print(Vector2(10, 20) * Vector2(3, 4)) # Prints "(30, 80)" + print(Vector2(10, 20) * Vector2(3, 4)) # Prints (30.0, 80.0) .. rst-class:: classref-item-separator @@ -1103,7 +1118,7 @@ Adds each component of the **Vector2** by the components of the given **Vector2* :: - print(Vector2(10, 20) + Vector2(3, 4)) # Prints "(13, 24)" + print(Vector2(10, 20) + Vector2(3, 4)) # Prints (13.0, 24.0) .. rst-class:: classref-item-separator @@ -1119,7 +1134,7 @@ Subtracts each component of the **Vector2** by the components of the given **Vec :: - print(Vector2(10, 20) - Vector2(3, 4)) # Prints "(7, 16)" + print(Vector2(10, 20) - Vector2(3, 4)) # Prints (7.0, 16.0) .. rst-class:: classref-item-separator @@ -1135,7 +1150,7 @@ Divides each component of the **Vector2** by the components of the given **Vecto :: - print(Vector2(10, 20) / Vector2(2, 5)) # Prints "(5, 4)" + print(Vector2(10, 20) / Vector2(2, 5)) # Prints (5.0, 4.0) .. rst-class:: classref-item-separator diff --git a/classes/class_vector2i.rst b/classes/class_vector2i.rst index bb119138b90..f7b66904cfa 100644 --- a/classes/class_vector2i.rst +++ b/classes/class_vector2i.rst @@ -164,25 +164,40 @@ Operators .. rst-class:: classref-descriptions-group -Constants ---------- +Enumerations +------------ + +.. _enum_Vector2i_Axis: + +.. rst-class:: classref-enumeration + +enum **Axis**: :ref:`๐Ÿ”—` .. _class_Vector2i_constant_AXIS_X: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**AXIS_X** = ``0`` :ref:`๐Ÿ”—` +:ref:`Axis` **AXIS_X** = ``0`` Enumerated value for the X axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. .. _class_Vector2i_constant_AXIS_Y: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**AXIS_Y** = ``1`` :ref:`๐Ÿ”—` +:ref:`Axis` **AXIS_Y** = ``1`` Enumerated value for the Y axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Constants +--------- + .. _class_Vector2i_constant_ZERO: .. rst-class:: classref-constant @@ -567,7 +582,7 @@ Gets the remainder of each component of the **Vector2i** with the components of :: - print(Vector2i(10, -20) % Vector2i(7, 8)) # Prints "(3, -4)" + print(Vector2i(10, -20) % Vector2i(7, 8)) # Prints (3, -4) .. rst-class:: classref-item-separator @@ -583,7 +598,7 @@ Gets the remainder of each component of the **Vector2i** with the given :ref:`in :: - print(Vector2i(10, -20) % 7) # Prints "(3, -6)" + print(Vector2i(10, -20) % 7) # Prints (3, -6) .. rst-class:: classref-item-separator @@ -599,7 +614,7 @@ Multiplies each component of the **Vector2i** by the components of the given **V :: - print(Vector2i(10, 20) * Vector2i(3, 4)) # Prints "(30, 80)" + print(Vector2i(10, 20) * Vector2i(3, 4)) # Prints (30, 80) .. rst-class:: classref-item-separator @@ -615,7 +630,7 @@ Multiplies each component of the **Vector2i** by the given :ref:`float :: - print(Vector2i(10, 20) / 2.9) # Prints "(5, 10)" + print(Vector2i(10, 20) / 2.9) # Prints (5.0, 10.0) .. rst-class:: classref-item-separator diff --git a/classes/class_vector3.rst b/classes/class_vector3.rst index a1cec74c5e5..5440bb91e90 100644 --- a/classes/class_vector3.rst +++ b/classes/class_vector3.rst @@ -238,33 +238,48 @@ Operators .. rst-class:: classref-descriptions-group -Constants ---------- +Enumerations +------------ + +.. _enum_Vector3_Axis: + +.. rst-class:: classref-enumeration + +enum **Axis**: :ref:`๐Ÿ”—` .. _class_Vector3_constant_AXIS_X: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**AXIS_X** = ``0`` :ref:`๐Ÿ”—` +:ref:`Axis` **AXIS_X** = ``0`` Enumerated value for the X axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. .. _class_Vector3_constant_AXIS_Y: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**AXIS_Y** = ``1`` :ref:`๐Ÿ”—` +:ref:`Axis` **AXIS_Y** = ``1`` Enumerated value for the Y axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. .. _class_Vector3_constant_AXIS_Z: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**AXIS_Z** = ``2`` :ref:`๐Ÿ”—` +:ref:`Axis` **AXIS_Z** = ``2`` Enumerated value for the Z axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Constants +--------- + .. _class_Vector3_constant_ZERO: .. rst-class:: classref-constant @@ -794,7 +809,7 @@ Returns the result of the linear interpolation between this vector and ``to`` by :ref:`Vector3` **limit_length**\ (\ length\: :ref:`float` = 1.0\ ) |const| :ref:`๐Ÿ”—` -Returns the vector with a maximum length by limiting its length to ``length``. +Returns the vector with a maximum length by limiting its length to ``length``. If the vector is non-finite, the result is undefined. .. rst-class:: classref-item-separator @@ -1167,7 +1182,7 @@ Multiplies each component of the **Vector3** by the components of the given **Ve :: - print(Vector3(10, 20, 30) * Vector3(3, 4, 5)) # Prints "(30, 80, 150)" + print(Vector3(10, 20, 30) * Vector3(3, 4, 5)) # Prints (30.0, 80.0, 150.0) .. rst-class:: classref-item-separator @@ -1207,7 +1222,7 @@ Adds each component of the **Vector3** by the components of the given **Vector3* :: - print(Vector3(10, 20, 30) + Vector3(3, 4, 5)) # Prints "(13, 24, 35)" + print(Vector3(10, 20, 30) + Vector3(3, 4, 5)) # Prints (13.0, 24.0, 35.0) .. rst-class:: classref-item-separator @@ -1223,7 +1238,7 @@ Subtracts each component of the **Vector3** by the components of the given **Vec :: - print(Vector3(10, 20, 30) - Vector3(3, 4, 5)) # Prints "(7, 16, 25)" + print(Vector3(10, 20, 30) - Vector3(3, 4, 5)) # Prints (7.0, 16.0, 25.0) .. rst-class:: classref-item-separator @@ -1239,7 +1254,7 @@ Divides each component of the **Vector3** by the components of the given **Vecto :: - print(Vector3(10, 20, 30) / Vector3(2, 5, 3)) # Prints "(5, 4, 10)" + print(Vector3(10, 20, 30) / Vector3(2, 5, 3)) # Prints (5.0, 4.0, 10.0) .. rst-class:: classref-item-separator diff --git a/classes/class_vector3i.rst b/classes/class_vector3i.rst index 83e2057a73b..e1bcb6c7863 100644 --- a/classes/class_vector3i.rst +++ b/classes/class_vector3i.rst @@ -164,33 +164,48 @@ Operators .. rst-class:: classref-descriptions-group -Constants ---------- +Enumerations +------------ + +.. _enum_Vector3i_Axis: + +.. rst-class:: classref-enumeration + +enum **Axis**: :ref:`๐Ÿ”—` .. _class_Vector3i_constant_AXIS_X: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**AXIS_X** = ``0`` :ref:`๐Ÿ”—` +:ref:`Axis` **AXIS_X** = ``0`` Enumerated value for the X axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. .. _class_Vector3i_constant_AXIS_Y: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**AXIS_Y** = ``1`` :ref:`๐Ÿ”—` +:ref:`Axis` **AXIS_Y** = ``1`` Enumerated value for the Y axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. .. _class_Vector3i_constant_AXIS_Z: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**AXIS_Z** = ``2`` :ref:`๐Ÿ”—` +:ref:`Axis` **AXIS_Z** = ``2`` Enumerated value for the Z axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Constants +--------- + .. _class_Vector3i_constant_ZERO: .. rst-class:: classref-constant @@ -591,7 +606,7 @@ Gets the remainder of each component of the **Vector3i** with the components of :: - print(Vector3i(10, -20, 30) % Vector3i(7, 8, 9)) # Prints "(3, -4, 3)" + print(Vector3i(10, -20, 30) % Vector3i(7, 8, 9)) # Prints (3, -4, 3) .. rst-class:: classref-item-separator @@ -607,7 +622,7 @@ Gets the remainder of each component of the **Vector3i** with the given :ref:`in :: - print(Vector3i(10, -20, 30) % 7) # Prints "(3, -6, 2)" + print(Vector3i(10, -20, 30) % 7) # Prints (3, -6, 2) .. rst-class:: classref-item-separator @@ -623,7 +638,7 @@ Multiplies each component of the **Vector3i** by the components of the given **V :: - print(Vector3i(10, 20, 30) * Vector3i(3, 4, 5)) # Prints "(30, 80, 150)" + print(Vector3i(10, 20, 30) * Vector3i(3, 4, 5)) # Prints (30, 80, 150) .. rst-class:: classref-item-separator @@ -639,7 +654,7 @@ Multiplies each component of the **Vector3i** by the given :ref:`float :: - print(Vector3i(10, 20, 30) / 2.9) # Prints "(5, 10, 15)" + print(Vector3i(10, 20, 30) / 2.9) # Prints (5.0, 10.0, 15.0) .. rst-class:: classref-item-separator diff --git a/classes/class_vector4.rst b/classes/class_vector4.rst index 01645507663..f338be65e4f 100644 --- a/classes/class_vector4.rst +++ b/classes/class_vector4.rst @@ -187,41 +187,56 @@ Operators .. rst-class:: classref-descriptions-group -Constants ---------- +Enumerations +------------ + +.. _enum_Vector4_Axis: + +.. rst-class:: classref-enumeration + +enum **Axis**: :ref:`๐Ÿ”—` .. _class_Vector4_constant_AXIS_X: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**AXIS_X** = ``0`` :ref:`๐Ÿ”—` +:ref:`Axis` **AXIS_X** = ``0`` Enumerated value for the X axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. .. _class_Vector4_constant_AXIS_Y: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**AXIS_Y** = ``1`` :ref:`๐Ÿ”—` +:ref:`Axis` **AXIS_Y** = ``1`` Enumerated value for the Y axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. .. _class_Vector4_constant_AXIS_Z: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**AXIS_Z** = ``2`` :ref:`๐Ÿ”—` +:ref:`Axis` **AXIS_Z** = ``2`` Enumerated value for the Z axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. .. _class_Vector4_constant_AXIS_W: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**AXIS_W** = ``3`` :ref:`๐Ÿ”—` +:ref:`Axis` **AXIS_W** = ``3`` Enumerated value for the W axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Constants +--------- + .. _class_Vector4_constant_ZERO: .. rst-class:: classref-constant @@ -794,7 +809,7 @@ Multiplies each component of the **Vector4** by the components of the given **Ve :: - print(Vector4(10, 20, 30, 40) * Vector4(3, 4, 5, 6)) # Prints "(30, 80, 150, 240)" + print(Vector4(10, 20, 30, 40) * Vector4(3, 4, 5, 6)) # Prints (30.0, 80.0, 150.0, 240.0) .. rst-class:: classref-item-separator @@ -810,7 +825,7 @@ Multiplies each component of the **Vector4** by the given :ref:`float` :: - print(Vector4(10, 20, 30, 40) / 2 # Prints "(5, 10, 15, 20)" + print(Vector4(10, 20, 30, 40) / 2 # Prints (5.0, 10.0, 15.0, 20.0) .. rst-class:: classref-item-separator diff --git a/classes/class_vector4i.rst b/classes/class_vector4i.rst index 38ffecd6fdd..36872b4657c 100644 --- a/classes/class_vector4i.rst +++ b/classes/class_vector4i.rst @@ -155,41 +155,56 @@ Operators .. rst-class:: classref-descriptions-group -Constants ---------- +Enumerations +------------ + +.. _enum_Vector4i_Axis: + +.. rst-class:: classref-enumeration + +enum **Axis**: :ref:`๐Ÿ”—` .. _class_Vector4i_constant_AXIS_X: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**AXIS_X** = ``0`` :ref:`๐Ÿ”—` +:ref:`Axis` **AXIS_X** = ``0`` Enumerated value for the X axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. .. _class_Vector4i_constant_AXIS_Y: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**AXIS_Y** = ``1`` :ref:`๐Ÿ”—` +:ref:`Axis` **AXIS_Y** = ``1`` Enumerated value for the Y axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. .. _class_Vector4i_constant_AXIS_Z: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**AXIS_Z** = ``2`` :ref:`๐Ÿ”—` +:ref:`Axis` **AXIS_Z** = ``2`` Enumerated value for the Z axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. .. _class_Vector4i_constant_AXIS_W: -.. rst-class:: classref-constant +.. rst-class:: classref-enumeration-constant -**AXIS_W** = ``3`` :ref:`๐Ÿ”—` +:ref:`Axis` **AXIS_W** = ``3`` Enumerated value for the W axis. Returned by :ref:`max_axis_index` and :ref:`min_axis_index`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Constants +--------- + .. _class_Vector4i_constant_ZERO: .. rst-class:: classref-constant @@ -554,7 +569,7 @@ Gets the remainder of each component of the **Vector4i** with the components of :: - print(Vector4i(10, -20, 30, -40) % Vector4i(7, 8, 9, 10)) # Prints "(3, -4, 3, 0)" + print(Vector4i(10, -20, 30, -40) % Vector4i(7, 8, 9, 10)) # Prints (3, -4, 3, 0) .. rst-class:: classref-item-separator @@ -570,7 +585,7 @@ Gets the remainder of each component of the **Vector4i** with the given :ref:`in :: - print(Vector4i(10, -20, 30, -40) % 7) # Prints "(3, -6, 2, -5)" + print(Vector4i(10, -20, 30, -40) % 7) # Prints (3, -6, 2, -5) .. rst-class:: classref-item-separator @@ -586,7 +601,7 @@ Multiplies each component of the **Vector4i** by the components of the given **V :: - print(Vector4i(10, 20, 30, 40) * Vector4i(3, 4, 5, 6)) # Prints "(30, 80, 150, 240)" + print(Vector4i(10, 20, 30, 40) * Vector4i(3, 4, 5, 6)) # Prints (30, 80, 150, 240) .. rst-class:: classref-item-separator @@ -604,7 +619,7 @@ Returns a Vector4 value due to floating-point operations. :: - print(Vector4i(10, 20, 30, 40) * 2) # Prints "(20, 40, 60, 80)" + print(Vector4i(10, 20, 30, 40) * 2) # Prints (20.0, 40.0, 60.0, 80.0) .. rst-class:: classref-item-separator @@ -632,7 +647,7 @@ Adds each component of the **Vector4i** by the components of the given **Vector4 :: - print(Vector4i(10, 20, 30, 40) + Vector4i(3, 4, 5, 6)) # Prints "(13, 24, 35, 46)" + print(Vector4i(10, 20, 30, 40) + Vector4i(3, 4, 5, 6)) # Prints (13, 24, 35, 46) .. rst-class:: classref-item-separator @@ -648,7 +663,7 @@ Subtracts each component of the **Vector4i** by the components of the given **Ve :: - print(Vector4i(10, 20, 30, 40) - Vector4i(3, 4, 5, 6)) # Prints "(7, 16, 25, 34)" + print(Vector4i(10, 20, 30, 40) - Vector4i(3, 4, 5, 6)) # Prints (7, 16, 25, 34) .. rst-class:: classref-item-separator @@ -664,7 +679,7 @@ Divides each component of the **Vector4i** by the components of the given **Vect :: - print(Vector4i(10, 20, 30, 40) / Vector4i(2, 5, 3, 4)) # Prints "(5, 4, 10, 10)" + print(Vector4i(10, 20, 30, 40) / Vector4i(2, 5, 3, 4)) # Prints (5, 4, 10, 10) .. rst-class:: classref-item-separator @@ -682,7 +697,7 @@ Returns a Vector4 value due to floating-point operations. :: - print(Vector4i(10, 20, 30, 40) / 2 # Prints "(5, 10, 15, 20)" + print(Vector4i(10, 20, 30, 40) / 2 # Prints (5.0, 10.0, 15.0, 20.0) .. rst-class:: classref-item-separator diff --git a/classes/class_videostreamtheora.rst b/classes/class_videostreamtheora.rst index 966812f6e57..ef71982bd13 100644 --- a/classes/class_videostreamtheora.rst +++ b/classes/class_videostreamtheora.rst @@ -21,7 +21,7 @@ Description :ref:`VideoStream` resource handling the `Ogg Theora `__ video format with ``.ogv`` extension. The Theora codec is decoded on the CPU. -\ **Note:** While Ogg Theora videos can also have an ``.ogg`` extension, you will have to rename the extension to ``.ogv`` to use those videos within Godot. +\ **Note:** While Ogg Theora videos can also have an ``.ogg`` extension, you will have to rename the extension to ``.ogv`` to use those videos within Redot. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_viewport.rst b/classes/class_viewport.rst index b3449ad9520..ab7fde0ede6 100644 --- a/classes/class_viewport.rst +++ b/classes/class_viewport.rst @@ -60,6 +60,8 @@ Properties .. table:: :widths: auto + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`AnisotropicFiltering` | :ref:`anisotropic_filtering_level` | ``2`` | +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`audio_listener_enable_2d` | ``false`` | +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ @@ -191,6 +193,8 @@ Methods +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform2D` | :ref:`get_screen_transform`\ (\ ) |const| | +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`get_stretch_transform`\ (\ ) |const| | + +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`ViewportTexture` | :ref:`get_texture`\ (\ ) |const| | +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`get_viewport_rid`\ (\ ) |const| | @@ -436,6 +440,64 @@ Represents the size of the :ref:`MSAA` enum. ---- +.. _enum_Viewport_AnisotropicFiltering: + +.. rst-class:: classref-enumeration + +enum **AnisotropicFiltering**: :ref:`๐Ÿ”—` + +.. _class_Viewport_constant_ANISOTROPY_DISABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`AnisotropicFiltering` **ANISOTROPY_DISABLED** = ``0`` + +Anisotropic filtering is disabled. + +.. _class_Viewport_constant_ANISOTROPY_2X: + +.. rst-class:: classref-enumeration-constant + +:ref:`AnisotropicFiltering` **ANISOTROPY_2X** = ``1`` + +Use 2ร— anisotropic filtering. + +.. _class_Viewport_constant_ANISOTROPY_4X: + +.. rst-class:: classref-enumeration-constant + +:ref:`AnisotropicFiltering` **ANISOTROPY_4X** = ``2`` + +Use 4ร— anisotropic filtering. This is the default value. + +.. _class_Viewport_constant_ANISOTROPY_8X: + +.. rst-class:: classref-enumeration-constant + +:ref:`AnisotropicFiltering` **ANISOTROPY_8X** = ``3`` + +Use 8ร— anisotropic filtering. + +.. _class_Viewport_constant_ANISOTROPY_16X: + +.. rst-class:: classref-enumeration-constant + +:ref:`AnisotropicFiltering` **ANISOTROPY_16X** = ``4`` + +Use 16ร— anisotropic filtering. + +.. _class_Viewport_constant_ANISOTROPY_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`AnisotropicFiltering` **ANISOTROPY_MAX** = ``5`` + +Represents the size of the :ref:`AnisotropicFiltering` enum. + +.. rst-class:: classref-item-separator + +---- + .. _enum_Viewport_ScreenSpaceAA: .. rst-class:: classref-enumeration @@ -600,6 +662,8 @@ Objects are displayed semi-transparent with additive blending so you can see whe Objects are displayed as wireframe models. +\ **Note:** :ref:`RenderingServer.set_debug_generate_wireframes` must be called before loading any meshes for wireframes to be visible when using the Compatibility renderer. + .. _class_Viewport_constant_DEBUG_DRAW_NORMAL_BUFFER: .. rst-class:: classref-enumeration-constant @@ -1061,6 +1125,29 @@ Represents the size of the :ref:`VRSUpdateMode` enu Property Descriptions --------------------- +.. _class_Viewport_property_anisotropic_filtering_level: + +.. rst-class:: classref-property + +:ref:`AnisotropicFiltering` **anisotropic_filtering_level** = ``2`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_anisotropic_filtering_level**\ (\ value\: :ref:`AnisotropicFiltering`\ ) +- :ref:`AnisotropicFiltering` **get_anisotropic_filtering_level**\ (\ ) + +Sets the maximum number of samples to take when using anisotropic filtering on textures (as a power of two). A higher sample count will result in sharper textures at oblique angles, but is more expensive to compute. A value of ``0`` forcibly disables anisotropic filtering, even on materials where it is enabled. + +The anisotropic filtering level also affects decals and light projectors if they are configured to use anisotropic filtering. See :ref:`ProjectSettings.rendering/textures/decals/filter` and :ref:`ProjectSettings.rendering/textures/light_projectors/filter`. + +\ **Note:** In 3D, for this setting to have an effect, set :ref:`BaseMaterial3D.texture_filter` to :ref:`BaseMaterial3D.TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC` or :ref:`BaseMaterial3D.TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC` on materials. + +\ **Note:** In 2D, for this setting to have an effect, set :ref:`CanvasItem.texture_filter` to :ref:`CanvasItem.TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC` or :ref:`CanvasItem.TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC` on the :ref:`CanvasItem` node displaying the texture (or in :ref:`CanvasTexture`). However, anisotropic filtering is rarely useful in 2D, so only enable it for textures in 2D if it makes a meaningful visual difference. + +.. rst-class:: classref-item-separator + +---- + .. _class_Viewport_property_audio_listener_enable_2d: .. rst-class:: classref-property @@ -1749,7 +1836,7 @@ See also :ref:`ProjectSettings.rendering/anti_aliasing/quality/use_debanding` **get_stretch_transform**\ (\ ) |const| :ref:`๐Ÿ”—` + +Returns the automatically computed 2D stretch transform, taking the **Viewport**'s stretch settings into account. The final value is multiplied by :ref:`Window.content_scale_factor`, but only for the root viewport. If this method is called on a :ref:`SubViewport` (e.g., in a scene tree with :ref:`SubViewportContainer` and :ref:`SubViewport`), the scale factor of the root window will not be applied. Using :ref:`Transform2D.get_scale` on the returned value, this can be used to compensate for scaling when zooming a :ref:`Camera2D` node, or to scale down a :ref:`TextureRect` to be pixel-perfect regardless of the automatically computed scale factor. + +\ **Note:** Due to how pixel scaling works, the returned transform's X and Y scale may differ slightly, even when :ref:`Window.content_scale_aspect` is set to a mode that preserves the pixels' aspect ratio. If :ref:`Window.content_scale_aspect` is :ref:`Window.CONTENT_SCALE_ASPECT_IGNORE`, the X and Y scale may differ *significantly*. + +.. rst-class:: classref-item-separator + +---- + .. _class_Viewport_method_get_texture: .. rst-class:: classref-method diff --git a/classes/class_viewporttexture.rst b/classes/class_viewporttexture.rst index be83d66c4fa..6a0157e69c3 100644 --- a/classes/class_viewporttexture.rst +++ b/classes/class_viewporttexture.rst @@ -27,13 +27,15 @@ To get a **ViewportTexture** in code, use the :ref:`Viewport.get_texture` with :ref:`Viewport.use_hdr_2d` set to ``true`` the returned texture will be an HDR image encoded in linear space. This may look darker than normal when displayed directly on screen. To convert to gamma space, you can do the following: +\ **Note:** When using a :ref:`Viewport` with :ref:`Viewport.use_hdr_2d` set to ``true``, the returned texture will be an HDR image encoded in linear space. This may look darker than normal when displayed directly on screen. To convert to gamma space, you can do the following: :: img.convert(Image.FORMAT_RGBA8) imb.linear_to_srgb() +\ **Note:** Some nodes such as :ref:`Decal`, :ref:`Light3D`, and :ref:`PointLight2D` do not support using **ViewportTexture** directly. To use texture data from a **ViewportTexture** in these nodes, you need to create an :ref:`ImageTexture` by calling :ref:`Texture2D.get_image` on the **ViewportTexture** and passing the result to :ref:`ImageTexture.create_from_image`. This conversion is a slow operation, so it should not be performed every frame. + .. rst-class:: classref-introduction-group Tutorials diff --git a/classes/class_visualshadernodecolorfunc.rst b/classes/class_visualshadernodecolorfunc.rst index 95e4b74c7cf..9b4fe5fa4f9 100644 --- a/classes/class_visualshadernodecolorfunc.rst +++ b/classes/class_visualshadernodecolorfunc.rst @@ -96,11 +96,52 @@ Applies sepia tone effect using the following formula: float b = (c.r * 0.272) + (c.g * 0.534) + (c.b * 0.131); return vec3(r, g, b); +.. _class_VisualShaderNodeColorFunc_constant_FUNC_LINEAR_TO_SRGB: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_LINEAR_TO_SRGB** = ``4`` + +Converts color from linear color space to sRGB color space using the following formula: + +:: + + vec3 c = clamp(c, vec3(0.0), vec3(1.0)); + const vec3 a = vec3(0.055f); + return mix((vec3(1.0f) + a) * pow(c.rgb, vec3(1.0f / 2.4f)) - a, 12.92f * c.rgb, lessThan(c.rgb, vec3(0.0031308f))); + +The Compatibility renderer uses a simpler formula: + +:: + + vec3 c = input; + return max(vec3(1.055) * pow(c, vec3(0.416666667)) - vec3(0.055), vec3(0.0)); + +.. _class_VisualShaderNodeColorFunc_constant_FUNC_SRGB_TO_LINEAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Function` **FUNC_SRGB_TO_LINEAR** = ``5`` + +Converts color from sRGB color space to linear color space using the following formula: + +:: + + vec3 c = input; + return mix(pow((c.rgb + vec3(0.055)) * (1.0 / (1.0 + 0.055)), vec3(2.4)), c.rgb * (1.0 / 12.92), lessThan(c.rgb, vec3(0.04045))); + +The Compatibility renderer uses a simpler formula: + +:: + + vec3 c = input; + return c * (c * (c * 0.305306011 + 0.682171111) + 0.012522878); + .. _class_VisualShaderNodeColorFunc_constant_FUNC_MAX: .. rst-class:: classref-enumeration-constant -:ref:`Function` **FUNC_MAX** = ``4`` +:ref:`Function` **FUNC_MAX** = ``6`` Represents the size of the :ref:`Function` enum. diff --git a/classes/class_visualshadernodederivativefunc.rst b/classes/class_visualshadernodederivativefunc.rst index a156f1e41b6..1036bccd229 100644 --- a/classes/class_visualshadernodederivativefunc.rst +++ b/classes/class_visualshadernodederivativefunc.rst @@ -230,7 +230,7 @@ A type of operands and returned value. See :ref:`OpType`\ ) - :ref:`Precision` **get_precision**\ (\ ) -Sets the level of precision to use for the derivative function. See :ref:`Precision` for options. When using the GL Compatibility renderer, this setting has no effect. +Sets the level of precision to use for the derivative function. See :ref:`Precision` for options. When using the Compatibility renderer, this setting has no effect. .. |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_websocketpeer.rst b/classes/class_websocketpeer.rst index c575ebddff8..89fe0c117af 100644 --- a/classes/class_websocketpeer.rst +++ b/classes/class_websocketpeer.rst @@ -355,6 +355,8 @@ Closes this WebSocket connection. ``code`` is the status code for the closure (s Connects to the given URL. TLS certificates will be verified against the hostname when connecting using the ``wss://`` protocol. You can pass the optional ``tls_client_options`` parameter to customize the trusted certification authorities, or disable the common name verification. See :ref:`TLSOptions.client` and :ref:`TLSOptions.client_unsafe`. +\ **Note:** This method is non-blocking, and will return :ref:`@GlobalScope.OK` before the connection is established as long as the provided parameters are valid and the peer is not in an invalid state (e.g. already connected). Regularly call :ref:`poll` (e.g. during :ref:`Node` process) and check the result of :ref:`get_ready_state` to know whether the connection succeeds or fails. + \ **Note:** To avoid mixed content warnings or errors in Web, you may have to use a ``url`` that starts with ``wss://`` (secure) instead of ``ws://``. When doing so, make sure to use the fully qualified domain name that matches the one defined in the server's TLS certificate. Do not connect directly via the IP address for ``wss://`` connections, as it won't match with the TLS certificate. .. rst-class:: classref-item-separator diff --git a/classes/class_window.rst b/classes/class_window.rst index bda5c592d4d..27bc0327f58 100644 --- a/classes/class_window.rst +++ b/classes/class_window.rst @@ -52,6 +52,8 @@ Properties +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+ | :ref:`int` | :ref:`current_screen` | | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+ + | :ref:`bool` | :ref:`exclude_from_capture` | ``false`` | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+ | :ref:`bool` | :ref:`exclusive` | ``false`` | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+ | :ref:`bool` | :ref:`extend_to_title` | ``false`` | @@ -351,7 +353,7 @@ Emitted when files are dragged from the OS file manager and dropped in the game :: func _ready(): - get_viewport().files_dropped.connect(on_files_dropped) + get_window().files_dropped.connect(on_files_dropped) func on_files_dropped(files): print(files) @@ -434,6 +436,18 @@ Emitted when the :ref:`NOTIFICATION_THEME_CHANGED` + +Emitted when window title bar text is changed. + +.. rst-class:: classref-item-separator + +---- + .. _class_Window_signal_titlebar_changed: .. rst-class:: classref-signal @@ -515,6 +529,8 @@ Full screen mode with full multi-window support. Full screen window covers the entire display area of a screen and has no decorations. The display's video mode is not changed. +\ **On Android:** This enables immersive mode. + \ **On Windows:** Multi-window full-screen mode has a 1px border of the :ref:`ProjectSettings.rendering/environment/defaults/default_clear_color` color. \ **On macOS:** A new desktop is used to display the running project. @@ -531,6 +547,8 @@ A single window full screen mode. This mode has less overhead, but only one wind Full screen window covers the entire display area of a screen and has no border or decorations. The display's video mode is not changed. +\ **On Android:** This enables immersive mode. + \ **On Windows:** Depending on video driver, full screen transition might cause screens to go black for a moment. \ **On macOS:** A new desktop is used to display the running project. Exclusive full screen mode prevents Dock and Menu from showing up when the mouse pointer is hovering the edge of the screen. @@ -635,11 +653,23 @@ Window style is overridden, forcing sharp corners. \ **Note:** This flag is implemented only on Windows (11). +.. _class_Window_constant_FLAG_EXCLUDE_FROM_CAPTURE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Flags` **FLAG_EXCLUDE_FROM_CAPTURE** = ``9`` + +Windows is excluded from screenshots taken by :ref:`DisplayServer.screen_get_image`, :ref:`DisplayServer.screen_get_image_rect`, and :ref:`DisplayServer.screen_get_pixel`. + +\ **Note:** This flag is implemented on macOS and Windows. + +\ **Note:** Setting this flag will **NOT** prevent other apps from capturing an image, it should not be used as a security measure. + .. _class_Window_constant_FLAG_MAX: .. rst-class:: classref-enumeration-constant -:ref:`Flags` **FLAG_MAX** = ``9`` +:ref:`Flags` **FLAG_MAX** = ``10`` Max value of the :ref:`Flags`. @@ -1002,7 +1032,7 @@ Specifies how the content's aspect behaves when the **Window** is resized. The b - |void| **set_content_scale_factor**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_content_scale_factor**\ (\ ) -Specifies the base scale of **Window**'s content when its :ref:`size` is equal to :ref:`content_scale_size`. +Specifies the base scale of **Window**'s content when its :ref:`size` is equal to :ref:`content_scale_size`. See also :ref:`Viewport.get_stretch_transform`. .. rst-class:: classref-item-separator @@ -1076,6 +1106,23 @@ The screen the window is currently on. ---- +.. _class_Window_property_exclude_from_capture: + +.. rst-class:: classref-property + +:ref:`bool` **exclude_from_capture** = ``false`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_flag**\ (\ flag\: :ref:`Flags`, enabled\: :ref:`bool`\ ) +- :ref:`bool` **get_flag**\ (\ flag\: :ref:`Flags`\ ) |const| + +Windows is excluded from screenshots taken by :ref:`DisplayServer.screen_get_image`, :ref:`DisplayServer.screen_get_image_rect`, and :ref:`DisplayServer.screen_get_pixel`. + +.. rst-class:: classref-item-separator + +---- + .. _class_Window_property_exclusive: .. rst-class:: classref-property diff --git a/classes/class_xrinterface.rst b/classes/class_xrinterface.rst index 94351193de6..b9ae205f1e1 100644 --- a/classes/class_xrinterface.rst +++ b/classes/class_xrinterface.rst @@ -621,9 +621,9 @@ Sets the active environment blend mode. :: func _ready(): - var xr_interface: XRInterface = XRServer.find_interface("OpenXR") + var xr_interface = XRServer.find_interface("OpenXR") if xr_interface and xr_interface.is_initialized(): - var vp: Viewport = get_viewport() + var vp = 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_xrserver.rst b/classes/class_xrserver.rst index 5c821be2bfe..9dc02eda8d9 100644 --- a/classes/class_xrserver.rst +++ b/classes/class_xrserver.rst @@ -36,13 +36,15 @@ Properties .. table:: :widths: auto - +---------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+ - | :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`` | - +---------------------------------------+---------------------------------------------------------------------+-----------------------------------------------------+ + +---------------------------------------+---------------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`bool` | :ref:`camera_locked_to_origin` | ``false`` | + +---------------------------------------+---------------------------------------------------------------------------------+-----------------------------------------------------+ + | :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 @@ -297,6 +299,25 @@ Does not reset the orientation of the HMD, only the position of the player gets Property Descriptions --------------------- +.. _class_XRServer_property_camera_locked_to_origin: + +.. rst-class:: classref-property + +:ref:`bool` **camera_locked_to_origin** = ``false`` :ref:`๐Ÿ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_camera_locked_to_origin**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_camera_locked_to_origin**\ (\ ) + +If set to ``true``, the scene will be rendered as if the camera is locked to the :ref:`XROrigin3D`. + +\ **Note:** This doesn't provide a very comfortable experience for users. This setting exists for doing benchmarking or automated testing, where you want to control what is rendered via code. + +.. rst-class:: classref-item-separator + +---- + .. _class_XRServer_property_primary_interface: .. rst-class:: classref-property diff --git a/classes/class_zippacker.rst b/classes/class_zippacker.rst index 4d636c50611..620ece5f6dd 100644 --- a/classes/class_zippacker.rst +++ b/classes/class_zippacker.rst @@ -12,20 +12,21 @@ ZIPPacker **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Allows the creation of zip files. +Allows the creation of ZIP files. .. rst-class:: classref-introduction-group Description ----------- -This class implements a writer that allows storing the multiple blobs in a zip archive. +This class implements a writer that allows storing the multiple blobs in a ZIP archive. See also :ref:`ZIPReader` and :ref:`PCKPacker`. :: + # Create a ZIP archive with a single file at its root. func write_zip_file(): - var writer := ZIPPacker.new() - var err := writer.open("user://archive.zip") + var writer = ZIPPacker.new() + var err = writer.open("user://archive.zip") if err != OK: return err writer.start_file("hello.txt") diff --git a/classes/class_zipreader.rst b/classes/class_zipreader.rst index ea8780f74bd..dcbe8064905 100644 --- a/classes/class_zipreader.rst +++ b/classes/class_zipreader.rst @@ -12,25 +12,52 @@ ZIPReader **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Allows reading the content of a zip file. +Allows reading the content of a ZIP file. .. rst-class:: classref-introduction-group Description ----------- -This class implements a reader that can extract the content of individual files inside a zip archive. +This class implements a reader that can extract the content of individual files inside a ZIP archive. See also :ref:`ZIPPacker`. :: + # Read a single file from a ZIP archive. func read_zip_file(): - var reader := ZIPReader.new() - var err := reader.open("user://archive.zip") + var reader = ZIPReader.new() + var err = reader.open("user://archive.zip") if err != OK: return PackedByteArray() - var res := reader.read_file("hello.txt") + var res = reader.read_file("hello.txt") reader.close() return res + + # Extract all files from a ZIP archive, preserving the directories within. + # This acts like the "Extract all" functionality from most archive managers. + func extract_all_from_zip(): + var reader = ZIPReader.new() + reader.open("res://archive.zip") + + # Destination directory for the extracted files (this folder must exist before extraction). + # Not all ZIP archives put everything in a single root folder, + # which means several files/folders may be created in `root_dir` after extraction. + var root_dir = DirAccess.open("user://") + + var files = reader.get_files() + for file_path in files: + # If the current entry is a directory. + if file_path.ends_with("/"): + root_dir.make_dir_recursive(file_path) + continue + + # Write file contents, creating folders automatically when needed. + # Not all ZIP archives are strictly ordered, so we need to do this in case + # the file entry comes before the folder entry. + root_dir.make_dir_recursive(root_dir.get_current_dir().path_join(file_path).get_base_dir()) + var file = FileAccess.open(root_dir.get_current_dir().path_join(file_path), FileAccess.WRITE) + var buffer = reader.read_file(file_path) + file.store_buffer(buffer) .. rst-class:: classref-reftable-group diff --git a/classes/index.rst b/classes/index.rst index 689644283e6..819faca8d78 100644 --- a/classes/index.rst +++ b/classes/index.rst @@ -124,6 +124,7 @@ Nodes class_graphnode class_gridcontainer class_gridmap + class_gridmapeditorplugin class_groovejoint2d class_hboxcontainer class_hflowcontainer @@ -174,11 +175,14 @@ Nodes class_node3d class_occluderinstance3d class_omnilight3d + class_openxrbindingmodifiereditor class_openxrcompositionlayer class_openxrcompositionlayercylinder class_openxrcompositionlayerequirect class_openxrcompositionlayerquad class_openxrhand + class_openxrinteractionprofileeditor + class_openxrinteractionprofileeditorbase class_openxrvisibilitymask class_optionbutton class_panel @@ -211,6 +215,7 @@ Nodes class_remotetransform2d class_remotetransform3d class_resourcepreloader + class_retargetmodifier3d class_richtextlabel class_rigidbody2d class_rigidbody3d @@ -301,6 +306,7 @@ Resources class_animationnodeblendspace1d class_animationnodeblendspace2d class_animationnodeblendtree + class_animationnodeextension class_animationnodeoneshot class_animationnodeoutput class_animationnodestatemachine @@ -373,6 +379,7 @@ Resources class_capsuleshape3d class_circleshape2d class_codehighlighter + class_colorpalette class_compositor class_compositoreffect class_compressedcubemap @@ -476,10 +483,17 @@ Resources class_occluderpolygon2d class_oggpacketsequence class_openxraction + class_openxractionbindingmodifier class_openxractionmap class_openxractionset + class_openxranalogthresholdmodifier + class_openxrbindingmodifier + class_openxrdpadbindingmodifier + class_openxrhapticbase + class_openxrhapticvibration class_openxrinteractionprofile class_openxripbinding + class_openxripbindingmodifier class_optimizedtranslation class_ormmaterial3d class_packeddatacontainer @@ -921,6 +935,7 @@ Other objects class_scriptlanguage class_scriptlanguageextension class_semaphore + class_shaderincludedb class_skinreference class_streampeer class_streampeerbuffer