From f593c47588e10d8e6c47d24681b6c58eeec9eec1 Mon Sep 17 00:00:00 2001 From: Godot Organization Date: Sat, 12 Aug 2023 03:18:27 +0000 Subject: [PATCH] classref: Sync with current master branch (4714e95) --- classes/class_@gdscript.rst | 4 +- classes/class_@globalscope.rst | 26 +- classes/class_area3d.rst | 2 +- classes/class_astargrid2d.rst | 32 ++ classes/class_audioeffectdelay.rst | 18 +- classes/class_audioserver.rst | 2 +- classes/class_basebutton.rst | 8 +- classes/class_bone2d.rst | 2 +- classes/class_bool.rst | 38 +- classes/class_button.rst | 4 +- classes/class_colorpickerbutton.rst | 4 +- classes/class_control.rst | 18 +- classes/class_editorcommandpalette.rst | 4 +- classes/class_editorexportplatformandroid.rst | 6 +- classes/class_editorexportplatformios.rst | 4 +- classes/class_editorexportplatformmacos.rst | 8 +- classes/class_editorexportplatformwindows.rst | 6 +- classes/class_editorexportplugin.rst | 4 +- classes/class_editorinterface.rst | 16 +- classes/class_editorplugin.rst | 12 +- classes/class_editorscript.rst | 2 + classes/class_editorsettings.rst | 4 +- classes/class_fileaccess.rst | 396 +++++++++++++----- classes/class_float.rst | 2 +- classes/class_font.rst | 64 +-- classes/class_fontfile.rst | 19 - classes/class_fontvariation.rst | 19 - classes/class_geometry3d.rst | 16 + classes/class_gltfdocument.rst | 17 +- classes/class_gltfdocumentextension.rst | 34 +- classes/class_gltfstate.rst | 49 ++- classes/class_image.rst | 14 + classes/class_input.rst | 28 ++ classes/class_lineedit.rst | 19 + classes/class_menubutton.rst | 4 +- classes/class_mesh.rst | 2 +- classes/class_navigationagent2d.rst | 2 +- ...ass_navigationmeshsourcegeometrydata3d.rst | 2 +- classes/class_navigationserver2d.rst | 10 +- classes/class_navigationserver3d.rst | 12 +- classes/class_node.rst | 4 +- classes/class_node3d.rst | 2 +- classes/class_nodepath.rst | 8 +- classes/class_optionbutton.rst | 4 +- classes/class_performance.rst | 2 +- classes/class_physicsdirectspacestate3d.rst | 4 + classes/class_projectsettings.rst | 95 ++++- classes/class_raycast3d.rst | 14 + classes/class_rdpipelinemultisamplestate.rst | 2 +- .../class_rdpipelinerasterizationstate.rst | 2 +- classes/class_rect2.rst | 131 ++++-- classes/class_rect2i.rst | 125 ++++-- classes/class_renderingdevice.rst | 78 ++-- classes/class_renderingserver.rst | 32 +- classes/class_renderscenebuffersrd.rst | 6 +- classes/class_resourceimporterscene.rst | 78 ++-- classes/class_richtextlabel.rst | 19 + classes/class_scenetree.rst | 4 +- classes/class_softbody3d.rst | 4 +- classes/class_stylebox.rst | 2 +- classes/class_systemfont.rst | 19 - classes/class_tilemap.rst | 4 +- classes/class_tilemappattern.rst | 2 +- classes/class_tileset.rst | 2 +- classes/class_tween.rst | 2 +- classes/class_viewport.rst | 23 +- classes/class_window.rst | 67 ++- classes/class_xrinterfaceextension.rst | 2 +- 68 files changed, 1205 insertions(+), 465 deletions(-) diff --git a/classes/class_@gdscript.rst b/classes/class_@gdscript.rst index 889fab9491f..ace2401afa8 100644 --- a/classes/class_@gdscript.rst +++ b/classes/class_@gdscript.rst @@ -538,6 +538,8 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_NODE_PATH_VALID_TYPES`. + .. rst-class:: classref-item-separator ---- @@ -665,7 +667,7 @@ Mark the following method for remote procedure calls. See :doc:`High-level multi If ``mode`` is set as ``"any_peer"``, allows any peer to call this RPC function. Otherwise, only the authority peer is allowed to call it and ``mode`` should be kept as ``"authority"``. When configuring functions as RPCs with :ref:`Node.rpc_config`, each of these modes respectively corresponds to the :ref:`MultiplayerAPI.RPC_MODE_AUTHORITY` and :ref:`MultiplayerAPI.RPC_MODE_ANY_PEER` RPC modes. See :ref:`RPCMode`. If a peer that is not the authority tries to call a function that is only allowed for the authority, the function will not be executed. If the error can be detected locally (when the RPC configuration is consistent between the local and the remote peer), an error message will be displayed on the sender peer. Otherwise, the remote peer will detect the error and print an error there. -If ``sync`` is set as ``"call_remote"``, the function will only be executed on the remote peer, but not locally. To run this function locally too, set ``sync`` to ``"call_local"``. When configuring functions as RPCs with :ref:`Node.rpc_config`, this is equivalent to setting `call_local` to `true`. +If ``sync`` is set as ``"call_remote"``, the function will only be executed on the remote peer, but not locally. To run this function locally too, set ``sync`` to ``"call_local"``. When configuring functions as RPCs with :ref:`Node.rpc_config`, this is equivalent to setting ``call_local`` to ``true``. The ``transfer_mode`` accepted values are ``"unreliable"``, ``"unreliable_ordered"``, or ``"reliable"``. It sets the transfer mode of the underlying :ref:`MultiplayerPeer`. See :ref:`MultiplayerPeer.transfer_mode`. diff --git a/classes/class_@globalscope.rst b/classes/class_@globalscope.rst index 98833dc5d12..d5558d44913 100644 --- a/classes/class_@globalscope.rst +++ b/classes/class_@globalscope.rst @@ -51,6 +51,8 @@ Properties +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`DisplayServer` | :ref:`DisplayServer` | +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`EditorInterface` | :ref:`EditorInterface` | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`Engine` | :ref:`Engine` | +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`EngineDebugger` | :ref:`EngineDebugger` | @@ -4725,6 +4727,20 @@ The :ref:`DisplayServer` singleton. ---- +.. _class_@GlobalScope_property_EditorInterface: + +.. rst-class:: classref-property + +:ref:`EditorInterface` **EditorInterface** + +The :ref:`EditorInterface` singleton. + +\ **Note:** Only available in editor builds. + +.. rst-class:: classref-item-separator + +---- + .. _class_@GlobalScope_property_Engine: .. rst-class:: classref-property @@ -5598,9 +5614,9 @@ Returns a human-readable name for the given :ref:`Error :ref:`float` **exp** **(** :ref:`float` x **)** -The natural exponential function. It raises the mathematical constant **e** to the power of ``x`` and returns it. +The natural exponential function. It raises the mathematical constant *e* to the power of ``x`` and returns it. -\ **e** has an approximate value of 2.71828, and can be obtained with ``exp(1)``. +\ *e* has an approximate value of 2.71828, and can be obtained with ``exp(1)``. For exponents to other bases use the method :ref:`pow`. @@ -6158,9 +6174,7 @@ Use a negative ``delta`` value to move away. :ref:`int` **nearest_po2** **(** :ref:`int` value **)** -Returns the nearest equal or larger power of 2 for the integer ``value``. - -In other words, returns the smallest value ``a`` where ``a = pow(2, n)`` such that ``value <= a`` for some non-negative integer ``n``. +Returns the smallest integer power of 2 that is greater than or equal to ``value``. :: @@ -6171,7 +6185,7 @@ In other words, returns the smallest value ``a`` where ``a = pow(2, n)`` such th nearest_po2(0) # Returns 0 (this may not be expected) nearest_po2(-1) # Returns 0 (this may not be expected) -\ **Warning:** Due to the way it is implemented, this function returns ``0`` rather than ``1`` for negative values of ``value`` (in reality, 1 is the smallest integer power of 2). +\ **Warning:** Due to its implementation, this method returns ``0`` rather than ``1`` for values less than or equal to ``0``, with an exception for ``value`` being the smallest negative 64-bit integer (``-9223372036854775808``) in which case the ``value`` is returned unchanged. .. rst-class:: classref-item-separator diff --git a/classes/class_area3d.rst b/classes/class_area3d.rst index 973b15c10fa..9608cf0240d 100644 --- a/classes/class_area3d.rst +++ b/classes/class_area3d.rst @@ -23,7 +23,7 @@ Description This node can also locally alter or override physics parameters (gravity, damping) and route audio to custom audio buses. -\ **Warning:** Using a :ref:`ConcavePolygonShape3D` inside a :ref:`CollisionShape3D` child of this node (created e.g. by using the *Create Trimesh Collision Sibling* option in the *Mesh* menu that appears when selecting a :ref:`MeshInstance3D` node) may give unexpected results, since this collision shape is hollow. If this is not desired, it has to be split into multiple :ref:`ConvexPolygonShape3D`\ s or primitive shapes like :ref:`BoxShape3D`, or in some cases it may be replaceable by a :ref:`CollisionPolygon3D`. +\ **Warning:** Using a :ref:`ConcavePolygonShape3D` inside a :ref:`CollisionShape3D` child of this node (created e.g. by using the **Create Trimesh Collision Sibling** option in the **Mesh** menu that appears when selecting a :ref:`MeshInstance3D` node) may give unexpected results, since this collision shape is hollow. If this is not desired, it has to be split into multiple :ref:`ConvexPolygonShape3D`\ s or primitive shapes like :ref:`BoxShape3D`, or in some cases it may be replaceable by a :ref:`CollisionPolygon3D`. .. rst-class:: classref-introduction-group diff --git a/classes/class_astargrid2d.rst b/classes/class_astargrid2d.rst index b56cd1bd1b1..41f478d4ca0 100644 --- a/classes/class_astargrid2d.rst +++ b/classes/class_astargrid2d.rst @@ -89,6 +89,10 @@ Methods +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`clear` **(** **)** | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`fill_solid_region` **(** :ref:`Rect2i` region, :ref:`bool` solid=true **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`fill_weight_scale_region` **(** :ref:`Rect2i` region, :ref:`float` weight_scale **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2i[]` | :ref:`get_id_path` **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedVector2Array` | :ref:`get_point_path` **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** | @@ -440,6 +444,34 @@ Clears the grid and sets the :ref:`region` to ---- +.. _class_AStarGrid2D_method_fill_solid_region: + +.. rst-class:: classref-method + +void **fill_solid_region** **(** :ref:`Rect2i` region, :ref:`bool` solid=true **)** + +Fills the given ``region`` on the grid with the specified value for the solid flag. + +\ **Note:** Calling :ref:`update` is not needed after the call of this function. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AStarGrid2D_method_fill_weight_scale_region: + +.. rst-class:: classref-method + +void **fill_weight_scale_region** **(** :ref:`Rect2i` region, :ref:`float` weight_scale **)** + +Fills the given ``region`` on the grid with the specified value for the weight scale. + +\ **Note:** Calling :ref:`update` is not needed after the call of this function. + +.. rst-class:: classref-item-separator + +---- + .. _class_AStarGrid2D_method_get_id_path: .. rst-class:: classref-method diff --git a/classes/class_audioeffectdelay.rst b/classes/class_audioeffectdelay.rst index e964a46440b..fe302226711 100644 --- a/classes/class_audioeffectdelay.rst +++ b/classes/class_audioeffectdelay.rst @@ -137,7 +137,7 @@ Feedback delay time in milliseconds. - void **set_feedback_level_db** **(** :ref:`float` value **)** - :ref:`float` **get_feedback_level_db** **(** **)** -Sound level for ``tap1``. +Sound level for feedback. .. rst-class:: classref-item-separator @@ -171,7 +171,7 @@ Low-pass filter for feedback, in Hz. Frequencies below this value are filtered o - void **set_tap1_active** **(** :ref:`bool` value **)** - :ref:`bool` **is_tap1_active** **(** **)** -If ``true``, ``tap1`` will be enabled. +If ``true``, the first tap will be enabled. .. rst-class:: classref-item-separator @@ -188,7 +188,7 @@ If ``true``, ``tap1`` will be enabled. - void **set_tap1_delay_ms** **(** :ref:`float` value **)** - :ref:`float` **get_tap1_delay_ms** **(** **)** -``tap1`` delay time in milliseconds. +First tap delay time in milliseconds. .. rst-class:: classref-item-separator @@ -205,7 +205,7 @@ If ``true``, ``tap1`` will be enabled. - void **set_tap1_level_db** **(** :ref:`float` value **)** - :ref:`float` **get_tap1_level_db** **(** **)** -Sound level for ``tap1``. +Sound level for the first tap. .. rst-class:: classref-item-separator @@ -222,7 +222,7 @@ Sound level for ``tap1``. - void **set_tap1_pan** **(** :ref:`float` value **)** - :ref:`float` **get_tap1_pan** **(** **)** -Pan position for ``tap1``. Value can range from -1 (fully left) to 1 (fully right). +Pan position for the first tap. Value can range from -1 (fully left) to 1 (fully right). .. rst-class:: classref-item-separator @@ -239,7 +239,7 @@ Pan position for ``tap1``. Value can range from -1 (fully left) to 1 (fully righ - void **set_tap2_active** **(** :ref:`bool` value **)** - :ref:`bool` **is_tap2_active** **(** **)** -If ``true``, ``tap2`` will be enabled. +If ``true``, the second tap will be enabled. .. rst-class:: classref-item-separator @@ -256,7 +256,7 @@ If ``true``, ``tap2`` will be enabled. - void **set_tap2_delay_ms** **(** :ref:`float` value **)** - :ref:`float` **get_tap2_delay_ms** **(** **)** -**Tap2** delay time in milliseconds. +Second tap delay time in milliseconds. .. rst-class:: classref-item-separator @@ -273,7 +273,7 @@ If ``true``, ``tap2`` will be enabled. - void **set_tap2_level_db** **(** :ref:`float` value **)** - :ref:`float` **get_tap2_level_db** **(** **)** -Sound level for ``tap2``. +Sound level for the second tap. .. rst-class:: classref-item-separator @@ -290,7 +290,7 @@ Sound level for ``tap2``. - void **set_tap2_pan** **(** :ref:`float` value **)** - :ref:`float` **get_tap2_pan** **(** **)** -Pan position for ``tap2``. Value can range from -1 (fully left) to 1 (fully right). +Pan position for the second tap. Value can range from -1 (fully left) to 1 (fully right). .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to 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_audioserver.rst b/classes/class_audioserver.rst index 706314ae63b..d363bb6cef5 100644 --- a/classes/class_audioserver.rst +++ b/classes/class_audioserver.rst @@ -488,7 +488,7 @@ Returns the names of all audio output devices detected on the system. :ref:`float` **get_output_latency** **(** **)** |const| -Returns the audio driver's output latency. +Returns the audio driver's output latency. This can be expensive, it is not recommended to call this every frame. .. rst-class:: classref-item-separator diff --git a/classes/class_basebutton.rst b/classes/class_basebutton.rst index c78a197575f..253999a4afb 100644 --- a/classes/class_basebutton.rst +++ b/classes/class_basebutton.rst @@ -66,7 +66,7 @@ Methods +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_pressed` **(** **)** |virtual| | +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_toggled` **(** :ref:`bool` button_pressed **)** |virtual| | + | void | :ref:`_toggled` **(** :ref:`bool` toggled_on **)** |virtual| | +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ | :ref:`DrawMode` | :ref:`get_draw_mode` **(** **)** |const| | +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ @@ -126,9 +126,9 @@ If you need to know the button's pressed state (and :ref:`toggle_mode` button_pressed **)** +**toggled** **(** :ref:`bool` toggled_on **)** -Emitted when the button was just toggled between pressed and normal states (only if :ref:`toggle_mode` is active). The new state is contained in the ``button_pressed`` argument. +Emitted when the button was just toggled between pressed and normal states (only if :ref:`toggle_mode` is active). The new state is contained in the ``toggled_on`` argument. .. rst-class:: classref-section-separator @@ -419,7 +419,7 @@ Called when the button is pressed. If you need to know the button's pressed stat .. rst-class:: classref-method -void **_toggled** **(** :ref:`bool` button_pressed **)** |virtual| +void **_toggled** **(** :ref:`bool` toggled_on **)** |virtual| Called when the button is toggled (only if :ref:`toggle_mode` is active). diff --git a/classes/class_bone2d.rst b/classes/class_bone2d.rst index 7d01bb288bd..29229738cfc 100644 --- a/classes/class_bone2d.rst +++ b/classes/class_bone2d.rst @@ -192,7 +192,7 @@ void **set_bone_angle** **(** :ref:`float` angle **)** Sets the bone angle for the **Bone2D**. This is typically set to the rotation from the **Bone2D** to a child **Bone2D** node. -\ **Note:** **Note:** This is different from the **Bone2D**'s rotation. The bone's angle is the rotation of the bone shown by the gizmo, which is unaffected by the **Bone2D**'s :ref:`Node2D.transform`. +\ **Note:** This is different from the **Bone2D**'s rotation. The bone's angle is the rotation of the bone shown by the gizmo, which is unaffected by the **Bone2D**'s :ref:`Node2D.transform`. .. rst-class:: classref-item-separator diff --git a/classes/class_bool.rst b/classes/class_bool.rst index 9c326ad3d1e..8ae33e6c036 100644 --- a/classes/class_bool.rst +++ b/classes/class_bool.rst @@ -17,56 +17,62 @@ A built-in boolean type. Description ----------- -A **bool** is always one of two values: ``true`` or ``false``, similar to a switch that is either on or off. Booleans are used in programming for logic in condition statements. +The **bool** is a built-in :ref:`Variant` type that may only store one of two values: ``true`` or ``false``. You can imagine it as a switch that can be either turned on or off, or as a binary digit that can either be 1 or 0. -Booleans can be directly used in ``if`` and ``elif`` statements. You don't need to add ``== true`` or ``== false``: +Booleans can be directly used in ``if``, and other conditional statements: .. tabs:: .. code-tab:: gdscript + var can_shoot = true if can_shoot: launch_bullet() .. code-tab:: csharp + bool canShoot = true; if (canShoot) { - launchBullet(); + LaunchBullet(); } -Many common methods and operations return **bool**\ s, for example, ``shooting_cooldown <= 0.0`` may evaluate to ``true`` or ``false`` depending on the number's value. +All comparison operators return booleans (``==``, ``>``, ``<=``, etc.). As such, it is not necessary to compare booleans themselves. You do not need to add ``== true`` or ``== false``. -\ **bool**\ s are usually used with the logical operators ``and``, ``or``, and ``not`` to create complex conditions: +Booleans can be combined with the logical operators ``and``, ``or``, ``not`` to create complex conditions: .. tabs:: .. code-tab:: gdscript - if bullets > 0 and not is_reloading: + if bullets > 0 and not is_reloading(): launch_bullet() - if bullets == 0 or is_reloading: + if bullets == 0 or is_reloading(): play_clack_sound() .. code-tab:: csharp - if (bullets > 0 && !isReloading) + if (bullets > 0 && !IsReloading()) { - launchBullet(); + LaunchBullet(); } - if (bullets == 0 || isReloading) + if (bullets == 0 || IsReloading()) { - playClackSound(); + PlayClackSound(); } +\ **Note:** In modern programming languages, logical operators are evaluated in order. All remaining conditions are skipped if their result would have no effect on the final value. This concept is known as `short-circuit evaluation `__ and can be useful to avoid evaluating expensive conditions in some performance-critical cases. + +\ **Note:** By convention, built-in methods and properties that return booleans are usually defined as yes-no questions, single adjectives, or similar (:ref:`String.is_empty`, :ref:`Node.can_process`, :ref:`Camera2D.enabled`, etc.). + .. rst-class:: classref-reftable-group Constructors @@ -118,7 +124,7 @@ Constructor Descriptions :ref:`bool` **bool** **(** **)** -Constructs a default-initialized **bool** set to ``false``. +Constructs a **bool** set to ``false``. .. rst-class:: classref-item-separator @@ -138,7 +144,7 @@ Constructs a **bool** as a copy of the given **bool**. :ref:`bool` **bool** **(** :ref:`float` from **)** -Cast a :ref:`float` value to a boolean value. This method will return ``false`` if ``0.0`` is passed in, and ``true`` for all other values. +Cast a :ref:`float` value to a boolean value. Returns ``false`` if ``from`` is equal to ``0.0`` (including ``-0.0``), and ``true`` for all other values (including :ref:`@GDScript.INF` and :ref:`@GDScript.NAN`). .. rst-class:: classref-item-separator @@ -148,7 +154,7 @@ Cast a :ref:`float` value to a boolean value. This method will retu :ref:`bool` **bool** **(** :ref:`int` from **)** -Cast an :ref:`int` value to a boolean value. This method will return ``false`` if ``0`` is passed in, and ``true`` for all other values. +Cast an :ref:`int` value to a boolean value. Returns ``false`` if ``from`` is equal to ``0``, and ``true`` for all other values. .. rst-class:: classref-section-separator @@ -165,7 +171,7 @@ Operator Descriptions :ref:`bool` **operator !=** **(** :ref:`bool` right **)** -Returns ``true`` if two bools are different, i.e. one is ``true`` and the other is ``false``. +Returns ``true`` if the two booleans are not equal. That is, one is ``true`` and the other is ``false``. This operation can be seen as a logical XOR. .. rst-class:: classref-item-separator @@ -189,7 +195,7 @@ Returns ``true`` if the left operand is ``false`` and the right operand is ``tru :ref:`bool` **operator ==** **(** :ref:`bool` right **)** -Returns ``true`` if two bools are equal, i.e. both are ``true`` or both are ``false``. +Returns ``true`` if the two booleans are equal. That is, both are ``true`` or both are ``false``. This operation can be seen as a logical EQ or XNOR. .. rst-class:: classref-item-separator diff --git a/classes/class_button.rst b/classes/class_button.rst index 07c90e2101c..f7ed65ef092 100644 --- a/classes/class_button.rst +++ b/classes/class_button.rst @@ -136,7 +136,7 @@ Theme Properties +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color` | :ref:`icon_pressed_color` | ``Color(1, 1, 1, 1)`` | +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`h_separation` | ``2`` | + | :ref:`int` | :ref:`h_separation` | ``4`` | +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`int` | :ref:`icon_max_width` | ``0`` | +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ @@ -520,7 +520,7 @@ Icon modulate :ref:`Color` used when the **Button** is being presse .. rst-class:: classref-themeproperty -:ref:`int` **h_separation** = ``2`` +:ref:`int` **h_separation** = ``4`` The horizontal space between **Button**'s icon and text. Negative values will be treated as ``0`` when used. diff --git a/classes/class_colorpickerbutton.rst b/classes/class_colorpickerbutton.rst index c2ef4f8a1a4..6593a363ac4 100644 --- a/classes/class_colorpickerbutton.rst +++ b/classes/class_colorpickerbutton.rst @@ -85,7 +85,7 @@ Theme Properties +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ | :ref:`Color` | :ref:`font_pressed_color` | ``Color(0.8, 0.8, 0.8, 1)`` | +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ - | :ref:`int` | :ref:`h_separation` | ``2`` | + | :ref:`int` | :ref:`h_separation` | ``4`` | +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ | :ref:`int` | :ref:`outline_size` | ``0`` | +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ @@ -304,7 +304,7 @@ Text :ref:`Color` used when the **ColorPickerButton** is being pres .. rst-class:: classref-themeproperty -:ref:`int` **h_separation** = ``2`` +:ref:`int` **h_separation** = ``4`` The horizontal space between **ColorPickerButton**'s icon and text. diff --git a/classes/class_control.rst b/classes/class_control.rst index ed0cbd835f1..23d799e6be3 100644 --- a/classes/class_control.rst +++ b/classes/class_control.rst @@ -385,9 +385,9 @@ Emitted when the node's minimum size changes. **mouse_entered** **(** **)** -Emitted when the mouse enters the control's ``Rect`` area, provided its :ref:`mouse_filter` lets the event reach it. +Emitted when the mouse cursor enters the control's visible area, that is not occluded behind other Controls or Windows, provided its :ref:`mouse_filter` lets the event reach it and regardless if it's currently focused or not. -\ **Note:** :ref:`mouse_entered` will not be emitted if the mouse enters a child **Control** node before entering the parent's ``Rect`` area, at least until the mouse is moved to reach the parent's ``Rect`` area. +\ **Note:** :ref:`CanvasItem.z_index` doesn't affect, which Control receives the signal. .. rst-class:: classref-item-separator @@ -399,11 +399,11 @@ Emitted when the mouse enters the control's ``Rect`` area, provided its :ref:`mo **mouse_exited** **(** **)** -Emitted when the mouse leaves the control's ``Rect`` area, provided its :ref:`mouse_filter` lets the event reach it. +Emitted when the mouse cursor leaves the control's visible area, that is not occluded behind other Controls or Windows, provided its :ref:`mouse_filter` lets the event reach it and regardless if it's currently focused or not. -\ **Note:** :ref:`mouse_exited` will be emitted if the mouse enters a child **Control** node, even if the mouse cursor is still inside the parent's ``Rect`` area. +\ **Note:** :ref:`CanvasItem.z_index` doesn't affect, which Control receives the signal. -If you want to check whether the mouse truly left the area, ignoring any top nodes, you can use code like this: +\ **Note:** If you want to check whether the mouse truly left the area, ignoring any top nodes, you can use code like this: :: @@ -1073,7 +1073,9 @@ Sent when the node changes size. Use :ref:`size` to **NOTIFICATION_MOUSE_ENTER** = ``41`` -Sent when the mouse pointer enters the node. +Sent when the mouse cursor enters the control's visible area, that is not occluded behind other Controls or Windows, provided its :ref:`mouse_filter` lets the event reach it and regardless if it's currently focused or not. + +\ **Note:** :ref:`CanvasItem.z_index` doesn't affect, which Control receives the notification. .. _class_Control_constant_NOTIFICATION_MOUSE_EXIT: @@ -1081,7 +1083,9 @@ Sent when the mouse pointer enters the node. **NOTIFICATION_MOUSE_EXIT** = ``42`` -Sent when the mouse pointer exits the node. +Sent when the mouse cursor leaves the control's visible area, that is not occluded behind other Controls or Windows, provided its :ref:`mouse_filter` lets the event reach it and regardless if it's currently focused or not. + +\ **Note:** :ref:`CanvasItem.z_index` doesn't affect, which Control receives the notification. .. _class_Control_constant_NOTIFICATION_FOCUS_ENTER: diff --git a/classes/class_editorcommandpalette.rst b/classes/class_editorcommandpalette.rst index 5ff05a08400..69ed8171c03 100644 --- a/classes/class_editorcommandpalette.rst +++ b/classes/class_editorcommandpalette.rst @@ -28,14 +28,14 @@ Command key names use slash delimiters to distinguish sections, for example: ``" .. code-tab:: gdscript - var command_palette = get_editor_interface().get_command_palette() + var command_palette = EditorInterface.get_command_palette() # external_command is a function that will be called with the command is executed. var command_callable = Callable(self, "external_command").bind(arguments) command_palette.add_command("command", "test/command",command_callable) .. code-tab:: csharp - EditorCommandPalette commandPalette = GetEditorInterface().GetCommandPalette(); + EditorCommandPalette commandPalette = EditorInterface.Singleton.GetCommandPalette(); // ExternalCommand is a function that will be called with the command is executed. Callable commandCallable = new Callable(this, MethodName.ExternalCommand); commandPalette.AddCommand("command", "test/command", commandCallable) diff --git a/classes/class_editorexportplatformandroid.rst b/classes/class_editorexportplatformandroid.rst index 589cd229d5b..f9cefe664a1 100644 --- a/classes/class_editorexportplatformandroid.rst +++ b/classes/class_editorexportplatformandroid.rst @@ -960,7 +960,7 @@ Allows an application to act as an AccountAuthenticator for the AccountManager. :ref:`bool` **permissions/battery_stats** -Allows an application to collect battery statistics. Sett `BATTERY_STATS `__. +Allows an application to collect battery statistics. See `BATTERY_STATS `__. .. rst-class:: classref-item-separator @@ -2670,7 +2670,7 @@ If ``true``, allows the application to participate in the backup and restore inf :ref:`int` **version/code** -Machine-readable application version. +Machine-readable application version. This must be incremented for every new release pushed to the Play Store. .. rst-class:: classref-item-separator @@ -2682,7 +2682,7 @@ Machine-readable application version. :ref:`String` **version/name** -Application version visible to the user. +Application version visible to the user. Falls back to :ref:`ProjectSettings.application/config/version` if left empty. .. rst-class:: classref-item-separator diff --git a/classes/class_editorexportplatformios.rst b/classes/class_editorexportplatformios.rst index 8b7aba682ce..c06e2f6d861 100644 --- a/classes/class_editorexportplatformios.rst +++ b/classes/class_editorexportplatformios.rst @@ -296,7 +296,7 @@ Can be overridden with the environment variable ``GODOT_IOS_PROVISIONING_PROFILE :ref:`String` **application/short_version** -Application version visible to the user, can only contain numeric characters (``0-9``) and periods (``.``). +Application version visible to the user, can only contain numeric characters (``0-9``) and periods (``.``). Falls back to :ref:`ProjectSettings.application/config/version` if left empty. .. rst-class:: classref-item-separator @@ -332,7 +332,7 @@ Supported device family. :ref:`String` **application/version** -Machine-readable application version, in the ``major.minor.patch`` format, can only contain numeric characters (``0-9``) and periods (``.``). +Machine-readable application version, in the ``major.minor.patch`` format, can only contain numeric characters (``0-9``) and periods (``.``). This must be incremented on every new release pushed to the App Store. .. rst-class:: classref-item-separator diff --git a/classes/class_editorexportplatformmacos.rst b/classes/class_editorexportplatformmacos.rst index bde5b0fc636..522b8580613 100644 --- a/classes/class_editorexportplatformmacos.rst +++ b/classes/class_editorexportplatformmacos.rst @@ -274,7 +274,7 @@ Copyright notice for the bundle visible to the user (localized). :ref:`String` **application/icon** -Application icon file. If left empty, it will fallback to :ref:`ProjectSettings.application/config/macos_native_icon`, and then to :ref:`ProjectSettings.application/config/icon`. +Application icon file. If left empty, it will fallback to :ref:`ProjectSettings.application/config/macos_native_icon`, and then to :ref:`ProjectSettings.application/config/icon`. .. rst-class:: classref-item-separator @@ -310,7 +310,7 @@ Minimum version of macOS required for this application to run in the ``major.min :ref:`String` **application/short_version** -Application version visible to the user, can only contain numeric characters (``0-9``) and periods (``.``). +Application version visible to the user, can only contain numeric characters (``0-9``) and periods (``.``). Falls back to :ref:`ProjectSettings.application/config/version` if left empty. .. rst-class:: classref-item-separator @@ -334,7 +334,7 @@ A four-character creator code that is specific to the bundle. Optional. :ref:`String` **application/version** -Machine-readable application version, in the ``major.minor.patch`` format, can only contain numeric characters (``0-9``) and periods (``.``). +Machine-readable application version, in the ``major.minor.patch`` format, can only contain numeric characters (``0-9``) and periods (``.``). This must be incremented on every new release pushed to the App Store. .. rst-class:: classref-item-separator @@ -426,7 +426,7 @@ Array of the additional command line arguments passed to the code signing tool. :ref:`bool` **codesign/entitlements/address_book** -Enable to allow access to contacts in the user's address book, if it's enabled you should also provide usage message in the ``privacy/address_book_usage_description`` option. See `com.apple.security.personal-information.addressbook `__. +Enable to allow access to contacts in the user's address book, if it's enabled you should also provide usage message in the ``privacy/address_book_usage_description`` option. See `com.apple.security.personal-information.addressbook `__. .. rst-class:: classref-item-separator diff --git a/classes/class_editorexportplatformwindows.rst b/classes/class_editorexportplatformwindows.rst index 1ffcb1d4826..16f1fdb5692 100644 --- a/classes/class_editorexportplatformwindows.rst +++ b/classes/class_editorexportplatformwindows.rst @@ -166,7 +166,7 @@ File description to be presented to users. Required. See `StringFileInfo ` **application/file_version** -Version number of the file. Required. See `StringFileInfo `__. +Version number of the file. Falls back to :ref:`ProjectSettings.application/config/version` if left empty. See `StringFileInfo `__. .. rst-class:: classref-item-separator @@ -178,7 +178,7 @@ Version number of the file. Required. See `StringFileInfo ` **application/icon** -Application icon file. If left empty, it will fallback to :ref:`ProjectSettings.application/config/windows_native_icon`, and then to :ref:`ProjectSettings.application/config/icon`. +Application icon file. If left empty, it will fallback to :ref:`ProjectSettings.application/config/windows_native_icon`, and then to :ref:`ProjectSettings.application/config/icon`. .. rst-class:: classref-item-separator @@ -226,7 +226,7 @@ Name of the application. Required. See `StringFileInfo ` **application/product_version** -Application version visible to the user. Required. See `StringFileInfo `__. +Application version visible to the user. Falls back to :ref:`ProjectSettings.application/config/version` if left empty. See `StringFileInfo `__. .. rst-class:: classref-item-separator diff --git a/classes/class_editorexportplugin.rst b/classes/class_editorexportplugin.rst index 94900d7b088..dfeab05520c 100644 --- a/classes/class_editorexportplugin.rst +++ b/classes/class_editorexportplugin.rst @@ -167,7 +167,7 @@ Implementing this method is required if :ref:`_begin_customize_resources` returns ``true``. +Implementing this method is required if :ref:`_begin_customize_scenes` returns ``true``. .. rst-class:: classref-item-separator @@ -277,7 +277,7 @@ For more information see `Gradle documentation on dependency management ` to be enabled. diff --git a/classes/class_editorinterface.rst b/classes/class_editorinterface.rst index 031e8aa2e49..07b4bbeb8f1 100644 --- a/classes/class_editorinterface.rst +++ b/classes/class_editorinterface.rst @@ -21,7 +21,21 @@ Description **EditorInterface** gives you control over Godot editor's window. It allows customizing the window, saving and (re-)loading scenes, rendering mesh previews, inspecting and editing resources and objects, and provides access to :ref:`EditorSettings`, :ref:`EditorFileSystem`, :ref:`EditorResourcePreview`, :ref:`ScriptEditor`, the editor viewport, and information about scenes. -\ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorPlugin.get_editor_interface`. +\ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton directly by its name. + + +.. tabs:: + + .. code-tab:: gdscript + + var editor_settings = EditorInterface.get_editor_settings() + + .. code-tab:: csharp + + // In C# you can access it via the static Singleton property. + EditorSettings settings = EditorInterface.Singleton.GetEditorSettings(); + + .. rst-class:: classref-reftable-group diff --git a/classes/class_editorplugin.rst b/classes/class_editorplugin.rst index 94bdfadd55a..0825b7b811c 100644 --- a/classes/class_editorplugin.rst +++ b/classes/class_editorplugin.rst @@ -830,7 +830,7 @@ Ideally, the plugin icon should be white with a transparent background and 16x16 # You can use a custom icon: return preload("res://addons/my_plugin/my_plugin_icon.svg") # Or use a built-in icon: - return get_editor_interface().get_base_control().get_theme_icon("Node", "EditorIcons") + return EditorInterface.get_base_control().get_theme_icon("Node", "EditorIcons") .. code-tab:: csharp @@ -839,7 +839,7 @@ Ideally, the plugin icon should be white with a transparent background and 16x16 // You can use a custom icon: return ResourceLoader.Load("res://addons/my_plugin/my_plugin_icon.svg"); // Or use a built-in icon: - return GetEditorInterface().GetBaseControl().GetThemeIcon("Node", "EditorIcons"); + return EditorInterface.Singleton.GetBaseControl().GetThemeIcon("Node", "EditorIcons"); } @@ -976,7 +976,7 @@ Use :ref:`_get_plugin_name` and :ref func _enter_tree(): plugin_control = preload("my_plugin_control.tscn").instantiate() - get_editor_interface().get_editor_main_screen().add_child(plugin_control) + EditorInterface.get_editor_main_screen().add_child(plugin_control) plugin_control.hide() func _has_main_screen(): @@ -989,7 +989,7 @@ Use :ref:`_get_plugin_name` and :ref return "My Super Cool Plugin 3000" func _get_plugin_icon(): - return get_editor_interface().get_base_control().get_theme_icon("Node", "EditorIcons") + return EditorInterface.get_base_control().get_theme_icon("Node", "EditorIcons") .. rst-class:: classref-item-separator @@ -1323,7 +1323,9 @@ The callback should have 4 arguments: :ref:`Object` ``undo_redo``, :ref:`EditorInterface` **get_editor_interface** **(** **)** -Returns the :ref:`EditorInterface` singleton. It provides access to some parts of the editor GUI as well as various inner states and tools. +Returns the :ref:`EditorInterface` singleton instance. + +\ *Deprecated.* :ref:`EditorInterface` is a global singleton and can be accessed directly by its name. .. rst-class:: classref-item-separator diff --git a/classes/class_editorscript.rst b/classes/class_editorscript.rst index 8023455c71e..ca6a07cdff2 100644 --- a/classes/class_editorscript.rst +++ b/classes/class_editorscript.rst @@ -116,6 +116,8 @@ Adds ``node`` as a child of the root node in the editor context. Returns the :ref:`EditorInterface` singleton instance. +\ *Deprecated.* :ref:`EditorInterface` is a global singleton and can be accessed directly by its name. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_editorsettings.rst b/classes/class_editorsettings.rst index 67b7d6e3a4f..9359b43a0d7 100644 --- a/classes/class_editorsettings.rst +++ b/classes/class_editorsettings.rst @@ -30,7 +30,7 @@ Accessing the settings can be done using the following methods, such as: .. code-tab:: gdscript - var settings = get_editor_interface().get_editor_settings() + var settings = EditorInterface.get_editor_settings() # `settings.set("some/property", 10)` also works as this class overrides `_set()` internally. settings.set_setting("some/property", 10) # `settings.get("some/property")` also works as this class overrides `_get()` internally. @@ -39,7 +39,7 @@ Accessing the settings can be done using the following methods, such as: .. code-tab:: csharp - EditorSettings settings = GetEditorInterface().GetEditorSettings(); + EditorSettings settings = EditorInterface.Singleton.GetEditorSettings(); // `settings.set("some/property", value)` also works as this class overrides `_set()` internally. settings.SetSetting("some/property", Value); // `settings.get("some/property", value)` also works as this class overrides `_get()` internally. diff --git a/classes/class_fileaccess.rst b/classes/class_fileaccess.rst index ad721e3418f..0202a19043f 100644 --- a/classes/class_fileaccess.rst +++ b/classes/class_fileaccess.rst @@ -91,103 +91,115 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`close` **(** **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`eof_reached` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`file_exists` **(** :ref:`String` path **)** |static| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`flush` **(** **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_8` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_16` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_32` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_64` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_as_text` **(** :ref:`bool` skip_cr=false **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray` | :ref:`get_buffer` **(** :ref:`int` length **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`get_csv_line` **(** :ref:`String` delim="," **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_double` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`get_error` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray` | :ref:`get_file_as_bytes` **(** :ref:`String` path **)** |static| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_file_as_string` **(** :ref:`String` path **)** |static| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_float` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_length` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_line` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_md5` **(** :ref:`String` path **)** |static| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_modified_time` **(** :ref:`String` file **)** |static| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`get_open_error` **(** **)** |static| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_pascal_string` **(** **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_path` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_path_absolute` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_position` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_real` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_sha256` **(** :ref:`String` path **)** |static| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`get_var` **(** :ref:`bool` allow_objects=false **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_open` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`FileAccess` | :ref:`open` **(** :ref:`String` path, :ref:`ModeFlags` flags **)** |static| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`FileAccess` | :ref:`open_compressed` **(** :ref:`String` path, :ref:`ModeFlags` mode_flags, :ref:`CompressionMode` compression_mode=0 **)** |static| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`FileAccess` | :ref:`open_encrypted` **(** :ref:`String` path, :ref:`ModeFlags` mode_flags, :ref:`PackedByteArray` key **)** |static| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`FileAccess` | :ref:`open_encrypted_with_pass` **(** :ref:`String` path, :ref:`ModeFlags` mode_flags, :ref:`String` pass **)** |static| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`seek` **(** :ref:`int` position **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`seek_end` **(** :ref:`int` position=0 **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`store_8` **(** :ref:`int` value **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`store_16` **(** :ref:`int` value **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`store_32` **(** :ref:`int` value **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`store_64` **(** :ref:`int` value **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`store_buffer` **(** :ref:`PackedByteArray` buffer **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`store_csv_line` **(** :ref:`PackedStringArray` values, :ref:`String` delim="," **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`store_double` **(** :ref:`float` value **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`store_float` **(** :ref:`float` value **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`store_line` **(** :ref:`String` line **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`store_pascal_string` **(** :ref:`String` string **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`store_real` **(** :ref:`float` value **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`store_string` **(** :ref:`String` string **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`store_var` **(** :ref:`Variant` value, :ref:`bool` full_objects=false **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`close` **(** **)** | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`eof_reached` **(** **)** |const| | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`file_exists` **(** :ref:`String` path **)** |static| | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`flush` **(** **)** | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_8` **(** **)** |const| | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_16` **(** **)** |const| | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_32` **(** **)** |const| | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_64` **(** **)** |const| | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_as_text` **(** :ref:`bool` skip_cr=false **)** |const| | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`get_buffer` **(** :ref:`int` length **)** |const| | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_csv_line` **(** :ref:`String` delim="," **)** |const| | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_double` **(** **)** |const| | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`get_error` **(** **)** |const| | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`get_file_as_bytes` **(** :ref:`String` path **)** |static| | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_file_as_string` **(** :ref:`String` path **)** |static| | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_float` **(** **)** |const| | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_hidden_attribute` **(** :ref:`String` file **)** |static| | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_length` **(** **)** |const| | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_line` **(** **)** |const| | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_md5` **(** :ref:`String` path **)** |static| | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_modified_time` **(** :ref:`String` file **)** |static| | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`get_open_error` **(** **)** |static| | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_pascal_string` **(** **)** | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_path` **(** **)** |const| | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_path_absolute` **(** **)** |const| | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_position` **(** **)** |const| | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_read_only_attribute` **(** :ref:`String` file **)** |static| | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_real` **(** **)** |const| | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_sha256` **(** :ref:`String` path **)** |static| | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |bitfield|\<:ref:`UnixPermissionFlags`\> | :ref:`get_unix_permissions` **(** :ref:`String` file **)** |static| | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_var` **(** :ref:`bool` allow_objects=false **)** |const| | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_open` **(** **)** |const| | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`FileAccess` | :ref:`open` **(** :ref:`String` path, :ref:`ModeFlags` flags **)** |static| | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`FileAccess` | :ref:`open_compressed` **(** :ref:`String` path, :ref:`ModeFlags` mode_flags, :ref:`CompressionMode` compression_mode=0 **)** |static| | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`FileAccess` | :ref:`open_encrypted` **(** :ref:`String` path, :ref:`ModeFlags` mode_flags, :ref:`PackedByteArray` key **)** |static| | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`FileAccess` | :ref:`open_encrypted_with_pass` **(** :ref:`String` path, :ref:`ModeFlags` mode_flags, :ref:`String` pass **)** |static| | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`seek` **(** :ref:`int` position **)** | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`seek_end` **(** :ref:`int` position=0 **)** | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`set_hidden_attribute` **(** :ref:`String` file, :ref:`bool` hidden **)** |static| | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`set_read_only_attribute` **(** :ref:`String` file, :ref:`bool` ro **)** |static| | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`set_unix_permissions` **(** :ref:`String` file, |bitfield|\<:ref:`UnixPermissionFlags`\> permissions **)** |static| | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`store_8` **(** :ref:`int` value **)** | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`store_16` **(** :ref:`int` value **)** | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`store_32` **(** :ref:`int` value **)** | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`store_64` **(** :ref:`int` value **)** | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`store_buffer` **(** :ref:`PackedByteArray` buffer **)** | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`store_csv_line` **(** :ref:`PackedStringArray` values, :ref:`String` delim="," **)** | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`store_double` **(** :ref:`float` value **)** | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`store_float` **(** :ref:`float` value **)** | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`store_line` **(** :ref:`String` line **)** | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`store_pascal_string` **(** :ref:`String` string **)** | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`store_real` **(** :ref:`float` value **)** | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`store_string` **(** :ref:`String` string **)** | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`store_var` **(** :ref:`Variant` value, :ref:`bool` full_objects=false **)** | + +-------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -286,6 +298,112 @@ Uses the `gzip `__ compression method. Uses the `brotli `__ compression method (only decompression is supported). +.. rst-class:: classref-item-separator + +---- + +.. _enum_FileAccess_UnixPermissionFlags: + +.. rst-class:: classref-enumeration + +flags **UnixPermissionFlags**: + +.. _class_FileAccess_constant_UNIX_READ_OWNER: + +.. rst-class:: classref-enumeration-constant + +:ref:`UnixPermissionFlags` **UNIX_READ_OWNER** = ``256`` + +Read for owner bit. + +.. _class_FileAccess_constant_UNIX_WRITE_OWNER: + +.. rst-class:: classref-enumeration-constant + +:ref:`UnixPermissionFlags` **UNIX_WRITE_OWNER** = ``128`` + +Write for owner bit. + +.. _class_FileAccess_constant_UNIX_EXECUTE_OWNER: + +.. rst-class:: classref-enumeration-constant + +:ref:`UnixPermissionFlags` **UNIX_EXECUTE_OWNER** = ``64`` + +Execute for owner bit. + +.. _class_FileAccess_constant_UNIX_READ_GROUP: + +.. rst-class:: classref-enumeration-constant + +:ref:`UnixPermissionFlags` **UNIX_READ_GROUP** = ``32`` + +Read for group bit. + +.. _class_FileAccess_constant_UNIX_WRITE_GROUP: + +.. rst-class:: classref-enumeration-constant + +:ref:`UnixPermissionFlags` **UNIX_WRITE_GROUP** = ``16`` + +Write for group bit. + +.. _class_FileAccess_constant_UNIX_EXECUTE_GROUP: + +.. rst-class:: classref-enumeration-constant + +:ref:`UnixPermissionFlags` **UNIX_EXECUTE_GROUP** = ``8`` + +Execute for group bit. + +.. _class_FileAccess_constant_UNIX_READ_OTHER: + +.. rst-class:: classref-enumeration-constant + +:ref:`UnixPermissionFlags` **UNIX_READ_OTHER** = ``4`` + +Read for other bit. + +.. _class_FileAccess_constant_UNIX_WRITE_OTHER: + +.. rst-class:: classref-enumeration-constant + +:ref:`UnixPermissionFlags` **UNIX_WRITE_OTHER** = ``2`` + +Write for other bit. + +.. _class_FileAccess_constant_UNIX_EXECUTE_OTHER: + +.. rst-class:: classref-enumeration-constant + +:ref:`UnixPermissionFlags` **UNIX_EXECUTE_OTHER** = ``1`` + +Execute for other bit. + +.. _class_FileAccess_constant_UNIX_SET_USER_ID: + +.. rst-class:: classref-enumeration-constant + +:ref:`UnixPermissionFlags` **UNIX_SET_USER_ID** = ``2048`` + +Set user id on execution bit. + +.. _class_FileAccess_constant_UNIX_SET_GROUP_ID: + +.. rst-class:: classref-enumeration-constant + +:ref:`UnixPermissionFlags` **UNIX_SET_GROUP_ID** = ``1024`` + +Set group id on execution bit. + +.. _class_FileAccess_constant_UNIX_RESTRICTED_DELETE: + +.. rst-class:: classref-enumeration-constant + +:ref:`UnixPermissionFlags` **UNIX_RESTRICTED_DELETE** = ``512`` + +Restricted deletion (sticky) bit. + .. rst-class:: classref-section-separator ---- @@ -554,6 +672,20 @@ Returns the next 32 bits from the file as a floating-point number. ---- +.. _class_FileAccess_method_get_hidden_attribute: + +.. rst-class:: classref-method + +:ref:`bool` **get_hidden_attribute** **(** :ref:`String` file **)** |static| + +Returns ``true``, if file ``hidden`` attribute is set. + +\ **Note:** This method is implemented on iOS, BSD, macOS, and Windows. + +.. rst-class:: classref-item-separator + +---- + .. _class_FileAccess_method_get_length: .. rst-class:: classref-method @@ -666,6 +798,20 @@ Returns the file cursor's position. ---- +.. _class_FileAccess_method_get_read_only_attribute: + +.. rst-class:: classref-method + +:ref:`bool` **get_read_only_attribute** **(** :ref:`String` file **)** |static| + +Returns ``true``, if file ``read only`` attribute is set. + +\ **Note:** This method is implemented on iOS, BSD, macOS, and Windows. + +.. rst-class:: classref-item-separator + +---- + .. _class_FileAccess_method_get_real: .. rst-class:: classref-method @@ -690,6 +836,20 @@ Returns a SHA-256 :ref:`String` representing the file at the given ---- +.. _class_FileAccess_method_get_unix_permissions: + +.. rst-class:: classref-method + +|bitfield|\<:ref:`UnixPermissionFlags`\> **get_unix_permissions** **(** :ref:`String` file **)** |static| + +Returns file UNIX permissions. + +\ **Note:** This method is implemented on iOS, Linux/BSD, and macOS. + +.. rst-class:: classref-item-separator + +---- + .. _class_FileAccess_method_get_var: .. rst-class:: classref-method @@ -804,6 +964,48 @@ Changes the file reading/writing cursor to the specified position (in bytes from ---- +.. _class_FileAccess_method_set_hidden_attribute: + +.. rst-class:: classref-method + +:ref:`Error` **set_hidden_attribute** **(** :ref:`String` file, :ref:`bool` hidden **)** |static| + +Sets file ``hidden`` attribute. + +\ **Note:** This method is implemented on iOS, BSD, macOS, and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_FileAccess_method_set_read_only_attribute: + +.. rst-class:: classref-method + +:ref:`Error` **set_read_only_attribute** **(** :ref:`String` file, :ref:`bool` ro **)** |static| + +Sets file ``read only`` attribute. + +\ **Note:** This method is implemented on iOS, BSD, macOS, and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_FileAccess_method_set_unix_permissions: + +.. rst-class:: classref-method + +:ref:`Error` **set_unix_permissions** **(** :ref:`String` file, |bitfield|\<:ref:`UnixPermissionFlags`\> permissions **)** |static| + +Sets file UNIX permissions. + +\ **Note:** This method is implemented on iOS, Linux/BSD, and macOS. + +.. rst-class:: classref-item-separator + +---- + .. _class_FileAccess_method_store_8: .. rst-class:: classref-method diff --git a/classes/class_float.rst b/classes/class_float.rst index df14c36d046..cce7f598703 100644 --- a/classes/class_float.rst +++ b/classes/class_float.rst @@ -228,7 +228,7 @@ Multiplies each component of the :ref:`Color`, including the alpha, :: - print(1.5 * Color(0.5, 0.5, 0.5)) # Color(0.75, 0.75, 0.75) + print(1.5 * Color(0.5, 0.5, 0.5)) # Prints "(0.75, 0.75, 0.75, 1.5)" .. rst-class:: classref-item-separator diff --git a/classes/class_font.rst b/classes/class_font.rst index 797ba1fa1d8..09e33e0d63d 100644 --- a/classes/class_font.rst +++ b/classes/class_font.rst @@ -25,6 +25,18 @@ Abstract base class for different font types. It has methods for drawing text an .. rst-class:: classref-reftable-group +Properties +---------- + +.. table:: + :widths: auto + + +---------------------------+-------------------------------------------------+--------+ + | :ref:`Font[]` | :ref:`fallbacks` | ``[]`` | + +---------------------------+-------------------------------------------------+--------+ + +.. rst-class:: classref-reftable-group + Methods ------- @@ -54,8 +66,6 @@ Methods +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_face_count` **(** **)** |const| | +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Font[]` | :ref:`get_fallbacks` **(** **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_font_name` **(** **)** |const| | +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_font_stretch` **(** **)** |const| | @@ -98,8 +108,30 @@ Methods +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_cache_capacity` **(** :ref:`int` single_line, :ref:`int` multi_line **)** | +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_fallbacks` **(** :ref:`Font[]` fallbacks **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_Font_property_fallbacks: + +.. rst-class:: classref-property + +:ref:`Font[]` **fallbacks** = ``[]`` + +.. rst-class:: classref-property-setget + +- void **set_fallbacks** **(** :ref:`Font[]` value **)** +- :ref:`Font[]` **get_fallbacks** **(** **)** + +Array of fallback **Font**\ s to use as a substitute if a glyph is not found in this current **Font**. + +If this array is empty in a :ref:`FontVariation`, the :ref:`FontVariation.base_font`'s fallbacks are used instead. .. rst-class:: classref-section-separator @@ -260,18 +292,6 @@ Returns number of faces in the TrueType / OpenType collection. ---- -.. _class_Font_method_get_fallbacks: - -.. rst-class:: classref-method - -:ref:`Font[]` **get_fallbacks** **(** **)** |const| - -Returns array of fallback **Font**\ s. - -.. rst-class:: classref-item-separator - ----- - .. _class_Font_method_get_font_name: .. rst-class:: classref-method @@ -566,18 +586,6 @@ void **set_cache_capacity** **(** :ref:`int` single_line, :ref:`int` fallbacks **)** - -Sets array of fallback **Font**\ s. - .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to 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_fontfile.rst b/classes/class_fontfile.rst index 7b0a4571a75..d662b544fce 100644 --- a/classes/class_fontfile.rst +++ b/classes/class_fontfile.rst @@ -71,8 +71,6 @@ Properties +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`PackedByteArray` | :ref:`data` | ``PackedByteArray()`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`Font[]` | :ref:`fallbacks` | ``[]`` | - +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`int` | :ref:`fixed_size` | ``0`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`String` | :ref:`font_name` | ``""`` | @@ -300,23 +298,6 @@ Contents of the dynamic font source file. ---- -.. _class_FontFile_property_fallbacks: - -.. rst-class:: classref-property - -:ref:`Font[]` **fallbacks** = ``[]`` - -.. rst-class:: classref-property-setget - -- void **set_fallbacks** **(** :ref:`Font[]` value **)** -- :ref:`Font[]` **get_fallbacks** **(** **)** - -Array of fallback :ref:`Font`\ s. - -.. rst-class:: classref-item-separator - ----- - .. _class_FontFile_property_fixed_size: .. rst-class:: classref-property diff --git a/classes/class_fontvariation.rst b/classes/class_fontvariation.rst index a6c8cbab1b1..1c17d2f0be9 100644 --- a/classes/class_fontvariation.rst +++ b/classes/class_fontvariation.rst @@ -64,8 +64,6 @@ Properties +---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Font` | :ref:`base_font` | | +---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Font[]` | :ref:`fallbacks` | ``[]`` | - +---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Dictionary` | :ref:`opentype_features` | ``{}`` | +---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ | :ref:`int` | :ref:`spacing_bottom` | ``0`` | @@ -123,23 +121,6 @@ Base font used to create a variation. If not set, default :ref:`Theme` **fallbacks** = ``[]`` - -.. rst-class:: classref-property-setget - -- void **set_fallbacks** **(** :ref:`Font[]` value **)** -- :ref:`Font[]` **get_fallbacks** **(** **)** - -Array of fallback :ref:`Font`\ s to use as a substitute if a glyph is not found in this **FontVariation**. If not set, :ref:`base_font`'s fallbacks are used instead. - -.. rst-class:: classref-item-separator - ----- - .. _class_FontVariation_property_opentype_features: .. rst-class:: classref-property diff --git a/classes/class_geometry3d.rst b/classes/class_geometry3d.rst index 749414a9819..35bf6bb3676 100644 --- a/classes/class_geometry3d.rst +++ b/classes/class_geometry3d.rst @@ -44,6 +44,8 @@ Methods +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedVector3Array` | :ref:`get_closest_points_between_segments` **(** :ref:`Vector3` p1, :ref:`Vector3` p2, :ref:`Vector3` q1, :ref:`Vector3` q2 **)** | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_triangle_barycentric_coords` **(** :ref:`Vector3` point, :ref:`Vector3` a, :ref:`Vector3` b, :ref:`Vector3` c **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`ray_intersects_triangle` **(** :ref:`Vector3` from, :ref:`Vector3` dir, :ref:`Vector3` a, :ref:`Vector3` b, :ref:`Vector3` c **)** | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedVector3Array` | :ref:`segment_intersects_convex` **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`Plane[]` planes **)** | @@ -148,6 +150,20 @@ Given the two 3D segments (``p1``, ``p2``) and (``q1``, ``q2``), finds those two ---- +.. _class_Geometry3D_method_get_triangle_barycentric_coords: + +.. rst-class:: classref-method + +:ref:`Vector3` **get_triangle_barycentric_coords** **(** :ref:`Vector3` point, :ref:`Vector3` a, :ref:`Vector3` b, :ref:`Vector3` c **)** + +Returns a :ref:`Vector3` containing weights based on how close a 3D position (``point``) is to a triangle's different vertices (``a``, ``b`` and ``c``). This is useful for interpolating between the data of different vertices in a triangle. One example use case is using this to smoothly rotate over a mesh instead of relying solely on face normals. + +\ `Here is a more detailed explanation of barycentric coordinates. `__ + +.. rst-class:: classref-item-separator + +---- + .. _class_Geometry3D_method_ray_intersects_triangle: .. rst-class:: classref-method diff --git a/classes/class_gltfdocument.rst b/classes/class_gltfdocument.rst index 68aff7c049a..cdd1de20dcc 100644 --- a/classes/class_gltfdocument.rst +++ b/classes/class_gltfdocument.rst @@ -12,12 +12,27 @@ GLTFDocument **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +Class for importing and exporting glTF files in and out of Godot. + .. rst-class:: classref-introduction-group Description ----------- -Append a glTF2 3d format from a file, buffer or scene and then write to the filesystem, buffer or scene. +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. + +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 can be extended with arbitrary functionality by extending the :ref:`GLTFDocumentExtension` class and registering it with GLTFDocument via :ref:`register_gltf_document_extension`. This allows for custom data to be imported and exported. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- `glTF 'What the duck?' guide `__ + +- `Khronos glTF specification `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_gltfdocumentextension.rst b/classes/class_gltfdocumentextension.rst index 3f3e4792878..94bdd6b8dfd 100644 --- a/classes/class_gltfdocumentextension.rst +++ b/classes/class_gltfdocumentextension.rst @@ -44,8 +44,12 @@ Methods +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`_export_preflight` **(** :ref:`GLTFState` state, :ref:`Node` root **)** |virtual| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_export_preserialize` **(** :ref:`GLTFState` state **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Node3D` | :ref:`_generate_scene_node` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Node` scene_parent **)** |virtual| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_image_file_extension` **(** **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`_get_supported_extensions` **(** **)** |virtual| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`_import_node` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Dictionary` json, :ref:`Node` node **)** |virtual| | @@ -78,7 +82,7 @@ Method Descriptions void **_convert_scene_node** **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Node` scene_node **)** |virtual| -Part of the export process. This method is run after :ref:`_export_preflight` and before :ref:`_export_node`. +Part of the export process. This method is run after :ref:`_export_preflight` and before :ref:`_export_preserialize`. 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`. @@ -92,7 +96,7 @@ Runs when converting the data from a Godot scene node. This method can be used t :ref:`Error` **_export_node** **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Dictionary` json, :ref:`Node` node **)** |virtual| -Part of the export process. This method is run after :ref:`_convert_scene_node` and before :ref:`_export_post`. +Part of the export process. This method is run after :ref:`_export_preserialize` and before :ref:`_export_post`. This method can be used to modify the final JSON of each node. @@ -128,6 +132,20 @@ The return value is used to determine if this **GLTFDocumentExtension** instance ---- +.. _class_GLTFDocumentExtension_method__export_preserialize: + +.. rst-class:: classref-method + +:ref:`Error` **_export_preserialize** **(** :ref:`GLTFState` state **)** |virtual| + +Part of the export process. This method is run after :ref:`_convert_scene_node` and before :ref:`_export_node`. + +This method can be used to alter the state before performing serialization. It runs every time when generating a buffer with :ref:`GLTFDocument.generate_buffer` or writing to the file system with :ref:`GLTFDocument.write_to_filesystem`. + +.. rst-class:: classref-item-separator + +---- + .. _class_GLTFDocumentExtension_method__generate_scene_node: .. rst-class:: classref-method @@ -142,6 +160,18 @@ Runs when generating a Godot scene node from a GLTFNode. The returned node will ---- +.. _class_GLTFDocumentExtension_method__get_image_file_extension: + +.. rst-class:: classref-method + +:ref:`String` **_get_image_file_extension** **(** **)** |virtual| + +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. + +.. rst-class:: classref-item-separator + +---- + .. _class_GLTFDocumentExtension_method__get_supported_extensions: .. rst-class:: classref-method diff --git a/classes/class_gltfstate.rst b/classes/class_gltfstate.rst index 649bd9493b6..a1ed21a262e 100644 --- a/classes/class_gltfstate.rst +++ b/classes/class_gltfstate.rst @@ -23,6 +23,13 @@ Contains all nodes and resources of a GLTF file. This is used by :ref:`GLTFDocum GLTFState can be populated by :ref:`GLTFDocument` reading a file or by converting a Godot scene. Then the data can either be used to create a Godot scene or save to a GLTF file. The code that converts to/from a Godot scene can be intercepted at arbitrary points by :ref:`GLTFDocumentExtension` classes. This allows for custom data to be stored in the GLTF file or for custom data to be converted to/from Godot nodes. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- `GLTF asset header schema `__ + .. rst-class:: classref-reftable-group Properties @@ -36,8 +43,12 @@ Properties +-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ | :ref:`PackedByteArray[]` | :ref:`buffers` | ``[]`` | +-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ + | :ref:`String` | :ref:`copyright` | ``""`` | + +-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ | :ref:`bool` | :ref:`create_animations` | ``true`` | +-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ + | :ref:`String` | :ref:`filename` | ``""`` | + +-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ | :ref:`PackedByteArray` | :ref:`glb_data` | ``PackedByteArray()`` | +-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ | :ref:`Dictionary` | :ref:`json` | ``{}`` | @@ -202,9 +213,7 @@ Property Descriptions - void **set_base_path** **(** :ref:`String` value **)** - :ref:`String` **get_base_path** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +The folder path associated with this GLTF data. This is used to find other files the GLTF file references, like images or binary buffers. This will be set during import when appending from a file, and will be set during export when writing to a file. .. rst-class:: classref-item-separator @@ -229,6 +238,23 @@ Property Descriptions ---- +.. _class_GLTFState_property_copyright: + +.. rst-class:: classref-property + +:ref:`String` **copyright** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_copyright** **(** :ref:`String` value **)** +- :ref:`String` **get_copyright** **(** **)** + +The copyright string in the asset header of the GLTF file. This is set during import if present and export if non-empty. See the GLTF asset header documentation for more information. + +.. rst-class:: classref-item-separator + +---- + .. _class_GLTFState_property_create_animations: .. rst-class:: classref-property @@ -248,6 +274,23 @@ Property Descriptions ---- +.. _class_GLTFState_property_filename: + +.. rst-class:: classref-property + +:ref:`String` **filename** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_filename** **(** :ref:`String` value **)** +- :ref:`String` **get_filename** **(** **)** + +The file name associated with this GLTF data. If it ends with ``.gltf``, this is text-based GLTF, otherwise this is binary GLB. This will be set during import when appending from a file, and will be set during export when writing to a file. If writing to a buffer, this will be an empty string. + +.. rst-class:: classref-item-separator + +---- + .. _class_GLTFState_property_glb_data: .. rst-class:: classref-property diff --git a/classes/class_image.rst b/classes/class_image.rst index d45bcc35781..19ea6283365 100644 --- a/classes/class_image.rst +++ b/classes/class_image.rst @@ -133,6 +133,8 @@ Methods +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`load_bmp_from_buffer` **(** :ref:`PackedByteArray` buffer **)** | +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`load_dds_from_buffer` **(** :ref:`PackedByteArray` buffer **)** | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Image` | :ref:`load_from_file` **(** :ref:`String` path **)** |static| | +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`load_jpg_from_buffer` **(** :ref:`PackedByteArray` buffer **)** | @@ -1366,6 +1368,18 @@ Loads an image from the binary contents of a BMP file. ---- +.. _class_Image_method_load_dds_from_buffer: + +.. rst-class:: classref-method + +:ref:`Error` **load_dds_from_buffer** **(** :ref:`PackedByteArray` buffer **)** + +Loads an image from the binary contents of a DDS file. + +.. rst-class:: classref-item-separator + +---- + .. _class_Image_method_load_from_file: .. rst-class:: classref-method diff --git a/classes/class_input.rst b/classes/class_input.rst index 53d522058f6..39a39c841dc 100644 --- a/classes/class_input.rst +++ b/classes/class_input.rst @@ -85,6 +85,8 @@ Methods +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_joy_guid` **(** :ref:`int` device **)** |const| | +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_joy_info` **(** :ref:`int` device **)** |const| | + +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_joy_name` **(** :ref:`int` device **)** | +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_joy_vibration_duration` **(** :ref:`int` device **)** | @@ -608,6 +610,32 @@ Returns a SDL2-compatible device GUID on platforms that use gamepad remapping, e ---- +.. _class_Input_method_get_joy_info: + +.. rst-class:: classref-method + +:ref:`Dictionary` **get_joy_info** **(** :ref:`int` device **)** |const| + +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: + +\ ``xinput_index``: The index of the controller in the XInput system. + +On Linux: + +\ ``raw_name``: The name of the controller as it came from the OS, before getting renamed by the godot controller database. + +\ ``vendor_id``: The USB vendor ID of the device. + +\ ``product_id``: The USB product ID of the device. + +\ ``steam_input_index``: The Steam Input gamepad index, if the device is not a Steam Input device this key won't be present. + +.. rst-class:: classref-item-separator + +---- + .. _class_Input_method_get_joy_name: .. rst-class:: classref-method diff --git a/classes/class_lineedit.rst b/classes/class_lineedit.rst index 16ceebbb95a..05c889b226a 100644 --- a/classes/class_lineedit.rst +++ b/classes/class_lineedit.rst @@ -90,6 +90,8 @@ Properties +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`deselect_on_focus_loss_enabled` | ``true`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`drag_and_drop_selection_enabled` | ``true`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`draw_control_chars` | ``false`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`editable` | ``true`` | @@ -767,6 +769,23 @@ If ``true``, the selected text will be deselected when focus is lost. ---- +.. _class_LineEdit_property_drag_and_drop_selection_enabled: + +.. rst-class:: classref-property + +:ref:`bool` **drag_and_drop_selection_enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_drag_and_drop_selection_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_drag_and_drop_selection_enabled** **(** **)** + +If ``true``, allow drag and drop of selected text. + +.. rst-class:: classref-item-separator + +---- + .. _class_LineEdit_property_draw_control_chars: .. rst-class:: classref-property diff --git a/classes/class_menubutton.rst b/classes/class_menubutton.rst index 6790e986e6c..f0dbd7069e9 100644 --- a/classes/class_menubutton.rst +++ b/classes/class_menubutton.rst @@ -82,7 +82,7 @@ Theme Properties +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Color` | :ref:`font_pressed_color` | ``Color(1, 1, 1, 1)`` | +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`h_separation` | ``3`` | + | :ref:`int` | :ref:`h_separation` | ``4`` | +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ | :ref:`int` | :ref:`outline_size` | ``0`` | +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ @@ -285,7 +285,7 @@ Text :ref:`Color` used when the **MenuButton** is being pressed. .. rst-class:: classref-themeproperty -:ref:`int` **h_separation** = ``3`` +:ref:`int` **h_separation** = ``4`` The horizontal space between **MenuButton**'s icon and text. Negative values will be treated as ``0`` when used. diff --git a/classes/class_mesh.rst b/classes/class_mesh.rst index 58252817b5e..72bc5f0f840 100644 --- a/classes/class_mesh.rst +++ b/classes/class_mesh.rst @@ -277,7 +277,7 @@ Contains custom color channel 3. :ref:`PackedByteArray` i :ref:`ArrayType` **ARRAY_INDEX** = ``12`` -:ref:`PackedInt32Array` of integers used as indices referencing vertices, colors, normals, tangents, and textures. All of those arrays must have the same number of elements as the vertex array. No index can be beyond the vertex array size. When this index array is present, it puts the function into "index mode," where the index selects the \*i\*'th vertex, normal, tangent, color, UV, etc. This means if you want to have different normals or colors along an edge, you have to duplicate the vertices. +:ref:`PackedInt32Array` of integers used as indices referencing vertices, colors, normals, tangents, and textures. All of those arrays must have the same number of elements as the vertex array. No index can be beyond the vertex array size. When this index array is present, it puts the function into "index mode," where the index selects the *i*'th vertex, normal, tangent, color, UV, etc. This means if you want to have different normals or colors along an edge, you have to duplicate the vertices. For triangles, the index array is interpreted as triples, referring to the vertices of each triangle. For lines, the index array is in pairs indicating the start and end of each line. diff --git a/classes/class_navigationagent2d.rst b/classes/class_navigationagent2d.rst index 205b98b96d5..ee068ec0c31 100644 --- a/classes/class_navigationagent2d.rst +++ b/classes/class_navigationagent2d.rst @@ -486,7 +486,7 @@ The distance to search for other agents. - void **set_path_desired_distance** **(** :ref:`float` value **)** - :ref:`float` **get_path_desired_distance** **(** **)** -The distance threshold before a path point is considered to be reached. This allows agents to not have to hit a path point on the path exactly, but only to reach its general area. If this value is set too high, the NavigationAgent will skip points on the path, which can lead too leaving the navigation mesh. If this value is set too low, the NavigationAgent will be stuck in a repath loop because it will constantly overshoot or undershoot the distance to the next point on each physics frame update. +The distance threshold before a path point is considered to be reached. This allows agents to not have to hit a path point on the path exactly, but only to reach its general area. If this value is set too high, the NavigationAgent will skip points on the path, which can lead to leaving the navigation mesh. If this value is set too low, the NavigationAgent will be stuck in a repath loop because it will constantly overshoot or undershoot the distance to the next point on each physics frame update. .. rst-class:: classref-item-separator diff --git a/classes/class_navigationmeshsourcegeometrydata3d.rst b/classes/class_navigationmeshsourcegeometrydata3d.rst index 11a11ce9447..300140916e8 100644 --- a/classes/class_navigationmeshsourcegeometrydata3d.rst +++ b/classes/class_navigationmeshsourcegeometrydata3d.rst @@ -136,7 +136,7 @@ Returns the parsed source geometry data vertices array. :ref:`bool` **has_data** **(** **)** -Returns **true** when parsed source geometry data exists. +Returns ``true`` when parsed source geometry data exists. .. rst-class:: classref-item-separator diff --git a/classes/class_navigationserver2d.rst b/classes/class_navigationserver2d.rst index fd92be34e15..40fbe9442c2 100644 --- a/classes/class_navigationserver2d.rst +++ b/classes/class_navigationserver2d.rst @@ -366,7 +366,7 @@ Sets the callback :ref:`Callable` that gets called after each av void **agent_set_avoidance_enabled** **(** :ref:`RID` agent, :ref:`bool` enabled **)** -If ``enabled`` is ``true`` the specified ``agent`` uses avoidance. +If ``enabled`` is ``true``, the specified ``agent`` uses avoidance. .. rst-class:: classref-item-separator @@ -716,7 +716,7 @@ Sets whether this ``link`` can be travelled in both directions. void **link_set_enabled** **(** :ref:`RID` link, :ref:`bool` enabled **)** -If ``enabled`` is ``true`` the specified ``link`` will contribute to its current navigation map. +If ``enabled`` is ``true``, the specified ``link`` will contribute to its current navigation map. .. rst-class:: classref-item-separator @@ -1034,7 +1034,7 @@ Set the map's link connection radius used to connect links to navigation polygon void **map_set_use_edge_connections** **(** :ref:`RID` map, :ref:`bool` enabled **)** -Set the navigation ``map`` edge connection use. If ``enabled`` the navigation map allows navigation regions to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. +Set the navigation ``map`` edge connection use. If ``enabled`` is ``true``, the navigation map allows navigation regions to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. .. rst-class:: classref-item-separator @@ -1094,7 +1094,7 @@ Returns ``true`` if the specified ``obstacle`` is paused. void **obstacle_set_avoidance_enabled** **(** :ref:`RID` obstacle, :ref:`bool` enabled **)** -If ``enabled`` the provided ``obstacle`` affects avoidance using agents. +If ``enabled`` is ``true``, the provided ``obstacle`` affects avoidance using agents. .. rst-class:: classref-item-separator @@ -1446,7 +1446,7 @@ Sets the ``travel_cost`` for this ``region``. void **region_set_use_edge_connections** **(** :ref:`RID` region, :ref:`bool` enabled **)** -If ``enabled`` the navigation ``region`` will use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. +If ``enabled`` is ``true``, the navigation ``region`` will use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. .. rst-class:: classref-item-separator diff --git a/classes/class_navigationserver3d.rst b/classes/class_navigationserver3d.rst index 118fa2e45c2..fdbb7cab2c2 100644 --- a/classes/class_navigationserver3d.rst +++ b/classes/class_navigationserver3d.rst @@ -511,7 +511,7 @@ Sets the callback :ref:`Callable` that gets called after each av void **agent_set_avoidance_enabled** **(** :ref:`RID` agent, :ref:`bool` enabled **)** -If ``enabled`` the provided ``agent`` calculates avoidance. +If ``enabled`` is ``true``, the provided ``agent`` calculates avoidance. .. rst-class:: classref-item-separator @@ -913,7 +913,7 @@ Sets whether this ``link`` can be travelled in both directions. void **link_set_enabled** **(** :ref:`RID` link, :ref:`bool` enabled **)** -If ``enabled`` is ``true`` the specified ``link`` will contribute to its current navigation map. +If ``enabled`` is ``true``, the specified ``link`` will contribute to its current navigation map. .. rst-class:: classref-item-separator @@ -1303,7 +1303,7 @@ Sets the map up direction. void **map_set_use_edge_connections** **(** :ref:`RID` map, :ref:`bool` enabled **)** -Set the navigation ``map`` edge connection use. If ``enabled`` the navigation map allows navigation regions to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. +Set the navigation ``map`` edge connection use. If ``enabled`` is ``true``, the navigation map allows navigation regions to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. .. rst-class:: classref-item-separator @@ -1375,7 +1375,7 @@ Returns ``true`` if the provided ``obstacle`` uses avoidance in 3D space Vector3 void **obstacle_set_avoidance_enabled** **(** :ref:`RID` obstacle, :ref:`bool` enabled **)** -If ``enabled`` the provided ``obstacle`` affects avoidance using agents. +If ``enabled`` is ``true``, the provided ``obstacle`` affects avoidance using agents. .. rst-class:: classref-item-separator @@ -1685,7 +1685,7 @@ If multiple navigation meshes have positions at equal distance the navigation re void **region_set_enabled** **(** :ref:`RID` region, :ref:`bool` enabled **)** -If ``enabled`` is ``true`` the specified ``region`` will contribute to its current navigation map. +If ``enabled`` is ``true``, the specified ``region`` will contribute to its current navigation map. .. rst-class:: classref-item-separator @@ -1781,7 +1781,7 @@ Sets the ``travel_cost`` for this ``region``. void **region_set_use_edge_connections** **(** :ref:`RID` region, :ref:`bool` enabled **)** -If ``enabled`` the navigation ``region`` will use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. +If ``enabled`` is ``true``, the navigation ``region`` will use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. .. rst-class:: classref-item-separator diff --git a/classes/class_node.rst b/classes/class_node.rst index b94fc071f59..7ed02d63fe4 100644 --- a/classes/class_node.rst +++ b/classes/class_node.rst @@ -889,7 +889,7 @@ Notification received from the OS when the screen's DPI has been changed. Only i **NOTIFICATION_VP_MOUSE_ENTER** = ``1010`` -Notification received when the mouse enters the viewport. +Notification received when the mouse cursor enters the :ref:`Viewport`'s visible area, that is not occluded behind other :ref:`Control`\ s or :ref:`Window`\ s, provided its :ref:`Viewport.gui_disable_input` is ``false`` and regardless if it's currently focused or not. .. _class_Node_constant_NOTIFICATION_VP_MOUSE_EXIT: @@ -897,7 +897,7 @@ Notification received when the mouse enters the viewport. **NOTIFICATION_VP_MOUSE_EXIT** = ``1011`` -Notification received when the mouse leaves the viewport. +Notification received when the mouse cursor leaves the :ref:`Viewport`'s visible area, that is not occluded behind other :ref:`Control`\ s or :ref:`Window`\ s, provided its :ref:`Viewport.gui_disable_input` is ``false`` and regardless if it's currently focused or not. .. _class_Node_constant_NOTIFICATION_OS_MEMORY_WARNING: diff --git a/classes/class_node3d.rst b/classes/class_node3d.rst index ff7c0bf83cb..ed543d4c3a8 100644 --- a/classes/class_node3d.rst +++ b/classes/class_node3d.rst @@ -291,7 +291,7 @@ Property Descriptions - void **set_basis** **(** :ref:`Basis` value **)** - :ref:`Basis` **get_basis** **(** **)** -Direct access to the 3x3 basis of the :ref:`Transform3D` property. +Direct access to the 3x3 basis of the :ref:`transform` property. .. rst-class:: classref-item-separator diff --git a/classes/class_nodepath.rst b/classes/class_nodepath.rst index 81403ff52a6..ef3b28e0c00 100644 --- a/classes/class_nodepath.rst +++ b/classes/class_nodepath.rst @@ -239,13 +239,13 @@ Returns all subnames concatenated with a colon character (``:``) as separator, i .. code-tab:: gdscript - var nodepath = NodePath("Path2D/PathFollow2D/Sprite2D:texture:load_path") - print(nodepath.get_concatenated_subnames()) # texture:load_path + var node_path = NodePath("Path2D/PathFollow2D/Sprite2D:texture:load_path") + print(node_path.get_concatenated_subnames()) # texture:load_path .. code-tab:: csharp - var nodepath = new NodePath("Path2D/PathFollow2D/Sprite2D:texture:load_path"); - GD.Print(nodepath.GetConcatenatedSubnames()); // texture:load_path + var nodePath = new NodePath("Path2D/PathFollow2D/Sprite2D:texture:load_path"); + GD.Print(nodePath.GetConcatenatedSubnames()); // texture:load_path diff --git a/classes/class_optionbutton.rst b/classes/class_optionbutton.rst index b3be2271549..c683ec3f3d5 100644 --- a/classes/class_optionbutton.rst +++ b/classes/class_optionbutton.rst @@ -142,7 +142,7 @@ Theme Properties +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`int` | :ref:`arrow_margin` | ``4`` | +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`h_separation` | ``2`` | + | :ref:`int` | :ref:`h_separation` | ``4`` | +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`int` | :ref:`modulate_arrow` | ``0`` | +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ @@ -712,7 +712,7 @@ The horizontal space between the arrow icon and the right edge of the button. .. rst-class:: classref-themeproperty -:ref:`int` **h_separation** = ``2`` +:ref:`int` **h_separation** = ``4`` The horizontal space between **OptionButton**'s icon and text. Negative values will be treated as ``0`` when used. diff --git a/classes/class_performance.rst b/classes/class_performance.rst index bf0f21d200a..2edaf727c00 100644 --- a/classes/class_performance.rst +++ b/classes/class_performance.rst @@ -258,7 +258,7 @@ Number of islands in the 3D physics engine. *Lower is better.* :ref:`Monitor` **AUDIO_OUTPUT_LATENCY** = ``23`` -Output latency of the :ref:`AudioServer`. *Lower is better.* +Output latency of the :ref:`AudioServer`. Equivalent to calling :ref:`AudioServer.get_output_latency`, it is not recommended to call this every frame. .. _class_Performance_constant_NAVIGATION_ACTIVE_MAPS: diff --git a/classes/class_physicsdirectspacestate3d.rst b/classes/class_physicsdirectspacestate3d.rst index 43a209d0fd6..6bf2c855e8d 100644 --- a/classes/class_physicsdirectspacestate3d.rst +++ b/classes/class_physicsdirectspacestate3d.rst @@ -161,6 +161,10 @@ Intersects a ray in a given space. Ray position and other parameters are defined \ ``position``: The intersection point. +\ ``face_index``: The face index at the intersection point. + +\ **Note:** Returns a valid number only if the intersected shape is a :ref:`ConcavePolygonShape3D`. Otherwise, ``-1`` is returned. + \ ``rid``: The intersecting object's :ref:`RID`. \ ``shape``: The shape index of the colliding shape. diff --git a/classes/class_projectsettings.rst b/classes/class_projectsettings.rst index 12691e5863b..e83cbe7ab1d 100644 --- a/classes/class_projectsettings.rst +++ b/classes/class_projectsettings.rst @@ -81,6 +81,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`application/config/use_hidden_project_data_directory` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/config/version` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`application/config/windows_native_icon` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`application/run/delta_smoothing` | ``true`` | @@ -155,6 +157,10 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`debug/gdscript/warnings/confusable_identifier` | ``1`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/confusable_local_declaration` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/confusable_local_usage` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`debug/gdscript/warnings/constant_used_as_function` | ``1`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`debug/gdscript/warnings/deprecated_keyword` | ``1`` | @@ -395,6 +401,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`display/window/stretch/scale` | ``1.0`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`display/window/stretch/scale_mode` | ``"fractional"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`display/window/subwindows/embed_subwindows` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`display/window/vsync/vsync_mode` | ``1`` | @@ -1483,6 +1491,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`rendering/textures/webp_compression/lossless_compression_factor` | ``25`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/viewport/hdr_2d` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`rendering/viewport/transparent_background` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/vrs/mode` | ``0`` | @@ -1564,6 +1574,23 @@ Methods .. rst-class:: classref-descriptions-group +Signals +------- + +.. _class_ProjectSettings_signal_settings_changed: + +.. rst-class:: classref-signal + +**settings_changed** **(** **)** + +Emitted when any setting is changed, up to once per process frame. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- @@ -1787,6 +1814,18 @@ If ``false``, a non-hidden directory (``godot``) will be used instead. ---- +.. _class_ProjectSettings_property_application/config/version: + +.. rst-class:: classref-property + +:ref:`String` **application/config/version** = ``""`` + +The project's human-readable version identifier. This should always be set to a non-empty string, as some exporters rely on this value being defined. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_application/config/windows_native_icon: .. rst-class:: classref-property @@ -2275,6 +2314,30 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w ---- +.. _class_ProjectSettings_property_debug/gdscript/warnings/confusable_local_declaration: + +.. rst-class:: classref-property + +:ref:`int` **debug/gdscript/warnings/confusable_local_declaration** = ``1`` + +When set to ``warn`` or ``error``, produces a warning or an error respectively when an identifier declared in the nested block has the same name as an identifier declared below in the parent block. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_debug/gdscript/warnings/confusable_local_usage: + +.. rst-class:: classref-property + +:ref:`int` **debug/gdscript/warnings/confusable_local_usage** = ``1`` + +When set to ``warn`` or ``error``, produces a warning or an error respectively when an identifier that will be shadowed below in the block is used. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_debug/gdscript/warnings/constant_used_as_function: .. rst-class:: classref-property @@ -3731,9 +3794,9 @@ Defines how the base size is stretched to fit the resolution of the window or sc \ **"disabled"**: No stretching happens. One unit in the scene corresponds to one pixel on the screen. In this mode, :ref:`display/window/stretch/aspect` has no effect. Recommended for non-game applications. -\ **"canvas_items"**: The base size specified in width and height in the project settings is stretched to cover the whole screen (taking :ref:`display/window/stretch/aspect` into account). This means that everything is rendered directly at the target resolution. 3D is unaffected, while in 2D, there is no longer a 1:1 correspondence between sprite pixels and screen pixels, which may result in scaling artifacts. Recommended for most games that don't use a pixel art aesthetic, although it is possible to use this stretch mode for pixel art games too (especially in 3D). +\ **"canvas_items"**: The base size specified in width and height in the project settings is stretched to cover the whole screen (taking :ref:`display/window/stretch/aspect` into account). This means that everything is rendered directly at the target resolution. 3D is unaffected, while in 2D, there is no longer a 1:1 correspondence between sprite pixels and screen pixels, which may result in scaling artifacts. Recommended for most games that don't use a pixel art esthetic, although it is possible to use this stretch mode for pixel art games too (especially in 3D). -\ **"viewport"**: The size of the root :ref:`Viewport` is set precisely to the base size specified in the Project Settings' Display section. The scene is rendered to this viewport first. Finally, this viewport is scaled to fit the screen (taking :ref:`display/window/stretch/aspect` into account). Recommended for games that use a pixel art aesthetic. +\ **"viewport"**: The size of the root :ref:`Viewport` is set precisely to the base size specified in the Project Settings' Display section. The scene is rendered to this viewport first. Finally, this viewport is scaled to fit the screen (taking :ref:`display/window/stretch/aspect` into account). Recommended for games that use a pixel art esthetic. .. rst-class:: classref-item-separator @@ -3745,9 +3808,19 @@ Defines how the base size is stretched to fit the resolution of the window or sc :ref:`float` **display/window/stretch/scale** = ``1.0`` -.. container:: contribute +The scale factor multiplier to use for 2D elements. This multiplies the final scale factor determined by :ref:`display/window/stretch/mode`. If using the **Disabled** stretch mode, this scale factor is applied as-is. This can be adjusted to make the UI easier to read on certain displays. - There is currently no description for this property. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_display/window/stretch/scale_mode: + +.. rst-class:: classref-property + +:ref:`String` **display/window/stretch/scale_mode** = ``"fractional"`` + +The policy to use to determine the final scale factor for 2D elements. This affects how :ref:`display/window/stretch/scale` is applied, in addition to the automatic scale factor determined by :ref:`display/window/stretch/mode`. .. rst-class:: classref-item-separator @@ -10637,7 +10710,7 @@ The anisotropic filtering level also affects decals and light projectors if they Affects the final texture sharpness by reading from a lower or higher mipmap (also called "texture LOD bias"). Negative values make mipmapped textures sharper but grainier when viewed at a distance, while positive values make mipmapped textures blurrier (even when up close). -Enabling temporal antialiasing (:ref:`rendering/anti_aliasing/quality/use_taa`) will automatically apply a ``-0.5`` offset to this value, while enabling FXAA (:ref:`rendering/anti_aliasing/quality/screen_space_aa`) will automatically apply a ``-0.25`` offset to this value. If both TAA and FXAA are enbled at the same time, an offset of ``-0.75`` is applied to this value. +Enabling temporal antialiasing (:ref:`rendering/anti_aliasing/quality/use_taa`) will automatically apply a ``-0.5`` offset to this value, while enabling FXAA (:ref:`rendering/anti_aliasing/quality/screen_space_aa`) will automatically apply a ``-0.25`` offset to this value. If both TAA and FXAA are enabled at the same time, an offset of ``-0.75`` is applied to this value. \ **Note:** If :ref:`rendering/scaling_3d/scale` is lower than ``1.0`` (exclusive), :ref:`rendering/textures/default_filters/texture_mipmap_bias` is used to adjust the automatic mipmap bias which is calculated internally based on the scale factor. The formula for this is ``log2(scaling_3d_scale) + mipmap_bias``. @@ -10741,6 +10814,18 @@ The default compression factor for lossless WebP. Decompression speed is mostly ---- +.. _class_ProjectSettings_property_rendering/viewport/hdr_2d: + +.. rst-class:: classref-property + +:ref:`bool` **rendering/viewport/hdr_2d** = ``false`` + +If ``true``, enables :ref:`Viewport.use_hdr_2d` on the root viewport. This allows 2D rendering to take advantage of effects requiring high dynamic range (e.g. 2D glow). + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_rendering/viewport/transparent_background: .. rst-class:: classref-property diff --git a/classes/class_raycast3d.rst b/classes/class_raycast3d.rst index 008b91e94e2..de77dcf0537 100644 --- a/classes/class_raycast3d.rst +++ b/classes/class_raycast3d.rst @@ -89,6 +89,8 @@ Methods +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_collider_shape` **(** **)** |const| | +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_collision_face_index` **(** **)** |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`get_collision_mask_value` **(** :ref:`int` layer_number **)** |const| | +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`get_collision_normal` **(** **)** |const| | @@ -376,6 +378,18 @@ Returns the shape ID of the first object that the ray intersects, or ``0`` if no ---- +.. _class_RayCast3D_method_get_collision_face_index: + +.. rst-class:: classref-method + +:ref:`int` **get_collision_face_index** **(** **)** |const| + +Returns the collision object's face index at the collision point, or ``-1`` if the shape intersecting the ray is not a :ref:`ConcavePolygonShape3D`. + +.. rst-class:: classref-item-separator + +---- + .. _class_RayCast3D_method_get_collision_mask_value: .. rst-class:: classref-method diff --git a/classes/class_rdpipelinemultisamplestate.rst b/classes/class_rdpipelinemultisamplestate.rst index 52e33120ec8..f0cf83eebaf 100644 --- a/classes/class_rdpipelinemultisamplestate.rst +++ b/classes/class_rdpipelinemultisamplestate.rst @@ -148,7 +148,7 @@ The number of MSAA samples (or SSAA samples if :ref:`enable_sample_shading` value **)** - :ref:`int[]` **get_sample_masks** **(** **)** -The sampleSee the `sample mask Vulkan documentation `__ for more details. +The sample mask array. See the `sample mask Vulkan documentation `__ for more details. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_rdpipelinerasterizationstate.rst b/classes/class_rdpipelinerasterizationstate.rst index 653da746959..05db640ca6c 100644 --- a/classes/class_rdpipelinerasterizationstate.rst +++ b/classes/class_rdpipelinerasterizationstate.rst @@ -219,7 +219,7 @@ The winding order to use to determine which face of a triangle is considered its - void **set_line_width** **(** :ref:`float` value **)** - :ref:`float` **get_line_width** **(** **)** -THe line width to use when drawing lines (in pixels). Thick lines may not be supported on all hardware. +The line width to use when drawing lines (in pixels). Thick lines may not be supported on all hardware. .. rst-class:: classref-item-separator diff --git a/classes/class_rect2.rst b/classes/class_rect2.rst index 4a9f10bae1b..2892e043973 100644 --- a/classes/class_rect2.rst +++ b/classes/class_rect2.rst @@ -17,13 +17,13 @@ A 2D axis-aligned bounding box using floating-point coordinates. Description ----------- -**Rect2** consists of a position, a size, and several utility functions. It is typically used for fast overlap tests. +The **Rect2** built-in :ref:`Variant` type represents an axis-aligned rectangle in a 2D space. It is defined by its :ref:`position` and :ref:`size`, which are :ref:`Vector2`. It is frequently used for fast overlap tests (see :ref:`intersects`). Although **Rect2** itself is axis-aligned, it can be combined with :ref:`Transform2D` to represent a rotated or skewed rectangle. -It uses floating-point coordinates. If you need integer coordinates, use :ref:`Rect2i` instead. +For integer coordinates, use :ref:`Rect2i`. The 3D equivalent to **Rect2** is :ref:`AABB`. -The 3D counterpart to **Rect2** is :ref:`AABB`. +\ **Note:** Negative values for :ref:`size` are not supported. With negative size, most **Rect2** methods do not work correctly. Use :ref:`abs` to get an equivalent **Rect2** with a non-negative size. -Negative values for :ref:`size` are not supported and will not work for most methods. Use :ref:`abs` to get a Rect2 with a positive size. +\ **Note:** In a boolean context, a **Rect2** evaluates to ``false`` if both :ref:`position` and :ref:`size` are zero (equal to :ref:`Vector2.ZERO`). Otherwise, it always evaluates to ``true``. .. note:: @@ -147,7 +147,7 @@ Property Descriptions :ref:`Vector2` **end** = ``Vector2(0, 0)`` -Ending corner. This is calculated as ``position + size``. Setting this value will change the size. +The ending point. This is usually the bottom-right corner of the rectangle, and is equivalent to ``position + size``. Setting this point affects the :ref:`size`. .. rst-class:: classref-item-separator @@ -159,7 +159,7 @@ Ending corner. This is calculated as ``position + size``. Setting this value wil :ref:`Vector2` **position** = ``Vector2(0, 0)`` -Beginning corner. Typically has values lower than :ref:`end`. +The origin point. This is usually the top-left corner of the rectangle. .. rst-class:: classref-item-separator @@ -171,9 +171,9 @@ Beginning corner. Typically has values lower than :ref:`end` **size** = ``Vector2(0, 0)`` -Size from :ref:`position` to :ref:`end`. Typically, all components are positive. +The rectangle's width and height, starting from :ref:`position`. Setting this value also affects the :ref:`end` point. -If the size is negative, you can use :ref:`abs` to fix it. +\ **Note:** It's recommended setting the width and height to non-negative values, as most methods in Godot assume that the :ref:`position` is the top-left corner, and the :ref:`end` is the bottom-right corner. To get an equivalent rectangle with non-negative size, use :ref:`abs`. .. rst-class:: classref-section-separator @@ -190,7 +190,7 @@ Constructor Descriptions :ref:`Rect2` **Rect2** **(** **)** -Constructs a default-initialized **Rect2** with default (zero) values of :ref:`position` and :ref:`size`. +Constructs a **Rect2** with its :ref:`position` and :ref:`size` set to :ref:`Vector2.ZERO`. .. rst-class:: classref-item-separator @@ -220,7 +220,7 @@ Constructs a **Rect2** from a :ref:`Rect2i`. :ref:`Rect2` **Rect2** **(** :ref:`Vector2` position, :ref:`Vector2` size **)** -Constructs a **Rect2** by position and size. +Constructs a **Rect2** by ``position`` and ``size``. .. rst-class:: classref-item-separator @@ -230,7 +230,7 @@ Constructs a **Rect2** by position and size. :ref:`Rect2` **Rect2** **(** :ref:`float` x, :ref:`float` y, :ref:`float` width, :ref:`float` height **)** -Constructs a **Rect2** by x, y, width, and height. +Constructs a **Rect2** by setting its :ref:`position` to (``x``, ``y``), and its :ref:`size` to (``width``, ``height``). .. rst-class:: classref-section-separator @@ -247,7 +247,24 @@ Method Descriptions :ref:`Rect2` **abs** **(** **)** |const| -Returns a **Rect2** with equivalent position and area, modified so that the top-left corner is the origin and ``width`` and ``height`` are positive. +Returns a **Rect2** equivalent to this rectangle, with its width and height modified to be non-negative values, and with its :ref:`position` being the top-left corner of the rectangle. + + +.. tabs:: + + .. code-tab:: gdscript + + var rect = Rect2(25, 25, -100, -50) + var absolute = rect.abs() # absolute is Rect2(-75, -25, 100, 50) + + .. code-tab:: csharp + + var rect = new Rect2(25, 25, -100, -50); + var absolute = rect.Abs(); // absolute is Rect2(-75, -25, 100, 50) + + + +\ **Note:** It's recommended to use this method when :ref:`size` is negative, as most other methods in Godot assume that the :ref:`position` is the top-left corner, and the :ref:`end` is the bottom-right corner. .. rst-class:: classref-item-separator @@ -259,7 +276,7 @@ Returns a **Rect2** with equivalent position and area, modified so that the top- :ref:`bool` **encloses** **(** :ref:`Rect2` b **)** |const| -Returns ``true`` if this **Rect2** completely encloses another one. +Returns ``true`` if this rectangle *completely* encloses the ``b`` rectangle. .. rst-class:: classref-item-separator @@ -271,26 +288,24 @@ Returns ``true`` if this **Rect2** completely encloses another one. :ref:`Rect2` **expand** **(** :ref:`Vector2` to **)** |const| -Returns a copy of this **Rect2** expanded to include a given point. - -\ **Example:**\ +Returns a copy of this rectangle expanded to align the edges with the given ``to`` point, if necessary. .. tabs:: .. code-tab:: gdscript - # position (-3, 2), size (1, 1) - var rect = Rect2(Vector2(-3, 2), Vector2(1, 1)) - # position (-3, -1), size (3, 4), so we fit both rect and Vector2(0, -1) - var rect2 = rect.expand(Vector2(0, -1)) + var rect = Rect2(0, 0, 5, 2) + + rect = rect.expand(Vector2(10, 0)) # rect is Rect2(0, 0, 10, 2) + rect = rect.expand(Vector2(-5, 5)) # rect is Rect2(-5, 0, 10, 5) .. code-tab:: csharp - // position (-3, 2), size (1, 1) - var rect = new Rect2(new Vector2(-3, 2), new Vector2(1, 1)); - // position (-3, -1), size (3, 4), so we fit both rect and Vector2(0, -1) - var rect2 = rect.Expand(new Vector2(0, -1)); + var rect = new Rect2(0, 0, 5, 2); + + rect = rect.Expand(new Vector2(10, 0)); // rect is Rect2(0, 0, 10, 2) + rect = rect.Expand(new Vector2(-5, 5)); // rect is Rect2(-5, 0, 10, 5) @@ -304,7 +319,7 @@ Returns a copy of this **Rect2** expanded to include a given point. :ref:`float` **get_area** **(** **)** |const| -Returns the area of the **Rect2**. See also :ref:`has_area`. +Returns the rectangle's area. This is equivalent to ``size.x * size.y``. See also :ref:`has_area`. .. rst-class:: classref-item-separator @@ -316,7 +331,7 @@ Returns the area of the **Rect2**. See also :ref:`has_area` **get_center** **(** **)** |const| -Returns the center of the **Rect2**, which is equal to :ref:`position` + (:ref:`size` / 2). +Returns the center point of the rectangle. This is the same as ``position + (size / 2.0)``. .. rst-class:: classref-item-separator @@ -328,7 +343,22 @@ Returns the center of the **Rect2**, which is equal to :ref:`position` **grow** **(** :ref:`float` amount **)** |const| -Returns a copy of the **Rect2** grown by the specified ``amount`` on all sides. +Returns a copy of this rectangle extended on all sides by the given ``amount``. A negative ``amount`` shrinks the rectangle instead. See also :ref:`grow_individual` and :ref:`grow_side`. + + +.. tabs:: + + .. code-tab:: gdscript + + var a = Rect2(4, 4, 8, 8).grow(4) # a is Rect2(0, 0, 16, 16) + var b = Rect2(0, 0, 8, 4).grow(2) # b is Rect2(-2, -2, 12, 8) + + .. code-tab:: csharp + + var a = new Rect2(4, 4, 8, 8).Grow(4); // a is Rect2(0, 0, 16, 16) + var b = new Rect2(0, 0, 8, 4).Grow(2); // b is Rect2(-2, -2, 12, 8) + + .. rst-class:: classref-item-separator @@ -340,7 +370,7 @@ Returns a copy of the **Rect2** grown by the specified ``amount`` on all sides. :ref:`Rect2` **grow_individual** **(** :ref:`float` left, :ref:`float` top, :ref:`float` right, :ref:`float` bottom **)** |const| -Returns a copy of the **Rect2** grown by the specified amount on each side individually. +Returns a copy of this rectangle with its ``left``, ``top``, ``right``, and ``bottom`` sides extended by the given amounts. Negative values shrink the sides, instead. See also :ref:`grow` and :ref:`grow_side`. .. rst-class:: classref-item-separator @@ -352,7 +382,7 @@ Returns a copy of the **Rect2** grown by the specified amount on each side indiv :ref:`Rect2` **grow_side** **(** :ref:`int` side, :ref:`float` amount **)** |const| -Returns a copy of the **Rect2** grown by the specified ``amount`` on the specified :ref:`Side`. +Returns a copy of this rectangle with its ``side`` extended by the given ``amount`` (see :ref:`Side` constants). A negative ``amount`` shrinks the rectangle, instead. See also :ref:`grow` and :ref:`grow_individual`. .. rst-class:: classref-item-separator @@ -364,7 +394,7 @@ Returns a copy of the **Rect2** grown by the specified ``amount`` on the specifi :ref:`bool` **has_area** **(** **)** |const| -Returns ``true`` if the **Rect2** has area, and ``false`` if the **Rect2** is linear, empty, or has a negative :ref:`size`. See also :ref:`get_area`. +Returns ``true`` if this rectangle has positive width and height. See also :ref:`get_area`. .. rst-class:: classref-item-separator @@ -376,9 +406,9 @@ Returns ``true`` if the **Rect2** has area, and ``false`` if the **Rect2** is li :ref:`bool` **has_point** **(** :ref:`Vector2` point **)** |const| -Returns ``true`` if the **Rect2** contains a point. By convention, the right and bottom edges of the **Rect2** are considered exclusive, so points on these edges are **not** included. +Returns ``true`` if the rectangle contains the given ``point``. By convention, points on the right and bottom edges are **not** included. -\ **Note:** This method is not reliable for **Rect2** with a *negative size*. Use :ref:`abs` to get a positive sized equivalent rectangle to check for contained points. +\ **Note:** This method is not reliable for **Rect2** with a *negative* :ref:`size`. Use :ref:`abs` first to get a valid rectangle. .. rst-class:: classref-item-separator @@ -390,9 +420,28 @@ Returns ``true`` if the **Rect2** contains a point. By convention, the right and :ref:`Rect2` **intersection** **(** :ref:`Rect2` b **)** |const| -Returns the intersection of this **Rect2** and ``b``. +Returns the intersection between this rectangle and ``b``. If the rectangles do not intersect, returns an empty **Rect2**. + + +.. tabs:: + + .. code-tab:: gdscript + + var rect1 = Rect2(0, 0, 5, 10) + var rect2 = Rect2(2, 0, 8, 4) + + var a = rect1.intersection(rect2) # a is Rect2(2, 0, 3, 4) + + .. code-tab:: csharp -If the rectangles do not intersect, an empty **Rect2** is returned. + var rect1 = new Rect2(0, 0, 5, 10); + var rect2 = new Rect2(2, 0, 8, 4); + + var a = rect1.Intersection(rect2); // a is Rect2(2, 0, 3, 4) + + + +\ **Note:** If you only need to know whether two rectangles are overlapping, use :ref:`intersects`, instead. .. rst-class:: classref-item-separator @@ -404,9 +453,7 @@ If the rectangles do not intersect, an empty **Rect2** is returned. :ref:`bool` **intersects** **(** :ref:`Rect2` b, :ref:`bool` include_borders=false **)** |const| -Returns ``true`` if the **Rect2** overlaps with ``b`` (i.e. they have at least one point in common). - -If ``include_borders`` is ``true``, they will also be considered overlapping if their borders touch, even without intersection. +Returns ``true`` if this rectangle overlaps with the ``b`` rectangle. The edges of both rectangles are excluded, unless ``include_borders`` is ``true``. .. rst-class:: classref-item-separator @@ -418,7 +465,7 @@ If ``include_borders`` is ``true``, they will also be considered overlapping if :ref:`bool` **is_equal_approx** **(** :ref:`Rect2` rect **)** |const| -Returns ``true`` if this **Rect2** and ``rect`` are approximately equal, by calling ``is_equal_approx`` on each component. +Returns ``true`` if this rectangle and ``rect`` are approximately equal, by calling :ref:`Vector2.is_equal_approx` on the :ref:`position` and the :ref:`size`. .. rst-class:: classref-item-separator @@ -430,7 +477,7 @@ Returns ``true`` if this **Rect2** and ``rect`` are approximately equal, by call :ref:`bool` **is_finite** **(** **)** |const| -Returns ``true`` if this **Rect2** is finite, by calling :ref:`@GlobalScope.is_finite` on each component. +Returns ``true`` if this rectangle's values are finite, by calling :ref:`Vector2.is_finite` on the :ref:`position` and the :ref:`size`. .. rst-class:: classref-item-separator @@ -442,7 +489,7 @@ Returns ``true`` if this **Rect2** is finite, by calling :ref:`@GlobalScope.is_f :ref:`Rect2` **merge** **(** :ref:`Rect2` b **)** |const| -Returns a larger **Rect2** that contains this **Rect2** and ``b``. +Returns a **Rect2** that encloses both this rectangle and ``b`` around the edges. See also :ref:`encloses`. .. rst-class:: classref-section-separator @@ -459,7 +506,7 @@ Operator Descriptions :ref:`bool` **operator !=** **(** :ref:`Rect2` right **)** -Returns ``true`` if the rectangles are not equal. +Returns ``true`` if the :ref:`position` or :ref:`size` of both rectangles are not equal. \ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. @@ -485,7 +532,7 @@ Inversely transforms (multiplies) the **Rect2** by the given :ref:`Transform2D` **operator ==** **(** :ref:`Rect2` right **)** -Returns ``true`` if the rectangles are exactly equal. +Returns ``true`` if both :ref:`position` and :ref:`size` of the rectangles are exactly equal, respectively. \ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. diff --git a/classes/class_rect2i.rst b/classes/class_rect2i.rst index e161e72bac8..fa0c4558aaf 100644 --- a/classes/class_rect2i.rst +++ b/classes/class_rect2i.rst @@ -17,11 +17,13 @@ A 2D axis-aligned bounding box using integer coordinates. Description ----------- -**Rect2i** consists of a position, a size, and several utility functions. It is typically used for fast overlap tests. +The **Rect2i** built-in :ref:`Variant` type represents an axis-aligned rectangle in a 2D space, using integer coordinates. It is defined by its :ref:`position` and :ref:`size`, which are :ref:`Vector2i`. Because it does not rotate, it is frequently used for fast overlap tests (see :ref:`intersects`). -It uses integer coordinates. If you need floating-point coordinates, use :ref:`Rect2` instead. +For floating-point coordinates, see :ref:`Rect2`. -Negative values for :ref:`size` are not supported and will not work for most methods. Use :ref:`abs` to get a Rect2i with a positive size. +\ **Note:** Negative values for :ref:`size` are not supported. With negative size, most **Rect2i** methods do not work correctly. Use :ref:`abs` to get an equivalent **Rect2i** with a non-negative size. + +\ **Note:** In a boolean context, a **Rect2i** evaluates to ``false`` if both :ref:`position` and :ref:`size` are zero (equal to :ref:`Vector2i.ZERO`). Otherwise, it always evaluates to ``true``. .. note:: @@ -137,7 +139,7 @@ Property Descriptions :ref:`Vector2i` **end** = ``Vector2i(0, 0)`` -Ending corner. This is calculated as ``position + size``. Setting this value will change the size. +The ending point. This is usually the bottom-right corner of the rectangle, and is equivalent to ``position + size``. Setting this point affects the :ref:`size`. .. rst-class:: classref-item-separator @@ -149,7 +151,7 @@ Ending corner. This is calculated as ``position + size``. Setting this value wil :ref:`Vector2i` **position** = ``Vector2i(0, 0)`` -Beginning corner. Typically has values lower than :ref:`end`. +The origin point. This is usually the top-left corner of the rectangle. .. rst-class:: classref-item-separator @@ -161,9 +163,9 @@ Beginning corner. Typically has values lower than :ref:`end` **size** = ``Vector2i(0, 0)`` -Size from :ref:`position` to :ref:`end`. Typically, all components are positive. +The rectangle's width and height, starting from :ref:`position`. Setting this value also affects the :ref:`end` point. -If the size is negative, you can use :ref:`abs` to fix it. +\ **Note:** It's recommended setting the width and height to non-negative values, as most methods in Godot assume that the :ref:`position` is the top-left corner, and the :ref:`end` is the bottom-right corner. To get an equivalent rectangle with non-negative size, use :ref:`abs`. .. rst-class:: classref-section-separator @@ -180,7 +182,7 @@ Constructor Descriptions :ref:`Rect2i` **Rect2i** **(** **)** -Constructs a default-initialized **Rect2i** with default (zero) values of :ref:`position` and :ref:`size`. +Constructs a **Rect2i** with its :ref:`position` and :ref:`size` set to :ref:`Vector2i.ZERO`. .. rst-class:: classref-item-separator @@ -200,7 +202,7 @@ Constructs a **Rect2i** as a copy of the given **Rect2i**. :ref:`Rect2i` **Rect2i** **(** :ref:`Rect2` from **)** -Constructs a new **Rect2i** from :ref:`Rect2`. The floating point coordinates will be truncated. +Constructs a **Rect2i** from a :ref:`Rect2`. The floating-point coordinates are truncated. .. rst-class:: classref-item-separator @@ -210,7 +212,7 @@ Constructs a new **Rect2i** from :ref:`Rect2`. The floating point c :ref:`Rect2i` **Rect2i** **(** :ref:`Vector2i` position, :ref:`Vector2i` size **)** -Constructs a **Rect2i** by position and size. +Constructs a **Rect2i** by ``position`` and ``size``. .. rst-class:: classref-item-separator @@ -220,7 +222,7 @@ Constructs a **Rect2i** by position and size. :ref:`Rect2i` **Rect2i** **(** :ref:`int` x, :ref:`int` y, :ref:`int` width, :ref:`int` height **)** -Constructs a **Rect2i** by x, y, width, and height. +Constructs a **Rect2i** by setting its :ref:`position` to (``x``, ``y``), and its :ref:`size` to (``width``, ``height``). .. rst-class:: classref-section-separator @@ -237,7 +239,24 @@ Method Descriptions :ref:`Rect2i` **abs** **(** **)** |const| -Returns a **Rect2i** with equivalent position and area, modified so that the top-left corner is the origin and ``width`` and ``height`` are positive. +Returns a **Rect2i** equivalent to this rectangle, with its width and height modified to be non-negative values, and with its :ref:`position` being the top-left corner of the rectangle. + + +.. tabs:: + + .. code-tab:: gdscript + + var rect = Rect2i(25, 25, -100, -50) + var absolute = rect.abs() # absolute is Rect2i(-75, -25, 100, 50) + + .. code-tab:: csharp + + var rect = new Rect2I(25, 25, -100, -50); + var absolute = rect.Abs(); // absolute is Rect2I(-75, -25, 100, 50) + + + +\ **Note:** It's recommended to use this method when :ref:`size` is negative, as most other methods in Godot assume that the :ref:`position` is the top-left corner, and the :ref:`end` is the bottom-right corner. .. rst-class:: classref-item-separator @@ -261,24 +280,24 @@ Returns ``true`` if this **Rect2i** completely encloses another one. :ref:`Rect2i` **expand** **(** :ref:`Vector2i` to **)** |const| -Returns a copy of this **Rect2i** expanded so that the borders align with the given point. +Returns a copy of this rectangle expanded to align the edges with the given ``to`` point, if necessary. .. tabs:: .. code-tab:: gdscript - # position (-3, 2), size (1, 1) - var rect = Rect2i(Vector2i(-3, 2), Vector2i(1, 1)) - # position (-3, -1), size (3, 4), so we fit both rect and Vector2i(0, -1) - var rect2 = rect.expand(Vector2i(0, -1)) + var rect = Rect2i(0, 0, 5, 2) + + rect = rect.expand(Vector2i(10, 0)) # rect is Rect2i(0, 0, 10, 2) + rect = rect.expand(Vector2i(-5, 5)) # rect is Rect2i(-5, 0, 10, 5) .. code-tab:: csharp - // position (-3, 2), size (1, 1) - var rect = new Rect2I(new Vector2I(-3, 2), new Vector2I(1, 1)); - // position (-3, -1), size (3, 4), so we fit both rect and Vector2I(0, -1) - var rect2 = rect.Expand(new Vector2I(0, -1)); + var rect = new Rect2I(0, 0, 5, 2); + + rect = rect.Expand(new Vector2I(10, 0)); // rect is Rect2I(0, 0, 10, 2) + rect = rect.Expand(new Vector2I(-5, 5)); // rect is Rect2I(-5, 0, 10, 5) @@ -292,7 +311,7 @@ Returns a copy of this **Rect2i** expanded so that the borders align with the gi :ref:`int` **get_area** **(** **)** |const| -Returns the area of the **Rect2i**. See also :ref:`has_area`. +Returns the rectangle's area. This is equivalent to ``size.x * size.y``. See also :ref:`has_area`. .. rst-class:: classref-item-separator @@ -304,9 +323,9 @@ Returns the area of the **Rect2i**. See also :ref:`has_area` **get_center** **(** **)** |const| -Returns the center of the **Rect2i**, which is equal to :ref:`position` + (:ref:`size` / 2). +Returns the center point of the rectangle. This is the same as ``position + (size / 2)``. -If :ref:`size` is an odd number, the returned center value will be rounded towards :ref:`position`. +\ **Note:** If the :ref:`size` is odd, the result will be rounded towards :ref:`position`. .. rst-class:: classref-item-separator @@ -318,7 +337,22 @@ If :ref:`size` is an odd number, the returned center :ref:`Rect2i` **grow** **(** :ref:`int` amount **)** |const| -Returns a copy of the **Rect2i** grown by the specified ``amount`` on all sides. +Returns a copy of this rectangle extended on all sides by the given ``amount``. A negative ``amount`` shrinks the rectangle instead. See also :ref:`grow_individual` and :ref:`grow_side`. + + +.. tabs:: + + .. code-tab:: gdscript + + var a = Rect2i(4, 4, 8, 8).grow(4) # a is Rect2i(0, 0, 16, 16) + var b = Rect2i(0, 0, 8, 4).grow(2) # b is Rect2i(-2, -2, 12, 8) + + .. code-tab:: csharp + + var a = new Rect2I(4, 4, 8, 8).Grow(4); // a is Rect2I(0, 0, 16, 16) + var b = new Rect2I(0, 0, 8, 4).Grow(2); // b is Rect2I(-2, -2, 12, 8) + + .. rst-class:: classref-item-separator @@ -330,7 +364,7 @@ Returns a copy of the **Rect2i** grown by the specified ``amount`` on all sides. :ref:`Rect2i` **grow_individual** **(** :ref:`int` left, :ref:`int` top, :ref:`int` right, :ref:`int` bottom **)** |const| -Returns a copy of the **Rect2i** grown by the specified amount on each side individually. +Returns a copy of this rectangle with its ``left``, ``top``, ``right``, and ``bottom`` sides extended by the given amounts. Negative values shrink the sides, instead. See also :ref:`grow` and :ref:`grow_side`. .. rst-class:: classref-item-separator @@ -342,7 +376,7 @@ Returns a copy of the **Rect2i** grown by the specified amount on each side indi :ref:`Rect2i` **grow_side** **(** :ref:`int` side, :ref:`int` amount **)** |const| -Returns a copy of the **Rect2i** grown by the specified ``amount`` on the specified :ref:`Side`. +Returns a copy of this rectangle with its ``side`` extended by the given ``amount`` (see :ref:`Side` constants). A negative ``amount`` shrinks the rectangle, instead. See also :ref:`grow` and :ref:`grow_individual`. .. rst-class:: classref-item-separator @@ -354,7 +388,7 @@ Returns a copy of the **Rect2i** grown by the specified ``amount`` on the specif :ref:`bool` **has_area** **(** **)** |const| -Returns ``true`` if the **Rect2i** has area, and ``false`` if the **Rect2i** is linear, empty, or has a negative :ref:`size`. See also :ref:`get_area`. +Returns ``true`` if this rectangle has positive width and height. See also :ref:`get_area`. .. rst-class:: classref-item-separator @@ -366,9 +400,9 @@ Returns ``true`` if the **Rect2i** has area, and ``false`` if the **Rect2i** is :ref:`bool` **has_point** **(** :ref:`Vector2i` point **)** |const| -Returns ``true`` if the **Rect2i** contains a point. By convention, the right and bottom edges of the **Rect2i** are considered exclusive, so points on these edges are **not** included. +Returns ``true`` if the rectangle contains the given ``point``. By convention, points on the right and bottom edges are **not** included. -\ **Note:** This method is not reliable for **Rect2i** with a *negative size*. Use :ref:`abs` to get a positive sized equivalent rectangle to check for contained points. +\ **Note:** This method is not reliable for **Rect2i** with a *negative* :ref:`size`. Use :ref:`abs` first to get a valid rectangle. .. rst-class:: classref-item-separator @@ -380,9 +414,28 @@ Returns ``true`` if the **Rect2i** contains a point. By convention, the right an :ref:`Rect2i` **intersection** **(** :ref:`Rect2i` b **)** |const| -Returns the intersection of this **Rect2i** and ``b``. +Returns the intersection between this rectangle and ``b``. If the rectangles do not intersect, returns an empty **Rect2i**. + + +.. tabs:: + + .. code-tab:: gdscript + + var a = Rect2i(0, 0, 5, 10) + var b = Rect2i(2, 0, 8, 4) + + var c = a.intersection(b) # c is Rect2i(2, 0, 3, 4) + + .. code-tab:: csharp + + var a = new Rect2I(0, 0, 5, 10); + var b = new Rect2I(2, 0, 8, 4); + + var c = rect1.Intersection(rect2); // c is Rect2I(2, 0, 3, 4) + + -If the rectangles do not intersect, an empty **Rect2i** is returned. +\ **Note:** If you only need to know whether two rectangles are overlapping, use :ref:`intersects`, instead. .. rst-class:: classref-item-separator @@ -394,7 +447,7 @@ If the rectangles do not intersect, an empty **Rect2i** is returned. :ref:`bool` **intersects** **(** :ref:`Rect2i` b **)** |const| -Returns ``true`` if the **Rect2i** overlaps with ``b`` (i.e. they have at least one point in common). +Returns ``true`` if this rectangle overlaps with the ``b`` rectangle. The edges of both rectangles are excluded. .. rst-class:: classref-item-separator @@ -406,7 +459,7 @@ Returns ``true`` if the **Rect2i** overlaps with ``b`` (i.e. they have at least :ref:`Rect2i` **merge** **(** :ref:`Rect2i` b **)** |const| -Returns a larger **Rect2i** that contains this **Rect2i** and ``b``. +Returns a **Rect2i** that encloses both this rectangle and ``b`` around the edges. See also :ref:`encloses`. .. rst-class:: classref-section-separator @@ -423,7 +476,7 @@ Operator Descriptions :ref:`bool` **operator !=** **(** :ref:`Rect2i` right **)** -Returns ``true`` if the rectangles are not equal. +Returns ``true`` if the :ref:`position` or :ref:`size` of both rectangles are not equal. .. rst-class:: classref-item-separator @@ -435,7 +488,7 @@ Returns ``true`` if the rectangles are not equal. :ref:`bool` **operator ==** **(** :ref:`Rect2i` right **)** -Returns ``true`` if the rectangles are equal. +Returns ``true`` if both :ref:`position` and :ref:`size` of the rectangles are equal, respectively. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_renderingdevice.rst b/classes/class_renderingdevice.rst index 13b495b08b4..3e3bba23157 100644 --- a/classes/class_renderingdevice.rst +++ b/classes/class_renderingdevice.rst @@ -45,13 +45,13 @@ Methods :widths: auto +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`barrier` **(** |bitfield|\<:ref:`BarrierMask`\> from=15, |bitfield|\<:ref:`BarrierMask`\> to=15 **)** | + | void | :ref:`barrier` **(** |bitfield|\<:ref:`BarrierMask`\> from=32767, |bitfield|\<:ref:`BarrierMask`\> to=32767 **)** | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`buffer_clear` **(** :ref:`RID` buffer, :ref:`int` offset, :ref:`int` size_bytes, |bitfield|\<:ref:`BarrierMask`\> post_barrier=15 **)** | + | :ref:`Error` | :ref:`buffer_clear` **(** :ref:`RID` buffer, :ref:`int` offset, :ref:`int` size_bytes, |bitfield|\<:ref:`BarrierMask`\> post_barrier=32767 **)** | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedByteArray` | :ref:`buffer_get_data` **(** :ref:`RID` buffer, :ref:`int` offset_bytes=0, :ref:`int` size_bytes=0 **)** | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`buffer_update` **(** :ref:`RID` buffer, :ref:`int` offset, :ref:`int` size_bytes, :ref:`PackedByteArray` data, |bitfield|\<:ref:`BarrierMask`\> post_barrier=15 **)** | + | :ref:`Error` | :ref:`buffer_update` **(** :ref:`RID` buffer, :ref:`int` offset, :ref:`int` size_bytes, :ref:`PackedByteArray` data, |bitfield|\<:ref:`BarrierMask`\> post_barrier=32767 **)** | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`capture_timestamp` **(** :ref:`String` name **)** | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -65,7 +65,7 @@ Methods +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`compute_list_dispatch` **(** :ref:`int` compute_list, :ref:`int` x_groups, :ref:`int` y_groups, :ref:`int` z_groups **)** | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`compute_list_end` **(** |bitfield|\<:ref:`BarrierMask`\> post_barrier=15 **)** | + | void | :ref:`compute_list_end` **(** |bitfield|\<:ref:`BarrierMask`\> post_barrier=32767 **)** | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`compute_list_set_push_constant` **(** :ref:`int` compute_list, :ref:`PackedByteArray` buffer, :ref:`int` size_bytes **)** | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -101,7 +101,7 @@ Methods +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`draw_list_enable_scissor` **(** :ref:`int` draw_list, :ref:`Rect2` rect=Rect2(0, 0, 0, 0) **)** | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_list_end` **(** |bitfield|\<:ref:`BarrierMask`\> post_barrier=15 **)** | + | void | :ref:`draw_list_end` **(** |bitfield|\<:ref:`BarrierMask`\> post_barrier=32767 **)** | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`draw_list_set_blend_constants` **(** :ref:`int` draw_list, :ref:`Color` color **)** | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -181,10 +181,12 @@ Methods +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RDShaderSPIRV` | :ref:`shader_compile_spirv_from_source` **(** :ref:`RDShaderSource` shader_source, :ref:`bool` allow_cache=true **)** | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`shader_create_from_bytecode` **(** :ref:`PackedByteArray` binary_data **)** | + | :ref:`RID` | :ref:`shader_create_from_bytecode` **(** :ref:`PackedByteArray` binary_data, :ref:`RID` placeholder_rid=RID() **)** | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`shader_create_from_spirv` **(** :ref:`RDShaderSPIRV` spirv_data, :ref:`String` name="" **)** | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`shader_create_placeholder` **(** **)** | + +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`shader_get_vertex_input_attribute_mask` **(** :ref:`RID` shader **)** | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`storage_buffer_create` **(** :ref:`int` size_bytes, :ref:`PackedByteArray` data=PackedByteArray(), |bitfield|\<:ref:`StorageBufferUsage`\> usage=0 **)** | @@ -195,9 +197,9 @@ Methods +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`texture_buffer_create` **(** :ref:`int` size_bytes, :ref:`DataFormat` format, :ref:`PackedByteArray` data=PackedByteArray() **)** | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`texture_clear` **(** :ref:`RID` texture, :ref:`Color` color, :ref:`int` base_mipmap, :ref:`int` mipmap_count, :ref:`int` base_layer, :ref:`int` layer_count, |bitfield|\<:ref:`BarrierMask`\> post_barrier=15 **)** | + | :ref:`Error` | :ref:`texture_clear` **(** :ref:`RID` texture, :ref:`Color` color, :ref:`int` base_mipmap, :ref:`int` mipmap_count, :ref:`int` base_layer, :ref:`int` layer_count, |bitfield|\<:ref:`BarrierMask`\> post_barrier=32767 **)** | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`texture_copy` **(** :ref:`RID` from_texture, :ref:`RID` to_texture, :ref:`Vector3` from_pos, :ref:`Vector3` to_pos, :ref:`Vector3` size, :ref:`int` src_mipmap, :ref:`int` dst_mipmap, :ref:`int` src_layer, :ref:`int` dst_layer, |bitfield|\<:ref:`BarrierMask`\> post_barrier=15 **)** | + | :ref:`Error` | :ref:`texture_copy` **(** :ref:`RID` from_texture, :ref:`RID` to_texture, :ref:`Vector3` from_pos, :ref:`Vector3` to_pos, :ref:`Vector3` size, :ref:`int` src_mipmap, :ref:`int` dst_mipmap, :ref:`int` src_layer, :ref:`int` dst_layer, |bitfield|\<:ref:`BarrierMask`\> post_barrier=32767 **)** | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`texture_create` **(** :ref:`RDTextureFormat` format, :ref:`RDTextureView` view, :ref:`PackedByteArray[]` data=[] **)** | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -217,9 +219,9 @@ Methods +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`texture_is_valid` **(** :ref:`RID` texture **)** | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`texture_resolve_multisample` **(** :ref:`RID` from_texture, :ref:`RID` to_texture, |bitfield|\<:ref:`BarrierMask`\> post_barrier=15 **)** | + | :ref:`Error` | :ref:`texture_resolve_multisample` **(** :ref:`RID` from_texture, :ref:`RID` to_texture, |bitfield|\<:ref:`BarrierMask`\> post_barrier=32767 **)** | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`texture_update` **(** :ref:`RID` texture, :ref:`int` layer, :ref:`PackedByteArray` data, |bitfield|\<:ref:`BarrierMask`\> post_barrier=15 **)** | + | :ref:`Error` | :ref:`texture_update` **(** :ref:`RID` texture, :ref:`int` layer, :ref:`PackedByteArray` data, |bitfield|\<:ref:`BarrierMask`\> post_barrier=32767 **)** | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`uniform_buffer_create` **(** :ref:`int` size_bytes, :ref:`PackedByteArray` data=PackedByteArray() **)** | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -2197,7 +2199,7 @@ Vertex shader barrier mask. .. rst-class:: classref-enumeration-constant -:ref:`BarrierMask` **BARRIER_MASK_FRAGMENT** = ``2`` +:ref:`BarrierMask` **BARRIER_MASK_FRAGMENT** = ``8`` Fragment shader barrier mask. @@ -2205,7 +2207,7 @@ Fragment shader barrier mask. .. rst-class:: classref-enumeration-constant -:ref:`BarrierMask` **BARRIER_MASK_COMPUTE** = ``4`` +:ref:`BarrierMask` **BARRIER_MASK_COMPUTE** = ``2`` Compute barrier mask. @@ -2213,7 +2215,7 @@ Compute barrier mask. .. rst-class:: classref-enumeration-constant -:ref:`BarrierMask` **BARRIER_MASK_TRANSFER** = ``8`` +:ref:`BarrierMask` **BARRIER_MASK_TRANSFER** = ``4`` Transfer barrier mask. @@ -2221,7 +2223,7 @@ Transfer barrier mask. .. rst-class:: classref-enumeration-constant -:ref:`BarrierMask` **BARRIER_MASK_RASTER** = ``3`` +:ref:`BarrierMask` **BARRIER_MASK_RASTER** = ``9`` Raster barrier mask (vertex and fragment). Equivalent to ``BARRIER_MASK_VERTEX | BARRIER_MASK_FRAGMENT``. @@ -2229,15 +2231,15 @@ Raster barrier mask (vertex and fragment). Equivalent to ``BARRIER_MASK_VERTEX | .. rst-class:: classref-enumeration-constant -:ref:`BarrierMask` **BARRIER_MASK_ALL_BARRIERS** = ``15`` +:ref:`BarrierMask` **BARRIER_MASK_ALL_BARRIERS** = ``32767`` -Barrier mask for all types (raster, compute, transfer). Equivalent to ``BARRIER_MASK_RASTER | BARRIER_MASK_COMPUTE | BARRIER_MASK_TRANSFER``. +Barrier mask for all types (vertex, fragment, compute, transfer). .. _class_RenderingDevice_constant_BARRIER_MASK_NO_BARRIER: .. rst-class:: classref-enumeration-constant -:ref:`BarrierMask` **BARRIER_MASK_NO_BARRIER** = ``16`` +:ref:`BarrierMask` **BARRIER_MASK_NO_BARRIER** = ``32768`` No barrier for any type. @@ -2823,7 +2825,7 @@ enum **UniformType**: :ref:`UniformType` **UNIFORM_TYPE_SAMPLER** = ``0`` -Sampler uniform. TODO: Difference between sampler and texture uniform +Sampler uniform. .. _class_RenderingDevice_constant_UNIFORM_TYPE_SAMPLER_WITH_TEXTURE: @@ -2847,7 +2849,7 @@ Texture uniform. :ref:`UniformType` **UNIFORM_TYPE_IMAGE** = ``3`` -Image uniform. TODO: Difference between texture and image uniform +Image uniform. .. _class_RenderingDevice_constant_UNIFORM_TYPE_TEXTURE_BUFFER: @@ -2855,7 +2857,7 @@ Image uniform. TODO: Difference between texture and image uniform :ref:`UniformType` **UNIFORM_TYPE_TEXTURE_BUFFER** = ``4`` -Texture buffer uniform. TODO: Difference between texture and texture buffe uniformr +Texture buffer uniform. .. _class_RenderingDevice_constant_UNIFORM_TYPE_SAMPLER_WITH_TEXTURE_BUFFER: @@ -2863,7 +2865,7 @@ Texture buffer uniform. TODO: Difference between texture and texture buffe unifo :ref:`UniformType` **UNIFORM_TYPE_SAMPLER_WITH_TEXTURE_BUFFER** = ``5`` -Sampler uniform with a texture buffer. TODO: Difference between texture and texture buffer uniform +Sampler uniform with a texture buffer. .. _class_RenderingDevice_constant_UNIFORM_TYPE_IMAGE_BUFFER: @@ -2871,7 +2873,7 @@ Sampler uniform with a texture buffer. TODO: Difference between texture and text :ref:`UniformType` **UNIFORM_TYPE_IMAGE_BUFFER** = ``6`` -Image buffer uniform. TODO: Difference between texture and image uniforms +Image buffer uniform. .. _class_RenderingDevice_constant_UNIFORM_TYPE_UNIFORM_BUFFER: @@ -4329,7 +4331,7 @@ Method Descriptions .. rst-class:: classref-method -void **barrier** **(** |bitfield|\<:ref:`BarrierMask`\> from=15, |bitfield|\<:ref:`BarrierMask`\> to=15 **)** +void **barrier** **(** |bitfield|\<:ref:`BarrierMask`\> from=32767, |bitfield|\<:ref:`BarrierMask`\> to=32767 **)** Puts a memory barrier in place. This is used for synchronization to avoid data races. See also :ref:`full_barrier`, which may be useful for debugging. @@ -4341,7 +4343,7 @@ Puts a memory barrier in place. This is used for synchronization to avoid data r .. rst-class:: classref-method -:ref:`Error` **buffer_clear** **(** :ref:`RID` buffer, :ref:`int` offset, :ref:`int` size_bytes, |bitfield|\<:ref:`BarrierMask`\> post_barrier=15 **)** +:ref:`Error` **buffer_clear** **(** :ref:`RID` buffer, :ref:`int` offset, :ref:`int` size_bytes, |bitfield|\<:ref:`BarrierMask`\> post_barrier=32767 **)** .. container:: contribute @@ -4367,7 +4369,7 @@ Returns a copy of the data of the specified ``buffer``, optionally ``offset_byte .. rst-class:: classref-method -:ref:`Error` **buffer_update** **(** :ref:`RID` buffer, :ref:`int` offset, :ref:`int` size_bytes, :ref:`PackedByteArray` data, |bitfield|\<:ref:`BarrierMask`\> post_barrier=15 **)** +:ref:`Error` **buffer_update** **(** :ref:`RID` buffer, :ref:`int` offset, :ref:`int` size_bytes, :ref:`PackedByteArray` data, |bitfield|\<:ref:`BarrierMask`\> post_barrier=32767 **)** .. container:: contribute @@ -4479,7 +4481,7 @@ Submits the compute list for processing on the GPU. This is the compute equivale .. rst-class:: classref-method -void **compute_list_end** **(** |bitfield|\<:ref:`BarrierMask`\> post_barrier=15 **)** +void **compute_list_end** **(** |bitfield|\<:ref:`BarrierMask`\> post_barrier=32767 **)** Finishes a list of compute commands created with the ``compute_*`` methods. @@ -4726,7 +4728,7 @@ Creates a scissor rectangle and enables it for the specified ``draw_list``. Scis .. rst-class:: classref-method -void **draw_list_end** **(** |bitfield|\<:ref:`BarrierMask`\> post_barrier=15 **)** +void **draw_list_end** **(** |bitfield|\<:ref:`BarrierMask`\> post_barrier=32767 **)** Finishes a list of raster drawing commands created with the ``draw_*`` methods. @@ -5238,7 +5240,7 @@ If ``allow_cache`` is ``true``, make use of the shader cache generated by Godot. .. rst-class:: classref-method -:ref:`RID` **shader_create_from_bytecode** **(** :ref:`PackedByteArray` binary_data **)** +:ref:`RID` **shader_create_from_bytecode** **(** :ref:`PackedByteArray` binary_data, :ref:`RID` placeholder_rid=RID() **)** Creates a new shader instance from a binary compiled shader. It can be accessed with the RID that is returned. @@ -5262,6 +5264,18 @@ Once finished with your RID, you will want to free the RID using the RenderingDe ---- +.. _class_RenderingDevice_method_shader_create_placeholder: + +.. rst-class:: classref-method + +:ref:`RID` **shader_create_placeholder** **(** **)** + +Create a placeholder RID by allocating an RID without initializing it for use in :ref:`shader_create_from_bytecode`. This allows you to create an RID for a shader and pass it around, but defer compiling the shader to a later time. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingDevice_method_shader_get_vertex_input_attribute_mask: .. rst-class:: classref-method @@ -5338,7 +5352,7 @@ Once finished with your RID, you will want to free the RID using the RenderingDe .. rst-class:: classref-method -:ref:`Error` **texture_clear** **(** :ref:`RID` texture, :ref:`Color` color, :ref:`int` base_mipmap, :ref:`int` mipmap_count, :ref:`int` base_layer, :ref:`int` layer_count, |bitfield|\<:ref:`BarrierMask`\> post_barrier=15 **)** +:ref:`Error` **texture_clear** **(** :ref:`RID` texture, :ref:`Color` color, :ref:`int` base_mipmap, :ref:`int` mipmap_count, :ref:`int` base_layer, :ref:`int` layer_count, |bitfield|\<:ref:`BarrierMask`\> post_barrier=32767 **)** Clears the specified ``texture`` by replacing all of its pixels with the specified ``color``. ``base_mipmap`` and ``mipmap_count`` determine which mipmaps of the texture are affected by this clear operation, while ``base_layer`` and ``layer_count`` determine which layers of a 3D texture (or texture array) are affected by this clear operation. For 2D textures (which only have one layer by design), ``base_layer`` and ``layer_count`` must both be ``0``. @@ -5352,7 +5366,7 @@ Clears the specified ``texture`` by replacing all of its pixels with the specifi .. rst-class:: classref-method -:ref:`Error` **texture_copy** **(** :ref:`RID` from_texture, :ref:`RID` to_texture, :ref:`Vector3` from_pos, :ref:`Vector3` to_pos, :ref:`Vector3` size, :ref:`int` src_mipmap, :ref:`int` dst_mipmap, :ref:`int` src_layer, :ref:`int` dst_layer, |bitfield|\<:ref:`BarrierMask`\> post_barrier=15 **)** +:ref:`Error` **texture_copy** **(** :ref:`RID` from_texture, :ref:`RID` to_texture, :ref:`Vector3` from_pos, :ref:`Vector3` to_pos, :ref:`Vector3` size, :ref:`int` src_mipmap, :ref:`int` dst_mipmap, :ref:`int` src_layer, :ref:`int` dst_layer, |bitfield|\<:ref:`BarrierMask`\> post_barrier=32767 **)** Copies the ``from_texture`` to ``to_texture`` with the specified ``from_pos``, ``to_pos`` and ``size`` coordinates. The Z axis of the ``from_pos``, ``to_pos`` and ``size`` must be ``0`` for 2-dimensional textures. Source and destination mipmaps/layers must also be specified, with these parameters being ``0`` for textures without mipmaps or single-layer textures. Returns :ref:`@GlobalScope.OK` if the texture copy was successful or :ref:`@GlobalScope.ERR_INVALID_PARAMETER` otherwise. @@ -5496,7 +5510,7 @@ Returns ``true`` if the ``texture`` is valid, ``false`` otherwise. .. rst-class:: classref-method -:ref:`Error` **texture_resolve_multisample** **(** :ref:`RID` from_texture, :ref:`RID` to_texture, |bitfield|\<:ref:`BarrierMask`\> post_barrier=15 **)** +:ref:`Error` **texture_resolve_multisample** **(** :ref:`RID` from_texture, :ref:`RID` to_texture, |bitfield|\<:ref:`BarrierMask`\> post_barrier=32767 **)** Resolves the ``from_texture`` texture onto ``to_texture`` with multisample antialiasing enabled. This must be used when rendering a framebuffer for MSAA to work. Returns :ref:`@GlobalScope.OK` if successful, :ref:`@GlobalScope.ERR_INVALID_PARAMETER` otherwise. @@ -5522,7 +5536,7 @@ Resolves the ``from_texture`` texture onto ``to_texture`` with multisample antia .. rst-class:: classref-method -:ref:`Error` **texture_update** **(** :ref:`RID` texture, :ref:`int` layer, :ref:`PackedByteArray` data, |bitfield|\<:ref:`BarrierMask`\> post_barrier=15 **)** +:ref:`Error` **texture_update** **(** :ref:`RID` texture, :ref:`int` layer, :ref:`PackedByteArray` data, |bitfield|\<:ref:`BarrierMask`\> post_barrier=32767 **)** Updates texture data with new data, replacing the previous data in place. The updated texture data must have the same dimensions and format. For 2D textures (which only have one layer), ``layer`` must be ``0``. Returns :ref:`@GlobalScope.OK` if the update was successful, :ref:`@GlobalScope.ERR_INVALID_PARAMETER` otherwise. diff --git a/classes/class_renderingserver.rst b/classes/class_renderingserver.rst index 02097f63b9b..fd4ca06d371 100644 --- a/classes/class_renderingserver.rst +++ b/classes/class_renderingserver.rst @@ -67,6 +67,8 @@ Methods +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Image[]` | :ref:`bake_render_uv2` **(** :ref:`RID` base, :ref:`RID[]` material_overrides, :ref:`Vector2i` image_size **)** | +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`call_on_render_thread` **(** :ref:`Callable` callable **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`camera_attributes_create` **(** **)** | +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`camera_attributes_set_auto_exposure` **(** :ref:`RID` camera_attributes, :ref:`bool` enable, :ref:`float` min_sensitivity, :ref:`float` max_sensitivity, :ref:`float` speed, :ref:`float` scale **)** | @@ -937,6 +939,8 @@ Methods +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`viewport_set_use_debanding` **(** :ref:`RID` viewport, :ref:`bool` enable **)** | +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`viewport_set_use_hdr_2d` **(** :ref:`RID` viewport, :ref:`bool` enabled **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`viewport_set_use_occlusion_culling` **(** :ref:`RID` viewport, :ref:`bool` enable **)** | +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`viewport_set_use_taa` **(** :ref:`RID` viewport, :ref:`bool` enable **)** | @@ -5322,6 +5326,18 @@ Bakes the material data of the Mesh passed in the ``base`` parameter with option ---- +.. _class_RenderingServer_method_call_on_render_thread: + +.. rst-class:: classref-method + +void **call_on_render_thread** **(** :ref:`Callable` callable **)** + +As the RenderingServer actual logic may run on an separate thread, accessing its internals from the main (or any other) thread will result in errors. To make it easier to run code that can safely access the rendering internals (such as :ref:`RenderingDevice` and similar RD classes), push a callable via this function so it will be executed on the render thread. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_camera_attributes_create: .. rst-class:: classref-method @@ -7166,7 +7182,7 @@ Forces a synchronization between the CPU and GPU, which may be required in certa void **free_rid** **(** :ref:`RID` rid **)** -Tries to free an object in the RenderingServer. To avoid memory leaks, this should be called after using an object as memory management does not occur automatically when using RendeeringServer directly. +Tries to free an object in the RenderingServer. To avoid memory leaks, this should be called after using an object as memory management does not occur automatically when using RenderingServer directly. .. rst-class:: classref-item-separator @@ -10934,6 +10950,20 @@ If ``true``, enables debanding on the specified viewport. Equivalent to :ref:`Pr ---- +.. _class_RenderingServer_method_viewport_set_use_hdr_2d: + +.. rst-class:: classref-method + +void **viewport_set_use_hdr_2d** **(** :ref:`RID` viewport, :ref:`bool` enabled **)** + +If ``true``, 2D rendering will use a high dynamic range (HDR) format framebuffer matching the bit depth of the 3D framebuffer. When using the Forward+ renderer this will be a ``RGBA16`` framebuffer, while when using the Mobile renderer it will be a ``RGB10_A2`` framebuffer. Additionally, 2D rendering will take place in linear color space and will be converted to sRGB space immediately before blitting to the screen (if the Viewport is attached to the screen). Practically speaking, this means that the end result of the Viewport will not be clamped into the ``0-1`` range and can be used in 3D rendering without color space adjustments. This allows 2D rendering to take advantage of effects requiring high dynamic range (e.g. 2D glow) as well as substantially improves the appearance of effects requiring highly detailed gradients. This setting has the same effect as :ref:`Viewport.use_hdr_2d`. + +\ **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. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_viewport_set_use_occlusion_culling: .. rst-class:: classref-method diff --git a/classes/class_renderscenebuffersrd.rst b/classes/class_renderscenebuffersrd.rst index e4df9ba9237..3fcad416308 100644 --- a/classes/class_renderscenebuffersrd.rst +++ b/classes/class_renderscenebuffersrd.rst @@ -21,7 +21,7 @@ Description This object manages all 3D rendering buffers for the rendering device based renderers. An instance of this object is created for every viewport that has 3D rendering enabled. -All buffers are organised in **contexts**. The default context is called **render_buffers** and can contain amongst others the color buffer, depth buffer, velocity buffers, VRS density map and MSAA variants of these buffers. +All buffers are organized in **contexts**. The default context is called **render_buffers** and can contain amongst others the color buffer, depth buffer, velocity buffers, VRS density map and MSAA variants of these buffers. Buffers are only guaranteed to exist during rendering of the viewport. @@ -258,7 +258,7 @@ Returns the texture size of a given slice of a cached texture. :ref:`bool` **get_use_taa** **(** **)** |const| -Returns **true** if TAA is enabled. +Returns ``true`` if TAA is enabled. .. rst-class:: classref-item-separator @@ -306,7 +306,7 @@ Returns the view count for the associated viewport. :ref:`bool` **has_texture** **(** :ref:`StringName` context, :ref:`StringName` name **)** |const| -Returns **true** if a cached texture exists for this name. +Returns ``true`` if a cached texture exists for this name. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_resourceimporterscene.rst b/classes/class_resourceimporterscene.rst index 809d10e76e9..378bbbe5397 100644 --- a/classes/class_resourceimporterscene.rst +++ b/classes/class_resourceimporterscene.rst @@ -40,39 +40,39 @@ Properties .. table:: :widths: auto - +-------------------------------------+------------------------------------------------------------------------------------------------------------------+------------------+ - | :ref:`Dictionary` | :ref:`_subresources` | ``{}`` | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------+------------------+ - | :ref:`float` | :ref:`animation/fps` | ``30`` | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------+------------------+ - | :ref:`bool` | :ref:`animation/import` | ``true`` | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------+------------------+ - | :ref:`bool` | :ref:`animation/remove_immutable_tracks` | ``true`` | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------+------------------+ - | :ref:`bool` | :ref:`animation/trimming` | ``false`` | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------+------------------+ - | :ref:`String` | :ref:`import_script/path` | ``""`` | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------+------------------+ - | :ref:`bool` | :ref:`meshes/create_shadow_meshes` | ``true`` | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------+------------------+ - | :ref:`bool` | :ref:`meshes/ensure_tangents` | ``true`` | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------+------------------+ - | :ref:`bool` | :ref:`meshes/generate_lods` | ``true`` | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------+------------------+ - | :ref:`int` | :ref:`meshes/light_baking` | ``1`` | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------+------------------+ - | :ref:`float` | :ref:`meshes/lightmap_texel_size` | ``0.2`` | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------+------------------+ - | :ref:`bool` | :ref:`nodes/apply_root_scale` | ``true`` | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------+------------------+ - | :ref:`String` | :ref:`nodes/root_name` | ``"Scene Root"`` | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------+------------------+ - | :ref:`float` | :ref:`nodes/root_scale` | ``1.0`` | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------+------------------+ - | :ref:`String` | :ref:`nodes/root_type` | ``"Node3D"`` | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------+------------------+ - | :ref:`bool` | :ref:`skins/use_named_skins` | ``true`` | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------+------------------+ + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`Dictionary` | :ref:`_subresources` | ``{}`` | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`animation/fps` | ``30`` | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`animation/import` | ``true`` | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`animation/remove_immutable_tracks` | ``true`` | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`animation/trimming` | ``false`` | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`String` | :ref:`import_script/path` | ``""`` | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`meshes/create_shadow_meshes` | ``true`` | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`meshes/ensure_tangents` | ``true`` | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`meshes/generate_lods` | ``true`` | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`meshes/light_baking` | ``1`` | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`meshes/lightmap_texel_size` | ``0.2`` | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`nodes/apply_root_scale` | ``true`` | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`String` | :ref:`nodes/root_name` | ``""`` | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`nodes/root_scale` | ``1.0`` | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`String` | :ref:`nodes/root_type` | ``""`` | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`skins/use_named_skins` | ``true`` | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ .. rst-class:: classref-section-separator @@ -225,7 +225,7 @@ Controls the size of each texel on the baked lightmap. A smaller value results i :ref:`bool` **nodes/apply_root_scale** = ``true`` -If ``true``, :ref:`nodes/root_scale` will be applied on the meshes and animations directly, while keeping the root node's scale to the default ``(1, 1, 1)``. This means that if you add a child node later on within the imported scene, it won't be scaled. If disabled, :ref:`nodes/root_scale` will multiply the scale of the root node instead. +If ``true``, :ref:`nodes/root_scale` will be applied to the descendant nodes, meshes, animations, bones, etc. This means that if you add a child node later on within the imported scene, it won't be scaled. If ``false``, :ref:`nodes/root_scale` will multiply the scale of the root node instead. .. rst-class:: classref-item-separator @@ -235,9 +235,9 @@ If ``true``, :ref:`nodes/root_scale` **nodes/root_name** = ``"Scene Root"`` +:ref:`String` **nodes/root_name** = ``""`` -The name of the root node in the imported scene. This is generally not noticeable when instancing the scene in the editor (or drag-and-dropping from the FileSystem dock), as the root node is renamed to match the filename in this case. +Override for the root node name. If empty, the root node will use what the scene specifies, or the file name if the scene does not specify a root name. .. rst-class:: classref-item-separator @@ -249,7 +249,7 @@ The name of the root node in the imported scene. This is generally not noticeabl :ref:`float` **nodes/root_scale** = ``1.0`` -The scale of meshes and animations (if :ref:`nodes/apply_root_scale` is ``true``), or the scale of the root node in the imported scene (if :ref:`nodes/apply_root_scale` is ``false``). +The uniform scale to use for the scene root. The default value of ``1.0`` will not perform any rescaling. See :ref:`nodes/apply_root_scale` for details of how this scale is applied. .. rst-class:: classref-item-separator @@ -259,9 +259,9 @@ The scale of meshes and animations (if :ref:`nodes/apply_root_scale` **nodes/root_type** = ``"Node3D"`` +:ref:`String` **nodes/root_type** = ``""`` -The node type to use as a root node. Using node types that inherit from :ref:`Node3D` is recommended. Otherwise, you'll lose the ability to position the node directly in the 3D editor. +Override for the root node type. If empty, the root node will use what the scene specifies, or :ref:`Node3D` if the scene does not specify a root type. Using a node type that inherits from :ref:`Node3D` is recommended. Otherwise, you'll lose the ability to position the node directly in the 3D editor. .. rst-class:: classref-item-separator diff --git a/classes/class_richtextlabel.rst b/classes/class_richtextlabel.rst index 200093674c4..0d91e6ac60d 100644 --- a/classes/class_richtextlabel.rst +++ b/classes/class_richtextlabel.rst @@ -61,6 +61,8 @@ Properties +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`deselect_on_focus_loss_enabled` | ``true`` | +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`drag_and_drop_selection_enabled` | ``true`` | + +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`fit_content` | ``false`` | +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`hint_underlined` | ``true`` | @@ -538,6 +540,23 @@ If ``true``, the selected text will be deselected when focus is lost. ---- +.. _class_RichTextLabel_property_drag_and_drop_selection_enabled: + +.. rst-class:: classref-property + +:ref:`bool` **drag_and_drop_selection_enabled** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_drag_and_drop_selection_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_drag_and_drop_selection_enabled** **(** **)** + +If ``true``, allow drag and drop of selected text. + +.. rst-class:: classref-item-separator + +---- + .. _class_RichTextLabel_property_fit_content: .. rst-class:: classref-property diff --git a/classes/class_scenetree.rst b/classes/class_scenetree.rst index c32660c02a7..0ce7b7f6059 100644 --- a/classes/class_scenetree.rst +++ b/classes/class_scenetree.rst @@ -307,7 +307,9 @@ For mobile platforms, see :ref:`quit_on_go_back` value **)** - :ref:`Node` **get_current_scene** **(** **)** -The current scene. +Returns the root node of the currently running scene, regardless of its structure. + +\ **Warning:** Setting this directly might not work as expected, and will *not* add or remove any nodes from the tree, consider using :ref:`change_scene_to_file` or :ref:`change_scene_to_packed` instead. .. rst-class:: classref-item-separator diff --git a/classes/class_softbody3d.rst b/classes/class_softbody3d.rst index 12069bfcbb5..9a984906ec8 100644 --- a/classes/class_softbody3d.rst +++ b/classes/class_softbody3d.rst @@ -240,9 +240,7 @@ Defines the behavior in physics when :ref:`Node.process_mode` value **)** - :ref:`float` **get_linear_stiffness** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +Higher values will result in a stiffer body, while lower values will increase the body's ability to bend. The value can be between ``0.0`` and ``1.0`` (inclusive). .. rst-class:: classref-item-separator diff --git a/classes/class_stylebox.rst b/classes/class_stylebox.rst index 093b43c1086..beb7b7ffaf5 100644 --- a/classes/class_stylebox.rst +++ b/classes/class_stylebox.rst @@ -122,7 +122,7 @@ It is up to the code using this style box to decide what these contents are: for - void **set_content_margin** **(** :ref:`Side` margin, :ref:`float` offset **)** - :ref:`float` **get_content_margin** **(** :ref:`Side` margin **)** |const| -The left margin for the contents of this style box. Increasing this value reduces the space available to the contents from the left. +The left margin for the contents of this style box. Increasing this value reduces the space available to the contents from the left. Refer to :ref:`content_margin_bottom` for extra considerations. diff --git a/classes/class_systemfont.rst b/classes/class_systemfont.rst index 3c075609dec..672390c4a09 100644 --- a/classes/class_systemfont.rst +++ b/classes/class_systemfont.rst @@ -42,8 +42,6 @@ Properties +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`FontAntialiasing` | :ref:`antialiasing` | ``1`` | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`Font[]` | :ref:`fallbacks` | ``[]`` | - +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`bool` | :ref:`font_italic` | ``false`` | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`PackedStringArray` | :ref:`font_names` | ``PackedStringArray()`` | @@ -112,23 +110,6 @@ Font anti-aliasing mode. ---- -.. _class_SystemFont_property_fallbacks: - -.. rst-class:: classref-property - -:ref:`Font[]` **fallbacks** = ``[]`` - -.. rst-class:: classref-property-setget - -- void **set_fallbacks** **(** :ref:`Font[]` value **)** -- :ref:`Font[]` **get_fallbacks** **(** **)** - -Array of fallback :ref:`Font`\ s. - -.. rst-class:: classref-item-separator - ----- - .. _class_SystemFont_property_font_italic: .. rst-class:: classref-property diff --git a/classes/class_tilemap.rst b/classes/class_tilemap.rst index 96fdc27d833..bd1b742bb26 100644 --- a/classes/class_tilemap.rst +++ b/classes/class_tilemap.rst @@ -683,7 +683,7 @@ If ``layer`` is negative, the layers are accessed from the last one. Returns a :ref:`Vector2i` array with the positions of all cells containing a tile in the given layer. Tiles may be filtered according to their source (``source_id``), their atlas coordinates (``atlas_coords``) or alternative id (``alternative_tile``). -If a parameter has it's value set to the default one, this parameter is not used to filter a cell. Thus, if all parameters have their respective default value, this method returns the same result as :ref:`get_used_cells`. +If a parameter has its value set to the default one, this parameter is not used to filter a cell. Thus, if all parameters have their respective default value, this method returns the same result as :ref:`get_used_cells`. A cell is considered empty if its source identifier equals -1, its atlas coordinates identifiers is ``Vector2(-1, -1)`` and its alternative identifier is -1. @@ -801,7 +801,7 @@ Removes the layer at index ``layer``. void **set_cell** **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`int` source_id=-1, :ref:`Vector2i` atlas_coords=Vector2i(-1, -1), :ref:`int` alternative_tile=0 **)** -Sets the tile indentifiers for the cell on layer ``layer`` at coordinates ``coords``. Each tile of the :ref:`TileSet` is identified using three parts: +Sets the tile identifiers for the cell on layer ``layer`` at coordinates ``coords``. Each tile of the :ref:`TileSet` is identified using three parts: - The source identifier ``source_id`` identifies a :ref:`TileSetSource` identifier. See :ref:`TileSet.set_source_id`, diff --git a/classes/class_tilemappattern.rst b/classes/class_tilemappattern.rst index f0be66f1927..ed7bdd34fd2 100644 --- a/classes/class_tilemappattern.rst +++ b/classes/class_tilemappattern.rst @@ -164,7 +164,7 @@ Remove the cell at the given coordinates. void **set_cell** **(** :ref:`Vector2i` coords, :ref:`int` source_id=-1, :ref:`Vector2i` atlas_coords=Vector2i(-1, -1), :ref:`int` alternative_tile=-1 **)** -Sets the tile indentifiers for the cell at coordinates ``coords``. See :ref:`TileMap.set_cell`. +Sets the tile identifiers for the cell at coordinates ``coords``. See :ref:`TileMap.set_cell`. .. rst-class:: classref-item-separator diff --git a/classes/class_tileset.rst b/classes/class_tileset.rst index dae87515527..3e2b48631be 100644 --- a/classes/class_tileset.rst +++ b/classes/class_tileset.rst @@ -1164,7 +1164,7 @@ Returns if there is a source-level proxy for the given source ID. :ref:`Array` **map_tile_proxy** **(** :ref:`int` source_from, :ref:`Vector2i` coords_from, :ref:`int` alternative_from **)** |const| -According to the configured proxies, maps the provided indentifiers to a new set of identifiers. The source ID, atlas coordinates ID and alternative tile ID are returned as a 3 elements Array. +According to the configured proxies, maps the provided identifiers to a new set of identifiers. The source ID, atlas coordinates ID and alternative tile ID are returned as a 3 elements Array. This function first look for matching alternative-level proxies, then coordinates-level proxies, then source-level proxies. diff --git a/classes/class_tween.rst b/classes/class_tween.rst index 4a0ee871051..85e1d1e6bb5 100644 --- a/classes/class_tween.rst +++ b/classes/class_tween.rst @@ -910,7 +910,7 @@ Creates and appends a :ref:`MethodTweener`. This method is .. code-tab:: csharp Tween tween = CreateTween(); - tween.TweenMethod(Callable.From(() => LookAt(Vector3.Up)), new Vector3(-1.0f, 0.0f, -1.0f), new Vector3(1.0f, 0.0f, -1.0f), 1.0f); // The LookAt() method takes up vector as second argument. + tween.TweenMethod(Callable.From((Vector3 target) => LookAt(target, Vector3.Up)), new Vector3(-1.0f, 0.0f, -1.0f), new Vector3(1.0f, 0.0f, -1.0f), 1.0f); // Use lambdas to bind additional arguments for the call. diff --git a/classes/class_viewport.rst b/classes/class_viewport.rst index 18a4e6aa908..41b7a216047 100644 --- a/classes/class_viewport.rst +++ b/classes/class_viewport.rst @@ -133,6 +133,8 @@ Properties +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ | :ref:`bool` | :ref:`use_debanding` | ``false`` | +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`use_hdr_2d` | ``false`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ | :ref:`bool` | :ref:`use_occlusion_culling` | ``false`` | +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ | :ref:`bool` | :ref:`use_taa` | ``false`` | @@ -1569,7 +1571,7 @@ Sets the screen-space antialiasing method used. Screen-space antialiasing works Affects the final texture sharpness by reading from a lower or higher mipmap (also called "texture LOD bias"). Negative values make mipmapped textures sharper but grainier when viewed at a distance, while positive values make mipmapped textures blurrier (even when up close). -Enabling temporal antialiasing (:ref:`use_taa`) will automatically apply a ``-0.5`` offset to this value, while enabling FXAA (:ref:`screen_space_aa`) will automatically apply a ``-0.25`` offset to this value. If both TAA and FXAA are enbled at the same time, an offset of ``-0.75`` is applied to this value. +Enabling temporal antialiasing (:ref:`use_taa`) will automatically apply a ``-0.5`` offset to this value, while enabling FXAA (:ref:`screen_space_aa`) will automatically apply a ``-0.25`` offset to this value. If both TAA and FXAA are enabled at the same time, an offset of ``-0.75`` is applied to this value. \ **Note:** If :ref:`scaling_3d_scale` is lower than ``1.0`` (exclusive), :ref:`texture_mipmap_bias` is used to adjust the automatic mipmap bias which is calculated internally based on the scale factor. The formula for this is ``log2(scaling_3d_scale) + mipmap_bias``. @@ -1615,6 +1617,25 @@ In some cases, debanding may introduce a slightly noticeable dithering pattern. ---- +.. _class_Viewport_property_use_hdr_2d: + +.. rst-class:: classref-property + +:ref:`bool` **use_hdr_2d** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_use_hdr_2d** **(** :ref:`bool` value **)** +- :ref:`bool` **is_using_hdr_2d** **(** **)** + +If ``true``, 2D rendering will use an high dynamic range (HDR) format framebuffer matching the bit depth of the 3D framebuffer. When using the Forward+ renderer this will be a ``RGBA16`` framebuffer, while when using the Mobile renderer it will be a ``RGB10_A2`` framebuffer. Additionally, 2D rendering will take place in linear color space and will be converted to sRGB space immediately before blitting to the screen (if the Viewport is attached to the screen). Practically speaking, this means that the end result of the Viewport will not be clamped into the ``0-1`` range and can be used in 3D rendering without color space adjustments. This allows 2D rendering to take advantage of effects requiring high dynamic range (e.g. 2D glow) as well as substantially improves the appearance of effects requiring highly detailed gradients. + +\ **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. + +.. rst-class:: classref-item-separator + +---- + .. _class_Viewport_property_use_occlusion_culling: .. rst-class:: classref-property diff --git a/classes/class_window.rst b/classes/class_window.rst index 3c12ec2bcaa..37e53ed6f82 100644 --- a/classes/class_window.rst +++ b/classes/class_window.rst @@ -48,6 +48,8 @@ Properties +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+ | :ref:`Vector2i` | :ref:`content_scale_size` | ``Vector2i(0, 0)`` | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+ + | :ref:`ContentScaleStretch` | :ref:`content_scale_stretch` | ``0`` | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+ | :ref:`int` | :ref:`current_screen` | | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+ | :ref:`bool` | :ref:`exclusive` | ``false`` | @@ -99,6 +101,8 @@ Methods .. table:: :widths: auto + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_get_contents_minimum_size` **(** **)** |virtual| |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_theme_color_override` **(** :ref:`StringName` name, :ref:`Color` color **)** | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -392,7 +396,7 @@ Emitted when a go back request is sent (e.g. pressing the "Back" button on Andro **mouse_entered** **(** **)** -Emitted when the mouse cursor enters the **Window**'s area, regardless if it's currently focused or not. +Emitted when the mouse cursor enters the **Window**'s visible area, that is not occluded behind other :ref:`Control`\ s or windows, provided its :ref:`Viewport.gui_disable_input` is ``false`` and regardless if it's currently focused or not. .. rst-class:: classref-item-separator @@ -404,7 +408,7 @@ Emitted when the mouse cursor enters the **Window**'s area, regardless if it's c **mouse_exited** **(** **)** -Emitted when the mouse cursor exits the **Window**'s area (including when it's hovered over another window on top of this one). +Emitted when the mouse cursor leaves the **Window**'s visible area, that is not occluded behind other :ref:`Control`\ s or windows, provided its :ref:`Viewport.gui_disable_input` is ``false`` and regardless if it's currently focused or not. .. rst-class:: classref-item-separator @@ -695,6 +699,32 @@ The content's aspect will be preserved. If the target size has different aspect ---- +.. _enum_Window_ContentScaleStretch: + +.. rst-class:: classref-enumeration + +enum **ContentScaleStretch**: + +.. _class_Window_constant_CONTENT_SCALE_STRETCH_FRACTIONAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`ContentScaleStretch` **CONTENT_SCALE_STRETCH_FRACTIONAL** = ``0`` + +The content will be stretched according to a fractional factor. This fills all the space available in the window, but allows "pixel wobble" to occur due to uneven pixel scaling. + +.. _class_Window_constant_CONTENT_SCALE_STRETCH_INTEGER: + +.. rst-class:: classref-enumeration-constant + +:ref:`ContentScaleStretch` **CONTENT_SCALE_STRETCH_INTEGER** = ``1`` + +The content will be stretched only according to an integer factor, preserving sharp pixels. This may leave a black background visible on the window's edges depending on the window size. + +.. rst-class:: classref-item-separator + +---- + .. _enum_Window_LayoutDirection: .. rst-class:: classref-enumeration @@ -952,6 +982,23 @@ Base size of the content (i.e. nodes that are drawn inside the window). If non-z ---- +.. _class_Window_property_content_scale_stretch: + +.. rst-class:: classref-property + +:ref:`ContentScaleStretch` **content_scale_stretch** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_content_scale_stretch** **(** :ref:`ContentScaleStretch` value **)** +- :ref:`ContentScaleStretch` **get_content_scale_stretch** **(** **)** + +The policy to use to determine the final scale factor for 2D elements. This affects how :ref:`content_scale_factor` is applied, in addition to the automatic scale factor determined by :ref:`content_scale_size`. + +.. rst-class:: classref-item-separator + +---- + .. _class_Window_property_current_screen: .. rst-class:: classref-property @@ -1171,8 +1218,6 @@ Passing an empty array will disable passthrough support (all mouse events will b If ``true``, the **Window** will be considered a popup. Popups are sub-windows that don't show as separate windows in system's window manager's window list and will send close request when anything is clicked outside of them (unless :ref:`exclusive` is enabled). -\ **Note:** This property only works with native windows. - .. rst-class:: classref-item-separator ---- @@ -1383,6 +1428,18 @@ If ``false``, you need to call :ref:`child_controls_changed` **_get_contents_minimum_size** **(** **)** |virtual| |const| + +Virtual method to be implemented by the user. Overrides the value returned by :ref:`get_contents_minimum_size`. + +.. rst-class:: classref-item-separator + +---- + .. _class_Window_method_add_theme_color_override: .. rst-class:: classref-method @@ -1523,6 +1580,8 @@ Ends a bulk theme override update. See :ref:`begin_bulk_theme_override` nodes of the window. Use :ref:`child_controls_changed` to update it when children nodes have changed. +The value returned by this method can be overridden with :ref:`_get_contents_minimum_size`. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_xrinterfaceextension.rst b/classes/class_xrinterfaceextension.rst index 3ba8a436756..4002bf65ae6 100644 --- a/classes/class_xrinterfaceextension.rst +++ b/classes/class_xrinterfaceextension.rst @@ -286,7 +286,7 @@ Returns a :ref:`PackedStringArray` with tracker names c :ref:`Dictionary` **_get_system_info** **(** **)** |virtual| |const| -Returns a :ref:`Dictionary` with system informationr elated to this interface. +Returns a :ref:`Dictionary` with system information related to this interface. .. rst-class:: classref-item-separator