From b978177527bac9ea43492269dd931d2c02d82631 Mon Sep 17 00:00:00 2001 From: Godot Organization Date: Sat, 21 Sep 2024 03:29:43 +0000 Subject: [PATCH] classref: Sync with current master branch (621cadc) --- classes/class_@globalscope.rst | 18 +- classes/class_animationmixer.rst | 26 +- classes/class_array.rst | 62 +- classes/class_astar2d.rst | 4 + classes/class_astar3d.rst | 4 + classes/class_astargrid2d.rst | 4 + classes/class_audiostreaminteractive.rst | 2 +- classes/class_canvasitem.rst | 4 + classes/class_classdb.rst | 69 ++ classes/class_compositoreffect.rst | 15 +- classes/class_cpuparticles3d.rst | 21 + classes/class_dictionary.rst | 204 +++- classes/class_editorcontextmenuplugin.rst | 171 ++++ classes/class_editorexportplatformmacos.rst | 22 +- classes/class_editorinterface.rst | 218 ++--- classes/class_editorplugin.rst | 32 +- .../class_editorresourcepreviewgenerator.rst | 4 +- classes/class_editorsettings.rst | 926 +++++++++++++++++- classes/class_enginedebugger.rst | 2 +- classes/class_filedialog.rst | 2 + classes/class_fontfile.rst | 2 +- classes/class_gltfdocumentextension.rst | 42 +- classes/class_gltfnode.rst | 14 + classes/class_gltfskeleton.rst | 4 + classes/class_gltfskin.rst | 8 + classes/class_gltfstate.rst | 180 ++-- classes/class_inputevent.rst | 2 + classes/class_javaclass.rst | 63 +- classes/class_javaclasswrapper.rst | 10 + classes/class_javaobject.rst | 64 ++ classes/class_javascriptbridge.rst | 28 + classes/class_label.rst | 2 +- classes/class_lineedit.rst | 112 ++- classes/class_menubar.rst | 10 +- classes/class_meshinstance3d.rst | 16 + classes/class_multimesh.rst | 2 + classes/class_navigationserver2d.rst | 18 +- classes/class_navigationserver3d.rst | 54 +- classes/class_node.rst | 30 + classes/class_node2d.rst | 28 +- classes/class_object.rst | 103 +- classes/class_openxrcompositionlayer.rst | 86 +- classes/class_os.rst | 6 +- classes/class_particleprocessmaterial.rst | 21 + classes/class_pathfollow2d.rst | 2 + classes/class_pathfollow3d.rst | 2 + classes/class_polygonpathfinder.rst | 58 +- classes/class_projectsettings.rst | 70 +- classes/class_rdpipelinedepthstencilstate.rst | 2 +- classes/class_rdshadersource.rst | 2 + classes/class_refcounted.rst | 2 +- classes/class_renderingdevice.rst | 2 +- classes/class_renderingserver.rst | 72 +- classes/class_resourceimporterdynamicfont.rst | 2 +- classes/class_resourceimporterscene.rst | 14 + classes/class_resourceimporterwav.rst | 8 +- classes/class_scenemultiplayer.rst | 2 +- classes/class_script.rst | 14 + classes/class_scripteditor.rst | 16 + classes/class_shortcut.rst | 2 +- classes/class_skeleton3d.rst | 230 +++-- classes/class_softbody3d.rst | 48 +- classes/class_spinbox.rst | 2 +- classes/class_splitcontainer.rst | 201 +++- classes/class_spriteframes.rst | 14 + classes/class_string.rst | 2 +- classes/class_stringname.rst | 2 +- classes/class_surfacetool.rst | 2 +- classes/class_textedit.rst | 4 +- classes/class_textserver.rst | 2 +- classes/class_theme.rst | 2 +- classes/class_tiledata.rst | 192 +++- classes/class_translationdomain.rst | 134 +++ classes/class_translationserver.rst | 64 +- classes/class_treeitem.rst | 38 +- classes/class_vehiclewheel3d.rst | 6 +- classes/class_viewport.rst | 44 +- classes/class_xrpose.rst | 10 +- classes/index.rst | 4 + 79 files changed, 3452 insertions(+), 534 deletions(-) create mode 100644 classes/class_editorcontextmenuplugin.rst create mode 100644 classes/class_javaobject.rst create mode 100644 classes/class_translationdomain.rst diff --git a/classes/class_@globalscope.rst b/classes/class_@globalscope.rst index 808ebcb8f38..d2cd4eea02d 100644 --- a/classes/class_@globalscope.rst +++ b/classes/class_@globalscope.rst @@ -3804,6 +3804,14 @@ Hints that an :ref:`int` property is a pointer. Used by GDExtension. Hints that a property is an :ref:`Array` with the stored type specified in the hint string. +.. _class_@GlobalScope_constant_PROPERTY_HINT_DICTIONARY_TYPE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_DICTIONARY_TYPE** = ``38`` + +Hints that a property is a :ref:`Dictionary` with the stored types specified in the hint string. + .. _class_@GlobalScope_constant_PROPERTY_HINT_LOCALE_ID: .. rst-class:: classref-enumeration-constant @@ -3848,7 +3856,7 @@ Hints that a string property is a password, and every character is replaced with .. rst-class:: classref-enumeration-constant -:ref:`PropertyHint` **PROPERTY_HINT_MAX** = ``38`` +:ref:`PropertyHint` **PROPERTY_HINT_MAX** = ``39`` Represents the size of the :ref:`PropertyHint` enum. @@ -5320,7 +5328,7 @@ Returns the hyperbolic arc (also called inverse) cosine of ``x``, returning a va :ref:`float` **angle_difference**\ (\ from\: :ref:`float`, to\: :ref:`float`\ ) :ref:`šŸ”—` -Returns the difference between the two angles, in the range of ``[-PI, +PI]``. When ``from`` and ``to`` are opposite, returns ``-PI`` if ``from`` is smaller than ``to``, or ``PI`` otherwise. +Returns the difference between the two angles (in radians), in the range of ``[-PI, +PI]``. When ``from`` and ``to`` are opposite, returns ``-PI`` if ``from`` is smaller than ``to``, or ``PI`` otherwise. .. rst-class:: classref-item-separator @@ -6082,9 +6090,9 @@ This function is faster than using :ref:`is_equal_approx` **lerp**\ (\ from\: :ref:`Variant`, to\: :ref:`Variant`, weight\: :ref:`Variant`\ ) :ref:`šŸ”—` -Linearly interpolates between two values by the factor defined in ``weight``. To perform interpolation, ``weight`` should be between ``0.0`` and ``1.0`` (inclusive). However, values outside this range are allowed and can be used to perform *extrapolation*. If this is not desired, use :ref:`clamp` on the result of this function. +Linearly interpolates between two values by the factor defined in ``weight``. To perform interpolation, ``weight`` should be between ``0.0`` and ``1.0`` (inclusive). However, values outside this range are allowed and can be used to perform *extrapolation*. If this is not desired, use :ref:`clampf` to limit ``weight``. -Both ``from`` and ``to`` must be the same type. Supported types: :ref:`int`, :ref:`float`, :ref:`Vector2`, :ref:`Vector3`, :ref:`Vector4`, :ref:`Color`, :ref:`Quaternion`, :ref:`Basis`. +Both ``from`` and ``to`` must be the same type. Supported types: :ref:`int`, :ref:`float`, :ref:`Vector2`, :ref:`Vector3`, :ref:`Vector4`, :ref:`Color`, :ref:`Quaternion`, :ref:`Basis`, :ref:`Transform2D`, :ref:`Transform3D`. :: @@ -6092,7 +6100,7 @@ Both ``from`` and ``to`` must be the same type. Supported types: :ref:`int` which performs the reverse of this operation. To perform eased interpolation with :ref:`lerp`, combine it with :ref:`ease` or :ref:`smoothstep`. See also :ref:`remap` to map a continuous series of values to another. -\ **Note:** For better type safety, use :ref:`lerpf`, :ref:`Vector2.lerp`, :ref:`Vector3.lerp`, :ref:`Vector4.lerp`, :ref:`Color.lerp`, :ref:`Quaternion.slerp` or :ref:`Basis.slerp`. +\ **Note:** For better type safety, use :ref:`lerpf`, :ref:`Vector2.lerp`, :ref:`Vector3.lerp`, :ref:`Vector4.lerp`, :ref:`Color.lerp`, :ref:`Quaternion.slerp`, :ref:`Basis.slerp`, :ref:`Transform2D.interpolate_with`, or :ref:`Transform3D.interpolate_with`. .. rst-class:: classref-item-separator diff --git a/classes/class_animationmixer.rst b/classes/class_animationmixer.rst index d970b77d9b7..918f870a69b 100644 --- a/classes/class_animationmixer.rst +++ b/classes/class_animationmixer.rst @@ -302,7 +302,31 @@ An :ref:`Animation.UPDATE_CONTINUOUS Always treat the :ref:`Animation.UPDATE_DISCRETE` track value as :ref:`Animation.UPDATE_CONTINUOUS` with :ref:`Animation.INTERPOLATION_NEAREST`. This is the default behavior for :ref:`AnimationTree`. -If a value track has non-numeric type key values, it is internally converted to use :ref:`ANIMATION_CALLBACK_MODE_DISCRETE_RECESSIVE` with :ref:`Animation.UPDATE_DISCRETE`. +If a value track has un-interpolatable type key values, it is internally converted to use :ref:`ANIMATION_CALLBACK_MODE_DISCRETE_RECESSIVE` with :ref:`Animation.UPDATE_DISCRETE`. + +Un-interpolatable type list: + +- :ref:`@GlobalScope.TYPE_NIL`\ + +- :ref:`@GlobalScope.TYPE_NODE_PATH`\ + +- :ref:`@GlobalScope.TYPE_RID`\ + +- :ref:`@GlobalScope.TYPE_OBJECT`\ + +- :ref:`@GlobalScope.TYPE_CALLABLE`\ + +- :ref:`@GlobalScope.TYPE_SIGNAL`\ + +- :ref:`@GlobalScope.TYPE_DICTIONARY`\ + +- :ref:`@GlobalScope.TYPE_PACKED_BYTE_ARRAY`\ + +\ :ref:`@GlobalScope.TYPE_BOOL` and :ref:`@GlobalScope.TYPE_INT` are treated as :ref:`@GlobalScope.TYPE_FLOAT` during blending and rounded when the result is retrieved. + +It is same for arrays and vectors with them such as :ref:`@GlobalScope.TYPE_PACKED_INT32_ARRAY` or :ref:`@GlobalScope.TYPE_VECTOR2I`, they are treated as :ref:`@GlobalScope.TYPE_PACKED_FLOAT32_ARRAY` or :ref:`@GlobalScope.TYPE_VECTOR2`. Also note that for arrays, the size is also interpolated. + +\ :ref:`@GlobalScope.TYPE_STRING` and :ref:`@GlobalScope.TYPE_STRING_NAME` are interpolated between character codes and lengths, but note that there is a difference in algorithm between interpolation between keys and interpolation by blending. .. rst-class:: classref-section-separator 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_audiostreaminteractive.rst b/classes/class_audiostreaminteractive.rst index 02e2635cee1..e5aa52ec1f2 100644 --- a/classes/class_audiostreaminteractive.rst +++ b/classes/class_audiostreaminteractive.rst @@ -19,7 +19,7 @@ Audio stream that can playback music interactively, combining clips and a transi Description ----------- -This is an audio stream that can playback music interactively, combining clips and a transition table. Clips must be added first, and the transition rules via the :ref:`add_transition`. Additionally, this stream export a property parameter to control the playback via :ref:`AudioStreamPlayer`, :ref:`AudioStreamPlayer2D`, or :ref:`AudioStreamPlayer3D`. +This is an audio stream that can playback music interactively, combining clips and a transition table. Clips must be added first, and then the transition rules via the :ref:`add_transition`. Additionally, this stream exports a property parameter to control the playback via :ref:`AudioStreamPlayer`, :ref:`AudioStreamPlayer2D`, or :ref:`AudioStreamPlayer3D`. The way this is used is by filling a number of clips, then configuring the transition table. From there, clips are selected for playback and the music will smoothly go from the current to the new one while using the corresponding transition rule defined in the transition table. diff --git a/classes/class_canvasitem.rst b/classes/class_canvasitem.rst index d5412e78e24..43b1bcdf41a 100644 --- a/classes/class_canvasitem.rst +++ b/classes/class_canvasitem.rst @@ -880,6 +880,8 @@ If ``antialiased`` is ``true``, half transparent "feathers" will be attached to Draws a colored polygon of any number of points, convex or concave. Unlike :ref:`draw_polygon`, a single color must be specified for the whole polygon. +\ **Note:** If you frequently redraw the same polygon with a large number of vertices, consider pre-calculating the triangulation with :ref:`Geometry2D.triangulate_polygon` and using :ref:`draw_mesh`, :ref:`draw_multimesh`, or :ref:`RenderingServer.canvas_item_add_triangle_array`. + .. rst-class:: classref-item-separator ---- @@ -1053,6 +1055,8 @@ Draws a :ref:`MultiMesh` in 2D with the provided texture. See : Draws a solid polygon of any number of points, convex or concave. Unlike :ref:`draw_colored_polygon`, each point's color can be changed individually. See also :ref:`draw_polyline` and :ref:`draw_polyline_colors`. If you need more flexibility (such as being able to use bones), use :ref:`RenderingServer.canvas_item_add_triangle_array` instead. +\ **Note:** If you frequently redraw the same polygon with a large number of vertices, consider pre-calculating the triangulation with :ref:`Geometry2D.triangulate_polygon` and using :ref:`draw_mesh`, :ref:`draw_multimesh`, or :ref:`RenderingServer.canvas_item_add_triangle_array`. + .. 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 a72da698208..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: @@ -264,6 +264,19 @@ If ``true`` this triggers normal and roughness data to be output during our dept var render_scene_buffers : RenderSceneBuffersRD = render_data.get_render_scene_buffers() var roughness_buffer = render_scene_buffers.get_texture("forward_clustered", "normal_roughness") +The raw normal and roughness buffer is stored in an optimized format, different than the one available in Spatial shaders. When sampling the buffer, a conversion function must be applied. Use this function, copied from `here `__: + +:: + + vec4 normal_roughness_compatibility(vec4 p_normal_roughness) { + float roughness = p_normal_roughness.w; + if (roughness > 0.5) { + roughness = 1.0 - roughness; + } + roughness /= (127.0 / 255.0); + return vec4(normalize(p_normal_roughness.xyz * 2.0 - 1.0) * 0.5 + 0.5, roughness); + } + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_cpuparticles3d.rst b/classes/class_cpuparticles3d.rst index ba08e373997..503f30806ec 100644 --- a/classes/class_cpuparticles3d.rst +++ b/classes/class_cpuparticles3d.rst @@ -91,6 +91,8 @@ Properties +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ | :ref:`Vector3` | :ref:`emission_ring_axis` | | +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`emission_ring_cone_angle` | | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ | :ref:`float` | :ref:`emission_ring_height` | | +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ | :ref:`float` | :ref:`emission_ring_inner_radius` | | @@ -969,6 +971,25 @@ The axis of the ring when using the emitter :ref:`EMISSION_SHAPE_RING` **emission_ring_cone_angle** :ref:`šŸ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_emission_ring_cone_angle**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_emission_ring_cone_angle**\ (\ ) + +The angle of the cone when using the emitter :ref:`EMISSION_SHAPE_RING`. The default angle of 90 degrees results in a ring, while an angle of 0 degrees results in a cone. Intermediate values will result in a ring where one end is larger than the other. + +\ **Note:** Depending on :ref:`emission_ring_height`, the angle may be clamped if the ring's end is reached to form a perfect cone. + +.. rst-class:: classref-item-separator + +---- + .. _class_CPUParticles3D_property_emission_ring_height: .. rst-class:: classref-property diff --git a/classes/class_dictionary.rst b/classes/class_dictionary.rst index 2b3e7ac3edc..cc1678e02e4 100644 --- a/classes/class_dictionary.rst +++ b/classes/class_dictionary.rst @@ -212,11 +212,13 @@ Constructors .. table:: :widths: auto - +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`Dictionary`\ (\ ) | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`Dictionary`\ (\ from\: :ref:`Dictionary`\ ) | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`Dictionary`\ (\ ) | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`Dictionary`\ (\ base\: :ref:`Dictionary`, key_type\: :ref:`int`, key_class_name\: :ref:`StringName`, key_script\: :ref:`Variant`, value_type\: :ref:`int`, value_class_name\: :ref:`StringName`, value_script\: :ref:`Variant`\ ) | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`Dictionary`\ (\ from\: :ref:`Dictionary`\ ) | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -226,6 +228,8 @@ Methods .. table:: :widths: auto + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`assign`\ (\ dictionary\: :ref:`Dictionary`\ ) | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`clear`\ (\ ) | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -239,6 +243,18 @@ Methods +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`get_or_add`\ (\ key\: :ref:`Variant`, default\: :ref:`Variant` = null\ ) | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_typed_key_builtin`\ (\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_typed_key_class_name`\ (\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_typed_key_script`\ (\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_typed_value_builtin`\ (\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_typed_value_class_name`\ (\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_typed_value_script`\ (\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has`\ (\ key\: :ref:`Variant`\ ) |const| | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_all`\ (\ keys\: :ref:`Array`\ ) |const| | @@ -249,6 +265,18 @@ Methods +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_read_only`\ (\ ) |const| | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_same_typed`\ (\ dictionary\: :ref:`Dictionary`\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_same_typed_key`\ (\ dictionary\: :ref:`Dictionary`\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_same_typed_value`\ (\ dictionary\: :ref:`Dictionary`\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_typed`\ (\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_typed_key`\ (\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_typed_value`\ (\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`keys`\ (\ ) |const| | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`make_read_only`\ (\ ) | @@ -303,6 +331,16 @@ Constructs an empty **Dictionary**. .. rst-class:: classref-constructor +:ref:`Dictionary` **Dictionary**\ (\ base\: :ref:`Dictionary`, key_type\: :ref:`int`, key_class_name\: :ref:`StringName`, key_script\: :ref:`Variant`, value_type\: :ref:`int`, value_class_name\: :ref:`StringName`, value_script\: :ref:`Variant`\ ) + +Creates a typed dictionary from the ``base`` dictionary. A typed dictionary can only contain keys and values of the given types, or that inherit from the given classes, as described by this constructor's parameters. + +.. rst-class:: classref-item-separator + +---- + +.. rst-class:: classref-constructor + :ref:`Dictionary` **Dictionary**\ (\ from\: :ref:`Dictionary`\ ) Returns the same dictionary as ``from``. If you need a copy of the dictionary, use :ref:`duplicate`. @@ -316,6 +354,18 @@ Returns the same dictionary as ``from``. If you need a copy of the dictionary, u Method Descriptions ------------------- +.. _class_Dictionary_method_assign: + +.. rst-class:: classref-method + +|void| **assign**\ (\ dictionary\: :ref:`Dictionary`\ ) :ref:`šŸ”—` + +Assigns elements of another ``dictionary`` into the dictionary. Resizes the dictionary to match ``dictionary``. Performs type conversions if the dictionary is typed. + +.. rst-class:: classref-item-separator + +---- + .. _class_Dictionary_method_clear: .. rst-class:: classref-method @@ -392,6 +442,78 @@ Gets a value and ensures the key is set. If the ``key`` exists in the dictionary ---- +.. _class_Dictionary_method_get_typed_key_builtin: + +.. rst-class:: classref-method + +:ref:`int` **get_typed_key_builtin**\ (\ ) |const| :ref:`šŸ”—` + +Returns the built-in :ref:`Variant` type of the typed dictionary's keys as a :ref:`Variant.Type` constant. If the keys are not typed, returns :ref:`@GlobalScope.TYPE_NIL`. See also :ref:`is_typed_key`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Dictionary_method_get_typed_key_class_name: + +.. rst-class:: classref-method + +:ref:`StringName` **get_typed_key_class_name**\ (\ ) |const| :ref:`šŸ”—` + +Returns the **built-in** class name of the typed dictionary's keys, if the built-in :ref:`Variant` type is :ref:`@GlobalScope.TYPE_OBJECT`. Otherwise, returns an empty :ref:`StringName`. See also :ref:`is_typed_key` and :ref:`Object.get_class`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Dictionary_method_get_typed_key_script: + +.. rst-class:: classref-method + +:ref:`Variant` **get_typed_key_script**\ (\ ) |const| :ref:`šŸ”—` + +Returns the :ref:`Script` instance associated with this typed dictionary's keys, or ``null`` if it does not exist. See also :ref:`is_typed_key`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Dictionary_method_get_typed_value_builtin: + +.. rst-class:: classref-method + +:ref:`int` **get_typed_value_builtin**\ (\ ) |const| :ref:`šŸ”—` + +Returns the built-in :ref:`Variant` type of the typed dictionary's values as a :ref:`Variant.Type` constant. If the values are not typed, returns :ref:`@GlobalScope.TYPE_NIL`. See also :ref:`is_typed_value`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Dictionary_method_get_typed_value_class_name: + +.. rst-class:: classref-method + +:ref:`StringName` **get_typed_value_class_name**\ (\ ) |const| :ref:`šŸ”—` + +Returns the **built-in** class name of the typed dictionary's values, if the built-in :ref:`Variant` type is :ref:`@GlobalScope.TYPE_OBJECT`. Otherwise, returns an empty :ref:`StringName`. See also :ref:`is_typed_value` and :ref:`Object.get_class`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Dictionary_method_get_typed_value_script: + +.. rst-class:: classref-method + +:ref:`Variant` **get_typed_value_script**\ (\ ) |const| :ref:`šŸ”—` + +Returns the :ref:`Script` instance associated with this typed dictionary's values, or ``null`` if it does not exist. See also :ref:`is_typed_value`. + +.. rst-class:: classref-item-separator + +---- + .. _class_Dictionary_method_has: .. rst-class:: classref-method @@ -518,6 +640,78 @@ Returns ``true`` if the dictionary is read-only. See :ref:`make_read_only` **is_same_typed**\ (\ dictionary\: :ref:`Dictionary`\ ) |const| :ref:`šŸ”—` + +Returns ``true`` if the dictionary is typed the same as ``dictionary``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Dictionary_method_is_same_typed_key: + +.. rst-class:: classref-method + +:ref:`bool` **is_same_typed_key**\ (\ dictionary\: :ref:`Dictionary`\ ) |const| :ref:`šŸ”—` + +Returns ``true`` if the dictionary's keys are typed the same as ``dictionary``'s keys. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Dictionary_method_is_same_typed_value: + +.. rst-class:: classref-method + +:ref:`bool` **is_same_typed_value**\ (\ dictionary\: :ref:`Dictionary`\ ) |const| :ref:`šŸ”—` + +Returns ``true`` if the dictionary's values are typed the same as ``dictionary``'s values. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Dictionary_method_is_typed: + +.. rst-class:: classref-method + +:ref:`bool` **is_typed**\ (\ ) |const| :ref:`šŸ”—` + +Returns ``true`` if the dictionary is typed. Typed dictionaries can only store keys/values of their associated type and provide type safety for the ``[]`` operator. Methods of typed dictionary still return :ref:`Variant`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Dictionary_method_is_typed_key: + +.. rst-class:: classref-method + +:ref:`bool` **is_typed_key**\ (\ ) |const| :ref:`šŸ”—` + +Returns ``true`` if the dictionary's keys are typed. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Dictionary_method_is_typed_value: + +.. rst-class:: classref-method + +:ref:`bool` **is_typed_value**\ (\ ) |const| :ref:`šŸ”—` + +Returns ``true`` if the dictionary's values are typed. + +.. rst-class:: classref-item-separator + +---- + .. _class_Dictionary_method_keys: .. rst-class:: classref-method diff --git a/classes/class_editorcontextmenuplugin.rst b/classes/class_editorcontextmenuplugin.rst new file mode 100644 index 00000000000..40ad945dc15 --- /dev/null +++ b/classes/class_editorcontextmenuplugin.rst @@ -0,0 +1,171 @@ +: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/EditorContextMenuPlugin.xml. + +.. _class_EditorContextMenuPlugin: + +EditorContextMenuPlugin +======================= + +**Inherits:** :ref:`RefCounted` **<** :ref:`Object` + +Plugin for adding custom context menus in the editor. + +.. rst-class:: classref-introduction-group + +Description +----------- + +**EditorContextMenuPlugin** allows for the addition of custom options in the editor's context menu. + +Currently, context menus are supported for three commonly used areas: the file system, scene tree, and editor script list panel. + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_popup_menu`\ (\ paths\: :ref:`PackedStringArray`\ ) |virtual| | + +--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_context_menu_item`\ (\ name\: :ref:`String`, callback\: :ref:`Callable`, icon\: :ref:`Texture2D` = null\ ) | + +--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_context_menu_item_from_shortcut`\ (\ name\: :ref:`String`, shortcut\: :ref:`Shortcut`, icon\: :ref:`Texture2D` = null\ ) | + +--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_menu_shortcut`\ (\ shortcut\: :ref:`Shortcut`, callback\: :ref:`Callable`\ ) | + +--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_EditorContextMenuPlugin_ContextMenuSlot: + +.. rst-class:: classref-enumeration + +enum **ContextMenuSlot**: :ref:`šŸ”—` + +.. _class_EditorContextMenuPlugin_constant_CONTEXT_SLOT_SCENE_TREE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ContextMenuSlot` **CONTEXT_SLOT_SCENE_TREE** = ``0`` + +Context menu of Scene dock. :ref:`_popup_menu` will be called with a list of paths to currently selected nodes, while option callback will receive the list of currently selected nodes. + +.. _class_EditorContextMenuPlugin_constant_CONTEXT_SLOT_FILESYSTEM: + +.. rst-class:: classref-enumeration-constant + +:ref:`ContextMenuSlot` **CONTEXT_SLOT_FILESYSTEM** = ``1`` + +Context menu of FileSystem dock. :ref:`_popup_menu` and option callback will be called with list of paths of the currently selected files. + +.. _class_EditorContextMenuPlugin_constant_CONTEXT_SLOT_FILESYSTEM_CREATE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ContextMenuSlot` **CONTEXT_SLOT_FILESYSTEM_CREATE** = ``3`` + +The "Create..." submenu of FileSystem dock's context menu. :ref:`_popup_menu` and option callback will be called with list of paths of the currently selected files. + +.. _class_EditorContextMenuPlugin_constant_CONTEXT_SLOT_SCRIPT_EDITOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`ContextMenuSlot` **CONTEXT_SLOT_SCRIPT_EDITOR** = ``2`` + +Context menu of Scene dock. :ref:`_popup_menu` will be called with the path to the currently edited script, while option callback will receive reference to that script. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_EditorContextMenuPlugin_private_method__popup_menu: + +.. rst-class:: classref-method + +|void| **_popup_menu**\ (\ paths\: :ref:`PackedStringArray`\ ) |virtual| :ref:`šŸ”—` + +Called when creating a context menu, custom options can be added by using the :ref:`add_context_menu_item` or :ref:`add_context_menu_item_from_shortcut` functions. ``paths`` contains currently selected paths (depending on menu), which can be used to conditionally add options. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorContextMenuPlugin_method_add_context_menu_item: + +.. rst-class:: classref-method + +|void| **add_context_menu_item**\ (\ name\: :ref:`String`, callback\: :ref:`Callable`, icon\: :ref:`Texture2D` = null\ ) :ref:`šŸ”—` + +Add custom option to the context menu of the plugin's specified slot. When the option is activated, ``callback`` will be called. Callback should take single :ref:`Array` argument; array contents depend on context menu slot. + +:: + + func _popup_menu(paths): + add_context_menu_item("File Custom options", handle, ICON) + +If you want to assign shortcut to the menu item, use :ref:`add_context_menu_item_from_shortcut` instead. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorContextMenuPlugin_method_add_context_menu_item_from_shortcut: + +.. rst-class:: classref-method + +|void| **add_context_menu_item_from_shortcut**\ (\ name\: :ref:`String`, shortcut\: :ref:`Shortcut`, icon\: :ref:`Texture2D` = null\ ) :ref:`šŸ”—` + +Add custom option to the context menu of the plugin's specified slot. The option will have the ``shortcut`` assigned and reuse its callback. The shortcut has to be registered beforehand with :ref:`add_menu_shortcut`. + +:: + + func _init(): + add_menu_shortcut(SHORTCUT, handle) + + func _popup_menu(paths): + add_context_menu_item_from_shortcut("File Custom options", SHORTCUT, ICON) + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorContextMenuPlugin_method_add_menu_shortcut: + +.. rst-class:: classref-method + +|void| **add_menu_shortcut**\ (\ shortcut\: :ref:`Shortcut`, callback\: :ref:`Callable`\ ) :ref:`šŸ”—` + +Registers a shortcut associated with the plugin's context menu. This method should be called once (e.g. in plugin's :ref:`Object._init`). ``callback`` will be called when user presses the specified ``shortcut`` while the menu's context is in effect (e.g. FileSystem dock is focused). Callback should take single :ref:`Array` argument; array contents depend on context menu slot. + +:: + + func _init(): + add_menu_shortcut(SHORTCUT, handle) + +.. |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_editorexportplatformmacos.rst b/classes/class_editorexportplatformmacos.rst index 3bea82b2380..911bc2c7c7d 100644 --- a/classes/class_editorexportplatformmacos.rst +++ b/classes/class_editorexportplatformmacos.rst @@ -48,7 +48,9 @@ Properties +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`application/icon_interpolation` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`application/min_macos_version` | + | :ref:`String` | :ref:`application/min_macos_version_arm64` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/min_macos_version_x86_64` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`application/short_version` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -609,13 +611,25 @@ Interpolation method used to resize application icon. ---- -.. _class_EditorExportPlatformMacOS_property_application/min_macos_version: +.. _class_EditorExportPlatformMacOS_property_application/min_macos_version_arm64: + +.. rst-class:: classref-property + +:ref:`String` **application/min_macos_version_arm64** :ref:`šŸ”—` + +Minimum version of macOS required for this application to run on Apple Silicon Macs, in the ``major.minor.patch`` or ``major.minor`` format, can only contain numeric characters (``0-9``) and periods (``.``). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_application/min_macos_version_x86_64: .. rst-class:: classref-property -:ref:`String` **application/min_macos_version** :ref:`šŸ”—` +:ref:`String` **application/min_macos_version_x86_64** :ref:`šŸ”—` -Minimum version of macOS required for this application to run in the ``major.minor.patch`` or ``major.minor`` format, can only contain numeric characters (``0-9``) and periods (``.``). +Minimum version of macOS required for this application to run on Intel Macs, in the ``major.minor.patch`` or ``major.minor`` format, can only contain numeric characters (``0-9``) and periods (``.``). .. rst-class:: classref-item-separator diff --git a/classes/class_editorinterface.rst b/classes/class_editorinterface.rst index 460ae730e0c..4de5e6f98e6 100644 --- a/classes/class_editorinterface.rst +++ b/classes/class_editorinterface.rst @@ -59,111 +59,111 @@ Methods .. table:: :widths: auto - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`edit_node`\ (\ node\: :ref:`Node`\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`edit_resource`\ (\ resource\: :ref:`Resource`\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`edit_script`\ (\ script\: :ref:`Script`, line\: :ref:`int` = -1, column\: :ref:`int` = 0, grab_focus\: :ref:`bool` = true\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Control` | :ref:`get_base_control`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorCommandPalette` | :ref:`get_command_palette`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_current_directory`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_current_feature_profile`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_current_path`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node` | :ref:`get_edited_scene_root`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`VBoxContainer` | :ref:`get_editor_main_screen`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorPaths` | :ref:`get_editor_paths`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_editor_scale`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorSettings` | :ref:`get_editor_settings`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Theme` | :ref:`get_editor_theme`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorUndoRedoManager` | :ref:`get_editor_undo_redo`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`SubViewport` | :ref:`get_editor_viewport_2d`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`SubViewport` | :ref:`get_editor_viewport_3d`\ (\ idx\: :ref:`int` = 0\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`FileSystemDock` | :ref:`get_file_system_dock`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorInspector` | :ref:`get_inspector`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`get_open_scenes`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_playing_scene`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorFileSystem` | :ref:`get_resource_filesystem`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorResourcePreview` | :ref:`get_resource_previewer`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ScriptEditor` | :ref:`get_script_editor`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`get_selected_paths`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorSelection` | :ref:`get_selection`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`inspect_object`\ (\ object\: :ref:`Object`, for_property\: :ref:`String` = "", inspector_only\: :ref:`bool` = false\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_multi_window_enabled`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_playing_scene`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_plugin_enabled`\ (\ plugin\: :ref:`String`\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`Texture2D`\] | :ref:`make_mesh_previews`\ (\ meshes\: :ref:`Array`\[:ref:`Mesh`\], preview_size\: :ref:`int`\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`mark_scene_as_unsaved`\ (\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`open_scene_from_path`\ (\ scene_filepath\: :ref:`String`\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`play_current_scene`\ (\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`play_custom_scene`\ (\ scene_filepath\: :ref:`String`\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`play_main_scene`\ (\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`popup_dialog`\ (\ dialog\: :ref:`Window`, rect\: :ref:`Rect2i` = Rect2i(0, 0, 0, 0)\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`popup_dialog_centered`\ (\ dialog\: :ref:`Window`, minsize\: :ref:`Vector2i` = Vector2i(0, 0)\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`popup_dialog_centered_clamped`\ (\ dialog\: :ref:`Window`, minsize\: :ref:`Vector2i` = Vector2i(0, 0), fallback_ratio\: :ref:`float` = 0.75\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`popup_dialog_centered_ratio`\ (\ dialog\: :ref:`Window`, ratio\: :ref:`float` = 0.8\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`popup_node_selector`\ (\ callback\: :ref:`Callable`, valid_types\: :ref:`Array`\[:ref:`StringName`\] = []\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`popup_property_selector`\ (\ object\: :ref:`Object`, callback\: :ref:`Callable`, type_filter\: :ref:`PackedInt32Array` = PackedInt32Array()\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`reload_scene_from_path`\ (\ scene_filepath\: :ref:`String`\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`restart_editor`\ (\ save\: :ref:`bool` = true\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`save_all_scenes`\ (\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`save_scene`\ (\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`save_scene_as`\ (\ path\: :ref:`String`, with_preview\: :ref:`bool` = true\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`select_file`\ (\ file\: :ref:`String`\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_current_feature_profile`\ (\ profile_name\: :ref:`String`\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_main_screen_editor`\ (\ name\: :ref:`String`\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_plugin_enabled`\ (\ plugin\: :ref:`String`, enabled\: :ref:`bool`\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`stop_playing_scene`\ (\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`edit_node`\ (\ node\: :ref:`Node`\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`edit_resource`\ (\ resource\: :ref:`Resource`\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`edit_script`\ (\ script\: :ref:`Script`, line\: :ref:`int` = -1, column\: :ref:`int` = 0, grab_focus\: :ref:`bool` = true\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Control` | :ref:`get_base_control`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorCommandPalette` | :ref:`get_command_palette`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_current_directory`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_current_feature_profile`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_current_path`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node` | :ref:`get_edited_scene_root`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`VBoxContainer` | :ref:`get_editor_main_screen`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorPaths` | :ref:`get_editor_paths`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_editor_scale`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorSettings` | :ref:`get_editor_settings`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Theme` | :ref:`get_editor_theme`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorUndoRedoManager` | :ref:`get_editor_undo_redo`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SubViewport` | :ref:`get_editor_viewport_2d`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SubViewport` | :ref:`get_editor_viewport_3d`\ (\ idx\: :ref:`int` = 0\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`FileSystemDock` | :ref:`get_file_system_dock`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorInspector` | :ref:`get_inspector`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_open_scenes`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_playing_scene`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorFileSystem` | :ref:`get_resource_filesystem`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorResourcePreview` | :ref:`get_resource_previewer`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ScriptEditor` | :ref:`get_script_editor`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_selected_paths`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorSelection` | :ref:`get_selection`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`inspect_object`\ (\ object\: :ref:`Object`, for_property\: :ref:`String` = "", inspector_only\: :ref:`bool` = false\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_multi_window_enabled`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_playing_scene`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_plugin_enabled`\ (\ plugin\: :ref:`String`\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Texture2D`\] | :ref:`make_mesh_previews`\ (\ meshes\: :ref:`Array`\[:ref:`Mesh`\], preview_size\: :ref:`int`\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`mark_scene_as_unsaved`\ (\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`open_scene_from_path`\ (\ scene_filepath\: :ref:`String`\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`play_current_scene`\ (\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`play_custom_scene`\ (\ scene_filepath\: :ref:`String`\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`play_main_scene`\ (\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_dialog`\ (\ dialog\: :ref:`Window`, rect\: :ref:`Rect2i` = Rect2i(0, 0, 0, 0)\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_dialog_centered`\ (\ dialog\: :ref:`Window`, minsize\: :ref:`Vector2i` = Vector2i(0, 0)\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_dialog_centered_clamped`\ (\ dialog\: :ref:`Window`, minsize\: :ref:`Vector2i` = Vector2i(0, 0), fallback_ratio\: :ref:`float` = 0.75\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_dialog_centered_ratio`\ (\ dialog\: :ref:`Window`, ratio\: :ref:`float` = 0.8\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_node_selector`\ (\ callback\: :ref:`Callable`, valid_types\: :ref:`Array`\[:ref:`StringName`\] = [], current_value\: :ref:`Node` = null\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_property_selector`\ (\ object\: :ref:`Object`, callback\: :ref:`Callable`, type_filter\: :ref:`PackedInt32Array` = PackedInt32Array(), current_value\: :ref:`String` = ""\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reload_scene_from_path`\ (\ scene_filepath\: :ref:`String`\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`restart_editor`\ (\ save\: :ref:`bool` = true\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`save_all_scenes`\ (\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`save_scene`\ (\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`save_scene_as`\ (\ path\: :ref:`String`, with_preview\: :ref:`bool` = true\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`select_file`\ (\ file\: :ref:`String`\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_current_feature_profile`\ (\ profile_name\: :ref:`String`\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_main_screen_editor`\ (\ name\: :ref:`String`\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_plugin_enabled`\ (\ plugin\: :ref:`String`, enabled\: :ref:`bool`\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`stop_playing_scene`\ (\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -733,9 +733,9 @@ See also :ref:`Window.set_unparent_when_invisible`, valid_types\: :ref:`Array`\[:ref:`StringName`\] = []\ ) :ref:`šŸ”—` +|void| **popup_node_selector**\ (\ callback\: :ref:`Callable`, valid_types\: :ref:`Array`\[:ref:`StringName`\] = [], current_value\: :ref:`Node` = null\ ) :ref:`šŸ”—` -Pops up an editor dialog for selecting a :ref:`Node` from the edited scene. The ``callback`` must take a single argument of type :ref:`NodePath`. It is called on the selected :ref:`NodePath` or the empty path ``^""`` if the dialog is canceled. If ``valid_types`` is provided, the dialog will only show Nodes that match one of the listed Node types. +Pops up an editor dialog for selecting a :ref:`Node` from the edited scene. The ``callback`` must take a single argument of type :ref:`NodePath`. It is called on the selected :ref:`NodePath` or the empty path ``^""`` if the dialog is canceled. If ``valid_types`` is provided, the dialog will only show Nodes that match one of the listed Node types. If ``current_value`` is provided, the Node will be automatically selected in the tree, if it exists. \ **Example:** Display the node selection dialog as soon as this node is added to the tree for the first time: @@ -759,9 +759,9 @@ Pops up an editor dialog for selecting a :ref:`Node` from the edited .. rst-class:: classref-method -|void| **popup_property_selector**\ (\ object\: :ref:`Object`, callback\: :ref:`Callable`, type_filter\: :ref:`PackedInt32Array` = PackedInt32Array()\ ) :ref:`šŸ”—` +|void| **popup_property_selector**\ (\ object\: :ref:`Object`, callback\: :ref:`Callable`, type_filter\: :ref:`PackedInt32Array` = PackedInt32Array(), current_value\: :ref:`String` = ""\ ) :ref:`šŸ”—` -Pops up an editor dialog for selecting properties from ``object``. The ``callback`` must take a single argument of type :ref:`NodePath`. It is called on the selected property path (see :ref:`NodePath.get_as_property_path`) or the empty path ``^""`` if the dialog is canceled. If ``type_filter`` is provided, the dialog will only show properties that match one of the listed :ref:`Variant.Type` values. +Pops up an editor dialog for selecting properties from ``object``. The ``callback`` must take a single argument of type :ref:`NodePath`. It is called on the selected property path (see :ref:`NodePath.get_as_property_path`) or the empty path ``^""`` if the dialog is canceled. If ``type_filter`` is provided, the dialog will only show properties that match one of the listed :ref:`Variant.Type` values. If ``current_value`` is provided, the property will be selected automatically in the property list, if it exists. :: diff --git a/classes/class_editorplugin.rst b/classes/class_editorplugin.rst index 199d912c1a9..c58e443843a 100644 --- a/classes/class_editorplugin.rst +++ b/classes/class_editorplugin.rst @@ -89,6 +89,8 @@ Methods +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`add_autoload_singleton`\ (\ name\: :ref:`String`, path\: :ref:`String`\ ) | +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_context_menu_plugin`\ (\ slot\: :ref:`ContextMenuSlot`, plugin\: :ref:`EditorContextMenuPlugin`\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Button` | :ref:`add_control_to_bottom_panel`\ (\ control\: :ref:`Control`, title\: :ref:`String`, shortcut\: :ref:`Shortcut` = null\ ) | +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`add_control_to_container`\ (\ container\: :ref:`CustomControlContainer`, control\: :ref:`Control`\ ) | @@ -141,6 +143,8 @@ Methods +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`remove_autoload_singleton`\ (\ name\: :ref:`String`\ ) | +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_context_menu_plugin`\ (\ plugin\: :ref:`EditorContextMenuPlugin`\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`remove_control_from_bottom_panel`\ (\ control\: :ref:`Control`\ ) | +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`remove_control_from_container`\ (\ container\: :ref:`CustomControlContainer`, control\: :ref:`Control`\ ) | @@ -1085,6 +1089,20 @@ Adds a script at ``path`` to the Autoload list as ``name``. ---- +.. _class_EditorPlugin_method_add_context_menu_plugin: + +.. rst-class:: classref-method + +|void| **add_context_menu_plugin**\ (\ slot\: :ref:`ContextMenuSlot`, plugin\: :ref:`EditorContextMenuPlugin`\ ) :ref:`šŸ”—` + +Adds a plugin to the context menu. ``slot`` is the context menu where the plugin will be added. + +See :ref:`ContextMenuSlot` for available context menus. A plugin instance can belong only to a single context menu slot. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorPlugin_method_add_control_to_bottom_panel: .. rst-class:: classref-method @@ -1461,6 +1479,18 @@ Removes an Autoload ``name`` from the list. ---- +.. _class_EditorPlugin_method_remove_context_menu_plugin: + +.. rst-class:: classref-method + +|void| **remove_context_menu_plugin**\ (\ plugin\: :ref:`EditorContextMenuPlugin`\ ) :ref:`šŸ”—` + +Removes the specified context menu plugin. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorPlugin_method_remove_control_from_bottom_panel: .. rst-class:: classref-method @@ -1563,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_editorresourcepreviewgenerator.rst b/classes/class_editorresourcepreviewgenerator.rst index 6229916f434..016c9d3a007 100644 --- a/classes/class_editorresourcepreviewgenerator.rst +++ b/classes/class_editorresourcepreviewgenerator.rst @@ -72,7 +72,7 @@ By default, it returns ``false``. Generate a preview from a given resource with the specified size. This must always be implemented. -Returning an empty texture is an OK way to fail and let another generator take care. +Returning ``null`` is an OK way to fail and let another generator take care. Care must be taken because this function is always called from a thread (not the main thread). @@ -90,7 +90,7 @@ Care must be taken because this function is always called from a thread (not the Generate a preview directly from a path with the specified size. Implementing this is optional, as default code will load and call :ref:`_generate`. -Returning an empty texture is an OK way to fail and let another generator take care. +Returning ``null`` is an OK way to fail and let another generator take care. Care must be taken because this function is always called from a thread (not the main thread). diff --git a/classes/class_editorsettings.rst b/classes/class_editorsettings.rst index eb992a93235..cd423a9861d 100644 --- a/classes/class_editorsettings.rst +++ b/classes/class_editorsettings.rst @@ -58,6 +58,8 @@ Properties .. table:: :widths: auto + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`asset_library/use_threads` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`debugger/auto_switch_to_remote_scene_tree` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -67,12 +69,16 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`debugger/profiler_frame_max_functions` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debugger/profiler_target_fps` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`debugger/remote_inspect_refresh_interval` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`debugger/remote_scene_tree_refresh_interval` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`docks/filesystem/always_show_folders` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`docks/filesystem/other_file_extensions` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`docks/filesystem/textfile_extensions` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`docks/filesystem/thumbnail_size` | @@ -81,6 +87,10 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`docks/property_editor/subresource_hue_tint` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`docks/scene_tree/ask_before_deleting_related_animation_tracks` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`docks/scene_tree/ask_before_revoking_unique_name` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`docks/scene_tree/auto_expand_to_selected` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`docks/scene_tree/center_node_on_reparent` | @@ -145,6 +155,10 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`editors/3d/grid_yz_plane` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`editors/3d/manipulator_gizmo_opacity` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/3d/manipulator_gizmo_size` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`editors/3d/navigation/emulate_3_button_mouse` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`editors/3d/navigation/emulate_numpad` | @@ -159,6 +173,10 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`editors/3d/navigation/pan_mouse_button` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/3d/navigation/show_viewport_navigation_gizmo` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/3d/navigation/show_viewport_rotation_gizmo` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`editors/3d/navigation/warped_mouse_panning` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`editors/3d/navigation/zoom_mouse_button` | @@ -183,10 +201,54 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/aabb` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/camera` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/csg` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/decal` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/fog_volume` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/instantiated` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/joint` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/joint_body_a` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/joint_body_b` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/lightmap_lines` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/lightprobe_lines` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/occluder` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/particle_attractor` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/particle_collision` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/particles` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/path_tilt` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/reflection_probe` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/selected_bone` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/skeleton` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/stream_player_3d` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/visibility_notifier` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/voxel_gi` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`editors/3d_gizmos/gizmo_settings/bone_axis_length` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/3d_gizmos/gizmo_settings/bone_shape` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`editors/3d_gizmos/gizmo_settings/path3d_tilt_disk_size` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`editors/animation/autorename_animation_tracks` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`editors/animation/confirm_insert_track` | @@ -199,8 +261,22 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`editors/animation/onion_layers_past_color` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/bone_mapper/handle_colors/error` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/bone_mapper/handle_colors/missing` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/bone_mapper/handle_colors/set` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/bone_mapper/handle_colors/unset` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/grid_map/editor_side` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/grid_map/palette_min_width` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`editors/grid_map/pick_distance` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/grid_map/preview_size` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`editors/panning/2d_editor_pan_speed` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`editors/panning/2d_editor_panning_scheme` | @@ -273,6 +349,10 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`editors/visual_editors/visual_shader/port_preview_size` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`export/ssh/scp` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`export/ssh/ssh` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`filesystem/directories/autoscan_project_path` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`filesystem/directories/default_project_path` | @@ -295,6 +375,10 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`filesystem/file_dialog/thumbnail_size` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`filesystem/file_server/password` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`filesystem/file_server/port` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`filesystem/import/blender/blender_path` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`filesystem/import/blender/rpc_port` | @@ -393,6 +477,10 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`interface/editor/vsync_mode` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/editors/derive_script_globals_by_name` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/editors/show_scene_tree_root_selection` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`interface/inspector/auto_unfold_foreign_scenes` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`interface/inspector/default_color_picker_mode` | @@ -563,12 +651,16 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`text_editor/appearance/whitespace/line_spacing` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/behavior/files/auto_reload_and_parse_scripts_on_save` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`text_editor/behavior/files/auto_reload_scripts_on_external_change` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`text_editor/behavior/files/autosave_interval_secs` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`text_editor/behavior/files/convert_indent_on_save` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/behavior/files/open_dominant_script_on_scene_change` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`text_editor/behavior/files/restore_scripts_on_load` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`text_editor/behavior/files/trim_final_newlines_on_save` | @@ -625,6 +717,12 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`text_editor/completion/use_single_quotes` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`text_editor/external/exec_flags` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`text_editor/external/exec_path` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/external/use_external_editor` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`text_editor/help/class_reference_examples` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`text_editor/help/help_font_size` | @@ -635,10 +733,22 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`text_editor/help/show_help_index` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/help/sort_functions_alphabetically` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/script_list/group_help_pages` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`text_editor/script_list/list_script_names_as` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/script_list/script_temperature_enabled` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`text_editor/script_list/script_temperature_history_size` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`text_editor/script_list/show_members_overview` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`text_editor/script_list/sort_members_outline_alphabetically` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`text_editor/script_list/sort_scripts_by` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`text_editor/theme/color_theme` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`text_editor/theme/highlighting/background_color` | @@ -717,6 +827,14 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`text_editor/theme/highlighting/word_highlighted_color` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`text_editor/theme/line_spacing` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`version_control/ssh_private_key_path` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`version_control/ssh_public_key_path` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`version_control/username` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -803,6 +921,18 @@ Emitted after any editor setting has changed. It's used by various editor plugin Property Descriptions --------------------- +.. _class_EditorSettings_property_asset_library/use_threads: + +.. rst-class:: classref-property + +:ref:`bool` **asset_library/use_threads** :ref:`šŸ”—` + +If ``true``, the Asset Library uses multiple threads for its HTTP requests. This prevents the Asset Library from blocking the main thread for every loaded asset. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_debugger/auto_switch_to_remote_scene_tree: .. rst-class:: classref-property @@ -811,6 +941,8 @@ Property Descriptions 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 ---- @@ -853,6 +985,18 @@ The maximum number of script functions that can be displayed per frame in the pr ---- +.. _class_EditorSettings_property_debugger/profiler_target_fps: + +.. rst-class:: classref-property + +:ref:`int` **debugger/profiler_target_fps** :ref:`šŸ”—` + +The target frame rate shown in the visual profiler graph, in frames per second. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_debugger/remote_inspect_refresh_interval: .. rst-class:: classref-property @@ -891,13 +1035,25 @@ If ``true``, displays folders in the FileSystem dock's bottom pane when split mo ---- +.. _class_EditorSettings_property_docks/filesystem/other_file_extensions: + +.. rst-class:: classref-property + +:ref:`String` **docks/filesystem/other_file_extensions** :ref:`šŸ”—` + +A comma separated list of unsupported file extensions to show in the FileSystem dock, e.g. ``"ico,icns"``. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_docks/filesystem/textfile_extensions: .. rst-class:: classref-property :ref:`String` **docks/filesystem/textfile_extensions** :ref:`šŸ”—` -List of file extensions to consider as editable text files in the FileSystem dock (by double-clicking on the files). +A comma separated list of file extensions to consider as editable text files in the FileSystem dock (by double-clicking on the files), e.g. ``"txt,md,cfg,ini,log,json,yml,yaml,toml,xml"``. .. rst-class:: classref-item-separator @@ -939,6 +1095,30 @@ The tint intensity to use for the subresources background in the Inspector dock. ---- +.. _class_EditorSettings_property_docks/scene_tree/ask_before_deleting_related_animation_tracks: + +.. rst-class:: classref-property + +:ref:`bool` **docks/scene_tree/ask_before_deleting_related_animation_tracks** :ref:`šŸ”—` + +If ``true``, when a node is deleted with animation tracks referencing it, a confirmation dialog appears before the tracks are deleted. The dialog will appear even when using the "Delete (No Confirm)" shortcut. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_docks/scene_tree/ask_before_revoking_unique_name: + +.. rst-class:: classref-property + +:ref:`bool` **docks/scene_tree/ask_before_revoking_unique_name** :ref:`šŸ”—` + +If ``true``, displays a confirmation dialog before left-clicking the "percent" icon next to a node name in the Scene tree dock. When clicked, this icon revokes the node's scene-unique name, which can impact the behavior of scripts that rely on this scene-unique name due to identifiers not being found anymore. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_docks/scene_tree/auto_expand_to_selected: .. rst-class:: classref-property @@ -1341,6 +1521,30 @@ If ``true``, renders the grid on the YZ plane in perspective view. This can be u ---- +.. _class_EditorSettings_property_editors/3d/manipulator_gizmo_opacity: + +.. rst-class:: classref-property + +:ref:`float` **editors/3d/manipulator_gizmo_opacity** :ref:`šŸ”—` + +Opacity of the default gizmo for moving, rotating, and scaling 3D nodes. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_editors/3d/manipulator_gizmo_size: + +.. rst-class:: classref-property + +:ref:`int` **editors/3d/manipulator_gizmo_size** :ref:`šŸ”—` + +Size of the default gizmo for moving, rotating, and scaling 3D nodes. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_editors/3d/navigation/emulate_3_button_mouse: .. rst-class:: classref-property @@ -1439,6 +1643,30 @@ The mouse button that needs to be held down to pan in the 3D editor viewport. ---- +.. _class_EditorSettings_property_editors/3d/navigation/show_viewport_navigation_gizmo: + +.. rst-class:: classref-property + +:ref:`bool` **editors/3d/navigation/show_viewport_navigation_gizmo** :ref:`šŸ”—` + +If ``true``, shows gizmos for moving and rotating the camera in the bottom corners of the 3D editor's viewport. Useful for devices that use touch screen. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_editors/3d/navigation/show_viewport_rotation_gizmo: + +.. rst-class:: classref-property + +:ref:`bool` **editors/3d/navigation/show_viewport_rotation_gizmo** :ref:`šŸ”—` + +If ``true``, shows a small orientation gizmo in the top-right corner of the 3D editor's viewports. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_editors/3d/navigation/warped_mouse_panning: .. rst-class:: classref-property @@ -1529,165 +1757,521 @@ The inertia to use when zooming in the 3D editor. Higher values make the camera :ref:`Color` **editors/3d/primary_grid_color** :ref:`šŸ”—` -The color to use for the primary 3D grid. The color's alpha channel affects the grid's opacity. +The color to use for the primary 3D grid. The color's alpha channel affects the grid's opacity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_editors/3d/primary_grid_steps: + +.. rst-class:: classref-property + +:ref:`int` **editors/3d/primary_grid_steps** :ref:`šŸ”—` + +If set above 0, where a primary grid line should be drawn. By default, primary lines are configured to be more visible than secondary lines. This helps with measurements in the 3D editor. See also :ref:`editors/3d/primary_grid_color` and :ref:`editors/3d/secondary_grid_color`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_editors/3d/secondary_grid_color: + +.. rst-class:: classref-property + +:ref:`Color` **editors/3d/secondary_grid_color** :ref:`šŸ”—` + +The color to use for the secondary 3D grid. This is generally a less visible color than :ref:`editors/3d/primary_grid_color`. The color's alpha channel affects the grid's opacity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_editors/3d/selection_box_color: + +.. rst-class:: classref-property + +:ref:`Color` **editors/3d/selection_box_color** :ref:`šŸ”—` + +The color to use for the selection box that surrounds selected nodes in the 3D editor viewport. The color's alpha channel influences the selection box's opacity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/aabb: + +.. rst-class:: classref-property + +:ref:`Color` **editors/3d_gizmos/gizmo_colors/aabb** :ref:`šŸ”—` + +The color to use for the AABB gizmo that displays the :ref:`GeometryInstance3D`'s custom :ref:`AABB`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/camera: + +.. rst-class:: classref-property + +:ref:`Color` **editors/3d_gizmos/gizmo_colors/camera** :ref:`šŸ”—` + +The 3D editor gizmo color for :ref:`Camera3D`\ s. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/csg: + +.. rst-class:: classref-property + +:ref:`Color` **editors/3d_gizmos/gizmo_colors/csg** :ref:`šŸ”—` + +The 3D editor gizmo color for CSG nodes (such as :ref:`CSGShape3D` or :ref:`CSGBox3D`). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/decal: + +.. rst-class:: classref-property + +:ref:`Color` **editors/3d_gizmos/gizmo_colors/decal** :ref:`šŸ”—` + +The 3D editor gizmo color for :ref:`Decal` nodes. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/fog_volume: + +.. rst-class:: classref-property + +:ref:`Color` **editors/3d_gizmos/gizmo_colors/fog_volume** :ref:`šŸ”—` + +The 3D editor gizmo color for :ref:`FogVolume` nodes. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/instantiated: + +.. rst-class:: classref-property + +:ref:`Color` **editors/3d_gizmos/gizmo_colors/instantiated** :ref:`šŸ”—` + +The color override to use for 3D editor gizmos if the :ref:`Node3D` in question is part of an instantiated scene file (from the perspective of the current scene). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/joint: + +.. rst-class:: classref-property + +:ref:`Color` **editors/3d_gizmos/gizmo_colors/joint** :ref:`šŸ”—` + +The 3D editor gizmo color for :ref:`Joint3D`\ s and :ref:`PhysicalBone3D`\ s. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/joint_body_a: + +.. rst-class:: classref-property + +:ref:`Color` **editors/3d_gizmos/gizmo_colors/joint_body_a** :ref:`šŸ”—` + +Color for representing :ref:`Joint3D.node_a` for some :ref:`Joint3D` types. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/joint_body_b: + +.. rst-class:: classref-property + +:ref:`Color` **editors/3d_gizmos/gizmo_colors/joint_body_b** :ref:`šŸ”—` + +Color for representing :ref:`Joint3D.node_b` for some :ref:`Joint3D` types. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/lightmap_lines: + +.. rst-class:: classref-property + +:ref:`Color` **editors/3d_gizmos/gizmo_colors/lightmap_lines** :ref:`šŸ”—` + +Color of lines displayed in baked :ref:`LightmapGI` node's grid. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/lightprobe_lines: + +.. rst-class:: classref-property + +:ref:`Color` **editors/3d_gizmos/gizmo_colors/lightprobe_lines** :ref:`šŸ”—` + +The 3D editor gizmo color used for :ref:`LightmapProbe` nodes. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/occluder: + +.. rst-class:: classref-property + +:ref:`Color` **editors/3d_gizmos/gizmo_colors/occluder** :ref:`šŸ”—` + +The 3D editor gizmo color used for :ref:`OccluderInstance3D` nodes. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/particle_attractor: + +.. rst-class:: classref-property + +:ref:`Color` **editors/3d_gizmos/gizmo_colors/particle_attractor** :ref:`šŸ”—` + +The 3D editor gizmo color used for :ref:`GPUParticlesAttractor3D` nodes. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/particle_collision: + +.. rst-class:: classref-property + +:ref:`Color` **editors/3d_gizmos/gizmo_colors/particle_collision** :ref:`šŸ”—` + +The 3D editor gizmo color used for :ref:`GPUParticlesCollision3D` nodes. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/particles: + +.. rst-class:: classref-property + +:ref:`Color` **editors/3d_gizmos/gizmo_colors/particles** :ref:`šŸ”—` + +The 3D editor gizmo color used for :ref:`CPUParticles3D` and :ref:`GPUParticles3D` nodes. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/path_tilt: + +.. rst-class:: classref-property + +:ref:`Color` **editors/3d_gizmos/gizmo_colors/path_tilt** :ref:`šŸ”—` + +The 3D editor gizmo color used for :ref:`Path3D` tilt circles, which indicate the direction the :ref:`Curve3D` is tilted towards. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/reflection_probe: + +.. rst-class:: classref-property + +:ref:`Color` **editors/3d_gizmos/gizmo_colors/reflection_probe** :ref:`šŸ”—` + +The 3D editor gizmo color used for :ref:`ReflectionProbe` nodes. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/selected_bone: + +.. rst-class:: classref-property + +:ref:`Color` **editors/3d_gizmos/gizmo_colors/selected_bone** :ref:`šŸ”—` + +The 3D editor gizmo color used for the currently selected :ref:`Skeleton3D` bone. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/skeleton: + +.. rst-class:: classref-property + +:ref:`Color` **editors/3d_gizmos/gizmo_colors/skeleton** :ref:`šŸ”—` + +The 3D editor gizmo color used for :ref:`Skeleton3D` nodes. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/stream_player_3d: + +.. rst-class:: classref-property + +:ref:`Color` **editors/3d_gizmos/gizmo_colors/stream_player_3d** :ref:`šŸ”—` + +The 3D editor gizmo color used for :ref:`AudioStreamPlayer3D`'s emission angle. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/visibility_notifier: + +.. rst-class:: classref-property + +:ref:`Color` **editors/3d_gizmos/gizmo_colors/visibility_notifier** :ref:`šŸ”—` + +The 3D editor gizmo color used for :ref:`VisibleOnScreenNotifier3D` and :ref:`VisibleOnScreenEnabler3D` nodes. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/voxel_gi: + +.. rst-class:: classref-property + +:ref:`Color` **editors/3d_gizmos/gizmo_colors/voxel_gi** :ref:`šŸ”—` + +The 3D editor gizmo color used for :ref:`VoxelGI` nodes. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_settings/bone_axis_length: + +.. rst-class:: classref-property + +:ref:`float` **editors/3d_gizmos/gizmo_settings/bone_axis_length** :ref:`šŸ”—` + +The length of :ref:`Skeleton3D` bone gizmos in the 3D editor. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_settings/bone_shape: + +.. rst-class:: classref-property + +:ref:`int` **editors/3d_gizmos/gizmo_settings/bone_shape** :ref:`šŸ”—` + +The shape of :ref:`Skeleton3D` bone gizmos in the 3D editor. **Wire** is a thin line, while **Octahedron** is a set of lines that represent a thicker hollow line pointing in a specific direction (similar to most 3D animation software). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_settings/path3d_tilt_disk_size: + +.. rst-class:: classref-property + +:ref:`float` **editors/3d_gizmos/gizmo_settings/path3d_tilt_disk_size** :ref:`šŸ”—` + +Size of the disk gizmo displayed when editing :ref:`Path3D`'s tilt handles. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_editors/animation/autorename_animation_tracks: + +.. rst-class:: classref-property + +:ref:`bool` **editors/animation/autorename_animation_tracks** :ref:`šŸ”—` + +If ``true``, automatically updates animation tracks' target paths when renaming or reparenting nodes in the Scene tree dock. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_editors/3d/primary_grid_steps: +.. _class_EditorSettings_property_editors/animation/confirm_insert_track: .. rst-class:: classref-property -:ref:`int` **editors/3d/primary_grid_steps** :ref:`šŸ”—` +:ref:`bool` **editors/animation/confirm_insert_track** :ref:`šŸ”—` -If set above 0, where a primary grid line should be drawn. By default, primary lines are configured to be more visible than secondary lines. This helps with measurements in the 3D editor. See also :ref:`editors/3d/primary_grid_color` and :ref:`editors/3d/secondary_grid_color`. +If ``true``, display a confirmation dialog when adding a new track to an animation by pressing the "key" icon next to a property. Holding Shift will bypass the dialog. + +If ``false``, the behavior is reversed, i.e. the dialog only appears when Shift is held. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_editors/3d/secondary_grid_color: +.. _class_EditorSettings_property_editors/animation/default_create_bezier_tracks: .. rst-class:: classref-property -:ref:`Color` **editors/3d/secondary_grid_color** :ref:`šŸ”—` +:ref:`bool` **editors/animation/default_create_bezier_tracks** :ref:`šŸ”—` -The color to use for the secondary 3D grid. This is generally a less visible color than :ref:`editors/3d/primary_grid_color`. The color's alpha channel affects the grid's opacity. +If ``true``, create a Bezier track instead of a standard track when pressing the "key" icon next to a property. Bezier tracks provide more control over animation curves, but are more difficult to adjust quickly. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_editors/3d/selection_box_color: +.. _class_EditorSettings_property_editors/animation/default_create_reset_tracks: .. rst-class:: classref-property -:ref:`Color` **editors/3d/selection_box_color** :ref:`šŸ”—` +:ref:`bool` **editors/animation/default_create_reset_tracks** :ref:`šŸ”—` -The color to use for the selection box that surrounds selected nodes in the 3D editor viewport. The color's alpha channel influences the selection box's opacity. +If ``true``, create a ``RESET`` track when creating a new animation track. This track can be used to restore the animation to a "default" state. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/aabb: +.. _class_EditorSettings_property_editors/animation/onion_layers_future_color: .. rst-class:: classref-property -:ref:`Color` **editors/3d_gizmos/gizmo_colors/aabb** :ref:`šŸ”—` +:ref:`Color` **editors/animation/onion_layers_future_color** :ref:`šŸ”—` -The color to use for the AABB gizmo that displays the :ref:`GeometryInstance3D`'s custom :ref:`AABB`. +The modulate color to use for "future" frames displayed in the animation editor's onion skinning feature. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/instantiated: +.. _class_EditorSettings_property_editors/animation/onion_layers_past_color: .. rst-class:: classref-property -:ref:`Color` **editors/3d_gizmos/gizmo_colors/instantiated** :ref:`šŸ”—` +:ref:`Color` **editors/animation/onion_layers_past_color** :ref:`šŸ”—` -The color override to use for 3D editor gizmos if the :ref:`Node3D` in question is part of an instantiated scene file (from the perspective of the current scene). +The modulate color to use for "past" frames displayed in the animation editor's onion skinning feature. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/joint: +.. _class_EditorSettings_property_editors/bone_mapper/handle_colors/error: .. rst-class:: classref-property -:ref:`Color` **editors/3d_gizmos/gizmo_colors/joint** :ref:`šŸ”—` +:ref:`Color` **editors/bone_mapper/handle_colors/error** :ref:`šŸ”—` -The 3D editor gizmo color for :ref:`Joint3D`\ s and :ref:`PhysicalBone3D`\ s. +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_editors/animation/autorename_animation_tracks: +.. _class_EditorSettings_property_editors/bone_mapper/handle_colors/missing: .. rst-class:: classref-property -:ref:`bool` **editors/animation/autorename_animation_tracks** :ref:`šŸ”—` +:ref:`Color` **editors/bone_mapper/handle_colors/missing** :ref:`šŸ”—` -If ``true``, automatically updates animation tracks' target paths when renaming or reparenting nodes in the Scene tree dock. +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_editors/animation/confirm_insert_track: +.. _class_EditorSettings_property_editors/bone_mapper/handle_colors/set: .. rst-class:: classref-property -:ref:`bool` **editors/animation/confirm_insert_track** :ref:`šŸ”—` +:ref:`Color` **editors/bone_mapper/handle_colors/set** :ref:`šŸ”—` -If ``true``, display a confirmation dialog when adding a new track to an animation by pressing the "key" icon next to a property. Holding Shift will bypass the dialog. +.. container:: contribute -If ``false``, the behavior is reversed, i.e. the dialog only appears when Shift is held. + There is currently no description for this property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_editors/animation/default_create_bezier_tracks: +.. _class_EditorSettings_property_editors/bone_mapper/handle_colors/unset: .. rst-class:: classref-property -:ref:`bool` **editors/animation/default_create_bezier_tracks** :ref:`šŸ”—` +:ref:`Color` **editors/bone_mapper/handle_colors/unset** :ref:`šŸ”—` -If ``true``, create a Bezier track instead of a standard track when pressing the "key" icon next to a property. Bezier tracks provide more control over animation curves, but are more difficult to adjust quickly. +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_editors/animation/default_create_reset_tracks: +.. _class_EditorSettings_property_editors/grid_map/editor_side: .. rst-class:: classref-property -:ref:`bool` **editors/animation/default_create_reset_tracks** :ref:`šŸ”—` +:ref:`int` **editors/grid_map/editor_side** :ref:`šŸ”—` -If ``true``, create a ``RESET`` track when creating a new animation track. This track can be used to restore the animation to a "default" state. +Specifies the side of 3D editor's viewport where GridMap's mesh palette will appear. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_editors/animation/onion_layers_future_color: +.. _class_EditorSettings_property_editors/grid_map/palette_min_width: .. rst-class:: classref-property -:ref:`Color` **editors/animation/onion_layers_future_color** :ref:`šŸ”—` +:ref:`int` **editors/grid_map/palette_min_width** :ref:`šŸ”—` -The modulate color to use for "future" frames displayed in the animation editor's onion skinning feature. +Minimum width of GridMap's mesh palette side panel. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_editors/animation/onion_layers_past_color: +.. _class_EditorSettings_property_editors/grid_map/pick_distance: .. rst-class:: classref-property -:ref:`Color` **editors/animation/onion_layers_past_color** :ref:`šŸ”—` +:ref:`float` **editors/grid_map/pick_distance** :ref:`šŸ”—` -The modulate color to use for "past" frames displayed in the animation editor's onion skinning feature. +The maximum distance at which tiles can be placed on a GridMap, relative to the camera position (in 3D units). .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_editors/grid_map/pick_distance: +.. _class_EditorSettings_property_editors/grid_map/preview_size: .. rst-class:: classref-property -:ref:`float` **editors/grid_map/pick_distance** :ref:`šŸ”—` +:ref:`int` **editors/grid_map/preview_size** :ref:`šŸ”—` -The maximum distance at which tiles can be placed on a GridMap, relative to the camera position (in 3D units). +Texture size of mesh previews generated for GridMap's MeshLibrary. .. rst-class:: classref-item-separator @@ -2127,6 +2711,32 @@ The size to use for port previews in the visual shader uniforms (toggled by clic ---- +.. _class_EditorSettings_property_export/ssh/scp: + +.. rst-class:: classref-property + +:ref:`String` **export/ssh/scp** :ref:`šŸ”—` + +Path to the SCP (secure copy) executable (used for remote deploy to desktop platforms). If left empty, the editor will attempt to run ``scp`` from ``PATH``. + +\ **Note:** SCP is not the same as SFTP. Specifying the SFTP executable here will not work. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_export/ssh/ssh: + +.. rst-class:: classref-property + +:ref:`String` **export/ssh/ssh** :ref:`šŸ”—` + +Path to the SSH executable (used for remote deploy to desktop platforms). If left empty, the editor will attempt to run ``ssh`` from ``PATH``. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_filesystem/directories/autoscan_project_path: .. rst-class:: classref-property @@ -2283,6 +2893,30 @@ The thumbnail size to use in the editor's file dialogs (in pixels). See also :re ---- +.. _class_EditorSettings_property_filesystem/file_server/password: + +.. rst-class:: classref-property + +:ref:`String` **filesystem/file_server/password** :ref:`šŸ”—` + +Password used for file server when exporting project with remote file system. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_filesystem/file_server/port: + +.. rst-class:: classref-property + +:ref:`int` **filesystem/file_server/port** :ref:`šŸ”—` + +Port used for file server when exporting project with remote file system. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_filesystem/import/blender/blender_path: .. rst-class:: classref-property @@ -2949,6 +3583,30 @@ Depending on the platform and used renderer, the engine will fall back to **Enab ---- +.. _class_EditorSettings_property_interface/editors/derive_script_globals_by_name: + +.. rst-class:: classref-property + +:ref:`bool` **interface/editors/derive_script_globals_by_name** :ref:`šŸ”—` + +If ``true``, when extending a script, the global class name of the script is inserted in the script creation dialog, if it exists. If ``false``, the script's file path is always inserted. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/editors/show_scene_tree_root_selection: + +.. rst-class:: classref-property + +:ref:`bool` **interface/editors/show_scene_tree_root_selection** :ref:`šŸ”—` + +If ``true``, the Scene dock will display buttons to quickly add a root node to a newly created scene. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_interface/inspector/auto_unfold_foreign_scenes: .. rst-class:: classref-property @@ -3025,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 @@ -3743,6 +4401,8 @@ Specifies how the Play window is launched relative to the Android editor. - **Side-by-side with Editor** will launch the Play window side-by-side with the Editor window. +- **Launch in PiP mode** will launch the Play window directly in picture-in-picture (PiP) mode if PiP mode is supported and enabled. When maximized, the Play window will occupy the same window as the Editor. + \ **Note:** Only available in the Android editor. .. rst-class:: classref-item-separator @@ -4045,6 +4705,18 @@ The space to add between lines (in pixels). Greater line spacing can help improv ---- +.. _class_EditorSettings_property_text_editor/behavior/files/auto_reload_and_parse_scripts_on_save: + +.. rst-class:: classref-property + +:ref:`bool` **text_editor/behavior/files/auto_reload_and_parse_scripts_on_save** :ref:`šŸ”—` + +If ``true``, tool scripts will be automatically soft-reloaded after they are saved. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_text_editor/behavior/files/auto_reload_scripts_on_external_change: .. rst-class:: classref-property @@ -4081,6 +4753,18 @@ If ``true``, converts indentation to match the script editor's indentation setti ---- +.. _class_EditorSettings_property_text_editor/behavior/files/open_dominant_script_on_scene_change: + +.. rst-class:: classref-property + +:ref:`bool` **text_editor/behavior/files/open_dominant_script_on_scene_change** :ref:`šŸ”—` + +If ``true``, opening a scene automatically opens the script attached to the root node, or the topmost node if the root has no script. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_text_editor/behavior/files/restore_scripts_on_load: .. rst-class:: classref-property @@ -4423,6 +5107,42 @@ If ``true``, performs string autocompletion with single quotes. If ``false``, pe ---- +.. _class_EditorSettings_property_text_editor/external/exec_flags: + +.. rst-class:: classref-property + +:ref:`String` **text_editor/external/exec_flags** :ref:`šŸ”—` + +The command-line arguments to pass to the external text editor that is run when :ref:`text_editor/external/use_external_editor` is ``true``. See also :ref:`text_editor/external/exec_path`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_text_editor/external/exec_path: + +.. rst-class:: classref-property + +:ref:`String` **text_editor/external/exec_path** :ref:`šŸ”—` + +The path to the text editor executable used to edit text files if :ref:`text_editor/external/use_external_editor` is ``true``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_text_editor/external/use_external_editor: + +.. rst-class:: classref-property + +:ref:`bool` **text_editor/external/use_external_editor** :ref:`šŸ”—` + +If ``true``, uses an external editor instead of the built-in Script Editor. See also :ref:`text_editor/external/exec_path` and :ref:`text_editor/external/exec_flags`. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_text_editor/help/class_reference_examples: .. rst-class:: classref-property @@ -4483,6 +5203,66 @@ If ``true``, displays a table of contents at the left of the editor help (at the ---- +.. _class_EditorSettings_property_text_editor/help/sort_functions_alphabetically: + +.. rst-class:: classref-property + +:ref:`bool` **text_editor/help/sort_functions_alphabetically** :ref:`šŸ”—` + +If ``true``, the script's method list in the Script Editor is sorted alphabetically. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_text_editor/script_list/group_help_pages: + +.. rst-class:: classref-property + +:ref:`bool` **text_editor/script_list/group_help_pages** :ref:`šŸ”—` + +If ``true``, class reference pages are grouped together at the bottom of the Script Editor's script list. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_text_editor/script_list/list_script_names_as: + +.. rst-class:: classref-property + +:ref:`int` **text_editor/script_list/list_script_names_as** :ref:`šŸ”—` + +Specifies how script paths should be displayed in Script Editor's script list. If using the "Name" option and some scripts share the same file name, more parts of their paths are revealed to avoid conflicts. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_text_editor/script_list/script_temperature_enabled: + +.. rst-class:: classref-property + +:ref:`bool` **text_editor/script_list/script_temperature_enabled** :ref:`šŸ”—` + +If ``true``, the names of recently opened scripts in the Script Editor are highlighted with the accent color, with its intensity based on how recently they were opened. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_text_editor/script_list/script_temperature_history_size: + +.. rst-class:: classref-property + +:ref:`int` **text_editor/script_list/script_temperature_history_size** :ref:`šŸ”—` + +How many script names can be highlighted at most, if :ref:`text_editor/script_list/script_temperature_enabled` is ``true``. Scripts older than this value use the default font color. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_text_editor/script_list/show_members_overview: .. rst-class:: classref-property @@ -4509,6 +5289,18 @@ If ``true``, sorts the members outline (located at the left of the script editor ---- +.. _class_EditorSettings_property_text_editor/script_list/sort_scripts_by: + +.. rst-class:: classref-property + +:ref:`int` **text_editor/script_list/sort_scripts_by** :ref:`šŸ”—` + +Specifies sorting used for Script Editor's open script list. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_text_editor/theme/color_theme: .. rst-class:: classref-property @@ -4987,6 +5779,54 @@ The script editor's color for user-defined types (using ``class_name``). The script editor's color for words highlighted by selecting them. Only visible if :ref:`text_editor/appearance/caret/highlight_all_occurrences` is ``true``. +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_text_editor/theme/line_spacing: + +.. rst-class:: classref-property + +:ref:`int` **text_editor/theme/line_spacing** :ref:`šŸ”—` + +The vertical line separation used in text editors, in pixels. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_version_control/ssh_private_key_path: + +.. rst-class:: classref-property + +:ref:`String` **version_control/ssh_private_key_path** :ref:`šŸ”—` + +Path to private SSH key file for the editor's Version Control integration credentials. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_version_control/ssh_public_key_path: + +.. rst-class:: classref-property + +:ref:`String` **version_control/ssh_public_key_path** :ref:`šŸ”—` + +Path to public SSH key file for the editor's Version Control integration credentials. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_version_control/username: + +.. rst-class:: classref-property + +:ref:`String` **version_control/username** :ref:`šŸ”—` + +Default username for editor's Version Control integration. + .. rst-class:: classref-section-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_gltfskeleton.rst b/classes/class_gltfskeleton.rst index 2c18ecaea1d..988e380374f 100644 --- a/classes/class_gltfskeleton.rst +++ b/classes/class_gltfskeleton.rst @@ -85,6 +85,8 @@ Property Descriptions There is currently no description for this property. Please help us by :ref:`contributing one `! +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt32Array` for more details. + .. rst-class:: classref-item-separator ---- @@ -104,6 +106,8 @@ Property Descriptions There is currently no description for this property. Please help us by :ref:`contributing one `! +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt32Array` for more details. + .. rst-class:: classref-section-separator ---- diff --git a/classes/class_gltfskin.rst b/classes/class_gltfskin.rst index fabbff6adeb..1a1b7201ee8 100644 --- a/classes/class_gltfskin.rst +++ b/classes/class_gltfskin.rst @@ -112,6 +112,8 @@ Property Descriptions There is currently no description for this property. Please help us by :ref:`contributing one `! +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt32Array` for more details. + .. rst-class:: classref-item-separator ---- @@ -131,6 +133,8 @@ Property Descriptions There is currently no description for this property. Please help us by :ref:`contributing one `! +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt32Array` for more details. + .. rst-class:: classref-item-separator ---- @@ -150,6 +154,8 @@ Property Descriptions There is currently no description for this property. Please help us by :ref:`contributing one `! +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt32Array` for more details. + .. rst-class:: classref-item-separator ---- @@ -169,6 +175,8 @@ Property Descriptions There is currently no description for this property. Please help us by :ref:`contributing one `! +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt32Array` for more details. + .. rst-class:: classref-item-separator ---- 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_javaclass.rst b/classes/class_javaclass.rst index ec46c89bd14..5ca861d1a7c 100644 --- a/classes/class_javaclass.rst +++ b/classes/class_javaclass.rst @@ -12,19 +12,76 @@ JavaClass **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Represents an object from the Java Native Interface. +Represents a class from the Java Native Interface. .. rst-class:: classref-introduction-group Description ----------- -Represents an object from the Java Native Interface. It is returned from :ref:`JavaClassWrapper.wrap`. +Represents a class from the Java Native Interface. It is returned from :ref:`JavaClassWrapper.wrap`. -\ **Note:** This class only works on Android. For any other build, this class does nothing. +\ **Note:** This class only works on Android. On any other platform, this class does nothing. \ **Note:** This class is not to be confused with :ref:`JavaScriptObject`. +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +------------------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_java_class_name`\ (\ ) |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`get_java_method_list`\ (\ ) |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`JavaClass` | :ref:`get_java_parent_class`\ (\ ) |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_JavaClass_method_get_java_class_name: + +.. rst-class:: classref-method + +:ref:`String` **get_java_class_name**\ (\ ) |const| :ref:`šŸ”—` + +Returns the Java class name. + +.. rst-class:: classref-item-separator + +---- + +.. _class_JavaClass_method_get_java_method_list: + +.. rst-class:: classref-method + +:ref:`Array`\[:ref:`Dictionary`\] **get_java_method_list**\ (\ ) |const| :ref:`šŸ”—` + +Returns the object's Java methods and their signatures as an :ref:`Array` of dictionaries, in the same format as :ref:`Object.get_method_list`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_JavaClass_method_get_java_parent_class: + +.. rst-class:: classref-method + +:ref:`JavaClass` **get_java_parent_class**\ (\ ) |const| :ref:`šŸ”—` + +Returns a **JavaClass** representing the Java parent class of this class. + .. |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_javaclasswrapper.rst b/classes/class_javaclasswrapper.rst index de7c0c2146c..dd228632d4b 100644 --- a/classes/class_javaclasswrapper.rst +++ b/classes/class_javaclasswrapper.rst @@ -23,6 +23,16 @@ The JavaClassWrapper singleton provides a way for the Godot application to send \ **Note:** This singleton is only available in Android builds. +:: + + var LocalDateTime = JavaClassWrapper.wrap("java.time.LocalDateTime") + var DateTimeFormatter = JavaClassWrapper.wrap("java.time.format.DateTimeFormatter") + + var datetime = LocalDateTime.now() + var formatter = DateTimeFormatter.ofPattern("dd-MM-yyyy HH:mm:ss") + + print(datetime.format(formatter)) + .. rst-class:: classref-reftable-group Methods diff --git a/classes/class_javaobject.rst b/classes/class_javaobject.rst new file mode 100644 index 00000000000..5a03e96075c --- /dev/null +++ b/classes/class_javaobject.rst @@ -0,0 +1,64 @@ +: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/JavaObject.xml. + +.. _class_JavaObject: + +JavaObject +========== + +**Inherits:** :ref:`RefCounted` **<** :ref:`Object` + +Represents an object from the Java Native Interface. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Represents an object from the Java Native Interface. It can be returned from Java methods called on :ref:`JavaClass` or other **JavaObject**\ s. See :ref:`JavaClassWrapper` for an example. + +\ **Note:** This class only works on Android. On any other platform, this class does nothing. + +\ **Note:** This class is not to be confused with :ref:`JavaScriptObject`. + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-----------------------------------+-----------------------------------------------------------------------------+ + | :ref:`JavaClass` | :ref:`get_java_class`\ (\ ) |const| | + +-----------------------------------+-----------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_JavaObject_method_get_java_class: + +.. rst-class:: classref-method + +:ref:`JavaClass` **get_java_class**\ (\ ) |const| :ref:`šŸ”—` + +Returns the :ref:`JavaClass` that this object is an instance of. + +.. |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_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 7dde88ddf5a..0f16330c1d7 100644 --- a/classes/class_lineedit.rst +++ b/classes/class_lineedit.rst @@ -22,7 +22,21 @@ An input field for single-line text. Description ----------- -**LineEdit** provides an input field for editing a single line of text. It features many built-in shortcuts that are always available (:kbd:`Ctrl` here maps to :kbd:`Cmd` on macOS): +**LineEdit** provides an input field for editing a single line of text. + +- When the **LineEdit** control is focused using the keyboard arrow keys, it will only gain focus and not enter edit mode. + +- To enter edit mode, click on the control with the mouse or press the "ui_text_submit" action (default: :kbd:`Enter` or :kbd:`Kp Enter`). + +- To exit edit mode, press "ui_text_submit" or "ui_cancel" (default: :kbd:`Escape`) actions. + +- Check :ref:`is_editing` and :ref:`editing_toggled` for more information. + +\ **Important:**\ + +- Focusing the **LineEdit** with "ui_focus_next" (default: :kbd:`Tab`) or "ui_focus_prev" (default: :kbd:`Shift + Tab`) or :ref:`Control.grab_focus` still enters edit mode (for compatibility). + +\ **LineEdit** features many built-in shortcuts that are always available (:kbd:`Ctrl` here maps to :kbd:`Cmd` on macOS): - :kbd:`Ctrl + C`: Copy @@ -148,6 +162,10 @@ Methods .. table:: :widths: auto + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`apply_ime`\ (\ ) | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`cancel_ime`\ (\ ) | +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`clear`\ (\ ) | +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ @@ -167,10 +185,18 @@ Methods +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_selection_to_column`\ (\ ) |const| | +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | :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| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_menu_visible`\ (\ ) |const| | +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`menu_option`\ (\ option\: :ref:`int`\ ) | @@ -235,6 +261,18 @@ Theme Properties Signals ------- +.. _class_LineEdit_signal_editing_toggled: + +.. rst-class:: classref-signal + +**editing_toggled**\ (\ toggled_on\: :ref:`bool`\ ) :ref:`šŸ”—` + +Emitted when the **LineEdit** switches in or out of edit mode. + +.. rst-class:: classref-item-separator + +---- + .. _class_LineEdit_signal_text_change_rejected: .. rst-class:: classref-signal @@ -1167,6 +1205,30 @@ Specifies the type of virtual keyboard to show. Method Descriptions ------------------- +.. _class_LineEdit_method_apply_ime: + +.. rst-class:: classref-method + +|void| **apply_ime**\ (\ ) :ref:`šŸ”—` + +Applies text from the `Input Method Editor `__ (IME) and closes the IME if it is open. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LineEdit_method_cancel_ime: + +.. rst-class:: classref-method + +|void| **cancel_ime**\ (\ ) :ref:`šŸ”—` + +Closes the `Input Method Editor `__ (IME) if it is open. Any text in the IME will be lost. + +.. rst-class:: classref-item-separator + +---- + .. _class_LineEdit_method_clear: .. rst-class:: classref-method @@ -1322,6 +1384,30 @@ Returns the selection end column. ---- +.. _class_LineEdit_method_has_ime_text: + +.. rst-class:: classref-method + +:ref:`bool` **has_ime_text**\ (\ ) |const| :ref:`šŸ”—` + +Returns ``true`` if the user has text in the `Input Method Editor `__ (IME). + +.. rst-class:: classref-item-separator + +---- + +.. _class_LineEdit_method_has_redo: + +.. rst-class:: classref-method + +:ref:`bool` **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 @@ -1334,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 @@ -1346,6 +1444,18 @@ Inserts ``text`` at the caret. If the resulting value is longer than :ref:`max_l ---- +.. _class_LineEdit_method_is_editing: + +.. rst-class:: classref-method + +:ref:`bool` **is_editing**\ (\ ) |const| :ref:`šŸ”—` + +Returns whether the **LineEdit** is being edited. + +.. rst-class:: classref-item-separator + +---- + .. _class_LineEdit_method_is_menu_visible: .. rst-class:: classref-method diff --git a/classes/class_menubar.rst b/classes/class_menubar.rst index 24c7825ed93..7d65e6fd3b8 100644 --- a/classes/class_menubar.rst +++ b/classes/class_menubar.rst @@ -12,14 +12,14 @@ MenuBar **Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -A horizontal menu bar that creates a :ref:`MenuButton` for each :ref:`PopupMenu` child. +A horizontal menu bar that creates a menu for each :ref:`PopupMenu` child. .. rst-class:: classref-introduction-group Description ----------- -A horizontal menu bar that creates a :ref:`MenuButton` for each :ref:`PopupMenu` child. New items are created by adding :ref:`PopupMenu`\ s to this node. +A horizontal menu bar that creates a menu for each :ref:`PopupMenu` child. New items are created by adding :ref:`PopupMenu`\ s to this node. .. rst-class:: classref-reftable-group @@ -185,6 +185,10 @@ Language code used for line-breaking and text shaping algorithms, if left empty If ``true``, **MenuBar** will use system global menu when supported. +\ **Note:** If ``true`` and global menu is supported, this node is not displayed, has zero size, and all its child nodes except :ref:`PopupMenu`\ s are inaccessible. + +\ **Note:** This property overrides the value of the :ref:`PopupMenu.prefer_native_menu` property of the child nodes. + .. rst-class:: classref-item-separator ---- @@ -200,7 +204,7 @@ If ``true``, **MenuBar** will use system global menu when supported. - |void| **set_start_index**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_start_index**\ (\ ) -Position in the global menu to insert first **MenuBar** item at. +Position order in the global menu to insert **MenuBar** items at. All menu items in the **MenuBar** are always inserted as a continuous range. Menus with lower :ref:`start_index` are inserted first. Menus with :ref:`start_index` equal to ``-1`` are inserted last. .. rst-class:: classref-item-separator diff --git a/classes/class_meshinstance3d.rst b/classes/class_meshinstance3d.rst index 604d6978821..26ed979ba97 100644 --- a/classes/class_meshinstance3d.rst +++ b/classes/class_meshinstance3d.rst @@ -63,6 +63,8 @@ Methods +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`ArrayMesh` | :ref:`bake_mesh_from_current_blend_shape_mix`\ (\ existing\: :ref:`ArrayMesh` = null\ ) | +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ArrayMesh` | :ref:`bake_mesh_from_current_skeleton_pose`\ (\ existing\: :ref:`ArrayMesh` = null\ ) | + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`create_convex_collision`\ (\ clean\: :ref:`bool` = true, simplify\: :ref:`bool` = false\ ) | +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`create_debug_tangents`\ (\ ) | @@ -169,6 +171,20 @@ Takes a snapshot from the current :ref:`ArrayMesh` with all ble ---- +.. _class_MeshInstance3D_method_bake_mesh_from_current_skeleton_pose: + +.. rst-class:: classref-method + +:ref:`ArrayMesh` **bake_mesh_from_current_skeleton_pose**\ (\ existing\: :ref:`ArrayMesh` = null\ ) :ref:`šŸ”—` + +Takes a snapshot of the current animated skeleton pose of the skinned mesh and bakes it to the provided ``existing`` mesh. If no ``existing`` mesh is provided a new :ref:`ArrayMesh` is created, baked, and returned. Requires a skeleton with a registered skin to work. Blendshapes are ignored. Mesh surface materials are not copied. + +\ **Performance:** :ref:`Mesh` data needs to be retrieved from the GPU, stalling the :ref:`RenderingServer` in the process. + +.. rst-class:: classref-item-separator + +---- + .. _class_MeshInstance3D_method_create_convex_collision: .. rst-class:: classref-method diff --git a/classes/class_multimesh.rst b/classes/class_multimesh.rst index 4dcf5ef822a..8cdee6bb9b4 100644 --- a/classes/class_multimesh.rst +++ b/classes/class_multimesh.rst @@ -194,6 +194,8 @@ Property Descriptions There is currently no description for this property. Please help us by :ref:`contributing one `! +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedFloat32Array` for more details. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_navigationserver2d.rst b/classes/class_navigationserver2d.rst index d0b2b4c41ad..62b3f76245f 100644 --- a/classes/class_navigationserver2d.rst +++ b/classes/class_navigationserver2d.rst @@ -253,6 +253,8 @@ Methods +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`region_create`\ (\ ) | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`region_get_closest_point`\ (\ region\: :ref:`RID`, to_point\: :ref:`Vector2`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`region_get_connection_pathway_end`\ (\ region\: :ref:`RID`, connection\: :ref:`int`\ ) |const| | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`region_get_connection_pathway_start`\ (\ region\: :ref:`RID`, connection\: :ref:`int`\ ) |const| | @@ -1104,7 +1106,7 @@ Returns the map cell size used to rasterize the navigation mesh vertices. :ref:`Vector2` **map_get_closest_point**\ (\ map\: :ref:`RID`, to_point\: :ref:`Vector2`\ ) |const| :ref:`šŸ”—` -Returns the point closest to the provided ``to_point`` on the navigation mesh surface. +Returns the navigation mesh surface point closest to the provided ``to_point`` on the navigation ``map``. .. rst-class:: classref-item-separator @@ -1116,7 +1118,7 @@ Returns the point closest to the provided ``to_point`` on the navigation mesh su :ref:`RID` **map_get_closest_point_owner**\ (\ map\: :ref:`RID`, to_point\: :ref:`Vector2`\ ) |const| :ref:`šŸ”—` -Returns the owner region RID for the point returned by :ref:`map_get_closest_point`. +Returns the owner region RID for the navigation mesh surface point closest to the provided ``to_point`` on the navigation ``map``. .. rst-class:: classref-item-separator @@ -1552,6 +1554,18 @@ Creates a new region. ---- +.. _class_NavigationServer2D_method_region_get_closest_point: + +.. rst-class:: classref-method + +:ref:`Vector2` **region_get_closest_point**\ (\ region\: :ref:`RID`, to_point\: :ref:`Vector2`\ ) |const| :ref:`šŸ”—` + +Returns the navigation mesh surface point closest to the provided ``to_point`` on the navigation ``region``. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer2D_method_region_get_connection_pathway_end: .. rst-class:: classref-method diff --git a/classes/class_navigationserver3d.rst b/classes/class_navigationserver3d.rst index d6462951ddb..c9fdd9b7207 100644 --- a/classes/class_navigationserver3d.rst +++ b/classes/class_navigationserver3d.rst @@ -289,6 +289,12 @@ Methods +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`region_create`\ (\ ) | +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`region_get_closest_point`\ (\ region\: :ref:`RID`, to_point\: :ref:`Vector3`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`region_get_closest_point_normal`\ (\ region\: :ref:`RID`, to_point\: :ref:`Vector3`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`region_get_closest_point_to_segment`\ (\ region\: :ref:`RID`, start\: :ref:`Vector3`, end\: :ref:`Vector3`, use_collision\: :ref:`bool` = false\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`region_get_connection_pathway_end`\ (\ region\: :ref:`RID`, connection\: :ref:`int`\ ) |const| | +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`region_get_connection_pathway_start`\ (\ region\: :ref:`RID`, connection\: :ref:`int`\ ) |const| | @@ -1325,7 +1331,7 @@ Returns the map cell size used to rasterize the navigation mesh vertices on the :ref:`Vector3` **map_get_closest_point**\ (\ map\: :ref:`RID`, to_point\: :ref:`Vector3`\ ) |const| :ref:`šŸ”—` -Returns the point closest to the provided ``to_point`` on the navigation mesh surface. +Returns the navigation mesh surface point closest to the provided ``to_point`` on the navigation ``map``. .. rst-class:: classref-item-separator @@ -1337,7 +1343,7 @@ Returns the point closest to the provided ``to_point`` on the navigation mesh su :ref:`Vector3` **map_get_closest_point_normal**\ (\ map\: :ref:`RID`, to_point\: :ref:`Vector3`\ ) |const| :ref:`šŸ”—` -Returns the normal for the point returned by :ref:`map_get_closest_point`. +Returns the navigation mesh surface normal closest to the provided ``to_point`` on the navigation ``map``. .. rst-class:: classref-item-separator @@ -1349,7 +1355,7 @@ Returns the normal for the point returned by :ref:`map_get_closest_point` **map_get_closest_point_owner**\ (\ map\: :ref:`RID`, to_point\: :ref:`Vector3`\ ) |const| :ref:`šŸ”—` -Returns the owner region RID for the point returned by :ref:`map_get_closest_point`. +Returns the owner region RID for the navigation mesh surface point closest to the provided ``to_point`` on the navigation ``map``. .. rst-class:: classref-item-separator @@ -1361,7 +1367,9 @@ Returns the owner region RID for the point returned by :ref:`map_get_closest_poi :ref:`Vector3` **map_get_closest_point_to_segment**\ (\ map\: :ref:`RID`, start\: :ref:`Vector3`, end\: :ref:`Vector3`, use_collision\: :ref:`bool` = false\ ) |const| :ref:`šŸ”—` -Returns the closest point between the navigation surface and the segment. +Returns the navigation mesh surface point closest to the provided ``start`` and ``end`` segment on the navigation ``map``. + +If ``use_collision`` is ``true``, a closest point test is only done when the segment intersects with the navigation mesh surface. .. rst-class:: classref-item-separator @@ -1919,6 +1927,44 @@ Creates a new region. ---- +.. _class_NavigationServer3D_method_region_get_closest_point: + +.. rst-class:: classref-method + +:ref:`Vector3` **region_get_closest_point**\ (\ region\: :ref:`RID`, to_point\: :ref:`Vector3`\ ) |const| :ref:`šŸ”—` + +Returns the navigation mesh surface point closest to the provided ``to_point`` on the navigation ``region``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_region_get_closest_point_normal: + +.. rst-class:: classref-method + +:ref:`Vector3` **region_get_closest_point_normal**\ (\ region\: :ref:`RID`, to_point\: :ref:`Vector3`\ ) |const| :ref:`šŸ”—` + +Returns the navigation mesh surface normal closest to the provided ``to_point`` on the navigation ``region``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_region_get_closest_point_to_segment: + +.. rst-class:: classref-method + +:ref:`Vector3` **region_get_closest_point_to_segment**\ (\ region\: :ref:`RID`, start\: :ref:`Vector3`, end\: :ref:`Vector3`, use_collision\: :ref:`bool` = false\ ) |const| :ref:`šŸ”—` + +Returns the navigation mesh surface point closest to the provided ``start`` and ``end`` segment on the navigation ``region``. + +If ``use_collision`` is ``true``, a closest point test is only done when the segment intersects with the navigation mesh surface. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer3D_method_region_get_connection_pathway_end: .. 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_node2d.rst b/classes/class_node2d.rst index a48128eb7cc..97b8fc04d79 100644 --- a/classes/class_node2d.rst +++ b/classes/class_node2d.rst @@ -118,7 +118,7 @@ Property Descriptions - |void| **set_global_position**\ (\ value\: :ref:`Vector2`\ ) - :ref:`Vector2` **get_global_position**\ (\ ) -Global position. +Global position. See also :ref:`position`. .. rst-class:: classref-item-separator @@ -135,7 +135,7 @@ Global position. - |void| **set_global_rotation**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_global_rotation**\ (\ ) -Global rotation in radians. +Global rotation in radians. See also :ref:`rotation`. .. rst-class:: classref-item-separator @@ -152,7 +152,7 @@ Global rotation in radians. - |void| **set_global_rotation_degrees**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_global_rotation_degrees**\ (\ ) -Helper property to access :ref:`global_rotation` in degrees instead of radians. +Helper property to access :ref:`global_rotation` in degrees instead of radians. See also :ref:`rotation_degrees`. .. rst-class:: classref-item-separator @@ -169,7 +169,7 @@ Helper property to access :ref:`global_rotation`\ ) - :ref:`Vector2` **get_global_scale**\ (\ ) -Global scale. +Global scale. See also :ref:`scale`. .. rst-class:: classref-item-separator @@ -186,7 +186,7 @@ Global scale. - |void| **set_global_skew**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_global_skew**\ (\ ) -Global skew in radians. +Global skew in radians. See also :ref:`skew`. .. rst-class:: classref-item-separator @@ -203,7 +203,7 @@ Global skew in radians. - |void| **set_global_transform**\ (\ value\: :ref:`Transform2D`\ ) - :ref:`Transform2D` **get_global_transform**\ (\ ) -Global :ref:`Transform2D`. +Global :ref:`Transform2D`. See also :ref:`transform`. .. rst-class:: classref-item-separator @@ -220,7 +220,7 @@ Global :ref:`Transform2D`. - |void| **set_position**\ (\ value\: :ref:`Vector2`\ ) - :ref:`Vector2` **get_position**\ (\ ) -Position, relative to the node's parent. +Position, relative to the node's parent. See also :ref:`global_position`. .. rst-class:: classref-item-separator @@ -237,7 +237,7 @@ Position, relative to the node's parent. - |void| **set_rotation**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_rotation**\ (\ ) -Rotation in radians, relative to the node's parent. +Rotation in radians, relative to the node's parent. See also :ref:`global_rotation`. \ **Note:** This property is edited in the inspector in degrees. If you want to use degrees in a script, use :ref:`rotation_degrees`. @@ -256,7 +256,7 @@ Rotation in radians, relative to the node's parent. - |void| **set_rotation_degrees**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_rotation_degrees**\ (\ ) -Helper property to access :ref:`rotation` in degrees instead of radians. +Helper property to access :ref:`rotation` in degrees instead of radians. See also :ref:`global_rotation_degrees`. .. rst-class:: classref-item-separator @@ -273,7 +273,7 @@ Helper property to access :ref:`rotation` in deg - |void| **set_scale**\ (\ value\: :ref:`Vector2`\ ) - :ref:`Vector2` **get_scale**\ (\ ) -The node's scale. Unscaled value: ``(1, 1)``. +The node's scale, relative to the node's parent. Unscaled value: ``(1, 1)``. See also :ref:`global_scale`. \ **Note:** Negative X scales in 2D are not decomposable from the transformation matrix. Due to the way scale is represented with transformation matrices in Godot, negative scales on the X axis will be changed to negative scales on the Y axis and a rotation of 180 degrees when decomposed. @@ -292,9 +292,11 @@ The node's scale. Unscaled value: ``(1, 1)``. - |void| **set_skew**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_skew**\ (\ ) -Slants the node. +If set to a non-zero value, slants the node in one direction or another. This can be used for pseudo-3D effects. See also :ref:`global_skew`. -\ **Note:** Skew is X axis only. +\ **Note:** Skew is performed on the X axis only, and *between* rotation and scaling. + +\ **Note:** This property is edited in the inspector in degrees. If you want to use degrees in a script, use ``skew = deg_to_rad(value_in_degrees)``. .. rst-class:: classref-item-separator @@ -311,7 +313,7 @@ Slants the node. - |void| **set_transform**\ (\ value\: :ref:`Transform2D`\ ) - :ref:`Transform2D` **get_transform**\ (\ ) -Local :ref:`Transform2D`. +The node's :ref:`Transform2D`, relative to the node's parent. See also :ref:`global_transform`. .. rst-class:: classref-section-separator diff --git a/classes/class_object.rst b/classes/class_object.rst index 9d20aa9ff59..7043c687915 100644 --- a/classes/class_object.rst +++ b/classes/class_object.rst @@ -75,6 +75,12 @@ Methods +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_init`\ (\ ) |virtual| | +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_iter_get`\ (\ iter\: :ref:`Variant`\ ) |virtual| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_iter_init`\ (\ iter\: :ref:`Array`\ ) |virtual| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_iter_next`\ (\ iter\: :ref:`Array`\ ) |virtual| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_notification`\ (\ what\: :ref:`int`\ ) |virtual| | +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`_property_can_revert`\ (\ property\: :ref:`StringName`\ ) |virtual| | @@ -133,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| | @@ -175,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| | @@ -283,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: @@ -499,6 +509,73 @@ Called when the object's script is instantiated, oftentimes after the object is ---- +.. _class_Object_private_method__iter_get: + +.. rst-class:: classref-method + +:ref:`Variant` **_iter_get**\ (\ iter\: :ref:`Variant`\ ) |virtual| :ref:`šŸ”—` + +Returns the current iterable value. ``iter`` stores the iteration state, but unlike :ref:`_iter_init` and :ref:`_iter_next` the state is supposed to be read-only, so there is no :ref:`Array` wrapper. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Object_private_method__iter_init: + +.. rst-class:: classref-method + +:ref:`bool` **_iter_init**\ (\ iter\: :ref:`Array`\ ) |virtual| :ref:`šŸ”—` + +Initializes the iterator. ``iter`` stores the iteration state. Since GDScript does not support passing arguments by reference, a single-element array is used as a wrapper. Returns ``true`` so long as the iterator has not reached the end. + +Example: + +:: + + class MyRange: + var _from + var _to + + func _init(from, to): + assert(from <= to) + _from = from + _to = to + + func _iter_init(iter): + iter[0] = _from + return iter[0] < _to + + func _iter_next(iter): + iter[0] += 1 + return iter[0] < _to + + func _iter_get(iter): + return iter + + func _ready(): + var my_range = MyRange.new(2, 5) + for x in my_range: + print(x) # Prints 2, 3, 4. + +\ **Note:** Alternatively, you can ignore ``iter`` and use the object's state instead, see `online docs <../tutorials/scripting/gdscript/gdscript_advanced.html#custom-iterators>`__ for an example. Note that in this case you will not be able to reuse the same iterator instance in nested loops. Also, make sure you reset the iterator state in this method if you want to reuse the same instance multiple times. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Object_private_method__iter_next: + +.. rst-class:: classref-method + +:ref:`bool` **_iter_next**\ (\ iter\: :ref:`Array`\ ) |virtual| :ref:`šŸ”—` + +Moves the iterator to the next iteration. ``iter`` stores the iteration state. Since GDScript does not support passing arguments by reference, a single-element array is used as a wrapper. Returns ``true`` so long as the iterator has not reached the end. + +.. rst-class:: classref-item-separator + +---- + .. _class_Object_private_method__notification: .. rst-class:: classref-method @@ -1346,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 @@ -1743,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_openxrcompositionlayer.rst b/classes/class_openxrcompositionlayer.rst index 751e86fabe5..9d2e46260fc 100644 --- a/classes/class_openxrcompositionlayer.rst +++ b/classes/class_openxrcompositionlayer.rst @@ -35,15 +35,19 @@ Properties .. table:: :widths: auto - +---------------------------------------+-----------------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`alpha_blend` | ``false`` | - +---------------------------------------+-----------------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`enable_hole_punch` | ``false`` | - +---------------------------------------+-----------------------------------------------------------------------------------+-----------+ - | :ref:`SubViewport` | :ref:`layer_viewport` | | - +---------------------------------------+-----------------------------------------------------------------------------------+-----------+ - | :ref:`int` | :ref:`sort_order` | ``1`` | - +---------------------------------------+-----------------------------------------------------------------------------------+-----------+ + +---------------------------------------+-----------------------------------------------------------------------------------------+--------------------------+ + | :ref:`bool` | :ref:`alpha_blend` | ``false`` | + +---------------------------------------+-----------------------------------------------------------------------------------------+--------------------------+ + | :ref:`Vector2i` | :ref:`android_surface_size` | ``Vector2i(1024, 1024)`` | + +---------------------------------------+-----------------------------------------------------------------------------------------+--------------------------+ + | :ref:`bool` | :ref:`enable_hole_punch` | ``false`` | + +---------------------------------------+-----------------------------------------------------------------------------------------+--------------------------+ + | :ref:`SubViewport` | :ref:`layer_viewport` | | + +---------------------------------------+-----------------------------------------------------------------------------------------+--------------------------+ + | :ref:`int` | :ref:`sort_order` | ``1`` | + +---------------------------------------+-----------------------------------------------------------------------------------------+--------------------------+ + | :ref:`bool` | :ref:`use_android_surface` | ``false`` | + +---------------------------------------+-----------------------------------------------------------------------------------------+--------------------------+ .. rst-class:: classref-reftable-group @@ -53,11 +57,13 @@ Methods .. table:: :widths: auto - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`intersects_ray`\ (\ origin\: :ref:`Vector3`, direction\: :ref:`Vector3`\ ) |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_natively_supported`\ (\ ) |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`JavaObject` | :ref:`get_android_surface`\ (\ ) | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`intersects_ray`\ (\ origin\: :ref:`Vector3`, direction\: :ref:`Vector3`\ ) |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_natively_supported`\ (\ ) |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -87,6 +93,23 @@ Can be combined with :ref:`Viewport.transparent_bg` **android_surface_size** = ``Vector2i(1024, 1024)`` :ref:`šŸ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_android_surface_size**\ (\ value\: :ref:`Vector2i`\ ) +- :ref:`Vector2i` **get_android_surface_size**\ (\ ) + +The size of the Android surface to create if :ref:`use_android_surface` is enabled. + +.. rst-class:: classref-item-separator + +---- + .. _class_OpenXRCompositionLayer_property_enable_hole_punch: .. rst-class:: classref-property @@ -138,6 +161,27 @@ The sort order for this composition layer. Higher numbers will be shown in front \ **Note:** This will have no effect if a fallback mesh is being used. +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRCompositionLayer_property_use_android_surface: + +.. rst-class:: classref-property + +:ref:`bool` **use_android_surface** = ``false`` :ref:`šŸ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_use_android_surface**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_use_android_surface**\ (\ ) + +If enabled, an Android surface will be created (with the dimensions from :ref:`android_surface_size`) which will provide the 2D content for the composition layer, rather than using :ref:`layer_viewport`. + +See :ref:`get_android_surface` for information about how to get the surface so that your application can draw to it. + +\ **Note:** This will only work in Android builds. + .. rst-class:: classref-section-separator ---- @@ -147,6 +191,20 @@ The sort order for this composition layer. Higher numbers will be shown in front Method Descriptions ------------------- +.. _class_OpenXRCompositionLayer_method_get_android_surface: + +.. rst-class:: classref-method + +:ref:`JavaObject` **get_android_surface**\ (\ ) :ref:`šŸ”—` + +Returns a :ref:`JavaObject` representing an ``android.view.Surface`` if :ref:`use_android_surface` is enabled and OpenXR has created the surface. Otherwise, this will return ``null``. + +\ **Note:** The surface can only be created during an active OpenXR session. So, if :ref:`use_android_surface` is enabled outside of an OpenXR session, it won't be created until a new session fully starts. + +.. rst-class:: classref-item-separator + +---- + .. _class_OpenXRCompositionLayer_method_intersects_ray: .. rst-class:: classref-method diff --git a/classes/class_os.rst b/classes/class_os.rst index eb00f225a53..c3376160375 100644 --- a/classes/class_os.rst +++ b/classes/class_os.rst @@ -71,7 +71,7 @@ Methods +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`execute`\ (\ path\: :ref:`String`, arguments\: :ref:`PackedStringArray`, output\: :ref:`Array` = [], read_stderr\: :ref:`bool` = false, open_console\: :ref:`bool` = false\ ) | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`execute_with_pipe`\ (\ path\: :ref:`String`, arguments\: :ref:`PackedStringArray`\ ) | + | :ref:`Dictionary` | :ref:`execute_with_pipe`\ (\ path\: :ref:`String`, arguments\: :ref:`PackedStringArray`, blocking\: :ref:`bool` = true\ ) | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Key` | :ref:`find_keycode_from_string`\ (\ string\: :ref:`String`\ ) |const| | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -581,10 +581,12 @@ If you wish to access a shell built-in or execute a composite command, a platfor .. rst-class:: classref-method -:ref:`Dictionary` **execute_with_pipe**\ (\ path\: :ref:`String`, arguments\: :ref:`PackedStringArray`\ ) :ref:`šŸ”—` +:ref:`Dictionary` **execute_with_pipe**\ (\ path\: :ref:`String`, arguments\: :ref:`PackedStringArray`, blocking\: :ref:`bool` = true\ ) :ref:`šŸ”—` Creates a new process that runs independently of Godot with redirected IO. It will not terminate when Godot terminates. The path specified in ``path`` must exist and be an executable file or macOS ``.app`` bundle. The path is resolved based on the current platform. The ``arguments`` are used in the given order and separated by a space. +If ``blocking`` is ``false``, created pipes work in non-blocking mode, i.e. read and write operations will return immediately. Use :ref:`FileAccess.get_error` to check if the last read/write operation was successful. + If the process cannot be created, this method returns an empty :ref:`Dictionary`. Otherwise, this method returns a :ref:`Dictionary` with the following keys: - ``"stdio"`` - :ref:`FileAccess` to access the process stdin and stdout pipes (read/write). diff --git a/classes/class_particleprocessmaterial.rst b/classes/class_particleprocessmaterial.rst index 0ea83a1e990..e471fec0b67 100644 --- a/classes/class_particleprocessmaterial.rst +++ b/classes/class_particleprocessmaterial.rst @@ -100,6 +100,8 @@ Properties +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`Vector3` | :ref:`emission_ring_axis` | | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`emission_ring_cone_angle` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`float` | :ref:`emission_ring_height` | | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`float` | :ref:`emission_ring_inner_radius` | | @@ -1284,6 +1286,25 @@ The axis of the ring when using the emitter :ref:`EMISSION_SHAPE_RING` **emission_ring_cone_angle** :ref:`šŸ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_emission_ring_cone_angle**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_emission_ring_cone_angle**\ (\ ) + +The angle of the cone when using the emitter :ref:`EMISSION_SHAPE_RING`. The default angle of 90 degrees results in a ring, while an angle of 0 degrees results in a cone. Intermediate values will result in a ring where one end is larger than the other. + +\ **Note:** Depending on :ref:`emission_ring_height`, the angle may be clamped if the ring's end is reached to form a perfect cone. + +.. rst-class:: classref-item-separator + +---- + .. _class_ParticleProcessMaterial_property_emission_ring_height: .. rst-class:: classref-property diff --git a/classes/class_pathfollow2d.rst b/classes/class_pathfollow2d.rst index 16ecfbdfd0f..3f2e9391654 100644 --- a/classes/class_pathfollow2d.rst +++ b/classes/class_pathfollow2d.rst @@ -141,6 +141,8 @@ The distance along the path, in pixels. Changing this value sets this node's pos The distance along the path as a number in the range 0.0 (for the first vertex) to 1.0 (for the last). This is just another way of expressing the progress within the path, as the offset supplied is multiplied internally by the path's length. +It can be set or get only if the **PathFollow2D** is the child of a :ref:`Path2D` which is part of the scene tree, and that this :ref:`Path2D` has a :ref:`Curve2D` with a non-zero length. Otherwise, trying to set this field will print an error, and getting this field will return ``0.0``. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_pathfollow3d.rst b/classes/class_pathfollow3d.rst index 1323bd70faf..6aad313fb15 100644 --- a/classes/class_pathfollow3d.rst +++ b/classes/class_pathfollow3d.rst @@ -212,6 +212,8 @@ The distance from the first vertex, measured in 3D units along the path. Changin The distance from the first vertex, considering 0.0 as the first vertex and 1.0 as the last. This is just another way of expressing the progress within the path, as the progress supplied is multiplied internally by the path's length. +It can be set or get only if the **PathFollow3D** is the child of a :ref:`Path3D` which is part of the scene tree, and that this :ref:`Path3D` has a :ref:`Curve3D` with a non-zero length. Otherwise, trying to set this field will print an error, and getting this field will return ``0.0``. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_polygonpathfinder.rst b/classes/class_polygonpathfinder.rst index cf7319af0f3..50a410cad1e 100644 --- a/classes/class_polygonpathfinder.rst +++ b/classes/class_polygonpathfinder.rst @@ -127,9 +127,35 @@ Method Descriptions :ref:`bool` **is_point_inside**\ (\ point\: :ref:`Vector2`\ ) |const| :ref:`šŸ”—` -.. container:: contribute +Returns ``true`` if ``point`` falls inside the polygon area. + + +.. tabs:: + + .. code-tab:: gdscript + + var polygon_path_finder = PolygonPathFinder.new() + var points = [Vector2(0.0, 0.0), Vector2(1.0, 0.0), Vector2(0.0, 1.0)] + var connections = [0, 1, 1, 2, 2, 0] + polygon_path_finder.setup(points, connections) + print(polygon_path_finder.is_point_inside(Vector2(0.2, 0.2))) # Prints true + print(polygon_path_finder.is_point_inside(Vector2(1.0, 1.0))) # Prints false + + .. code-tab:: csharp + + var polygonPathFinder = new PolygonPathFinder(); + var points = new Vector2[] + { + new Vector2(0.0f, 0.0f), + new Vector2(1.0f, 0.0f), + new Vector2(0.0f, 1.0f) + }; + var connections = new int[] { 0, 1, 1, 2, 2, 0 }; + polygonPathFinder.Setup(points, connections); + GD.Print(polygonPathFinder.IsPointInside(new Vector2(0.2f, 0.2f))); // Prints true + GD.Print(polygonPathFinder.IsPointInside(new Vector2(1.0f, 1.0f))); // Prints false + - There is currently no description for this method. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator @@ -155,9 +181,33 @@ Method Descriptions |void| **setup**\ (\ points\: :ref:`PackedVector2Array`, connections\: :ref:`PackedInt32Array`\ ) :ref:`šŸ”—` -.. container:: contribute +Sets up **PolygonPathFinder** with an array of points that define the vertices of the polygon, and an array of indices that determine the edges of the polygon. + +The length of ``connections`` must be even, returns an error if odd. + + +.. tabs:: + + .. code-tab:: gdscript + + var polygon_path_finder = PolygonPathFinder.new() + var points = [Vector2(0.0, 0.0), Vector2(1.0, 0.0), Vector2(0.0, 1.0)] + var connections = [0, 1, 1, 2, 2, 0] + polygon_path_finder.setup(points, connections) + + .. code-tab:: csharp + + var polygonPathFinder = new PolygonPathFinder(); + var points = new Vector2[] + { + new Vector2(0.0f, 0.0f), + new Vector2(1.0f, 0.0f), + new Vector2(0.0f, 1.0f) + }; + var connections = new int[] { 0, 1, 1, 2, 2, 0 }; + polygonPathFinder.Setup(points, connections); + - There is currently no description for this method. Please help us by :ref:`contributing one `! .. |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_projectsettings.rst b/classes/class_projectsettings.rst index 5287f09577f..5151c9a6b48 100644 --- a/classes/class_projectsettings.rst +++ b/classes/class_projectsettings.rst @@ -705,6 +705,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`Dictionary` | :ref:`input/ui_undo` | | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`input/ui_unicode_start` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`Dictionary` | :ref:`input/ui_up` | | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`input_devices/buffering/agile_event_flushing` | ``false`` | @@ -1283,6 +1285,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`physics/common/physics_ticks_per_second` | ``60`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/2d/batching/item_buffer_size` | ``16384`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/2d/sdf/oversize` | ``1`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/2d/sdf/scale` | ``1`` | @@ -1537,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`` | @@ -1595,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`` | @@ -6036,6 +6044,20 @@ Default :ref:`InputEventAction` to undo the most recent ---- +.. _class_ProjectSettings_property_input/ui_unicode_start: + +.. rst-class:: classref-property + +:ref:`Dictionary` **input/ui_unicode_start** :ref:`šŸ”—` + +Default :ref:`InputEventAction` to start Unicode character hexadecimal code input in a text field. + +\ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control`\ s. The events assigned to the action can however be modified. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_input/ui_up: .. rst-class:: classref-property @@ -9660,6 +9682,18 @@ The number of fixed iterations per second. This controls how often physics simul ---- +.. _class_ProjectSettings_property_rendering/2d/batching/item_buffer_size: + +.. rst-class:: classref-property + +:ref:`int` **rendering/2d/batching/item_buffer_size** = ``16384`` :ref:`šŸ”—` + +Maximum number of canvas item commands that can be batched into a single draw call. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_rendering/2d/sdf/oversize: .. rst-class:: classref-property @@ -11322,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 @@ -11726,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 @@ -11804,7 +11864,11 @@ The default compression factor for lossless WebP. Decompression speed is mostly :ref:`bool` **rendering/viewport/hdr_2d** = ``false`` :ref:`šŸ”—` -If ``true``, enables :ref:`Viewport.use_hdr_2d` on the root viewport. This allows 2D rendering to take advantage of effects requiring high dynamic range (e.g. 2D glow). +If ``true``, enables :ref:`Viewport.use_hdr_2d` on the root viewport. 2D rendering will use an high dynamic range (HDR) format framebuffer matching the bit depth of the 3D framebuffer. When using the Forward+ renderer this will be an ``RGBA16`` framebuffer, while when using the Mobile renderer it will be an ``RGB10_A2`` framebuffer. Additionally, 2D rendering will take place in linear color space and will be converted to sRGB space immediately before blitting to the screen. Practically speaking, this means that the end result of the Viewport will not be clamped into the ``0-1`` range and can be used in 3D rendering without color space adjustments. This allows 2D rendering to take advantage of effects requiring high dynamic range (e.g. 2D glow) as well as substantially improves the appearance of effects requiring highly detailed gradients. + +\ **Note:** This setting will have no effect when using the GL Compatibility renderer as the GL Compatibility renderer always renders in low dynamic range for performance reasons. + +\ **Note:** This property is only read when the project starts. To toggle HDR 2D at runtime, set :ref:`Viewport.use_hdr_2d` on the root :ref:`Viewport`. .. 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_rdshadersource.rst b/classes/class_rdshadersource.rst index a0110a34cce..08a64d99c1c 100644 --- a/classes/class_rdshadersource.rst +++ b/classes/class_rdshadersource.rst @@ -195,6 +195,8 @@ Returns source code for the specified shader ``stage``. Equivalent to getting on Sets ``source`` code for the specified shader ``stage``. Equivalent to setting one of :ref:`source_compute`, :ref:`source_fragment`, :ref:`source_tesselation_control`, :ref:`source_tesselation_evaluation` or :ref:`source_vertex`. +\ **Note:** If you set the compute shader source code using this method directly, remember to remove the Godot-specific hint ``#[compute]``. + .. |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_refcounted.rst b/classes/class_refcounted.rst index 61010394d17..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:`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:`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 85b1d47dbe3..906733780db 100644 --- a/classes/class_renderingserver.rst +++ b/classes/class_renderingserver.rst @@ -141,6 +141,8 @@ Methods +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`canvas_item_add_triangle_array`\ (\ item\: :ref:`RID`, indices\: :ref:`PackedInt32Array`, points\: :ref:`PackedVector2Array`, colors\: :ref:`PackedColorArray`, uvs\: :ref:`PackedVector2Array` = PackedVector2Array(), bones\: :ref:`PackedInt32Array` = PackedInt32Array(), weights\: :ref:`PackedFloat32Array` = PackedFloat32Array(), texture\: :ref:`RID` = RID(), count\: :ref:`int` = -1\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_attach_skeleton`\ (\ item\: :ref:`RID`, skeleton\: :ref:`RID`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`canvas_item_clear`\ (\ item\: :ref:`RID`\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`canvas_item_create`\ (\ ) | @@ -897,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| | @@ -1102,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 @@ -3862,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: @@ -6224,6 +6262,8 @@ Draws particles on the :ref:`CanvasItem` pointed to by the ``i Draws a 2D polygon on the :ref:`CanvasItem` pointed to by the ``item`` :ref:`RID`. If you need more flexibility (such as being able to use bones), use :ref:`canvas_item_add_triangle_array` instead. See also :ref:`CanvasItem.draw_polygon`. +\ **Note:** If you frequently redraw the same polygon with a large number of vertices, consider pre-calculating the triangulation with :ref:`Geometry2D.triangulate_polygon` and using :ref:`CanvasItem.draw_mesh`, :ref:`CanvasItem.draw_multimesh`, or :ref:`canvas_item_add_triangle_array`. + .. rst-class:: classref-item-separator ---- @@ -6314,6 +6354,18 @@ Draws a triangle array on the :ref:`CanvasItem` pointed to by ---- +.. _class_RenderingServer_method_canvas_item_attach_skeleton: + +.. rst-class:: classref-method + +|void| **canvas_item_attach_skeleton**\ (\ item\: :ref:`RID`, skeleton\: :ref:`RID`\ ) :ref:`šŸ”—` + +Attaches a skeleton to the :ref:`CanvasItem`. Removes the previous skeleton. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_canvas_item_clear: .. rst-class:: classref-method @@ -11099,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. @@ -11177,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 @@ -11412,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_resourceimporterdynamicfont.rst b/classes/class_resourceimporterdynamicfont.rst index 9cacce548df..65f38724cdd 100644 --- a/classes/class_resourceimporterdynamicfont.rst +++ b/classes/class_resourceimporterdynamicfont.rst @@ -239,7 +239,7 @@ Source font size used to generate MSDF textures. Higher values allow for more pr :ref:`bool` **multichannel_signed_distance_field** = ``false`` :ref:`šŸ”—` -If set to ``true``, the default font will use multichannel signed distance field (MSDF) for crisp rendering at any size. Since this approach does not rely on rasterizing the font every time its size changes, this allows for resizing the font in real-time without any performance penalty. Text will also not look grainy for :ref:`Control`\ s that are scaled down (or for :ref:`Label3D`\ s viewed from a long distance). +If set to ``true``, the font will use multichannel signed distance field (MSDF) for crisp rendering at any size. Since this approach does not rely on rasterizing the font every time its size changes, this allows for resizing the font in real-time without any performance penalty. Text will also not look grainy for :ref:`Control`\ s that are scaled down (or for :ref:`Label3D`\ s viewed from a long distance). MSDF font rendering can be combined with :ref:`generate_mipmaps` to further improve font rendering quality when scaled down. diff --git a/classes/class_resourceimporterscene.rst b/classes/class_resourceimporterscene.rst index f7414151688..2ec10e2bf72 100644 --- a/classes/class_resourceimporterscene.rst +++ b/classes/class_resourceimporterscene.rst @@ -77,6 +77,8 @@ Properties +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ | :ref:`String` | :ref:`nodes/root_type` | ``""`` | +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`nodes/use_node_type_suffixes` | ``true`` | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`skins/use_named_skins` | ``true`` | +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ @@ -309,6 +311,18 @@ Override for the root node type. If empty, the root node will use what the scene ---- +.. _class_ResourceImporterScene_property_nodes/use_node_type_suffixes: + +.. rst-class:: classref-property + +:ref:`bool` **nodes/use_node_type_suffixes** = ``true`` :ref:`šŸ”—` + +If ``true``, use suffixes in the node names to determine the node type, such as ``-col`` for collision shapes. Disabling this makes editor-imported files more similar to the original files, and more similar to importing files at runtime. See :doc:`Node type customization using name suffixes <../tutorials/assets_pipeline/importing_3d_scenes/node_type_customization>` for more information. + +.. rst-class:: classref-item-separator + +---- + .. _class_ResourceImporterScene_property_skins/use_named_skins: .. rst-class:: classref-property diff --git a/classes/class_resourceimporterwav.rst b/classes/class_resourceimporterwav.rst index f63ea0f568a..cb205171af4 100644 --- a/classes/class_resourceimporterwav.rst +++ b/classes/class_resourceimporterwav.rst @@ -19,7 +19,9 @@ Imports a WAV audio file for playback. Description ----------- -WAV is an uncompressed format, which can provide higher quality compared to Ogg Vorbis and MP3. It also has the lowest CPU cost to decode. This means high numbers of WAV sounds can be played at the same time, even on low-end deviceS. +WAV is an uncompressed format, which can provide higher quality compared to Ogg Vorbis and MP3. It also has the lowest CPU cost to decode. This means high numbers of WAV sounds can be played at the same time, even on low-end devices. + +By default, Godot imports WAV files using the lossy Quite OK Audio compression. You may change this by setting the :ref:`compress/mode` property. .. rst-class:: classref-introduction-group @@ -37,7 +39,7 @@ Properties :widths: auto +---------------------------+--------------------------------------------------------------------------------+-----------+ - | :ref:`int` | :ref:`compress/mode` | ``0`` | + | :ref:`int` | :ref:`compress/mode` | ``2`` | +---------------------------+--------------------------------------------------------------------------------+-----------+ | :ref:`int` | :ref:`edit/loop_begin` | ``0`` | +---------------------------+--------------------------------------------------------------------------------+-----------+ @@ -71,7 +73,7 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int` **compress/mode** = ``0`` :ref:`šŸ”—` +:ref:`int` **compress/mode** = ``2`` :ref:`šŸ”—` The compression mode to use on import. 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_scripteditor.rst b/classes/class_scripteditor.rst index 554d9de0ea1..81f899c43ba 100644 --- a/classes/class_scripteditor.rst +++ b/classes/class_scripteditor.rst @@ -52,6 +52,8 @@ Methods +------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`unregister_syntax_highlighter`\ (\ syntax_highlighter\: :ref:`EditorSyntaxHighlighter`\ ) | +------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`update_docs_from_script`\ (\ script\: :ref:`Script`\ ) | + +------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -234,6 +236,20 @@ Unregisters the :ref:`EditorSyntaxHighlighter` fr \ **Note:** The :ref:`EditorSyntaxHighlighter` will still be applied to scripts that are already opened. +.. rst-class:: classref-item-separator + +---- + +.. _class_ScriptEditor_method_update_docs_from_script: + +.. rst-class:: classref-method + +|void| **update_docs_from_script**\ (\ script\: :ref:`Script`\ ) :ref:`šŸ”—` + +Updates the documentation for the given ``script`` if the script's documentation is currently open. + +\ **Note:** This should be called whenever the script is changed to keep the open documentation state up to date. + .. |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_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_spinbox.rst b/classes/class_spinbox.rst index b1d7f359978..e917bda31bb 100644 --- a/classes/class_spinbox.rst +++ b/classes/class_spinbox.rst @@ -447,7 +447,7 @@ Vertical separation between the up and down buttons. :ref:`int` **buttons_width** = ``16`` :ref:`šŸ”—` -Width of the up and down buttons. If smaller than any icon set on the buttons, the respective icon may overlap neighboring elements, unless :ref:`set_min_buttons_width_from_icons` is different than ``0``. +Width of the up and down buttons. If smaller than any icon set on the buttons, the respective icon may overlap neighboring elements. If smaller than ``0``, the width is automatically adjusted from the icon size. .. rst-class:: classref-item-separator 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_spriteframes.rst b/classes/class_spriteframes.rst index 86e11ef0a13..ab02369819f 100644 --- a/classes/class_spriteframes.rst +++ b/classes/class_spriteframes.rst @@ -38,6 +38,8 @@ Methods +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`clear_all`\ (\ ) | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`duplicate_animation`\ (\ anim_from\: :ref:`StringName`, anim_to\: :ref:`StringName`\ ) | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`get_animation_loop`\ (\ anim\: :ref:`StringName`\ ) |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`get_animation_names`\ (\ ) |const| | @@ -122,6 +124,18 @@ Removes all animations. An empty ``default`` animation will be created. ---- +.. _class_SpriteFrames_method_duplicate_animation: + +.. rst-class:: classref-method + +|void| **duplicate_animation**\ (\ anim_from\: :ref:`StringName`, anim_to\: :ref:`StringName`\ ) :ref:`šŸ”—` + +Duplicates the animation ``anim_from`` to a new animation named ``anim_to``. Fails if ``anim_to`` already exists, or if ``anim_from`` does not exist. + +.. rst-class:: classref-item-separator + +---- + .. _class_SpriteFrames_method_get_animation_loop: .. rst-class:: classref-method 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_theme.rst b/classes/class_theme.rst index 12a38369b00..e9c5589bd79 100644 --- a/classes/class_theme.rst +++ b/classes/class_theme.rst @@ -315,7 +315,7 @@ Use :ref:`has_default_font` to check if thi The default font size of this theme resource. Used as the default value when trying to fetch a font size value that doesn't exist in this theme or is in invalid state. If the default font size is also missing or invalid, the engine fallback value is used (see :ref:`ThemeDB.fallback_font_size`). -Values below ``0`` are invalid and can be used to unset the property. Use :ref:`has_default_font_size` to check if this value is valid. +Values below ``1`` are invalid and can be used to unset the property. Use :ref:`has_default_font_size` to check if this value is valid. .. rst-class:: classref-section-separator diff --git a/classes/class_tiledata.rst b/classes/class_tiledata.rst index 968cdb334cf..27501f317cb 100644 --- a/classes/class_tiledata.rst +++ b/classes/class_tiledata.rst @@ -61,57 +61,69 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`add_collision_polygon`\ (\ layer_id\: :ref:`int`\ ) | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_collision_polygon_one_way_margin`\ (\ layer_id\: :ref:`int`, polygon_index\: :ref:`int`\ ) |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array` | :ref:`get_collision_polygon_points`\ (\ layer_id\: :ref:`int`, polygon_index\: :ref:`int`\ ) |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_collision_polygons_count`\ (\ layer_id\: :ref:`int`\ ) |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_constant_angular_velocity`\ (\ layer_id\: :ref:`int`\ ) |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_constant_linear_velocity`\ (\ layer_id\: :ref:`int`\ ) |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`get_custom_data`\ (\ layer_name\: :ref:`String`\ ) |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`get_custom_data_by_layer_id`\ (\ layer_id\: :ref:`int`\ ) |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`NavigationPolygon` | :ref:`get_navigation_polygon`\ (\ layer_id\: :ref:`int`, flip_h\: :ref:`bool` = false, flip_v\: :ref:`bool` = false, transpose\: :ref:`bool` = false\ ) |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`OccluderPolygon2D` | :ref:`get_occluder`\ (\ layer_id\: :ref:`int`, flip_h\: :ref:`bool` = false, flip_v\: :ref:`bool` = false, transpose\: :ref:`bool` = false\ ) |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_terrain_peering_bit`\ (\ peering_bit\: :ref:`CellNeighbor`\ ) |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_collision_polygon_one_way`\ (\ layer_id\: :ref:`int`, polygon_index\: :ref:`int`\ ) |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_valid_terrain_peering_bit`\ (\ peering_bit\: :ref:`CellNeighbor`\ ) |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`remove_collision_polygon`\ (\ layer_id\: :ref:`int`, polygon_index\: :ref:`int`\ ) | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_collision_polygon_one_way`\ (\ layer_id\: :ref:`int`, polygon_index\: :ref:`int`, one_way\: :ref:`bool`\ ) | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_collision_polygon_one_way_margin`\ (\ layer_id\: :ref:`int`, polygon_index\: :ref:`int`, one_way_margin\: :ref:`float`\ ) | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_collision_polygon_points`\ (\ layer_id\: :ref:`int`, polygon_index\: :ref:`int`, polygon\: :ref:`PackedVector2Array`\ ) | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_collision_polygons_count`\ (\ layer_id\: :ref:`int`, polygons_count\: :ref:`int`\ ) | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_constant_angular_velocity`\ (\ layer_id\: :ref:`int`, velocity\: :ref:`float`\ ) | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_constant_linear_velocity`\ (\ layer_id\: :ref:`int`, velocity\: :ref:`Vector2`\ ) | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_custom_data`\ (\ layer_name\: :ref:`String`, value\: :ref:`Variant`\ ) | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_custom_data_by_layer_id`\ (\ layer_id\: :ref:`int`, value\: :ref:`Variant`\ ) | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_navigation_polygon`\ (\ layer_id\: :ref:`int`, navigation_polygon\: :ref:`NavigationPolygon`\ ) | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_occluder`\ (\ layer_id\: :ref:`int`, occluder_polygon\: :ref:`OccluderPolygon2D`\ ) | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_terrain_peering_bit`\ (\ peering_bit\: :ref:`CellNeighbor`, terrain\: :ref:`int`\ ) | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_collision_polygon`\ (\ layer_id\: :ref:`int`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_occluder_polygon`\ (\ layer_id\: :ref:`int`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_collision_polygon_one_way_margin`\ (\ layer_id\: :ref:`int`, polygon_index\: :ref:`int`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`get_collision_polygon_points`\ (\ layer_id\: :ref:`int`, polygon_index\: :ref:`int`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_collision_polygons_count`\ (\ layer_id\: :ref:`int`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_constant_angular_velocity`\ (\ layer_id\: :ref:`int`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_constant_linear_velocity`\ (\ layer_id\: :ref:`int`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_custom_data`\ (\ layer_name\: :ref:`String`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_custom_data_by_layer_id`\ (\ layer_id\: :ref:`int`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NavigationPolygon` | :ref:`get_navigation_polygon`\ (\ layer_id\: :ref:`int`, flip_h\: :ref:`bool` = false, flip_v\: :ref:`bool` = false, transpose\: :ref:`bool` = false\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`OccluderPolygon2D` | :ref:`get_occluder`\ (\ layer_id\: :ref:`int`, flip_h\: :ref:`bool` = false, flip_v\: :ref:`bool` = false, transpose\: :ref:`bool` = false\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`OccluderPolygon2D` | :ref:`get_occluder_polygon`\ (\ layer_id\: :ref:`int`, polygon_index\: :ref:`int`, flip_h\: :ref:`bool` = false, flip_v\: :ref:`bool` = false, transpose\: :ref:`bool` = false\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_occluder_polygons_count`\ (\ layer_id\: :ref:`int`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_terrain_peering_bit`\ (\ peering_bit\: :ref:`CellNeighbor`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_collision_polygon_one_way`\ (\ layer_id\: :ref:`int`, polygon_index\: :ref:`int`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_valid_terrain_peering_bit`\ (\ peering_bit\: :ref:`CellNeighbor`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_collision_polygon`\ (\ layer_id\: :ref:`int`, polygon_index\: :ref:`int`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_occluder_polygon`\ (\ layer_id\: :ref:`int`, polygon_index\: :ref:`int`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_collision_polygon_one_way`\ (\ layer_id\: :ref:`int`, polygon_index\: :ref:`int`, one_way\: :ref:`bool`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_collision_polygon_one_way_margin`\ (\ layer_id\: :ref:`int`, polygon_index\: :ref:`int`, one_way_margin\: :ref:`float`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_collision_polygon_points`\ (\ layer_id\: :ref:`int`, polygon_index\: :ref:`int`, polygon\: :ref:`PackedVector2Array`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_collision_polygons_count`\ (\ layer_id\: :ref:`int`, polygons_count\: :ref:`int`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_constant_angular_velocity`\ (\ layer_id\: :ref:`int`, velocity\: :ref:`float`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_constant_linear_velocity`\ (\ layer_id\: :ref:`int`, velocity\: :ref:`Vector2`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_custom_data`\ (\ layer_name\: :ref:`String`, value\: :ref:`Variant`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_custom_data_by_layer_id`\ (\ layer_id\: :ref:`int`, value\: :ref:`Variant`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_navigation_polygon`\ (\ layer_id\: :ref:`int`, navigation_polygon\: :ref:`NavigationPolygon`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_occluder`\ (\ layer_id\: :ref:`int`, occluder_polygon\: :ref:`OccluderPolygon2D`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_occluder_polygon`\ (\ layer_id\: :ref:`int`, polygon_index\: :ref:`int`, polygon\: :ref:`OccluderPolygon2D`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_occluder_polygons_count`\ (\ layer_id\: :ref:`int`, polygons_count\: :ref:`int`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_terrain_peering_bit`\ (\ peering_bit\: :ref:`CellNeighbor`, terrain\: :ref:`int`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -343,6 +355,18 @@ Adds a collision polygon to the tile on the given TileSet physics layer. ---- +.. _class_TileData_method_add_occluder_polygon: + +.. rst-class:: classref-method + +|void| **add_occluder_polygon**\ (\ layer_id\: :ref:`int`\ ) :ref:`šŸ”—` + +Adds an occlusion polygon to the tile on the TileSet occlusion layer with index ``layer_id``. + +.. rst-class:: classref-item-separator + +---- + .. _class_TileData_method_get_collision_polygon_one_way_margin: .. rst-class:: classref-method @@ -447,6 +471,8 @@ Returns the navigation polygon of the tile for the TileSet navigation layer with :ref:`OccluderPolygon2D` **get_occluder**\ (\ layer_id\: :ref:`int`, flip_h\: :ref:`bool` = false, flip_v\: :ref:`bool` = false, transpose\: :ref:`bool` = false\ ) |const| :ref:`šŸ”—` +**Deprecated:** Use :ref:`get_occluder_polygon` instead. + Returns the occluder polygon of the tile for the TileSet occlusion layer with index ``layer_id``. \ ``flip_h``, ``flip_v``, and ``transpose`` allow transforming the returned polygon. @@ -455,6 +481,32 @@ Returns the occluder polygon of the tile for the TileSet occlusion layer with in ---- +.. _class_TileData_method_get_occluder_polygon: + +.. rst-class:: classref-method + +:ref:`OccluderPolygon2D` **get_occluder_polygon**\ (\ layer_id\: :ref:`int`, polygon_index\: :ref:`int`, flip_h\: :ref:`bool` = false, flip_v\: :ref:`bool` = false, transpose\: :ref:`bool` = false\ ) |const| :ref:`šŸ”—` + +Returns the occluder polygon at index ``polygon_index`` from the TileSet occlusion layer with index ``layer_id``. + +The ``flip_h``, ``flip_v``, and ``transpose`` parameters can be ``true`` to transform the returned polygon. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileData_method_get_occluder_polygons_count: + +.. rst-class:: classref-method + +:ref:`int` **get_occluder_polygons_count**\ (\ layer_id\: :ref:`int`\ ) |const| :ref:`šŸ”—` + +Returns the number of occluder polygons of the tile in the TileSet occlusion layer with index ``layer_id``. + +.. rst-class:: classref-item-separator + +---- + .. _class_TileData_method_get_terrain_peering_bit: .. rst-class:: classref-method @@ -503,6 +555,18 @@ Removes the polygon at index ``polygon_index`` for TileSet physics layer with in ---- +.. _class_TileData_method_remove_occluder_polygon: + +.. rst-class:: classref-method + +|void| **remove_occluder_polygon**\ (\ layer_id\: :ref:`int`, polygon_index\: :ref:`int`\ ) :ref:`šŸ”—` + +Removes the polygon at index ``polygon_index`` for TileSet occlusion layer with index ``layer_id``. + +.. rst-class:: classref-item-separator + +---- + .. _class_TileData_method_set_collision_polygon_one_way: .. rst-class:: classref-method @@ -617,12 +681,38 @@ Sets the navigation polygon for the TileSet navigation layer with index ``layer_ |void| **set_occluder**\ (\ layer_id\: :ref:`int`, occluder_polygon\: :ref:`OccluderPolygon2D`\ ) :ref:`šŸ”—` +**Deprecated:** Use :ref:`set_occluder_polygon` instead. + Sets the occluder for the TileSet occlusion layer with index ``layer_id``. .. rst-class:: classref-item-separator ---- +.. _class_TileData_method_set_occluder_polygon: + +.. rst-class:: classref-method + +|void| **set_occluder_polygon**\ (\ layer_id\: :ref:`int`, polygon_index\: :ref:`int`, polygon\: :ref:`OccluderPolygon2D`\ ) :ref:`šŸ”—` + +Sets the occluder for polygon with index ``polygon_index`` in the TileSet occlusion layer with index ``layer_id``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileData_method_set_occluder_polygons_count: + +.. rst-class:: classref-method + +|void| **set_occluder_polygons_count**\ (\ layer_id\: :ref:`int`, polygons_count\: :ref:`int`\ ) :ref:`šŸ”—` + +Sets the occluder polygon count in the TileSet occlusion layer with index ``layer_id``. + +.. rst-class:: classref-item-separator + +---- + .. _class_TileData_method_set_terrain_peering_bit: .. rst-class:: classref-method 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_treeitem.rst b/classes/class_treeitem.rst index 7fbbf384983..1f6e7049ea8 100644 --- a/classes/class_treeitem.rst +++ b/classes/class_treeitem.rst @@ -110,6 +110,8 @@ Methods +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`get_icon_modulate`\ (\ column\: :ref:`int`\ ) |const| | +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`get_icon_overlay`\ (\ column\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Rect2` | :ref:`get_icon_region`\ (\ column\: :ref:`int`\ ) |const| | +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_index`\ (\ ) | @@ -226,6 +228,8 @@ Methods +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_icon_modulate`\ (\ column\: :ref:`int`, modulate\: :ref:`Color`\ ) | +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_icon_overlay`\ (\ column\: :ref:`int`, texture\: :ref:`Texture2D`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_icon_region`\ (\ column\: :ref:`int`, region\: :ref:`Rect2`\ ) | +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_indeterminate`\ (\ column\: :ref:`int`, indeterminate\: :ref:`bool`\ ) | @@ -280,7 +284,7 @@ enum **TreeCellMode**: :ref:`šŸ”—` :ref:`TreeCellMode` **CELL_MODE_STRING** = ``0`` -Cell shows a string label. When editable, the text can be edited using a :ref:`LineEdit`, or a :ref:`TextEdit` popup if :ref:`set_edit_multiline` is used. +Cell shows a string label, optionally with an icon. When editable, the text can be edited using a :ref:`LineEdit`, or a :ref:`TextEdit` popup if :ref:`set_edit_multiline` is used. .. _class_TreeItem_constant_CELL_MODE_CHECK: @@ -288,7 +292,7 @@ Cell shows a string label. When editable, the text can be edited using a :ref:`L :ref:`TreeCellMode` **CELL_MODE_CHECK** = ``1`` -Cell shows a checkbox, optionally with text. The checkbox can be pressed, released, or indeterminate (via :ref:`set_indeterminate`). The checkbox can't be clicked unless the cell is editable. +Cell shows a checkbox, optionally with text and an icon. The checkbox can be pressed, released, or indeterminate (via :ref:`set_indeterminate`). The checkbox can't be clicked unless the cell is editable. .. _class_TreeItem_constant_CELL_MODE_RANGE: @@ -306,7 +310,7 @@ This cell can also be used in a text dropdown mode when you assign a text with : :ref:`TreeCellMode` **CELL_MODE_ICON** = ``3`` -Cell shows an icon. It can't be edited nor display text. +Cell shows an icon. It can't be edited nor display text. The icon is always centered within the cell. .. _class_TreeItem_constant_CELL_MODE_CUSTOM: @@ -408,7 +412,7 @@ Method Descriptions |void| **add_button**\ (\ column\: :ref:`int`, button\: :ref:`Texture2D`, id\: :ref:`int` = -1, disabled\: :ref:`bool` = false, tooltip_text\: :ref:`String` = ""\ ) :ref:`šŸ”—` -Adds a button with :ref:`Texture2D` ``button`` at column ``column``. The ``id`` is used to identify the button in the according :ref:`Tree.button_clicked` signal and can be different from the buttons index. If not specified, the next available index is used, which may be retrieved by calling :ref:`get_button_count` immediately before this method. Optionally, the button can be ``disabled`` and have a ``tooltip_text``. +Adds a button with :ref:`Texture2D` ``button`` to the end of the cell at column ``column``. The ``id`` is used to identify the button in the according :ref:`Tree.button_clicked` signal and can be different from the buttons index. If not specified, the next available index is used, which may be retrieved by calling :ref:`get_button_count` immediately before this method. Optionally, the button can be ``disabled`` and have a ``tooltip_text``. .. rst-class:: classref-item-separator @@ -754,6 +758,18 @@ Returns the :ref:`Color` modulating the column's icon. ---- +.. _class_TreeItem_method_get_icon_overlay: + +.. rst-class:: classref-method + +:ref:`Texture2D` **get_icon_overlay**\ (\ column\: :ref:`int`\ ) |const| :ref:`šŸ”—` + +Returns the given column's icon overlay :ref:`Texture2D`. + +.. rst-class:: classref-item-separator + +---- + .. _class_TreeItem_method_get_icon_region: .. rst-class:: classref-method @@ -1444,7 +1460,7 @@ If ``enable`` is ``true``, the given ``column`` is expanded to the right. |void| **set_icon**\ (\ column\: :ref:`int`, texture\: :ref:`Texture2D`\ ) :ref:`šŸ”—` -Sets the given cell's icon :ref:`Texture2D`. The cell has to be in :ref:`CELL_MODE_ICON` mode. +Sets the given cell's icon :ref:`Texture2D`. If the cell is in :ref:`CELL_MODE_ICON` mode, the icon is displayed in the center of the cell. Otherwise, the icon is displayed before the cell's text. :ref:`CELL_MODE_RANGE` does not display an icon. .. rst-class:: classref-item-separator @@ -1474,6 +1490,18 @@ Modulates the given column's icon with ``modulate``. ---- +.. _class_TreeItem_method_set_icon_overlay: + +.. rst-class:: classref-method + +|void| **set_icon_overlay**\ (\ column\: :ref:`int`, texture\: :ref:`Texture2D`\ ) :ref:`šŸ”—` + +Sets the given cell's icon overlay :ref:`Texture2D`. The cell has to be in :ref:`CELL_MODE_ICON` mode, and icon has to be set. Overlay is drawn on top of icon, in the bottom left corner. + +.. rst-class:: classref-item-separator + +---- + .. _class_TreeItem_method_set_icon_region: .. rst-class:: classref-method 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 94a5041bc30..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| | @@ -193,6 +197,8 @@ Methods +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Rect2` | :ref:`get_visible_rect`\ (\ ) |const| | +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`gui_cancel_drag`\ (\ ) | + +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`gui_get_drag_data`\ (\ ) |const| | +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Control` | :ref:`gui_get_focus_owner`\ (\ ) |const| | @@ -1927,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 @@ -2083,6 +2113,18 @@ Returns the visible rectangle in global screen coordinates. ---- +.. _class_Viewport_method_gui_cancel_drag: + +.. rst-class:: classref-method + +|void| **gui_cancel_drag**\ (\ ) :ref:`šŸ”—` + +Cancels the drag operation that was previously started through :ref:`Control._get_drag_data` or forced with :ref:`Control.force_drag`. + +.. rst-class:: classref-item-separator + +---- + .. _class_Viewport_method_gui_get_drag_data: .. rst-class:: classref-method @@ -2139,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 ab55fbf9f47..cbf5aae860f 100644 --- a/classes/index.rst +++ b/classes/index.rst @@ -724,6 +724,7 @@ Other objects class_diraccess class_displayserver class_dtlsserver + class_editorcontextmenuplugin class_editordebuggerplugin class_editordebuggersession class_editorexportplatform @@ -784,6 +785,7 @@ Other objects class_ip class_javaclass class_javaclasswrapper + class_javaobject class_javascriptbridge class_javascriptobject class_jnisingleton @@ -937,6 +939,7 @@ Other objects class_tiledata class_time class_tlsoptions + class_translationdomain class_translationserver class_treeitem class_trianglemesh @@ -980,6 +983,7 @@ Editor-only :name: toc-class-ref-editors class_editorcommandpalette + class_editorcontextmenuplugin class_editordebuggerplugin class_editordebuggersession class_editorexportplatform