diff --git a/classes/class_animationmixer.rst b/classes/class_animationmixer.rst index f452889138d..e654feddab7 100644 --- a/classes/class_animationmixer.rst +++ b/classes/class_animationmixer.rst @@ -504,6 +504,18 @@ A virtual function for processing after getting a key during playback. Adds ``library`` to the animation player, under the key ``name``. +AnimationMixer has a global library by default with an empty string as key. For adding an animation to the global library: + + +.. tabs:: + + .. code-tab:: gdscript + + var global_library = mixer.get_animation_library("") + global_library.add_animation("animation_name", animation_resource) + + + .. rst-class:: classref-item-separator ---- @@ -763,10 +775,10 @@ For example, if an animation with only one key ``Quaternion(0, 0, 0, 1)`` is pla func _process(delta): if Input.is_action_just_pressed("animate"): state_machine.travel("Animate") - var current_root_motion_rotation_accumulator: Quaternion = animation_tree.get_root_motion_Quaternion_accumulator() + var current_root_motion_rotation_accumulator: Quaternion = animation_tree.get_root_motion_rotation_accumulator() var difference: Quaternion = prev_root_motion_rotation_accumulator.inverse() * current_root_motion_rotation_accumulator prev_root_motion_rotation_accumulator = current_root_motion_rotation_accumulator - transform.basis *= difference + transform.basis *= Basis(difference) diff --git a/classes/class_audioeffectspectrumanalyzer.rst b/classes/class_audioeffectspectrumanalyzer.rst index c2f812bfd36..2a862c5c0f3 100644 --- a/classes/class_audioeffectspectrumanalyzer.rst +++ b/classes/class_audioeffectspectrumanalyzer.rst @@ -21,6 +21,8 @@ Description This audio effect does not affect sound output, but can be used for real-time audio visualizations. +This resource configures an :ref:`AudioEffectSpectrumAnalyzerInstance`, which performs the actual analysis at runtime. An instance can be acquired with :ref:`AudioServer.get_bus_effect_instance`. + See also :ref:`AudioStreamGenerator` for procedurally generating sounds. .. rst-class:: classref-introduction-group diff --git a/classes/class_audioeffectspectrumanalyzerinstance.rst b/classes/class_audioeffectspectrumanalyzerinstance.rst index bd15e48e710..68c533dcf73 100644 --- a/classes/class_audioeffectspectrumanalyzerinstance.rst +++ b/classes/class_audioeffectspectrumanalyzerinstance.rst @@ -12,9 +12,23 @@ AudioEffectSpectrumAnalyzerInstance **Inherits:** :ref:`AudioEffectInstance` **<** :ref:`RefCounted` **<** :ref:`Object` -.. container:: contribute +Queryable instance of an :ref:`AudioEffectSpectrumAnalyzer`. - There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-introduction-group + +Description +----------- + +The runtime part of an :ref:`AudioEffectSpectrumAnalyzer`, which can be used to query the magnitude of a frequency range on its host bus. + +An instance of this class can be acquired with :ref:`AudioServer.get_bus_effect_instance`. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- `Audio Spectrum Visualizer Demo `__ .. rst-class:: classref-reftable-group @@ -49,7 +63,7 @@ enum **MagnitudeMode**: :ref:`🔗` **MAGNITUDE_AVERAGE** = ``0`` -Use the average value as magnitude. +Use the average value across the frequency range as magnitude. .. _class_AudioEffectSpectrumAnalyzerInstance_constant_MAGNITUDE_MAX: @@ -57,7 +71,7 @@ Use the average value as magnitude. :ref:`MagnitudeMode` **MAGNITUDE_MAX** = ``1`` -Use the maximum value as magnitude. +Use the maximum value of the frequency range as magnitude. .. rst-class:: classref-section-separator @@ -74,9 +88,9 @@ Method Descriptions :ref:`Vector2` **get_magnitude_for_frequency_range**\ (\ from_hz\: :ref:`float`, to_hz\: :ref:`float`, mode\: :ref:`MagnitudeMode` = 1\ ) |const| :ref:`🔗` -.. container:: contribute +Returns the magnitude of the frequencies from ``from_hz`` to ``to_hz`` in linear energy as a Vector2. The ``x`` component of the return value represents the left stereo channel, and ``y`` represents the right channel. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ ``mode`` determines how the frequency range will be processed. See :ref:`MagnitudeMode`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_audiostreamwav.rst b/classes/class_audiostreamwav.rst index 733b5fff25a..fb21bcccfb9 100644 --- a/classes/class_audiostreamwav.rst +++ b/classes/class_audiostreamwav.rst @@ -213,7 +213,7 @@ Audio format. See :ref:`Format` constants for values - |void| **set_loop_begin**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_loop_begin**\ (\ ) -The loop start point (in number of samples, relative to the beginning of the sample). This information will be imported automatically from the WAV file if present. +The loop start point (in number of samples, relative to the beginning of the stream). This information will be imported automatically from the WAV file if present. .. rst-class:: classref-item-separator @@ -230,7 +230,7 @@ The loop start point (in number of samples, relative to the beginning of the sam - |void| **set_loop_end**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_loop_end**\ (\ ) -The loop end point (in number of samples, relative to the beginning of the sample). This information will be imported automatically from the WAV file if present. +The loop end point (in number of samples, relative to the beginning of the stream). This information will be imported automatically from the WAV file if present. .. rst-class:: classref-item-separator diff --git a/classes/class_basis.rst b/classes/class_basis.rst index e699ff6d776..5ad7ebeb811 100644 --- a/classes/class_basis.rst +++ b/classes/class_basis.rst @@ -25,7 +25,7 @@ A **Basis** is **orthogonal** if its axes are perpendicular to each other. A bas For a general introduction, see the :doc:`Matrices and transforms <../tutorials/math/matrices_and_transforms>` tutorial. -\ **Note:** Godot uses a `right-handed coordinate system `__, which is a common standard. For directions, the convention for built-in types like :ref:`Camera3D` is for -Z to point forward (+X is right, +Y is up, and +Z is back). Other objects may use different direction conventions. For more information, see the `Importing 3D Scenes <../tutorials/assets_pipeline/importing_scenes.html#d-asset-direction-conventions>`__ tutorial. +\ **Note:** Godot uses a `right-handed coordinate system `__, which is a common standard. For directions, the convention for built-in types like :ref:`Camera3D` is for -Z to point forward (+X is right, +Y is up, and +Z is back). Other objects may use different direction conventions. For more information, see the `3D asset direction conventions <../tutorials/assets_pipeline/importing_3d_scenes/model_export_considerations.html#d-asset-direction-conventions>`__ tutorial. \ **Note:** The basis matrices are exposed as `column-major `__ order, which is the same as OpenGL. However, they are stored internally in row-major order, which is the same as DirectX. diff --git a/classes/class_button.rst b/classes/class_button.rst index 051c8071d05..6d617ac223f 100644 --- a/classes/class_button.rst +++ b/classes/class_button.rst @@ -557,7 +557,7 @@ Icon modulate :ref:`Color` used when the **Button** is being presse :ref:`int` **align_to_largest_stylebox** = ``0`` :ref:`🔗` -This constant acts as a boolean. If ``true``, text and icon are always aligned to the largest stylebox margins, otherwise it's aligned to the current button state stylebox margins. +This constant acts as a boolean. If ``true``, the minimum size of the button and text/icon alignment is always based on the largest stylebox margins, otherwise it's based on the current button state stylebox margins. .. rst-class:: classref-item-separator diff --git a/classes/class_canvasitem.rst b/classes/class_canvasitem.rst index eb18bdb7958..96b02972e46 100644 --- a/classes/class_canvasitem.rst +++ b/classes/class_canvasitem.rst @@ -735,9 +735,9 @@ If ``true``, this **CanvasItem** is drawn. The node is only visible if all of it - |void| **set_y_sort_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_y_sort_enabled**\ (\ ) -If ``true``, this and child **CanvasItem** nodes with a lower Y position are rendered in front of nodes with a higher Y position. If ``false``, this and child **CanvasItem** nodes are rendered normally in scene tree order. +If ``true``, this and child **CanvasItem** nodes with a higher Y position are rendered in front of nodes with a lower Y position. If ``false``, this and child **CanvasItem** nodes are rendered normally in scene tree order. -With Y-sorting enabled on a parent node ('A') but disabled on a child node ('B'), the child node ('B') is sorted but its children ('C1', 'C2', etc) render together on the same Y position as the child node 'B'. This allows you to organize the render order of a scene without changing the scene tree. +With Y-sorting enabled on a parent node ('A') but disabled on a child node ('B'), the child node ('B') is sorted but its children ('C1', 'C2', etc) render together on the same Y position as the child node ('B'). This allows you to organize the render order of a scene without changing the scene tree. Nodes sort relative to each other only if they are on the same :ref:`z_index`. diff --git a/classes/class_editorexportplugin.rst b/classes/class_editorexportplugin.rst index 9bf24e20d1c..241e572665d 100644 --- a/classes/class_editorexportplugin.rst +++ b/classes/class_editorexportplugin.rst @@ -127,7 +127,7 @@ Method Descriptions Return ``true`` if this plugin will customize resources based on the platform and features used. -When enabled, :ref:`_get_customization_configuration_hash`, :ref:`_customize_resource` and :ref:`_customize_scene` will be called and must be implemented. +When enabled, :ref:`_get_customization_configuration_hash` and :ref:`_customize_resource` will be called and must be implemented. .. rst-class:: classref-item-separator @@ -139,7 +139,9 @@ When enabled, :ref:`_get_customization_configuration_hash` **_begin_customize_scenes**\ (\ platform\: :ref:`EditorExportPlatform`, features\: :ref:`PackedStringArray`\ ) |virtual| |const| :ref:`🔗` -Return true if this plugin will customize scenes based on the platform and features used. +Return ``true`` if this plugin will customize scenes based on the platform and features used. + +When enabled, :ref:`_get_customization_configuration_hash` and :ref:`_customize_scene` will be called and must be implemented. .. rst-class:: classref-item-separator @@ -229,7 +231,7 @@ Virtual method to be overridden by the user. Called when the export is finished. |void| **_export_file**\ (\ path\: :ref:`String`, type\: :ref:`String`, features\: :ref:`PackedStringArray`\ ) |virtual| :ref:`🔗` -Virtual method to be overridden by the user. Called for each exported file, providing arguments that can be used to identify the file. ``path`` is the path of the file, ``type`` is the :ref:`Resource` represented by the file (e.g. :ref:`PackedScene`) and ``features`` is the list of features for the export. +Virtual method to be overridden by the user. Called for each exported file before :ref:`_customize_resource` and :ref:`_customize_scene`. The arguments can be used to identify the file. ``path`` is the path of the file, ``type`` is the :ref:`Resource` represented by the file (e.g. :ref:`PackedScene`), and ``features`` is the list of features for the export. Calling :ref:`skip` inside this callback will make the file not included in the export. @@ -467,6 +469,8 @@ Adds a custom file to be exported. ``path`` is the virtual path that can be used When called inside :ref:`_export_file` and ``remap`` is ``true``, the current file will not be exported, but instead remapped to this custom file. ``remap`` is ignored when called in other places. +\ ``file`` will not be imported, so consider using :ref:`_customize_resource` to remap imported resources. + .. rst-class:: classref-item-separator ---- @@ -607,7 +611,7 @@ Returns the current value of an export option supplied by :ref:`_get_export_opti |void| **skip**\ (\ ) :ref:`🔗` -To be called inside :ref:`_export_file`, :ref:`_customize_resource`, or :ref:`_customize_scene`. Skips the current file, so it's not included in the export. +To be called inside :ref:`_export_file`. Skips the current file, so it's not included in the export. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_editorplugin.rst b/classes/class_editorplugin.rst index cd00a3e7b51..3d6fc41e45b 100644 --- a/classes/class_editorplugin.rst +++ b/classes/class_editorplugin.rst @@ -1143,7 +1143,7 @@ Optionally, you can specify a shortcut parameter. When pressed, this shortcut wi |void| **add_custom_type**\ (\ type\: :ref:`String`, base\: :ref:`String`, script\: :ref:`Script`, icon\: :ref:`Texture2D`\ ) :ref:`🔗` -Adds a custom type, which will appear in the list of nodes or resources. An icon can be optionally passed. +Adds a custom type, which will appear in the list of nodes or resources. When a given node or resource is selected, the base type will be instantiated (e.g. "Node3D", "Control", "Resource"), then the script will be loaded and set to this object. diff --git a/classes/class_editorsettings.rst b/classes/class_editorsettings.rst index 620979d2e10..e7e58f23a65 100644 --- a/classes/class_editorsettings.rst +++ b/classes/class_editorsettings.rst @@ -187,6 +187,8 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`editors/animation/autorename_animation_tracks` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/animation/confirm_insert_track` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`editors/animation/default_create_bezier_tracks` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`editors/animation/default_create_reset_tracks` | @@ -321,8 +323,6 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`interface/editor/custom_display_scale` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`interface/editor/debug/enable_pseudolocalization` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`interface/editor/display_scale` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`interface/editor/dock_tab_style` | @@ -569,6 +569,8 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`text_editor/behavior/indent/type` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`text_editor/behavior/navigation/custom_word_separators` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`text_editor/behavior/navigation/drag_and_drop_selection` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`text_editor/behavior/navigation/move_caret_on_right_click` | @@ -581,6 +583,10 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`text_editor/behavior/navigation/stay_in_script_editor_on_node_selected` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/behavior/navigation/use_custom_word_separators` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/behavior/navigation/use_default_word_separators` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`text_editor/behavior/navigation/v_scroll_speed` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`text_editor/completion/add_node_path_literals` | @@ -1595,6 +1601,20 @@ If ``true``, automatically updates animation tracks' target paths when renaming ---- +.. _class_EditorSettings_property_editors/animation/confirm_insert_track: + +.. rst-class:: classref-property + +:ref:`bool` **editors/animation/confirm_insert_track** :ref:`🔗` + +If ``true``, display a confirmation dialog when adding a new track to an animation by pressing the "key" icon next to a property. Holding Shift will bypass the dialog. + +If ``false``, the behavior is reversed, i.e. the dialog only appears when Shift is held. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_editors/animation/default_create_bezier_tracks: .. rst-class:: classref-property @@ -2451,20 +2471,6 @@ The custom editor scale factor to use. This can be used for displays with very h ---- -.. _class_EditorSettings_property_interface/editor/debug/enable_pseudolocalization: - -.. rst-class:: classref-property - -:ref:`bool` **interface/editor/debug/enable_pseudolocalization** :ref:`🔗` - -If ``true``, lengthens the editor's localizable strings and replaces their characters with accented variants. This allows spotting non-localizable strings easily, while also ensuring the UI layout doesn't break when strings are made longer (as many languages require strings to be longer). - -This is a debugging feature and should only be enabled when working on the editor itself. - -.. rst-class:: classref-item-separator - ----- - .. _class_EditorSettings_property_interface/editor/display_scale: .. rst-class:: classref-property @@ -4045,6 +4051,18 @@ The indentation style to use (tabs or spaces). ---- +.. _class_EditorSettings_property_text_editor/behavior/navigation/custom_word_separators: + +.. rst-class:: classref-property + +:ref:`String` **text_editor/behavior/navigation/custom_word_separators** :ref:`🔗` + +The characters to consider as word delimiters if :ref:`text_editor/behavior/navigation/use_custom_word_separators` is ``true``. This is in addition to default characters if :ref:`text_editor/behavior/navigation/use_default_word_separators` is ``true``. The characters should be defined without separation, for example ``_♥=``. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_text_editor/behavior/navigation/drag_and_drop_selection: .. rst-class:: classref-property @@ -4119,6 +4137,30 @@ If ``true``, prevents automatically switching between the Script and 2D/3D scree ---- +.. _class_EditorSettings_property_text_editor/behavior/navigation/use_custom_word_separators: + +.. rst-class:: classref-property + +:ref:`bool` **text_editor/behavior/navigation/use_custom_word_separators** :ref:`🔗` + +If ``true``, uses the characters in :ref:`text_editor/behavior/navigation/custom_word_separators` as word separators for word navigation and operations. This is in addition to the default characters if :ref:`text_editor/behavior/navigation/use_default_word_separators` is also enabled. Word navigation and operations include double-clicking on a word or holding :kbd:`Ctrl` (:kbd:`Cmd` on macOS) while pressing :kbd:`left`, :kbd:`right`, :kbd:`backspace`, or :kbd:`delete`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_text_editor/behavior/navigation/use_default_word_separators: + +.. rst-class:: classref-property + +:ref:`bool` **text_editor/behavior/navigation/use_default_word_separators** :ref:`🔗` + +If ``true``, uses the characters in ```!"#$%&'()*+,-./:;<=>?@[\]^`{|}~``, the Unicode General Punctuation table, and the Unicode CJK Punctuation table as word separators for word navigation and operations. If ``false``, a subset of these characters are used and does not include the characters ``<>$~^=+|``. This is in addition to custom characters if :ref:`text_editor/behavior/navigation/use_custom_word_separators` is also enabled. These characters are used to determine where a word stops. Word navigation and operations include double-clicking on a word or holding :kbd:`Ctrl` (:kbd:`Cmd` on macOS) while pressing :kbd:`left`, :kbd:`right`, :kbd:`backspace`, or :kbd:`delete`. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_text_editor/behavior/navigation/v_scroll_speed: .. rst-class:: classref-property @@ -4199,7 +4241,7 @@ The delay in seconds after which autocompletion suggestions should be displayed :ref:`bool` **text_editor/completion/code_complete_enabled** :ref:`🔗` -If ``true``, code completion will be triggered automatically after :ref:`text_editor/completion/code_complete_delay`. If ``false``, you can still trigger completion manually by pressing :kbd:`Ctrl + Space` (:kbd:`Cmd + Space` on macOS). +If ``true``, code completion will be triggered automatically after :ref:`text_editor/completion/code_complete_delay`. Even if ``false``, code completion can be triggered manually with the ``ui_text_completion_query`` action (by default :kbd:`Ctrl + Space` or :kbd:`Cmd + Space` on macOS). .. rst-class:: classref-item-separator diff --git a/classes/class_editorundoredomanager.rst b/classes/class_editorundoredomanager.rst index a45eb3e1398..19b1042bf1e 100644 --- a/classes/class_editorundoredomanager.rst +++ b/classes/class_editorundoredomanager.rst @@ -60,6 +60,8 @@ Methods +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`create_action`\ (\ name\: :ref:`String`, merge_mode\: :ref:`MergeMode` = 0, custom_context\: :ref:`Object` = null, backward_undo_ops\: :ref:`bool` = false\ ) | +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`force_fixed_history`\ (\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`UndoRedo` | :ref:`get_history_undo_redo`\ (\ id\: :ref:`int`\ ) |const| | +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_object_history_id`\ (\ object\: :ref:`Object`\ ) |const| | @@ -254,6 +256,20 @@ The way undo operation are ordered in actions is dictated by ``backward_undo_ops ---- +.. _class_EditorUndoRedoManager_method_force_fixed_history: + +.. rst-class:: classref-method + +|void| **force_fixed_history**\ (\ ) :ref:`🔗` + +Forces the next operation (e.g. :ref:`add_do_method`) to use the action's history rather than guessing it from the object. This is sometimes needed when a history can't be correctly determined, like for a nested resource that doesn't have a path yet. + +This method should only be used when absolutely necessary, otherwise it might cause invalid history state. For most of complex cases, the ``custom_context`` parameter of :ref:`create_action` is sufficient. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorUndoRedoManager_method_get_history_undo_redo: .. rst-class:: classref-method diff --git a/classes/class_enetconnection.rst b/classes/class_enetconnection.rst index 2186fa03f24..2e2647a6fc2 100644 --- a/classes/class_enetconnection.rst +++ b/classes/class_enetconnection.rst @@ -438,7 +438,7 @@ Configures the DTLS server to automatically drop new connections. :ref:`Array` **service**\ (\ timeout\: :ref:`int` = 0\ ) :ref:`🔗` -Waits for events on the host specified and shuttles packets between the host and its peers. The returned :ref:`Array` will have 4 elements. An :ref:`EventType`, the :ref:`ENetPacketPeer` which generated the event, the event associated data (if any), the event associated channel (if any). If the generated event is :ref:`EVENT_RECEIVE`, the received packet will be queued to the associated :ref:`ENetPacketPeer`. +Waits for events on the specified host and shuttles packets between the host and its peers, with the given ``timeout`` (in milliseconds). The returned :ref:`Array` will have 4 elements. An :ref:`EventType`, the :ref:`ENetPacketPeer` which generated the event, the event associated data (if any), the event associated channel (if any). If the generated event is :ref:`EVENT_RECEIVE`, the received packet will be queued to the associated :ref:`ENetPacketPeer`. Call this function regularly to handle connections, disconnections, and to receive new packets. diff --git a/classes/class_gltfaccessor.rst b/classes/class_gltfaccessor.rst index c938fd962ea..d3febd05a38 100644 --- a/classes/class_gltfaccessor.rst +++ b/classes/class_gltfaccessor.rst @@ -40,37 +40,108 @@ Properties .. table:: :widths: auto - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ - | :ref:`int` | :ref:`accessor_type` | ``0`` | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ - | :ref:`int` | :ref:`buffer_view` | ``-1`` | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ - | :ref:`int` | :ref:`byte_offset` | ``0`` | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ - | :ref:`int` | :ref:`component_type` | ``0`` | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ - | :ref:`int` | :ref:`count` | ``0`` | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ - | :ref:`PackedFloat64Array` | :ref:`max` | ``PackedFloat64Array()`` | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ - | :ref:`PackedFloat64Array` | :ref:`min` | ``PackedFloat64Array()`` | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ - | :ref:`bool` | :ref:`normalized` | ``false`` | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ - | :ref:`int` | :ref:`sparse_count` | ``0`` | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ - | :ref:`int` | :ref:`sparse_indices_buffer_view` | ``0`` | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ - | :ref:`int` | :ref:`sparse_indices_byte_offset` | ``0`` | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ - | :ref:`int` | :ref:`sparse_indices_component_type` | ``0`` | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ - | :ref:`int` | :ref:`sparse_values_buffer_view` | ``0`` | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ - | :ref:`int` | :ref:`sparse_values_byte_offset` | ``0`` | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ - | :ref:`int` | :ref:`type` | ``0`` | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`GLTFAccessorType` | :ref:`accessor_type` | ``0`` | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`int` | :ref:`buffer_view` | ``-1`` | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`int` | :ref:`byte_offset` | ``0`` | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`int` | :ref:`component_type` | ``0`` | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`int` | :ref:`count` | ``0`` | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`PackedFloat64Array` | :ref:`max` | ``PackedFloat64Array()`` | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`PackedFloat64Array` | :ref:`min` | ``PackedFloat64Array()`` | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`bool` | :ref:`normalized` | ``false`` | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`int` | :ref:`sparse_count` | ``0`` | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`int` | :ref:`sparse_indices_buffer_view` | ``0`` | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`int` | :ref:`sparse_indices_byte_offset` | ``0`` | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`int` | :ref:`sparse_indices_component_type` | ``0`` | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`int` | :ref:`sparse_values_buffer_view` | ``0`` | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`int` | :ref:`sparse_values_byte_offset` | ``0`` | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`int` | :ref:`type` | | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_GLTFAccessor_GLTFAccessorType: + +.. rst-class:: classref-enumeration + +enum **GLTFAccessorType**: :ref:`🔗` + +.. _class_GLTFAccessor_constant_TYPE_SCALAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`GLTFAccessorType` **TYPE_SCALAR** = ``0`` + +Accessor type "SCALAR". For the glTF object model, this can be used to map to a single float, int, or bool value, or a float array. + +.. _class_GLTFAccessor_constant_TYPE_VEC2: + +.. rst-class:: classref-enumeration-constant + +:ref:`GLTFAccessorType` **TYPE_VEC2** = ``1`` + +Accessor type "VEC2". For the glTF object model, this maps to "float2", represented in the glTF JSON as an array of two floats. + +.. _class_GLTFAccessor_constant_TYPE_VEC3: + +.. rst-class:: classref-enumeration-constant + +:ref:`GLTFAccessorType` **TYPE_VEC3** = ``2`` + +Accessor type "VEC3". For the glTF object model, this maps to "float3", represented in the glTF JSON as an array of three floats. + +.. _class_GLTFAccessor_constant_TYPE_VEC4: + +.. rst-class:: classref-enumeration-constant + +:ref:`GLTFAccessorType` **TYPE_VEC4** = ``3`` + +Accessor type "VEC4". For the glTF object model, this maps to "float4", represented in the glTF JSON as an array of four floats. + +.. _class_GLTFAccessor_constant_TYPE_MAT2: + +.. rst-class:: classref-enumeration-constant + +:ref:`GLTFAccessorType` **TYPE_MAT2** = ``4`` + +Accessor type "MAT2". For the glTF object model, this maps to "float2x2", represented in the glTF JSON as an array of four floats. + +.. _class_GLTFAccessor_constant_TYPE_MAT3: + +.. rst-class:: classref-enumeration-constant + +:ref:`GLTFAccessorType` **TYPE_MAT3** = ``5`` + +Accessor type "MAT3". For the glTF object model, this maps to "float3x3", represented in the glTF JSON as an array of nine floats. + +.. _class_GLTFAccessor_constant_TYPE_MAT4: + +.. rst-class:: classref-enumeration-constant + +:ref:`GLTFAccessorType` **TYPE_MAT4** = ``6`` + +Accessor type "MAT4". For the glTF object model, this maps to "float4x4", represented in the glTF JSON as an array of sixteen floats. .. rst-class:: classref-section-separator @@ -85,12 +156,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int` **accessor_type** = ``0`` :ref:`🔗` +:ref:`GLTFAccessorType` **accessor_type** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_accessor_type**\ (\ value\: :ref:`int`\ ) -- :ref:`int` **get_accessor_type**\ (\ ) +- |void| **set_accessor_type**\ (\ value\: :ref:`GLTFAccessorType`\ ) +- :ref:`GLTFAccessorType` **get_accessor_type**\ (\ ) The GLTF accessor type as an enum. Possible values are 0 for "SCALAR", 1 for "VEC2", 2 for "VEC3", 3 for "VEC4", 4 for "MAT2", 5 for "MAT3", and 6 for "MAT4". @@ -323,7 +394,7 @@ The offset relative to the start of the bufferView in bytes. .. rst-class:: classref-property -:ref:`int` **type** = ``0`` :ref:`🔗` +:ref:`int` **type** :ref:`🔗` .. rst-class:: classref-property-setget diff --git a/classes/class_graphedit.rst b/classes/class_graphedit.rst index 21dbf9a8fc1..9baee6bee1c 100644 --- a/classes/class_graphedit.rst +++ b/classes/class_graphedit.rst @@ -27,6 +27,8 @@ Description \ **Performance:** It is greatly advised to enable low-processor usage mode (see :ref:`OS.low_processor_usage_mode`) when using GraphEdits. +\ **Note:** Keep in mind that :ref:`Node.get_children` will also return the connection layer node named ``_connection_layer`` due to technical limitations. This behavior may change in future releases. + .. rst-class:: classref-reftable-group Properties diff --git a/classes/class_hashingcontext.rst b/classes/class_hashingcontext.rst index bf5d5b98ac5..40232dc8460 100644 --- a/classes/class_hashingcontext.rst +++ b/classes/class_hashingcontext.rst @@ -40,8 +40,9 @@ The :ref:`HashType` enum shows the supported hashi # Open the file to hash. var file = FileAccess.open(path, FileAccess.READ) # Update the context after reading each chunk. - while not file.eof_reached(): - ctx.update(file.get_buffer(CHUNK_SIZE)) + while file.get_position() < file.get_length(): + var remaining = file.get_length() - file.get_position() + ctx.update(file.get_buffer(min(remaining, CHUNK_SIZE))) # Get the computed hash. var res = ctx.finish() # Print the result as hex string and array. @@ -64,9 +65,10 @@ The :ref:`HashType` enum shows the supported hashi // Open the file to hash. using var file = FileAccess.Open(path, FileAccess.ModeFlags.Read); // Update the context after reading each chunk. - while (!file.EofReached()) + while (file.GetPosition() < file.GetLength()) { - ctx.Update(file.GetBuffer(ChunkSize)); + int remaining = (int)(file.GetLength() - file.GetPosition()); + ctx.Update(file.GetBuffer(Mathf.Min(remaining, ChunkSize))); } // Get the computed hash. byte[] res = ctx.Finish(); diff --git a/classes/class_inputevent.rst b/classes/class_inputevent.rst index 9084aecf512..a10d7c967d5 100644 --- a/classes/class_inputevent.rst +++ b/classes/class_inputevent.rst @@ -248,7 +248,9 @@ Returns ``true`` if this input event has been canceled. :ref:`bool` **is_echo**\ (\ ) |const| :ref:`🔗` -Returns ``true`` if this input event is an echo event (only for events of type :ref:`InputEventKey`). Any other event type returns ``false``. +Returns ``true`` if this input event is an echo event (only for events of type :ref:`InputEventKey`). An echo event is a repeated key event sent when the user is holding down the key. Any other event type returns ``false``. + +\ **Note:** The rate at which echo events are sent is typically around 20 events per second (after holding down the key for roughly half a second). However, the key repeat delay/speed can be changed by the user or disabled entirely in the operating system settings. To ensure your project works correctly on all configurations, do not assume the user has a specific key repeat configuration in your project's behavior. .. rst-class:: classref-item-separator diff --git a/classes/class_inputeventkey.rst b/classes/class_inputeventkey.rst index b889662fb89..78f83f59bb4 100644 --- a/classes/class_inputeventkey.rst +++ b/classes/class_inputeventkey.rst @@ -100,7 +100,9 @@ Property Descriptions - |void| **set_echo**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_echo**\ (\ ) -If ``true``, the key was already pressed before this event. It means the user is holding the key down. +If ``true``, the key was already pressed before this event. An echo event is a repeated key event sent when the user is holding down the key. + +\ **Note:** The rate at which echo events are sent is typically around 20 events per second (after holding down the key for roughly half a second). However, the key repeat delay/speed can be changed by the user or disabled entirely in the operating system settings. To ensure your project works correctly on all configurations, do not assume the user has a specific key repeat configuration in your project's behavior. .. rst-class:: classref-item-separator diff --git a/classes/class_mesh.rst b/classes/class_mesh.rst index ced3064f9a2..c75c8c8ab52 100644 --- a/classes/class_mesh.rst +++ b/classes/class_mesh.rst @@ -191,6 +191,8 @@ enum **ArrayType**: :ref:`🔗` :ref:`PackedVector3Array` of vertex normals. +\ **Note:** The array has to consist of normal vectors, otherwise they will be normalized by the engine, potentially causing visual discrepancies. + .. _class_Mesh_constant_ARRAY_TANGENT: .. rst-class:: classref-enumeration-constant diff --git a/classes/class_nodepath.rst b/classes/class_nodepath.rst index 842dd3e8a9c..8d2fd23fe07 100644 --- a/classes/class_nodepath.rst +++ b/classes/class_nodepath.rst @@ -44,11 +44,13 @@ Despite their name, node paths may also point to a property: :: - ^"position" # Points to this object's position. - ^"position:x" # Points to this object's position in the x axis. + ^":position" # Points to this object's position. + ^":position:x" # Points to this object's position in the x axis. ^"Camera3D:rotation:y" # Points to the child Camera3D and its y rotation. ^"/root:size:x" # Points to the root Window and its width. +In some situations, it's possible to omit the leading ``:`` when pointing to an object's property. As an example, this is the case with :ref:`Object.set_indexed` and :ref:`Tween.tween_property`, as those methods call :ref:`get_as_property_path` under the hood. However, it's generally recommended to keep the ``:`` prefix. + Node paths cannot check whether they are valid and may point to nodes or properties that do not exist. Their meaning depends entirely on the context in which they're used. You usually do not have to worry about the **NodePath** type, as strings are automatically converted to the type when necessary. There are still times when defining node paths is useful. For example, exported **NodePath** properties allow you to easily select any node within the currently edited scene. They are also automatically updated when moving, renaming or deleting nodes in the scene tree editor. See also :ref:`@GDScript.@export_node_path`. diff --git a/classes/class_physicalbone3d.rst b/classes/class_physicalbone3d.rst index c830b8a7952..2325c9a540b 100644 --- a/classes/class_physicalbone3d.rst +++ b/classes/class_physicalbone3d.rst @@ -24,6 +24,8 @@ Description The **PhysicalBone3D** node is a physics body that can be used to make bones in a :ref:`Skeleton3D` react to physics. +\ **Note:** In order to detect physical bones with raycasts, the :ref:`SkeletonModifier3D.active` property of the parent :ref:`PhysicalBoneSimulator3D` must be ``true`` and the :ref:`Skeleton3D`'s bone must be assigned to **PhysicalBone3D** correctly; it means that :ref:`get_bone_id` should return a valid id (``>= 0``). + .. rst-class:: classref-reftable-group Properties diff --git a/classes/class_projectsettings.rst b/classes/class_projectsettings.rst index 2c171e352b7..8ffc466461b 100644 --- a/classes/class_projectsettings.rst +++ b/classes/class_projectsettings.rst @@ -177,6 +177,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`debug/gdscript/warnings/assert_always_true` | ``1`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/confusable_capture_reassignment` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`debug/gdscript/warnings/confusable_identifier` | ``1`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`debug/gdscript/warnings/confusable_local_declaration` | ``1`` | @@ -703,6 +705,10 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`input_devices/buffering/agile_event_flushing` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`input_devices/buffering/android/use_accumulated_input` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`input_devices/buffering/android/use_input_buffering` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`input_devices/compatibility/legacy_just_pressed_behavior` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`input_devices/pen_tablet/driver` | | @@ -1820,6 +1826,8 @@ This user directory is used for storing persistent data (``user://`` filesystem) The :ref:`application/config/use_custom_user_dir` setting must be enabled for this to take effect. +\ **Note:** If :ref:`application/config/custom_user_dir_name` contains trailing periods, they will be stripped as folder names ending with a period are not allowed on Windows. + .. rst-class:: classref-item-separator ---- @@ -2080,7 +2088,7 @@ This setting can be overridden using the ``--frame-delay `` command line ar :ref:`bool` **application/run/low_processor_mode** = ``false`` :ref:`🔗` -If ``true``, enables low-processor usage mode. The screen is not redrawn if nothing changes visually. This is meant for writing applications and editors, but is pretty useless (and can hurt performance) in most games. +If ``true``, enables low-processor usage mode. When enabled, the engine takes longer to redraw, but only redraws the screen if necessary. This may lower power consumption, and is intended for editors or mobile applications. For most games, because the screen needs to be redrawn every frame, it is recommended to keep this setting disabled. .. rst-class:: classref-item-separator @@ -2566,6 +2574,18 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w ---- +.. _class_ProjectSettings_property_debug/gdscript/warnings/confusable_capture_reassignment: + +.. rst-class:: classref-property + +:ref:`int` **debug/gdscript/warnings/confusable_capture_reassignment** = ``1`` :ref:`🔗` + +When set to ``warn`` or ``error``, produces a warning or an error respectively when a local variable captured by a lambda is reassigned, since this does not modify the outer local variable. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_debug/gdscript/warnings/confusable_identifier: .. rst-class:: classref-property @@ -5992,6 +6012,30 @@ Enabling this can greatly improve the responsiveness to input, specially in devi ---- +.. _class_ProjectSettings_property_input_devices/buffering/android/use_accumulated_input: + +.. rst-class:: classref-property + +:ref:`bool` **input_devices/buffering/android/use_accumulated_input** = ``true`` :ref:`🔗` + +If ``true``, multiple input events will be accumulated into a single input event when possible. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_input_devices/buffering/android/use_input_buffering: + +.. rst-class:: classref-property + +:ref:`bool` **input_devices/buffering/android/use_input_buffering** = ``true`` :ref:`🔗` + +If ``true``, input events will be buffered prior to being dispatched. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_input_devices/compatibility/legacy_just_pressed_behavior: .. rst-class:: classref-property @@ -9638,8 +9682,6 @@ Sets the number of MSAA samples to use for 2D/Canvas rendering (as a power of tw Sets the number of MSAA samples to use for 3D rendering (as a power of two). MSAA is used to reduce aliasing around the edges of polygons. A higher MSAA value results in smoother edges but can be significantly slower on some hardware, especially integrated graphics due to their limited memory bandwidth. See also :ref:`rendering/scaling_3d/mode` for supersampling, which provides higher quality but is much more expensive. This has no effect on shader-induced aliasing or texture aliasing. -\ **Note:** MSAA is only supported in the Forward+ and Mobile rendering methods, not Compatibility. - .. rst-class:: classref-item-separator ---- @@ -11797,7 +11839,7 @@ Specify whether OpenXR should be configured for an HMD or a hand held device. If true and foveation is supported, will automatically adjust foveation level based on framerate up to the level set on :ref:`xr/openxr/foveation_level`. -\ **Note:** Only works on compatibility renderer. +\ **Note:** Only works on the Compatibility rendering method. .. rst-class:: classref-item-separator @@ -11811,7 +11853,7 @@ If true and foveation is supported, will automatically adjust foveation level ba Applied foveation level if supported: 0 = off, 1 = low, 2 = medium, 3 = high. -\ **Note:** Only works on compatibility renderer. +\ **Note:** Only works on the Compatibility rendering method. On platforms other than Android, if :ref:`rendering/anti_aliasing/quality/msaa_3d` is enabled, this feature will be disabled. .. rst-class:: classref-item-separator diff --git a/classes/class_resourceimporterwav.rst b/classes/class_resourceimporterwav.rst index 1c71c45d83d..6cbf8292c99 100644 --- a/classes/class_resourceimporterwav.rst +++ b/classes/class_resourceimporterwav.rst @@ -91,7 +91,7 @@ The compression mode to use on import. :ref:`int` **edit/loop_begin** = ``0`` :ref:`🔗` -The begin loop point to use when :ref:`edit/loop_mode` is **Forward**, **Ping-Pong** or **Backward**. This is set in seconds after the beginning of the audio file. +The begin loop point to use when :ref:`edit/loop_mode` is **Forward**, **Ping-Pong**, or **Backward**. This is set in samples after the beginning of the audio file. .. rst-class:: classref-item-separator @@ -103,7 +103,7 @@ The begin loop point to use when :ref:`edit/loop_mode` **edit/loop_end** = ``-1`` :ref:`🔗` -The end loop point to use when :ref:`edit/loop_mode` is **Forward**, **Ping-Pong** or **Backward**. This is set in seconds after the beginning of the audio file. A value of ``-1`` uses the end of the audio file as the end loop point. +The end loop point to use when :ref:`edit/loop_mode` is **Forward**, **Ping-Pong**, or **Backward**. This is set in samples after the beginning of the audio file. A value of ``-1`` uses the end of the audio file as the end loop point. .. rst-class:: classref-item-separator diff --git a/classes/class_resourceloader.rst b/classes/class_resourceloader.rst index 46543e6f4ca..845ce3d19e0 100644 --- a/classes/class_resourceloader.rst +++ b/classes/class_resourceloader.rst @@ -294,7 +294,7 @@ GDScript has a simplified :ref:`@GDScript.load` bui Returns the resource loaded by :ref:`load_threaded_request`. -If this is called before the loading thread is done (i.e. :ref:`load_threaded_get_status` is not :ref:`THREAD_LOAD_LOADED`), the calling thread will be blocked until the resource has finished loading. +If this is called before the loading thread is done (i.e. :ref:`load_threaded_get_status` is not :ref:`THREAD_LOAD_LOADED`), the calling thread will be blocked until the resource has finished loading. However, it's recommended to use :ref:`load_threaded_get_status` to known when the load has actually completed. .. rst-class:: classref-item-separator @@ -310,6 +310,8 @@ Returns the status of a threaded loading operation started with :ref:`load_threa An array variable can optionally be passed via ``progress``, and will return a one-element array containing the percentage of completion of the threaded loading. +\ **Note:** The recommended way of using this method is to call it during different frames (e.g., in :ref:`Node._process`, instead of a loop). + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_skeleton3d.rst b/classes/class_skeleton3d.rst index 9616f8efb98..841f6b1af75 100644 --- a/classes/class_skeleton3d.rst +++ b/classes/class_skeleton3d.rst @@ -776,6 +776,10 @@ Sets all bone poses to rests. **Deprecated:** This method may be changed or removed in future versions. +This method exists for compatibility with old structures in which the **Skeleton3D** does not have a :ref:`PhysicalBoneSimulator3D` as a child, but directly has :ref:`PhysicalBone3D`\ s as children. + +In case you need to raycast to it without running :ref:`physical_bones_start_simulation`, call this method with ``enabled == true``. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_textedit.rst b/classes/class_textedit.rst index a5913b3b3b0..f71171de46c 100644 --- a/classes/class_textedit.rst +++ b/classes/class_textedit.rst @@ -59,6 +59,8 @@ Properties +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`context_menu_enabled` | ``true`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`custom_word_separators` | ``""`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`deselect_on_focus_loss_enabled` | ``true`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`drag_and_drop_selection_enabled` | ``true`` | @@ -117,6 +119,10 @@ Properties +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`TextDirection` | :ref:`text_direction` | ``0`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`use_custom_word_separators` | ``false`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`use_default_word_separators` | ``true`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`virtual_keyboard_enabled` | ``true`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`LineWrappingMode` | :ref:`wrap_mode` | ``0`` | @@ -1234,6 +1240,23 @@ If ``true``, a right-click displays the context menu. ---- +.. _class_TextEdit_property_custom_word_separators: + +.. rst-class:: classref-property + +:ref:`String` **custom_word_separators** = ``""`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_custom_word_separators**\ (\ value\: :ref:`String`\ ) +- :ref:`String` **get_custom_word_separators**\ (\ ) + +The characters to consider as word delimiters if :ref:`use_custom_word_separators` is ``true``. The characters should be defined without separation, for example ``#_!``. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextEdit_property_deselect_on_focus_loss_enabled: .. rst-class:: classref-property @@ -1697,6 +1720,40 @@ Base text writing direction. ---- +.. _class_TextEdit_property_use_custom_word_separators: + +.. rst-class:: classref-property + +:ref:`bool` **use_custom_word_separators** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_use_custom_word_separators**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_custom_word_separators_enabled**\ (\ ) + +If ``false``, using :kbd:`Ctrl + Left` or :kbd:`Ctrl + Right` (:kbd:`Cmd + Left` or :kbd:`Cmd + Right` on macOS) bindings will use the behavior of :ref:`use_default_word_separators`. If ``true``, it will also stop the caret if a character within :ref:`custom_word_separators` is detected. Useful for subword moving. This behavior also will be applied to the behavior of text selection. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextEdit_property_use_default_word_separators: + +.. rst-class:: classref-property + +:ref:`bool` **use_default_word_separators** = ``true`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_use_default_word_separators**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_default_word_separators_enabled**\ (\ ) + +If ``false``, using :kbd:`Ctrl + Left` or :kbd:`Ctrl + Right` (:kbd:`Cmd + Left` or :kbd:`Cmd + Right` on macOS) bindings will stop moving caret only if a space or punctuation is detected. If ``true``, it will also stop the caret if a character is part of ``!"#$%&'()*+,-./:;<=>?@[\]^`{|}~``, the Unicode General Punctuation table, or the Unicode CJK Punctuation table. Useful for subword moving. This behavior also will be applied to the behavior of text selection. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextEdit_property_virtual_keyboard_enabled: .. rst-class:: classref-property diff --git a/classes/class_textserver.rst b/classes/class_textserver.rst index 5c820c8c863..655d54c9d71 100644 --- a/classes/class_textserver.rst +++ b/classes/class_textserver.rst @@ -4164,8 +4164,9 @@ When ``chars_per_line`` is greater than zero, line break boundaries are returned :: var ts = TextServerManager.get_primary_interface() - print(ts.string_get_word_breaks("Godot Engine")) # Prints [0, 5, 6, 12] - print(ts.string_get_word_breaks("Godot Engine", "en", 5)) # Prints [0, 5, 6, 11, 11, 12] + print(ts.string_get_word_breaks("The Godot Engine, 4")) # Prints [0, 3, 4, 9, 10, 16, 18, 19], which corresponds to the following substrings: "The", "Godot", "Engine", "4" + print(ts.string_get_word_breaks("The Godot Engine, 4", "en", 5)) # Prints [0, 3, 4, 9, 10, 15, 15, 19], which corresponds to the following substrings: "The", "Godot", "Engin", "e, 4" + print(ts.string_get_word_breaks("The Godot Engine, 4", "en", 10)) # Prints [0, 9, 10, 19], which corresponds to the following substrings: "The Godot", "Engine, 4" .. rst-class:: classref-item-separator diff --git a/classes/class_transform3d.rst b/classes/class_transform3d.rst index d5b7f62265d..5c02673f09e 100644 --- a/classes/class_transform3d.rst +++ b/classes/class_transform3d.rst @@ -21,7 +21,7 @@ The **Transform3D** built-in :ref:`Variant` type is a 3×4 matrix For a general introduction, see the :doc:`Matrices and transforms <../tutorials/math/matrices_and_transforms>` tutorial. -\ **Note:** Godot uses a `right-handed coordinate system `__, which is a common standard. For directions, the convention for built-in types like :ref:`Camera3D` is for -Z to point forward (+X is right, +Y is up, and +Z is back). Other objects may use different direction conventions. For more information, see the `Importing 3D Scenes <../tutorials/assets_pipeline/importing_scenes.html#d-asset-direction-conventions>`__ tutorial. +\ **Note:** Godot uses a `right-handed coordinate system `__, which is a common standard. For directions, the convention for built-in types like :ref:`Camera3D` is for -Z to point forward (+X is right, +Y is up, and +Z is back). Other objects may use different direction conventions. For more information, see the `3D asset direction conventions <../tutorials/assets_pipeline/importing_3d_scenes/model_export_considerations.html#d-asset-direction-conventions>`__ tutorial. .. note:: diff --git a/classes/class_webxrinterface.rst b/classes/class_webxrinterface.rst index e99fd78f484..de4deb8f978 100644 --- a/classes/class_webxrinterface.rst +++ b/classes/class_webxrinterface.rst @@ -75,9 +75,10 @@ Here's the minimum code required to start an immersive VR session: # supported. webxr_interface.requested_reference_space_types = 'bounded-floor, local-floor, local' # In order to use 'local-floor' or 'bounded-floor' we must also - # mark the features as required or optional. + # mark the features as required or optional. By including 'hand-tracking' + # as an optional feature, it will be enabled if supported. webxr_interface.required_features = 'local-floor' - webxr_interface.optional_features = 'bounded-floor' + webxr_interface.optional_features = 'bounded-floor, hand-tracking' # This will return false if we're unable to even request the session, # however, it can still fail asynchronously later in the process, so we @@ -94,7 +95,10 @@ Here's the minimum code required to start an immersive VR session: # This will be the reference space type you ultimately got, out of the # types that you requested above. This is useful if you want the game to # work a little differently in 'bounded-floor' versus 'local-floor'. - print ("Reference space type: " + webxr_interface.reference_space_type) + print("Reference space type: ", webxr_interface.reference_space_type) + # This will be the list of features that were successfully enabled + # (except on browsers that don't support this property). + print("Enabled features: ", webxr_interface.enabled_features) func _webxr_session_ended(): $Button.visible = true @@ -419,7 +423,9 @@ Property Descriptions A comma-separated list of features that were successfully enabled by :ref:`XRInterface.initialize` when setting up the WebXR session. -This may include features requested by setting :ref:`required_features` and :ref:`optional_features`. +This may include features requested by setting :ref:`required_features` and :ref:`optional_features`, and will only be available after :ref:`session_started` has been emitted. + +\ **Note:** This may not be support by all web browsers, in which case it will be an empty string. .. rst-class:: classref-item-separator @@ -442,7 +448,7 @@ If a user's browser or device doesn't support one of the given features, initial This doesn't have any effect on the interface when already initialized. -Possible values come from `WebXR's XRReferenceSpaceType `__. If you want to use a particular reference space type, it must be listed in either :ref:`required_features` or :ref:`optional_features`. +Possible values come from `WebXR's XRReferenceSpaceType `__, or include other features like ``"hand-tracking"`` to enable hand tracking. .. rst-class:: classref-item-separator @@ -506,7 +512,7 @@ If a user's browser or device doesn't support one of the given features, initial This doesn't have any effect on the interface when already initialized. -Possible values come from `WebXR's XRReferenceSpaceType `__. If you want to use a particular reference space type, it must be listed in either :ref:`required_features` or :ref:`optional_features`. +Possible values come from `WebXR's XRReferenceSpaceType `__, or include other features like ``"hand-tracking"`` to enable hand tracking. .. rst-class:: classref-item-separator