diff --git a/classes/class_array.rst b/classes/class_array.rst index ea2f2783c8c..59b20226e3c 100644 --- a/classes/class_array.rst +++ b/classes/class_array.rst @@ -131,6 +131,8 @@ Methods +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`find`\ (\ what\: :ref:`Variant`, from\: :ref:`int` = 0\ ) |const| | +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`find_custom`\ (\ method\: :ref:`Callable`, from\: :ref:`int` = 0\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`front`\ (\ ) |const| | +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_typed_builtin`\ (\ ) |const| | @@ -183,6 +185,8 @@ Methods +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rfind`\ (\ what\: :ref:`Variant`, from\: :ref:`int` = -1\ ) |const| | +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rfind_custom`\ (\ method\: :ref:`Callable`, from\: :ref:`int` = -1\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`shuffle`\ (\ ) | +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`size`\ (\ ) |const| | @@ -639,6 +643,8 @@ Removes all elements from the array. This is equivalent to using :ref:`resize`. + .. rst-class:: classref-item-separator ---- @@ -749,6 +755,35 @@ Returns the index of the **first** occurrence of ``what`` in this array, or ``-1 \ **Note:** For performance reasons, the search is affected by ``what``'s :ref:`Variant.Type`. For example, ``7`` (:ref:`int`) and ``7.0`` (:ref:`float`) are not considered equal for this method. +.. rst-class:: classref-item-separator + +---- + +.. _class_Array_method_find_custom: + +.. rst-class:: classref-method + +:ref:`int` **find_custom**\ (\ method\: :ref:`Callable`, from\: :ref:`int` = 0\ ) |const| :ref:`šŸ”—` + +Returns the index of the **first** element in the array that causes ``method`` to return ``true``, or ``-1`` if there are none. The search's start can be specified with ``from``, continuing to the end of the array. + +\ ``method`` is a callable that takes an element of the array, and returns a :ref:`bool`. + +\ **Note:** If you just want to know whether the array contains *anything* that satisfies ``method``, use :ref:`any`. + + +.. tabs:: + + .. code-tab:: gdscript + + func is_even(number): + return number % 2 == 0 + + func _ready(): + print([1, 3, 4, 7].find_custom(is_even.bind())) # prints 2 + + + .. rst-class:: classref-item-separator ---- @@ -1129,6 +1164,19 @@ If :ref:`max` is not desirable, this method may also be func is_length_greater(a, b): return a.length() > b.length() +This method can also be used to count how many elements in an array satisfy a certain condition, similar to :ref:`count`: + +:: + + func is_even(number): + return number % 2 == 0 + + func _ready(): + var arr = [1, 2, 3, 4, 5] + # Increment count if it's even, else leaves count the same. + var even_count = arr.reduce(func(count, next): return count + 1 if is_even(next) else count, 0) + print(even_count) # Prints 2 + See also :ref:`map`, :ref:`filter`, :ref:`any` and :ref:`all`. .. rst-class:: classref-item-separator @@ -1193,6 +1241,18 @@ Returns the index of the **last** occurrence of ``what`` in this array, or ``-1` ---- +.. _class_Array_method_rfind_custom: + +.. rst-class:: classref-method + +:ref:`int` **rfind_custom**\ (\ method\: :ref:`Callable`, from\: :ref:`int` = -1\ ) |const| :ref:`šŸ”—` + +Returns the index of the **last** element of the array that causes ``method`` to return ``true``, or ``-1`` if there are none. The search's start can be specified with ``from``, continuing to the beginning of the array. This method is the reverse of :ref:`find_custom`. + +.. rst-class:: classref-item-separator + +---- + .. _class_Array_method_shuffle: .. rst-class:: classref-method @@ -1287,7 +1347,7 @@ Sorts the array in ascending order. The final order is dependent on the "less th Sorts the array using a custom :ref:`Callable`. -\ ``func`` is called as many times as necessary, receiving two array elements as arguments. The function should return ``true`` if the first element should be moved *behind* the second one, otherwise it should return ``false``. +\ ``func`` is called as many times as necessary, receiving two array elements as arguments. The function should return ``true`` if the first element should be moved *before* the second one, otherwise it should return ``false``. :: diff --git a/classes/class_astar2d.rst b/classes/class_astar2d.rst index 53cc0ac6835..0127c90824a 100644 --- a/classes/class_astar2d.rst +++ b/classes/class_astar2d.rst @@ -289,6 +289,8 @@ Returns an array with the IDs of the points that form the path found by AStar2D If there is no valid path to the target, and ``allow_partial_path`` is ``true``, returns a path to the point closest to the target that can be reached. +\ **Note:** When ``allow_partial_path`` is ``true`` and ``to_id`` is disabled the search may take an unusually long time to finish. + .. tabs:: @@ -420,6 +422,8 @@ If there is no valid path to the target, and ``allow_partial_path`` is ``true``, \ **Note:** This method is not thread-safe. If called from a :ref:`Thread`, it will return an empty array and will print an error message. +Additionally, when ``allow_partial_path`` is ``true`` and ``to_id`` is disabled the search may take an unusually long time to finish. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_astar3d.rst b/classes/class_astar3d.rst index ed2deb4c20d..6fbb98bc0a6 100644 --- a/classes/class_astar3d.rst +++ b/classes/class_astar3d.rst @@ -326,6 +326,8 @@ Returns an array with the IDs of the points that form the path found by AStar3D If there is no valid path to the target, and ``allow_partial_path`` is ``true``, returns a path to the point closest to the target that can be reached. +\ **Note:** When ``allow_partial_path`` is ``true`` and ``to_id`` is disabled the search may take an unusually long time to finish. + .. tabs:: @@ -455,6 +457,8 @@ If there is no valid path to the target, and ``allow_partial_path`` is ``true``, \ **Note:** This method is not thread-safe. If called from a :ref:`Thread`, it will return an empty array and will print an error message. +Additionally, when ``allow_partial_path`` is ``true`` and ``to_id`` is disabled the search may take an unusually long time to finish. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_astargrid2d.rst b/classes/class_astargrid2d.rst index b8835edaade..91a5427f25e 100644 --- a/classes/class_astargrid2d.rst +++ b/classes/class_astargrid2d.rst @@ -545,6 +545,8 @@ Returns an array with the IDs of the points that form the path found by AStar2D If there is no valid path to the target, and ``allow_partial_path`` is ``true``, returns a path to the point closest to the target that can be reached. +\ **Note:** When ``allow_partial_path`` is ``true`` and ``to_id`` is solid the search may take an unusually long time to finish. + .. rst-class:: classref-item-separator ---- @@ -573,6 +575,8 @@ If there is no valid path to the target, and ``allow_partial_path`` is ``true``, \ **Note:** This method is not thread-safe. If called from a :ref:`Thread`, it will return an empty array and will print an error message. +Additionally, when ``allow_partial_path`` is ``true`` and ``to_id`` is solid the search may take an unusually long time to finish. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_classdb.rst b/classes/class_classdb.rst index ff53168dc5a..2aaa48001bf 100644 --- a/classes/class_classdb.rst +++ b/classes/class_classdb.rst @@ -36,6 +36,8 @@ Methods +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`class_exists`\ (\ class\: :ref:`StringName`\ ) |const| | +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`APIType` | :ref:`class_get_api_type`\ (\ class\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`class_get_enum_constants`\ (\ class\: :ref:`StringName`, enum\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| | +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`class_get_enum_list`\ (\ class\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| | @@ -95,6 +97,61 @@ Methods .. rst-class:: classref-descriptions-group +Enumerations +------------ + +.. _enum_ClassDB_APIType: + +.. rst-class:: classref-enumeration + +enum **APIType**: :ref:`šŸ”—` + +.. _class_ClassDB_constant_API_CORE: + +.. rst-class:: classref-enumeration-constant + +:ref:`APIType` **API_CORE** = ``0`` + +Native Core class type. + +.. _class_ClassDB_constant_API_EDITOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`APIType` **API_EDITOR** = ``1`` + +Native Editor class type. + +.. _class_ClassDB_constant_API_EXTENSION: + +.. rst-class:: classref-enumeration-constant + +:ref:`APIType` **API_EXTENSION** = ``2`` + +GDExtension class type. + +.. _class_ClassDB_constant_API_EDITOR_EXTENSION: + +.. rst-class:: classref-enumeration-constant + +:ref:`APIType` **API_EDITOR_EXTENSION** = ``3`` + +GDExtension Editor class type. + +.. _class_ClassDB_constant_API_NONE: + +.. rst-class:: classref-enumeration-constant + +:ref:`APIType` **API_NONE** = ``4`` + +Unknown class type. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- @@ -134,6 +191,18 @@ Returns whether the specified ``class`` is available or not. ---- +.. _class_ClassDB_method_class_get_api_type: + +.. rst-class:: classref-method + +:ref:`APIType` **class_get_api_type**\ (\ class\: :ref:`StringName`\ ) |const| :ref:`šŸ”—` + +Returns the API type of ``class``. See :ref:`APIType`. + +.. rst-class:: classref-item-separator + +---- + .. _class_ClassDB_method_class_get_enum_constants: .. rst-class:: classref-method diff --git a/classes/class_compositoreffect.rst b/classes/class_compositoreffect.rst index 005d19cb172..e1a8d1dc7d1 100644 --- a/classes/class_compositoreffect.rst +++ b/classes/class_compositoreffect.rst @@ -119,7 +119,7 @@ The callback is called before our transparent rendering pass, but after our sky :ref:`EffectCallbackType` **EFFECT_CALLBACK_TYPE_POST_TRANSPARENT** = ``4`` -The callback is called after our transparent rendering pass, but before any build in post effects and output to our render target. +The callback is called after our transparent rendering pass, but before any built-in post-processing effects and output to our render target. .. _class_CompositorEffect_constant_EFFECT_CALLBACK_TYPE_MAX: diff --git a/classes/class_editorplugin.rst b/classes/class_editorplugin.rst index 3de1f7578b0..c58e443843a 100644 --- a/classes/class_editorplugin.rst +++ b/classes/class_editorplugin.rst @@ -1593,7 +1593,7 @@ Removes an import plugin registered by :ref:`add_import_plugin`\ ) :ref:`šŸ”—` -Removes an inspector plugin registered by :ref:`add_import_plugin` +Removes an inspector plugin registered by :ref:`add_inspector_plugin`. .. rst-class:: classref-item-separator diff --git a/classes/class_editorsettings.rst b/classes/class_editorsettings.rst index a00087a19f0..cd423a9861d 100644 --- a/classes/class_editorsettings.rst +++ b/classes/class_editorsettings.rst @@ -941,6 +941,8 @@ If ``true``, the Asset Library uses multiple threads for its HTTP requests. This If ``true``, automatically switches to the **Remote** scene tree when running the project from the editor. If ``false``, stays on the **Local** scene tree when running the project from the editor. +\ **Warning:** Enabling this setting can cause stuttering when running a project with a large amount of nodes (typically a few thousands of nodes or more), even if the editor window isn't focused. This is due to the remote scene tree being updated every second regardless of whether the editor is focused. + .. rst-class:: classref-item-separator ---- @@ -3681,7 +3683,7 @@ The default property name style to display in the Inspector dock. This style can If ``true``, add a margin around Array, Dictionary, and Resource Editors that are not already colored. -\ **Note:** If :ref:`interface/inspector/nested_color_mode` is set to **Containers & Resources** this parameter will have no effect since those editors will already be colored +\ **Note:** If :ref:`interface/inspector/nested_color_mode` is set to **Containers & Resources** this parameter will have no effect since those editors will already be colored. .. rst-class:: classref-item-separator diff --git a/classes/class_enginedebugger.rst b/classes/class_enginedebugger.rst index 28db4834587..4f038223c31 100644 --- a/classes/class_enginedebugger.rst +++ b/classes/class_enginedebugger.rst @@ -228,7 +228,7 @@ Returns ``true`` if the debugger is skipping breakpoints otherwise ``false``. |void| **line_poll**\ (\ ) :ref:`šŸ”—` -Forces a processing loop of debugger events. The purpose of this method is just processing events every now and then when the script might get too busy, so that bugs like infinite loops can be caught +Forces a processing loop of debugger events. The purpose of this method is just processing events every now and then when the script might get too busy, so that bugs like infinite loops can be caught. .. rst-class:: classref-item-separator diff --git a/classes/class_filedialog.rst b/classes/class_filedialog.rst index b61b1c59457..e12bc55fa96 100644 --- a/classes/class_filedialog.rst +++ b/classes/class_filedialog.rst @@ -52,6 +52,8 @@ Properties +---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`show_hidden_files` | ``false`` | +---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | size | ``Vector2i(640, 360)`` (overrides :ref:`Window`) | + +---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ | :ref:`String` | title | ``"Save a File"`` (overrides :ref:`Window`) | +---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`use_native_dialog` | ``false`` | diff --git a/classes/class_fontfile.rst b/classes/class_fontfile.rst index 740083a768b..ba3538fd43a 100644 --- a/classes/class_fontfile.rst +++ b/classes/class_fontfile.rst @@ -661,7 +661,7 @@ Removes all kerning overrides. |void| **clear_size_cache**\ (\ cache_index\: :ref:`int`\ ) :ref:`šŸ”—` -Removes all font sizes from the cache entry +Removes all font sizes from the cache entry. .. rst-class:: classref-item-separator diff --git a/classes/class_gltfdocumentextension.rst b/classes/class_gltfdocumentextension.rst index 8e846284b76..8f3ffb226fc 100644 --- a/classes/class_gltfdocumentextension.rst +++ b/classes/class_gltfdocumentextension.rst @@ -49,6 +49,8 @@ Methods +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`_export_post`\ (\ state\: :ref:`GLTFState`\ ) |virtual| | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_export_post_convert`\ (\ state\: :ref:`GLTFState`, root\: :ref:`Node`\ ) |virtual| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`_export_preflight`\ (\ state\: :ref:`GLTFState`, root\: :ref:`Node`\ ) |virtual| | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`_export_preserialize`\ (\ state\: :ref:`GLTFState`\ ) |virtual| | @@ -67,6 +69,8 @@ Methods +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`_import_post_parse`\ (\ state\: :ref:`GLTFState`\ ) |virtual| | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_import_pre_generate`\ (\ state\: :ref:`GLTFState`\ ) |virtual| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`_import_preflight`\ (\ state\: :ref:`GLTFState`, extensions\: :ref:`PackedStringArray`\ ) |virtual| | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`_parse_image_data`\ (\ state\: :ref:`GLTFState`, image_data\: :ref:`PackedByteArray`, mime_type\: :ref:`String`, ret_image\: :ref:`Image`\ ) |virtual| | @@ -97,7 +101,7 @@ Method Descriptions |void| **_convert_scene_node**\ (\ state\: :ref:`GLTFState`, gltf_node\: :ref:`GLTFNode`, scene_node\: :ref:`Node`\ ) |virtual| :ref:`šŸ”—` -Part of the export process. This method is run after :ref:`_export_preflight` and before :ref:`_export_preserialize`. +Part of the export process. This method is run after :ref:`_export_preflight` and before :ref:`_export_post_convert`. Runs when converting the data from a Godot scene node. This method can be used to process the Godot scene node data into a format that can be used by :ref:`_export_node`. @@ -133,6 +137,20 @@ This method can be used to modify the final JSON of the generated glTF file. ---- +.. _class_GLTFDocumentExtension_private_method__export_post_convert: + +.. rst-class:: classref-method + +:ref:`Error` **_export_post_convert**\ (\ state\: :ref:`GLTFState`, root\: :ref:`Node`\ ) |virtual| :ref:`šŸ”—` + +Part of the export process. This method is run after :ref:`_convert_scene_node` and before :ref:`_export_preserialize`. + +This method can be used to modify the converted node data structures before serialization with any additional data from the scene tree. + +.. rst-class:: classref-item-separator + +---- + .. _class_GLTFDocumentExtension_private_method__export_preflight: .. rst-class:: classref-method @@ -153,7 +171,7 @@ The return value is used to determine if this **GLTFDocumentExtension** instance :ref:`Error` **_export_preserialize**\ (\ state\: :ref:`GLTFState`\ ) |virtual| :ref:`šŸ”—` -Part of the export process. This method is run after :ref:`_convert_scene_node` and before :ref:`_get_saveable_image_formats`. +Part of the export process. This method is run after :ref:`_export_post_convert` and before :ref:`_get_saveable_image_formats`. This method can be used to alter the state before performing serialization. It runs every time when generating a buffer with :ref:`GLTFDocument.generate_buffer` or writing to the file system with :ref:`GLTFDocument.write_to_filesystem`. @@ -167,7 +185,7 @@ This method can be used to alter the state before performing serialization. It r :ref:`Node3D` **_generate_scene_node**\ (\ state\: :ref:`GLTFState`, gltf_node\: :ref:`GLTFNode`, scene_parent\: :ref:`Node`\ ) |virtual| :ref:`šŸ”—` -Part of the import process. This method is run after :ref:`_import_post_parse` and before :ref:`_import_node`. +Part of the import process. This method is run after :ref:`_import_pre_generate` and before :ref:`_import_node`. Runs when generating a Godot scene node from a GLTFNode. The returned node will be added to the scene tree. Multiple nodes can be generated in this step if they are added as a child of the returned node. @@ -251,9 +269,23 @@ This method can be used to modify the final Godot scene generated by the import :ref:`Error` **_import_post_parse**\ (\ state\: :ref:`GLTFState`\ ) |virtual| :ref:`šŸ”—` -Part of the import process. This method is run after :ref:`_parse_node_extensions` and before :ref:`_generate_scene_node`. +Part of the import process. This method is run after :ref:`_parse_node_extensions` and before :ref:`_import_pre_generate`. + +This method can be used to modify any of the data imported so far after parsing each node, but before generating the scene or any of its nodes. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFDocumentExtension_private_method__import_pre_generate: + +.. rst-class:: classref-method + +:ref:`Error` **_import_pre_generate**\ (\ state\: :ref:`GLTFState`\ ) |virtual| :ref:`šŸ”—` + +Part of the import process. This method is run after :ref:`_import_post_parse` and before :ref:`_generate_scene_node`. -This method can be used to modify any of the data imported so far after parsing, before generating the nodes and then running the final per-node import step. +This method can be used to modify or read from any of the processed data structures, before generating the nodes and then running the final per-node import step. .. rst-class:: classref-item-separator diff --git a/classes/class_gltfnode.rst b/classes/class_gltfnode.rst index 77459360253..8a51908c0ca 100644 --- a/classes/class_gltfnode.rst +++ b/classes/class_gltfnode.rst @@ -76,6 +76,8 @@ Methods .. table:: :widths: auto + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`append_child_index`\ (\ child_index\: :ref:`int`\ ) | +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`get_additional_data`\ (\ extension_name\: :ref:`StringName`\ ) | +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -319,6 +321,18 @@ The transform of the glTF node relative to its parent. This property is usually Method Descriptions ------------------- +.. _class_GLTFNode_method_append_child_index: + +.. rst-class:: classref-method + +|void| **append_child_index**\ (\ child_index\: :ref:`int`\ ) :ref:`šŸ”—` + +Appends the given child node index to the :ref:`children` array. + +.. rst-class:: classref-item-separator + +---- + .. _class_GLTFNode_method_get_additional_data: .. rst-class:: classref-method diff --git a/classes/class_gltfstate.rst b/classes/class_gltfstate.rst index 2cc29142e42..f05d7731428 100644 --- a/classes/class_gltfstate.rst +++ b/classes/class_gltfstate.rst @@ -80,87 +80,89 @@ Methods .. table:: :widths: auto - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`add_used_extension`\ (\ extension_name\: :ref:`String`, required\: :ref:`bool`\ ) | - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`append_data_to_buffers`\ (\ data\: :ref:`PackedByteArray`, deduplication\: :ref:`bool`\ ) | - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`GLTFAccessor`\] | :ref:`get_accessors`\ (\ ) | - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`get_additional_data`\ (\ extension_name\: :ref:`StringName`\ ) | - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AnimationPlayer` | :ref:`get_animation_player`\ (\ idx\: :ref:`int`\ ) | - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_animation_players_count`\ (\ idx\: :ref:`int`\ ) | - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`GLTFAnimation`\] | :ref:`get_animations`\ (\ ) | - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`GLTFBufferView`\] | :ref:`get_buffer_views`\ (\ ) | - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`GLTFCamera`\] | :ref:`get_cameras`\ (\ ) | - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_handle_binary_image`\ (\ ) | - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`Texture2D`\] | :ref:`get_images`\ (\ ) | - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`GLTFLight`\] | :ref:`get_lights`\ (\ ) | - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`Material`\] | :ref:`get_materials`\ (\ ) | - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`GLTFMesh`\] | :ref:`get_meshes`\ (\ ) | - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_node_index`\ (\ scene_node\: :ref:`Node`\ ) | - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`GLTFNode`\] | :ref:`get_nodes`\ (\ ) | - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node` | :ref:`get_scene_node`\ (\ idx\: :ref:`int`\ ) | - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`GLTFSkeleton`\] | :ref:`get_skeletons`\ (\ ) | - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`GLTFSkin`\] | :ref:`get_skins`\ (\ ) | - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`GLTFTextureSampler`\] | :ref:`get_texture_samplers`\ (\ ) | - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`GLTFTexture`\] | :ref:`get_textures`\ (\ ) | - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`String`\] | :ref:`get_unique_animation_names`\ (\ ) | - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`String`\] | :ref:`get_unique_names`\ (\ ) | - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_accessors`\ (\ accessors\: :ref:`Array`\[:ref:`GLTFAccessor`\]\ ) | - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_additional_data`\ (\ extension_name\: :ref:`StringName`, additional_data\: :ref:`Variant`\ ) | - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_animations`\ (\ animations\: :ref:`Array`\[:ref:`GLTFAnimation`\]\ ) | - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_buffer_views`\ (\ buffer_views\: :ref:`Array`\[:ref:`GLTFBufferView`\]\ ) | - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_cameras`\ (\ cameras\: :ref:`Array`\[:ref:`GLTFCamera`\]\ ) | - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_handle_binary_image`\ (\ method\: :ref:`int`\ ) | - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_images`\ (\ images\: :ref:`Array`\[:ref:`Texture2D`\]\ ) | - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_lights`\ (\ lights\: :ref:`Array`\[:ref:`GLTFLight`\]\ ) | - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_materials`\ (\ materials\: :ref:`Array`\[:ref:`Material`\]\ ) | - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_meshes`\ (\ meshes\: :ref:`Array`\[:ref:`GLTFMesh`\]\ ) | - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_nodes`\ (\ nodes\: :ref:`Array`\[:ref:`GLTFNode`\]\ ) | - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_skeletons`\ (\ skeletons\: :ref:`Array`\[:ref:`GLTFSkeleton`\]\ ) | - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_skins`\ (\ skins\: :ref:`Array`\[:ref:`GLTFSkin`\]\ ) | - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_texture_samplers`\ (\ texture_samplers\: :ref:`Array`\[:ref:`GLTFTextureSampler`\]\ ) | - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_textures`\ (\ textures\: :ref:`Array`\[:ref:`GLTFTexture`\]\ ) | - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_unique_animation_names`\ (\ unique_animation_names\: :ref:`Array`\[:ref:`String`\]\ ) | - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_unique_names`\ (\ unique_names\: :ref:`Array`\[:ref:`String`\]\ ) | - +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_used_extension`\ (\ extension_name\: :ref:`String`, required\: :ref:`bool`\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`append_data_to_buffers`\ (\ data\: :ref:`PackedByteArray`, deduplication\: :ref:`bool`\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`append_gltf_node`\ (\ gltf_node\: :ref:`GLTFNode`, godot_scene_node\: :ref:`Node`, parent_node_index\: :ref:`int`\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`GLTFAccessor`\] | :ref:`get_accessors`\ (\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_additional_data`\ (\ extension_name\: :ref:`StringName`\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AnimationPlayer` | :ref:`get_animation_player`\ (\ idx\: :ref:`int`\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_animation_players_count`\ (\ idx\: :ref:`int`\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`GLTFAnimation`\] | :ref:`get_animations`\ (\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`GLTFBufferView`\] | :ref:`get_buffer_views`\ (\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`GLTFCamera`\] | :ref:`get_cameras`\ (\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_handle_binary_image`\ (\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Texture2D`\] | :ref:`get_images`\ (\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`GLTFLight`\] | :ref:`get_lights`\ (\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Material`\] | :ref:`get_materials`\ (\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`GLTFMesh`\] | :ref:`get_meshes`\ (\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_node_index`\ (\ scene_node\: :ref:`Node`\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`GLTFNode`\] | :ref:`get_nodes`\ (\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node` | :ref:`get_scene_node`\ (\ idx\: :ref:`int`\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`GLTFSkeleton`\] | :ref:`get_skeletons`\ (\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`GLTFSkin`\] | :ref:`get_skins`\ (\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`GLTFTextureSampler`\] | :ref:`get_texture_samplers`\ (\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`GLTFTexture`\] | :ref:`get_textures`\ (\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`String`\] | :ref:`get_unique_animation_names`\ (\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`String`\] | :ref:`get_unique_names`\ (\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_accessors`\ (\ accessors\: :ref:`Array`\[:ref:`GLTFAccessor`\]\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_additional_data`\ (\ extension_name\: :ref:`StringName`, additional_data\: :ref:`Variant`\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_animations`\ (\ animations\: :ref:`Array`\[:ref:`GLTFAnimation`\]\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_buffer_views`\ (\ buffer_views\: :ref:`Array`\[:ref:`GLTFBufferView`\]\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_cameras`\ (\ cameras\: :ref:`Array`\[:ref:`GLTFCamera`\]\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_handle_binary_image`\ (\ method\: :ref:`int`\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_images`\ (\ images\: :ref:`Array`\[:ref:`Texture2D`\]\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_lights`\ (\ lights\: :ref:`Array`\[:ref:`GLTFLight`\]\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_materials`\ (\ materials\: :ref:`Array`\[:ref:`Material`\]\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_meshes`\ (\ meshes\: :ref:`Array`\[:ref:`GLTFMesh`\]\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_nodes`\ (\ nodes\: :ref:`Array`\[:ref:`GLTFNode`\]\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_skeletons`\ (\ skeletons\: :ref:`Array`\[:ref:`GLTFSkeleton`\]\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_skins`\ (\ skins\: :ref:`Array`\[:ref:`GLTFSkin`\]\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_texture_samplers`\ (\ texture_samplers\: :ref:`Array`\[:ref:`GLTFTextureSampler`\]\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_textures`\ (\ textures\: :ref:`Array`\[:ref:`GLTFTexture`\]\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_unique_animation_names`\ (\ unique_animation_names\: :ref:`Array`\[:ref:`String`\]\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_unique_names`\ (\ unique_names\: :ref:`Array`\[:ref:`String`\]\ ) | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -493,6 +495,22 @@ Appends the given byte array data to the buffers and creates a :ref:`GLTFBufferV ---- +.. _class_GLTFState_method_append_gltf_node: + +.. rst-class:: classref-method + +:ref:`int` **append_gltf_node**\ (\ gltf_node\: :ref:`GLTFNode`, godot_scene_node\: :ref:`Node`, parent_node_index\: :ref:`int`\ ) :ref:`šŸ”—` + +Append the given :ref:`GLTFNode` to the state, and return its new index. This can be used to export one Godot node as multiple glTF nodes, or inject new glTF nodes at import time. On import, this must be called before :ref:`GLTFDocumentExtension._generate_scene_node` finishes for the parent node. On export, this must be called before :ref:`GLTFDocumentExtension._export_node` runs for the parent node. + +The ``godot_scene_node`` parameter is the Godot scene node that corresponds to this glTF node. This is highly recommended to be set to a valid node, but may be null if there is no corresponding Godot scene node. One Godot scene node may be used for multiple glTF nodes, so if exporting multiple glTF nodes for one Godot scene node, use the same Godot scene node for each. + +The ``parent_node_index`` parameter is the index of the parent :ref:`GLTFNode` in the state. If ``-1``, the node will be a root node, otherwise the new node will be added to the parent's list of children. The index will also be written to the :ref:`GLTFNode.parent` property of the new node. + +.. rst-class:: classref-item-separator + +---- + .. _class_GLTFState_method_get_accessors: .. rst-class:: classref-method diff --git a/classes/class_inputevent.rst b/classes/class_inputevent.rst index a10d7c967d5..2cbe23ba733 100644 --- a/classes/class_inputevent.rst +++ b/classes/class_inputevent.rst @@ -266,6 +266,8 @@ Returns ``true`` if the specified ``event`` matches this event. Only valid for a If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref:`InputEventKey` and :ref:`InputEventMouseButton` events, and the direction for :ref:`InputEventJoypadMotion` events. +\ **Note:** Only considers the event configuration (such as the keyboard key or joypad axis), not state information like :ref:`is_pressed`, :ref:`is_released`, :ref:`is_echo`, or :ref:`is_canceled`. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_javascriptbridge.rst b/classes/class_javascriptbridge.rst index fe3546d0981..09d5a66000c 100644 --- a/classes/class_javascriptbridge.rst +++ b/classes/class_javascriptbridge.rst @@ -51,6 +51,10 @@ Methods +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`JavaScriptObject` | :ref:`get_interface`\ (\ interface\: :ref:`String`\ ) | +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_js_buffer`\ (\ javascript_object\: :ref:`JavaScriptObject`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`js_buffer_to_packed_byte_array`\ (\ javascript_buffer\: :ref:`JavaScriptObject`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`pwa_needs_update`\ (\ ) |const| | +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`pwa_update`\ (\ ) | @@ -164,6 +168,30 @@ Returns an interface to a JavaScript object that can be used by scripts. The ``i ---- +.. _class_JavaScriptBridge_method_is_js_buffer: + +.. rst-class:: classref-method + +:ref:`bool` **is_js_buffer**\ (\ javascript_object\: :ref:`JavaScriptObject`\ ) :ref:`šŸ”—` + +Returns ``true`` if the given ``javascript_object`` is of type `[code]ArrayBuffer[/code] `__, `[code]DataView[/code] `__, or one of the many `typed array objects `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_JavaScriptBridge_method_js_buffer_to_packed_byte_array: + +.. rst-class:: classref-method + +:ref:`PackedByteArray` **js_buffer_to_packed_byte_array**\ (\ javascript_buffer\: :ref:`JavaScriptObject`\ ) :ref:`šŸ”—` + +Returns a copy of ``javascript_buffer``'s contents as a :ref:`PackedByteArray`. See also :ref:`is_js_buffer`. + +.. rst-class:: classref-item-separator + +---- + .. _class_JavaScriptBridge_method_pwa_needs_update: .. rst-class:: classref-method diff --git a/classes/class_label.rst b/classes/class_label.rst index cfc6079901c..f1230f65431 100644 --- a/classes/class_label.rst +++ b/classes/class_label.rst @@ -503,7 +503,7 @@ Method Descriptions :ref:`Rect2` **get_character_bounds**\ (\ pos\: :ref:`int`\ ) |const| :ref:`šŸ”—` -Returns the bounding rectangle of the character at position ``pos``. If the character is a non-visual character or ``pos`` is outside the valid range, an empty :ref:`Rect2` is returned. If the character is a part of a composite grapheme, the bounding rectangle of the whole grapheme is returned. +Returns the bounding rectangle of the character at position ``pos`` in the label's local coordinate system. If the character is a non-visual character or ``pos`` is outside the valid range, an empty :ref:`Rect2` is returned. If the character is a part of a composite grapheme, the bounding rectangle of the whole grapheme is returned. .. rst-class:: classref-item-separator diff --git a/classes/class_lineedit.rst b/classes/class_lineedit.rst index 48fbe89c19b..0f16330c1d7 100644 --- a/classes/class_lineedit.rst +++ b/classes/class_lineedit.rst @@ -187,8 +187,12 @@ Methods +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_ime_text`\ (\ ) |const| | +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_redo`\ (\ ) |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_selection`\ (\ ) |const| | +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_undo`\ (\ ) |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`insert_text_at_caret`\ (\ text\: :ref:`String`\ ) | +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_editing`\ (\ ) |const| | @@ -1392,6 +1396,18 @@ Returns ``true`` if the user has text in the `Input Method Editor ` **has_redo**\ (\ ) |const| :ref:`šŸ”—` + +Returns ``true`` if a "redo" action is available. + +.. rst-class:: classref-item-separator + +---- + .. _class_LineEdit_method_has_selection: .. rst-class:: classref-method @@ -1404,6 +1420,18 @@ Returns ``true`` if the user has selected text. ---- +.. _class_LineEdit_method_has_undo: + +.. rst-class:: classref-method + +:ref:`bool` **has_undo**\ (\ ) |const| :ref:`šŸ”—` + +Returns ``true`` if an "undo" action is available. + +.. rst-class:: classref-item-separator + +---- + .. _class_LineEdit_method_insert_text_at_caret: .. rst-class:: classref-method diff --git a/classes/class_node.rst b/classes/class_node.rst index 7d01b701387..5fba3e48bfd 100644 --- a/classes/class_node.rst +++ b/classes/class_node.rst @@ -177,6 +177,8 @@ Methods +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_process_delta_time`\ (\ ) |const| | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_rpc_config`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`get_scene_instance_load_placeholder`\ (\ ) |const| | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`SceneTree` | :ref:`get_tree`\ (\ ) |const| | @@ -295,6 +297,8 @@ Methods +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_thread_safe`\ (\ property\: :ref:`StringName`, value\: :ref:`Variant`\ ) | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_translation_domain_inherited`\ (\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`update_configuration_warnings`\ (\ ) | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -2161,6 +2165,18 @@ Returns the time elapsed (in seconds) since the last process callback. This valu ---- +.. _class_Node_method_get_rpc_config: + +.. rst-class:: classref-method + +:ref:`Variant` **get_rpc_config**\ (\ ) |const| :ref:`šŸ”—` + +Returns a :ref:`Dictionary` mapping method names to their RPC configuration defined for this node using :ref:`rpc_config`. + +.. rst-class:: classref-item-separator + +---- + .. _class_Node_method_get_scene_instance_load_placeholder: .. rst-class:: classref-method @@ -2985,6 +3001,20 @@ Similar to :ref:`call_thread_safe`, but for ---- +.. _class_Node_method_set_translation_domain_inherited: + +.. rst-class:: classref-method + +|void| **set_translation_domain_inherited**\ (\ ) :ref:`šŸ”—` + +Makes this node inherit the translation domain from its parent node. If this node has no parent, the main translation domain will be used. + +This is the default behavior for all nodes. Calling :ref:`Object.set_translation_domain` disables this behavior. + +.. rst-class:: classref-item-separator + +---- + .. _class_Node_method_update_configuration_warnings: .. rst-class:: classref-method diff --git a/classes/class_object.rst b/classes/class_object.rst index cb05668ae90..7043c687915 100644 --- a/classes/class_object.rst +++ b/classes/class_object.rst @@ -139,6 +139,8 @@ Methods +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`get_signal_list`\ (\ ) |const| | +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_translation_domain`\ (\ ) |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_meta`\ (\ name\: :ref:`StringName`\ ) |const| | +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_method`\ (\ method\: :ref:`StringName`\ ) |const| | @@ -181,6 +183,8 @@ Methods +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_script`\ (\ script\: :ref:`Variant`\ ) | +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_translation_domain`\ (\ domain\: :ref:`StringName`\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`to_string`\ (\ ) | +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`tr`\ (\ message\: :ref:`StringName`, context\: :ref:`StringName` = &""\ ) |const| | @@ -289,7 +293,7 @@ Notification received when the object is initialized, before its script is attac **NOTIFICATION_PREDELETE** = ``1`` :ref:`šŸ”—` -Notification received when the object is about to be deleted. Can act as the deconstructor of some programming languages. +Notification received when the object is about to be deleted. Can be used like destructors in object-oriented programming languages. .. _class_Object_constant_NOTIFICATION_EXTENSION_RELOADED: @@ -1419,6 +1423,18 @@ Returns the list of existing signals as an :ref:`Array` of dictiona ---- +.. _class_Object_method_get_translation_domain: + +.. rst-class:: classref-method + +:ref:`StringName` **get_translation_domain**\ (\ ) |const| :ref:`šŸ”—` + +Returns the name of the translation domain used by :ref:`tr` and :ref:`tr_n`. See also :ref:`TranslationServer`. + +.. rst-class:: classref-item-separator + +---- + .. _class_Object_method_has_meta: .. rst-class:: classref-method @@ -1816,6 +1832,18 @@ If a script already exists, its instance is detached, and its property values an ---- +.. _class_Object_method_set_translation_domain: + +.. rst-class:: classref-method + +|void| **set_translation_domain**\ (\ domain\: :ref:`StringName`\ ) :ref:`šŸ”—` + +Sets the name of the translation domain used by :ref:`tr` and :ref:`tr_n`. See also :ref:`TranslationServer`. + +.. rst-class:: classref-item-separator + +---- + .. _class_Object_method_to_string: .. rst-class:: classref-method diff --git a/classes/class_projectsettings.rst b/classes/class_projectsettings.rst index c1e32050b11..5151c9a6b48 100644 --- a/classes/class_projectsettings.rst +++ b/classes/class_projectsettings.rst @@ -1541,6 +1541,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`rendering/rendering_device/fallback_to_d3d12` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/rendering_device/fallback_to_opengl3` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`rendering/rendering_device/fallback_to_vulkan` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`rendering/rendering_device/pipeline_cache/enable` | ``true`` | @@ -1599,6 +1601,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`rendering/textures/lossless_compression/force_png` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/textures/vram_compression/cache_gpu_compressor` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`rendering/textures/vram_compression/compress_with_gpu` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`rendering/textures/vram_compression/import_etc2_astc` | ``false`` | @@ -11352,6 +11356,20 @@ If ``true``, the forward renderer will fall back to Direct3D 12 if Vulkan is not ---- +.. _class_ProjectSettings_property_rendering/rendering_device/fallback_to_opengl3: + +.. rst-class:: classref-property + +:ref:`bool` **rendering/rendering_device/fallback_to_opengl3** = ``true`` :ref:`šŸ”—` + +If ``true``, the forward renderer will fall back to OpenGL 3 if both Direct3D 12, Metal and Vulkan are not supported. + +\ **Note:** This setting is implemented only on Windows, Android, macOS, iOS, and Linux/X11. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_rendering/rendering_device/fallback_to_vulkan: .. rst-class:: classref-property @@ -11756,17 +11774,29 @@ If ``true``, the texture importer will import lossless textures using the PNG fo ---- +.. _class_ProjectSettings_property_rendering/textures/vram_compression/cache_gpu_compressor: + +.. rst-class:: classref-property + +:ref:`bool` **rendering/textures/vram_compression/cache_gpu_compressor** = ``true`` :ref:`šŸ”—` + +If ``true``, the GPU texture compressor will cache the local RenderingDevice and its resources (shaders and pipelines), allowing for faster subsequent imports at a memory cost. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_rendering/textures/vram_compression/compress_with_gpu: .. rst-class:: classref-property :ref:`bool` **rendering/textures/vram_compression/compress_with_gpu** = ``true`` :ref:`šŸ”—` -If ``true``, the texture importer will utilize the GPU for compressing textures, which makes large textures import significantly faster. +If ``true``, the texture importer will utilize the GPU for compressing textures, improving the import time of large images. \ **Note:** This setting requires either Vulkan or D3D12 available as a rendering backend. -\ **Note:** Currently this only affects BC6H compression, which is used on Desktop and Console for HDR images. +\ **Note:** Currently this only affects BC1 and BC6H compression, which are used on Desktop and Console for fully opaque and HDR images respectively. .. rst-class:: classref-item-separator diff --git a/classes/class_rdpipelinedepthstencilstate.rst b/classes/class_rdpipelinedepthstencilstate.rst index cdbac617152..ed83f3b7d76 100644 --- a/classes/class_rdpipelinedepthstencilstate.rst +++ b/classes/class_rdpipelinedepthstencilstate.rst @@ -144,7 +144,7 @@ The operation to perform on the stencil buffer for back pixels that pass the ste - |void| **set_back_op_fail**\ (\ value\: :ref:`StencilOperation`\ ) - :ref:`StencilOperation` **get_back_op_fail**\ (\ ) -The operation to perform on the stencil buffer for back pixels that fail the stencil test +The operation to perform on the stencil buffer for back pixels that fail the stencil test. .. rst-class:: classref-item-separator diff --git a/classes/class_refcounted.rst b/classes/class_refcounted.rst index 755e1e8faca..bbbaac27d96 100644 --- a/classes/class_refcounted.rst +++ b/classes/class_refcounted.rst @@ -12,7 +12,7 @@ RefCounted **Inherits:** :ref:`Object` -**Inherited By:** :ref:`AESContext`, :ref:`AStar2D`, :ref:`AStar3D`, :ref:`AStarGrid2D`, :ref:`AudioEffectInstance`, :ref:`AudioSample`, :ref:`AudioSamplePlayback`, :ref:`AudioStreamPlayback`, :ref:`CameraFeed`, :ref:`CharFXTransform`, :ref:`ConfigFile`, :ref:`Crypto`, :ref:`DirAccess`, :ref:`DTLSServer`, :ref:`EditorContextMenuPlugin`, :ref:`EditorDebuggerPlugin`, :ref:`EditorDebuggerSession`, :ref:`EditorExportPlatform`, :ref:`EditorExportPlugin`, :ref:`EditorExportPreset`, :ref:`EditorFeatureProfile`, :ref:`EditorFileSystemImportFormatSupportQuery`, :ref:`EditorInspectorPlugin`, :ref:`EditorResourceConversionPlugin`, :ref:`EditorResourcePreviewGenerator`, :ref:`EditorResourceTooltipPlugin`, :ref:`EditorSceneFormatImporter`, :ref:`EditorScenePostImport`, :ref:`EditorScenePostImportPlugin`, :ref:`EditorScript`, :ref:`EditorTranslationParserPlugin`, :ref:`EncodedObjectAsID`, :ref:`ENetConnection`, :ref:`EngineProfiler`, :ref:`Expression`, :ref:`FileAccess`, :ref:`HashingContext`, :ref:`HMACContext`, :ref:`HTTPClient`, :ref:`ImageFormatLoader`, :ref:`JavaClass`, :ref:`JavaObject`, :ref:`JavaScriptObject`, :ref:`KinematicCollision2D`, :ref:`KinematicCollision3D`, :ref:`Lightmapper`, :ref:`MeshConvexDecompositionSettings`, :ref:`MeshDataTool`, :ref:`MultiplayerAPI`, :ref:`Mutex`, :ref:`NavigationPathQueryParameters2D`, :ref:`NavigationPathQueryParameters3D`, :ref:`NavigationPathQueryResult2D`, :ref:`NavigationPathQueryResult3D`, :ref:`Node3DGizmo`, :ref:`OggPacketSequencePlayback`, :ref:`OpenXRAPIExtension`, :ref:`PackedDataContainerRef`, :ref:`PacketPeer`, :ref:`PCKPacker`, :ref:`PhysicsPointQueryParameters2D`, :ref:`PhysicsPointQueryParameters3D`, :ref:`PhysicsRayQueryParameters2D`, :ref:`PhysicsRayQueryParameters3D`, :ref:`PhysicsShapeQueryParameters2D`, :ref:`PhysicsShapeQueryParameters3D`, :ref:`PhysicsTestMotionParameters2D`, :ref:`PhysicsTestMotionParameters3D`, :ref:`PhysicsTestMotionResult2D`, :ref:`PhysicsTestMotionResult3D`, :ref:`RandomNumberGenerator`, :ref:`RDAttachmentFormat`, :ref:`RDFramebufferPass`, :ref:`RDPipelineColorBlendState`, :ref:`RDPipelineColorBlendStateAttachment`, :ref:`RDPipelineDepthStencilState`, :ref:`RDPipelineMultisampleState`, :ref:`RDPipelineRasterizationState`, :ref:`RDPipelineSpecializationConstant`, :ref:`RDSamplerState`, :ref:`RDShaderSource`, :ref:`RDTextureFormat`, :ref:`RDTextureView`, :ref:`RDUniform`, :ref:`RDVertexAttribute`, :ref:`RegEx`, :ref:`RegExMatch`, :ref:`RenderSceneBuffers`, :ref:`RenderSceneBuffersConfiguration`, :ref:`Resource`, :ref:`ResourceFormatLoader`, :ref:`ResourceFormatSaver`, :ref:`ResourceImporter`, :ref:`SceneState`, :ref:`SceneTreeTimer`, :ref:`Semaphore`, :ref:`SkinReference`, :ref:`StreamPeer`, :ref:`SurfaceTool`, :ref:`TCPServer`, :ref:`TextLine`, :ref:`TextParagraph`, :ref:`TextServer`, :ref:`Thread`, :ref:`TLSOptions`, :ref:`TriangleMesh`, :ref:`Tween`, :ref:`Tweener`, :ref:`UDPServer`, :ref:`UPNP`, :ref:`UPNPDevice`, :ref:`WeakRef`, :ref:`WebRTCPeerConnection`, :ref:`XMLParser`, :ref:`XRInterface`, :ref:`XRPose`, :ref:`XRTracker`, :ref:`ZIPPacker`, :ref:`ZIPReader` +**Inherited By:** :ref:`AESContext`, :ref:`AStar2D`, :ref:`AStar3D`, :ref:`AStarGrid2D`, :ref:`AudioEffectInstance`, :ref:`AudioSample`, :ref:`AudioSamplePlayback`, :ref:`AudioStreamPlayback`, :ref:`CameraFeed`, :ref:`CharFXTransform`, :ref:`ConfigFile`, :ref:`Crypto`, :ref:`DirAccess`, :ref:`DTLSServer`, :ref:`EditorContextMenuPlugin`, :ref:`EditorDebuggerPlugin`, :ref:`EditorDebuggerSession`, :ref:`EditorExportPlatform`, :ref:`EditorExportPlugin`, :ref:`EditorExportPreset`, :ref:`EditorFeatureProfile`, :ref:`EditorFileSystemImportFormatSupportQuery`, :ref:`EditorInspectorPlugin`, :ref:`EditorResourceConversionPlugin`, :ref:`EditorResourcePreviewGenerator`, :ref:`EditorResourceTooltipPlugin`, :ref:`EditorSceneFormatImporter`, :ref:`EditorScenePostImport`, :ref:`EditorScenePostImportPlugin`, :ref:`EditorScript`, :ref:`EditorTranslationParserPlugin`, :ref:`EncodedObjectAsID`, :ref:`ENetConnection`, :ref:`EngineProfiler`, :ref:`Expression`, :ref:`FileAccess`, :ref:`HashingContext`, :ref:`HMACContext`, :ref:`HTTPClient`, :ref:`ImageFormatLoader`, :ref:`JavaClass`, :ref:`JavaObject`, :ref:`JavaScriptObject`, :ref:`KinematicCollision2D`, :ref:`KinematicCollision3D`, :ref:`Lightmapper`, :ref:`MeshConvexDecompositionSettings`, :ref:`MeshDataTool`, :ref:`MultiplayerAPI`, :ref:`Mutex`, :ref:`NavigationPathQueryParameters2D`, :ref:`NavigationPathQueryParameters3D`, :ref:`NavigationPathQueryResult2D`, :ref:`NavigationPathQueryResult3D`, :ref:`Node3DGizmo`, :ref:`OggPacketSequencePlayback`, :ref:`OpenXRAPIExtension`, :ref:`PackedDataContainerRef`, :ref:`PacketPeer`, :ref:`PCKPacker`, :ref:`PhysicsPointQueryParameters2D`, :ref:`PhysicsPointQueryParameters3D`, :ref:`PhysicsRayQueryParameters2D`, :ref:`PhysicsRayQueryParameters3D`, :ref:`PhysicsShapeQueryParameters2D`, :ref:`PhysicsShapeQueryParameters3D`, :ref:`PhysicsTestMotionParameters2D`, :ref:`PhysicsTestMotionParameters3D`, :ref:`PhysicsTestMotionResult2D`, :ref:`PhysicsTestMotionResult3D`, :ref:`RandomNumberGenerator`, :ref:`RDAttachmentFormat`, :ref:`RDFramebufferPass`, :ref:`RDPipelineColorBlendState`, :ref:`RDPipelineColorBlendStateAttachment`, :ref:`RDPipelineDepthStencilState`, :ref:`RDPipelineMultisampleState`, :ref:`RDPipelineRasterizationState`, :ref:`RDPipelineSpecializationConstant`, :ref:`RDSamplerState`, :ref:`RDShaderSource`, :ref:`RDTextureFormat`, :ref:`RDTextureView`, :ref:`RDUniform`, :ref:`RDVertexAttribute`, :ref:`RegEx`, :ref:`RegExMatch`, :ref:`RenderSceneBuffers`, :ref:`RenderSceneBuffersConfiguration`, :ref:`Resource`, :ref:`ResourceFormatLoader`, :ref:`ResourceFormatSaver`, :ref:`ResourceImporter`, :ref:`SceneState`, :ref:`SceneTreeTimer`, :ref:`Semaphore`, :ref:`SkinReference`, :ref:`StreamPeer`, :ref:`SurfaceTool`, :ref:`TCPServer`, :ref:`TextLine`, :ref:`TextParagraph`, :ref:`TextServer`, :ref:`Thread`, :ref:`TLSOptions`, :ref:`TranslationDomain`, :ref:`TriangleMesh`, :ref:`Tween`, :ref:`Tweener`, :ref:`UDPServer`, :ref:`UPNP`, :ref:`UPNPDevice`, :ref:`WeakRef`, :ref:`WebRTCPeerConnection`, :ref:`XMLParser`, :ref:`XRInterface`, :ref:`XRPose`, :ref:`XRTracker`, :ref:`ZIPPacker`, :ref:`ZIPReader` Base class for reference-counted objects. diff --git a/classes/class_renderingdevice.rst b/classes/class_renderingdevice.rst index ed49c2e2d6e..2ddbf90b608 100644 --- a/classes/class_renderingdevice.rst +++ b/classes/class_renderingdevice.rst @@ -6096,7 +6096,7 @@ Creates a shared texture using the specified ``view`` and the texture informatio :ref:`RID` **texture_create_shared_from_slice**\ (\ view\: :ref:`RDTextureView`, with_texture\: :ref:`RID`, layer\: :ref:`int`, mipmap\: :ref:`int`, mipmaps\: :ref:`int` = 1, slice_type\: :ref:`TextureSliceType` = 0\ ) :ref:`šŸ”—` -Creates a shared texture using the specified ``view`` and the texture information from ``with_texture``'s ``layer`` and ``mipmap``. The number of included mipmaps from the original texture can be controlled using the ``mipmaps`` parameter. Only relevant for textures with multiple layers, such as 3D textures, texture arrays and cubemaps. For single-layer textures, use :ref:`texture_create_shared`\ +Creates a shared texture using the specified ``view`` and the texture information from ``with_texture``'s ``layer`` and ``mipmap``. The number of included mipmaps from the original texture can be controlled using the ``mipmaps`` parameter. Only relevant for textures with multiple layers, such as 3D textures, texture arrays and cubemaps. For single-layer textures, use :ref:`texture_create_shared`. For 2D textures (which only have one layer), ``layer`` must be ``0``. diff --git a/classes/class_renderingserver.rst b/classes/class_renderingserver.rst index 7459a2980c3..906733780db 100644 --- a/classes/class_renderingserver.rst +++ b/classes/class_renderingserver.rst @@ -899,6 +899,8 @@ Methods +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`texture_3d_update`\ (\ texture\: :ref:`RID`, data\: :ref:`Array`\[:ref:`Image`\]\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`texture_create_from_native_handle`\ (\ type\: :ref:`TextureType`, format\: :ref:`Format`, native_handle\: :ref:`int`, width\: :ref:`int`, height\: :ref:`int`, depth\: :ref:`int`, layers\: :ref:`int` = 1, layered_type\: :ref:`TextureLayeredType` = 0\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Format` | :ref:`texture_get_format`\ (\ texture\: :ref:`RID`\ ) |const| | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`texture_get_native_handle`\ (\ texture\: :ref:`RID`, srgb\: :ref:`bool` = false\ ) |const| | @@ -1104,6 +1106,40 @@ Emitted at the beginning of the frame, before the RenderingServer updates all th Enumerations ------------ +.. _enum_RenderingServer_TextureType: + +.. rst-class:: classref-enumeration + +enum **TextureType**: :ref:`šŸ”—` + +.. _class_RenderingServer_constant_TEXTURE_TYPE_2D: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureType` **TEXTURE_TYPE_2D** = ``0`` + +2D texture. + +.. _class_RenderingServer_constant_TEXTURE_TYPE_LAYERED: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureType` **TEXTURE_TYPE_LAYERED** = ``1`` + +Layered texture. + +.. _class_RenderingServer_constant_TEXTURE_TYPE_3D: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureType` **TEXTURE_TYPE_3D** = ``2`` + +3D texture. + +.. rst-class:: classref-item-separator + +---- + .. _enum_RenderingServer_TextureLayeredType: .. rst-class:: classref-enumeration @@ -3864,7 +3900,7 @@ The callback is called before our transparent rendering pass, but after our sky :ref:`CompositorEffectCallbackType` **COMPOSITOR_EFFECT_CALLBACK_TYPE_POST_TRANSPARENT** = ``4`` -The callback is called after our transparent rendering pass, but before any build in post effects and output to our render target. +The callback is called after our transparent rendering pass, but before any built-in post-processing effects and output to our render target. .. _class_RenderingServer_constant_COMPOSITOR_EFFECT_CALLBACK_TYPE_ANY: @@ -11115,7 +11151,7 @@ Creates a placeholder for a 2-dimensional layered texture and adds it to the Ren :ref:`RID` **texture_2d_placeholder_create**\ (\ ) :ref:`šŸ”—` -Creates a placeholder for a 2-dimensional layered texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``texture_2d_layered_*`` RenderingServer functions, although it does nothing when used. See also :ref:`texture_2d_layered_placeholder_create`\ +Creates a placeholder for a 2-dimensional layered texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``texture_2d_layered_*`` RenderingServer functions, although it does nothing when used. See also :ref:`texture_2d_layered_placeholder_create`. Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid` method. @@ -11193,6 +11229,20 @@ Updates the texture specified by the ``texture`` :ref:`RID`'s data wi ---- +.. _class_RenderingServer_method_texture_create_from_native_handle: + +.. rst-class:: classref-method + +:ref:`RID` **texture_create_from_native_handle**\ (\ type\: :ref:`TextureType`, format\: :ref:`Format`, native_handle\: :ref:`int`, width\: :ref:`int`, height\: :ref:`int`, depth\: :ref:`int`, layers\: :ref:`int` = 1, layered_type\: :ref:`TextureLayeredType` = 0\ ) :ref:`šŸ”—` + +Creates a texture based on a native handle that was created outside of Godot's renderer. + +\ **Note:** If using the rendering device renderer, using :ref:`RenderingDevice.texture_create_from_extension` rather than this method is recommended. It will give you much more control over the texture's format and usage. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_texture_get_format: .. rst-class:: classref-method @@ -11428,7 +11478,7 @@ Returns the CPU time taken to render the last frame in milliseconds. This *only* :ref:`float` **viewport_get_measured_render_time_gpu**\ (\ viewport\: :ref:`RID`\ ) |const| :ref:`šŸ”—` -Returns the GPU time taken to render the last frame in milliseconds. To get a complete readout of GPU time spent to render the scene, sum the render times of all viewports that are drawn every frame. Unlike :ref:`Engine.get_frames_per_second`, this method accurately reflects GPU utilization even if framerate is capped via V-Sync or :ref:`Engine.max_fps`. See also :ref:`viewport_get_measured_render_time_gpu`. +Returns the GPU time taken to render the last frame in milliseconds. To get a complete readout of GPU time spent to render the scene, sum the render times of all viewports that are drawn every frame. Unlike :ref:`Engine.get_frames_per_second`, this method accurately reflects GPU utilization even if framerate is capped via V-Sync or :ref:`Engine.max_fps`. See also :ref:`viewport_get_measured_render_time_cpu`. \ **Note:** Requires measurements to be enabled on the specified ``viewport`` using :ref:`viewport_set_measure_render_time`. Otherwise, this method returns ``0.0``. diff --git a/classes/class_scenemultiplayer.rst b/classes/class_scenemultiplayer.rst index 385ea6b4d3f..c5045087fe0 100644 --- a/classes/class_scenemultiplayer.rst +++ b/classes/class_scenemultiplayer.rst @@ -174,7 +174,7 @@ The callback to execute when when receiving authentication data sent via :ref:`s - |void| **set_auth_timeout**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_auth_timeout**\ (\ ) -If set to a value greater than ``0.0``, the maximum amount of time peers can stay in the authenticating state, after which the authentication will automatically fail. See the :ref:`peer_authenticating` and :ref:`peer_authentication_failed` signals. +If set to a value greater than ``0.0``, the maximum duration in seconds peers can stay in the authenticating state, after which the authentication will automatically fail. See the :ref:`peer_authenticating` and :ref:`peer_authentication_failed` signals. .. rst-class:: classref-item-separator diff --git a/classes/class_script.rst b/classes/class_script.rst index ddb6b6145ea..afee8c99845 100644 --- a/classes/class_script.rst +++ b/classes/class_script.rst @@ -65,6 +65,8 @@ Methods +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`get_property_default_value`\ (\ property\: :ref:`StringName`\ ) | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_rpc_config`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Dictionary` | :ref:`get_script_constant_map`\ (\ ) | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`get_script_method_list`\ (\ ) | @@ -198,6 +200,18 @@ Returns the default value of the specified property. ---- +.. _class_Script_method_get_rpc_config: + +.. rst-class:: classref-method + +:ref:`Variant` **get_rpc_config**\ (\ ) |const| :ref:`šŸ”—` + +Returns a :ref:`Dictionary` mapping method names to their RPC configuration defined by this script. + +.. rst-class:: classref-item-separator + +---- + .. _class_Script_method_get_script_constant_map: .. rst-class:: classref-method diff --git a/classes/class_shortcut.rst b/classes/class_shortcut.rst index d8fdc0723cf..7d06b4bc86c 100644 --- a/classes/class_shortcut.rst +++ b/classes/class_shortcut.rst @@ -114,7 +114,7 @@ Returns whether :ref:`events` contains an :ref:` :ref:`bool` **matches_event**\ (\ event\: :ref:`InputEvent`\ ) |const| :ref:`šŸ”—` -Returns whether any :ref:`InputEvent` in :ref:`events` equals ``event``. +Returns whether any :ref:`InputEvent` in :ref:`events` equals ``event``. This uses :ref:`InputEvent.is_match` to compare events. .. |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_skeleton3d.rst b/classes/class_skeleton3d.rst index bd90a50ffac..b4599414f15 100644 --- a/classes/class_skeleton3d.rst +++ b/classes/class_skeleton3d.rst @@ -58,93 +58,101 @@ Methods .. table:: :widths: auto - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`add_bone`\ (\ name\: :ref:`String`\ ) | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`clear_bones`\ (\ ) | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`clear_bones_global_pose_override`\ (\ ) | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Skin` | :ref:`create_skin_from_rest_transforms`\ (\ ) | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`find_bone`\ (\ name\: :ref:`String`\ ) |const| | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`force_update_all_bone_transforms`\ (\ ) | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`force_update_bone_child_transform`\ (\ bone_idx\: :ref:`int`\ ) | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array` | :ref:`get_bone_children`\ (\ bone_idx\: :ref:`int`\ ) |const| | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_bone_count`\ (\ ) |const| | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`get_bone_global_pose`\ (\ bone_idx\: :ref:`int`\ ) |const| | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`get_bone_global_pose_no_override`\ (\ bone_idx\: :ref:`int`\ ) |const| | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`get_bone_global_pose_override`\ (\ bone_idx\: :ref:`int`\ ) |const| | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`get_bone_global_rest`\ (\ bone_idx\: :ref:`int`\ ) |const| | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_bone_name`\ (\ bone_idx\: :ref:`int`\ ) |const| | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_bone_parent`\ (\ bone_idx\: :ref:`int`\ ) |const| | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`get_bone_pose`\ (\ bone_idx\: :ref:`int`\ ) |const| | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_bone_pose_position`\ (\ bone_idx\: :ref:`int`\ ) |const| | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion` | :ref:`get_bone_pose_rotation`\ (\ bone_idx\: :ref:`int`\ ) |const| | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_bone_pose_scale`\ (\ bone_idx\: :ref:`int`\ ) |const| | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`get_bone_rest`\ (\ bone_idx\: :ref:`int`\ ) |const| | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName` | :ref:`get_concatenated_bone_names`\ (\ ) |const| | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array` | :ref:`get_parentless_bones`\ (\ ) |const| | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_version`\ (\ ) |const| | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_bone_enabled`\ (\ bone_idx\: :ref:`int`\ ) |const| | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`localize_rests`\ (\ ) | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`physical_bones_add_collision_exception`\ (\ exception\: :ref:`RID`\ ) | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`physical_bones_remove_collision_exception`\ (\ exception\: :ref:`RID`\ ) | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`physical_bones_start_simulation`\ (\ bones\: :ref:`Array`\[:ref:`StringName`\] = []\ ) | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`physical_bones_stop_simulation`\ (\ ) | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`SkinReference` | :ref:`register_skin`\ (\ skin\: :ref:`Skin`\ ) | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`reset_bone_pose`\ (\ bone_idx\: :ref:`int`\ ) | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`reset_bone_poses`\ (\ ) | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_bone_enabled`\ (\ bone_idx\: :ref:`int`, enabled\: :ref:`bool` = true\ ) | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_bone_global_pose`\ (\ bone_idx\: :ref:`int`, pose\: :ref:`Transform3D`\ ) | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_bone_global_pose_override`\ (\ bone_idx\: :ref:`int`, pose\: :ref:`Transform3D`, amount\: :ref:`float`, persistent\: :ref:`bool` = false\ ) | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_bone_name`\ (\ bone_idx\: :ref:`int`, name\: :ref:`String`\ ) | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_bone_parent`\ (\ bone_idx\: :ref:`int`, parent_idx\: :ref:`int`\ ) | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_bone_pose`\ (\ bone_idx\: :ref:`int`, pose\: :ref:`Transform3D`\ ) | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_bone_pose_position`\ (\ bone_idx\: :ref:`int`, position\: :ref:`Vector3`\ ) | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_bone_pose_rotation`\ (\ bone_idx\: :ref:`int`, rotation\: :ref:`Quaternion`\ ) | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_bone_pose_scale`\ (\ bone_idx\: :ref:`int`, scale\: :ref:`Vector3`\ ) | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_bone_rest`\ (\ bone_idx\: :ref:`int`, rest\: :ref:`Transform3D`\ ) | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`unparent_bone_and_rest`\ (\ bone_idx\: :ref:`int`\ ) | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`add_bone`\ (\ name\: :ref:`String`\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_bones`\ (\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_bones_global_pose_override`\ (\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Skin` | :ref:`create_skin_from_rest_transforms`\ (\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`find_bone`\ (\ name\: :ref:`String`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`force_update_all_bone_transforms`\ (\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`force_update_bone_child_transform`\ (\ bone_idx\: :ref:`int`\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_bone_children`\ (\ bone_idx\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_bone_count`\ (\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`get_bone_global_pose`\ (\ bone_idx\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`get_bone_global_pose_no_override`\ (\ bone_idx\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`get_bone_global_pose_override`\ (\ bone_idx\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`get_bone_global_rest`\ (\ bone_idx\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_bone_meta`\ (\ bone_idx\: :ref:`int`, key\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`StringName`\] | :ref:`get_bone_meta_list`\ (\ bone_idx\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_bone_name`\ (\ bone_idx\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_bone_parent`\ (\ bone_idx\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`get_bone_pose`\ (\ bone_idx\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_bone_pose_position`\ (\ bone_idx\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`get_bone_pose_rotation`\ (\ bone_idx\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_bone_pose_scale`\ (\ bone_idx\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`get_bone_rest`\ (\ bone_idx\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_concatenated_bone_names`\ (\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_parentless_bones`\ (\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_version`\ (\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_bone_meta`\ (\ bone_idx\: :ref:`int`, key\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_bone_enabled`\ (\ bone_idx\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`localize_rests`\ (\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`physical_bones_add_collision_exception`\ (\ exception\: :ref:`RID`\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`physical_bones_remove_collision_exception`\ (\ exception\: :ref:`RID`\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`physical_bones_start_simulation`\ (\ bones\: :ref:`Array`\[:ref:`StringName`\] = []\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`physical_bones_stop_simulation`\ (\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SkinReference` | :ref:`register_skin`\ (\ skin\: :ref:`Skin`\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reset_bone_pose`\ (\ bone_idx\: :ref:`int`\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reset_bone_poses`\ (\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bone_enabled`\ (\ bone_idx\: :ref:`int`, enabled\: :ref:`bool` = true\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bone_global_pose`\ (\ bone_idx\: :ref:`int`, pose\: :ref:`Transform3D`\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bone_global_pose_override`\ (\ bone_idx\: :ref:`int`, pose\: :ref:`Transform3D`, amount\: :ref:`float`, persistent\: :ref:`bool` = false\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bone_meta`\ (\ bone_idx\: :ref:`int`, key\: :ref:`StringName`, value\: :ref:`Variant`\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bone_name`\ (\ bone_idx\: :ref:`int`, name\: :ref:`String`\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bone_parent`\ (\ bone_idx\: :ref:`int`, parent_idx\: :ref:`int`\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bone_pose`\ (\ bone_idx\: :ref:`int`, pose\: :ref:`Transform3D`\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bone_pose_position`\ (\ bone_idx\: :ref:`int`, position\: :ref:`Vector3`\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bone_pose_rotation`\ (\ bone_idx\: :ref:`int`, rotation\: :ref:`Quaternion`\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bone_pose_scale`\ (\ bone_idx\: :ref:`int`, scale\: :ref:`Vector3`\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bone_rest`\ (\ bone_idx\: :ref:`int`, rest\: :ref:`Transform3D`\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`unparent_bone_and_rest`\ (\ bone_idx\: :ref:`int`\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -523,6 +531,30 @@ Returns the global rest transform for ``bone_idx``. ---- +.. _class_Skeleton3D_method_get_bone_meta: + +.. rst-class:: classref-method + +:ref:`Variant` **get_bone_meta**\ (\ bone_idx\: :ref:`int`, key\: :ref:`StringName`\ ) |const| :ref:`šŸ”—` + +Returns bone metadata for ``bone_idx`` with ``key``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Skeleton3D_method_get_bone_meta_list: + +.. rst-class:: classref-method + +:ref:`Array`\[:ref:`StringName`\] **get_bone_meta_list**\ (\ bone_idx\: :ref:`int`\ ) |const| :ref:`šŸ”—` + +Returns a list of all metadata keys for ``bone_idx``. + +.. rst-class:: classref-item-separator + +---- + .. _class_Skeleton3D_method_get_bone_name: .. rst-class:: classref-method @@ -653,6 +685,18 @@ Use for invalidating caches in IK solvers and other nodes which process bones. ---- +.. _class_Skeleton3D_method_has_bone_meta: + +.. rst-class:: classref-method + +:ref:`bool` **has_bone_meta**\ (\ bone_idx\: :ref:`int`, key\: :ref:`StringName`\ ) |const| :ref:`šŸ”—` + +Returns whether there exists any bone metadata for ``bone_idx`` with key ``key``. + +.. rst-class:: classref-item-separator + +---- + .. _class_Skeleton3D_method_is_bone_enabled: .. rst-class:: classref-method @@ -819,6 +863,18 @@ Sets the global pose transform, ``pose``, for the bone at ``bone_idx``. ---- +.. _class_Skeleton3D_method_set_bone_meta: + +.. rst-class:: classref-method + +|void| **set_bone_meta**\ (\ bone_idx\: :ref:`int`, key\: :ref:`StringName`, value\: :ref:`Variant`\ ) :ref:`šŸ”—` + +Sets bone metadata for ``bone_idx``, will set the ``key`` meta to ``value``. + +.. rst-class:: classref-item-separator + +---- + .. _class_Skeleton3D_method_set_bone_name: .. rst-class:: classref-method diff --git a/classes/class_softbody3d.rst b/classes/class_softbody3d.rst index 7c7125e2abd..eda33928a42 100644 --- a/classes/class_softbody3d.rst +++ b/classes/class_softbody3d.rst @@ -72,29 +72,29 @@ Methods .. table:: :widths: auto - +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`add_collision_exception_with`\ (\ body\: :ref:`Node`\ ) | - +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`PhysicsBody3D`\] | :ref:`get_collision_exceptions`\ (\ ) | - +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_collision_layer_value`\ (\ layer_number\: :ref:`int`\ ) |const| | - +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_collision_mask_value`\ (\ layer_number\: :ref:`int`\ ) |const| | - +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_physics_rid`\ (\ ) |const| | - +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_point_transform`\ (\ point_index\: :ref:`int`\ ) | - +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_point_pinned`\ (\ point_index\: :ref:`int`\ ) |const| | - +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`remove_collision_exception_with`\ (\ body\: :ref:`Node`\ ) | - +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_collision_layer_value`\ (\ layer_number\: :ref:`int`, value\: :ref:`bool`\ ) | - +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_collision_mask_value`\ (\ layer_number\: :ref:`int`, value\: :ref:`bool`\ ) | - +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_point_pinned`\ (\ point_index\: :ref:`int`, pinned\: :ref:`bool`, attachment_path\: :ref:`NodePath` = NodePath("")\ ) | - +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_collision_exception_with`\ (\ body\: :ref:`Node`\ ) | + +------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`PhysicsBody3D`\] | :ref:`get_collision_exceptions`\ (\ ) | + +------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_collision_layer_value`\ (\ layer_number\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_collision_mask_value`\ (\ layer_number\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_physics_rid`\ (\ ) |const| | + +------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_point_transform`\ (\ point_index\: :ref:`int`\ ) | + +------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_point_pinned`\ (\ point_index\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_collision_exception_with`\ (\ body\: :ref:`Node`\ ) | + +------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_collision_layer_value`\ (\ layer_number\: :ref:`int`, value\: :ref:`bool`\ ) | + +------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_collision_mask_value`\ (\ layer_number\: :ref:`int`, value\: :ref:`bool`\ ) | + +------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_point_pinned`\ (\ point_index\: :ref:`int`, pinned\: :ref:`bool`, attachment_path\: :ref:`NodePath` = NodePath(""), insert_at\: :ref:`int` = -1\ ) | + +------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -460,7 +460,7 @@ Based on ``value``, enables or disables the specified layer in the :ref:`collisi .. rst-class:: classref-method -|void| **set_point_pinned**\ (\ point_index\: :ref:`int`, pinned\: :ref:`bool`, attachment_path\: :ref:`NodePath` = NodePath("")\ ) :ref:`šŸ”—` +|void| **set_point_pinned**\ (\ point_index\: :ref:`int`, pinned\: :ref:`bool`, attachment_path\: :ref:`NodePath` = NodePath(""), insert_at\: :ref:`int` = -1\ ) :ref:`šŸ”—` Sets the pinned state of a surface vertex. When set to ``true``, the optional ``attachment_path`` can define a :ref:`Node3D` the pinned vertex will be attached to. diff --git a/classes/class_splitcontainer.rst b/classes/class_splitcontainer.rst index 1871031539d..4cad287c80e 100644 --- a/classes/class_splitcontainer.rst +++ b/classes/class_splitcontainer.rst @@ -38,15 +38,25 @@ Properties .. table:: :widths: auto - +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`collapsed` | ``false`` | - +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ - | :ref:`DraggerVisibility` | :ref:`dragger_visibility` | ``0`` | - +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ - | :ref:`int` | :ref:`split_offset` | ``0`` | - +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`vertical` | ``false`` | - +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`collapsed` | ``false`` | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`drag_area_highlight_in_editor` | ``false`` | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`drag_area_margin_begin` | ``0`` | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`drag_area_margin_end` | ``0`` | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`drag_area_offset` | ``0`` | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------+-----------+ + | :ref:`DraggerVisibility` | :ref:`dragger_visibility` | ``0`` | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`dragging_enabled` | ``true`` | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`split_offset` | ``0`` | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`vertical` | ``false`` | + +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group @@ -56,9 +66,11 @@ Methods .. table:: :widths: auto - +--------+---------------------------------------------------------------------------------+ - | |void| | :ref:`clamp_split_offset`\ (\ ) | - +--------+---------------------------------------------------------------------------------+ + +-------------------------------+---------------------------------------------------------------------------------------+ + | |void| | :ref:`clamp_split_offset`\ (\ ) | + +-------------------------------+---------------------------------------------------------------------------------------+ + | :ref:`Control` | :ref:`get_drag_area_control`\ (\ ) | + +-------------------------------+---------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -81,6 +93,8 @@ Theme Properties +-----------------------------------+-------------------------------------------------------------------------------------------+--------+ | :ref:`Texture2D` | :ref:`v_grabber` | | +-----------------------------------+-------------------------------------------------------------------------------------------+--------+ + | :ref:`StyleBox` | :ref:`split_bar_background` | | + +-----------------------------------+-------------------------------------------------------------------------------------------+--------+ .. rst-class:: classref-section-separator @@ -91,6 +105,30 @@ Theme Properties Signals ------- +.. _class_SplitContainer_signal_drag_ended: + +.. rst-class:: classref-signal + +**drag_ended**\ (\ ) :ref:`šŸ”—` + +Emitted when the user ends dragging. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SplitContainer_signal_drag_started: + +.. rst-class:: classref-signal + +**drag_started**\ (\ ) :ref:`šŸ”—` + +Emitted when the user starts dragging. + +.. rst-class:: classref-item-separator + +---- + .. _class_SplitContainer_signal_dragged: .. rst-class:: classref-signal @@ -120,7 +158,11 @@ enum **DraggerVisibility**: :ref:`šŸ”—` :ref:`DraggerVisibility` **DRAGGER_VISIBLE** = ``0`` -The split dragger is visible when the cursor hovers it. +The split dragger icon is always visible when :ref:`autohide` is ``false``, otherwise visible only when the cursor hovers it. + +The size of the grabber icon determines the minimum :ref:`separation`. + +The dragger icon is automatically hidden if the length of the grabber icon is longer than the split bar. .. _class_SplitContainer_constant_DRAGGER_HIDDEN: @@ -128,7 +170,9 @@ The split dragger is visible when the cursor hovers it. :ref:`DraggerVisibility` **DRAGGER_HIDDEN** = ``1`` -The split dragger is never visible. +The split dragger icon is never visible regardless of the value of :ref:`autohide`. + +The size of the grabber icon determines the minimum :ref:`separation`. .. _class_SplitContainer_constant_DRAGGER_HIDDEN_COLLAPSED: @@ -136,7 +180,7 @@ The split dragger is never visible. :ref:`DraggerVisibility` **DRAGGER_HIDDEN_COLLAPSED** = ``2`` -The split dragger is never visible and its space collapsed. +The split dragger icon is not visible, and the split bar is collapsed to zero thickness. .. rst-class:: classref-section-separator @@ -164,6 +208,74 @@ If ``true``, the area of the first :ref:`Control` will be collaps ---- +.. _class_SplitContainer_property_drag_area_highlight_in_editor: + +.. rst-class:: classref-property + +:ref:`bool` **drag_area_highlight_in_editor** = ``false`` :ref:`šŸ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_drag_area_highlight_in_editor**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_drag_area_highlight_in_editor_enabled**\ (\ ) + +Highlights the drag area :ref:`Rect2` so you can see where it is during development. The drag area is gold if :ref:`dragging_enabled` is ``true``, and red if ``false``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SplitContainer_property_drag_area_margin_begin: + +.. rst-class:: classref-property + +:ref:`int` **drag_area_margin_begin** = ``0`` :ref:`šŸ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_drag_area_margin_begin**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_drag_area_margin_begin**\ (\ ) + +Reduces the size of the drag area and split bar :ref:`split_bar_background` at the beginning of the container. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SplitContainer_property_drag_area_margin_end: + +.. rst-class:: classref-property + +:ref:`int` **drag_area_margin_end** = ``0`` :ref:`šŸ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_drag_area_margin_end**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_drag_area_margin_end**\ (\ ) + +Reduces the size of the drag area and split bar :ref:`split_bar_background` at the end of the container. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SplitContainer_property_drag_area_offset: + +.. rst-class:: classref-property + +:ref:`int` **drag_area_offset** = ``0`` :ref:`šŸ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_drag_area_offset**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_drag_area_offset**\ (\ ) + +Shifts the drag area in the axis of the container to prevent the drag area from overlapping the :ref:`ScrollBar` or other selectable :ref:`Control` of a child node. + +.. rst-class:: classref-item-separator + +---- + .. _class_SplitContainer_property_dragger_visibility: .. rst-class:: classref-property @@ -175,7 +287,24 @@ If ``true``, the area of the first :ref:`Control` will be collaps - |void| **set_dragger_visibility**\ (\ value\: :ref:`DraggerVisibility`\ ) - :ref:`DraggerVisibility` **get_dragger_visibility**\ (\ ) -Determines the dragger's visibility. See :ref:`DraggerVisibility` for details. +Determines the dragger's visibility. See :ref:`DraggerVisibility` for details. This property does not determine whether dragging is enabled or not. Use :ref:`dragging_enabled` for that. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SplitContainer_property_dragging_enabled: + +.. rst-class:: classref-property + +:ref:`bool` **dragging_enabled** = ``true`` :ref:`šŸ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_dragging_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_dragging_enabled**\ (\ ) + +Enables or disables split dragging. .. rst-class:: classref-item-separator @@ -230,6 +359,26 @@ Method Descriptions Clamps the :ref:`split_offset` value to not go outside the currently possible minimal and maximum values. +.. rst-class:: classref-item-separator + +---- + +.. _class_SplitContainer_method_get_drag_area_control: + +.. rst-class:: classref-method + +:ref:`Control` **get_drag_area_control**\ (\ ) :ref:`šŸ”—` + +Returns the drag area :ref:`Control`. For example, you can move a pre-configured button into the drag area :ref:`Control` so that it rides along with the split bar. Try setting the :ref:`Button` anchors to ``center`` prior to the ``reparent()`` call. + +:: + + $BarnacleButton.reparent($SplitContainer.get_drag_area_control()) + +\ **Note:** The drag area :ref:`Control` is drawn over the **SplitContainer**'s children, so :ref:`CanvasItem` draw objects called from the :ref:`Control` and children added to the :ref:`Control` will also appear over the **SplitContainer**'s children. Try setting :ref:`Control.mouse_filter` of custom children to :ref:`Control.MOUSE_FILTER_IGNORE` to prevent blocking the mouse from dragging if desired. + +\ **Warning:** This is a required internal node, removing and freeing it may cause a crash. + .. rst-class:: classref-section-separator ---- @@ -245,7 +394,7 @@ Theme Property Descriptions :ref:`int` **autohide** = ``1`` :ref:`šŸ”—` -Boolean value. If 1 (``true``), the grabber will hide automatically when it isn't under the cursor. If 0 (``false``), it's always visible. +Boolean value. If ``1`` (``true``), the grabber will hide automatically when it isn't under the cursor. If ``0`` (``false``), it's always visible. The :ref:`dragger_visibility` must be :ref:`DRAGGER_VISIBLE`. .. rst-class:: classref-item-separator @@ -257,7 +406,7 @@ Boolean value. If 1 (``true``), the grabber will hide automatically when it isn' :ref:`int` **minimum_grab_thickness** = ``6`` :ref:`šŸ”—` -The minimum thickness of the area users can click on to grab the splitting line. If :ref:`separation` or :ref:`h_grabber` / :ref:`v_grabber`'s thickness are too small, this ensure that the splitting line can still be dragged. +The minimum thickness of the area users can click on to grab the split bar. This ensures that the split bar can still be dragged if :ref:`separation` or :ref:`h_grabber` / :ref:`v_grabber`'s size is too narrow to easily select. .. rst-class:: classref-item-separator @@ -269,7 +418,9 @@ The minimum thickness of the area users can click on to grab the splitting line. :ref:`int` **separation** = ``12`` :ref:`šŸ”—` -The space between sides of the container. +The split bar thickness, i.e., the gap between the two children of the container. This is overridden by the size of the grabber icon if :ref:`dragger_visibility` is set to :ref:`DRAGGER_VISIBLE`, or :ref:`DRAGGER_HIDDEN`, and :ref:`separation` is smaller than the size of the grabber icon in the same axis. + +\ **Note:** To obtain :ref:`separation` values less than the size of the grabber icon, for example a ``1 px`` hairline, set :ref:`h_grabber` or :ref:`v_grabber` to a new :ref:`ImageTexture`, which effectively sets the grabber icon size to ``0 px``. .. rst-class:: classref-item-separator @@ -307,6 +458,18 @@ The icon used for the grabber drawn in the middle area when :ref:`vertical` is ``true``. +.. rst-class:: classref-item-separator + +---- + +.. _class_SplitContainer_theme_style_split_bar_background: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **split_bar_background** :ref:`šŸ”—` + +Determines the background of the split bar if its thickness is greater than zero. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_string.rst b/classes/class_string.rst index 9039a710fe8..dd13ac0f7f5 100644 --- a/classes/class_string.rst +++ b/classes/class_string.rst @@ -21,7 +21,7 @@ This is the built-in string Variant type (and the one used by GDScript). Strings Some string methods have corresponding variations. Variations suffixed with ``n`` (:ref:`countn`, :ref:`findn`, :ref:`replacen`, etc.) are **case-insensitive** (they make no distinction between uppercase and lowercase letters). Method variations prefixed with ``r`` (:ref:`rfind`, :ref:`rsplit`, etc.) are reversed, and start from the end of the string, instead of the beginning. -\ **Note:** In a boolean context, a string will evaluate to ``false`` if it is empty (``""``). Otherwise, a string will always evaluate to ``true``. The ``not`` operator cannot be used. Instead, :ref:`is_empty` should be used to check for empty strings. +\ **Note:** In a boolean context, a string will evaluate to ``false`` if it is empty (``""``). Otherwise, a string will always evaluate to ``true``. .. note:: diff --git a/classes/class_stringname.rst b/classes/class_stringname.rst index 401fa86b7b5..3747b761536 100644 --- a/classes/class_stringname.rst +++ b/classes/class_stringname.rst @@ -27,7 +27,7 @@ All of :ref:`String`'s methods are available in this class too. Th \ **Note:** In C#, an explicit conversion to ``System.String`` is required to use the methods listed on this page. Use the ``ToString()`` method to cast a **StringName** to a string, and then use the equivalent methods in ``System.String`` or ``StringExtensions``. -\ **Note:** In a boolean context, a **StringName** will evaluate to ``false`` if it is empty (``StringName("")``). Otherwise, a **StringName** will always evaluate to ``true``. The ``not`` operator cannot be used. Instead, :ref:`is_empty` should be used to check for empty **StringName**\ s. +\ **Note:** In a boolean context, a **StringName** will evaluate to ``false`` if it is empty (``StringName("")``). Otherwise, a **StringName** will always evaluate to ``true``. .. note:: diff --git a/classes/class_surfacetool.rst b/classes/class_surfacetool.rst index a75b5defb59..34312b8ecf7 100644 --- a/classes/class_surfacetool.rst +++ b/classes/class_surfacetool.rst @@ -611,7 +611,7 @@ Specifies a normal to use for the *next* vertex. If every vertex needs to have t Set to :ref:`SKIN_8_WEIGHTS` to indicate that up to 8 bone influences per vertex may be used. -By default, only 4 bone influences are used (:ref:`SKIN_4_WEIGHTS`) +By default, only 4 bone influences are used (:ref:`SKIN_4_WEIGHTS`). \ **Note:** This function takes an enum, not the exact number of weights. diff --git a/classes/class_textedit.rst b/classes/class_textedit.rst index ad8f4780551..9b5d5859749 100644 --- a/classes/class_textedit.rst +++ b/classes/class_textedit.rst @@ -1699,7 +1699,9 @@ Set additional options for BiDi override. - |void| **set_syntax_highlighter**\ (\ value\: :ref:`SyntaxHighlighter`\ ) - :ref:`SyntaxHighlighter` **get_syntax_highlighter**\ (\ ) -Sets the :ref:`SyntaxHighlighter` to use. +The syntax highlighter to use. + +\ **Note:** A :ref:`SyntaxHighlighter` instance should not be used across multiple **TextEdit** nodes. .. rst-class:: classref-item-separator diff --git a/classes/class_textserver.rst b/classes/class_textserver.rst index cd8c968acb0..edc7de09559 100644 --- a/classes/class_textserver.rst +++ b/classes/class_textserver.rst @@ -4159,7 +4159,7 @@ Returns array of the composite character boundaries. :: var ts = TextServerManager.get_primary_interface() - print(ts.string_get_word_breaks("Test ā¤ļøā€šŸ”„ Test")) # Prints [1, 2, 3, 4, 5, 9, 10, 11, 12, 13, 14] + print(ts.string_get_character_breaks("Test ā¤ļøā€šŸ”„ Test")) # Prints [1, 2, 3, 4, 5, 9, 10, 11, 12, 13, 14] .. rst-class:: classref-item-separator diff --git a/classes/class_translationdomain.rst b/classes/class_translationdomain.rst new file mode 100644 index 00000000000..10cfaa5b6d7 --- /dev/null +++ b/classes/class_translationdomain.rst @@ -0,0 +1,134 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/TranslationDomain.xml. + +.. _class_TranslationDomain: + +TranslationDomain +================= + +**Inherits:** :ref:`RefCounted` **<** :ref:`Object` + +A self-contained collection of :ref:`Translation` resources. + +.. rst-class:: classref-introduction-group + +Description +----------- + +**TranslationDomain** is a self-contained collection of :ref:`Translation` resources. Translations can be added to or removed from it. + +If you're working with the main translation domain, it is more convenient to use the wrap methods on :ref:`TranslationServer`. + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_translation`\ (\ translation\: :ref:`Translation`\ ) | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear`\ (\ ) | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Translation` | :ref:`get_translation_object`\ (\ locale\: :ref:`String`\ ) |const| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_translation`\ (\ translation\: :ref:`Translation`\ ) | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`translate`\ (\ message\: :ref:`StringName`, context\: :ref:`StringName` = &""\ ) |const| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`translate_plural`\ (\ message\: :ref:`StringName`, message_plural\: :ref:`StringName`, n\: :ref:`int`, context\: :ref:`StringName` = &""\ ) |const| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_TranslationDomain_method_add_translation: + +.. rst-class:: classref-method + +|void| **add_translation**\ (\ translation\: :ref:`Translation`\ ) :ref:`šŸ”—` + +Adds a translation. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TranslationDomain_method_clear: + +.. rst-class:: classref-method + +|void| **clear**\ (\ ) :ref:`šŸ”—` + +Removes all translations. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TranslationDomain_method_get_translation_object: + +.. rst-class:: classref-method + +:ref:`Translation` **get_translation_object**\ (\ locale\: :ref:`String`\ ) |const| :ref:`šŸ”—` + +Returns the :ref:`Translation` instance that best matches ``locale``. Returns ``null`` if there are no matches. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TranslationDomain_method_remove_translation: + +.. rst-class:: classref-method + +|void| **remove_translation**\ (\ translation\: :ref:`Translation`\ ) :ref:`šŸ”—` + +Removes the given translation. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TranslationDomain_method_translate: + +.. rst-class:: classref-method + +:ref:`StringName` **translate**\ (\ message\: :ref:`StringName`, context\: :ref:`StringName` = &""\ ) |const| :ref:`šŸ”—` + +Returns the current locale's translation for the given message and context. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TranslationDomain_method_translate_plural: + +.. rst-class:: classref-method + +:ref:`StringName` **translate_plural**\ (\ message\: :ref:`StringName`, message_plural\: :ref:`StringName`, n\: :ref:`int`, context\: :ref:`StringName` = &""\ ) |const| :ref:`šŸ”—` + +Returns the current locale's translation for the given message, plural message and context. + +The number ``n`` is the number or quantity of the plural object. It will be used to guide the translation system to fetch the correct plural form for the selected language. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_translationserver.rst b/classes/class_translationserver.rst index e7fc35236ef..c49d161f8d5 100644 --- a/classes/class_translationserver.rst +++ b/classes/class_translationserver.rst @@ -19,7 +19,9 @@ The server responsible for language translations. Description ----------- -The server that manages all language translations. Translations can be added to or removed from it. +The translation server is the API backend that manages all language translations. + +Translations are stored in :ref:`TranslationDomain`\ s, which can be accessed by name. The most commonly used translation domain is the main translation domain. It always exists and can be accessed using an empty :ref:`StringName`. The translation server provides wrapper methods for accessing the main translation domain directly, without having to fetch the translation domain first. Custom translation domains are mainly for advanced usages like editor plugins. Names starting with ``godot.`` are reserved for engine internals. .. rst-class:: classref-introduction-group @@ -73,16 +75,22 @@ Methods +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_locale_name`\ (\ locale\: :ref:`String`\ ) |const| | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TranslationDomain` | :ref:`get_or_add_domain`\ (\ domain\: :ref:`StringName`\ ) | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_script_name`\ (\ script\: :ref:`String`\ ) |const| | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_tool_locale`\ (\ ) | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Translation` | :ref:`get_translation_object`\ (\ locale\: :ref:`String`\ ) | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_domain`\ (\ domain\: :ref:`StringName`\ ) |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`StringName` | :ref:`pseudolocalize`\ (\ message\: :ref:`StringName`\ ) |const| | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`reload_pseudolocalization`\ (\ ) | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_domain`\ (\ domain\: :ref:`StringName`\ ) | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`remove_translation`\ (\ translation\: :ref:`Translation`\ ) | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_locale`\ (\ locale\: :ref:`String`\ ) | @@ -131,7 +139,7 @@ Method Descriptions |void| **add_translation**\ (\ translation\: :ref:`Translation`\ ) :ref:`šŸ”—` -Adds a :ref:`Translation` resource. +Adds a translation to the main translation domain. .. rst-class:: classref-item-separator @@ -143,7 +151,7 @@ Adds a :ref:`Translation` resource. |void| **clear**\ (\ ) :ref:`šŸ”—` -Clears the server from all translations. +Removes all translations from the main translation domain. .. rst-class:: classref-item-separator @@ -259,6 +267,18 @@ Returns a locale's language and its variant (e.g. ``"en_US"`` would return ``"En ---- +.. _class_TranslationServer_method_get_or_add_domain: + +.. rst-class:: classref-method + +:ref:`TranslationDomain` **get_or_add_domain**\ (\ domain\: :ref:`StringName`\ ) :ref:`šŸ”—` + +Returns the translation domain with the specified name. An empty translation domain will be created and added if it does not exist. + +.. rst-class:: classref-item-separator + +---- + .. _class_TranslationServer_method_get_script_name: .. rst-class:: classref-method @@ -291,9 +311,19 @@ Returns the current locale of the editor. :ref:`Translation` **get_translation_object**\ (\ locale\: :ref:`String`\ ) :ref:`šŸ”—` -Returns the :ref:`Translation` instance based on the ``locale`` passed in. +Returns the :ref:`Translation` instance that best matches ``locale`` in the main translation domain. Returns ``null`` if there are no matches. + +.. rst-class:: classref-item-separator + +---- -It will return ``null`` if there is no :ref:`Translation` instance that matches the ``locale``. +.. _class_TranslationServer_method_has_domain: + +.. rst-class:: classref-method + +:ref:`bool` **has_domain**\ (\ domain\: :ref:`StringName`\ ) |const| :ref:`šŸ”—` + +Returns ``true`` if a translation domain with the specified name exists. .. rst-class:: classref-item-separator @@ -323,13 +353,27 @@ Reparses the pseudolocalization options and reloads the translation. ---- +.. _class_TranslationServer_method_remove_domain: + +.. rst-class:: classref-method + +|void| **remove_domain**\ (\ domain\: :ref:`StringName`\ ) :ref:`šŸ”—` + +Removes the translation domain with the specified name. + +\ **Note:** Trying to remove the main translation domain is an error. + +.. rst-class:: classref-item-separator + +---- + .. _class_TranslationServer_method_remove_translation: .. rst-class:: classref-method |void| **remove_translation**\ (\ translation\: :ref:`Translation`\ ) :ref:`šŸ”—` -Removes the given translation from the server. +Removes the given translation from the main translation domain. .. rst-class:: classref-item-separator @@ -367,7 +411,9 @@ Returns a ``locale`` string standardized to match known locales (e.g. ``en-US`` :ref:`StringName` **translate**\ (\ message\: :ref:`StringName`, context\: :ref:`StringName` = &""\ ) |const| :ref:`šŸ”—` -Returns the current locale's translation for the given message (key) and context. +Returns the current locale's translation for the given message and context. + +\ **Note:** This method always uses the main translation domain. .. rst-class:: classref-item-separator @@ -379,10 +425,12 @@ Returns the current locale's translation for the given message (key) and context :ref:`StringName` **translate_plural**\ (\ message\: :ref:`StringName`, plural_message\: :ref:`StringName`, n\: :ref:`int`, context\: :ref:`StringName` = &""\ ) |const| :ref:`šŸ”—` -Returns the current locale's translation for the given message (key), plural message and context. +Returns the current locale's translation for the given message, plural message and context. The number ``n`` is the number or quantity of the plural object. It will be used to guide the translation system to fetch the correct plural form for the selected language. +\ **Note:** This method always uses the main translation domain. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_vehiclewheel3d.rst b/classes/class_vehiclewheel3d.rst index 9035314013f..91699631298 100644 --- a/classes/class_vehiclewheel3d.rst +++ b/classes/class_vehiclewheel3d.rst @@ -127,7 +127,7 @@ Slows down the wheel by applying a braking force. The wheel is only slowed down - |void| **set_damping_compression**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_damping_compression**\ (\ ) -The damping applied to the spring when the spring is being compressed. This value should be between 0.0 (no damping) and 1.0. A value of 0.0 means the car will keep bouncing as the spring keeps its energy. A good value for this is around 0.3 for a normal car, 0.5 for a race car. +The damping applied to the suspension spring when being compressed, meaning when the wheel is moving up relative to the vehicle. It is measured in Newton-seconds per millimeter (Nā‹…s/mm), or megagrams per second (Mg/s). This value should be between 0.0 (no damping) and 1.0, but may be more. A value of 0.0 means the car will keep bouncing as the spring keeps its energy. A good value for this is around 0.3 for a normal car, 0.5 for a race car. .. rst-class:: classref-item-separator @@ -144,7 +144,7 @@ The damping applied to the spring when the spring is being compressed. This valu - |void| **set_damping_relaxation**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_damping_relaxation**\ (\ ) -The damping applied to the spring when relaxing. This value should be between 0.0 (no damping) and 1.0. This value should always be slightly higher than the :ref:`damping_compression` property. For a :ref:`damping_compression` value of 0.3, try a relaxation value of 0.5. +The damping applied to the suspension spring when rebounding or extending, meaning when the wheel is moving down relative to the vehicle. It is measured in Newton-seconds per millimeter (Nā‹…s/mm), or megagrams per second (Mg/s). This value should be between 0.0 (no damping) and 1.0, but may be more. This value should always be slightly higher than the :ref:`damping_compression` property. For a :ref:`damping_compression` value of 0.3, try a relaxation value of 0.5. .. rst-class:: classref-item-separator @@ -216,7 +216,7 @@ The maximum force the spring can resist. This value should be higher than a quar - |void| **set_suspension_stiffness**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_suspension_stiffness**\ (\ ) -This value defines the stiffness of the suspension. Use a value lower than 50 for an off-road car, a value between 50 and 100 for a race car and try something around 200 for something like a Formula 1 car. +The stiffness of the suspension, measured in Newtons per millimeter (N/mm), or megagrams per second squared (Mg/sĀ²). Use a value lower than 50 for an off-road car, a value between 50 and 100 for a race car and try something around 200 for something like a Formula 1 car. .. rst-class:: classref-item-separator diff --git a/classes/class_viewport.rst b/classes/class_viewport.rst index 4c51c893356..1d9186aed07 100644 --- a/classes/class_viewport.rst +++ b/classes/class_viewport.rst @@ -169,6 +169,10 @@ Methods +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`World3D` | :ref:`find_world_3d`\ (\ ) |const| | +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioListener2D` | :ref:`get_audio_listener_2d`\ (\ ) |const| | + +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioListener3D` | :ref:`get_audio_listener_3d`\ (\ ) |const| | + +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Camera2D` | :ref:`get_camera_2d`\ (\ ) |const| | +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Camera3D` | :ref:`get_camera_3d`\ (\ ) |const| | @@ -1929,6 +1933,30 @@ Returns the first valid :ref:`World3D` for this viewport, searchi ---- +.. _class_Viewport_method_get_audio_listener_2d: + +.. rst-class:: classref-method + +:ref:`AudioListener2D` **get_audio_listener_2d**\ (\ ) |const| :ref:`šŸ”—` + +Returns the currently active 2D audio listener. Returns ``null`` if there are no active 2D audio listeners, in which case the active 2D camera will be treated as listener. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Viewport_method_get_audio_listener_3d: + +.. rst-class:: classref-method + +:ref:`AudioListener3D` **get_audio_listener_3d**\ (\ ) |const| :ref:`šŸ”—` + +Returns the currently active 3D audio listener. Returns ``null`` if there are no active 3D audio listeners, in which case the active 3D camera will be treated as listener. + +.. rst-class:: classref-item-separator + +---- + .. _class_Viewport_method_get_camera_2d: .. rst-class:: classref-method @@ -2153,7 +2181,7 @@ Returns ``true`` if the drag operation is successful. :ref:`bool` **gui_is_dragging**\ (\ ) |const| :ref:`šŸ”—` -Returns ``true`` if the viewport is currently performing a drag operation. +Returns ``true`` if a drag operation is currently ongoing and where the drop action could happen in this viewport. Alternative to :ref:`Node.NOTIFICATION_DRAG_BEGIN` and :ref:`Node.NOTIFICATION_DRAG_END` when you prefer polling the value. diff --git a/classes/class_xrpose.rst b/classes/class_xrpose.rst index 026ac18c5c3..e4681f534b5 100644 --- a/classes/class_xrpose.rst +++ b/classes/class_xrpose.rst @@ -174,15 +174,15 @@ The linear velocity of this pose. - |void| **set_name**\ (\ value\: :ref:`StringName`\ ) - :ref:`StringName` **get_name**\ (\ ) -The name of this pose. Pose names are often driven by an action map setup by the user. Godot does suggest a number of pose names that it expects :ref:`XRInterface`\ s to implement: +The name of this pose. Usually, this name is derived from an action map set up by the user. Godot also suggests some pose names that :ref:`XRInterface` objects are expected to implement: -- ``root`` defines a root location, often used for tracked objects that do not have further nodes. +- ``root`` is the root location, often used for tracked objects that do not have further nodes. -- ``aim`` defines the tip of a controller with the orientation pointing outwards, for example: add your raycasts to this. +- ``aim`` is the tip of a controller with its orientation pointing outwards, often used for raycasts. -- ``grip`` defines the location where the user grips the controller +- ``grip`` is the location where the user grips the controller. -- ``skeleton`` defines the root location a hand mesh should be placed when using hand tracking and the animated skeleton supplied by the XR runtime. +- ``skeleton`` is the root location for a hand mesh, when using hand tracking and an animated skeleton is supplied by the XR runtime. .. rst-class:: classref-item-separator diff --git a/classes/index.rst b/classes/index.rst index 7f95012a5be..cbf5aae860f 100644 --- a/classes/index.rst +++ b/classes/index.rst @@ -939,6 +939,7 @@ Other objects class_tiledata class_time class_tlsoptions + class_translationdomain class_translationserver class_treeitem class_trianglemesh