From 16f90657da83118799b71bdb2deb1e5f39d201c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 23 Dec 2022 23:57:40 +0100 Subject: [PATCH] classref: Sync with current master branch (f7cf9fb14) --- classes/class_@gdscript.rst | 2 + classes/class_animation.rst | 40 +- ...ss_animationnodestatemachinetransition.rst | 95 +++-- classes/class_animationtree.rst | 28 ++ classes/class_area2d.rst | 74 ++-- classes/class_area3d.rst | 74 ++-- classes/class_arraymesh.rst | 4 +- classes/class_astargrid2d.rst | 46 +++ classes/class_audiostreamrandomizer.rst | 34 +- classes/class_boxcontainer.rst | 2 +- classes/class_button.rst | 2 + classes/class_buttongroup.rst | 4 +- classes/class_checkbox.rst | 2 + classes/class_checkbutton.rst | 2 + classes/class_codeedit.rst | 2 + classes/class_colorpicker.rst | 50 ++- classes/class_colorpickerbutton.rst | 2 + classes/class_editorspinslider.rst | 53 +++ classes/class_editorvcsinterface.rst | 8 +- classes/class_fontfile.rst | 16 +- classes/class_gridmap.rst | 114 +++--- classes/class_image.rst | 342 +++++++++++------- classes/class_itemlist.rst | 2 + classes/class_label.rst | 2 + classes/class_lineedit.rst | 2 + classes/class_linkbutton.rst | 2 + classes/class_menubar.rst | 2 + classes/class_menubutton.rst | 2 + classes/class_meshlibrary.rst | 28 ++ classes/class_navigationagent2d.rst | 181 ++++++--- classes/class_navigationagent3d.rst | 189 +++++++--- classes/class_navigationmesh.rst | 38 +- .../class_navigationpathqueryparameters2d.rst | 69 ++++ .../class_navigationpathqueryparameters3d.rst | 69 ++++ classes/class_navigationpathqueryresult2d.rst | 94 ++++- classes/class_navigationpathqueryresult3d.rst | 94 ++++- classes/class_optionbutton.rst | 2 + classes/class_physicsserver2d.rst | 28 ++ classes/class_physicsserver3d.rst | 28 ++ classes/class_physicsserver3dextension.rst | 32 ++ classes/class_popupmenu.rst | 2 + classes/class_progressbar.rst | 2 + classes/class_projectsettings.rst | 8 +- classes/class_renderingserver.rst | 14 + classes/class_richtextlabel.rst | 12 +- classes/class_tabbar.rst | 2 + classes/class_tabcontainer.rst | 2 + classes/class_textedit.rst | 2 + classes/class_tree.rst | 2 + classes/class_tubetrailmesh.rst | 64 +++- classes/class_vboxcontainer.rst | 2 +- classes/class_visualinstance3d.rst | 46 ++- 52 files changed, 1475 insertions(+), 543 deletions(-) diff --git a/classes/class_@gdscript.rst b/classes/class_@gdscript.rst index e7571c0eb..2540049f0 100644 --- a/classes/class_@gdscript.rst +++ b/classes/class_@gdscript.rst @@ -790,6 +790,8 @@ Starting from ``_ready()``, ``bar()`` would print: Returns the passed ``instance`` converted to a Dictionary. Can be useful for serializing. +\ **Note:** Cannot be used to serialize objects with built-in scripts attached or objects allocated within built-in scripts. + :: var foo = "bar" diff --git a/classes/class_animation.rst b/classes/class_animation.rst index 1f699f5a2..abaadd3dd 100644 --- a/classes/class_animation.rst +++ b/classes/class_animation.rst @@ -144,7 +144,7 @@ Methods +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`scale_track_insert_key` **(** :ref:`int` track_idx, :ref:`float` time, :ref:`Vector3` scale **)** | +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`track_find_key` **(** :ref:`int` track_idx, :ref:`float` time, :ref:`bool` exact=false **)** |const| | + | :ref:`int` | :ref:`track_find_key` **(** :ref:`int` track_idx, :ref:`float` time, :ref:`FindMode` find_mode=0 **)** |const| | +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`track_get_interpolation_loop_wrap` **(** :ref:`int` track_idx **)** |const| | +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -448,6 +448,40 @@ This flag indicates that the animation has reached the end of the animation and This flag indicates that the animation has reached the start of the animation and just after loop processed. +.. rst-class:: classref-item-separator + +---- + +.. _enum_Animation_FindMode: + +.. rst-class:: classref-enumeration + +enum **FindMode**: + +.. _class_Animation_constant_FIND_MODE_NEAREST: + +.. rst-class:: classref-enumeration-constant + +:ref:`FindMode` **FIND_MODE_NEAREST** = ``0`` + +Finds the nearest time key. + +.. _class_Animation_constant_FIND_MODE_APPROX: + +.. rst-class:: classref-enumeration-constant + +:ref:`FindMode` **FIND_MODE_APPROX** = ``1`` + +Finds only the key with approximating the time. + +.. _class_Animation_constant_FIND_MODE_EXACT: + +.. rst-class:: classref-enumeration-constant + +:ref:`FindMode` **FIND_MODE_EXACT** = ``2`` + +Finds only the key with matching the time. + .. rst-class:: classref-section-separator ---- @@ -901,9 +935,9 @@ Inserts a key in a given 3D scale track. Returns the key index. .. rst-class:: classref-method -:ref:`int` **track_find_key** **(** :ref:`int` track_idx, :ref:`float` time, :ref:`bool` exact=false **)** |const| +:ref:`int` **track_find_key** **(** :ref:`int` track_idx, :ref:`float` time, :ref:`FindMode` find_mode=0 **)** |const| -Finds the key index by time in a given track. Optionally, only find it if the exact time is given. +Finds the key index by time in a given track. Optionally, only find it if the approx/exact time is given. .. rst-class:: classref-item-separator diff --git a/classes/class_animationnodestatemachinetransition.rst b/classes/class_animationnodestatemachinetransition.rst index a600a4433..88186b946 100644 --- a/classes/class_animationnodestatemachinetransition.rst +++ b/classes/class_animationnodestatemachinetransition.rst @@ -31,23 +31,21 @@ Properties .. table:: :widths: auto - +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ - | :ref:`StringName` | :ref:`advance_condition` | ``&""`` | - +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ - | :ref:`String` | :ref:`advance_expression` | ``""`` | - +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`auto_advance` | ``false`` | - +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`disabled` | ``false`` | - +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ - | :ref:`int` | :ref:`priority` | ``1`` | - +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ - | :ref:`SwitchMode` | :ref:`switch_mode` | ``0`` | - +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ - | :ref:`Curve` | :ref:`xfade_curve` | | - +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ - | :ref:`float` | :ref:`xfade_time` | ``0.0`` | - +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+---------+ + | :ref:`StringName` | :ref:`advance_condition` | ``&""`` | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+---------+ + | :ref:`String` | :ref:`advance_expression` | ``""`` | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+---------+ + | :ref:`AdvanceMode` | :ref:`advance_mode` | ``1`` | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+---------+ + | :ref:`int` | :ref:`priority` | ``1`` | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+---------+ + | :ref:`SwitchMode` | :ref:`switch_mode` | ``0`` | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+---------+ + | :ref:`Curve` | :ref:`xfade_curve` | | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`xfade_time` | ``0.0`` | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+---------+ .. rst-class:: classref-section-separator @@ -105,6 +103,40 @@ Switch to the next state immediately, but will seek the new state to the playbac Wait for the current state playback to end, then switch to the beginning of the next state animation. +.. rst-class:: classref-item-separator + +---- + +.. _enum_AnimationNodeStateMachineTransition_AdvanceMode: + +.. rst-class:: classref-enumeration + +enum **AdvanceMode**: + +.. _class_AnimationNodeStateMachineTransition_constant_ADVANCE_MODE_DISABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`AdvanceMode` **ADVANCE_MODE_DISABLED** = ``0`` + +Don't use this transition. + +.. _class_AnimationNodeStateMachineTransition_constant_ADVANCE_MODE_ENABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`AdvanceMode` **ADVANCE_MODE_ENABLED** = ``1`` + +Only use this transition during :ref:`AnimationNodeStateMachinePlayback.travel`. + +.. _class_AnimationNodeStateMachineTransition_constant_ADVANCE_MODE_AUTO: + +.. rst-class:: classref-enumeration-constant + +:ref:`AdvanceMode` **ADVANCE_MODE_AUTO** = ``2`` + +Automatically use this transition if the :ref:`advance_condition` and :ref:`advance_expression` checks are true (if assigned). + .. rst-class:: classref-section-separator ---- @@ -161,35 +193,18 @@ Use an expression as a condition for state machine transitions. It is possible t ---- -.. _class_AnimationNodeStateMachineTransition_property_auto_advance: +.. _class_AnimationNodeStateMachineTransition_property_advance_mode: .. rst-class:: classref-property -:ref:`bool` **auto_advance** = ``false`` +:ref:`AdvanceMode` **advance_mode** = ``1`` .. rst-class:: classref-property-setget -- void **set_auto_advance** **(** :ref:`bool` value **)** -- :ref:`bool` **has_auto_advance** **(** **)** +- void **set_advance_mode** **(** :ref:`AdvanceMode` value **)** +- :ref:`AdvanceMode` **get_advance_mode** **(** **)** -Turn on the transition automatically when this state is reached. This works best with :ref:`SWITCH_MODE_AT_END`. - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationNodeStateMachineTransition_property_disabled: - -.. rst-class:: classref-property - -:ref:`bool` **disabled** = ``false`` - -.. rst-class:: classref-property-setget - -- void **set_disabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_disabled** **(** **)** - -Don't use this transition during :ref:`AnimationNodeStateMachinePlayback.travel` or :ref:`auto_advance`. +Determines whether the transition should disabled, enabled when using :ref:`AnimationNodeStateMachinePlayback.travel`, or traversed automatically if the :ref:`advance_condition` and :ref:`advance_expression` checks are true (if assigned). .. rst-class:: classref-item-separator @@ -206,7 +221,7 @@ Don't use this transition during :ref:`AnimationNodeStateMachinePlayback.travel< - void **set_priority** **(** :ref:`int` value **)** - :ref:`int` **get_priority** **(** **)** -Lower priority transitions are preferred when travelling through the tree via :ref:`AnimationNodeStateMachinePlayback.travel` or :ref:`auto_advance`. +Lower priority transitions are preferred when travelling through the tree via :ref:`AnimationNodeStateMachinePlayback.travel` or :ref:`advance_mode` is set to :ref:`ADVANCE_MODE_AUTO`. .. rst-class:: classref-item-separator diff --git a/classes/class_animationtree.rst b/classes/class_animationtree.rst index 5efb4af44..5bcd9e1b9 100644 --- a/classes/class_animationtree.rst +++ b/classes/class_animationtree.rst @@ -83,6 +83,20 @@ Methods Signals ------- +.. _class_AnimationTree_signal_animation_finished: + +.. rst-class:: classref-signal + +**animation_finished** **(** :ref:`StringName` anim_name **)** + +Notifies when an animation finished playing. + +\ **Note:** This signal is not emitted if an animation is looping or aborted. Also be aware of the possibility of unseen playback by sync and xfade. + +.. rst-class:: classref-item-separator + +---- + .. _class_AnimationTree_signal_animation_player_changed: .. rst-class:: classref-signal @@ -91,6 +105,20 @@ Signals Emitted when the :ref:`anim_player` is changed. +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationTree_signal_animation_started: + +.. rst-class:: classref-signal + +**animation_started** **(** :ref:`StringName` anim_name **)** + +Notifies when an animation starts playing. + +\ **Note:** This signal is not emitted if an animation is looping or playbacked from the middle. Also be aware of the possibility of unseen playback by sync and xfade. + .. rst-class:: classref-section-separator ---- diff --git a/classes/class_area2d.rst b/classes/class_area2d.rst index 875a7b8fd..aa3a31ba7 100644 --- a/classes/class_area2d.rst +++ b/classes/class_area2d.rst @@ -115,9 +115,7 @@ Signals **area_entered** **(** :ref:`Area2D` area **)** -Emitted when another Area2D enters this Area2D. Requires :ref:`monitoring` to be set to ``true``. - -\ ``area`` the other Area2D. +Emitted when the received ``area`` enters this area. Requires :ref:`monitoring` to be set to ``true``. .. rst-class:: classref-item-separator @@ -129,9 +127,7 @@ Emitted when another Area2D enters this Area2D. Requires :ref:`monitoring` area **)** -Emitted when another Area2D exits this Area2D. Requires :ref:`monitoring` to be set to ``true``. - -\ ``area`` the other Area2D. +Emitted when the received ``area`` exits this area. Requires :ref:`monitoring` to be set to ``true``. .. rst-class:: classref-item-separator @@ -143,15 +139,24 @@ Emitted when another Area2D exits this Area2D. Requires :ref:`monitoring` area_rid, :ref:`Area2D` area, :ref:`int` area_shape_index, :ref:`int` local_shape_index **)** -Emitted when one of another Area2D's :ref:`Shape2D`\ s enters one of this Area2D's :ref:`Shape2D`\ s. Requires :ref:`monitoring` to be set to ``true``. +Emitted when a :ref:`Shape2D` of the received ``area`` enters a shape of this area. Requires :ref:`monitoring` to be set to ``true``. -\ ``area_rid`` the :ref:`RID` of the other Area2D's :ref:`CollisionObject2D` used by the :ref:`PhysicsServer2D`. +\ ``local_shape_index`` and ``area_shape_index`` contain indices of the interacting shapes from this area and the other area, respectively. ``area_rid`` contains the :ref:`RID` of the other area. These values can be used with the :ref:`PhysicsServer2D`. -\ ``area`` the other Area2D. +\ **Example of getting the** :ref:`CollisionShape2D` **node from the shape index:**\ + + +.. tabs:: + + .. code-tab:: gdscript + + var other_shape_owner = area.shape_find_owner(area_shape_index) + var other_shape_node = area.shape_owner_get_owner(other_shape_owner) + + var local_shape_owner = shape_find_owner(local_shape_index) + var local_shape_node = shape_owner_get_owner(local_shape_owner) -\ ``area_shape_index`` the index of the :ref:`Shape2D` of the other Area2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))``. -\ ``local_shape_index`` the index of the :ref:`Shape2D` of this Area2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. .. rst-class:: classref-item-separator @@ -163,15 +168,9 @@ Emitted when one of another Area2D's :ref:`Shape2D`\ s enters one **area_shape_exited** **(** :ref:`RID` area_rid, :ref:`Area2D` area, :ref:`int` area_shape_index, :ref:`int` local_shape_index **)** -Emitted when one of another Area2D's :ref:`Shape2D`\ s exits one of this Area2D's :ref:`Shape2D`\ s. Requires :ref:`monitoring` to be set to ``true``. +Emitted when a :ref:`Shape2D` of the received ``area`` exits a shape of this area. Requires :ref:`monitoring` to be set to ``true``. -\ ``area_rid`` the :ref:`RID` of the other Area2D's :ref:`CollisionObject2D` used by the :ref:`PhysicsServer2D`. - -\ ``area`` the other Area2D. - -\ ``area_shape_index`` the index of the :ref:`Shape2D` of the other Area2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))``. - -\ ``local_shape_index`` the index of the :ref:`Shape2D` of this Area2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. +See also :ref:`area_shape_entered`. .. rst-class:: classref-item-separator @@ -183,9 +182,7 @@ Emitted when one of another Area2D's :ref:`Shape2D`\ s exits one **body_entered** **(** :ref:`Node2D` body **)** -Emitted when a :ref:`PhysicsBody2D` or :ref:`TileMap` enters this Area2D. Requires :ref:`monitoring` to be set to ``true``. :ref:`TileMap`\ s are detected if the :ref:`TileSet` has Collision :ref:`Shape2D`\ s. - -\ ``body`` the :ref:`Node`, if it exists in the tree, of the other :ref:`PhysicsBody2D` or :ref:`TileMap`. +Emitted when the received ``body`` enters this area. ``body`` can be a :ref:`PhysicsBody2D` or a :ref:`TileMap`. :ref:`TileMap`\ s are detected if their :ref:`TileSet` has collision shapes configured. Requires :ref:`monitoring` to be set to ``true``. .. rst-class:: classref-item-separator @@ -197,9 +194,7 @@ Emitted when a :ref:`PhysicsBody2D` or :ref:`TileMap` body **)** -Emitted when a :ref:`PhysicsBody2D` or :ref:`TileMap` exits this Area2D. Requires :ref:`monitoring` to be set to ``true``. :ref:`TileMap`\ s are detected if the :ref:`TileSet` has Collision :ref:`Shape2D`\ s. - -\ ``body`` the :ref:`Node`, if it exists in the tree, of the other :ref:`PhysicsBody2D` or :ref:`TileMap`. +Emitted when the received ``body`` exits this area. ``body`` can be a :ref:`PhysicsBody2D` or a :ref:`TileMap`. :ref:`TileMap`\ s are detected if their :ref:`TileSet` has collision shapes configured. Requires :ref:`monitoring` to be set to ``true``. .. rst-class:: classref-item-separator @@ -211,15 +206,24 @@ Emitted when a :ref:`PhysicsBody2D` or :ref:`TileMap` body_rid, :ref:`Node2D` body, :ref:`int` body_shape_index, :ref:`int` local_shape_index **)** -Emitted when one of a :ref:`PhysicsBody2D` or :ref:`TileMap`'s :ref:`Shape2D`\ s enters one of this Area2D's :ref:`Shape2D`\ s. Requires :ref:`monitoring` to be set to ``true``. :ref:`TileMap`\ s are detected if the :ref:`TileSet` has Collision :ref:`Shape2D`\ s. +Emitted when a :ref:`Shape2D` of the received ``body`` enters a shape of this area. ``body`` can be a :ref:`PhysicsBody2D` or a :ref:`TileMap`. :ref:`TileMap`\ s are detected if their :ref:`TileSet` has collision shapes configured. Requires :ref:`monitoring` to be set to ``true``. -\ ``body_rid`` the :ref:`RID` of the :ref:`PhysicsBody2D` or :ref:`TileSet`'s :ref:`CollisionObject2D` used by the :ref:`PhysicsServer2D`. +\ ``local_shape_index`` and ``body_shape_index`` contain indices of the interacting shapes from this area and the interacting body, respectively. ``body_rid`` contains the :ref:`RID` of the body. These values can be used with the :ref:`PhysicsServer2D`. -\ ``body`` the :ref:`Node`, if it exists in the tree, of the :ref:`PhysicsBody2D` or :ref:`TileMap`. +\ **Example of getting the** :ref:`CollisionShape2D` **node from the shape index:**\ + + +.. tabs:: + + .. code-tab:: gdscript + + var body_shape_owner = body.shape_find_owner(body_shape_index) + var body_shape_node = body.shape_owner_get_owner(body_shape_owner) + + var local_shape_owner = shape_find_owner(local_shape_index) + var local_shape_node = shape_owner_get_owner(local_shape_owner) -\ ``body_shape_index`` the index of the :ref:`Shape2D` of the :ref:`PhysicsBody2D` or :ref:`TileMap` used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))``. -\ ``local_shape_index`` the index of the :ref:`Shape2D` of this Area2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. .. rst-class:: classref-item-separator @@ -231,15 +235,9 @@ Emitted when one of a :ref:`PhysicsBody2D` or :ref:`TileMap **body_shape_exited** **(** :ref:`RID` body_rid, :ref:`Node2D` body, :ref:`int` body_shape_index, :ref:`int` local_shape_index **)** -Emitted when one of a :ref:`PhysicsBody2D` or :ref:`TileMap`'s :ref:`Shape2D`\ s exits one of this Area2D's :ref:`Shape2D`\ s. Requires :ref:`monitoring` to be set to ``true``. :ref:`TileMap`\ s are detected if the :ref:`TileSet` has Collision :ref:`Shape2D`\ s. +Emitted when a :ref:`Shape2D` of the received ``body`` exits a shape of this area. ``body`` can be a :ref:`PhysicsBody2D` or a :ref:`TileMap`. :ref:`TileMap`\ s are detected if their :ref:`TileSet` has collision shapes configured. Requires :ref:`monitoring` to be set to ``true``. -\ ``body_rid`` the :ref:`RID` of the :ref:`PhysicsBody2D` or :ref:`TileSet`'s :ref:`CollisionObject2D` used by the :ref:`PhysicsServer2D`. - -\ ``body`` the :ref:`Node`, if it exists in the tree, of the :ref:`PhysicsBody2D` or :ref:`TileMap`. - -\ ``body_shape_index`` the index of the :ref:`Shape2D` of the :ref:`PhysicsBody2D` or :ref:`TileMap` used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))``. - -\ ``local_shape_index`` the index of the :ref:`Shape2D` of this Area2D used by the :ref:`PhysicsServer2D`. Get the :ref:`CollisionShape2D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. +See also :ref:`body_shape_entered`. .. rst-class:: classref-section-separator diff --git a/classes/class_area3d.rst b/classes/class_area3d.rst index f8b2d51cc..36f4872db 100644 --- a/classes/class_area3d.rst +++ b/classes/class_area3d.rst @@ -125,9 +125,7 @@ Signals **area_entered** **(** :ref:`Area3D` area **)** -Emitted when another Area3D enters this Area3D. Requires :ref:`monitoring` to be set to ``true``. - -\ ``area`` the other Area3D. +Emitted when the received ``area`` enters this area. Requires :ref:`monitoring` to be set to ``true``. .. rst-class:: classref-item-separator @@ -139,9 +137,7 @@ Emitted when another Area3D enters this Area3D. Requires :ref:`monitoring` area **)** -Emitted when another Area3D exits this Area3D. Requires :ref:`monitoring` to be set to ``true``. - -\ ``area`` the other Area3D. +Emitted when the received ``area`` exits this area. Requires :ref:`monitoring` to be set to ``true``. .. rst-class:: classref-item-separator @@ -153,15 +149,24 @@ Emitted when another Area3D exits this Area3D. Requires :ref:`monitoring` area_rid, :ref:`Area3D` area, :ref:`int` area_shape_index, :ref:`int` local_shape_index **)** -Emitted when one of another Area3D's :ref:`Shape3D`\ s enters one of this Area3D's :ref:`Shape3D`\ s. Requires :ref:`monitoring` to be set to ``true``. +Emitted when a :ref:`Shape3D` of the received ``area`` enters a shape of this area. Requires :ref:`monitoring` to be set to ``true``. -\ ``area_rid`` the :ref:`RID` of the other Area3D's :ref:`CollisionObject3D` used by the :ref:`PhysicsServer3D`. +\ ``local_shape_index`` and ``area_shape_index`` contain indices of the interacting shapes from this area and the other area, respectively. ``area_rid`` contains the :ref:`RID` of the other area. These values can be used with the :ref:`PhysicsServer3D`. -\ ``area`` the other Area3D. +\ **Example of getting the** :ref:`CollisionShape3D` **node from the shape index:**\ + + +.. tabs:: + + .. code-tab:: gdscript + + var other_shape_owner = area.shape_find_owner(area_shape_index) + var other_shape_node = area.shape_owner_get_owner(other_shape_owner) + + var local_shape_owner = shape_find_owner(local_shape_index) + var local_shape_node = shape_owner_get_owner(local_shape_owner) -\ ``area_shape_index`` the index of the :ref:`Shape3D` of the other Area3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))``. -\ ``local_shape_index`` the index of the :ref:`Shape3D` of this Area3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. .. rst-class:: classref-item-separator @@ -173,15 +178,9 @@ Emitted when one of another Area3D's :ref:`Shape3D`\ s enters one **area_shape_exited** **(** :ref:`RID` area_rid, :ref:`Area3D` area, :ref:`int` area_shape_index, :ref:`int` local_shape_index **)** -Emitted when one of another Area3D's :ref:`Shape3D`\ s exits one of this Area3D's :ref:`Shape3D`\ s. Requires :ref:`monitoring` to be set to ``true``. +Emitted when a :ref:`Shape3D` of the received ``area`` exits a shape of this area. Requires :ref:`monitoring` to be set to ``true``. -\ ``area_rid`` the :ref:`RID` of the other Area3D's :ref:`CollisionObject3D` used by the :ref:`PhysicsServer3D`. - -\ ``area`` the other Area3D. - -\ ``area_shape_index`` the index of the :ref:`Shape3D` of the other Area3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))``. - -\ ``local_shape_index`` the index of the :ref:`Shape3D` of this Area3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. +See also :ref:`area_shape_entered`. .. rst-class:: classref-item-separator @@ -193,9 +192,7 @@ Emitted when one of another Area3D's :ref:`Shape3D`\ s exits one **body_entered** **(** :ref:`Node3D` body **)** -Emitted when a :ref:`PhysicsBody3D` or :ref:`GridMap` enters this Area3D. Requires :ref:`monitoring` to be set to ``true``. :ref:`GridMap`\ s are detected if the :ref:`MeshLibrary` has Collision :ref:`Shape3D`\ s. - -\ ``body`` the :ref:`Node`, if it exists in the tree, of the other :ref:`PhysicsBody3D` or :ref:`GridMap`. +Emitted when the received ``body`` enters this area. ``body`` can be a :ref:`PhysicsBody3D` or a :ref:`GridMap`. :ref:`GridMap`\ s are detected if their :ref:`MeshLibrary` has collision shapes configured. Requires :ref:`monitoring` to be set to ``true``. .. rst-class:: classref-item-separator @@ -207,9 +204,7 @@ Emitted when a :ref:`PhysicsBody3D` or :ref:`GridMap` body **)** -Emitted when a :ref:`PhysicsBody3D` or :ref:`GridMap` exits this Area3D. Requires :ref:`monitoring` to be set to ``true``. :ref:`GridMap`\ s are detected if the :ref:`MeshLibrary` has Collision :ref:`Shape3D`\ s. - -\ ``body`` the :ref:`Node`, if it exists in the tree, of the other :ref:`PhysicsBody3D` or :ref:`GridMap`. +Emitted when the received ``body`` exits this area. ``body`` can be a :ref:`PhysicsBody3D` or a :ref:`GridMap`. :ref:`GridMap`\ s are detected if their :ref:`MeshLibrary` has collision shapes configured. Requires :ref:`monitoring` to be set to ``true``. .. rst-class:: classref-item-separator @@ -221,15 +216,24 @@ Emitted when a :ref:`PhysicsBody3D` or :ref:`GridMap` body_rid, :ref:`Node3D` body, :ref:`int` body_shape_index, :ref:`int` local_shape_index **)** -Emitted when one of a :ref:`PhysicsBody3D` or :ref:`GridMap`'s :ref:`Shape3D`\ s enters one of this Area3D's :ref:`Shape3D`\ s. Requires :ref:`monitoring` to be set to ``true``. :ref:`GridMap`\ s are detected if the :ref:`MeshLibrary` has Collision :ref:`Shape3D`\ s. +Emitted when a :ref:`Shape3D` of the received ``body`` enters a shape of this area. ``body`` can be a :ref:`PhysicsBody3D` or a :ref:`GridMap`. :ref:`GridMap`\ s are detected if their :ref:`MeshLibrary` has collision shapes configured. Requires :ref:`monitoring` to be set to ``true``. -\ ``body_rid`` the :ref:`RID` of the :ref:`PhysicsBody3D` or :ref:`MeshLibrary`'s :ref:`CollisionObject3D` used by the :ref:`PhysicsServer3D`. +\ ``local_shape_index`` and ``body_shape_index`` contain indices of the interacting shapes from this area and the interacting body, respectively. ``body_rid`` contains the :ref:`RID` of the body. These values can be used with the :ref:`PhysicsServer3D`. -\ ``body`` the :ref:`Node`, if it exists in the tree, of the :ref:`PhysicsBody3D` or :ref:`GridMap`. +\ **Example of getting the** :ref:`CollisionShape3D` **node from the shape index:**\ + + +.. tabs:: + + .. code-tab:: gdscript + + var body_shape_owner = body.shape_find_owner(body_shape_index) + var body_shape_node = body.shape_owner_get_owner(body_shape_owner) + + var local_shape_owner = shape_find_owner(local_shape_index) + var local_shape_node = shape_owner_get_owner(local_shape_owner) -\ ``body_shape_index`` the index of the :ref:`Shape3D` of the :ref:`PhysicsBody3D` or :ref:`GridMap` used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))``. -\ ``local_shape_index`` the index of the :ref:`Shape3D` of this Area3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. .. rst-class:: classref-item-separator @@ -241,15 +245,9 @@ Emitted when one of a :ref:`PhysicsBody3D` or :ref:`GridMap **body_shape_exited** **(** :ref:`RID` body_rid, :ref:`Node3D` body, :ref:`int` body_shape_index, :ref:`int` local_shape_index **)** -Emitted when one of a :ref:`PhysicsBody3D` or :ref:`GridMap`'s :ref:`Shape3D`\ s enters one of this Area3D's :ref:`Shape3D`\ s. Requires :ref:`monitoring` to be set to ``true``. :ref:`GridMap`\ s are detected if the :ref:`MeshLibrary` has Collision :ref:`Shape3D`\ s. +Emitted when a :ref:`Shape3D` of the received ``body`` exits a shape of this area. ``body`` can be a :ref:`PhysicsBody3D` or a :ref:`GridMap`. :ref:`GridMap`\ s are detected if their :ref:`MeshLibrary` has collision shapes configured. Requires :ref:`monitoring` to be set to ``true``. -\ ``body_rid`` the :ref:`RID` of the :ref:`PhysicsBody3D` or :ref:`MeshLibrary`'s :ref:`CollisionObject3D` used by the :ref:`PhysicsServer3D`. - -\ ``body`` the :ref:`Node`, if it exists in the tree, of the :ref:`PhysicsBody3D` or :ref:`GridMap`. - -\ ``body_shape_index`` the index of the :ref:`Shape3D` of the :ref:`PhysicsBody3D` or :ref:`GridMap` used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))``. - -\ ``local_shape_index`` the index of the :ref:`Shape3D` of this Area3D used by the :ref:`PhysicsServer3D`. Get the :ref:`CollisionShape3D` node with ``self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))``. +See also :ref:`body_shape_entered`. .. rst-class:: classref-section-separator diff --git a/classes/class_arraymesh.rst b/classes/class_arraymesh.rst index da2973220..0ad7fc5bf 100644 --- a/classes/class_arraymesh.rst +++ b/classes/class_arraymesh.rst @@ -292,7 +292,7 @@ Returns the name of the blend shape at this index. :ref:`Error` **lightmap_unwrap** **(** :ref:`Transform3D` transform, :ref:`float` texel_size **)** -Will perform a UV unwrap on the **ArrayMesh** to prepare the mesh for lightmapping. +Performs a UV unwrap on the **ArrayMesh** to prepare the mesh for lightmapping. .. rst-class:: classref-item-separator @@ -304,7 +304,7 @@ Will perform a UV unwrap on the **ArrayMesh** to prepare the mesh for lightmappi void **regen_normal_maps** **(** **)** -Will regenerate normal maps for the **ArrayMesh**. +Regenerates tangents for each of the **ArrayMesh**'s surfaces. .. rst-class:: classref-item-separator diff --git a/classes/class_astargrid2d.rst b/classes/class_astargrid2d.rst index d5976e56f..d434f5822 100644 --- a/classes/class_astargrid2d.rst +++ b/classes/class_astargrid2d.rst @@ -87,6 +87,10 @@ Methods +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedVector2Array` | :ref:`get_point_path` **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_point_position` **(** :ref:`Vector2i` id **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_point_weight_scale` **(** :ref:`Vector2i` id **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_dirty` **(** **)** |const| | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_in_bounds` **(** :ref:`int` x, :ref:`int` y **)** |const| | @@ -97,6 +101,8 @@ Methods +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_point_solid` **(** :ref:`Vector2i` id, :ref:`bool` solid=true **)** | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_point_weight_scale` **(** :ref:`Vector2i` id, :ref:`float` weight_scale **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`update` **(** **)** | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -307,6 +313,8 @@ A specific :ref:`DiagonalMode` mode which will fo Enables or disables jumping to skip up the intermediate points and speeds up the searching algorithm. +\ **Note:** Currently, toggling it on disables the consideration of weight scaling in pathfinding. + .. rst-class:: classref-item-separator ---- @@ -416,6 +424,30 @@ Returns an array with the points that are in the path found by AStarGrid2D betwe ---- +.. _class_AStarGrid2D_method_get_point_position: + +.. rst-class:: classref-method + +:ref:`Vector2` **get_point_position** **(** :ref:`Vector2i` id **)** |const| + +Returns the position of the point associated with the given ``id``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AStarGrid2D_method_get_point_weight_scale: + +.. rst-class:: classref-method + +:ref:`float` **get_point_weight_scale** **(** :ref:`Vector2i` id **)** |const| + +Returns the weight scale of the point associated with the given ``id``. + +.. rst-class:: classref-item-separator + +---- + .. _class_AStarGrid2D_method_is_dirty: .. rst-class:: classref-method @@ -478,6 +510,20 @@ Disables or enables the specified point for pathfinding. Useful for making an ob ---- +.. _class_AStarGrid2D_method_set_point_weight_scale: + +.. rst-class:: classref-method + +void **set_point_weight_scale** **(** :ref:`Vector2i` id, :ref:`float` weight_scale **)** + +Sets the ``weight_scale`` for the point with the given ``id``. The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost` when determining the overall cost of traveling across a segment from a neighboring point to this point. + +\ **Note:** Calling :ref:`update` is not needed after the call of this function. + +.. rst-class:: classref-item-separator + +---- + .. _class_AStarGrid2D_method_update: .. rst-class:: classref-method diff --git a/classes/class_audiostreamrandomizer.rst b/classes/class_audiostreamrandomizer.rst index 9c5cf4f17..7ed58e09a 100644 --- a/classes/class_audiostreamrandomizer.rst +++ b/classes/class_audiostreamrandomizer.rst @@ -47,21 +47,21 @@ Methods .. table:: :widths: auto - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_stream` **(** :ref:`int` index **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AudioStream` | :ref:`get_stream` **(** :ref:`int` index **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_stream_probability_weight` **(** :ref:`int` index **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`move_stream` **(** :ref:`int` index_from, :ref:`int` index_to **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_stream` **(** :ref:`int` index **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_stream` **(** :ref:`int` index, :ref:`AudioStream` stream **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_stream_probability_weight` **(** :ref:`int` index, :ref:`float` weight **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_stream` **(** :ref:`int` index, :ref:`AudioStream` stream, :ref:`float` weight=1.0 **)** | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioStream` | :ref:`get_stream` **(** :ref:`int` index **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_stream_probability_weight` **(** :ref:`int` index **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`move_stream` **(** :ref:`int` index_from, :ref:`int` index_to **)** | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_stream` **(** :ref:`int` index **)** | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_stream` **(** :ref:`int` index, :ref:`AudioStream` stream **)** | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_stream_probability_weight` **(** :ref:`int` index, :ref:`float` weight **)** | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -188,9 +188,9 @@ Method Descriptions .. rst-class:: classref-method -void **add_stream** **(** :ref:`int` index **)** +void **add_stream** **(** :ref:`int` index, :ref:`AudioStream` stream, :ref:`float` weight=1.0 **)** -Insert a stream at the specified index. +Insert a stream at the specified index. If the index is less than zero, the insertion occurs at the end of the underlying pool. .. rst-class:: classref-item-separator diff --git a/classes/class_boxcontainer.rst b/classes/class_boxcontainer.rst index fad78d500..50ecac93f 100644 --- a/classes/class_boxcontainer.rst +++ b/classes/class_boxcontainer.rst @@ -12,7 +12,7 @@ BoxContainer **Inherits:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`ColorPicker`, :ref:`HBoxContainer`, :ref:`VBoxContainer` +**Inherited By:** :ref:`HBoxContainer`, :ref:`VBoxContainer` Base class for box containers. diff --git a/classes/class_button.rst b/classes/class_button.rst index a815c774e..85f3a0b85 100644 --- a/classes/class_button.rst +++ b/classes/class_button.rst @@ -517,6 +517,8 @@ The horizontal space between **Button**'s icon and text. Negative values will be The size of the text outline. +\ **Note:** If using a font with :ref:`FontFile.multichannel_signed_distance_field` enabled, its :ref:`FontFile.msdf_pixel_range` must be set to at least *twice* the value of :ref:`outline_size` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_buttongroup.rst b/classes/class_buttongroup.rst index b8f598ee3..b0f2a5501 100644 --- a/classes/class_buttongroup.rst +++ b/classes/class_buttongroup.rst @@ -19,9 +19,9 @@ Group of Buttons. Description ----------- -Group of :ref:`Button`. All direct and indirect children buttons become radios. Only one allows being pressed. +Group of :ref:`BaseButton`. The members of this group are treated like radio buttons in the sense that only one button can be pressed at the same time. -\ :ref:`BaseButton.toggle_mode` should be ``true``. +Every member of the ButtonGroup should have :ref:`BaseButton.toggle_mode` set to ``true``. .. rst-class:: classref-reftable-group diff --git a/classes/class_checkbox.rst b/classes/class_checkbox.rst index ad6a0b5c1..684800b32 100644 --- a/classes/class_checkbox.rst +++ b/classes/class_checkbox.rst @@ -224,6 +224,8 @@ The separation between the check icon and the text (in pixels). Negative values The size of the text outline. +\ **Note:** If using a font with :ref:`FontFile.multichannel_signed_distance_field` enabled, its :ref:`FontFile.msdf_pixel_range` must be set to at least *twice* the value of :ref:`outline_size` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_checkbutton.rst b/classes/class_checkbutton.rst index fc7c91616..1c89da3dd 100644 --- a/classes/class_checkbutton.rst +++ b/classes/class_checkbutton.rst @@ -224,6 +224,8 @@ The separation between the toggle icon and the text (in pixels). Negative values The size of the text outline. +\ **Note:** If using a font with :ref:`FontFile.multichannel_signed_distance_field` enabled, its :ref:`FontFile.msdf_pixel_range` must be set to at least *twice* the value of :ref:`outline_size` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_codeedit.rst b/classes/class_codeedit.rst index 9c2971389..ad1cafc13 100644 --- a/classes/class_codeedit.rst +++ b/classes/class_codeedit.rst @@ -1916,6 +1916,8 @@ Sets the spacing between the lines. The size of the text outline. +\ **Note:** If using a font with :ref:`FontFile.multichannel_signed_distance_field` enabled, its :ref:`FontFile.msdf_pixel_range` must be set to at least *twice* the value of :ref:`outline_size` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_colorpicker.rst b/classes/class_colorpicker.rst index 7a6c47fd4..be5dd4fd0 100644 --- a/classes/class_colorpicker.rst +++ b/classes/class_colorpicker.rst @@ -10,7 +10,7 @@ ColorPicker =========== -**Inherits:** :ref:`BoxContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**Inherits:** :ref:`VBoxContainer` **<** :ref:`BoxContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` Color picker control. @@ -38,31 +38,29 @@ Properties .. table:: :widths: auto - +----------------------------------------------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`can_add_swatches` | ``true`` | - +----------------------------------------------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`color` | ``Color(1, 1, 1, 1)`` | - +----------------------------------------------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------+ - | :ref:`ColorModeType` | :ref:`color_mode` | ``0`` | - +----------------------------------------------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`color_modes_visible` | ``true`` | - +----------------------------------------------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`deferred_mode` | ``false`` | - +----------------------------------------------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`edit_alpha` | ``true`` | - +----------------------------------------------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`hex_visible` | ``true`` | - +----------------------------------------------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------+ - | :ref:`PickerShapeType` | :ref:`picker_shape` | ``0`` | - +----------------------------------------------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`presets_visible` | ``true`` | - +----------------------------------------------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`sampler_visible` | ``true`` | - +----------------------------------------------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`sliders_visible` | ``true`` | - +----------------------------------------------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------+ - | :ref:`bool` | vertical | ``true`` (overrides :ref:`BoxContainer`) | - +----------------------------------------------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------+ + +----------------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`can_add_swatches` | ``true`` | + +----------------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`color` | ``Color(1, 1, 1, 1)`` | + +----------------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ + | :ref:`ColorModeType` | :ref:`color_mode` | ``0`` | + +----------------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`color_modes_visible` | ``true`` | + +----------------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`deferred_mode` | ``false`` | + +----------------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`edit_alpha` | ``true`` | + +----------------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`hex_visible` | ``true`` | + +----------------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ + | :ref:`PickerShapeType` | :ref:`picker_shape` | ``0`` | + +----------------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`presets_visible` | ``true`` | + +----------------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`sampler_visible` | ``true`` | + +----------------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`sliders_visible` | ``true`` | + +----------------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ .. rst-class:: classref-reftable-group diff --git a/classes/class_colorpickerbutton.rst b/classes/class_colorpickerbutton.rst index c7ecbe27c..7d706e611 100644 --- a/classes/class_colorpickerbutton.rst +++ b/classes/class_colorpickerbutton.rst @@ -320,6 +320,8 @@ The horizontal space between **ColorPickerButton**'s icon and text. The size of the text outline. +\ **Note:** If using a font with :ref:`FontFile.multichannel_signed_distance_field` enabled, its :ref:`FontFile.msdf_pixel_range` must be set to at least *twice* the value of :ref:`outline_size` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_editorspinslider.rst b/classes/class_editorspinslider.rst index 1e56d39b3..326da8b92 100644 --- a/classes/class_editorspinslider.rst +++ b/classes/class_editorspinslider.rst @@ -53,6 +53,59 @@ Properties .. rst-class:: classref-descriptions-group +Signals +------- + +.. _class_EditorSpinSlider_signal_grabbed: + +.. rst-class:: classref-signal + +**grabbed** **(** **)** + +Emitted when the spinner/slider is grabbed. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSpinSlider_signal_ungrabbed: + +.. rst-class:: classref-signal + +**ungrabbed** **(** **)** + +Emitted when the spinner/slider is ungrabbed. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSpinSlider_signal_value_focus_entered: + +.. rst-class:: classref-signal + +**value_focus_entered** **(** **)** + +Emitted when the value form gains focus. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSpinSlider_signal_value_focus_exited: + +.. rst-class:: classref-signal + +**value_focus_exited** **(** **)** + +Emitted when the value form loses focus. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- diff --git a/classes/class_editorvcsinterface.rst b/classes/class_editorvcsinterface.rst index 53ad286bf..bd9c61f46 100644 --- a/classes/class_editorvcsinterface.rst +++ b/classes/class_editorvcsinterface.rst @@ -42,7 +42,7 @@ Methods +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_fetch` **(** :ref:`String` remote **)** |virtual| | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`_get_branch_list` **(** **)** |virtual| | + | :ref:`String[]` | :ref:`_get_branch_list` **(** **)** |virtual| | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`_get_current_branch_name` **(** **)** |virtual| | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -54,7 +54,7 @@ Methods +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Dictionary[]` | :ref:`_get_previous_commits` **(** :ref:`int` max_commits **)** |virtual| | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`_get_remotes` **(** **)** |virtual| | + | :ref:`String[]` | :ref:`_get_remotes` **(** **)** |virtual| | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`_get_vcs_name` **(** **)** |virtual| | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -275,7 +275,7 @@ Fetches new changes from the remote, but doesn't write changes to the current wo .. rst-class:: classref-method -:ref:`Dictionary[]` **_get_branch_list** **(** **)** |virtual| +:ref:`String[]` **_get_branch_list** **(** **)** |virtual| Gets an instance of an :ref:`Array` of :ref:`String`\ s containing available branch names in the VCS. @@ -347,7 +347,7 @@ Returns an :ref:`Array` of :ref:`Dictionary` item .. rst-class:: classref-method -:ref:`Dictionary[]` **_get_remotes** **(** **)** |virtual| +:ref:`String[]` **_get_remotes** **(** **)** |virtual| Returns an :ref:`Array` of :ref:`String`\ s, each containing the name of a remote configured in the VCS. diff --git a/classes/class_fontfile.rst b/classes/class_fontfile.rst index 6312b506f..485993f47 100644 --- a/classes/class_fontfile.rst +++ b/classes/class_fontfile.rst @@ -411,7 +411,7 @@ Weight (boldness) of the font. A value in the ``100...999`` range, normal font w - void **set_force_autohinter** **(** :ref:`bool` value **)** - :ref:`bool` **is_force_autohinter** **(** **)** -If set to ``true``, auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only. +If set to ``true``, auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only (MSDF fonts don't support hinting). .. rst-class:: classref-item-separator @@ -462,7 +462,7 @@ Font hinting mode. Used by dynamic fonts only. - void **set_msdf_pixel_range** **(** :ref:`int` value **)** - :ref:`int` **get_msdf_pixel_range** **(** **)** -The width of the range around the shape between the minimum and maximum representable signed distance. +The width of the range around the shape between the minimum and maximum representable signed distance. If using font outlines, :ref:`msdf_pixel_range` must be set to at least *twice* the size of the largest font outline. The default :ref:`msdf_pixel_range` value of ``16`` allows outline sizes up to ``8`` to look correct. .. rst-class:: classref-item-separator @@ -479,7 +479,7 @@ The width of the range around the shape between the minimum and maximum represen - void **set_msdf_size** **(** :ref:`int` value **)** - :ref:`int` **get_msdf_size** **(** **)** -Source font size used to generate MSDF textures. +Source font size used to generate MSDF textures. Higher values allow for more precision, but are slower to render and require more memory. Only increase this value if you notice a visible lack of precision in glyph rendering. .. rst-class:: classref-item-separator @@ -496,7 +496,11 @@ Source font size used to generate MSDF textures. - void **set_multichannel_signed_distance_field** **(** :ref:`bool` value **)** - :ref:`bool` **is_multichannel_signed_distance_field** **(** **)** -If set to ``true``, glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data. +If set to ``true``, glyphs of all sizes are rendered using single multichannel signed distance field (MSDF) generated from the dynamic font vector data. Since this approach does not rely on rasterizing the font every time its size changes, this allows for resizing the font in real-time without any performance penalty. Text will also not look grainy for :ref:`Control`\ s that are scaled down (or for :ref:`Label3D`\ s viewed from a long distance). As a downside, font hinting is not available with MSDF. The lack of font hinting may result in less crisp and less readable fonts at small sizes. + +\ **Note:** If using font outlines, :ref:`msdf_pixel_range` must be set to at least *twice* the size of the largest font outline. + +\ **Note:** MSDF font rendering does not render glyphs with overlapping shapes correctly. Overlapping shapes are not valid per the OpenType standard, but are still commonly found in many font files, especially those converted by Google Fonts. To avoid issues with overlapping glyphs, consider downloading the font file directly from the type foundry instead of relying on Google Fonts. .. rst-class:: classref-item-separator @@ -530,7 +534,7 @@ Font OpenType feature set override. - void **set_oversampling** **(** :ref:`float` value **)** - :ref:`float` **get_oversampling** **(** **)** -Font oversampling factor, if set to ``0.0`` global oversampling factor is used instead. Used by dynamic fonts only. +Font oversampling factor. If set to ``0.0``, the global oversampling factor is used instead. Used by dynamic fonts only (MSDF fonts ignore oversampling). .. rst-class:: classref-item-separator @@ -564,7 +568,7 @@ Font style name. - void **set_subpixel_positioning** **(** :ref:`SubpixelPositioning` value **)** - :ref:`SubpixelPositioning` **get_subpixel_positioning** **(** **)** -Font glyph subpixel positioning mode. Subpixel positioning provides shaper text and better kerning for smaller font sizes, at the cost of memory usage and font rasterization speed. Use :ref:`TextServer.SUBPIXEL_POSITIONING_AUTO` to automatically enable it based on the font size. +Font glyph subpixel positioning mode. Subpixel positioning provides shaper text and better kerning for smaller font sizes, at the cost of higher memory usage and lower font rasterization speed. Use :ref:`TextServer.SUBPIXEL_POSITIONING_AUTO` to automatically enable it based on the font size. .. rst-class:: classref-section-separator diff --git a/classes/class_gridmap.rst b/classes/class_gridmap.rst index 55dc1c968..39ef77b73 100644 --- a/classes/class_gridmap.rst +++ b/classes/class_gridmap.rst @@ -48,31 +48,31 @@ Properties .. table:: :widths: auto - +-----------------------------------------------+--------------------------------------------------------------------+----------------------+ - | :ref:`bool` | :ref:`bake_navigation` | ``false`` | - +-----------------------------------------------+--------------------------------------------------------------------+----------------------+ - | :ref:`bool` | :ref:`cell_center_x` | ``true`` | - +-----------------------------------------------+--------------------------------------------------------------------+----------------------+ - | :ref:`bool` | :ref:`cell_center_y` | ``true`` | - +-----------------------------------------------+--------------------------------------------------------------------+----------------------+ - | :ref:`bool` | :ref:`cell_center_z` | ``true`` | - +-----------------------------------------------+--------------------------------------------------------------------+----------------------+ - | :ref:`int` | :ref:`cell_octant_size` | ``8`` | - +-----------------------------------------------+--------------------------------------------------------------------+----------------------+ - | :ref:`float` | :ref:`cell_scale` | ``1.0`` | - +-----------------------------------------------+--------------------------------------------------------------------+----------------------+ - | :ref:`Vector3` | :ref:`cell_size` | ``Vector3(2, 2, 2)`` | - +-----------------------------------------------+--------------------------------------------------------------------+----------------------+ - | :ref:`int` | :ref:`collision_layer` | ``1`` | - +-----------------------------------------------+--------------------------------------------------------------------+----------------------+ - | :ref:`int` | :ref:`collision_mask` | ``1`` | - +-----------------------------------------------+--------------------------------------------------------------------+----------------------+ - | :ref:`MeshLibrary` | :ref:`mesh_library` | | - +-----------------------------------------------+--------------------------------------------------------------------+----------------------+ - | :ref:`int` | :ref:`navigation_layers` | ``1`` | - +-----------------------------------------------+--------------------------------------------------------------------+----------------------+ - | :ref:`PhysicsMaterial` | :ref:`physics_material` | | - +-----------------------------------------------+--------------------------------------------------------------------+----------------------+ + +-----------------------------------------------+----------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`bake_navigation` | ``false`` | + +-----------------------------------------------+----------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`cell_center_x` | ``true`` | + +-----------------------------------------------+----------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`cell_center_y` | ``true`` | + +-----------------------------------------------+----------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`cell_center_z` | ``true`` | + +-----------------------------------------------+----------------------------------------------------------------------+----------------------+ + | :ref:`int` | :ref:`cell_octant_size` | ``8`` | + +-----------------------------------------------+----------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`cell_scale` | ``1.0`` | + +-----------------------------------------------+----------------------------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`cell_size` | ``Vector3(2, 2, 2)`` | + +-----------------------------------------------+----------------------------------------------------------------------+----------------------+ + | :ref:`int` | :ref:`collision_layer` | ``1`` | + +-----------------------------------------------+----------------------------------------------------------------------+----------------------+ + | :ref:`int` | :ref:`collision_mask` | ``1`` | + +-----------------------------------------------+----------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`collision_priority` | ``1.0`` | + +-----------------------------------------------+----------------------------------------------------------------------+----------------------+ + | :ref:`MeshLibrary` | :ref:`mesh_library` | | + +-----------------------------------------------+----------------------------------------------------------------------+----------------------+ + | :ref:`PhysicsMaterial` | :ref:`physics_material` | | + +-----------------------------------------------+----------------------------------------------------------------------+----------------------+ .. rst-class:: classref-reftable-group @@ -105,8 +105,6 @@ Methods +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`get_meshes` **(** **)** |const| | +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_navigation_layer_value` **(** :ref:`int` layer_number **)** |const| | - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`get_navigation_map` **(** **)** |const| | +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_orthogonal_index_from_basis` **(** :ref:`Basis` basis **)** |const| | @@ -129,8 +127,6 @@ Methods +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_collision_mask_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_navigation_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_navigation_map` **(** :ref:`RID` navigation_map **)** | +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -188,7 +184,7 @@ Property Descriptions - void **set_bake_navigation** **(** :ref:`bool` value **)** - :ref:`bool` **is_baking_navigation** **(** **)** -If ``true``, this GridMap bakes a navigation region. +If ``true``, this GridMap creates a navigation region for each cell that uses a :ref:`mesh_library` item with a navigation mesh. The created navigation region will use the navigation layers bitmask assigned to the :ref:`MeshLibrary`'s item. .. rst-class:: classref-item-separator @@ -336,6 +332,23 @@ The physics layers this GridMap detects collisions in. See `Collision layers and ---- +.. _class_GridMap_property_collision_priority: + +.. rst-class:: classref-property + +:ref:`float` **collision_priority** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_collision_priority** **(** :ref:`float` value **)** +- :ref:`float` **get_collision_priority** **(** **)** + +The priority used to solve colliding when occurring penetration. The higher the priority is, the lower the penetration into the object will be. This can for example be used to prevent the player from breaking through the boundaries of a level. + +.. rst-class:: classref-item-separator + +---- + .. _class_GridMap_property_mesh_library: .. rst-class:: classref-property @@ -353,23 +366,6 @@ The assigned :ref:`MeshLibrary`. ---- -.. _class_GridMap_property_navigation_layers: - -.. rst-class:: classref-property - -:ref:`int` **navigation_layers** = ``1`` - -.. rst-class:: classref-property-setget - -- void **set_navigation_layers** **(** :ref:`int` value **)** -- :ref:`int` **get_navigation_layers** **(** **)** - -A bitmask determining all navigation layers the GridMap generated navigation regions belong to. These navigation layers can be checked upon when requesting a path with :ref:`NavigationServer3D.map_get_path`. - -.. rst-class:: classref-item-separator - ----- - .. _class_GridMap_property_physics_material: .. rst-class:: classref-property @@ -524,18 +520,6 @@ Returns an array of :ref:`Transform3D` and :ref:`Mesh` **get_navigation_layer_value** **(** :ref:`int` layer_number **)** |const| - -Returns whether or not the specified layer of the :ref:`navigation_layers` bitmask is enabled, given a ``layer_number`` between 1 and 32. - -.. rst-class:: classref-item-separator - ----- - .. _class_GridMap_method_get_navigation_map: .. rst-class:: classref-method @@ -674,18 +658,6 @@ Based on ``value``, enables or disables the specified layer in the :ref:`collisi ---- -.. _class_GridMap_method_set_navigation_layer_value: - -.. rst-class:: classref-method - -void **set_navigation_layer_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** - -Based on ``value``, enables or disables the specified layer in the :ref:`navigation_layers` bitmask, given a ``layer_number`` between 1 and 32. - -.. rst-class:: classref-item-separator - ----- - .. _class_GridMap_method_set_navigation_map: .. rst-class:: classref-method diff --git a/classes/class_image.rst b/classes/class_image.rst index 318ff38aa..95175f97e 100644 --- a/classes/class_image.rst +++ b/classes/class_image.rst @@ -52,137 +52,137 @@ Methods .. table:: :widths: auto - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`adjust_bcs` **(** :ref:`float` brightness, :ref:`float` contrast, :ref:`float` saturation **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`blend_rect` **(** :ref:`Image` src, :ref:`Rect2i` src_rect, :ref:`Vector2i` dst **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`blend_rect_mask` **(** :ref:`Image` src, :ref:`Image` mask, :ref:`Rect2i` src_rect, :ref:`Vector2i` dst **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`blit_rect` **(** :ref:`Image` src, :ref:`Rect2i` src_rect, :ref:`Vector2i` dst **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`blit_rect_mask` **(** :ref:`Image` src, :ref:`Image` mask, :ref:`Rect2i` src_rect, :ref:`Vector2i` dst **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`bump_map_to_normal_map` **(** :ref:`float` bump_scale=1.0 **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_mipmaps` **(** **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`compress` **(** :ref:`CompressMode` mode, :ref:`CompressSource` source=0, :ref:`float` lossy_quality=0.7 **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`compress_from_channels` **(** :ref:`CompressMode` mode, :ref:`UsedChannels` channels, :ref:`float` lossy_quality=0.7 **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`compute_image_metrics` **(** :ref:`Image` compared_image, :ref:`bool` use_luma **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`convert` **(** :ref:`Format` format **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`copy_from` **(** :ref:`Image` src **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image` | :ref:`create` **(** :ref:`int` width, :ref:`int` height, :ref:`bool` use_mipmaps, :ref:`Format` format **)** |static| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image` | :ref:`create_from_data` **(** :ref:`int` width, :ref:`int` height, :ref:`bool` use_mipmaps, :ref:`Format` format, :ref:`PackedByteArray` data **)** |static| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`crop` **(** :ref:`int` width, :ref:`int` height **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`decompress` **(** **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AlphaMode` | :ref:`detect_alpha` **(** **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`UsedChannels` | :ref:`detect_used_channels` **(** :ref:`CompressSource` source=0 **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`fill` **(** :ref:`Color` color **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`fill_rect` **(** :ref:`Rect2i` rect, :ref:`Color` color **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`fix_alpha_edges` **(** **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`flip_x` **(** **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`flip_y` **(** **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`generate_mipmaps` **(** :ref:`bool` renormalize=false **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray` | :ref:`get_data` **(** **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Format` | :ref:`get_format` **(** **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_height` **(** **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_mipmap_offset` **(** :ref:`int` mipmap **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`get_pixel` **(** :ref:`int` x, :ref:`int` y **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`get_pixelv` **(** :ref:`Vector2i` point **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image` | :ref:`get_region` **(** :ref:`Rect2i` region **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i` | :ref:`get_size` **(** **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2i` | :ref:`get_used_rect` **(** **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_width` **(** **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_mipmaps` **(** **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_compressed` **(** **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_empty` **(** **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_invisible` **(** **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`load` **(** :ref:`String` path **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`load_bmp_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 **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`load_png_from_buffer` **(** :ref:`PackedByteArray` buffer **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`load_tga_from_buffer` **(** :ref:`PackedByteArray` buffer **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`load_webp_from_buffer` **(** :ref:`PackedByteArray` buffer **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`normal_map_to_xy` **(** **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`premultiply_alpha` **(** **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`resize` **(** :ref:`int` width, :ref:`int` height, :ref:`Interpolation` interpolation=1 **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`resize_to_po2` **(** :ref:`bool` square=false, :ref:`Interpolation` interpolation=1 **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image` | :ref:`rgbe_to_srgb` **(** **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`rotate_180` **(** **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`rotate_90` **(** :ref:`ClockDirection` direction **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`save_exr` **(** :ref:`String` path, :ref:`bool` grayscale=false **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray` | :ref:`save_exr_to_buffer` **(** :ref:`bool` grayscale=false **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`save_jpg` **(** :ref:`String` path, :ref:`float` quality=0.75 **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray` | :ref:`save_jpg_to_buffer` **(** :ref:`float` quality=0.75 **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`save_png` **(** :ref:`String` path **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray` | :ref:`save_png_to_buffer` **(** **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`save_webp` **(** :ref:`String` path, :ref:`bool` lossy=false, :ref:`float` quality=0.75 **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray` | :ref:`save_webp_to_buffer` **(** :ref:`bool` lossy=false, :ref:`float` quality=0.75 **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_data` **(** :ref:`int` width, :ref:`int` height, :ref:`bool` use_mipmaps, :ref:`Format` format, :ref:`PackedByteArray` data **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_pixel` **(** :ref:`int` x, :ref:`int` y, :ref:`Color` color **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_pixelv` **(** :ref:`Vector2i` point, :ref:`Color` color **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shrink_x2` **(** **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`srgb_to_linear` **(** **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`adjust_bcs` **(** :ref:`float` brightness, :ref:`float` contrast, :ref:`float` saturation **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`blend_rect` **(** :ref:`Image` src, :ref:`Rect2i` src_rect, :ref:`Vector2i` dst **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`blend_rect_mask` **(** :ref:`Image` src, :ref:`Image` mask, :ref:`Rect2i` src_rect, :ref:`Vector2i` dst **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`blit_rect` **(** :ref:`Image` src, :ref:`Rect2i` src_rect, :ref:`Vector2i` dst **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`blit_rect_mask` **(** :ref:`Image` src, :ref:`Image` mask, :ref:`Rect2i` src_rect, :ref:`Vector2i` dst **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`bump_map_to_normal_map` **(** :ref:`float` bump_scale=1.0 **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_mipmaps` **(** **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`compress` **(** :ref:`CompressMode` mode, :ref:`CompressSource` source=0, :ref:`float` lossy_quality=0.7, :ref:`ASTCFormat` astc_format=0 **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`compress_from_channels` **(** :ref:`CompressMode` mode, :ref:`UsedChannels` channels, :ref:`float` lossy_quality=0.7, :ref:`ASTCFormat` astc_format=0 **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`compute_image_metrics` **(** :ref:`Image` compared_image, :ref:`bool` use_luma **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`convert` **(** :ref:`Format` format **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`copy_from` **(** :ref:`Image` src **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image` | :ref:`create` **(** :ref:`int` width, :ref:`int` height, :ref:`bool` use_mipmaps, :ref:`Format` format **)** |static| | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image` | :ref:`create_from_data` **(** :ref:`int` width, :ref:`int` height, :ref:`bool` use_mipmaps, :ref:`Format` format, :ref:`PackedByteArray` data **)** |static| | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`crop` **(** :ref:`int` width, :ref:`int` height **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`decompress` **(** **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AlphaMode` | :ref:`detect_alpha` **(** **)** |const| | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`UsedChannels` | :ref:`detect_used_channels` **(** :ref:`CompressSource` source=0 **)** |const| | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`fill` **(** :ref:`Color` color **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`fill_rect` **(** :ref:`Rect2i` rect, :ref:`Color` color **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`fix_alpha_edges` **(** **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`flip_x` **(** **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`flip_y` **(** **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`generate_mipmaps` **(** :ref:`bool` renormalize=false **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`get_data` **(** **)** |const| | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Format` | :ref:`get_format` **(** **)** |const| | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_height` **(** **)** |const| | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_mipmap_offset` **(** :ref:`int` mipmap **)** |const| | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_pixel` **(** :ref:`int` x, :ref:`int` y **)** |const| | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_pixelv` **(** :ref:`Vector2i` point **)** |const| | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image` | :ref:`get_region` **(** :ref:`Rect2i` region **)** |const| | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`get_size` **(** **)** |const| | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i` | :ref:`get_used_rect` **(** **)** |const| | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_width` **(** **)** |const| | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_mipmaps` **(** **)** |const| | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_compressed` **(** **)** |const| | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_empty` **(** **)** |const| | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_invisible` **(** **)** |const| | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`load` **(** :ref:`String` path **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`load_bmp_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 **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`load_png_from_buffer` **(** :ref:`PackedByteArray` buffer **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`load_tga_from_buffer` **(** :ref:`PackedByteArray` buffer **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`load_webp_from_buffer` **(** :ref:`PackedByteArray` buffer **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`normal_map_to_xy` **(** **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`premultiply_alpha` **(** **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`resize` **(** :ref:`int` width, :ref:`int` height, :ref:`Interpolation` interpolation=1 **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`resize_to_po2` **(** :ref:`bool` square=false, :ref:`Interpolation` interpolation=1 **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image` | :ref:`rgbe_to_srgb` **(** **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`rotate_180` **(** **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`rotate_90` **(** :ref:`ClockDirection` direction **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`save_exr` **(** :ref:`String` path, :ref:`bool` grayscale=false **)** |const| | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`save_exr_to_buffer` **(** :ref:`bool` grayscale=false **)** |const| | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`save_jpg` **(** :ref:`String` path, :ref:`float` quality=0.75 **)** |const| | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`save_jpg_to_buffer` **(** :ref:`float` quality=0.75 **)** |const| | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`save_png` **(** :ref:`String` path **)** |const| | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`save_png_to_buffer` **(** **)** |const| | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`save_webp` **(** :ref:`String` path, :ref:`bool` lossy=false, :ref:`float` quality=0.75 **)** |const| | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`save_webp_to_buffer` **(** :ref:`bool` lossy=false, :ref:`float` quality=0.75 **)** |const| | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_data` **(** :ref:`int` width, :ref:`int` height, :ref:`bool` use_mipmaps, :ref:`Format` format, :ref:`PackedByteArray` data **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_pixel` **(** :ref:`int` x, :ref:`int` y, :ref:`Color` color **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_pixelv` **(** :ref:`Vector2i` point, :ref:`Color` color **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`shrink_x2` **(** **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`srgb_to_linear` **(** **)** | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -497,11 +497,43 @@ Texture format that uses `BPTC ` **FORMAT_ASTC_4x4** = ``35`` + +`Adaptive Scalable Texutre Compression `__. This implements the 4x4 (high quality) mode. + +.. _class_Image_constant_FORMAT_ASTC_4x4_HDR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Format` **FORMAT_ASTC_4x4_HDR** = ``36`` + +Same format as :ref:`FORMAT_ASTC_4x4`, but with the hint to let the GPU know it is used for HDR. + +.. _class_Image_constant_FORMAT_ASTC_8x8: + +.. rst-class:: classref-enumeration-constant + +:ref:`Format` **FORMAT_ASTC_8x8** = ``37`` + +`Adaptive Scalable Texutre Compression `__. This implements the 8x8 (low quality) mode. + +.. _class_Image_constant_FORMAT_ASTC_8x8_HDR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Format` **FORMAT_ASTC_8x8_HDR** = ``38`` + +Same format as :ref:`FORMAT_ASTC_8x8`, but with the hint to let the GPU know it is used for HDR. + .. _class_Image_constant_FORMAT_MAX: .. rst-class:: classref-enumeration-constant -:ref:`Format` **FORMAT_MAX** = ``35`` +:ref:`Format` **FORMAT_MAX** = ``39`` Represents the size of the :ref:`Format` enum. @@ -731,6 +763,32 @@ Source texture (before compression) is in sRGB space. Source texture (before compression) is a normal texture (e.g. it can be compressed into two channels). +.. rst-class:: classref-item-separator + +---- + +.. _enum_Image_ASTCFormat: + +.. rst-class:: classref-enumeration + +enum **ASTCFormat**: + +.. _class_Image_constant_ASTC_FORMAT_4x4: + +.. rst-class:: classref-enumeration-constant + +:ref:`ASTCFormat` **ASTC_FORMAT_4x4** = ``0`` + +Hint to indicate that the high quality 4x4 ASTC compression format should be used. + +.. _class_Image_constant_ASTC_FORMAT_8x8: + +.. rst-class:: classref-enumeration-constant + +:ref:`ASTCFormat` **ASTC_FORMAT_8x8** = ``1`` + +Hint to indicate that the low quality 8x8 ASTC compression format should be used. + .. rst-class:: classref-section-separator ---- @@ -872,9 +930,15 @@ Removes the image's mipmaps. .. rst-class:: classref-method -:ref:`Error` **compress** **(** :ref:`CompressMode` mode, :ref:`CompressSource` source=0, :ref:`float` lossy_quality=0.7 **)** +:ref:`Error` **compress** **(** :ref:`CompressMode` mode, :ref:`CompressSource` source=0, :ref:`float` lossy_quality=0.7, :ref:`ASTCFormat` astc_format=0 **)** -Compresses the image to use less memory. Can not directly access pixel data while the image is compressed. Returns error if the chosen compression mode is not available. See :ref:`CompressMode` and :ref:`CompressSource` constants. +Compresses the image to use less memory. Can not directly access pixel data while the image is compressed. Returns error if the chosen compression mode is not available. + +The ``mode`` parameter helps to pick the best compression method for DXT and ETC2 formats. It is ignored for ASTC compression. + +The ``lossy_quality`` parameter is optional for compressors that support it. + +For ASTC compression, the ``astc_format`` parameter must be supplied. .. rst-class:: classref-item-separator @@ -884,11 +948,15 @@ Compresses the image to use less memory. Can not directly access pixel data whil .. rst-class:: classref-method -:ref:`Error` **compress_from_channels** **(** :ref:`CompressMode` mode, :ref:`UsedChannels` channels, :ref:`float` lossy_quality=0.7 **)** +:ref:`Error` **compress_from_channels** **(** :ref:`CompressMode` mode, :ref:`UsedChannels` channels, :ref:`float` lossy_quality=0.7, :ref:`ASTCFormat` astc_format=0 **)** -.. container:: contribute +Compresses the image to use less memory. Can not directly access pixel data while the image is compressed. Returns error if the chosen compression mode is not available. - There is currently no description for this method. Please help us by :ref:`contributing one `! +This is an alternative to :ref:`compress` that lets the user supply the channels used in order for the compressor to pick the best DXT and ETC2 formats. For other formats (non DXT or ETC2), this argument is ignored. + +The ``lossy_quality`` parameter is optional for compressors that support it. + +For ASTC compression, the ``astc_format`` parameter must be supplied. .. rst-class:: classref-item-separator diff --git a/classes/class_itemlist.rst b/classes/class_itemlist.rst index 2a01863ec..0d5263dc8 100644 --- a/classes/class_itemlist.rst +++ b/classes/class_itemlist.rst @@ -1207,6 +1207,8 @@ The vertical spacing between each line of text. The size of the item text outline. +\ **Note:** If using a font with :ref:`FontFile.multichannel_signed_distance_field` enabled, its :ref:`FontFile.msdf_pixel_range` must be set to at least *twice* the value of :ref:`outline_size` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_label.rst b/classes/class_label.rst index 49047e545..282981103 100644 --- a/classes/class_label.rst +++ b/classes/class_label.rst @@ -548,6 +548,8 @@ Vertical space between lines in multiline **Label**. Text outline size. +\ **Note:** If using a font with :ref:`FontFile.multichannel_signed_distance_field` enabled, its :ref:`FontFile.msdf_pixel_range` must be set to at least *twice* the value of :ref:`outline_size` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_lineedit.rst b/classes/class_lineedit.rst index fe6957496..0bfd2dd11 100644 --- a/classes/class_lineedit.rst +++ b/classes/class_lineedit.rst @@ -1463,6 +1463,8 @@ Minimum horizontal space for the text (not counting the clear button and content The size of the text outline. +\ **Note:** If using a font with :ref:`FontFile.multichannel_signed_distance_field` enabled, its :ref:`FontFile.msdf_pixel_range` must be set to at least *twice* the value of :ref:`outline_size` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_linkbutton.rst b/classes/class_linkbutton.rst index bd99cef04..745731251 100644 --- a/classes/class_linkbutton.rst +++ b/classes/class_linkbutton.rst @@ -340,6 +340,8 @@ Text :ref:`Color` used when the **LinkButton** is being pressed. The size of the text outline. +\ **Note:** If using a font with :ref:`FontFile.multichannel_signed_distance_field` enabled, its :ref:`FontFile.msdf_pixel_range` must be set to at least *twice* the value of :ref:`outline_size` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_menubar.rst b/classes/class_menubar.rst index b389e9531..230e67b17 100644 --- a/classes/class_menubar.rst +++ b/classes/class_menubar.rst @@ -488,6 +488,8 @@ The horizontal space between menu items. The size of the text outline. +\ **Note:** If using a font with :ref:`FontFile.multichannel_signed_distance_field` enabled, its :ref:`FontFile.msdf_pixel_range` must be set to at least *twice* the value of :ref:`outline_size` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_menubutton.rst b/classes/class_menubutton.rst index 9e7e6603c..3421950e1 100644 --- a/classes/class_menubutton.rst +++ b/classes/class_menubutton.rst @@ -303,6 +303,8 @@ The horizontal space between **MenuButton**'s icon and text. Negative values wil The size of the text outline. +\ **Note:** If using a font with :ref:`FontFile.multichannel_signed_distance_field` enabled, its :ref:`FontFile.msdf_pixel_range` must be set to at least *twice* the value of :ref:`outline_size` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_meshlibrary.rst b/classes/class_meshlibrary.rst index 7c90098a8..5809ebd2a 100644 --- a/classes/class_meshlibrary.rst +++ b/classes/class_meshlibrary.rst @@ -53,6 +53,8 @@ Methods +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_item_name` **(** :ref:`int` id **)** |const| | +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_item_navigation_layers` **(** :ref:`int` id **)** |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`NavigationMesh` | :ref:`get_item_navigation_mesh` **(** :ref:`int` id **)** |const| | +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform3D` | :ref:`get_item_navigation_mesh_transform` **(** :ref:`int` id **)** |const| | @@ -71,6 +73,8 @@ Methods +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_item_name` **(** :ref:`int` id, :ref:`String` name **)** | +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_item_navigation_layers` **(** :ref:`int` id, :ref:`int` navigation_layers **)** | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_item_navigation_mesh` **(** :ref:`int` id, :ref:`NavigationMesh` navigation_mesh **)** | +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_item_navigation_mesh_transform` **(** :ref:`int` id, :ref:`Transform3D` navigation_mesh **)** | @@ -175,6 +179,18 @@ Returns the item's name. ---- +.. _class_MeshLibrary_method_get_item_navigation_layers: + +.. rst-class:: classref-method + +:ref:`int` **get_item_navigation_layers** **(** :ref:`int` id **)** |const| + +Returns the item's navigation layers bitmask. + +.. rst-class:: classref-item-separator + +---- + .. _class_MeshLibrary_method_get_item_navigation_mesh: .. rst-class:: classref-method @@ -287,6 +303,18 @@ This name is shown in the editor. It can also be used to look up the item later ---- +.. _class_MeshLibrary_method_set_item_navigation_layers: + +.. rst-class:: classref-method + +void **set_item_navigation_layers** **(** :ref:`int` id, :ref:`int` navigation_layers **)** + +Sets the item's navigation layers bitmask. + +.. rst-class:: classref-item-separator + +---- + .. _class_MeshLibrary_method_set_item_navigation_mesh: .. rst-class:: classref-method diff --git a/classes/class_navigationagent2d.rst b/classes/class_navigationagent2d.rst index cad675d6a..84cfe5785 100644 --- a/classes/class_navigationagent2d.rst +++ b/classes/class_navigationagent2d.rst @@ -31,29 +31,31 @@ Properties .. table:: :widths: auto - +-------------------------------+------------------------------------------------------------------------------------------+-------------------+ - | :ref:`bool` | :ref:`avoidance_enabled` | ``false`` | - +-------------------------------+------------------------------------------------------------------------------------------+-------------------+ - | :ref:`int` | :ref:`max_neighbors` | ``10`` | - +-------------------------------+------------------------------------------------------------------------------------------+-------------------+ - | :ref:`float` | :ref:`max_speed` | ``200.0`` | - +-------------------------------+------------------------------------------------------------------------------------------+-------------------+ - | :ref:`int` | :ref:`navigation_layers` | ``1`` | - +-------------------------------+------------------------------------------------------------------------------------------+-------------------+ - | :ref:`float` | :ref:`neighbor_distance` | ``500.0`` | - +-------------------------------+------------------------------------------------------------------------------------------+-------------------+ - | :ref:`float` | :ref:`path_desired_distance` | ``1.0`` | - +-------------------------------+------------------------------------------------------------------------------------------+-------------------+ - | :ref:`float` | :ref:`path_max_distance` | ``3.0`` | - +-------------------------------+------------------------------------------------------------------------------------------+-------------------+ - | :ref:`float` | :ref:`radius` | ``10.0`` | - +-------------------------------+------------------------------------------------------------------------------------------+-------------------+ - | :ref:`float` | :ref:`target_desired_distance` | ``1.0`` | - +-------------------------------+------------------------------------------------------------------------------------------+-------------------+ - | :ref:`Vector2` | :ref:`target_location` | ``Vector2(0, 0)`` | - +-------------------------------+------------------------------------------------------------------------------------------+-------------------+ - | :ref:`float` | :ref:`time_horizon` | ``20.0`` | - +-------------------------------+------------------------------------------------------------------------------------------+-------------------+ + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`avoidance_enabled` | ``false`` | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+-------------------+ + | :ref:`int` | :ref:`max_neighbors` | ``10`` | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`max_speed` | ``200.0`` | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+-------------------+ + | :ref:`int` | :ref:`navigation_layers` | ``1`` | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`neighbor_distance` | ``500.0`` | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`path_desired_distance` | ``1.0`` | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`path_max_distance` | ``3.0`` | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+-------------------+ + | :ref:`PathMetadataFlags` | :ref:`path_metadata_flags` | ``7`` | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`radius` | ``10.0`` | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`target_desired_distance` | ``1.0`` | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`target_location` | ``Vector2(0, 0)`` | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`time_horizon` | ``20.0`` | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+-------------------+ .. rst-class:: classref-reftable-group @@ -63,35 +65,37 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`distance_to_target` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array` | :ref:`get_current_navigation_path` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_current_navigation_path_index` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_final_location` **(** **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_navigation_layer_value` **(** :ref:`int` layer_number **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_navigation_map` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_next_location` **(** **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_rid` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_navigation_finished` **(** **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_target_reachable` **(** **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_target_reached` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_navigation_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_navigation_map` **(** :ref:`RID` navigation_map **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_velocity` **(** :ref:`Vector2` velocity **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`distance_to_target` **(** **)** |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`get_current_navigation_path` **(** **)** |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_current_navigation_path_index` **(** **)** |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NavigationPathQueryResult2D` | :ref:`get_current_navigation_result` **(** **)** |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_final_location` **(** **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_navigation_layer_value` **(** :ref:`int` layer_number **)** |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_navigation_map` **(** **)** |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_next_location` **(** **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_rid` **(** **)** |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_navigation_finished` **(** **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_target_reachable` **(** **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_target_reached` **(** **)** |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_navigation_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_navigation_map` **(** :ref:`RID` navigation_map **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_velocity` **(** :ref:`Vector2` velocity **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -102,6 +106,28 @@ Methods Signals ------- +.. _class_NavigationAgent2D_signal_link_reached: + +.. rst-class:: classref-signal + +**link_reached** **(** :ref:`Dictionary` details **)** + +Notifies when a navigation link has been reached. + +The details dictionary may contain the following keys depending on the value of :ref:`path_metadata_flags`: + +- ``location``: The start location of the link that was reached. + +- ``type``: Always :ref:`NavigationPathQueryResult2D.PATH_SEGMENT_TYPE_LINK`. + +- ``rid``: The :ref:`RID` of the link. + +- ``owner``: The object which manages the link (usually :ref:`NavigationLink2D`). + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationAgent2D_signal_navigation_finished: .. rst-class:: classref-signal @@ -146,6 +172,28 @@ Notifies when the player-defined :ref:`target_location`. Only emitted when :ref:`avoidance_enabled` is true. +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationAgent2D_signal_waypoint_reached: + +.. rst-class:: classref-signal + +**waypoint_reached** **(** :ref:`Dictionary` details **)** + +Notifies when a waypoint along the path has been reached. + +The details dictionary may contain the following keys depending on the value of :ref:`path_metadata_flags`: + +- ``location``: The location of the waypoint that was reached. + +- ``type``: The type of navigation primitive (region or link) that contains this waypoint. + +- ``rid``: The :ref:`RID` of the containing navigation primitive (region or link). + +- ``owner``: The object which manages the containing navigation primitive (region or link). + .. rst-class:: classref-section-separator ---- @@ -274,6 +322,23 @@ The maximum distance the agent is allowed away from the ideal path to the final ---- +.. _class_NavigationAgent2D_property_path_metadata_flags: + +.. rst-class:: classref-property + +:ref:`PathMetadataFlags` **path_metadata_flags** = ``7`` + +.. rst-class:: classref-property-setget + +- void **set_path_metadata_flags** **(** :ref:`PathMetadataFlags` value **)** +- :ref:`PathMetadataFlags` **get_path_metadata_flags** **(** **)** + +Additional information to return with the navigation path. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationAgent2D_property_radius: .. rst-class:: classref-property @@ -385,6 +450,18 @@ Returns which index the agent is currently on in the navigation path's :ref:`Pac ---- +.. _class_NavigationAgent2D_method_get_current_navigation_result: + +.. rst-class:: classref-method + +:ref:`NavigationPathQueryResult2D` **get_current_navigation_result** **(** **)** |const| + +Returns the path query result for the path the agent is currently following. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationAgent2D_method_get_final_location: .. rst-class:: classref-method diff --git a/classes/class_navigationagent3d.rst b/classes/class_navigationagent3d.rst index 3817ee6c0..caf503bc1 100644 --- a/classes/class_navigationagent3d.rst +++ b/classes/class_navigationagent3d.rst @@ -31,33 +31,35 @@ Properties .. table:: :widths: auto - +-------------------------------+------------------------------------------------------------------------------------------+----------------------+ - | :ref:`float` | :ref:`agent_height_offset` | ``0.0`` | - +-------------------------------+------------------------------------------------------------------------------------------+----------------------+ - | :ref:`bool` | :ref:`avoidance_enabled` | ``false`` | - +-------------------------------+------------------------------------------------------------------------------------------+----------------------+ - | :ref:`bool` | :ref:`ignore_y` | ``true`` | - +-------------------------------+------------------------------------------------------------------------------------------+----------------------+ - | :ref:`int` | :ref:`max_neighbors` | ``10`` | - +-------------------------------+------------------------------------------------------------------------------------------+----------------------+ - | :ref:`float` | :ref:`max_speed` | ``10.0`` | - +-------------------------------+------------------------------------------------------------------------------------------+----------------------+ - | :ref:`int` | :ref:`navigation_layers` | ``1`` | - +-------------------------------+------------------------------------------------------------------------------------------+----------------------+ - | :ref:`float` | :ref:`neighbor_distance` | ``50.0`` | - +-------------------------------+------------------------------------------------------------------------------------------+----------------------+ - | :ref:`float` | :ref:`path_desired_distance` | ``1.0`` | - +-------------------------------+------------------------------------------------------------------------------------------+----------------------+ - | :ref:`float` | :ref:`path_max_distance` | ``3.0`` | - +-------------------------------+------------------------------------------------------------------------------------------+----------------------+ - | :ref:`float` | :ref:`radius` | ``1.0`` | - +-------------------------------+------------------------------------------------------------------------------------------+----------------------+ - | :ref:`float` | :ref:`target_desired_distance` | ``1.0`` | - +-------------------------------+------------------------------------------------------------------------------------------+----------------------+ - | :ref:`Vector3` | :ref:`target_location` | ``Vector3(0, 0, 0)`` | - +-------------------------------+------------------------------------------------------------------------------------------+----------------------+ - | :ref:`float` | :ref:`time_horizon` | ``5.0`` | - +-------------------------------+------------------------------------------------------------------------------------------+----------------------+ + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`agent_height_offset` | ``0.0`` | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`avoidance_enabled` | ``false`` | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`ignore_y` | ``true`` | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+----------------------+ + | :ref:`int` | :ref:`max_neighbors` | ``10`` | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`max_speed` | ``10.0`` | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+----------------------+ + | :ref:`int` | :ref:`navigation_layers` | ``1`` | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`neighbor_distance` | ``50.0`` | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`path_desired_distance` | ``1.0`` | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`path_max_distance` | ``3.0`` | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+----------------------+ + | :ref:`PathMetadataFlags` | :ref:`path_metadata_flags` | ``7`` | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`radius` | ``1.0`` | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`target_desired_distance` | ``1.0`` | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`target_location` | ``Vector3(0, 0, 0)`` | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+----------------------+ + | :ref:`float` | :ref:`time_horizon` | ``5.0`` | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+----------------------+ .. rst-class:: classref-reftable-group @@ -67,35 +69,37 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`distance_to_target` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector3Array` | :ref:`get_current_navigation_path` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_current_navigation_path_index` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_final_location` **(** **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_navigation_layer_value` **(** :ref:`int` layer_number **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_navigation_map` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_next_location` **(** **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_rid` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_navigation_finished` **(** **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_target_reachable` **(** **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_target_reached` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_navigation_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_navigation_map` **(** :ref:`RID` navigation_map **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_velocity` **(** :ref:`Vector3` velocity **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`distance_to_target` **(** **)** |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array` | :ref:`get_current_navigation_path` **(** **)** |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_current_navigation_path_index` **(** **)** |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NavigationPathQueryResult3D` | :ref:`get_current_navigation_result` **(** **)** |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_final_location` **(** **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_navigation_layer_value` **(** :ref:`int` layer_number **)** |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_navigation_map` **(** **)** |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_next_location` **(** **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_rid` **(** **)** |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_navigation_finished` **(** **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_target_reachable` **(** **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_target_reached` **(** **)** |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_navigation_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_navigation_map` **(** :ref:`RID` navigation_map **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_velocity` **(** :ref:`Vector3` velocity **)** | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -106,6 +110,28 @@ Methods Signals ------- +.. _class_NavigationAgent3D_signal_link_reached: + +.. rst-class:: classref-signal + +**link_reached** **(** :ref:`Dictionary` details **)** + +Notifies when a navigation link has been reached. + +The details dictionary may contain the following keys depending on the value of :ref:`path_metadata_flags`: + +- ``location``: The start location of the link that was reached. + +- ``type``: Always :ref:`NavigationPathQueryResult3D.PATH_SEGMENT_TYPE_LINK`. + +- ``rid``: The :ref:`RID` of the link. + +- ``owner``: The object which manages the link (usually :ref:`NavigationLink3D`). + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationAgent3D_signal_navigation_finished: .. rst-class:: classref-signal @@ -150,6 +176,28 @@ Notifies when the player-defined :ref:`target_location`. Only emitted when :ref:`avoidance_enabled` is true. +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationAgent3D_signal_waypoint_reached: + +.. rst-class:: classref-signal + +**waypoint_reached** **(** :ref:`Dictionary` details **)** + +Notifies when a waypoint along the path has been reached. + +The details dictionary may contain the following keys depending on the value of :ref:`path_metadata_flags`: + +- ``location``: The location of the waypoint that was reached. + +- ``type``: The type of navigation primitive (region or link) that contains this waypoint. + +- ``rid``: The :ref:`RID` of the containing navigation primitive (region or link). + +- ``owner``: The object which manages the containing navigation primitive (region or link). + .. rst-class:: classref-section-separator ---- @@ -312,6 +360,23 @@ The maximum distance the agent is allowed away from the ideal path to the final ---- +.. _class_NavigationAgent3D_property_path_metadata_flags: + +.. rst-class:: classref-property + +:ref:`PathMetadataFlags` **path_metadata_flags** = ``7`` + +.. rst-class:: classref-property-setget + +- void **set_path_metadata_flags** **(** :ref:`PathMetadataFlags` value **)** +- :ref:`PathMetadataFlags` **get_path_metadata_flags** **(** **)** + +Additional information to return with the navigation path. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationAgent3D_property_radius: .. rst-class:: classref-property @@ -423,6 +488,18 @@ Returns which index the agent is currently on in the navigation path's :ref:`Pac ---- +.. _class_NavigationAgent3D_method_get_current_navigation_result: + +.. rst-class:: classref-method + +:ref:`NavigationPathQueryResult3D` **get_current_navigation_result** **(** **)** |const| + +Returns the path query result for the path the agent is currently following. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationAgent3D_method_get_final_location: .. rst-class:: classref-method diff --git a/classes/class_navigationmesh.rst b/classes/class_navigationmesh.rst index 38d8d332e..ae69ccbad 100644 --- a/classes/class_navigationmesh.rst +++ b/classes/class_navigationmesh.rst @@ -75,14 +75,14 @@ Properties +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StringName` | :ref:`geometry_source_group_name` | ``&"navigation_mesh_source_group"`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`float` | :ref:`polygon_vertices_per_polyon` | ``6.0`` | - +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`float` | :ref:`region_merge_size` | ``20.0`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`float` | :ref:`region_min_size` | ``2.0`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`SamplePartitionType` | :ref:`sample_partition_type` | ``0`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`float` | :ref:`vertices_per_polygon` | ``6.0`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+ .. rst-class:: classref-reftable-group @@ -587,23 +587,6 @@ Only used when :ref:`geometry_source_geometry_mode` **polygon_vertices_per_polyon** = ``6.0`` - -.. rst-class:: classref-property-setget - -- void **set_vertices_per_polyon** **(** :ref:`float` value **)** -- :ref:`float` **get_vertices_per_polyon** **(** **)** - -The maximum number of vertices allowed for polygons generated during the contour to polygon conversion process. - -.. rst-class:: classref-item-separator - ----- - .. _class_NavigationMesh_property_region_merge_size: .. rst-class:: classref-property @@ -655,6 +638,23 @@ The minimum size of a region for it to be created. Partitioning algorithm for creating the navigation mesh polys. See :ref:`SamplePartitionType` for possible values. +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationMesh_property_vertices_per_polygon: + +.. rst-class:: classref-property + +:ref:`float` **vertices_per_polygon** = ``6.0`` + +.. rst-class:: classref-property-setget + +- void **set_vertices_per_polygon** **(** :ref:`float` value **)** +- :ref:`float` **get_vertices_per_polygon** **(** **)** + +The maximum number of vertices allowed for polygons generated during the contour to polygon conversion process. + .. rst-class:: classref-section-separator ---- diff --git a/classes/class_navigationpathqueryparameters2d.rst b/classes/class_navigationpathqueryparameters2d.rst index c1b6a03ce..94abd63ef 100644 --- a/classes/class_navigationpathqueryparameters2d.rst +++ b/classes/class_navigationpathqueryparameters2d.rst @@ -32,6 +32,8 @@ Properties +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-------------------+ | :ref:`RID` | :ref:`map` | | +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`PathMetadataFlags` | :ref:`metadata_flags` | ``7`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-------------------+ | :ref:`int` | :ref:`navigation_layers` | ``1`` | +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-------------------+ | :ref:`PathPostProcessing` | :ref:`path_postprocessing` | ``0`` | @@ -92,6 +94,56 @@ Applies a funnel algorithm to the raw path corridor found by the pathfinding alg Centers every path position in the middle of the traveled navigation mesh polygon edge. This creates better paths for tile- or gridbased layouts that restrict the movement to the cells center. +.. rst-class:: classref-item-separator + +---- + +.. _enum_NavigationPathQueryParameters2D_PathMetadataFlags: + +.. rst-class:: classref-enumeration + +flags **PathMetadataFlags**: + +.. _class_NavigationPathQueryParameters2D_constant_PATH_METADATA_INCLUDE_NONE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PathMetadataFlags` **PATH_METADATA_INCLUDE_NONE** = ``0`` + +Don't include any additional metadata about the returned path. + +.. _class_NavigationPathQueryParameters2D_constant_PATH_METADATA_INCLUDE_TYPES: + +.. rst-class:: classref-enumeration-constant + +:ref:`PathMetadataFlags` **PATH_METADATA_INCLUDE_TYPES** = ``1`` + +Include the type of navigation primitive (region or link) that each point of the path goes through. + +.. _class_NavigationPathQueryParameters2D_constant_PATH_METADATA_INCLUDE_RIDS: + +.. rst-class:: classref-enumeration-constant + +:ref:`PathMetadataFlags` **PATH_METADATA_INCLUDE_RIDS** = ``2`` + +Include the :ref:`RID`\ s of the regions and links that each point of the path goes through. + +.. _class_NavigationPathQueryParameters2D_constant_PATH_METADATA_INCLUDE_OWNERS: + +.. rst-class:: classref-enumeration-constant + +:ref:`PathMetadataFlags` **PATH_METADATA_INCLUDE_OWNERS** = ``4`` + +Include the ``ObjectID``\ s of the :ref:`Object`\ s which manage the regions and links each point of the path goes through. + +.. _class_NavigationPathQueryParameters2D_constant_PATH_METADATA_INCLUDE_ALL: + +.. rst-class:: classref-enumeration-constant + +:ref:`PathMetadataFlags` **PATH_METADATA_INCLUDE_ALL** = ``7`` + +Include all available metadata about the returned path. + .. rst-class:: classref-section-separator ---- @@ -118,6 +170,23 @@ The navigation ``map`` :ref:`RID` used in the path query. ---- +.. _class_NavigationPathQueryParameters2D_property_metadata_flags: + +.. rst-class:: classref-property + +:ref:`PathMetadataFlags` **metadata_flags** = ``7`` + +.. rst-class:: classref-property-setget + +- void **set_metadata_flags** **(** :ref:`PathMetadataFlags` value **)** +- :ref:`PathMetadataFlags` **get_metadata_flags** **(** **)** + +Additional information to include with the navigation path. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationPathQueryParameters2D_property_navigation_layers: .. rst-class:: classref-property diff --git a/classes/class_navigationpathqueryparameters3d.rst b/classes/class_navigationpathqueryparameters3d.rst index 917ed1566..ee4ffb402 100644 --- a/classes/class_navigationpathqueryparameters3d.rst +++ b/classes/class_navigationpathqueryparameters3d.rst @@ -32,6 +32,8 @@ Properties +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ | :ref:`RID` | :ref:`map` | | +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`PathMetadataFlags` | :ref:`metadata_flags` | ``7`` | + +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ | :ref:`int` | :ref:`navigation_layers` | ``1`` | +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ | :ref:`PathPostProcessing` | :ref:`path_postprocessing` | ``0`` | @@ -92,6 +94,56 @@ Applies a funnel algorithm to the raw path corridor found by the pathfinding alg Centers every path position in the middle of the traveled navigation mesh polygon edge. This creates better paths for tile- or gridbased layouts that restrict the movement to the cells center. +.. rst-class:: classref-item-separator + +---- + +.. _enum_NavigationPathQueryParameters3D_PathMetadataFlags: + +.. rst-class:: classref-enumeration + +flags **PathMetadataFlags**: + +.. _class_NavigationPathQueryParameters3D_constant_PATH_METADATA_INCLUDE_NONE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PathMetadataFlags` **PATH_METADATA_INCLUDE_NONE** = ``0`` + +Don't include any additional metadata about the returned path. + +.. _class_NavigationPathQueryParameters3D_constant_PATH_METADATA_INCLUDE_TYPES: + +.. rst-class:: classref-enumeration-constant + +:ref:`PathMetadataFlags` **PATH_METADATA_INCLUDE_TYPES** = ``1`` + +Include the type of navigation primitive (region or link) that each point of the path goes through. + +.. _class_NavigationPathQueryParameters3D_constant_PATH_METADATA_INCLUDE_RIDS: + +.. rst-class:: classref-enumeration-constant + +:ref:`PathMetadataFlags` **PATH_METADATA_INCLUDE_RIDS** = ``2`` + +Include the :ref:`RID`\ s of the regions and links that each point of the path goes through. + +.. _class_NavigationPathQueryParameters3D_constant_PATH_METADATA_INCLUDE_OWNERS: + +.. rst-class:: classref-enumeration-constant + +:ref:`PathMetadataFlags` **PATH_METADATA_INCLUDE_OWNERS** = ``4`` + +Include the ``ObjectID``\ s of the :ref:`Object`\ s which manage the regions and links each point of the path goes through. + +.. _class_NavigationPathQueryParameters3D_constant_PATH_METADATA_INCLUDE_ALL: + +.. rst-class:: classref-enumeration-constant + +:ref:`PathMetadataFlags` **PATH_METADATA_INCLUDE_ALL** = ``7`` + +Include all available metadata about the returned path. + .. rst-class:: classref-section-separator ---- @@ -118,6 +170,23 @@ The navigation ``map`` :ref:`RID` used in the path query. ---- +.. _class_NavigationPathQueryParameters3D_property_metadata_flags: + +.. rst-class:: classref-property + +:ref:`PathMetadataFlags` **metadata_flags** = ``7`` + +.. rst-class:: classref-property-setget + +- void **set_metadata_flags** **(** :ref:`PathMetadataFlags` value **)** +- :ref:`PathMetadataFlags` **get_metadata_flags** **(** **)** + +Additional information to include with the navigation path. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationPathQueryParameters3D_property_navigation_layers: .. rst-class:: classref-property diff --git a/classes/class_navigationpathqueryresult2d.rst b/classes/class_navigationpathqueryresult2d.rst index 5b0f617b9..6386052ed 100644 --- a/classes/class_navigationpathqueryresult2d.rst +++ b/classes/class_navigationpathqueryresult2d.rst @@ -29,9 +29,15 @@ Properties .. table:: :widths: auto - +-----------------------------------------------------+--------------------------------------------------------------+--------------------------+ - | :ref:`PackedVector2Array` | :ref:`path` | ``PackedVector2Array()`` | - +-----------------------------------------------------+--------------------------------------------------------------+--------------------------+ + +-----------------------------------------------------+----------------------------------------------------------------------------------+--------------------------+ + | :ref:`PackedVector2Array` | :ref:`path` | ``PackedVector2Array()`` | + +-----------------------------------------------------+----------------------------------------------------------------------------------+--------------------------+ + | :ref:`PackedInt64Array` | :ref:`path_owner_ids` | ``PackedInt64Array()`` | + +-----------------------------------------------------+----------------------------------------------------------------------------------+--------------------------+ + | :ref:`RID[]` | :ref:`path_rids` | ``[]`` | + +-----------------------------------------------------+----------------------------------------------------------------------------------+--------------------------+ + | :ref:`PackedInt32Array` | :ref:`path_types` | ``PackedInt32Array()`` | + +-----------------------------------------------------+----------------------------------------------------------------------------------+--------------------------+ .. rst-class:: classref-reftable-group @@ -51,6 +57,37 @@ Methods .. rst-class:: classref-descriptions-group +Enumerations +------------ + +.. _enum_NavigationPathQueryResult2D_PathSegmentType: + +.. rst-class:: classref-enumeration + +enum **PathSegmentType**: + +.. _class_NavigationPathQueryResult2D_constant_PATH_SEGMENT_TYPE_REGION: + +.. rst-class:: classref-enumeration-constant + +:ref:`PathSegmentType` **PATH_SEGMENT_TYPE_REGION** = ``0`` + +This segment of the path goes through a region. + +.. _class_NavigationPathQueryResult2D_constant_PATH_SEGMENT_TYPE_LINK: + +.. rst-class:: classref-enumeration-constant + +:ref:`PathSegmentType` **PATH_SEGMENT_TYPE_LINK** = ``1`` + +This segment of the path goes through a link. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- @@ -67,6 +104,57 @@ Property Descriptions The resulting path array from the navigation query. All path array positions are in global coordinates. Without customized query parameters this is the same path as returned by :ref:`NavigationServer2D.map_get_path`. +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationPathQueryResult2D_property_path_owner_ids: + +.. rst-class:: classref-property + +:ref:`PackedInt64Array` **path_owner_ids** = ``PackedInt64Array()`` + +.. rst-class:: classref-property-setget + +- void **set_path_owner_ids** **(** :ref:`PackedInt64Array` value **)** +- :ref:`PackedInt64Array` **get_path_owner_ids** **(** **)** + +The ``ObjectID``\ s of the :ref:`Object`\ s which manage the regions and links each point of the path goes through. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationPathQueryResult2D_property_path_rids: + +.. rst-class:: classref-property + +:ref:`RID[]` **path_rids** = ``[]`` + +.. rst-class:: classref-property-setget + +- void **set_path_rids** **(** :ref:`RID[]` value **)** +- :ref:`RID[]` **get_path_rids** **(** **)** + +The :ref:`RID`\ s of the regions and links that each point of the path goes through. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationPathQueryResult2D_property_path_types: + +.. rst-class:: classref-property + +:ref:`PackedInt32Array` **path_types** = ``PackedInt32Array()`` + +.. rst-class:: classref-property-setget + +- void **set_path_types** **(** :ref:`PackedInt32Array` value **)** +- :ref:`PackedInt32Array` **get_path_types** **(** **)** + +The type of navigation primitive (region or link) that each point of the path goes through. + .. rst-class:: classref-section-separator ---- diff --git a/classes/class_navigationpathqueryresult3d.rst b/classes/class_navigationpathqueryresult3d.rst index c9bfa9943..86c076a26 100644 --- a/classes/class_navigationpathqueryresult3d.rst +++ b/classes/class_navigationpathqueryresult3d.rst @@ -29,9 +29,15 @@ Properties .. table:: :widths: auto - +-----------------------------------------------------+--------------------------------------------------------------+--------------------------+ - | :ref:`PackedVector3Array` | :ref:`path` | ``PackedVector3Array()`` | - +-----------------------------------------------------+--------------------------------------------------------------+--------------------------+ + +-----------------------------------------------------+----------------------------------------------------------------------------------+--------------------------+ + | :ref:`PackedVector3Array` | :ref:`path` | ``PackedVector3Array()`` | + +-----------------------------------------------------+----------------------------------------------------------------------------------+--------------------------+ + | :ref:`PackedInt64Array` | :ref:`path_owner_ids` | ``PackedInt64Array()`` | + +-----------------------------------------------------+----------------------------------------------------------------------------------+--------------------------+ + | :ref:`RID[]` | :ref:`path_rids` | ``[]`` | + +-----------------------------------------------------+----------------------------------------------------------------------------------+--------------------------+ + | :ref:`PackedInt32Array` | :ref:`path_types` | ``PackedInt32Array()`` | + +-----------------------------------------------------+----------------------------------------------------------------------------------+--------------------------+ .. rst-class:: classref-reftable-group @@ -51,6 +57,37 @@ Methods .. rst-class:: classref-descriptions-group +Enumerations +------------ + +.. _enum_NavigationPathQueryResult3D_PathSegmentType: + +.. rst-class:: classref-enumeration + +enum **PathSegmentType**: + +.. _class_NavigationPathQueryResult3D_constant_PATH_SEGMENT_TYPE_REGION: + +.. rst-class:: classref-enumeration-constant + +:ref:`PathSegmentType` **PATH_SEGMENT_TYPE_REGION** = ``0`` + +This segment of the path goes through a region. + +.. _class_NavigationPathQueryResult3D_constant_PATH_SEGMENT_TYPE_LINK: + +.. rst-class:: classref-enumeration-constant + +:ref:`PathSegmentType` **PATH_SEGMENT_TYPE_LINK** = ``1`` + +This segment of the path goes through a link. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- @@ -67,6 +104,57 @@ Property Descriptions The resulting path array from the navigation query. All path array positions are in global coordinates. Without customized query parameters this is the same path as returned by :ref:`NavigationServer3D.map_get_path`. +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationPathQueryResult3D_property_path_owner_ids: + +.. rst-class:: classref-property + +:ref:`PackedInt64Array` **path_owner_ids** = ``PackedInt64Array()`` + +.. rst-class:: classref-property-setget + +- void **set_path_owner_ids** **(** :ref:`PackedInt64Array` value **)** +- :ref:`PackedInt64Array` **get_path_owner_ids** **(** **)** + +The ``ObjectID``\ s of the :ref:`Object`\ s which manage the regions and links each point of the path goes through. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationPathQueryResult3D_property_path_rids: + +.. rst-class:: classref-property + +:ref:`RID[]` **path_rids** = ``[]`` + +.. rst-class:: classref-property-setget + +- void **set_path_rids** **(** :ref:`RID[]` value **)** +- :ref:`RID[]` **get_path_rids** **(** **)** + +The :ref:`RID`\ s of the regions and links that each point of the path goes through. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationPathQueryResult3D_property_path_types: + +.. rst-class:: classref-property + +:ref:`PackedInt32Array` **path_types** = ``PackedInt32Array()`` + +.. rst-class:: classref-property-setget + +- void **set_path_types** **(** :ref:`PackedInt32Array` value **)** +- :ref:`PackedInt32Array` **get_path_types** **(** **)** + +The type of navigation primitive (region or link) that each point of the path goes through. + .. rst-class:: classref-section-separator ---- diff --git a/classes/class_optionbutton.rst b/classes/class_optionbutton.rst index 10c35d69d..1ce194ae4 100644 --- a/classes/class_optionbutton.rst +++ b/classes/class_optionbutton.rst @@ -717,6 +717,8 @@ If different than ``0``, the arrow icon will be modulated to the font color. The size of the text outline. +\ **Note:** If using a font with :ref:`FontFile.multichannel_signed_distance_field` enabled, its :ref:`FontFile.msdf_pixel_range` must be set to at least *twice* the value of :ref:`outline_size` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_physicsserver2d.rst b/classes/class_physicsserver2d.rst index 6fc44dec4..d6b3ec279 100644 --- a/classes/class_physicsserver2d.rst +++ b/classes/class_physicsserver2d.rst @@ -216,10 +216,14 @@ Methods +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`joint_create` **(** **)** | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`joint_disable_collisions_between_bodies` **(** :ref:`RID` joint, :ref:`bool` disable **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`joint_get_param` **(** :ref:`RID` joint, :ref:`JointParam` param **)** |const| | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`JointType` | :ref:`joint_get_type` **(** :ref:`RID` joint **)** |const| | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`joint_is_disabled_collisions_between_bodies` **(** :ref:`RID` joint **)** |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`joint_make_damped_spring` **(** :ref:`RID` joint, :ref:`Vector2` anchor_a, :ref:`Vector2` anchor_b, :ref:`RID` body_a, :ref:`RID` body_b **)** | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`joint_make_groove` **(** :ref:`RID` joint, :ref:`Vector2` groove1_a, :ref:`Vector2` groove2_a, :ref:`Vector2` anchor_b, :ref:`RID` body_a, :ref:`RID` body_b **)** | @@ -2195,6 +2199,18 @@ void **joint_clear** **(** :ref:`RID` joint **)** ---- +.. _class_PhysicsServer2D_method_joint_disable_collisions_between_bodies: + +.. rst-class:: classref-method + +void **joint_disable_collisions_between_bodies** **(** :ref:`RID` joint, :ref:`bool` disable **)** + +Sets whether the bodies attached to the :ref:`Joint2D` will collide with each other. + +.. rst-class:: classref-item-separator + +---- + .. _class_PhysicsServer2D_method_joint_get_param: .. rst-class:: classref-method @@ -2219,6 +2235,18 @@ Returns a joint's type (see :ref:`JointType`). ---- +.. _class_PhysicsServer2D_method_joint_is_disabled_collisions_between_bodies: + +.. rst-class:: classref-method + +:ref:`bool` **joint_is_disabled_collisions_between_bodies** **(** :ref:`RID` joint **)** |const| + +Returns whether the bodies attached to the :ref:`Joint2D` will collide with each other. + +.. rst-class:: classref-item-separator + +---- + .. _class_PhysicsServer2D_method_joint_make_damped_spring: .. rst-class:: classref-method diff --git a/classes/class_physicsserver3d.rst b/classes/class_physicsserver3d.rst index f3d5a0f34..fa50cbd81 100644 --- a/classes/class_physicsserver3d.rst +++ b/classes/class_physicsserver3d.rst @@ -236,10 +236,14 @@ Methods +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`joint_create` **(** **)** | +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`joint_disable_collisions_between_bodies` **(** :ref:`RID` joint, :ref:`bool` disable **)** | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`joint_get_solver_priority` **(** :ref:`RID` joint **)** |const| | +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`JointType` | :ref:`joint_get_type` **(** :ref:`RID` joint **)** |const| | +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`joint_is_disabled_collisions_between_bodies` **(** :ref:`RID` joint **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`joint_make_cone_twist` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** | +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`joint_make_generic_6dof` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** | @@ -2929,6 +2933,18 @@ void **joint_clear** **(** :ref:`RID` joint **)** ---- +.. _class_PhysicsServer3D_method_joint_disable_collisions_between_bodies: + +.. rst-class:: classref-method + +void **joint_disable_collisions_between_bodies** **(** :ref:`RID` joint, :ref:`bool` disable **)** + +Sets whether the bodies attached to the :ref:`Joint3D` will collide with each other. + +.. rst-class:: classref-item-separator + +---- + .. _class_PhysicsServer3D_method_joint_get_solver_priority: .. rst-class:: classref-method @@ -2953,6 +2969,18 @@ Returns the type of the Joint3D. ---- +.. _class_PhysicsServer3D_method_joint_is_disabled_collisions_between_bodies: + +.. rst-class:: classref-method + +:ref:`bool` **joint_is_disabled_collisions_between_bodies** **(** :ref:`RID` joint **)** |const| + +Returns whether the bodies attached to the :ref:`Joint3D` will collide with each other. + +.. rst-class:: classref-item-separator + +---- + .. _class_PhysicsServer3D_method_joint_make_cone_twist: .. rst-class:: classref-method diff --git a/classes/class_physicsserver3dextension.rst b/classes/class_physicsserver3dextension.rst index 36a73c5e3..21709c3e2 100644 --- a/classes/class_physicsserver3dextension.rst +++ b/classes/class_physicsserver3dextension.rst @@ -251,10 +251,14 @@ Methods +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`_joint_create` **(** **)** |virtual| | +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_disable_collisions_between_bodies` **(** :ref:`RID` joint, :ref:`bool` disable **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_joint_get_solver_priority` **(** :ref:`RID` joint **)** |virtual| |const| | +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`JointType` | :ref:`_joint_get_type` **(** :ref:`RID` joint **)** |virtual| |const| | +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_joint_is_disabled_collisions_between_bodies` **(** :ref:`RID` joint **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_joint_make_cone_twist` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** |virtual| | +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_joint_make_generic_6dof` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** |virtual| | @@ -1989,6 +1993,20 @@ void **_joint_clear** **(** :ref:`RID` joint **)** |virtual| ---- +.. _class_PhysicsServer3DExtension_method__joint_disable_collisions_between_bodies: + +.. rst-class:: classref-method + +void **_joint_disable_collisions_between_bodies** **(** :ref:`RID` joint, :ref:`bool` disable **)** |virtual| + +.. container:: contribute + + There is currently no description for this method. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + .. _class_PhysicsServer3DExtension_method__joint_get_solver_priority: .. rst-class:: classref-method @@ -2017,6 +2035,20 @@ void **_joint_clear** **(** :ref:`RID` joint **)** |virtual| ---- +.. _class_PhysicsServer3DExtension_method__joint_is_disabled_collisions_between_bodies: + +.. rst-class:: classref-method + +:ref:`bool` **_joint_is_disabled_collisions_between_bodies** **(** :ref:`RID` joint **)** |virtual| |const| + +.. container:: contribute + + There is currently no description for this method. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + .. _class_PhysicsServer3DExtension_method__joint_make_cone_twist: .. rst-class:: classref-method diff --git a/classes/class_popupmenu.rst b/classes/class_popupmenu.rst index 60f8c542a..6c97c77a3 100644 --- a/classes/class_popupmenu.rst +++ b/classes/class_popupmenu.rst @@ -1323,6 +1323,8 @@ Horizontal padding to the left of the items (or right, in RTL layout). The size of the item text outline. +\ **Note:** If using a font with :ref:`FontFile.multichannel_signed_distance_field` enabled, its :ref:`FontFile.msdf_pixel_range` must be set to at least *twice* the value of :ref:`outline_size` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_progressbar.rst b/classes/class_progressbar.rst index 2492fe522..5d1516688 100644 --- a/classes/class_progressbar.rst +++ b/classes/class_progressbar.rst @@ -200,6 +200,8 @@ The color of the text's shadow. The size of the text outline. +\ **Note:** If using a font with :ref:`FontFile.multichannel_signed_distance_field` enabled, its :ref:`FontFile.msdf_pixel_range` must be set to at least *twice* the value of :ref:`outline_size` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_projectsettings.rst b/classes/class_projectsettings.rst index 5900a187a..360941d17 100644 --- a/classes/class_projectsettings.rst +++ b/classes/class_projectsettings.rst @@ -1337,7 +1337,7 @@ Methods +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_order` **(** :ref:`String` name **)** |const| | +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`get_setting` **(** :ref:`String` name **)** |const| | + | :ref:`Variant` | :ref:`get_setting` **(** :ref:`String` name, :ref:`Variant` default_value=null **)** |const| | +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`globalize_path` **(** :ref:`String` path **)** |const| | +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -9587,9 +9587,9 @@ Returns the order of a configuration value (influences when saved to the config .. rst-class:: classref-method -:ref:`Variant` **get_setting** **(** :ref:`String` name **)** |const| +:ref:`Variant` **get_setting** **(** :ref:`String` name, :ref:`Variant` default_value=null **)** |const| -Returns the value of a setting. +Returns the value of the setting identified by ``name``. If the setting doesn't exist and ``default_value`` is specified, the value of ``default_value`` is returned. Otherwise, ``null`` is returned. \ **Example:**\ @@ -9599,10 +9599,12 @@ Returns the value of a setting. .. code-tab:: gdscript print(ProjectSettings.get_setting("application/config/name")) + print(ProjectSettings.get_setting("application/config/custom_description", "No description specified.")) .. code-tab:: csharp GD.Print(ProjectSettings.GetSetting("application/config/name")); + GD.Print(ProjectSettings.GetSetting("application/config/custom_description", "No description specified.")); diff --git a/classes/class_renderingserver.rst b/classes/class_renderingserver.rst index 1b0d07ba1..d7ba88f30 100644 --- a/classes/class_renderingserver.rst +++ b/classes/class_renderingserver.rst @@ -447,6 +447,8 @@ Methods +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`instance_set_layer_mask` **(** :ref:`RID` instance, :ref:`int` mask **)** | +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`instance_set_pivot_data` **(** :ref:`RID` instance, :ref:`float` sorting_offset, :ref:`bool` use_aabb_center **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`instance_set_scenario` **(** :ref:`RID` instance, :ref:`RID` scenario **)** | +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`instance_set_surface_override_material` **(** :ref:`RID` instance, :ref:`int` surface, :ref:`RID` material **)** | @@ -7748,6 +7750,18 @@ Sets the render layers that this instance will be drawn to. Equivalent to :ref:` ---- +.. _class_RenderingServer_method_instance_set_pivot_data: + +.. rst-class:: classref-method + +void **instance_set_pivot_data** **(** :ref:`RID` instance, :ref:`float` sorting_offset, :ref:`bool` use_aabb_center **)** + +Sets the sorting offset and switches between using the bounding box or instance origin for depth sorting. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_instance_set_scenario: .. rst-class:: classref-method diff --git a/classes/class_richtextlabel.rst b/classes/class_richtextlabel.rst index 0230a6430..fa9112c73 100644 --- a/classes/class_richtextlabel.rst +++ b/classes/class_richtextlabel.rst @@ -209,7 +209,7 @@ Methods +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`push_underline` **(** **)** | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`remove_line` **(** :ref:`int` line **)** | + | :ref:`bool` | :ref:`remove_paragraph` **(** :ref:`int` paragraph **)** | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`scroll_to_line` **(** :ref:`int` line **)** | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -1683,15 +1683,15 @@ Adds a ``[u]`` tag to the tag stack. ---- -.. _class_RichTextLabel_method_remove_line: +.. _class_RichTextLabel_method_remove_paragraph: .. rst-class:: classref-method -:ref:`bool` **remove_line** **(** :ref:`int` line **)** +:ref:`bool` **remove_paragraph** **(** :ref:`int` paragraph **)** -Removes a line of content from the label. Returns ``true`` if the line exists. +Removes a paragraph of content from the label. Returns ``true`` if the paragraph exists. -The ``line`` argument is the index of the line to remove, it can take values in the interval ``[0, get_line_count() - 1]``. +The ``paragraph`` argument is the index of the paragraph to remove, it can take values in the interval ``[0, get_paragraph_count() - 1]``. .. rst-class:: classref-item-separator @@ -1932,6 +1932,8 @@ The vertical space between lines. The size of the text outline. +\ **Note:** If using a font with :ref:`FontFile.multichannel_signed_distance_field` enabled, its :ref:`FontFile.msdf_pixel_range` must be set to at least *twice* the value of :ref:`outline_size` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_tabbar.rst b/classes/class_tabbar.rst index 255740ab3..2d5c5b09c 100644 --- a/classes/class_tabbar.rst +++ b/classes/class_tabbar.rst @@ -928,6 +928,8 @@ The horizontal separation between the elements inside tabs. The size of the tab text outline. +\ **Note:** If using a font with :ref:`FontFile.multichannel_signed_distance_field` enabled, its :ref:`FontFile.msdf_pixel_range` must be set to at least *twice* the value of :ref:`outline_size` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_tabcontainer.rst b/classes/class_tabcontainer.rst index ef4a681d0..d1c9bafa9 100644 --- a/classes/class_tabcontainer.rst +++ b/classes/class_tabcontainer.rst @@ -666,6 +666,8 @@ Space between tab's name and its icon. The size of the tab text outline. +\ **Note:** If using a font with :ref:`FontFile.multichannel_signed_distance_field` enabled, its :ref:`FontFile.msdf_pixel_range` must be set to at least *twice* the value of :ref:`outline_size` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_textedit.rst b/classes/class_textedit.rst index 2c5e3ab44..7bca938e0 100644 --- a/classes/class_textedit.rst +++ b/classes/class_textedit.rst @@ -3538,6 +3538,8 @@ Sets the spacing between the lines. The size of the text outline. +\ **Note:** If using a font with :ref:`FontFile.multichannel_signed_distance_field` enabled, its :ref:`FontFile.msdf_pixel_range` must be set to at least *twice* the value of :ref:`outline_size` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_tree.rst b/classes/class_tree.rst index 3ccc9c190..0bb06627e 100644 --- a/classes/class_tree.rst +++ b/classes/class_tree.rst @@ -1419,6 +1419,8 @@ The horizontal margin at the start of an item. This is used when folding is enab The size of the text outline. +\ **Note:** If using a font with :ref:`FontFile.multichannel_signed_distance_field` enabled, its :ref:`FontFile.msdf_pixel_range` must be set to at least *twice* the value of :ref:`outline_size` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_tubetrailmesh.rst b/classes/class_tubetrailmesh.rst index ce3ef3d45..89d0d65c1 100644 --- a/classes/class_tubetrailmesh.rst +++ b/classes/class_tubetrailmesh.rst @@ -24,19 +24,23 @@ Properties .. table:: :widths: auto - +---------------------------+--------------------------------------------------------------------+---------+ - | :ref:`Curve` | :ref:`curve` | | - +---------------------------+--------------------------------------------------------------------+---------+ - | :ref:`int` | :ref:`radial_steps` | ``8`` | - +---------------------------+--------------------------------------------------------------------+---------+ - | :ref:`float` | :ref:`radius` | ``0.5`` | - +---------------------------+--------------------------------------------------------------------+---------+ - | :ref:`float` | :ref:`section_length` | ``0.2`` | - +---------------------------+--------------------------------------------------------------------+---------+ - | :ref:`int` | :ref:`section_rings` | ``3`` | - +---------------------------+--------------------------------------------------------------------+---------+ - | :ref:`int` | :ref:`sections` | ``5`` | - +---------------------------+--------------------------------------------------------------------+---------+ + +---------------------------+--------------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`cap_bottom` | ``true`` | + +---------------------------+--------------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`cap_top` | ``true`` | + +---------------------------+--------------------------------------------------------------------+----------+ + | :ref:`Curve` | :ref:`curve` | | + +---------------------------+--------------------------------------------------------------------+----------+ + | :ref:`int` | :ref:`radial_steps` | ``8`` | + +---------------------------+--------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`radius` | ``0.5`` | + +---------------------------+--------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`section_length` | ``0.2`` | + +---------------------------+--------------------------------------------------------------------+----------+ + | :ref:`int` | :ref:`section_rings` | ``3`` | + +---------------------------+--------------------------------------------------------------------+----------+ + | :ref:`int` | :ref:`sections` | ``5`` | + +---------------------------+--------------------------------------------------------------------+----------+ .. rst-class:: classref-section-separator @@ -47,6 +51,40 @@ Properties Property Descriptions --------------------- +.. _class_TubeTrailMesh_property_cap_bottom: + +.. rst-class:: classref-property + +:ref:`bool` **cap_bottom** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_cap_bottom** **(** :ref:`bool` value **)** +- :ref:`bool` **is_cap_bottom** **(** **)** + +If ``true``, generates a cap at the bottom of the tube. This can be set to ``false`` to speed up generation and rendering when the cap is never seen by the camera. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TubeTrailMesh_property_cap_top: + +.. rst-class:: classref-property + +:ref:`bool` **cap_top** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_cap_top** **(** :ref:`bool` value **)** +- :ref:`bool` **is_cap_top** **(** **)** + +If ``true``, generates a cap at the top of the tube. This can be set to ``false`` to speed up generation and rendering when the cap is never seen by the camera. + +.. rst-class:: classref-item-separator + +---- + .. _class_TubeTrailMesh_property_curve: .. rst-class:: classref-property diff --git a/classes/class_vboxcontainer.rst b/classes/class_vboxcontainer.rst index da1b8ada1..0a351ea10 100644 --- a/classes/class_vboxcontainer.rst +++ b/classes/class_vboxcontainer.rst @@ -12,7 +12,7 @@ VBoxContainer **Inherits:** :ref:`BoxContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`FileSystemDock`, :ref:`ScriptEditorBase` +**Inherited By:** :ref:`ColorPicker`, :ref:`FileSystemDock`, :ref:`ScriptEditorBase` Vertical box container. diff --git a/classes/class_visualinstance3d.rst b/classes/class_visualinstance3d.rst index 814ee2298..78609b778 100644 --- a/classes/class_visualinstance3d.rst +++ b/classes/class_visualinstance3d.rst @@ -31,9 +31,13 @@ Properties .. table:: :widths: auto - +-----------------------+-------------------------------------------------------+-------+ - | :ref:`int` | :ref:`layers` | ``1`` | - +-----------------------+-------------------------------------------------------+-------+ + +---------------------------+-----------------------------------------------------------------------------------------+----------+ + | :ref:`int` | :ref:`layers` | ``1`` | + +---------------------------+-----------------------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`sorting_offset` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`sorting_use_aabb_center` | ``true`` | + +---------------------------+-----------------------------------------------------------------------------------------+----------+ .. rst-class:: classref-reftable-group @@ -85,6 +89,42 @@ This object will only be visible for :ref:`Camera3D`\ s whose cu For :ref:`Light3D`\ s, this can be used to control which **VisualInstance3D**\ s are affected by a specific light. For :ref:`GPUParticles3D`, this can be used to control which particles are effected by a specific attractor. For :ref:`Decal`\ s, this can be used to control which **VisualInstance3D**\ s are affected by a specific decal. +.. rst-class:: classref-item-separator + +---- + +.. _class_VisualInstance3D_property_sorting_offset: + +.. rst-class:: classref-property + +:ref:`float` **sorting_offset** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_sorting_offset** **(** :ref:`float` value **)** +- :ref:`float` **get_sorting_offset** **(** **)** + +The sorting offset used by this **VisualInstance3D**. Adjusting it to a higher value will make the **VisualInstance3D** reliably draw on top of other **VisualInstance3D**\ s that are otherwise positioned at the same spot. + +.. rst-class:: classref-item-separator + +---- + +.. _class_VisualInstance3D_property_sorting_use_aabb_center: + +.. rst-class:: classref-property + +:ref:`bool` **sorting_use_aabb_center** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_sorting_use_aabb_center** **(** :ref:`bool` value **)** +- :ref:`bool` **is_sorting_use_aabb_center** **(** **)** + +If ``true``, the object is sorted based on the :ref:`AABB` center. The object will be sorted based on the global position otherwise. + +The :ref:`AABB` center based sorting is generally more accurate for 3D models. The position based sorting instead allows to better control the drawing order when working with :ref:`GPUParticles3D` and :ref:`CPUParticles3D`. + .. rst-class:: classref-section-separator ----