From 9329657b3026cc29abc84156c47e661a9ed15f6a Mon Sep 17 00:00:00 2001 From: Godot Organization Date: Sat, 19 Oct 2024 03:32:47 +0000 Subject: [PATCH] classref: Sync with current master branch (44fa552) --- classes/class_@gdscript.rst | 61 +- classes/class_@globalscope.rst | 60 +- classes/class_aabb.rst | 4 +- classes/class_animatedsprite2d.rst | 7 +- classes/class_animatedsprite3d.rst | 7 +- classes/class_animation.rst | 154 +++ classes/class_animationmixer.rst | 35 +- classes/class_animationnodeanimation.rst | 2 + classes/class_animationnodeblendspace2d.rst | 4 +- classes/class_animationnodestatemachine.rst | 2 - ...lass_animationnodestatemachineplayback.rst | 2 - classes/class_animationplayer.rst | 152 ++- classes/class_array.rst | 100 +- classes/class_arraymesh.rst | 4 +- classes/class_astar2d.rst | 12 +- classes/class_astar3d.rst | 12 +- classes/class_astargrid2d.rst | 86 +- classes/class_audiostreaminteractive.rst | 2 +- classes/class_audiostreamplayer.rst | 3 +- classes/class_audiostreamplayer2d.rst | 1 + classes/class_audiostreamplayer3d.rst | 1 + classes/class_audiostreamsynchronized.rst | 2 +- classes/class_audiostreamwav.rst | 20 +- classes/class_basebutton.rst | 4 +- classes/class_boneattachment3d.rst | 36 +- classes/class_callable.rst | 6 +- classes/class_callbacktweener.rst | 4 +- classes/class_cameraattributesphysical.rst | 2 +- classes/class_camerafeed.rst | 141 ++- classes/class_cameraserver.rst | 2 +- classes/class_canvasitem.rst | 14 +- classes/class_classdb.rst | 111 ++ classes/class_codeedit.rst | 14 + classes/class_color.rst | 4 + classes/class_compositor.rst | 7 + classes/class_compositoreffect.rst | 24 +- classes/class_control.rst | 29 +- classes/class_cpuparticles3d.rst | 35 + classes/class_csgshape3d.rst | 66 +- classes/class_curve2d.rst | 2 +- classes/class_dictionary.rst | 234 +++- classes/class_displayserver.rst | 18 +- classes/class_editorcontextmenuplugin.rst | 195 ++++ classes/class_editorexportplatform.rst | 467 +++++++- classes/class_editorexportplatformandroid.rst | 14 + .../class_editorexportplatformextension.rst | 622 ++++++++++ classes/class_editorexportplatformios.rst | 568 ++++++++- classes/class_editorexportplatformmacos.rst | 47 +- classes/class_editorexportplugin.rst | 44 + classes/class_editorexportpreset.rst | 563 +++++++++ classes/class_editorimportplugin.rst | 8 +- classes/class_editorinspector.rst | 2 + classes/class_editorinterface.rst | 246 ++-- classes/class_editorplugin.rst | 76 +- .../class_editorresourcepreviewgenerator.rst | 4 +- classes/class_editorsettings.rst | 1018 ++++++++++++++++- classes/class_editorspinslider.rst | 43 + classes/class_editorsyntaxhighlighter.rst | 2 + classes/class_editorundoredomanager.rst | 24 + classes/class_enetpacketpeer.rst | 14 + classes/class_engine.rst | 21 + classes/class_enginedebugger.rst | 2 +- classes/class_environment.rst | 6 +- classes/class_externaltexture.rst | 118 ++ classes/class_fastnoiselite.rst | 4 +- classes/class_fileaccess.rst | 4 +- classes/class_filedialog.rst | 129 ++- classes/class_font.rst | 2 +- classes/class_fontfile.rst | 2 +- classes/class_fontvariation.rst | 4 +- classes/class_gdextensionmanager.rst | 28 + classes/class_gdscriptsyntaxhighlighter.rst | 48 + classes/class_geometry2d.rst | 35 +- classes/class_gltfaccessor.rst | 16 +- classes/class_gltfanimation.rst | 4 +- classes/class_gltfbufferview.rst | 4 +- classes/class_gltfcamera.rst | 18 +- classes/class_gltfdocument.rst | 60 +- classes/class_gltfdocumentextension.rst | 62 +- classes/class_gltflight.rst | 8 +- classes/class_gltfmesh.rst | 8 +- classes/class_gltfnode.rst | 46 +- classes/class_gltfphysicsbody.rst | 10 +- classes/class_gltfphysicsshape.rst | 10 +- classes/class_gltfskeleton.rst | 8 +- classes/class_gltfskin.rst | 8 + classes/class_gltfspecgloss.rst | 6 +- classes/class_gltfstate.rst | 228 ++-- classes/class_gltftexture.rst | 2 +- classes/class_gltftexturesampler.rst | 4 +- classes/class_graphedit.rst | 12 + classes/class_httpclient.rst | 6 +- classes/class_image.rst | 20 +- classes/class_importermesh.rst | 31 - classes/class_input.rst | 4 +- classes/class_inputevent.rst | 2 + classes/class_inputeventmousemotion.rst | 8 +- classes/class_inputeventshortcut.rst | 2 +- classes/class_inputmap.rst | 4 +- classes/class_itemlist.rst | 245 ++-- classes/class_javaclass.rst | 63 +- classes/class_javaclasswrapper.rst | 10 + classes/class_javaobject.rst | 64 ++ classes/class_javascriptbridge.rst | 28 + classes/class_javascriptobject.rst | 2 - classes/class_json.rst | 48 +- classes/class_label.rst | 4 +- classes/class_label3d.rst | 2 +- classes/class_lineedit.rst | 148 ++- classes/class_linkbutton.rst | 2 - classes/class_menubar.rst | 10 +- classes/class_meshdatatool.rst | 4 +- classes/class_meshinstance3d.rst | 16 + classes/class_mobilevrinterface.rst | 2 +- classes/class_multimesh.rst | 177 ++- classes/class_multiplayerspawner.rst | 8 +- classes/class_navigationlink2d.rst | 28 + classes/class_navigationlink3d.rst | 28 + classes/class_navigationmesh.rst | 4 +- ...ass_navigationmeshsourcegeometrydata2d.rst | 14 + ...ass_navigationmeshsourcegeometrydata3d.rst | 14 + classes/class_navigationpolygon.rst | 91 +- classes/class_navigationserver2d.rst | 18 +- classes/class_navigationserver3d.rst | 62 +- classes/class_node.rst | 32 +- classes/class_node2d.rst | 28 +- classes/class_node3d.rst | 18 + classes/class_object.rst | 125 +- classes/class_openxrapiextension.rst | 56 + classes/class_openxrcompositionlayer.rst | 86 +- .../class_openxrextensionwrapperextension.rst | 16 + classes/class_openxrinterface.rst | 2 +- classes/class_openxrvisibilitymask.rst | 33 + classes/class_optimizedtranslation.rst | 2 + classes/class_os.rst | 16 +- classes/class_packedbytearray.rst | 14 + classes/class_packedcolorarray.rst | 14 + classes/class_packedfloat32array.rst | 14 + classes/class_packedfloat64array.rst | 14 + classes/class_packedint32array.rst | 14 + classes/class_packedint64array.rst | 14 + classes/class_packedscene.rst | 31 - classes/class_packedstringarray.rst | 14 + classes/class_packedvector2array.rst | 16 +- classes/class_packedvector3array.rst | 14 + classes/class_packedvector4array.rst | 14 + classes/class_particleprocessmaterial.rst | 25 +- classes/class_pathfollow2d.rst | 2 + classes/class_pathfollow3d.rst | 2 + classes/class_pckpacker.rst | 6 +- classes/class_performance.rst | 50 +- classes/class_physicsserver2d.rst | 20 + classes/class_physicsserver2dextension.rst | 2 +- classes/class_physicsserver3d.rst | 20 + classes/class_polygon2d.rst | 14 - classes/class_polygonpathfinder.rst | 58 +- classes/class_popupmenu.rst | 2 +- classes/class_popuppanel.rst | 2 +- classes/class_portablecompressedtexture2d.rst | 30 +- classes/class_projectsettings.rst | 382 +++++-- classes/class_propertytweener.rst | 12 +- classes/class_rdpipelinedepthstencilstate.rst | 2 +- classes/class_rdshadersource.rst | 2 + classes/class_rect2.rst | 14 + classes/class_refcounted.rst | 2 +- classes/class_regex.rst | 12 +- classes/class_renderingdevice.rst | 412 ++++++- classes/class_renderingserver.rst | 336 +++++- classes/class_resource.rst | 142 ++- classes/class_resourceimporterdynamicfont.rst | 8 +- classes/class_resourceimporterimagefont.rst | 2 +- classes/class_resourceimporterobj.rst | 14 - classes/class_resourceimporterscene.rst | 14 + classes/class_resourceimportertexture.rst | 4 +- classes/class_resourceimporterwav.rst | 26 +- classes/class_resourceloader.rst | 16 + classes/class_resourcesaver.rst | 14 + classes/class_resourceuid.rst | 2 +- classes/class_richtextlabel.rst | 93 +- classes/class_scenemultiplayer.rst | 4 +- classes/class_scenetree.rst | 2 +- classes/class_script.rst | 14 + classes/class_scripteditor.rst | 32 +- classes/class_scriptlanguageextension.rst | 16 + classes/class_scrollcontainer.rst | 8 + classes/class_semaphore.rst | 18 +- classes/class_shader.rst | 22 +- classes/class_shapecast2d.rst | 22 +- classes/class_shapecast3d.rst | 22 +- classes/class_shortcut.rst | 2 +- classes/class_signal.rst | 20 +- classes/class_skeleton3d.rst | 230 ++-- classes/class_skeletonmodifier3d.rst | 9 +- classes/class_softbody3d.rst | 48 +- classes/class_spinbox.rst | 434 ++++++- classes/class_splitcontainer.rst | 201 +++- classes/class_sprite2d.rst | 6 +- classes/class_spriteframes.rst | 14 + classes/class_string.rst | 66 +- classes/class_stringname.rst | 64 +- classes/class_styleboxflat.rst | 4 +- classes/class_surfacetool.rst | 2 +- classes/class_textedit.rst | 44 +- classes/class_textmesh.rst | 2 +- classes/class_textparagraph.rst | 4 +- classes/class_textserver.rst | 26 +- classes/class_textserverextension.rst | 16 + classes/class_texture2d.rst | 2 +- classes/class_theme.rst | 2 +- classes/class_tiledata.rst | 194 +++- classes/class_tilemap.rst | 44 +- classes/class_tilemaplayer.rst | 61 + classes/class_timer.rst | 2 +- classes/class_translationdomain.rst | 352 ++++++ classes/class_translationserver.rst | 70 +- classes/class_treeitem.rst | 68 +- classes/class_tween.rst | 4 - classes/class_tweener.rst | 2 +- classes/class_upnp.rst | 4 +- classes/class_vector4i.rst | 2 +- classes/class_vehiclewheel3d.rst | 52 +- classes/class_viewport.rst | 252 ++-- classes/class_viewporttexture.rst | 7 + classes/class_visibleonscreennotifier2d.rst | 2 +- classes/class_visibleonscreennotifier3d.rst | 2 +- classes/class_visualinstance3d.rst | 2 +- classes/class_visualshadernodecubemap.rst | 8 +- .../class_visualshadernodeintparameter.rst | 57 +- classes/class_visualshadernoderemap.rst | 115 ++ .../class_visualshadernodetexture2darray.rst | 8 +- classes/class_websocketpeer.rst | 2 +- classes/class_webxrinterface.rst | 2 +- classes/class_window.rst | 6 + classes/class_xrhandtracker.rst | 10 +- classes/class_xrpose.rst | 10 +- classes/index.rst | 11 + 236 files changed, 11003 insertions(+), 1560 deletions(-) create mode 100644 classes/class_editorcontextmenuplugin.rst create mode 100644 classes/class_editorexportplatformextension.rst create mode 100644 classes/class_editorexportpreset.rst create mode 100644 classes/class_externaltexture.rst create mode 100644 classes/class_gdscriptsyntaxhighlighter.rst create mode 100644 classes/class_javaobject.rst create mode 100644 classes/class_openxrvisibilitymask.rst create mode 100644 classes/class_translationdomain.rst diff --git a/classes/class_@gdscript.rst b/classes/class_@gdscript.rst index 637da62db00..8df1a7d1d91 100644 --- a/classes/class_@gdscript.rst +++ b/classes/class_@gdscript.rst @@ -711,6 +711,53 @@ See also :ref:`@GlobalScope.PROPERTY_USAGE_SUBGROUP`, icon\: :ref:`String` = ""\ ) :ref:`🔗` + +Export a :ref:`Callable` property as a clickable button with the label ``text``. When the button is pressed, the callable is called. + +If ``icon`` is specified, it is used to fetch an icon for the button via :ref:`Control.get_theme_icon`, from the ``"EditorIcons"`` theme type. If ``icon`` is omitted, the default ``"Callable"`` icon is used instead. + +Consider using the :ref:`EditorUndoRedoManager` to allow the action to be reverted safely. + +See also :ref:`@GlobalScope.PROPERTY_HINT_TOOL_BUTTON`. + +:: + + @tool + extends Sprite2D + + @export_tool_button("Hello") var hello_action = hello + @export_tool_button("Randomize the color!", "ColorRect") + var randomize_color_action = randomize_color + + func hello(): + print("Hello world!") + + func randomize_color(): + var undo_redo = EditorInterface.get_editor_undo_redo() + undo_redo.create_action("Randomized Sprite2D Color") + undo_redo.add_do_property(self, &"self_modulate", Color(randf(), randf(), randf())) + undo_redo.add_undo_property(self, &"self_modulate", self_modulate) + undo_redo.commit_action() + +\ **Note:** The property is exported without the :ref:`@GlobalScope.PROPERTY_USAGE_STORAGE` flag because a :ref:`Callable` cannot be properly serialized and stored in a file. + +\ **Note:** In an exported project neither :ref:`EditorInterface` nor :ref:`EditorUndoRedoManager` exist, which may cause some scripts to break. To prevent this, you can use :ref:`Engine.get_singleton` and omit the static type from the variable declaration: + +:: + + var undo_redo = Engine.get_singleton(&"EditorInterface").get_editor_undo_redo() + +\ **Note:** Avoid storing lambda callables in member variables of :ref:`RefCounted`-based classes (e.g. resources), as this can lead to memory leaks. Use only method callables and optionally :ref:`Callable.bind` or :ref:`Callable.unbind`. + +.. rst-class:: classref-item-separator + +---- + .. _class_@GDScript_annotation_@icon: .. rst-class:: classref-annotation @@ -899,9 +946,9 @@ Returns a single character (as a :ref:`String`) of the given Unico :: - a = char(65) # a is "A" - a = char(65 + 32) # a is "a" - a = char(8364) # a is "€" + var upper = char(65) # upper is "A" + var lower = char(65 + 32) # lower is "a" + var euro = char(8364) # euro is "€" .. rst-class:: classref-item-separator @@ -1020,7 +1067,7 @@ Returns ``true`` if ``value`` is an instance of ``type``. The ``type`` value mus Unlike the right operand of the ``is`` operator, ``type`` can be a non-constant value. The ``is`` operator supports more features (such as typed arrays). Use the operator instead of this method if you do not need dynamic type checking. -Examples: +\ **Examples:**\ :: @@ -1047,10 +1094,10 @@ Returns the length of the given Variant ``var``. The length can be the character :: - a = [1, 2, 3, 4] + var a = [1, 2, 3, 4] len(a) # Returns 4 - b = "Hello!" + var b = "Hello!" len(b) # Returns 6 .. rst-class:: classref-item-separator @@ -1166,7 +1213,7 @@ Returns an array with the given range. :ref:`range \ **Note:** Returns an empty array if no value meets the value constraint (e.g. ``range(2, 5, -1)`` or ``range(5, 5, 1)``). -Examples: +\ **Examples:**\ :: diff --git a/classes/class_@globalscope.rst b/classes/class_@globalscope.rst index 2e072c6768f..1684c54105f 100644 --- a/classes/class_@globalscope.rst +++ b/classes/class_@globalscope.rst @@ -3045,9 +3045,7 @@ enum **Error**: :ref:`🔗` Methods that return :ref:`Error` return :ref:`OK` when no error occurred. -Since :ref:`OK` has value 0, and all other error constants are positive integers, it can also be used in boolean checks. - -\ **Example:**\ +Since :ref:`OK` has value ``0``, and all other error constants are positive integers, it can also be used in boolean checks. :: @@ -3702,7 +3700,7 @@ If a property is :ref:`Array`, hints the editor how to show element -Examples: +\ **Examples:**\ .. tabs:: @@ -3806,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 @@ -3846,11 +3852,26 @@ Hints that a quaternion property should disable the temporary euler editor. Hints that a string property is a password, and every character is replaced with the secret character. +.. _class_@GlobalScope_constant_PROPERTY_HINT_TOOL_BUTTON: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_TOOL_BUTTON** = ``39`` + +Hints that a :ref:`Callable` property should be displayed as a clickable button. When the button is pressed, the callable is called. The hint string specifies the button text and optionally an icon from the ``"EditorIcons"`` theme type. + +.. code:: text + + "Click me!" - A button with the text "Click me!" and the default "Callable" icon. + "Click me!,ColorRect" - A button with the text "Click me!" and the "ColorRect" icon. + +\ **Note:** A :ref:`Callable` cannot be properly serialized and stored in a file, so it is recommended to use :ref:`PROPERTY_USAGE_EDITOR` instead of :ref:`PROPERTY_USAGE_DEFAULT`. + .. _class_@GlobalScope_constant_PROPERTY_HINT_MAX: .. rst-class:: classref-enumeration-constant -:ref:`PropertyHint` **PROPERTY_HINT_MAX** = ``38`` +:ref:`PropertyHint` **PROPERTY_HINT_MAX** = ``40`` Represents the size of the :ref:`PropertyHint` enum. @@ -5322,7 +5343,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 @@ -6084,9 +6105,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`. :: @@ -6094,7 +6115,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 @@ -6150,15 +6171,12 @@ See also :ref:`inverse_lerp` which perfo :ref:`float` **linear_to_db**\ (\ lin\: :ref:`float`\ ) :ref:`🔗` -Converts from linear energy to decibels (audio). This can be used to implement volume sliders that behave as expected (since volume isn't linear). +Converts from linear energy to decibels (audio). Since volume is not normally linear, this can be used to implement volume sliders that behave as expected. -\ **Example:**\ +\ **Example:** Change the Master bus's volume through a :ref:`Slider` node, which ranges from ``0.0`` to ``1.0``: :: - # "Slider" refers to a node that inherits Range such as HSlider or VSlider. - # Its range must be configured to go from 0 to 1. - # Change the bus name if you'd like to change the volume of a specific bus only. AudioServer.set_bus_volume_db(AudioServer.get_bus_index("Master"), linear_to_db($Slider.value)) .. rst-class:: classref-item-separator @@ -6431,7 +6449,7 @@ Converts one or more arguments of any type to string in the best way possible an -\ **Note:** Consider using :ref:`push_error` and :ref:`push_warning` to print error and warning messages instead of :ref:`print` or :ref:`print_rich`. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed. +\ **Note:** Consider using :ref:`push_error` and :ref:`push_warning` to print error and warning messages instead of :ref:`print` or :ref:`print_rich`. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed. See also :ref:`Engine.print_to_stdout` and :ref:`ProjectSettings.application/run/disable_stdout`. .. rst-class:: classref-item-separator @@ -7020,7 +7038,7 @@ Returns ``-1.0`` if ``x`` is negative, ``1.0`` if ``x`` is positive, and ``0.0`` :ref:`int` **signi**\ (\ x\: :ref:`int`\ ) :ref:`🔗` -Returns ``-1`` if ``x`` is negative, ``1`` if ``x`` is positive, and ``0`` if if ``x`` is zero. +Returns ``-1`` if ``x`` is negative, ``1`` if ``x`` is positive, and ``0`` if ``x`` is zero. :: @@ -7072,9 +7090,11 @@ Returns the hyperbolic sine of ``x``. :ref:`float` **smoothstep**\ (\ from\: :ref:`float`, to\: :ref:`float`, x\: :ref:`float`\ ) :ref:`🔗` -Returns the result of smoothly interpolating the value of ``x`` between ``0`` and ``1``, based on the where ``x`` lies with respect to the edges ``from`` and ``to``. +Returns a smooth cubic Hermite interpolation between ``0`` and ``1``. -The return value is ``0`` if ``x <= from``, and ``1`` if ``x >= to``. If ``x`` lies between ``from`` and ``to``, the returned value follows an S-shaped curve that maps ``x`` between ``0`` and ``1``. +For positive ranges (when ``from <= to``) the return value is ``0`` when ``x <= from``, and ``1`` when ``x >= to``. If ``x`` lies between ``from`` and ``to``, the return value follows an S-shaped curve that smoothly transitions from ``0`` to ``1``. + +For negative ranges (when ``from > to``) the function is mirrored and returns ``1`` when ``x <= to`` and ``0`` when ``x >= from``. This S-shaped curve is the cubic Hermite interpolator, given by ``f(y) = 3*y^2 - 2*y^3`` where ``y = (x-from) / (to-from)``. @@ -7087,7 +7107,9 @@ This S-shaped curve is the cubic Hermite interpolator, given by ``f(y) = 3*y^2 - Compared to :ref:`ease` with a curve value of ``-1.6521``, :ref:`smoothstep` returns the smoothest possible curve with no sudden changes in the derivative. If you need to perform more advanced transitions, use :ref:`Tween` or :ref:`AnimationPlayer`. -\ `Comparison between smoothstep() and ease(x, -1.6521) return values `__ +\ `Comparison between smoothstep() and ease(x, -1.6521) return values `__\ + +\ `Smoothstep() return values with positive, zero, and negative ranges `__ .. rst-class:: classref-item-separator diff --git a/classes/class_aabb.rst b/classes/class_aabb.rst index 4c35ba984c8..b9e0bb902a9 100644 --- a/classes/class_aabb.rst +++ b/classes/class_aabb.rst @@ -103,7 +103,7 @@ Methods +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_shortest_axis_size`\ (\ ) |const| | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_support`\ (\ dir\: :ref:`Vector3`\ ) |const| | + | :ref:`Vector3` | :ref:`get_support`\ (\ direction\: :ref:`Vector3`\ ) |const| | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_volume`\ (\ ) |const| | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -502,7 +502,7 @@ For an example, see :ref:`get_shortest_axis .. rst-class:: classref-method -:ref:`Vector3` **get_support**\ (\ dir\: :ref:`Vector3`\ ) |const| :ref:`🔗` +:ref:`Vector3` **get_support**\ (\ direction\: :ref:`Vector3`\ ) |const| :ref:`🔗` Returns the vertex's position of this bounding box that's the farthest in the given direction. This point is commonly known as the support point in collision detection algorithms. diff --git a/classes/class_animatedsprite2d.rst b/classes/class_animatedsprite2d.rst index 8c909164789..21402452fe8 100644 --- a/classes/class_animatedsprite2d.rst +++ b/classes/class_animatedsprite2d.rst @@ -413,18 +413,15 @@ This method is a shorthand for :ref:`play` w |void| **set_frame_and_progress**\ (\ frame\: :ref:`int`, progress\: :ref:`float`\ ) :ref:`🔗` -The setter of :ref:`frame` resets the :ref:`frame_progress` to ``0.0`` implicitly, but this method avoids that. +Sets :ref:`frame` the :ref:`frame_progress` to the given values. Unlike setting :ref:`frame`, this method does not reset the :ref:`frame_progress` to ``0.0`` implicitly. -This is useful when you want to carry over the current :ref:`frame_progress` to another :ref:`frame`. - -\ **Example:**\ +\ **Example:** Change the animation while keeping the same :ref:`frame` and :ref:`frame_progress`. .. tabs:: .. code-tab:: gdscript - # Change the animation with keeping the frame index and progress. var current_frame = animated_sprite.get_frame() var current_progress = animated_sprite.get_frame_progress() animated_sprite.play("walk_another_skin") diff --git a/classes/class_animatedsprite3d.rst b/classes/class_animatedsprite3d.rst index 46feb6c7589..100e061fe44 100644 --- a/classes/class_animatedsprite3d.rst +++ b/classes/class_animatedsprite3d.rst @@ -333,18 +333,15 @@ This method is a shorthand for :ref:`play` w |void| **set_frame_and_progress**\ (\ frame\: :ref:`int`, progress\: :ref:`float`\ ) :ref:`🔗` -The setter of :ref:`frame` resets the :ref:`frame_progress` to ``0.0`` implicitly, but this method avoids that. +Sets :ref:`frame` the :ref:`frame_progress` to the given values. Unlike setting :ref:`frame`, this method does not reset the :ref:`frame_progress` to ``0.0`` implicitly. -This is useful when you want to carry over the current :ref:`frame_progress` to another :ref:`frame`. - -\ **Example:**\ +\ **Example:** Change the animation while keeping the same :ref:`frame` and :ref:`frame_progress`. .. tabs:: .. code-tab:: gdscript - # Change the animation with keeping the frame index and progress. var current_frame = animated_sprite.get_frame() var current_progress = animated_sprite.get_frame_progress() animated_sprite.play("walk_another_skin") diff --git a/classes/class_animation.rst b/classes/class_animation.rst index c977ca1a26e..94979b016c0 100644 --- a/classes/class_animation.rst +++ b/classes/class_animation.rst @@ -85,6 +85,8 @@ Methods .. table:: :widths: auto + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_marker`\ (\ name\: :ref:`StringName`, time\: :ref:`float`\ ) | +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`add_track`\ (\ type\: :ref:`TrackType`, at_position\: :ref:`int` = -1\ ) | +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -140,16 +142,34 @@ Methods +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`find_track`\ (\ path\: :ref:`NodePath`, type\: :ref:`TrackType`\ ) |const| | +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_marker_at_time`\ (\ time\: :ref:`float`\ ) |const| | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_marker_color`\ (\ name\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_marker_names`\ (\ ) |const| | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_marker_time`\ (\ name\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_next_marker`\ (\ time\: :ref:`float`\ ) |const| | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_prev_marker`\ (\ time\: :ref:`float`\ ) |const| | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_track_count`\ (\ ) |const| | +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_marker`\ (\ name\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`StringName` | :ref:`method_track_get_name`\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`\ ) |const| | +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`method_track_get_params`\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`\ ) |const| | +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`optimize`\ (\ allowed_velocity_err\: :ref:`float` = 0.01, allowed_angular_err\: :ref:`float` = 0.01, precision\: :ref:`int` = 3\ ) | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`position_track_insert_key`\ (\ track_idx\: :ref:`int`, time\: :ref:`float`, position\: :ref:`Vector3`\ ) | +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`position_track_interpolate`\ (\ track_idx\: :ref:`int`, time_sec\: :ref:`float`, backward\: :ref:`bool` = false\ ) |const| | +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_marker`\ (\ name\: :ref:`StringName`\ ) | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`remove_track`\ (\ track_idx\: :ref:`int`\ ) | +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rotation_track_insert_key`\ (\ track_idx\: :ref:`int`, time\: :ref:`float`, rotation\: :ref:`Quaternion`\ ) | @@ -160,6 +180,8 @@ Methods +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`scale_track_interpolate`\ (\ track_idx\: :ref:`int`, time_sec\: :ref:`float`, backward\: :ref:`bool` = false\ ) |const| | +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_marker_color`\ (\ name\: :ref:`StringName`, color\: :ref:`Color`\ ) | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`track_find_key`\ (\ track_idx\: :ref:`int`, time\: :ref:`float`, find_mode\: :ref:`FindMode` = 0, limit\: :ref:`bool` = false, backward\: :ref:`bool` = false\ ) |const| | +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`track_get_interpolation_loop_wrap`\ (\ track_idx\: :ref:`int`\ ) |const| | @@ -581,6 +603,18 @@ The animation step value. Method Descriptions ------------------- +.. _class_Animation_method_add_marker: + +.. rst-class:: classref-method + +|void| **add_marker**\ (\ name\: :ref:`StringName`, time\: :ref:`float`\ ) :ref:`🔗` + +Adds a marker to this Animation. + +.. rst-class:: classref-item-separator + +---- + .. _class_Animation_method_add_track: .. rst-class:: classref-method @@ -915,6 +949,78 @@ Returns the index of the specified track. If the track is not found, return -1. ---- +.. _class_Animation_method_get_marker_at_time: + +.. rst-class:: classref-method + +:ref:`StringName` **get_marker_at_time**\ (\ time\: :ref:`float`\ ) |const| :ref:`🔗` + +Returns the name of the marker located at the given time. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Animation_method_get_marker_color: + +.. rst-class:: classref-method + +:ref:`Color` **get_marker_color**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`🔗` + +Returns the given marker's color. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Animation_method_get_marker_names: + +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_marker_names**\ (\ ) |const| :ref:`🔗` + +Returns every marker in this Animation, sorted ascending by time. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Animation_method_get_marker_time: + +.. rst-class:: classref-method + +:ref:`float` **get_marker_time**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`🔗` + +Returns the given marker's time. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Animation_method_get_next_marker: + +.. rst-class:: classref-method + +:ref:`StringName` **get_next_marker**\ (\ time\: :ref:`float`\ ) |const| :ref:`🔗` + +Returns the closest marker that comes after the given time. If no such marker exists, an empty string is returned. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Animation_method_get_prev_marker: + +.. rst-class:: classref-method + +:ref:`StringName` **get_prev_marker**\ (\ time\: :ref:`float`\ ) |const| :ref:`🔗` + +Returns the closest marker that comes before the given time. If no such marker exists, an empty string is returned. + +.. rst-class:: classref-item-separator + +---- + .. _class_Animation_method_get_track_count: .. rst-class:: classref-method @@ -927,6 +1033,18 @@ Returns the amount of tracks in the animation. ---- +.. _class_Animation_method_has_marker: + +.. rst-class:: classref-method + +:ref:`bool` **has_marker**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`🔗` + +Returns ``true`` if this Animation contains a marker with the given name. + +.. rst-class:: classref-item-separator + +---- + .. _class_Animation_method_method_track_get_name: .. rst-class:: classref-method @@ -951,6 +1069,18 @@ Returns the arguments values to be called on a method track for a given key in a ---- +.. _class_Animation_method_optimize: + +.. rst-class:: classref-method + +|void| **optimize**\ (\ allowed_velocity_err\: :ref:`float` = 0.01, allowed_angular_err\: :ref:`float` = 0.01, precision\: :ref:`int` = 3\ ) :ref:`🔗` + +Optimize the animation and all its tracks in-place. This will preserve only as many keys as are necessary to keep the animation within the specified bounds. + +.. rst-class:: classref-item-separator + +---- + .. _class_Animation_method_position_track_insert_key: .. rst-class:: classref-method @@ -975,6 +1105,18 @@ Returns the interpolated position value at the given time (in seconds). The ``tr ---- +.. _class_Animation_method_remove_marker: + +.. rst-class:: classref-method + +|void| **remove_marker**\ (\ name\: :ref:`StringName`\ ) :ref:`🔗` + +Removes the marker with the given name from this Animation. + +.. rst-class:: classref-item-separator + +---- + .. _class_Animation_method_remove_track: .. rst-class:: classref-method @@ -1035,6 +1177,18 @@ Returns the interpolated scale value at the given time (in seconds). The ``track ---- +.. _class_Animation_method_set_marker_color: + +.. rst-class:: classref-method + +|void| **set_marker_color**\ (\ name\: :ref:`StringName`, color\: :ref:`Color`\ ) :ref:`🔗` + +Sets the given marker's color. + +.. rst-class:: classref-item-separator + +---- + .. _class_Animation_method_track_find_key: .. rst-class:: classref-method diff --git a/classes/class_animationmixer.rst b/classes/class_animationmixer.rst index 42d15af41cb..918f870a69b 100644 --- a/classes/class_animationmixer.rst +++ b/classes/class_animationmixer.rst @@ -25,6 +25,13 @@ Base class for :ref:`AnimationPlayer` and :ref:`Animation After instantiating the playback information data within the extended class, the blending is processed by the **AnimationMixer**. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- `Migrating Animations from Godot 4.0 to 4.3 `__ + .. rst-class:: classref-reftable-group Properties @@ -295,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 @@ -665,7 +696,7 @@ The most basic example is applying position to :ref:`CharacterBody3D`, you can apply the root motion position more correctly to account for the rotation of the node. +By using this in combination with :ref:`get_root_motion_rotation_accumulator`, you can apply the root motion position more correctly to account for the rotation of the node. .. tabs:: diff --git a/classes/class_animationnodeanimation.rst b/classes/class_animationnodeanimation.rst index 734212e8862..d7b220ae231 100644 --- a/classes/class_animationnodeanimation.rst +++ b/classes/class_animationnodeanimation.rst @@ -126,6 +126,8 @@ Animation to use as an output. It is one of the animations provided by :ref:`Ani If :ref:`use_custom_timeline` is ``true``, override the loop settings of the original :ref:`Animation` resource with the value. +\ **Note:** If the :ref:`Animation.loop_mode` isn't set to looping, the :ref:`Animation.track_set_interpolation_loop_wrap` option will not be respected. If you cannot get the expected behavior, consider duplicating the :ref:`Animation` resource and changing the loop settings. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_animationnodeblendspace2d.rst b/classes/class_animationnodeblendspace2d.rst index 506b47bff25..c107fffa9f8 100644 --- a/classes/class_animationnodeblendspace2d.rst +++ b/classes/class_animationnodeblendspace2d.rst @@ -21,7 +21,7 @@ Description A resource used by :ref:`AnimationNodeBlendTree`. -\ :ref:`AnimationNodeBlendSpace1D` represents a virtual 2D space on which :ref:`AnimationRootNode`\ s are placed. Outputs the linear blend of the three adjacent animations using a :ref:`Vector2` weight. Adjacent in this context means the three :ref:`AnimationRootNode`\ s making up the triangle that contains the current value. +\ **AnimationNodeBlendSpace2D** represents a virtual 2D space on which :ref:`AnimationRootNode`\ s are placed. Outputs the linear blend of the three adjacent animations using a :ref:`Vector2` weight. Adjacent in this context means the three :ref:`AnimationRootNode`\ s making up the triangle that contains the current value. You can add vertices to the blend space with :ref:`add_blend_point` and automatically triangulate it by setting :ref:`auto_triangles` to ``true``. Otherwise, use :ref:`add_triangle` and :ref:`remove_triangle` to triangulate the blend space by hand. @@ -426,7 +426,7 @@ Changes the :ref:`AnimationNode` referenced by the point at |void| **set_blend_point_position**\ (\ point\: :ref:`int`, pos\: :ref:`Vector2`\ ) :ref:`🔗` -Updates the position of the point at index ``point`` on the blend axis. +Updates the position of the point at index ``point`` in the blend space. .. |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_animationnodestatemachine.rst b/classes/class_animationnodestatemachine.rst index f567081cc0b..d5e14462efa 100644 --- a/classes/class_animationnodestatemachine.rst +++ b/classes/class_animationnodestatemachine.rst @@ -21,8 +21,6 @@ Description Contains multiple :ref:`AnimationRootNode`\ s representing animation states, connected in a graph. State transitions can be configured to happen automatically or via code, using a shortest-path algorithm. Retrieve the :ref:`AnimationNodeStateMachinePlayback` object from the :ref:`AnimationTree` node to control it programmatically. -\ **Example:**\ - .. tabs:: diff --git a/classes/class_animationnodestatemachineplayback.rst b/classes/class_animationnodestatemachineplayback.rst index 221d1f62aa3..c1490a096e9 100644 --- a/classes/class_animationnodestatemachineplayback.rst +++ b/classes/class_animationnodestatemachineplayback.rst @@ -21,8 +21,6 @@ Description Allows control of :ref:`AnimationTree` state machines created with :ref:`AnimationNodeStateMachine`. Retrieve with ``$AnimationTree.get("parameters/playback")``. -\ **Example:**\ - .. tabs:: diff --git a/classes/class_animationplayer.rst b/classes/class_animationplayer.rst index ffa39105dba..c43c0d34d58 100644 --- a/classes/class_animationplayer.rst +++ b/classes/class_animationplayer.rst @@ -99,6 +99,12 @@ Methods +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`NodePath` | :ref:`get_root`\ (\ ) |const| | +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_section_end_time`\ (\ ) |const| | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_section_start_time`\ (\ ) |const| | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_section`\ (\ ) |const| | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_playing`\ (\ ) |const| | +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`pause`\ (\ ) | @@ -107,10 +113,20 @@ Methods +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`play_backwards`\ (\ name\: :ref:`StringName` = &"", custom_blend\: :ref:`float` = -1\ ) | +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`play_section`\ (\ name\: :ref:`StringName` = &"", start_time\: :ref:`float` = -1, end_time\: :ref:`float` = -1, custom_blend\: :ref:`float` = -1, custom_speed\: :ref:`float` = 1.0, from_end\: :ref:`bool` = false\ ) | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`play_section_backwards`\ (\ name\: :ref:`StringName` = &"", start_time\: :ref:`float` = -1, end_time\: :ref:`float` = -1, custom_blend\: :ref:`float` = -1\ ) | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`play_section_with_markers`\ (\ name\: :ref:`StringName` = &"", start_marker\: :ref:`StringName` = &"", end_marker\: :ref:`StringName` = &"", custom_blend\: :ref:`float` = -1, custom_speed\: :ref:`float` = 1.0, from_end\: :ref:`bool` = false\ ) | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`play_section_with_markers_backwards`\ (\ name\: :ref:`StringName` = &"", start_marker\: :ref:`StringName` = &"", end_marker\: :ref:`StringName` = &"", custom_blend\: :ref:`float` = -1\ ) | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`play_with_capture`\ (\ name\: :ref:`StringName` = &"", duration\: :ref:`float` = -1.0, custom_blend\: :ref:`float` = -1, custom_speed\: :ref:`float` = 1.0, from_end\: :ref:`bool` = false, trans_type\: :ref:`TransitionType` = 0, ease_type\: :ref:`EaseType` = 0\ ) | +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`queue`\ (\ name\: :ref:`StringName`\ ) | +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reset_section`\ (\ ) | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`seek`\ (\ seconds\: :ref:`float`, update\: :ref:`bool` = false, update_only\: :ref:`bool` = false\ ) | +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_blend_time`\ (\ animation_from\: :ref:`StringName`, animation_to\: :ref:`StringName`, sec\: :ref:`float`\ ) | @@ -121,6 +137,10 @@ Methods +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_root`\ (\ path\: :ref:`NodePath`\ ) | +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_section`\ (\ start_time\: :ref:`float` = -1, end_time\: :ref:`float` = -1\ ) | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_section_with_markers`\ (\ start_marker\: :ref:`StringName` = &"", end_marker\: :ref:`StringName` = &""\ ) | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`stop`\ (\ keep_state\: :ref:`bool` = false\ ) | +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -572,6 +592,42 @@ Returns the node which node path references will travel from. ---- +.. _class_AnimationPlayer_method_get_section_end_time: + +.. rst-class:: classref-method + +:ref:`float` **get_section_end_time**\ (\ ) |const| :ref:`🔗` + +Returns the end time of the section currently being played. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationPlayer_method_get_section_start_time: + +.. rst-class:: classref-method + +:ref:`float` **get_section_start_time**\ (\ ) |const| :ref:`🔗` + +Returns the start time of the section currently being played. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationPlayer_method_has_section: + +.. rst-class:: classref-method + +:ref:`bool` **has_section**\ (\ ) |const| :ref:`🔗` + +Returns ``true`` if an animation is currently playing with section. + +.. rst-class:: classref-item-separator + +---- + .. _class_AnimationPlayer_method_is_playing: .. rst-class:: classref-method @@ -630,6 +686,62 @@ This method is a shorthand for :ref:`play` wi ---- +.. _class_AnimationPlayer_method_play_section: + +.. rst-class:: classref-method + +|void| **play_section**\ (\ name\: :ref:`StringName` = &"", start_time\: :ref:`float` = -1, end_time\: :ref:`float` = -1, custom_blend\: :ref:`float` = -1, custom_speed\: :ref:`float` = 1.0, from_end\: :ref:`bool` = false\ ) :ref:`🔗` + +Plays the animation with key ``name`` and the section starting from ``start_time`` and ending on ``end_time``. See also :ref:`play`. + +Setting ``start_time`` to a value outside the range of the animation means the start of the animation will be used instead, and setting ``end_time`` to a value outside the range of the animation means the end of the animation will be used instead. ``start_time`` cannot be equal to ``end_time``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationPlayer_method_play_section_backwards: + +.. rst-class:: classref-method + +|void| **play_section_backwards**\ (\ name\: :ref:`StringName` = &"", start_time\: :ref:`float` = -1, end_time\: :ref:`float` = -1, custom_blend\: :ref:`float` = -1\ ) :ref:`🔗` + +Plays the animation with key ``name`` and the section starting from ``start_time`` and ending on ``end_time`` in reverse. + +This method is a shorthand for :ref:`play_section` with ``custom_speed = -1.0`` and ``from_end = true``, see its description for more information. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationPlayer_method_play_section_with_markers: + +.. rst-class:: classref-method + +|void| **play_section_with_markers**\ (\ name\: :ref:`StringName` = &"", start_marker\: :ref:`StringName` = &"", end_marker\: :ref:`StringName` = &"", custom_blend\: :ref:`float` = -1, custom_speed\: :ref:`float` = 1.0, from_end\: :ref:`bool` = false\ ) :ref:`🔗` + +Plays the animation with key ``name`` and the section starting from ``start_marker`` and ending on ``end_marker``. + +If the start marker is empty, the section starts from the beginning of the animation. If the end marker is empty, the section ends on the end of the animation. See also :ref:`play`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationPlayer_method_play_section_with_markers_backwards: + +.. rst-class:: classref-method + +|void| **play_section_with_markers_backwards**\ (\ name\: :ref:`StringName` = &"", start_marker\: :ref:`StringName` = &"", end_marker\: :ref:`StringName` = &"", custom_blend\: :ref:`float` = -1\ ) :ref:`🔗` + +Plays the animation with key ``name`` and the section starting from ``start_marker`` and ending on ``end_marker`` in reverse. + +This method is a shorthand for :ref:`play_section_with_markers` with ``custom_speed = -1.0`` and ``from_end = true``, see its description for more information. + +.. rst-class:: classref-item-separator + +---- + .. _class_AnimationPlayer_method_play_with_capture: .. rst-class:: classref-method @@ -661,7 +773,7 @@ If ``duration`` is a negative value, the duration is set to the interval between |void| **queue**\ (\ name\: :ref:`StringName`\ ) :ref:`🔗` -Queues an animation for playback once the current one is done. +Queues an animation for playback once the current animation and all previously queued animations are done. \ **Note:** If a looped animation is currently playing, the queued animation will never play unless the looped animation is stopped somehow. @@ -669,6 +781,18 @@ Queues an animation for playback once the current one is done. ---- +.. _class_AnimationPlayer_method_reset_section: + +.. rst-class:: classref-method + +|void| **reset_section**\ (\ ) :ref:`🔗` + +Resets the current section if section is set. + +.. rst-class:: classref-item-separator + +---- + .. _class_AnimationPlayer_method_seek: .. rst-class:: classref-method @@ -739,6 +863,32 @@ Sets the node which node path references will travel from. ---- +.. _class_AnimationPlayer_method_set_section: + +.. rst-class:: classref-method + +|void| **set_section**\ (\ start_time\: :ref:`float` = -1, end_time\: :ref:`float` = -1\ ) :ref:`🔗` + +Changes the start and end times of the section being played. The current playback position will be clamped within the new section. See also :ref:`play_section`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationPlayer_method_set_section_with_markers: + +.. rst-class:: classref-method + +|void| **set_section_with_markers**\ (\ start_marker\: :ref:`StringName` = &"", end_marker\: :ref:`StringName` = &""\ ) :ref:`🔗` + +Changes the start and end markers of the section being played. The current playback position will be clamped within the new section. See also :ref:`play_section_with_markers`. + +If the argument is empty, the section uses the beginning or end of the animation. If both are empty, it means that the section is not set. + +.. rst-class:: classref-item-separator + +---- + .. _class_AnimationPlayer_method_stop: .. rst-class:: classref-method diff --git a/classes/class_array.rst b/classes/class_array.rst index aba6bcbb539..bb14c5a11be 100644 --- a/classes/class_array.rst +++ b/classes/class_array.rst @@ -17,9 +17,7 @@ A built-in data structure that holds a sequence of elements. Description ----------- -An array data structure that can contain a sequence of elements of any :ref:`Variant` type. Elements are accessed by a numerical index starting at 0. Negative indices are used to count from the back (-1 is the last element, -2 is the second to last, etc.). - -\ **Example:**\ +An array data structure that can contain a sequence of elements of any :ref:`Variant` type. Elements are accessed by a numerical index starting at ``0``. Negative indices are used to count from the back (``-1`` is the last element, ``-2`` is the second to last, etc.). .. tabs:: @@ -133,8 +131,12 @@ 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:`Variant` | :ref:`get`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_typed_builtin`\ (\ ) |const| | +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`StringName` | :ref:`get_typed_class_name`\ (\ ) |const| | @@ -185,6 +187,10 @@ 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:`set`\ (\ index\: :ref:`int`, value\: :ref:`Variant`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`shuffle`\ (\ ) | +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`size`\ (\ ) |const| | @@ -522,7 +528,7 @@ Appends another ``array`` at the end of this array. var numbers = [1, 2, 3] var extra = [4, 5, 6] numbers.append_array(extra) - print(nums) # Prints [1, 2, 3, 4, 5, 6] + print(numbers) # Prints [1, 2, 3, 4, 5, 6] .. rst-class:: classref-item-separator @@ -641,6 +647,8 @@ Removes all elements from the array. This is equivalent to using :ref:`resize`. + .. rst-class:: classref-item-separator ---- @@ -751,6 +759,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 ---- @@ -769,6 +806,18 @@ Returns the first element of the array. If the array is empty, fails and returns ---- +.. _class_Array_method_get: + +.. rst-class:: classref-method + +:ref:`Variant` **get**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the element at the given ``index`` in the array. This is the same as using the ``[]`` operator (``array[index]``). + +.. rst-class:: classref-item-separator + +---- + .. _class_Array_method_get_typed_builtin: .. rst-class:: classref-method @@ -1131,6 +1180,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 @@ -1195,6 +1257,30 @@ 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_set: + +.. rst-class:: classref-method + +|void| **set**\ (\ index\: :ref:`int`, value\: :ref:`Variant`\ ) :ref:`🔗` + +Sets the value of the element at the given ``index`` to the given ``value``. This will not change the size of the array, it only changes the value at an index already in the array. This is the same as using the ``[]`` operator (``array[index] = value``). + +.. rst-class:: classref-item-separator + +---- + .. _class_Array_method_shuffle: .. rst-class:: classref-method @@ -1256,7 +1342,7 @@ If ``deep`` is ``true``, all nested **Array** and :ref:`Dictionary` -Sorts the array in ascending order. The final order is dependent on the "less than" (``>``) comparison between elements. +Sorts the array in ascending order. The final order is dependent on the "less than" (``<``) comparison between elements. .. tabs:: @@ -1289,7 +1375,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``. :: @@ -1304,7 +1390,7 @@ Sorts the array using a custom :ref:`Callable`. print(my_items) # Prints [["Rice", 4], ["Tomato", 5], ["Apple", 9]] # Sort descending, using a lambda function. - my_items.sort_custom(func(a, b): return a[0] > b[0]) + my_items.sort_custom(func(a, b): return a[1] > b[1]) print(my_items) # Prints [["Apple", 9], ["Tomato", 5], ["Rice", 4]] It may also be necessary to use this method to sort strings by natural order, with :ref:`String.naturalnocasecmp_to`, as in the following example: diff --git a/classes/class_arraymesh.rst b/classes/class_arraymesh.rst index 629392dde74..a1769807e4f 100644 --- a/classes/class_arraymesh.rst +++ b/classes/class_arraymesh.rst @@ -197,7 +197,9 @@ Overrides the :ref:`AABB` with one defined by user for use with frus - |void| **set_shadow_mesh**\ (\ value\: :ref:`ArrayMesh`\ ) - :ref:`ArrayMesh` **get_shadow_mesh**\ (\ ) -An optional mesh which is used for rendering shadows and can be used for the depth prepass. Can be used to increase performance of shadow rendering by using a mesh that only contains vertex position data (without normals, UVs, colors, etc.). +An optional mesh which can be used for rendering shadows and the depth prepass. Can be used to increase performance by supplying a mesh with fused vertices and only vertex position data (without normals, UVs, colors, etc.). + +\ **Note:** This mesh must have exactly the same vertex positions as the source mesh (including the source mesh's LODs, if present). If vertex positions differ, then the mesh will not draw correctly. .. rst-class:: classref-section-separator diff --git a/classes/class_astar2d.rst b/classes/class_astar2d.rst index 91eef236561..0127c90824a 100644 --- a/classes/class_astar2d.rst +++ b/classes/class_astar2d.rst @@ -34,7 +34,7 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`_compute_cost`\ (\ from_id\: :ref:`int`, to_id\: :ref:`int`\ ) |virtual| |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_estimate_cost`\ (\ from_id\: :ref:`int`, to_id\: :ref:`int`\ ) |virtual| |const| | + | :ref:`float` | :ref:`_estimate_cost`\ (\ from_id\: :ref:`int`, end_id\: :ref:`int`\ ) |virtual| |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`add_point`\ (\ id\: :ref:`int`, position\: :ref:`Vector2`, weight_scale\: :ref:`float` = 1.0\ ) | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -110,7 +110,7 @@ Note that this function is hidden in the default **AStar2D** class. .. rst-class:: classref-method -:ref:`float` **_estimate_cost**\ (\ from_id\: :ref:`int`, to_id\: :ref:`int`\ ) |virtual| |const| :ref:`🔗` +:ref:`float` **_estimate_cost**\ (\ from_id\: :ref:`int`, end_id\: :ref:`int`\ ) |virtual| |const| :ref:`🔗` Called when estimating the cost between a point and the path's ending point. @@ -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:: @@ -319,7 +321,7 @@ If there is no valid path to the target, and ``allow_partial_path`` is ``true``, astar.ConnectPoints(2, 3, false); astar.ConnectPoints(4, 3, false); astar.ConnectPoints(1, 4, false); - int[] res = astar.GetIdPath(1, 3); // Returns [1, 2, 3] + long[] res = astar.GetIdPath(1, 3); // Returns [1, 2, 3] @@ -376,7 +378,7 @@ Returns an array with the IDs of the points that form the connection with the gi astar.ConnectPoints(1, 2, true); astar.ConnectPoints(1, 3, true); - int[] neighbors = astar.GetPointConnections(1); // Returns [2, 3] + long[] neighbors = astar.GetPointConnections(1); // Returns [2, 3] @@ -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 68a00d86253..6fbb98bc0a6 100644 --- a/classes/class_astar3d.rst +++ b/classes/class_astar3d.rst @@ -71,7 +71,7 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`_compute_cost`\ (\ from_id\: :ref:`int`, to_id\: :ref:`int`\ ) |virtual| |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_estimate_cost`\ (\ from_id\: :ref:`int`, to_id\: :ref:`int`\ ) |virtual| |const| | + | :ref:`float` | :ref:`_estimate_cost`\ (\ from_id\: :ref:`int`, end_id\: :ref:`int`\ ) |virtual| |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`add_point`\ (\ id\: :ref:`int`, position\: :ref:`Vector3`, weight_scale\: :ref:`float` = 1.0\ ) | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -147,7 +147,7 @@ Note that this function is hidden in the default **AStar3D** class. .. rst-class:: classref-method -:ref:`float` **_estimate_cost**\ (\ from_id\: :ref:`int`, to_id\: :ref:`int`\ ) |virtual| |const| :ref:`🔗` +:ref:`float` **_estimate_cost**\ (\ from_id\: :ref:`int`, end_id\: :ref:`int`\ ) |virtual| |const| :ref:`🔗` Called when estimating the cost between a point and the path's ending point. @@ -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:: @@ -355,7 +357,7 @@ If there is no valid path to the target, and ``allow_partial_path`` is ``true``, astar.ConnectPoints(2, 3, false); astar.ConnectPoints(4, 3, false); astar.ConnectPoints(1, 4, false); - int[] res = astar.GetIdPath(1, 3); // Returns [1, 2, 3] + long[] res = astar.GetIdPath(1, 3); // Returns [1, 2, 3] @@ -411,7 +413,7 @@ Returns an array with the IDs of the points that form the connection with the gi astar.ConnectPoints(1, 2, true); astar.ConnectPoints(1, 3, true); - int[] neighbors = astar.GetPointConnections(1); // Returns [2, 3] + long[] neighbors = astar.GetPointConnections(1); // Returns [2, 3] @@ -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 770356dc125..91a5427f25e 100644 --- a/classes/class_astargrid2d.rst +++ b/classes/class_astargrid2d.rst @@ -84,39 +84,41 @@ Methods .. table:: :widths: auto - +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_compute_cost`\ (\ from_id\: :ref:`Vector2i`, to_id\: :ref:`Vector2i`\ ) |virtual| |const| | - +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_estimate_cost`\ (\ from_id\: :ref:`Vector2i`, to_id\: :ref:`Vector2i`\ ) |virtual| |const| | - +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`clear`\ (\ ) | - +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`fill_solid_region`\ (\ region\: :ref:`Rect2i`, solid\: :ref:`bool` = true\ ) | - +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`fill_weight_scale_region`\ (\ region\: :ref:`Rect2i`, weight_scale\: :ref:`float`\ ) | - +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`Vector2i`\] | :ref:`get_id_path`\ (\ from_id\: :ref:`Vector2i`, to_id\: :ref:`Vector2i`, allow_partial_path\: :ref:`bool` = false\ ) | - +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array` | :ref:`get_point_path`\ (\ from_id\: :ref:`Vector2i`, to_id\: :ref:`Vector2i`, allow_partial_path\: :ref:`bool` = false\ ) | - +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_point_position`\ (\ id\: :ref:`Vector2i`\ ) |const| | - +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_point_weight_scale`\ (\ id\: :ref:`Vector2i`\ ) |const| | - +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_dirty`\ (\ ) |const| | - +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_in_bounds`\ (\ x\: :ref:`int`, y\: :ref:`int`\ ) |const| | - +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_in_boundsv`\ (\ id\: :ref:`Vector2i`\ ) |const| | - +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_point_solid`\ (\ id\: :ref:`Vector2i`\ ) |const| | - +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_point_solid`\ (\ id\: :ref:`Vector2i`, solid\: :ref:`bool` = true\ ) | - +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_point_weight_scale`\ (\ id\: :ref:`Vector2i`, weight_scale\: :ref:`float`\ ) | - +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`update`\ (\ ) | - +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_compute_cost`\ (\ from_id\: :ref:`Vector2i`, to_id\: :ref:`Vector2i`\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_estimate_cost`\ (\ from_id\: :ref:`Vector2i`, end_id\: :ref:`Vector2i`\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear`\ (\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`fill_solid_region`\ (\ region\: :ref:`Rect2i`, solid\: :ref:`bool` = true\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`fill_weight_scale_region`\ (\ region\: :ref:`Rect2i`, weight_scale\: :ref:`float`\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Vector2i`\] | :ref:`get_id_path`\ (\ from_id\: :ref:`Vector2i`, to_id\: :ref:`Vector2i`, allow_partial_path\: :ref:`bool` = false\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`get_point_data_in_region`\ (\ region\: :ref:`Rect2i`\ ) |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`get_point_path`\ (\ from_id\: :ref:`Vector2i`, to_id\: :ref:`Vector2i`, allow_partial_path\: :ref:`bool` = false\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_point_position`\ (\ id\: :ref:`Vector2i`\ ) |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_point_weight_scale`\ (\ id\: :ref:`Vector2i`\ ) |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_dirty`\ (\ ) |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_in_bounds`\ (\ x\: :ref:`int`, y\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_in_boundsv`\ (\ id\: :ref:`Vector2i`\ ) |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_point_solid`\ (\ id\: :ref:`Vector2i`\ ) |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_point_solid`\ (\ id\: :ref:`Vector2i`, solid\: :ref:`bool` = true\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_point_weight_scale`\ (\ id\: :ref:`Vector2i`, weight_scale\: :ref:`float`\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`update`\ (\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -483,7 +485,7 @@ Note that this function is hidden in the default **AStarGrid2D** class. .. rst-class:: classref-method -:ref:`float` **_estimate_cost**\ (\ from_id\: :ref:`Vector2i`, to_id\: :ref:`Vector2i`\ ) |virtual| |const| :ref:`🔗` +:ref:`float` **_estimate_cost**\ (\ from_id\: :ref:`Vector2i`, end_id\: :ref:`Vector2i`\ ) |virtual| |const| :ref:`🔗` Called when estimating the cost between a point and the path's ending point. @@ -543,6 +545,20 @@ 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 + +---- + +.. _class_AStarGrid2D_method_get_point_data_in_region: + +.. rst-class:: classref-method + +:ref:`Array`\[:ref:`Dictionary`\] **get_point_data_in_region**\ (\ region\: :ref:`Rect2i`\ ) |const| :ref:`🔗` + +Returns an array of dictionaries with point data (``id``: :ref:`Vector2i`, ``position``: :ref:`Vector2`, ``solid``: :ref:`bool`, ``weight_scale``: :ref:`float`) within a ``region``. + .. rst-class:: classref-item-separator ---- @@ -559,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_audiostreamplayer.rst b/classes/class_audiostreamplayer.rst index 9f709e104b4..5e8de34ce13 100644 --- a/classes/class_audiostreamplayer.rst +++ b/classes/class_audiostreamplayer.rst @@ -24,7 +24,7 @@ Description The **AudioStreamPlayer** node plays an audio stream non-positionally. It is ideal for user interfaces, menus, or background music. -To use this node, :ref:`stream` needs to be set to a valid :ref:`AudioStream` resource. Playing more than one sound at the time is also supported, see :ref:`max_polyphony`. +To use this node, :ref:`stream` needs to be set to a valid :ref:`AudioStream` resource. Playing more than one sound at the same time is also supported, see :ref:`max_polyphony`. If you need to play audio at a specific position, use :ref:`AudioStreamPlayer2D` or :ref:`AudioStreamPlayer3D` instead. @@ -276,6 +276,7 @@ The playback type of the stream player. If set other than to the default value, .. rst-class:: classref-property-setget +- |void| **set_playing**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_playing**\ (\ ) If ``true``, this node is playing sounds. Setting this property has the same effect as :ref:`play` and :ref:`stop`. diff --git a/classes/class_audiostreamplayer2d.rst b/classes/class_audiostreamplayer2d.rst index ac52ce133d0..d21a37e4428 100644 --- a/classes/class_audiostreamplayer2d.rst +++ b/classes/class_audiostreamplayer2d.rst @@ -286,6 +286,7 @@ The playback type of the stream player. If set other than to the default value, .. rst-class:: classref-property-setget +- |void| **set_playing**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_playing**\ (\ ) If ``true``, audio is playing or is queued to be played (see :ref:`play`). diff --git a/classes/class_audiostreamplayer3d.rst b/classes/class_audiostreamplayer3d.rst index 1160b7cd272..9ac194f2a98 100644 --- a/classes/class_audiostreamplayer3d.rst +++ b/classes/class_audiostreamplayer3d.rst @@ -502,6 +502,7 @@ The playback type of the stream player. If set other than to the default value, .. rst-class:: classref-property-setget +- |void| **set_playing**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_playing**\ (\ ) If ``true``, audio is playing or is queued to be played (see :ref:`play`). diff --git a/classes/class_audiostreamsynchronized.rst b/classes/class_audiostreamsynchronized.rst index a83a29f5c6f..914abe5cb97 100644 --- a/classes/class_audiostreamsynchronized.rst +++ b/classes/class_audiostreamsynchronized.rst @@ -66,7 +66,7 @@ Constants **MAX_STREAMS** = ``32`` :ref:`🔗` -Maximum amount of streams that can be synchrohized. +Maximum amount of streams that can be synchronized. .. rst-class:: classref-section-separator diff --git a/classes/class_audiostreamwav.rst b/classes/class_audiostreamwav.rst index fb21bcccfb9..e61b8c68c31 100644 --- a/classes/class_audiostreamwav.rst +++ b/classes/class_audiostreamwav.rst @@ -87,7 +87,7 @@ enum **Format**: :ref:`🔗` :ref:`Format` **FORMAT_8_BITS** = ``0`` -8-bit audio codec. +8-bit PCM audio codec. .. _class_AudioStreamWAV_constant_FORMAT_16_BITS: @@ -95,7 +95,7 @@ enum **Format**: :ref:`🔗` :ref:`Format` **FORMAT_16_BITS** = ``1`` -16-bit audio codec. +16-bit PCM audio codec. .. _class_AudioStreamWAV_constant_FORMAT_IMA_ADPCM: @@ -103,7 +103,7 @@ enum **Format**: :ref:`🔗` :ref:`Format` **FORMAT_IMA_ADPCM** = ``2`` -Audio is compressed using IMA ADPCM. +Audio is lossily compressed as IMA ADPCM. .. _class_AudioStreamWAV_constant_FORMAT_QOA: @@ -111,7 +111,7 @@ Audio is compressed using IMA ADPCM. :ref:`Format` **FORMAT_QOA** = ``3`` -Audio is compressed as QOA (`Quite OK Audio `__). +Audio is lossily compressed as `Quite OK Audio `__. .. rst-class:: classref-item-separator @@ -177,7 +177,9 @@ Property Descriptions Contains the audio data in bytes. -\ **Note:** This property expects signed PCM8 data. To convert unsigned PCM8 to signed PCM8, subtract 128 from each byte. +\ **Note:** If :ref:`format` is set to :ref:`FORMAT_8_BITS`, this property expects signed 8-bit PCM data. To convert from unsigned 8-bit PCM, subtract 128 from each byte. + +\ **Note:** If :ref:`format` is set to :ref:`FORMAT_QOA`, this property expects data from a full QOA file. **Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedByteArray` for more details. @@ -213,7 +215,7 @@ Audio format. See :ref:`Format` constants for values - |void| **set_loop_begin**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_loop_begin**\ (\ ) -The loop start point (in number of samples, relative to the beginning of the stream). This information will be imported automatically from the WAV file if present. +The loop start point (in number of samples, relative to the beginning of the stream). .. rst-class:: classref-item-separator @@ -230,7 +232,7 @@ The loop start point (in number of samples, relative to the beginning of the str - |void| **set_loop_end**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_loop_end**\ (\ ) -The loop end point (in number of samples, relative to the beginning of the stream). This information will be imported automatically from the WAV file if present. +The loop end point (in number of samples, relative to the beginning of the stream). .. rst-class:: classref-item-separator @@ -247,7 +249,7 @@ The loop end point (in number of samples, relative to the beginning of the strea - |void| **set_loop_mode**\ (\ value\: :ref:`LoopMode`\ ) - :ref:`LoopMode` **get_loop_mode**\ (\ ) -The loop mode. This information will be imported automatically from the WAV file if present. See :ref:`LoopMode` constants for values. +The loop mode. See :ref:`LoopMode` constants for values. .. rst-class:: classref-item-separator @@ -302,7 +304,7 @@ Method Descriptions :ref:`Error` **save_to_wav**\ (\ path\: :ref:`String`\ ) :ref:`🔗` -Saves the AudioStreamWAV as a WAV file to ``path``. Samples with IMA ADPCM or QOA formats can't be saved. +Saves the AudioStreamWAV as a WAV file to ``path``. Samples with IMA ADPCM or Quite OK Audio formats can't be saved. \ **Note:** A ``.wav`` extension is automatically appended to ``path`` if it is missing. diff --git a/classes/class_basebutton.rst b/classes/class_basebutton.rst index acb2d2a0be8..b5f9ec04a12 100644 --- a/classes/class_basebutton.rst +++ b/classes/class_basebutton.rst @@ -288,7 +288,7 @@ To allow both left-click and right-click, use ``MOUSE_BUTTON_MASK_LEFT | MOUSE_B If ``true``, the button's state is pressed. Means the button is pressed down or toggled (if :ref:`toggle_mode` is active). Only works if :ref:`toggle_mode` is ``true``. -\ **Note:** Setting :ref:`button_pressed` will result in :ref:`toggled` to be emitted. If you want to change the pressed state without emitting that signal, use :ref:`set_pressed_no_signal`. +\ **Note:** Changing the value of :ref:`button_pressed` will result in :ref:`toggled` to be emitted. If you want to change the pressed state without emitting that signal, use :ref:`set_pressed_no_signal`. .. rst-class:: classref-item-separator @@ -377,6 +377,8 @@ If ``true``, the button will highlight for a short amount of time when its short If ``true``, the button will add information about its shortcut in the tooltip. +\ **Note:** This property does nothing when the tooltip control is customized using :ref:`Control._make_custom_tooltip`. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_boneattachment3d.rst b/classes/class_boneattachment3d.rst index 5b5475a34a4..94b63075d7e 100644 --- a/classes/class_boneattachment3d.rst +++ b/classes/class_boneattachment3d.rst @@ -48,17 +48,19 @@ Methods .. table:: :widths: auto - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`NodePath` | :ref:`get_external_skeleton`\ (\ ) |const| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_use_external_skeleton`\ (\ ) |const| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`on_skeleton_update`\ (\ ) | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_external_skeleton`\ (\ external_skeleton\: :ref:`NodePath`\ ) | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_use_external_skeleton`\ (\ use_external_skeleton\: :ref:`bool`\ ) | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`get_external_skeleton`\ (\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Skeleton3D` | :ref:`get_skeleton`\ (\ ) | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_use_external_skeleton`\ (\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`on_skeleton_update`\ (\ ) | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_external_skeleton`\ (\ external_skeleton\: :ref:`NodePath`\ ) | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_use_external_skeleton`\ (\ use_external_skeleton\: :ref:`bool`\ ) | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -139,6 +141,18 @@ Returns the :ref:`NodePath` to the external :ref:`Skeleton3D` **get_skeleton**\ (\ ) :ref:`🔗` + +Get parent or external :ref:`Skeleton3D` node if found. + +.. rst-class:: classref-item-separator + +---- + .. _class_BoneAttachment3D_method_get_use_external_skeleton: .. rst-class:: classref-method diff --git a/classes/class_callable.rst b/classes/class_callable.rst index 691f4482ef9..e5de02ea433 100644 --- a/classes/class_callable.rst +++ b/classes/class_callable.rst @@ -19,8 +19,6 @@ Description **Callable** is a built-in :ref:`Variant` type that represents a function. It can either be a method within an :ref:`Object` instance, or a custom callable used for different purposes (see :ref:`is_custom`). Like all :ref:`Variant` types, it can be stored in variables and passed to other functions. It is most commonly used for signal callbacks. -\ **Example:**\ - .. tabs:: @@ -431,7 +429,9 @@ Returns ``true`` if this **Callable** is a custom callable. Custom callables are :ref:`bool` **is_null**\ (\ ) |const| :ref:`🔗` -Returns ``true`` if this **Callable** has no target to call the method on. +Returns ``true`` if this **Callable** has no target to call the method on. Equivalent to ``callable == Callable()``. + +\ **Note:** This is *not* the same as ``not is_valid()`` and using ``not is_null()`` will *not* guarantee that this callable can be called. Use :ref:`is_valid` instead. .. rst-class:: classref-item-separator diff --git a/classes/class_callbacktweener.rst b/classes/class_callbacktweener.rst index b78d9c67348..2256e8ab3ae 100644 --- a/classes/class_callbacktweener.rst +++ b/classes/class_callbacktweener.rst @@ -54,12 +54,12 @@ Method Descriptions Makes the callback call delayed by given time in seconds. -\ **Example:**\ +\ **Example:** Call :ref:`Node.queue_free` after 2 seconds. :: var tween = get_tree().create_tween() - tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() after 2 seconds + tween.tween_callback(queue_free).set_delay(2) .. |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_cameraattributesphysical.rst b/classes/class_cameraattributesphysical.rst index 1399d5f135c..89be06443f1 100644 --- a/classes/class_cameraattributesphysical.rst +++ b/classes/class_cameraattributesphysical.rst @@ -109,7 +109,7 @@ The maximum luminance (in EV100) used when calculating auto exposure. When calcu - |void| **set_auto_exposure_min_exposure_value**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_auto_exposure_min_exposure_value**\ (\ ) -The minimum luminance luminance (in EV100) used when calculating auto exposure. When calculating scene average luminance, color values will be clamped to at least this value. This limits the auto-exposure from exposing above a certain brightness, resulting in a cut off point where the scene will remain dark. +The minimum luminance (in EV100) used when calculating auto exposure. When calculating scene average luminance, color values will be clamped to at least this value. This limits the auto-exposure from exposing above a certain brightness, resulting in a cut off point where the scene will remain dark. .. rst-class:: classref-item-separator diff --git a/classes/class_camerafeed.rst b/classes/class_camerafeed.rst index 5774048fbc9..60f32bf6f20 100644 --- a/classes/class_camerafeed.rst +++ b/classes/class_camerafeed.rst @@ -36,6 +36,8 @@ Properties +---------------------------------------+-----------------------------------------------------------------+------------------------------------+ | :ref:`Transform2D` | :ref:`feed_transform` | ``Transform2D(1, 0, 0, -1, 0, 1)`` | +---------------------------------------+-----------------------------------------------------------------+------------------------------------+ + | :ref:`Array` | :ref:`formats` | ``[]`` | + +---------------------------------------+-----------------------------------------------------------------+------------------------------------+ .. rst-class:: classref-reftable-group @@ -45,15 +47,54 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+-------------------------------------------------------------------------+ - | :ref:`FeedDataType` | :ref:`get_datatype`\ (\ ) |const| | - +---------------------------------------------------+-------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_id`\ (\ ) |const| | - +---------------------------------------------------+-------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_name`\ (\ ) |const| | - +---------------------------------------------------+-------------------------------------------------------------------------+ - | :ref:`FeedPosition` | :ref:`get_position`\ (\ ) |const| | - +---------------------------------------------------+-------------------------------------------------------------------------+ + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`FeedDataType` | :ref:`get_datatype`\ (\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_id`\ (\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_name`\ (\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`FeedPosition` | :ref:`get_position`\ (\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`set_format`\ (\ index\: :ref:`int`, parameters\: :ref:`Dictionary`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_name`\ (\ name\: :ref:`String`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_position`\ (\ position\: :ref:`FeedPosition`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_rgb_image`\ (\ rgb_image\: :ref:`Image`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_ycbcr_image`\ (\ ycbcr_image\: :ref:`Image`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Signals +------- + +.. _class_CameraFeed_signal_format_changed: + +.. rst-class:: classref-signal + +**format_changed**\ (\ ) :ref:`🔗` + +Emitted when the format has changed. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CameraFeed_signal_frame_changed: + +.. rst-class:: classref-signal + +**frame_changed**\ (\ ) :ref:`🔗` + +Emitted when a new frame is available. .. rst-class:: classref-section-separator @@ -175,6 +216,22 @@ If ``true``, the feed is active. The transform applied to the camera's image. +.. rst-class:: classref-item-separator + +---- + +.. _class_CameraFeed_property_formats: + +.. rst-class:: classref-property + +:ref:`Array` **formats** = ``[]`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- :ref:`Array` **get_formats**\ (\ ) + +Formats supported by the feed. Each entry is a :ref:`Dictionary` describing format parameters. + .. rst-class:: classref-section-separator ---- @@ -228,6 +285,72 @@ Returns the camera's name. Returns the position of camera on the device. +.. rst-class:: classref-item-separator + +---- + +.. _class_CameraFeed_method_set_format: + +.. rst-class:: classref-method + +:ref:`bool` **set_format**\ (\ index\: :ref:`int`, parameters\: :ref:`Dictionary`\ ) :ref:`🔗` + +Sets the feed format parameters for the given index in the :ref:`formats` array. Returns ``true`` on success. By default YUYV encoded stream is transformed to FEED_RGB. YUYV encoded stream output format can be changed with ``parameters``.output value: + +\ ``separate`` will result in FEED_YCBCR_SEP + +\ ``grayscale`` will result in desaturated FEED_RGB + +\ ``copy`` will result in FEED_YCBCR + +.. rst-class:: classref-item-separator + +---- + +.. _class_CameraFeed_method_set_name: + +.. rst-class:: classref-method + +|void| **set_name**\ (\ name\: :ref:`String`\ ) :ref:`🔗` + +Sets the camera's name. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CameraFeed_method_set_position: + +.. rst-class:: classref-method + +|void| **set_position**\ (\ position\: :ref:`FeedPosition`\ ) :ref:`🔗` + +Sets the position of this camera. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CameraFeed_method_set_rgb_image: + +.. rst-class:: classref-method + +|void| **set_rgb_image**\ (\ rgb_image\: :ref:`Image`\ ) :ref:`🔗` + +Sets RGB image for this feed. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CameraFeed_method_set_ycbcr_image: + +.. rst-class:: classref-method + +|void| **set_ycbcr_image**\ (\ ycbcr_image\: :ref:`Image`\ ) :ref:`🔗` + +Sets YCbCr image for this feed. + .. |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_cameraserver.rst b/classes/class_cameraserver.rst index 9d3800bbf74..e662f71daac 100644 --- a/classes/class_cameraserver.rst +++ b/classes/class_cameraserver.rst @@ -23,7 +23,7 @@ The **CameraServer** keeps track of different cameras accessible in Godot. These It is notably used to provide AR modules with a video feed from the camera. -\ **Note:** This class is currently only implemented on macOS and iOS. To get a :ref:`CameraFeed` on iOS, the camera plugin from `godot-ios-plugins `__ is required. On other platforms, no :ref:`CameraFeed`\ s will be available. +\ **Note:** This class is currently only implemented on Linux, macOS, and iOS, on other platforms no :ref:`CameraFeed`\ s will be available. To get a :ref:`CameraFeed` on iOS, the camera plugin from `godot-ios-plugins `__ is required. .. rst-class:: classref-reftable-group diff --git a/classes/class_canvasitem.rst b/classes/class_canvasitem.rst index d5412e78e24..0ef073efd0c 100644 --- a/classes/class_canvasitem.rst +++ b/classes/class_canvasitem.rst @@ -237,7 +237,7 @@ Emitted when the **CanvasItem** must redraw, *after* the related :ref:`NOTIFICAT **hidden**\ (\ ) :ref:`🔗` -Emitted when becoming hidden. +Emitted when the **CanvasItem** is hidden, i.e. it's no longer visible in the tree (see :ref:`is_visible_in_tree`). .. rst-class:: classref-item-separator @@ -249,7 +249,7 @@ Emitted when becoming hidden. **item_rect_changed**\ (\ ) :ref:`🔗` -Emitted when the item's :ref:`Rect2` boundaries (position or size) have changed, or when an action is taking place that may have impacted these boundaries (e.g. changing :ref:`Sprite2D.texture`). +Emitted when the **CanvasItem**'s boundaries (position or size) change, or when an action took place that may have affected these boundaries (e.g. changing :ref:`Sprite2D.texture`). .. rst-class:: classref-item-separator @@ -261,7 +261,7 @@ Emitted when the item's :ref:`Rect2` boundaries (position or size) **visibility_changed**\ (\ ) :ref:`🔗` -Emitted when the visibility (hidden/visible) changes. +Emitted when the **CanvasItem**'s visibility changes, either because its own :ref:`visible` property changed or because its visibility in the tree changed (see :ref:`is_visible_in_tree`). .. rst-class:: classref-section-separator @@ -716,7 +716,7 @@ The rendering layer in which this **CanvasItem** is rendered by :ref:`Viewport`\ ) - :ref:`bool` **is_visible**\ (\ ) -If ``true``, this **CanvasItem** is drawn. The node is only visible if all of its ancestors are visible as well (in other words, :ref:`is_visible_in_tree` must return ``true``). +If ``true``, this **CanvasItem** may be drawn. Whether this **CanvasItem** is actually drawn depends on the visibility of all of its **CanvasItem** ancestors. In other words: this **CanvasItem** will be drawn when :ref:`is_visible_in_tree` returns ``true`` and all **CanvasItem** ancestors share at least one :ref:`visibility_layer` with this **CanvasItem**. \ **Note:** For controls that inherit :ref:`Popup`, the correct way to make them visible is to call one of the multiple ``popup*()`` functions instead. @@ -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 ---- @@ -1472,6 +1476,8 @@ Returns ``true`` if the node is present in the :ref:`SceneTree` Visibility is checked only in parent nodes that inherit from **CanvasItem**, :ref:`CanvasLayer`, and :ref:`Window`. If the parent is of any other type (such as :ref:`Node`, :ref:`AnimationPlayer`, or :ref:`Node3D`), it is assumed to be visible. +\ **Note:** This method does not take :ref:`visibility_layer` into account, so even if this method returns ``true`` the node might end up not being rendered. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_classdb.rst b/classes/class_classdb.rst index 9c5b481cd22..2aaa48001bf 100644 --- a/classes/class_classdb.rst +++ b/classes/class_classdb.rst @@ -32,8 +32,12 @@ Methods +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`can_instantiate`\ (\ class\: :ref:`StringName`\ ) |const| | +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`class_call_static_method`\ (\ class\: :ref:`StringName`, method\: :ref:`StringName`, ...\ ) |vararg| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :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| | @@ -52,8 +56,12 @@ Methods +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`class_get_property_default_value`\ (\ class\: :ref:`StringName`, property\: :ref:`StringName`\ ) |const| | +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`class_get_property_getter`\ (\ class\: :ref:`StringName`, property\: :ref:`StringName`\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`class_get_property_list`\ (\ class\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| | +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`class_get_property_setter`\ (\ class\: :ref:`StringName`, property\: :ref:`StringName`\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Dictionary` | :ref:`class_get_signal`\ (\ class\: :ref:`StringName`, signal\: :ref:`StringName`\ ) |const| | +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`class_get_signal_list`\ (\ class\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| | @@ -89,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 ------------------- @@ -104,6 +167,18 @@ Returns ``true`` if objects can be instantiated from the specified ``class``, ot ---- +.. _class_ClassDB_method_class_call_static_method: + +.. rst-class:: classref-method + +:ref:`Variant` **class_call_static_method**\ (\ class\: :ref:`StringName`, method\: :ref:`StringName`, ...\ ) |vararg| :ref:`🔗` + +Calls a static method on a class. + +.. rst-class:: classref-item-separator + +---- + .. _class_ClassDB_method_class_exists: .. rst-class:: classref-method @@ -116,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 @@ -226,6 +313,18 @@ Returns the default value of ``property`` of ``class`` or its ancestor classes. ---- +.. _class_ClassDB_method_class_get_property_getter: + +.. rst-class:: classref-method + +:ref:`StringName` **class_get_property_getter**\ (\ class\: :ref:`StringName`, property\: :ref:`StringName`\ ) :ref:`🔗` + +Returns the getter method name of ``property`` of ``class``. + +.. rst-class:: classref-item-separator + +---- + .. _class_ClassDB_method_class_get_property_list: .. rst-class:: classref-method @@ -238,6 +337,18 @@ Returns an array with all the properties of ``class`` or its ancestry if ``no_in ---- +.. _class_ClassDB_method_class_get_property_setter: + +.. rst-class:: classref-method + +:ref:`StringName` **class_get_property_setter**\ (\ class\: :ref:`StringName`, property\: :ref:`StringName`\ ) :ref:`🔗` + +Returns the setter method name of ``property`` of ``class``. + +.. rst-class:: classref-item-separator + +---- + .. _class_ClassDB_method_class_get_signal: .. rst-class:: classref-method diff --git a/classes/class_codeedit.rst b/classes/class_codeedit.rst index 5cfb6a2dc7a..53aea592f48 100644 --- a/classes/class_codeedit.rst +++ b/classes/class_codeedit.rst @@ -280,6 +280,8 @@ Theme Properties +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Texture2D` | :ref:`can_fold_code_region` | | +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Texture2D` | :ref:`completion_color_bg` | | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Texture2D` | :ref:`executing_line` | | +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Texture2D` | :ref:`folded` | | @@ -1978,6 +1980,18 @@ Sets a custom :ref:`Texture2D` to draw in the line folding gutt ---- +.. _class_CodeEdit_theme_icon_completion_color_bg: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **completion_color_bg** :ref:`🔗` + +Background panel for the color preview box in autocompletion (visible when the color is translucent). + +.. rst-class:: classref-item-separator + +---- + .. _class_CodeEdit_theme_icon_executing_line: .. rst-class:: classref-themeproperty diff --git a/classes/class_color.rst b/classes/class_color.rst index f91df07a16d..08a71e5faf2 100644 --- a/classes/class_color.rst +++ b/classes/class_color.rst @@ -1771,6 +1771,8 @@ Decodes a **Color** from an RGBE9995 format integer. See :ref:`Image.FORMAT_RGBE Creates a **Color** from the given string, which can be either an HTML color code or a named color (case-insensitive). Returns ``default`` if the color cannot be inferred from the string. +If you want to create a color from String in a constant expression, use the equivalent constructor instead (i.e. ``Color("color string")``). + .. rst-class:: classref-item-separator ---- @@ -1816,6 +1818,8 @@ In GDScript and C#, the :ref:`int` is best visualized with hexadecima +If you want to use hex notation in a constant expression, use the equivalent constructor instead (i.e. ``Color(0xRRGGBBAA)``). + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_compositor.rst b/classes/class_compositor.rst index ec0e40c519f..31533f286bf 100644 --- a/classes/class_compositor.rst +++ b/classes/class_compositor.rst @@ -23,6 +23,13 @@ Description The compositor resource stores attributes used to customize how a :ref:`Viewport` is rendered. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`The Compositor <../tutorials/rendering/compositor>` + .. rst-class:: classref-reftable-group Properties diff --git a/classes/class_compositoreffect.rst b/classes/class_compositoreffect.rst index fc44b84775d..e1a8d1dc7d1 100644 --- a/classes/class_compositoreffect.rst +++ b/classes/class_compositoreffect.rst @@ -21,7 +21,14 @@ This resource allows for creating a custom rendering effect. Description ----------- -This resource defines a custom rendering effect that can be applied to :ref:`Viewport`\ s through the viewports' :ref:`Environment`. You can implement a callback that is called during rendering at a given stage of the rendering pipeline and allows you to insert additional passes. Note that this callback happens on the rendering thread. +This resource defines a custom rendering effect that can be applied to :ref:`Viewport`\ s through the viewports' :ref:`Environment`. You can implement a callback that is called during rendering at a given stage of the rendering pipeline and allows you to insert additional passes. Note that this callback happens on the rendering thread. CompositorEffect is an abstract base class and must be extended to implement specific rendering logic. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`The Compositor <../tutorials/rendering/compositor>` .. rst-class:: classref-reftable-group @@ -112,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: @@ -257,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_control.rst b/classes/class_control.rst index c6177e1a018..2025bb1c014 100644 --- a/classes/class_control.rst +++ b/classes/class_control.rst @@ -143,6 +143,8 @@ Properties +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`StringName` | :ref:`theme_type_variation` | ``&""`` | +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`AutoTranslateMode` | :ref:`tooltip_auto_translate_mode` | ``0`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`String` | :ref:`tooltip_text` | ``""`` | +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ @@ -894,7 +896,7 @@ enum **MouseFilter**: :ref:`🔗` :ref:`MouseFilter` **MOUSE_FILTER_STOP** = ``0`` -The control will receive mouse movement input events and mouse button input events if clicked on through :ref:`_gui_input`. And the control will receive the :ref:`mouse_entered` and :ref:`mouse_exited` signals. These events are automatically marked as handled, and they will not propagate further to other controls. This also results in blocking signals in other controls. +The control will receive mouse movement input events and mouse button input events if clicked on through :ref:`_gui_input`. The control will also receive the :ref:`mouse_entered` and :ref:`mouse_exited` signals. These events are automatically marked as handled, and they will not propagate further to other controls. This also results in blocking signals in other controls. .. _class_Control_constant_MOUSE_FILTER_PASS: @@ -902,7 +904,9 @@ The control will receive mouse movement input events and mouse button input even :ref:`MouseFilter` **MOUSE_FILTER_PASS** = ``1`` -The control will receive mouse movement input events and mouse button input events if clicked on through :ref:`_gui_input`. And the control will receive the :ref:`mouse_entered` and :ref:`mouse_exited` signals. If this control does not handle the event, the parent control (if any) will be considered, and so on until there is no more parent control to potentially handle it. This also allows signals to fire in other controls. If no control handled it, the event will be passed to :ref:`Node._shortcut_input` for further processing. +The control will receive mouse movement input events and mouse button input events if clicked on through :ref:`_gui_input`. The control will also receive the :ref:`mouse_entered` and :ref:`mouse_exited` signals. + +If this control does not handle the event, the event will propagate up to its parent control if it has one. The event is bubbled up the node hierarchy until it reaches a non-:ref:`CanvasItem`, a control with :ref:`MOUSE_FILTER_STOP`, or a :ref:`CanvasItem` with :ref:`CanvasItem.top_level` enabled. This will allow signals to fire in all controls it reaches. If no control handled it, the event will be passed to :ref:`Node._shortcut_input` for further processing. .. _class_Control_constant_MOUSE_FILTER_IGNORE: @@ -910,7 +914,7 @@ The control will receive mouse movement input events and mouse button input even :ref:`MouseFilter` **MOUSE_FILTER_IGNORE** = ``2`` -The control will not receive mouse movement input events and mouse button input events if clicked on through :ref:`_gui_input`. The control will also not receive the :ref:`mouse_entered` nor :ref:`mouse_exited` signals. This will not block other controls from receiving these events or firing the signals. Ignored events will not be handled automatically. +The control will not receive any mouse movement input events nor mouse button input events through :ref:`_gui_input`. The control will also not receive the :ref:`mouse_entered` nor :ref:`mouse_exited` signals. This will not block other controls from receiving these events or firing the signals. Ignored events will not be handled automatically. If a child has :ref:`MOUSE_FILTER_PASS` and an event was passed to this control, the event will further propagate up to the control's parent. \ **Note:** If the control has received :ref:`mouse_entered` but not :ref:`mouse_exited`, changing the :ref:`mouse_filter` to :ref:`MOUSE_FILTER_IGNORE` will cause :ref:`mouse_exited` to be emitted. @@ -1883,6 +1887,25 @@ When set, this property gives the highest priority to the type of the specified ---- +.. _class_Control_property_tooltip_auto_translate_mode: + +.. rst-class:: classref-property + +:ref:`AutoTranslateMode` **tooltip_auto_translate_mode** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_tooltip_auto_translate_mode**\ (\ value\: :ref:`AutoTranslateMode`\ ) +- :ref:`AutoTranslateMode` **get_tooltip_auto_translate_mode**\ (\ ) + +Defines if tooltip text should automatically change to its translated version depending on the current locale. Uses the same auto translate mode as this control when set to :ref:`Node.AUTO_TRANSLATE_MODE_INHERIT`. + +\ **Note:** When the tooltip is customized using :ref:`_make_custom_tooltip`, this auto translate mode is applied automatically to the returned control. + +.. rst-class:: classref-item-separator + +---- + .. _class_Control_property_tooltip_text: .. rst-class:: classref-property diff --git a/classes/class_cpuparticles3d.rst b/classes/class_cpuparticles3d.rst index ba08e373997..15a207367c0 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` | | @@ -196,6 +198,8 @@ Methods .. table:: :widths: auto + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB` | :ref:`capture_aabb`\ (\ ) |const| | +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`convert_from_particles`\ (\ particles\: :ref:`Node`\ ) | +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -969,6 +973,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 @@ -1792,6 +1815,18 @@ Grow the box if particles suddenly appear/disappear when the node enters/exits t Method Descriptions ------------------- +.. _class_CPUParticles3D_method_capture_aabb: + +.. rst-class:: classref-method + +:ref:`AABB` **capture_aabb**\ (\ ) |const| :ref:`🔗` + +Returns the axis-aligned bounding box that contains all the particles that are active in the current frame. + +.. rst-class:: classref-item-separator + +---- + .. _class_CPUParticles3D_method_convert_from_particles: .. rst-class:: classref-method diff --git a/classes/class_csgshape3d.rst b/classes/class_csgshape3d.rst index 315f161d6af..60e72560517 100644 --- a/classes/class_csgshape3d.rst +++ b/classes/class_csgshape3d.rst @@ -23,7 +23,15 @@ Description This is the CSG base class that provides CSG operation support to the various CSG nodes in Godot. -\ **Note:** CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a :ref:`MeshInstance3D` with a :ref:`PrimitiveMesh`. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay. +\ **Performance:** CSG nodes are only intended for prototyping as they have a significant CPU performance cost. + +Consider baking final CSG operation results into static geometry that replaces the CSG nodes. + +Individual CSG root node results can be baked to nodes with static resources with the editor menu that appears when a CSG root node is selected. + +Individual CSG root nodes can also be baked to static resources with scripts by calling :ref:`bake_static_mesh` for the visual mesh or :ref:`bake_collision_shape` for the physics collision. + +Entire scenes of CSG nodes can be baked to static geometry and exported with the editor gltf scene exporter. .. rst-class:: classref-introduction-group @@ -64,19 +72,23 @@ Methods .. table:: :widths: auto - +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :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:`Array` | :ref:`get_meshes`\ (\ ) |const| | - +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_root_shape`\ (\ ) |const| | - +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |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`\ ) | - +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ConcavePolygonShape3D` | :ref:`bake_collision_shape`\ (\ ) | + +-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ArrayMesh` | :ref:`bake_static_mesh`\ (\ ) | + +-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :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:`Array` | :ref:`get_meshes`\ (\ ) |const| | + +-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_root_shape`\ (\ ) |const| | + +-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |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`\ ) | + +-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -254,6 +266,32 @@ Adds a collision shape to the physics engine for our CSG shape. This will always Method Descriptions ------------------- +.. _class_CSGShape3D_method_bake_collision_shape: + +.. rst-class:: classref-method + +:ref:`ConcavePolygonShape3D` **bake_collision_shape**\ (\ ) :ref:`🔗` + +Returns a baked physics :ref:`ConcavePolygonShape3D` of this node's CSG operation result. Returns an empty shape if the node is not a CSG root node or has no valid geometry. + +\ **Performance:** If the CSG operation results in a very detailed geometry with many faces physics performance will be very slow. Concave shapes should in general only be used for static level geometry and not with dynamic objects that are moving. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CSGShape3D_method_bake_static_mesh: + +.. rst-class:: classref-method + +:ref:`ArrayMesh` **bake_static_mesh**\ (\ ) :ref:`🔗` + +Returns a baked static :ref:`ArrayMesh` of this node's CSG operation result. Materials from involved CSG nodes are added as extra mesh surfaces. Returns an empty mesh if the node is not a CSG root node or has no valid geometry. + +.. rst-class:: classref-item-separator + +---- + .. _class_CSGShape3D_method_get_collision_layer_value: .. rst-class:: classref-method diff --git a/classes/class_curve2d.rst b/classes/class_curve2d.rst index fda17462067..599fb5a8443 100644 --- a/classes/class_curve2d.rst +++ b/classes/class_curve2d.rst @@ -265,7 +265,7 @@ Deletes the point ``idx`` from the curve. Sends an error to the console if ``idx :ref:`Vector2` **sample**\ (\ idx\: :ref:`int`, t\: :ref:`float`\ ) |const| :ref:`🔗` -Returns the position between the vertex ``idx`` and the vertex ``idx + 1``, where ``t`` controls if the point is the first vertex (``t = 0.0``), the last vertex (``t = 1.0``), or in between. Values of ``t`` outside the range (``0.0 >= t <=1``) give strange, but predictable results. +Returns the position between the vertex ``idx`` and the vertex ``idx + 1``, where ``t`` controls if the point is the first vertex (``t = 0.0``), the last vertex (``t = 1.0``), or in between. Values of ``t`` outside the range (``0.0 <= t <= 1.0``) give strange, but predictable results. If ``idx`` is out of bounds it is truncated to the first or last vertex, and ``t`` is ignored. If the curve has no points, the function sends an error to the console, and returns ``(0, 0)``. diff --git a/classes/class_dictionary.rst b/classes/class_dictionary.rst index 12dbf7269bf..e79d7ae19d2 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`\ (\ ) | @@ -259,8 +287,12 @@ Methods +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`recursive_equal`\ (\ dictionary\: :ref:`Dictionary`, recursion_count\: :ref:`int`\ ) |const| | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`set`\ (\ key\: :ref:`Variant`, value\: :ref:`Variant`\ ) | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`size`\ (\ ) |const| | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`sort`\ (\ ) | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`values`\ (\ ) |const| | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -303,6 +335,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 +358,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 +446,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 +644,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 @@ -615,8 +813,6 @@ This method is useful for quickly making dictionaries with default values: # Prints { "fruit": "apple", "vegetable": "potato", "dressing": "vinegar" } print(extra.merged(base, true)) -See also :ref:`merge`. - .. rst-class:: classref-item-separator ---- @@ -633,6 +829,18 @@ Returns ``true`` if the two dictionaries contain the same keys and values, inner ---- +.. _class_Dictionary_method_set: + +.. rst-class:: classref-method + +:ref:`bool` **set**\ (\ key\: :ref:`Variant`, value\: :ref:`Variant`\ ) :ref:`🔗` + +Sets the value of the element at the given ``key`` to the given ``value``. This is the same as using the ``[]`` operator (``array[index] = value``). + +.. rst-class:: classref-item-separator + +---- + .. _class_Dictionary_method_size: .. rst-class:: classref-method @@ -645,6 +853,18 @@ Returns the number of entries in the dictionary. Empty dictionaries (``{ }``) al ---- +.. _class_Dictionary_method_sort: + +.. rst-class:: classref-method + +|void| **sort**\ (\ ) :ref:`🔗` + +Sorts the dictionary in-place by key. This can be used to ensure dictionaries with the same contents produce equivalent results when getting the :ref:`keys`, getting the :ref:`values`, and converting to a string. This is also useful when wanting a JSON representation consistent with what is in memory, and useful for storing on a database that requires dictionaries to be sorted. + +.. rst-class:: classref-item-separator + +---- + .. _class_Dictionary_method_values: .. rst-class:: classref-method diff --git a/classes/class_displayserver.rst b/classes/class_displayserver.rst index 86ce5173f49..a07fb68fb15 100644 --- a/classes/class_displayserver.rst +++ b/classes/class_displayserver.rst @@ -194,6 +194,8 @@ Methods +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_feature`\ (\ feature\: :ref:`Feature`\ ) |const| | +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_hardware_keyboard`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`help_set_search_callbacks`\ (\ search_callback\: :ref:`Callable`, action_callback\: :ref:`Callable`\ ) | +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2i` | :ref:`ime_get_selection`\ (\ ) |const| | @@ -2907,6 +2909,20 @@ Returns ``true`` if the specified ``feature`` is supported by the current **Disp ---- +.. _class_DisplayServer_method_has_hardware_keyboard: + +.. rst-class:: classref-method + +:ref:`bool` **has_hardware_keyboard**\ (\ ) |const| :ref:`🔗` + +Returns ``true`` if hardware keyboard is connected. + +\ **Note:** This method is implemented on Android and iOS, on other platforms this method always returns ``true``. + +.. rst-class:: classref-item-separator + +---- + .. _class_DisplayServer_method_help_set_search_callbacks: .. rst-class:: classref-method @@ -4397,7 +4413,7 @@ Sets the title of the given window to ``title``. |void| **window_set_transient**\ (\ window_id\: :ref:`int`, parent_window_id\: :ref:`int`\ ) :ref:`🔗` -Sets window transient parent. Transient window is will be destroyed with its transient parent and will return focus to their parent when closed. The transient window is displayed on top of a non-exclusive full-screen parent window. Transient windows can't enter full-screen mode. +Sets window transient parent. Transient window will be destroyed with its transient parent and will return focus to their parent when closed. The transient window is displayed on top of a non-exclusive full-screen parent window. Transient windows can't enter full-screen mode. \ **Note:** It's recommended to change this value using :ref:`Window.transient` instead. diff --git a/classes/class_editorcontextmenuplugin.rst b/classes/class_editorcontextmenuplugin.rst new file mode 100644 index 00000000000..d99156845a4 --- /dev/null +++ b/classes/class_editorcontextmenuplugin.rst @@ -0,0 +1,195 @@ +: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_context_submenu_item`\ (\ name\: :ref:`String`, menu\: :ref:`PopupMenu`, 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_context_submenu_item: + +.. rst-class:: classref-method + +|void| **add_context_submenu_item**\ (\ name\: :ref:`String`, menu\: :ref:`PopupMenu`, icon\: :ref:`Texture2D` = null\ ) :ref:`🔗` + +Add a submenu to the context menu of the plugin's specified slot. The submenu is not automatically handled, you need to connect to its signals yourself. Also the submenu is freed on every popup, so provide a new :ref:`PopupMenu` every time. + +:: + + func _popup_menu(paths): + var popup_menu = PopupMenu.new() + popup_menu.add_item("Blue") + popup_menu.add_item("White") + popup_menu.id_pressed.connect(_on_color_submenu_option) + + add_context_menu_item("Set Node Color", popup_menu) + +.. 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_editorexportplatform.rst b/classes/class_editorexportplatform.rst index a72b7d160f8..eb38f7ec4ae 100644 --- a/classes/class_editorexportplatform.rst +++ b/classes/class_editorexportplatform.rst @@ -12,7 +12,7 @@ EditorExportPlatform **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`EditorExportPlatformAndroid`, :ref:`EditorExportPlatformIOS`, :ref:`EditorExportPlatformMacOS`, :ref:`EditorExportPlatformPC`, :ref:`EditorExportPlatformWeb` +**Inherited By:** :ref:`EditorExportPlatformAndroid`, :ref:`EditorExportPlatformExtension`, :ref:`EditorExportPlatformIOS`, :ref:`EditorExportPlatformMacOS`, :ref:`EditorExportPlatformPC`, :ref:`EditorExportPlatformWeb` Identifies a supported export platform, and internally provides the functionality of exporting to that platform. @@ -40,9 +40,156 @@ Methods .. table:: :widths: auto - +-----------------------------+---------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_os_name`\ (\ ) |const| | - +-----------------------------+---------------------------------------------------------------------------------+ + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_message`\ (\ type\: :ref:`ExportMessageType`, category\: :ref:`String`, message\: :ref:`String`\ ) | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_messages`\ (\ ) | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorExportPreset` | :ref:`create_preset`\ (\ ) | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`export_pack`\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, flags\: |bitfield|\[:ref:`DebugFlags`\] = 0\ ) | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`export_pack_patch`\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, patches\: :ref:`PackedStringArray` = PackedStringArray(), flags\: |bitfield|\[:ref:`DebugFlags`\] = 0\ ) | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`export_project`\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, flags\: |bitfield|\[:ref:`DebugFlags`\] = 0\ ) | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`export_project_files`\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, save_cb\: :ref:`Callable`, shared_cb\: :ref:`Callable` = Callable()\ ) | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`export_zip`\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, flags\: |bitfield|\[:ref:`DebugFlags`\] = 0\ ) | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`export_zip_patch`\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, patches\: :ref:`PackedStringArray` = PackedStringArray(), flags\: |bitfield|\[:ref:`DebugFlags`\] = 0\ ) | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`find_export_template`\ (\ template_file_name\: :ref:`String`\ ) |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`gen_export_flags`\ (\ flags\: |bitfield|\[:ref:`DebugFlags`\]\ ) | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`get_current_presets`\ (\ ) |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_forced_export_files`\ (\ ) |static| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_message_category`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_message_count`\ (\ ) |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_message_text`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ExportMessageType` | :ref:`get_message_type`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_os_name`\ (\ ) |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ExportMessageType` | :ref:`get_worst_message_type`\ (\ ) |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`save_pack`\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, embed\: :ref:`bool` = false\ ) | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`save_pack_patch`\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`\ ) | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`save_zip`\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`\ ) | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`save_zip_patch`\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`\ ) | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`ssh_push_to_remote`\ (\ host\: :ref:`String`, port\: :ref:`String`, scp_args\: :ref:`PackedStringArray`, src_file\: :ref:`String`, dst_file\: :ref:`String`\ ) |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`ssh_run_on_remote`\ (\ host\: :ref:`String`, port\: :ref:`String`, ssh_arg\: :ref:`PackedStringArray`, cmd_args\: :ref:`String`, output\: :ref:`Array` = [], port_fwd\: :ref:`int` = -1\ ) |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`ssh_run_on_remote_no_wait`\ (\ host\: :ref:`String`, port\: :ref:`String`, ssh_args\: :ref:`PackedStringArray`, cmd_args\: :ref:`String`, port_fwd\: :ref:`int` = -1\ ) |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_EditorExportPlatform_ExportMessageType: + +.. rst-class:: classref-enumeration + +enum **ExportMessageType**: :ref:`🔗` + +.. _class_EditorExportPlatform_constant_EXPORT_MESSAGE_NONE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ExportMessageType` **EXPORT_MESSAGE_NONE** = ``0`` + +Invalid message type used as the default value when no type is specified. + +.. _class_EditorExportPlatform_constant_EXPORT_MESSAGE_INFO: + +.. rst-class:: classref-enumeration-constant + +:ref:`ExportMessageType` **EXPORT_MESSAGE_INFO** = ``1`` + +Message type for informational messages that have no effect on the export. + +.. _class_EditorExportPlatform_constant_EXPORT_MESSAGE_WARNING: + +.. rst-class:: classref-enumeration-constant + +:ref:`ExportMessageType` **EXPORT_MESSAGE_WARNING** = ``2`` + +Message type for warning messages that should be addressed but still allow to complete the export. + +.. _class_EditorExportPlatform_constant_EXPORT_MESSAGE_ERROR: + +.. rst-class:: classref-enumeration-constant + +:ref:`ExportMessageType` **EXPORT_MESSAGE_ERROR** = ``3`` + +Message type for error messages that must be addressed and fail the export. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_EditorExportPlatform_DebugFlags: + +.. rst-class:: classref-enumeration + +flags **DebugFlags**: :ref:`🔗` + +.. _class_EditorExportPlatform_constant_DEBUG_FLAG_DUMB_CLIENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DebugFlags` **DEBUG_FLAG_DUMB_CLIENT** = ``1`` + +Flag is set if remotely debugged project is expected to use remote file system. If set, :ref:`gen_export_flags` will add ``--remove-fs`` and ``--remote-fs-password`` (if password is set in the editor settings) command line arguments to the list. + +.. _class_EditorExportPlatform_constant_DEBUG_FLAG_REMOTE_DEBUG: + +.. rst-class:: classref-enumeration-constant + +:ref:`DebugFlags` **DEBUG_FLAG_REMOTE_DEBUG** = ``2`` + +Flag is set if remote debug is enabled. If set, :ref:`gen_export_flags` will add ``--remote-debug`` and ``--breakpoints`` (if breakpoints are selected in the script editor or added by the plugin) command line arguments to the list. + +.. _class_EditorExportPlatform_constant_DEBUG_FLAG_REMOTE_DEBUG_LOCALHOST: + +.. rst-class:: classref-enumeration-constant + +:ref:`DebugFlags` **DEBUG_FLAG_REMOTE_DEBUG_LOCALHOST** = ``4`` + +Flag is set if remotely debugged project is running on the localhost. If set, :ref:`gen_export_flags` will use ``localhost`` instead of :ref:`EditorSettings.network/debug/remote_host` as remote debugger host. + +.. _class_EditorExportPlatform_constant_DEBUG_FLAG_VIEW_COLLISIONS: + +.. rst-class:: classref-enumeration-constant + +:ref:`DebugFlags` **DEBUG_FLAG_VIEW_COLLISIONS** = ``8`` + +Flag is set if "Visible Collision Shapes" remote debug option is enabled. If set, :ref:`gen_export_flags` will add ``--debug-collisions`` command line arguments to the list. + +.. _class_EditorExportPlatform_constant_DEBUG_FLAG_VIEW_NAVIGATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`DebugFlags` **DEBUG_FLAG_VIEW_NAVIGATION** = ``16`` + +Flag is set if Visible Navigation" remote debug option is enabled. If set, :ref:`gen_export_flags` will add ``--debug-navigation`` command line arguments to the list. .. rst-class:: classref-section-separator @@ -53,6 +200,220 @@ Methods Method Descriptions ------------------- +.. _class_EditorExportPlatform_method_add_message: + +.. rst-class:: classref-method + +|void| **add_message**\ (\ type\: :ref:`ExportMessageType`, category\: :ref:`String`, message\: :ref:`String`\ ) :ref:`🔗` + +Adds a message to the export log that will be displayed when exporting ends. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatform_method_clear_messages: + +.. rst-class:: classref-method + +|void| **clear_messages**\ (\ ) :ref:`🔗` + +Clears the export log. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatform_method_create_preset: + +.. rst-class:: classref-method + +:ref:`EditorExportPreset` **create_preset**\ (\ ) :ref:`🔗` + +Create a new preset for this platform. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatform_method_export_pack: + +.. rst-class:: classref-method + +:ref:`Error` **export_pack**\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, flags\: |bitfield|\[:ref:`DebugFlags`\] = 0\ ) :ref:`🔗` + +Creates a PCK archive at ``path`` for the specified ``preset``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatform_method_export_pack_patch: + +.. rst-class:: classref-method + +:ref:`Error` **export_pack_patch**\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, patches\: :ref:`PackedStringArray` = PackedStringArray(), flags\: |bitfield|\[:ref:`DebugFlags`\] = 0\ ) :ref:`🔗` + +Creates a patch PCK archive at ``path`` for the specified ``preset``, containing only the files that have changed since the last patch. + +\ **Note:** ``patches`` is an optional override of the set of patches defined in the export preset. When empty the patches defined in the export preset will be used instead. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatform_method_export_project: + +.. rst-class:: classref-method + +:ref:`Error` **export_project**\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, flags\: |bitfield|\[:ref:`DebugFlags`\] = 0\ ) :ref:`🔗` + +Creates a full project at ``path`` for the specified ``preset``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatform_method_export_project_files: + +.. rst-class:: classref-method + +:ref:`Error` **export_project_files**\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, save_cb\: :ref:`Callable`, shared_cb\: :ref:`Callable` = Callable()\ ) :ref:`🔗` + +Exports project files for the specified preset. This method can be used to implement custom export format, other than PCK and ZIP. One of the callbacks is called for each exported file. + +\ ``save_cb`` is called for all exported files and have the following arguments: ``file_path: String``, ``file_data: PackedByteArray``, ``file_index: int``, ``file_count: int``, ``encryption_include_filters: PackedStringArray``, ``encryption_exclude_filters: PackedStringArray``, ``encryption_key: PackedByteArray``. + +\ ``shared_cb`` is called for exported native shared/static libraries and have the following arguments: ``file_path: String``, ``tags: PackedStringArray``, ``target_folder: String``. + +\ **Note:** ``file_index`` and ``file_count`` are intended for progress tracking only and aren't necesserely unique and precise. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatform_method_export_zip: + +.. rst-class:: classref-method + +:ref:`Error` **export_zip**\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, flags\: |bitfield|\[:ref:`DebugFlags`\] = 0\ ) :ref:`🔗` + +Create a ZIP archive at ``path`` for the specified ``preset``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatform_method_export_zip_patch: + +.. rst-class:: classref-method + +:ref:`Error` **export_zip_patch**\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, patches\: :ref:`PackedStringArray` = PackedStringArray(), flags\: |bitfield|\[:ref:`DebugFlags`\] = 0\ ) :ref:`🔗` + +Create a patch ZIP archive at ``path`` for the specified ``preset``, containing only the files that have changed since the last patch. + +\ **Note:** ``patches`` is an optional override of the set of patches defined in the export preset. When empty the patches defined in the export preset will be used instead. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatform_method_find_export_template: + +.. rst-class:: classref-method + +:ref:`Dictionary` **find_export_template**\ (\ template_file_name\: :ref:`String`\ ) |const| :ref:`🔗` + +Locates export template for the platform, and returns :ref:`Dictionary` with the following keys: ``path: String`` and ``error: String``. This method is provided for convenience and custom export platforms aren't required to use it or keep export templates stored in the same way official templates are. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatform_method_gen_export_flags: + +.. rst-class:: classref-method + +:ref:`PackedStringArray` **gen_export_flags**\ (\ flags\: |bitfield|\[:ref:`DebugFlags`\]\ ) :ref:`🔗` + +Generates array of command line arguments for the default export templates for the debug flags and editor settings. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatform_method_get_current_presets: + +.. rst-class:: classref-method + +:ref:`Array` **get_current_presets**\ (\ ) |const| :ref:`🔗` + +Returns array of :ref:`EditorExportPreset`\ s for this platform. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatform_method_get_forced_export_files: + +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_forced_export_files**\ (\ ) |static| :ref:`🔗` + +Returns array of core file names that always should be exported regardless of preset config. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatform_method_get_message_category: + +.. rst-class:: classref-method + +:ref:`String` **get_message_category**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns message category, for the message with ``index``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatform_method_get_message_count: + +.. rst-class:: classref-method + +:ref:`int` **get_message_count**\ (\ ) |const| :ref:`🔗` + +Returns number of messages in the export log. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatform_method_get_message_text: + +.. rst-class:: classref-method + +:ref:`String` **get_message_text**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns message text, for the message with ``index``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatform_method_get_message_type: + +.. rst-class:: classref-method + +:ref:`ExportMessageType` **get_message_type**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns message type, for the message with ``index``. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlatform_method_get_os_name: .. rst-class:: classref-method @@ -61,6 +422,104 @@ Method Descriptions Returns the name of the export operating system handled by this **EditorExportPlatform** class, as a friendly string. Possible return values are ``Windows``, ``Linux``, ``macOS``, ``Android``, ``iOS``, and ``Web``. +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatform_method_get_worst_message_type: + +.. rst-class:: classref-method + +:ref:`ExportMessageType` **get_worst_message_type**\ (\ ) |const| :ref:`🔗` + +Returns most severe message type currently present in the export log. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatform_method_save_pack: + +.. rst-class:: classref-method + +:ref:`Dictionary` **save_pack**\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, embed\: :ref:`bool` = false\ ) :ref:`🔗` + +Saves PCK archive and returns :ref:`Dictionary` with the following keys: ``result: Error``, ``so_files: Array`` (array of the shared/static objects which contains dictionaries with the following keys: ``path: String``, ``tags: PackedStringArray``, and ``target_folder: String``). + +If ``embed`` is ``true``, PCK content is appended to the end of ``path`` file and return :ref:`Dictionary` additionally include following keys: ``embedded_start: int`` (embedded PCK offset) and ``embedded_size: int`` (embedded PCK size). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatform_method_save_pack_patch: + +.. rst-class:: classref-method + +:ref:`Dictionary` **save_pack_patch**\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`\ ) :ref:`🔗` + +Saves patch PCK archive and returns :ref:`Dictionary` with the following keys: ``result: Error``, ``so_files: Array`` (array of the shared/static objects which contains dictionaries with the following keys: ``path: String``, ``tags: PackedStringArray``, and ``target_folder: String``). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatform_method_save_zip: + +.. rst-class:: classref-method + +:ref:`Dictionary` **save_zip**\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`\ ) :ref:`🔗` + +Saves ZIP archive and returns :ref:`Dictionary` with the following keys: ``result: Error``, ``so_files: Array`` (array of the shared/static objects which contains dictionaries with the following keys: ``path: String``, ``tags: PackedStringArray``, and ``target_folder: String``). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatform_method_save_zip_patch: + +.. rst-class:: classref-method + +:ref:`Dictionary` **save_zip_patch**\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`\ ) :ref:`🔗` + +Saves patch ZIP archive and returns :ref:`Dictionary` with the following keys: ``result: Error``, ``so_files: Array`` (array of the shared/static objects which contains dictionaries with the following keys: ``path: String``, ``tags: PackedStringArray``, and ``target_folder: String``). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatform_method_ssh_push_to_remote: + +.. rst-class:: classref-method + +:ref:`Error` **ssh_push_to_remote**\ (\ host\: :ref:`String`, port\: :ref:`String`, scp_args\: :ref:`PackedStringArray`, src_file\: :ref:`String`, dst_file\: :ref:`String`\ ) |const| :ref:`🔗` + +Uploads specified file over SCP protocol to the remote host. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatform_method_ssh_run_on_remote: + +.. rst-class:: classref-method + +:ref:`Error` **ssh_run_on_remote**\ (\ host\: :ref:`String`, port\: :ref:`String`, ssh_arg\: :ref:`PackedStringArray`, cmd_args\: :ref:`String`, output\: :ref:`Array` = [], port_fwd\: :ref:`int` = -1\ ) |const| :ref:`🔗` + +Executes specified command on the remote host via SSH protocol and returns command output in the ``output``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatform_method_ssh_run_on_remote_no_wait: + +.. rst-class:: classref-method + +:ref:`int` **ssh_run_on_remote_no_wait**\ (\ host\: :ref:`String`, port\: :ref:`String`, ssh_args\: :ref:`PackedStringArray`, cmd_args\: :ref:`String`, port_fwd\: :ref:`int` = -1\ ) |const| :ref:`🔗` + +Executes specified command on the remote host via SSH protocol and returns process ID (on the remote host) without waiting for command to finish. + .. |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_editorexportplatformandroid.rst b/classes/class_editorexportplatformandroid.rst index 488ba86bfac..1f8c924f351 100644 --- a/classes/class_editorexportplatformandroid.rst +++ b/classes/class_editorexportplatformandroid.rst @@ -86,6 +86,8 @@ Properties +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`launcher_icons/adaptive_foreground_432x432` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`launcher_icons/adaptive_monochrome_432x432` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`launcher_icons/main_192x192` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`package/app_category` | @@ -768,6 +770,18 @@ Foreground layer of the application adaptive icon file. See `Design adaptive ico ---- +.. _class_EditorExportPlatformAndroid_property_launcher_icons/adaptive_monochrome_432x432: + +.. rst-class:: classref-property + +:ref:`String` **launcher_icons/adaptive_monochrome_432x432** :ref:`🔗` + +Monochrome layer of the application adaptive icon file. See `Design adaptive icons `__. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlatformAndroid_property_launcher_icons/main_192x192: .. rst-class:: classref-property diff --git a/classes/class_editorexportplatformextension.rst b/classes/class_editorexportplatformextension.rst new file mode 100644 index 00000000000..ec5351c5a78 --- /dev/null +++ b/classes/class_editorexportplatformextension.rst @@ -0,0 +1,622 @@ +: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/EditorExportPlatformExtension.xml. + +.. _class_EditorExportPlatformExtension: + +EditorExportPlatformExtension +============================= + +**Inherits:** :ref:`EditorExportPlatform` **<** :ref:`RefCounted` **<** :ref:`Object` + +Base class for custom :ref:`EditorExportPlatform` implementations (plugins). + +.. rst-class:: classref-introduction-group + +Description +----------- + +External :ref:`EditorExportPlatform` implementations should inherit from this class. + +To use :ref:`EditorExportPlatform`, register it using the :ref:`EditorPlugin.add_export_platform` method first. + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_can_export`\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`\ ) |virtual| |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_cleanup`\ (\ ) |virtual| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_export_pack`\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, flags\: |bitfield|\[:ref:`DebugFlags`\]\ ) |virtual| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_export_pack_patch`\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, patches\: :ref:`PackedStringArray`, flags\: |bitfield|\[:ref:`DebugFlags`\]\ ) |virtual| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_export_project`\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, flags\: |bitfield|\[:ref:`DebugFlags`\]\ ) |virtual| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_export_zip`\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, flags\: |bitfield|\[:ref:`DebugFlags`\]\ ) |virtual| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_export_zip_patch`\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, patches\: :ref:`PackedStringArray`, flags\: |bitfield|\[:ref:`DebugFlags`\]\ ) |virtual| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_binary_extensions`\ (\ preset\: :ref:`EditorExportPreset`\ ) |virtual| |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_debug_protocol`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_device_architecture`\ (\ device\: :ref:`int`\ ) |virtual| |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_get_export_option_visibility`\ (\ preset\: :ref:`EditorExportPreset`, option\: :ref:`String`\ ) |virtual| |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_export_option_warning`\ (\ preset\: :ref:`EditorExportPreset`, option\: :ref:`StringName`\ ) |virtual| |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`_get_export_options`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`_get_logo`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_name`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ImageTexture` | :ref:`_get_option_icon`\ (\ device\: :ref:`int`\ ) |virtual| |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_option_label`\ (\ device\: :ref:`int`\ ) |virtual| |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_option_tooltip`\ (\ device\: :ref:`int`\ ) |virtual| |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_options_count`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_options_tooltip`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_os_name`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_platform_features`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_preset_features`\ (\ preset\: :ref:`EditorExportPreset`\ ) |virtual| |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`_get_run_icon`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_has_valid_export_configuration`\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`\ ) |virtual| |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_has_valid_project_configuration`\ (\ preset\: :ref:`EditorExportPreset`\ ) |virtual| |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_executable`\ (\ path\: :ref:`String`\ ) |virtual| |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_poll_export`\ (\ ) |virtual| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_run`\ (\ preset\: :ref:`EditorExportPreset`, device\: :ref:`int`, debug_flags\: |bitfield|\[:ref:`DebugFlags`\]\ ) |virtual| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_should_update_export_options`\ (\ ) |virtual| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_config_error`\ (\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_config_missing_templates`\ (\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_config_error`\ (\ error_text\: :ref:`String`\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_config_missing_templates`\ (\ missing_templates\: :ref:`bool`\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_EditorExportPlatformExtension_private_method__can_export: + +.. rst-class:: classref-method + +:ref:`bool` **_can_export**\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`\ ) |virtual| |const| :ref:`🔗` + +**Optional.**\ + +Returns ``true``, if specified ``preset`` is valid and can be exported. Use :ref:`set_config_error` and :ref:`set_config_missing_templates` to set error details. + +Usual implementation can call :ref:`_has_valid_export_configuration` and :ref:`_has_valid_project_configuration` to determine if export is possible. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformExtension_private_method__cleanup: + +.. rst-class:: classref-method + +|void| **_cleanup**\ (\ ) |virtual| :ref:`🔗` + +**Optional.**\ + +Called by the editor before platform is unregistered. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformExtension_private_method__export_pack: + +.. rst-class:: classref-method + +:ref:`Error` **_export_pack**\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, flags\: |bitfield|\[:ref:`DebugFlags`\]\ ) |virtual| :ref:`🔗` + +**Optional.**\ + +Creates a PCK archive at ``path`` for the specified ``preset``. + +This method is called when "Export PCK/ZIP" button is pressed in the export dialog, with "Export as Patch" disabled, and PCK is selected as a file type. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformExtension_private_method__export_pack_patch: + +.. rst-class:: classref-method + +:ref:`Error` **_export_pack_patch**\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, patches\: :ref:`PackedStringArray`, flags\: |bitfield|\[:ref:`DebugFlags`\]\ ) |virtual| :ref:`🔗` + +**Optional.**\ + +Creates a patch PCK archive at ``path`` for the specified ``preset``, containing only the files that have changed since the last patch. + +This method is called when "Export PCK/ZIP" button is pressed in the export dialog, with "Export as Patch" enabled, and PCK is selected as a file type. + +\ **Note:** The patches provided in ``patches`` have already been loaded when this method is called and are merely provided as context. When empty the patches defined in the export preset have been loaded instead. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformExtension_private_method__export_project: + +.. rst-class:: classref-method + +:ref:`Error` **_export_project**\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, flags\: |bitfield|\[:ref:`DebugFlags`\]\ ) |virtual| :ref:`🔗` + +**Required.**\ + +Creates a full project at ``path`` for the specified ``preset``. + +This method is called when "Export" button is pressed in the export dialog. + +This method implementation can call :ref:`EditorExportPlatform.save_pack` or :ref:`EditorExportPlatform.save_zip` to use default PCK/ZIP export process, or calls :ref:`EditorExportPlatform.export_project_files` and implement custom callback for processing each exported file. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformExtension_private_method__export_zip: + +.. rst-class:: classref-method + +:ref:`Error` **_export_zip**\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, flags\: |bitfield|\[:ref:`DebugFlags`\]\ ) |virtual| :ref:`🔗` + +**Optional.**\ + +Create a ZIP archive at ``path`` for the specified ``preset``. + +This method is called when "Export PCK/ZIP" button is pressed in the export dialog, with "Export as Patch" disabled, and ZIP is selected as a file type. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformExtension_private_method__export_zip_patch: + +.. rst-class:: classref-method + +:ref:`Error` **_export_zip_patch**\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, patches\: :ref:`PackedStringArray`, flags\: |bitfield|\[:ref:`DebugFlags`\]\ ) |virtual| :ref:`🔗` + +**Optional.**\ + +Create a ZIP archive at ``path`` for the specified ``preset``, containing only the files that have changed since the last patch. + +This method is called when "Export PCK/ZIP" button is pressed in the export dialog, with "Export as Patch" enabled, and ZIP is selected as a file type. + +\ **Note:** The patches provided in ``patches`` have already been loaded when this method is called and are merely provided as context. When empty the patches defined in the export preset have been loaded instead. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformExtension_private_method__get_binary_extensions: + +.. rst-class:: classref-method + +:ref:`PackedStringArray` **_get_binary_extensions**\ (\ preset\: :ref:`EditorExportPreset`\ ) |virtual| |const| :ref:`🔗` + +**Required.**\ + +Returns array of supported binary extensions for the full project export. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformExtension_private_method__get_debug_protocol: + +.. rst-class:: classref-method + +:ref:`String` **_get_debug_protocol**\ (\ ) |virtual| |const| :ref:`🔗` + +**Optional.**\ + +Returns protocol used for remote debugging. Default implementation return ``tcp://``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformExtension_private_method__get_device_architecture: + +.. rst-class:: classref-method + +:ref:`String` **_get_device_architecture**\ (\ device\: :ref:`int`\ ) |virtual| |const| :ref:`🔗` + +**Optional.**\ + +Returns device architecture for one-click deploy. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformExtension_private_method__get_export_option_visibility: + +.. rst-class:: classref-method + +:ref:`bool` **_get_export_option_visibility**\ (\ preset\: :ref:`EditorExportPreset`, option\: :ref:`String`\ ) |virtual| |const| :ref:`🔗` + +**Optional.**\ + +Validates ``option`` and returns visibility for the specified ``preset``. Default implementation return ``true`` for all options. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformExtension_private_method__get_export_option_warning: + +.. rst-class:: classref-method + +:ref:`String` **_get_export_option_warning**\ (\ preset\: :ref:`EditorExportPreset`, option\: :ref:`StringName`\ ) |virtual| |const| :ref:`🔗` + +**Optional.**\ + +Validates ``option`` and returns warning message for the specified ``preset``. Default implementation return empty string for all options. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformExtension_private_method__get_export_options: + +.. rst-class:: classref-method + +:ref:`Array`\[:ref:`Dictionary`\] **_get_export_options**\ (\ ) |virtual| |const| :ref:`🔗` + +**Optional.**\ + +Returns a property list, as an :ref:`Array` of dictionaries. Each :ref:`Dictionary` must at least contain the ``name: StringName`` and ``type: Variant.Type`` entries. + +Additionally, the following keys are supported: + +- ``hint: PropertyHint``\ + +- ``hint_string: String``\ + +- ``usage: PropertyUsageFlags``\ + +- ``class_name: StringName``\ + +- ``default_value: Variant``, default value of the property. + +- ``update_visibility: bool``, if set to ``true``, :ref:`_get_export_option_visibility` is called for each property when this property is changed. + +- ``required: bool``, if set to ``true``, this property warnings are critical, and should be resolved to make export possible. This value is a hint for the :ref:`_has_valid_export_configuration` implementation, and not used by the engine directly. + +See also :ref:`Object._get_property_list`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformExtension_private_method__get_logo: + +.. rst-class:: classref-method + +:ref:`Texture2D` **_get_logo**\ (\ ) |virtual| |const| :ref:`🔗` + +**Required.**\ + +Returns platform logo displayed in the export dialog, logo should be 32x32 adjusted to the current editor scale, see :ref:`EditorInterface.get_editor_scale`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformExtension_private_method__get_name: + +.. rst-class:: classref-method + +:ref:`String` **_get_name**\ (\ ) |virtual| |const| :ref:`🔗` + +**Required.**\ + +Returns export platform name. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformExtension_private_method__get_option_icon: + +.. rst-class:: classref-method + +:ref:`ImageTexture` **_get_option_icon**\ (\ device\: :ref:`int`\ ) |virtual| |const| :ref:`🔗` + +**Optional.**\ + +Returns one-click deploy menu item icon for the specified ``device``, icon should be 16x16 adjusted to the current editor scale, see :ref:`EditorInterface.get_editor_scale`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformExtension_private_method__get_option_label: + +.. rst-class:: classref-method + +:ref:`String` **_get_option_label**\ (\ device\: :ref:`int`\ ) |virtual| |const| :ref:`🔗` + +**Optional.**\ + +Returns one-click deploy menu item label for the specified ``device``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformExtension_private_method__get_option_tooltip: + +.. rst-class:: classref-method + +:ref:`String` **_get_option_tooltip**\ (\ device\: :ref:`int`\ ) |virtual| |const| :ref:`🔗` + +**Optional.**\ + +Returns one-click deploy menu item tooltip for the specified ``device``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformExtension_private_method__get_options_count: + +.. rst-class:: classref-method + +:ref:`int` **_get_options_count**\ (\ ) |virtual| |const| :ref:`🔗` + +**Optional.**\ + +Returns number one-click deploy devices (or other one-click option displayed in the menu). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformExtension_private_method__get_options_tooltip: + +.. rst-class:: classref-method + +:ref:`String` **_get_options_tooltip**\ (\ ) |virtual| |const| :ref:`🔗` + +**Optional.**\ + +Returns tooltip of the one-click deploy menu button. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformExtension_private_method__get_os_name: + +.. rst-class:: classref-method + +:ref:`String` **_get_os_name**\ (\ ) |virtual| |const| :ref:`🔗` + +**Required.**\ + +Returns target OS name. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformExtension_private_method__get_platform_features: + +.. rst-class:: classref-method + +:ref:`PackedStringArray` **_get_platform_features**\ (\ ) |virtual| |const| :ref:`🔗` + +**Required.**\ + +Returns array of platform specific features. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformExtension_private_method__get_preset_features: + +.. rst-class:: classref-method + +:ref:`PackedStringArray` **_get_preset_features**\ (\ preset\: :ref:`EditorExportPreset`\ ) |virtual| |const| :ref:`🔗` + +**Required.**\ + +Returns array of platform specific features for the specified ``preset``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformExtension_private_method__get_run_icon: + +.. rst-class:: classref-method + +:ref:`Texture2D` **_get_run_icon**\ (\ ) |virtual| |const| :ref:`🔗` + +**Optional.**\ + +Returns icon of the one-click deploy menu button, icon should be 16x16 adjusted to the current editor scale, see :ref:`EditorInterface.get_editor_scale`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformExtension_private_method__has_valid_export_configuration: + +.. rst-class:: classref-method + +:ref:`bool` **_has_valid_export_configuration**\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`\ ) |virtual| |const| :ref:`🔗` + +**Required.**\ + +Returns ``true`` if export configuration is valid. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformExtension_private_method__has_valid_project_configuration: + +.. rst-class:: classref-method + +:ref:`bool` **_has_valid_project_configuration**\ (\ preset\: :ref:`EditorExportPreset`\ ) |virtual| |const| :ref:`🔗` + +**Required.**\ + +Returns ``true`` if project configuration is valid. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformExtension_private_method__is_executable: + +.. rst-class:: classref-method + +:ref:`bool` **_is_executable**\ (\ path\: :ref:`String`\ ) |virtual| |const| :ref:`🔗` + +**Optional.**\ + +Returns ``true`` if specified file is a valid executable (native executable or script) for the target platform. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformExtension_private_method__poll_export: + +.. rst-class:: classref-method + +:ref:`bool` **_poll_export**\ (\ ) |virtual| :ref:`🔗` + +**Optional.**\ + +Returns ``true`` if one-click deploy options are changed and editor interface should be updated. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformExtension_private_method__run: + +.. rst-class:: classref-method + +:ref:`Error` **_run**\ (\ preset\: :ref:`EditorExportPreset`, device\: :ref:`int`, debug_flags\: |bitfield|\[:ref:`DebugFlags`\]\ ) |virtual| :ref:`🔗` + +**Optional.**\ + +This method is called when ``device`` one-click deploy menu option is selected. + +Implementation should export project to a temporary location, upload and run it on the specific ``device``, or perform another action associated with the menu item. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformExtension_private_method__should_update_export_options: + +.. rst-class:: classref-method + +:ref:`bool` **_should_update_export_options**\ (\ ) |virtual| :ref:`🔗` + +**Optional.**\ + +Returns ``true`` if export options list is changed and presets should be updated. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformExtension_method_get_config_error: + +.. rst-class:: classref-method + +:ref:`String` **get_config_error**\ (\ ) |const| :ref:`🔗` + +Returns current configuration error message text. This method should be called only from the :ref:`_can_export`, :ref:`_has_valid_export_configuration`, or :ref:`_has_valid_project_configuration` implementations. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformExtension_method_get_config_missing_templates: + +.. rst-class:: classref-method + +:ref:`bool` **get_config_missing_templates**\ (\ ) |const| :ref:`🔗` + +Returns ``true`` is export templates are missing from the current configuration. This method should be called only from the :ref:`_can_export`, :ref:`_has_valid_export_configuration`, or :ref:`_has_valid_project_configuration` implementations. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformExtension_method_set_config_error: + +.. rst-class:: classref-method + +|void| **set_config_error**\ (\ error_text\: :ref:`String`\ ) |const| :ref:`🔗` + +Sets current configuration error message text. This method should be called only from the :ref:`_can_export`, :ref:`_has_valid_export_configuration`, or :ref:`_has_valid_project_configuration` implementations. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformExtension_method_set_config_missing_templates: + +.. rst-class:: classref-method + +|void| **set_config_missing_templates**\ (\ missing_templates\: :ref:`bool`\ ) |const| :ref:`🔗` + +Set to ``true`` is export templates are missing from the current configuration. This method should be called only from the :ref:`_can_export`, :ref:`_has_valid_export_configuration`, or :ref:`_has_valid_project_configuration` implementations. + +.. |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_editorexportplatformios.rst b/classes/class_editorexportplatformios.rst index 52e39a1acc6..09ac272cd34 100644 --- a/classes/class_editorexportplatformios.rst +++ b/classes/class_editorexportplatformios.rst @@ -84,28 +84,106 @@ Properties +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`icons/app_store_1024x1024` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`icons/ipad_76x76` | + | :ref:`String` | :ref:`icons/app_store_1024x1024_dark` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/app_store_1024x1024_tinted` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/icon_1024x1024` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/icon_1024x1024_dark` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/icon_1024x1024_tinted` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/ios_128x128` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/ios_128x128_dark` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/ios_128x128_tinted` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/ios_136x136` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/ios_136x136_dark` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/ios_136x136_tinted` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/ios_192x192` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/ios_192x192_dark` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/ios_192x192_tinted` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`icons/ipad_152x152` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/ipad_152x152_dark` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/ipad_152x152_tinted` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`icons/ipad_167x167` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/ipad_167x167_dark` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/ipad_167x167_tinted` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`icons/iphone_120x120` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/iphone_120x120_dark` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/iphone_120x120_tinted` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`icons/iphone_180x180` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/iphone_180x180_dark` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/iphone_180x180_tinted` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`icons/notification_40x40` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/notification_40x40_dark` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/notification_40x40_tinted` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`icons/notification_60x60` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/notification_60x60_dark` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/notification_60x60_tinted` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/notification_76x76` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/notification_76x76_dark` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/notification_76x76_tinted` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/notification_114x114` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/notification_114x114_dark` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/notification_114x114_tinted` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`icons/settings_58x58` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/settings_58x58_dark` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/settings_58x58_tinted` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`icons/settings_87x87` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`icons/spotlight_40x40` | + | :ref:`String` | :ref:`icons/settings_87x87_dark` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/settings_87x87_tinted` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`icons/spotlight_80x80` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/spotlight_80x80_dark` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/spotlight_80x80_tinted` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/spotlight_120x120` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/spotlight_120x120_dark` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/spotlight_120x120_tinted` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`privacy/active_keyboard_access_reasons` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`privacy/camera_usage_description` | @@ -761,13 +839,169 @@ App Store application icon file. If left empty, it will fallback to :ref:`Projec ---- -.. _class_EditorExportPlatformIOS_property_icons/ipad_76x76: +.. _class_EditorExportPlatformIOS_property_icons/app_store_1024x1024_dark: + +.. rst-class:: classref-property + +:ref:`String` **icons/app_store_1024x1024_dark** :ref:`🔗` + +App Store application icon file, dark version. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/app_store_1024x1024_tinted: + +.. rst-class:: classref-property + +:ref:`String` **icons/app_store_1024x1024_tinted** :ref:`🔗` + +App Store application icon file, tinted version. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/icon_1024x1024: + +.. rst-class:: classref-property + +:ref:`String` **icons/icon_1024x1024** :ref:`🔗` + +Base application icon used to generate other icons. If left empty, it will fallback to :ref:`ProjectSettings.application/config/icon`. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/icon_1024x1024_dark: + +.. rst-class:: classref-property + +:ref:`String` **icons/icon_1024x1024_dark** :ref:`🔗` + +Base application icon used to generate other icons, dark version. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/icon_1024x1024_tinted: + +.. rst-class:: classref-property + +:ref:`String` **icons/icon_1024x1024_tinted** :ref:`🔗` + +Base application icon used to generate other icons, tinted version. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/ios_128x128: + +.. rst-class:: classref-property + +:ref:`String` **icons/ios_128x128** :ref:`🔗` + +iOS application 64x64 icon file (2x DPI). If left empty, it will fallback to :ref:`ProjectSettings.application/config/icon`. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/ios_128x128_dark: + +.. rst-class:: classref-property + +:ref:`String` **icons/ios_128x128_dark** :ref:`🔗` + +iOS application 64x64 icon file (2x DPI), dark version. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/ios_128x128_tinted: + +.. rst-class:: classref-property + +:ref:`String` **icons/ios_128x128_tinted** :ref:`🔗` + +iOS application 64x64 icon file (2x DPI), tinted version. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/ios_136x136: + +.. rst-class:: classref-property + +:ref:`String` **icons/ios_136x136** :ref:`🔗` + +iOS application 68x68 icon file (2x DPI). If left empty, it will fallback to :ref:`ProjectSettings.application/config/icon`. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/ios_136x136_dark: + +.. rst-class:: classref-property + +:ref:`String` **icons/ios_136x136_dark** :ref:`🔗` + +iOS application 68x68 icon file (2x DPI), dark version. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/ios_136x136_tinted: + +.. rst-class:: classref-property + +:ref:`String` **icons/ios_136x136_tinted** :ref:`🔗` + +iOS application 68x68 icon file (2x DPI), tinted version. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/ios_192x192: + +.. rst-class:: classref-property + +:ref:`String` **icons/ios_192x192** :ref:`🔗` + +iOS application 64x64 icon file (3x DPI). If left empty, it will fallback to :ref:`ProjectSettings.application/config/icon`. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/ios_192x192_dark: .. rst-class:: classref-property -:ref:`String` **icons/ipad_76x76** :ref:`🔗` +:ref:`String` **icons/ios_192x192_dark** :ref:`🔗` -Home screen application icon file on iPad (1x DPI). If left empty, it will fallback to :ref:`ProjectSettings.application/config/icon`. See `App icons `__. +iOS application 64x64 icon file (3x DPI), dark version. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/ios_192x192_tinted: + +.. rst-class:: classref-property + +:ref:`String` **icons/ios_192x192_tinted** :ref:`🔗` + +iOS application 64x64 icon file (3x DPI), tinted version. See `App icons `__. .. rst-class:: classref-item-separator @@ -785,6 +1019,30 @@ Home screen application icon file on iPad (2x DPI). If left empty, it will fallb ---- +.. _class_EditorExportPlatformIOS_property_icons/ipad_152x152_dark: + +.. rst-class:: classref-property + +:ref:`String` **icons/ipad_152x152_dark** :ref:`🔗` + +Home screen application icon file on iPad (2x DPI), dark version. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/ipad_152x152_tinted: + +.. rst-class:: classref-property + +:ref:`String` **icons/ipad_152x152_tinted** :ref:`🔗` + +Home screen application icon file on iPad (2x DPI), tinted version. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlatformIOS_property_icons/ipad_167x167: .. rst-class:: classref-property @@ -797,6 +1055,30 @@ Home screen application icon file on iPad (3x DPI). If left empty, it will fallb ---- +.. _class_EditorExportPlatformIOS_property_icons/ipad_167x167_dark: + +.. rst-class:: classref-property + +:ref:`String` **icons/ipad_167x167_dark** :ref:`🔗` + +Home screen application icon file on iPad (3x DPI), dark version. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/ipad_167x167_tinted: + +.. rst-class:: classref-property + +:ref:`String` **icons/ipad_167x167_tinted** :ref:`🔗` + +Home screen application icon file on iPad (3x DPI), tinted version. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlatformIOS_property_icons/iphone_120x120: .. rst-class:: classref-property @@ -809,6 +1091,30 @@ Home screen application icon file on iPhone (2x DPI). If left empty, it will fal ---- +.. _class_EditorExportPlatformIOS_property_icons/iphone_120x120_dark: + +.. rst-class:: classref-property + +:ref:`String` **icons/iphone_120x120_dark** :ref:`🔗` + +Home screen application icon file on iPhone (2x DPI), dark version. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/iphone_120x120_tinted: + +.. rst-class:: classref-property + +:ref:`String` **icons/iphone_120x120_tinted** :ref:`🔗` + +Home screen application icon file on iPhone (2x DPI), tinted version. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlatformIOS_property_icons/iphone_180x180: .. rst-class:: classref-property @@ -821,6 +1127,30 @@ Home screen application icon file on iPhone (3x DPI). If left empty, it will fal ---- +.. _class_EditorExportPlatformIOS_property_icons/iphone_180x180_dark: + +.. rst-class:: classref-property + +:ref:`String` **icons/iphone_180x180_dark** :ref:`🔗` + +Home screen application icon file on iPhone (3x DPI), dark version. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/iphone_180x180_tinted: + +.. rst-class:: classref-property + +:ref:`String` **icons/iphone_180x180_tinted** :ref:`🔗` + +Home screen application icon file on iPhone (3x DPI), tinted version. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlatformIOS_property_icons/notification_40x40: .. rst-class:: classref-property @@ -833,6 +1163,30 @@ Notification icon file on iPad and iPhone (2x DPI). If left empty, it will fallb ---- +.. _class_EditorExportPlatformIOS_property_icons/notification_40x40_dark: + +.. rst-class:: classref-property + +:ref:`String` **icons/notification_40x40_dark** :ref:`🔗` + +Notification icon file on iPad and iPhone (2x DPI), dark version. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/notification_40x40_tinted: + +.. rst-class:: classref-property + +:ref:`String` **icons/notification_40x40_tinted** :ref:`🔗` + +Notification icon file on iPad and iPhone (2x DPI), tinted version. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlatformIOS_property_icons/notification_60x60: .. rst-class:: classref-property @@ -845,6 +1199,102 @@ Notification icon file on iPhone (3x DPI). If left empty, it will fallback to :r ---- +.. _class_EditorExportPlatformIOS_property_icons/notification_60x60_dark: + +.. rst-class:: classref-property + +:ref:`String` **icons/notification_60x60_dark** :ref:`🔗` + +Notification icon file on iPhone (3x DPI), dark version. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/notification_60x60_tinted: + +.. rst-class:: classref-property + +:ref:`String` **icons/notification_60x60_tinted** :ref:`🔗` + +Notification icon file on iPhone (3x DPI), tinted version. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/notification_76x76: + +.. rst-class:: classref-property + +:ref:`String` **icons/notification_76x76** :ref:`🔗` + +Notification icon file on iPad and iPhone (2x DPI). If left empty, it will fallback to :ref:`ProjectSettings.application/config/icon`. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/notification_76x76_dark: + +.. rst-class:: classref-property + +:ref:`String` **icons/notification_76x76_dark** :ref:`🔗` + +Notification icon file on iPad and iPhone (2x DPI), dark version. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/notification_76x76_tinted: + +.. rst-class:: classref-property + +:ref:`String` **icons/notification_76x76_tinted** :ref:`🔗` + +Notification icon file on iPad and iPhone (2x DPI), tinted version. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/notification_114x114: + +.. rst-class:: classref-property + +:ref:`String` **icons/notification_114x114** :ref:`🔗` + +Notification icon file on iPad and iPhone (3x DPI). If left empty, it will fallback to :ref:`ProjectSettings.application/config/icon`. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/notification_114x114_dark: + +.. rst-class:: classref-property + +:ref:`String` **icons/notification_114x114_dark** :ref:`🔗` + +Notification icon file on iPad and iPhone (3x DPI), dark version. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/notification_114x114_tinted: + +.. rst-class:: classref-property + +:ref:`String` **icons/notification_114x114_tinted** :ref:`🔗` + +Notification icon file on iPad and iPhone (3x DPI), tinted version. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlatformIOS_property_icons/settings_58x58: .. rst-class:: classref-property @@ -857,6 +1307,30 @@ Application settings icon file on iPad and iPhone (2x DPI). If left empty, it wi ---- +.. _class_EditorExportPlatformIOS_property_icons/settings_58x58_dark: + +.. rst-class:: classref-property + +:ref:`String` **icons/settings_58x58_dark** :ref:`🔗` + +Application settings icon file on iPad and iPhone (2x DPI), dark version. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/settings_58x58_tinted: + +.. rst-class:: classref-property + +:ref:`String` **icons/settings_58x58_tinted** :ref:`🔗` + +Application settings icon file on iPad and iPhone (2x DPI), tinted version. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlatformIOS_property_icons/settings_87x87: .. rst-class:: classref-property @@ -869,13 +1343,25 @@ Application settings icon file on iPhone (3x DPI). If left empty, it will fallba ---- -.. _class_EditorExportPlatformIOS_property_icons/spotlight_40x40: +.. _class_EditorExportPlatformIOS_property_icons/settings_87x87_dark: .. rst-class:: classref-property -:ref:`String` **icons/spotlight_40x40** :ref:`🔗` +:ref:`String` **icons/settings_87x87_dark** :ref:`🔗` -Spotlight icon file on iPad (1x DPI). If left empty, it will fallback to :ref:`ProjectSettings.application/config/icon`. See `App icons `__. +Application settings icon file on iPhone (3x DPI), dark version. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/settings_87x87_tinted: + +.. rst-class:: classref-property + +:ref:`String` **icons/settings_87x87_tinted** :ref:`🔗` + +Application settings icon file on iPhone (3x DPI), tinted version. See `App icons `__. .. rst-class:: classref-item-separator @@ -893,6 +1379,66 @@ Spotlight icon file on iPad and iPhone (2x DPI). If left empty, it will fallback ---- +.. _class_EditorExportPlatformIOS_property_icons/spotlight_80x80_dark: + +.. rst-class:: classref-property + +:ref:`String` **icons/spotlight_80x80_dark** :ref:`🔗` + +Spotlight icon file on iPad and iPhone (2x DPI), dark version. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/spotlight_80x80_tinted: + +.. rst-class:: classref-property + +:ref:`String` **icons/spotlight_80x80_tinted** :ref:`🔗` + +Spotlight icon file on iPad and iPhone (2x DPI), tinted version. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/spotlight_120x120: + +.. rst-class:: classref-property + +:ref:`String` **icons/spotlight_120x120** :ref:`🔗` + +Spotlight icon file on iPad and iPhone (3x DPI). If left empty, it will fallback to :ref:`ProjectSettings.application/config/icon`. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/spotlight_120x120_dark: + +.. rst-class:: classref-property + +:ref:`String` **icons/spotlight_120x120_dark** :ref:`🔗` + +Spotlight icon file on iPad and iPhone (3x DPI), dark version. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_icons/spotlight_120x120_tinted: + +.. rst-class:: classref-property + +:ref:`String` **icons/spotlight_120x120_tinted** :ref:`🔗` + +Spotlight icon file on iPad and iPhone (3x DPI), tinted version. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlatformIOS_property_privacy/active_keyboard_access_reasons: .. rst-class:: classref-property @@ -983,7 +1529,7 @@ Indicates whether your app uses advertising data for tracking. :ref:`bool` **privacy/collected_data/audio_data/collected** :ref:`🔗` -Indicates whether your app collects audio data data. +Indicates whether your app collects audio data. .. rst-class:: classref-item-separator @@ -1007,7 +1553,7 @@ The reasons your app collects audio data. See `Describing data use in privacy ma :ref:`bool` **privacy/collected_data/audio_data/linked_to_user** :ref:`🔗` -Indicates whether your app links audio data data to the user's identity. +Indicates whether your app links audio data to the user's identity. .. rst-class:: classref-item-separator @@ -1019,7 +1565,7 @@ Indicates whether your app links audio data data to the user's identity. :ref:`bool` **privacy/collected_data/audio_data/used_for_tracking** :ref:`🔗` -Indicates whether your app uses audio data data for tracking. +Indicates whether your app uses audio data for tracking. .. rst-class:: classref-item-separator diff --git a/classes/class_editorexportplatformmacos.rst b/classes/class_editorexportplatformmacos.rst index 33dbdf9f98f..0c91acdf243 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` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -68,6 +70,8 @@ Properties +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`codesign/custom_options` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`codesign/entitlements/additional` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`codesign/entitlements/address_book` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`codesign/entitlements/allow_dyld_environment_variables` | @@ -609,13 +613,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** :ref:`🔗` +:ref:`String` **application/min_macos_version_arm64** :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 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_x86_64** :ref:`🔗` + +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 @@ -739,6 +755,23 @@ Array of the additional command line arguments passed to the code signing tool. ---- +.. _class_EditorExportPlatformMacOS_property_codesign/entitlements/additional: + +.. rst-class:: classref-property + +:ref:`String` **codesign/entitlements/additional** :ref:`🔗` + +Additional data added to the root ```` section of the `.entitlements `__ file. The value should be an XML section with pairs of key-value elements, e.g.: + +.. code:: text + + key_name + value + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlatformMacOS_property_codesign/entitlements/address_book: .. rst-class:: classref-property @@ -1335,7 +1368,7 @@ Indicates whether your app uses advertising data for tracking. :ref:`bool` **privacy/collected_data/audio_data/collected** :ref:`🔗` -Indicates whether your app collects audio data data. +Indicates whether your app collects audio data. .. rst-class:: classref-item-separator @@ -1359,7 +1392,7 @@ The reasons your app collects audio data. See `Describing data use in privacy ma :ref:`bool` **privacy/collected_data/audio_data/linked_to_user** :ref:`🔗` -Indicates whether your app links audio data data to the user's identity. +Indicates whether your app links audio data to the user's identity. .. rst-class:: classref-item-separator @@ -1371,7 +1404,7 @@ Indicates whether your app links audio data data to the user's identity. :ref:`bool` **privacy/collected_data/audio_data/used_for_tracking** :ref:`🔗` -Indicates whether your app uses audio data data for tracking. +Indicates whether your app uses audio data for tracking. .. rst-class:: classref-item-separator diff --git a/classes/class_editorexportplugin.rst b/classes/class_editorexportplugin.rst index 241e572665d..beb15d4a2c3 100644 --- a/classes/class_editorexportplugin.rst +++ b/classes/class_editorexportplugin.rst @@ -73,6 +73,8 @@ Methods +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`_get_export_features`\ (\ platform\: :ref:`EditorExportPlatform`, debug\: :ref:`bool`\ ) |virtual| |const| | +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_get_export_option_visibility`\ (\ platform\: :ref:`EditorExportPlatform`, option\: :ref:`String`\ ) |virtual| |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`_get_export_option_warning`\ (\ platform\: :ref:`EditorExportPlatform`, option\: :ref:`String`\ ) |virtual| |const| | +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`_get_export_options`\ (\ platform\: :ref:`EditorExportPlatform`\ ) |virtual| |const| | @@ -105,6 +107,10 @@ Methods +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`add_shared_object`\ (\ path\: :ref:`String`, tags\: :ref:`PackedStringArray`, target\: :ref:`String`\ ) | +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorExportPlatform` | :ref:`get_export_platform`\ (\ ) |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorExportPreset` | :ref:`get_export_preset`\ (\ ) |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`get_option`\ (\ name\: :ref:`StringName`\ ) |const| | +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`skip`\ (\ ) | @@ -357,6 +363,20 @@ Return a :ref:`PackedStringArray` of additional feature ---- +.. _class_EditorExportPlugin_private_method__get_export_option_visibility: + +.. rst-class:: classref-method + +:ref:`bool` **_get_export_option_visibility**\ (\ platform\: :ref:`EditorExportPlatform`, option\: :ref:`String`\ ) |virtual| |const| :ref:`🔗` + +**Optional.**\ + +Validates ``option`` and returns the visibility for the specified ``platform``. The default implementation returns ``true`` for all options. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlugin_private_method__get_export_option_warning: .. rst-class:: classref-method @@ -593,6 +613,30 @@ In case of a directory code-sign will error if you place non code object in dire ---- +.. _class_EditorExportPlugin_method_get_export_platform: + +.. rst-class:: classref-method + +:ref:`EditorExportPlatform` **get_export_platform**\ (\ ) |const| :ref:`🔗` + +Returns currently used export platform. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlugin_method_get_export_preset: + +.. rst-class:: classref-method + +:ref:`EditorExportPreset` **get_export_preset**\ (\ ) |const| :ref:`🔗` + +Returns currently used export preset. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlugin_method_get_option: .. rst-class:: classref-method diff --git a/classes/class_editorexportpreset.rst b/classes/class_editorexportpreset.rst new file mode 100644 index 00000000000..9b3882dca81 --- /dev/null +++ b/classes/class_editorexportpreset.rst @@ -0,0 +1,563 @@ +: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/EditorExportPreset.xml. + +.. _class_EditorExportPreset: + +EditorExportPreset +================== + +**Inherits:** :ref:`RefCounted` **<** :ref:`Object` + +Export preset configuration. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Export preset configuration. Instances of **EditorExportPreset** by editor UI and intended to be used a read-only configuration passed to the :ref:`EditorExportPlatform` methods when exporting the project. + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`are_advanced_options_enabled`\ (\ ) |const| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_custom_features`\ (\ ) |const| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_customized_files`\ (\ ) |const| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_customized_files_count`\ (\ ) |const| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_encrypt_directory`\ (\ ) |const| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_encrypt_pck`\ (\ ) |const| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_encryption_ex_filter`\ (\ ) |const| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_encryption_in_filter`\ (\ ) |const| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_encryption_key`\ (\ ) |const| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_exclude_filter`\ (\ ) |const| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ExportFilter` | :ref:`get_export_filter`\ (\ ) |const| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_export_path`\ (\ ) |const| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`FileExportMode` | :ref:`get_file_export_mode`\ (\ path\: :ref:`String`, default\: :ref:`FileExportMode` = 0\ ) |const| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_files_to_export`\ (\ ) |const| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_include_filter`\ (\ ) |const| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_or_env`\ (\ name\: :ref:`StringName`, env_var\: :ref:`String`\ ) |const| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_patches`\ (\ ) |const| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_preset_name`\ (\ ) |const| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_script_export_mode`\ (\ ) |const| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_version`\ (\ name\: :ref:`StringName`, windows_version\: :ref:`bool`\ ) |const| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has`\ (\ property\: :ref:`StringName`\ ) |const| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_export_file`\ (\ path\: :ref:`String`\ ) | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_dedicated_server`\ (\ ) |const| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_runnable`\ (\ ) |const| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_EditorExportPreset_ExportFilter: + +.. rst-class:: classref-enumeration + +enum **ExportFilter**: :ref:`🔗` + +.. _class_EditorExportPreset_constant_EXPORT_ALL_RESOURCES: + +.. rst-class:: classref-enumeration-constant + +:ref:`ExportFilter` **EXPORT_ALL_RESOURCES** = ``0`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one `! + + + +.. _class_EditorExportPreset_constant_EXPORT_SELECTED_SCENES: + +.. rst-class:: classref-enumeration-constant + +:ref:`ExportFilter` **EXPORT_SELECTED_SCENES** = ``1`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one `! + + + +.. _class_EditorExportPreset_constant_EXPORT_SELECTED_RESOURCES: + +.. rst-class:: classref-enumeration-constant + +:ref:`ExportFilter` **EXPORT_SELECTED_RESOURCES** = ``2`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one `! + + + +.. _class_EditorExportPreset_constant_EXCLUDE_SELECTED_RESOURCES: + +.. rst-class:: classref-enumeration-constant + +:ref:`ExportFilter` **EXCLUDE_SELECTED_RESOURCES** = ``3`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one `! + + + +.. _class_EditorExportPreset_constant_EXPORT_CUSTOMIZED: + +.. rst-class:: classref-enumeration-constant + +:ref:`ExportFilter` **EXPORT_CUSTOMIZED** = ``4`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one `! + + + +.. rst-class:: classref-item-separator + +---- + +.. _enum_EditorExportPreset_FileExportMode: + +.. rst-class:: classref-enumeration + +enum **FileExportMode**: :ref:`🔗` + +.. _class_EditorExportPreset_constant_MODE_FILE_NOT_CUSTOMIZED: + +.. rst-class:: classref-enumeration-constant + +:ref:`FileExportMode` **MODE_FILE_NOT_CUSTOMIZED** = ``0`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one `! + + + +.. _class_EditorExportPreset_constant_MODE_FILE_STRIP: + +.. rst-class:: classref-enumeration-constant + +:ref:`FileExportMode` **MODE_FILE_STRIP** = ``1`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one `! + + + +.. _class_EditorExportPreset_constant_MODE_FILE_KEEP: + +.. rst-class:: classref-enumeration-constant + +:ref:`FileExportMode` **MODE_FILE_KEEP** = ``2`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one `! + + + +.. _class_EditorExportPreset_constant_MODE_FILE_REMOVE: + +.. rst-class:: classref-enumeration-constant + +:ref:`FileExportMode` **MODE_FILE_REMOVE** = ``3`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one `! + + + +.. rst-class:: classref-item-separator + +---- + +.. _enum_EditorExportPreset_ScriptExportMode: + +.. rst-class:: classref-enumeration + +enum **ScriptExportMode**: :ref:`🔗` + +.. _class_EditorExportPreset_constant_MODE_SCRIPT_TEXT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ScriptExportMode` **MODE_SCRIPT_TEXT** = ``0`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one `! + + + +.. _class_EditorExportPreset_constant_MODE_SCRIPT_BINARY_TOKENS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ScriptExportMode` **MODE_SCRIPT_BINARY_TOKENS** = ``1`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one `! + + + +.. _class_EditorExportPreset_constant_MODE_SCRIPT_BINARY_TOKENS_COMPRESSED: + +.. rst-class:: classref-enumeration-constant + +:ref:`ScriptExportMode` **MODE_SCRIPT_BINARY_TOKENS_COMPRESSED** = ``2`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one `! + + + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_EditorExportPreset_method_are_advanced_options_enabled: + +.. rst-class:: classref-method + +:ref:`bool` **are_advanced_options_enabled**\ (\ ) |const| :ref:`🔗` + +Returns ``true``, is "Advanced" toggle is enabled in the export dialog. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPreset_method_get_custom_features: + +.. rst-class:: classref-method + +:ref:`String` **get_custom_features**\ (\ ) |const| :ref:`🔗` + +Returns string with a comma separated list of custom features. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPreset_method_get_customized_files: + +.. rst-class:: classref-method + +:ref:`Dictionary` **get_customized_files**\ (\ ) |const| :ref:`🔗` + +Returns :ref:`Dictionary` of files selected in the "Resources" tab of the export dialog. Dictionary keys are file names and values are export mode - ``"strip``, ``"keep"``, or ``"remove"``. See also :ref:`get_file_export_mode`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPreset_method_get_customized_files_count: + +.. rst-class:: classref-method + +:ref:`int` **get_customized_files_count**\ (\ ) |const| :ref:`🔗` + +Returns number of files selected in the "Resources" tab of the export dialog. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPreset_method_get_encrypt_directory: + +.. rst-class:: classref-method + +:ref:`bool` **get_encrypt_directory**\ (\ ) |const| :ref:`🔗` + +Returns ``true``, PCK directory encryption is enabled in the export dialog. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPreset_method_get_encrypt_pck: + +.. rst-class:: classref-method + +:ref:`bool` **get_encrypt_pck**\ (\ ) |const| :ref:`🔗` + +Returns ``true``, PCK encryption is enabled in the export dialog. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPreset_method_get_encryption_ex_filter: + +.. rst-class:: classref-method + +:ref:`String` **get_encryption_ex_filter**\ (\ ) |const| :ref:`🔗` + +Returns file filters to exclude during PCK encryption. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPreset_method_get_encryption_in_filter: + +.. rst-class:: classref-method + +:ref:`String` **get_encryption_in_filter**\ (\ ) |const| :ref:`🔗` + +Returns file filters to include during PCK encryption. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPreset_method_get_encryption_key: + +.. rst-class:: classref-method + +:ref:`String` **get_encryption_key**\ (\ ) |const| :ref:`🔗` + +Returns PCK encryption key. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPreset_method_get_exclude_filter: + +.. rst-class:: classref-method + +:ref:`String` **get_exclude_filter**\ (\ ) |const| :ref:`🔗` + +Returns file filters to exclude during export. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPreset_method_get_export_filter: + +.. rst-class:: classref-method + +:ref:`ExportFilter` **get_export_filter**\ (\ ) |const| :ref:`🔗` + +Returns export file filter mode selected in the "Resources" tab of the export dialog. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPreset_method_get_export_path: + +.. rst-class:: classref-method + +:ref:`String` **get_export_path**\ (\ ) |const| :ref:`🔗` + +Returns export target path. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPreset_method_get_file_export_mode: + +.. rst-class:: classref-method + +:ref:`FileExportMode` **get_file_export_mode**\ (\ path\: :ref:`String`, default\: :ref:`FileExportMode` = 0\ ) |const| :ref:`🔗` + +Returns file export mode for the specified file. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPreset_method_get_files_to_export: + +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_files_to_export**\ (\ ) |const| :ref:`🔗` + +Returns array of files to export. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPreset_method_get_include_filter: + +.. rst-class:: classref-method + +:ref:`String` **get_include_filter**\ (\ ) |const| :ref:`🔗` + +Returns file filters to include during export. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPreset_method_get_or_env: + +.. rst-class:: classref-method + +:ref:`Variant` **get_or_env**\ (\ name\: :ref:`StringName`, env_var\: :ref:`String`\ ) |const| :ref:`🔗` + +Returns export option value or value of environment variable if it is set. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPreset_method_get_patches: + +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_patches**\ (\ ) |const| :ref:`🔗` + +Returns the list of packs on which to base a patch export on. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPreset_method_get_preset_name: + +.. rst-class:: classref-method + +:ref:`String` **get_preset_name**\ (\ ) |const| :ref:`🔗` + +Returns export preset name. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPreset_method_get_script_export_mode: + +.. rst-class:: classref-method + +:ref:`int` **get_script_export_mode**\ (\ ) |const| :ref:`🔗` + +Returns script export mode. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPreset_method_get_version: + +.. rst-class:: classref-method + +:ref:`String` **get_version**\ (\ name\: :ref:`StringName`, windows_version\: :ref:`bool`\ ) |const| :ref:`🔗` + +Returns the preset's version number, or fall back to the :ref:`ProjectSettings.application/config/version` project setting if set to an empty string. + +If ``windows_version`` is ``true``, formats the returned version number to be compatible with Windows executable metadata. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPreset_method_has: + +.. rst-class:: classref-method + +:ref:`bool` **has**\ (\ property\: :ref:`StringName`\ ) |const| :ref:`🔗` + +Returns ``true`` if preset has specified property. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPreset_method_has_export_file: + +.. rst-class:: classref-method + +:ref:`bool` **has_export_file**\ (\ path\: :ref:`String`\ ) :ref:`🔗` + +Returns ``true`` if specified file is exported. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPreset_method_is_dedicated_server: + +.. rst-class:: classref-method + +:ref:`bool` **is_dedicated_server**\ (\ ) |const| :ref:`🔗` + +Returns ``true`` if dedicated server export mode is selected in the export dialog. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPreset_method_is_runnable: + +.. rst-class:: classref-method + +:ref:`bool` **is_runnable**\ (\ ) |const| :ref:`🔗` + +Returns ``true`` if "Runnable" toggle is enabled in the export dialog. + +.. |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_editorimportplugin.rst b/classes/class_editorimportplugin.rst index cdebc608398..eea95e10a9b 100644 --- a/classes/class_editorimportplugin.rst +++ b/classes/class_editorimportplugin.rst @@ -120,18 +120,18 @@ Below is an example EditorImportPlugin that imports a :ref:`Mesh` fr }; } - public override int _Import(string sourceFile, string savePath, Godot.Collections.Dictionary options, Godot.Collections.Array platformVariants, Godot.Collections.Array genFiles) + public override Error _Import(string sourceFile, string savePath, Godot.Collections.Dictionary options, Godot.Collections.Array platformVariants, Godot.Collections.Array genFiles) { using var file = FileAccess.Open(sourceFile, FileAccess.ModeFlags.Read); if (file.GetError() != Error.Ok) { - return (int)Error.Failed; + return Error.Failed; } var mesh = new ArrayMesh(); // Fill the Mesh with data read in "file", left as an exercise to the reader. string filename = $"{savePath}.{_GetSaveExtension()}"; - return (int)ResourceSaver.Save(mesh, filename); + return ResourceSaver.Save(mesh, filename); } } @@ -388,7 +388,7 @@ This method must be overridden to do the actual importing work. See this class' :ref:`Error` **append_import_external_resource**\ (\ path\: :ref:`String`, custom_options\: :ref:`Dictionary` = {}, custom_importer\: :ref:`String` = "", generator_parameters\: :ref:`Variant` = null\ ) :ref:`🔗` -This function can only be called during the :ref:`_import` callback and it allows manually importing resources from it. This is useful when the imported file generates external resources that require importing (as example, images). Custom parameters for the ".import" file can be passed via the ``custom_options``. Additionally, in cases where multiple importers can handle a file, the ``custom_importer`` ca be specified to force a specific one. This function performs a resource import and returns immediately with a success or error code. ``generator_parameters`` defines optional extra metadata which will be stored as ``generator_parameters`` in the ``remap`` section of the ``.import`` file, for example to store a md5 hash of the source data. +This function can only be called during the :ref:`_import` callback and it allows manually importing resources from it. This is useful when the imported file generates external resources that require importing (as example, images). Custom parameters for the ".import" file can be passed via the ``custom_options``. Additionally, in cases where multiple importers can handle a file, the ``custom_importer`` can be specified to force a specific one. This function performs a resource import and returns immediately with a success or error code. ``generator_parameters`` defines optional extra metadata which will be stored as ``generator_parameters`` in the ``remap`` section of the ``.import`` file, for example to store a md5 hash of the source data. .. |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_editorinspector.rst b/classes/class_editorinspector.rst index 66c9121f130..a3d9f0fbe17 100644 --- a/classes/class_editorinspector.rst +++ b/classes/class_editorinspector.rst @@ -39,6 +39,8 @@ Properties .. table:: :widths: auto + +----------------------------------------------------+------------------------+-------------------------------------------------------------------------------------------------+ + | :ref:`bool` | follow_focus | ``true`` (overrides :ref:`ScrollContainer`) | +----------------------------------------------------+------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`ScrollMode` | horizontal_scroll_mode | ``0`` (overrides :ref:`ScrollContainer`) | +----------------------------------------------------+------------------------+-------------------------------------------------------------------------------------------------+ diff --git a/classes/class_editorinterface.rst b/classes/class_editorinterface.rst index 9b9d5d2618c..9f57b172f9a 100644 --- a/classes/class_editorinterface.rst +++ b/classes/class_editorinterface.rst @@ -59,109 +59,113 @@ 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:`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:`popup_quick_open`\ (\ callback\: :ref:`Callable`, base_types\: :ref:`Array`\[:ref:`StringName`\] = []\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |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 @@ -395,6 +399,18 @@ Returns the editor's :ref:`Theme`. ---- +.. _class_EditorInterface_method_get_editor_undo_redo: + +.. rst-class:: classref-method + +:ref:`EditorUndoRedoManager` **get_editor_undo_redo**\ (\ ) |const| :ref:`🔗` + +Returns the editor's :ref:`EditorUndoRedoManager`. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorInterface_method_get_editor_viewport_2d: .. rst-class:: classref-method @@ -719,11 +735,11 @@ 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:**\ +\ **Example:** Display the node selection dialog as soon as this node is added to the tree for the first time: :: @@ -745,11 +761,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:`🔗` - -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. +|void| **popup_property_selector**\ (\ object\: :ref:`Object`, callback\: :ref:`Callable`, type_filter\: :ref:`PackedInt32Array` = PackedInt32Array(), current_value\: :ref:`String` = ""\ ) :ref:`🔗` -\ **Example:**\ +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. :: @@ -767,6 +781,18 @@ Pops up an editor dialog for selecting properties from ``object``. The ``callbac ---- +.. _class_EditorInterface_method_popup_quick_open: + +.. rst-class:: classref-method + +|void| **popup_quick_open**\ (\ callback\: :ref:`Callable`, base_types\: :ref:`Array`\[:ref:`StringName`\] = []\ ) :ref:`🔗` + +Pops up an editor dialog for quick selecting a resource file. The ``callback`` must take a single argument of type :ref:`String` which will contain the path of the selected resource or be empty if the dialog is canceled. If ``base_types`` is provided, the dialog will only show resources that match these types. Only types deriving from :ref:`Resource` are supported. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorInterface_method_reload_scene_from_path: .. rst-class:: classref-method diff --git a/classes/class_editorplugin.rst b/classes/class_editorplugin.rst index 3d6fc41e45b..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`\ ) | @@ -99,6 +101,8 @@ Methods +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`add_debugger_plugin`\ (\ script\: :ref:`EditorDebuggerPlugin`\ ) | +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_export_platform`\ (\ platform\: :ref:`EditorExportPlatform`\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`add_export_plugin`\ (\ plugin\: :ref:`EditorExportPlugin`\ ) | +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`add_import_plugin`\ (\ importer\: :ref:`EditorImportPlugin`, first_priority\: :ref:`bool` = false\ ) | @@ -139,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`\ ) | @@ -149,6 +155,8 @@ Methods +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`remove_debugger_plugin`\ (\ script\: :ref:`EditorDebuggerPlugin`\ ) | +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_export_platform`\ (\ platform\: :ref:`EditorExportPlatform`\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`remove_export_plugin`\ (\ plugin\: :ref:`EditorExportPlugin`\ ) | +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`remove_import_plugin`\ (\ importer\: :ref:`EditorImportPlugin`\ ) | @@ -586,7 +594,7 @@ Called by the engine when the 3D editor's viewport is updated. Use the ``overlay func _forward_3d_draw_over_viewport(overlay): # Draw a circle at cursor position. - overlay.draw_circle(overlay.get_local_mouse_position(), 64) + overlay.draw_circle(overlay.get_local_mouse_position(), 64, Color.WHITE) func _forward_3d_gui_input(camera, event): if event is InputEventMouseMotion: @@ -642,8 +650,6 @@ You need to enable calling of this method by using :ref:`set_force_draw_over_for Called when there is a root node in the current edited scene, :ref:`_handles` is implemented, and an :ref:`InputEvent` happens in the 3D viewport. The return value decides whether the :ref:`InputEvent` is consumed or forwarded to other **EditorPlugin**\ s. See :ref:`AfterGUIInput` for options. -\ **Example:**\ - .. tabs:: @@ -663,9 +669,7 @@ Called when there is a root node in the current edited scene, :ref:`_handles` to other Editor classes. - -\ **Example:**\ +This method must return :ref:`AFTER_GUI_INPUT_PASS` in order to forward the :ref:`InputEvent` to other Editor classes. .. tabs:: @@ -759,9 +763,7 @@ You need to enable calling of this method by using :ref:`set_force_draw_over_for :ref:`bool` **_forward_canvas_gui_input**\ (\ event\: :ref:`InputEvent`\ ) |virtual| :ref:`🔗` -Called when there is a root node in the current edited scene, :ref:`_handles` is implemented and an :ref:`InputEvent` happens in the 2D viewport. Intercepts the :ref:`InputEvent`, if ``return true`` **EditorPlugin** consumes the ``event``, otherwise forwards ``event`` to other Editor classes. - -\ **Example:**\ +Called when there is a root node in the current edited scene, :ref:`_handles` is implemented, and an :ref:`InputEvent` happens in the 2D viewport. If this method returns ``true``, ``event`` is intercepted by this **EditorPlugin**, otherwise ``event`` is forwarded to other Editor classes. .. tabs:: @@ -782,9 +784,7 @@ Called when there is a root node in the current edited scene, :ref:`_handles` to other Editor classes. - -\ **Example:**\ +This method must return ``false`` in order to forward the :ref:`InputEvent` to other Editor classes. .. tabs:: @@ -1089,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 @@ -1171,6 +1185,18 @@ Adds a :ref:`Script` as debugger plugin to the Debugger. The scrip ---- +.. _class_EditorPlugin_method_add_export_platform: + +.. rst-class:: classref-method + +|void| **add_export_platform**\ (\ platform\: :ref:`EditorExportPlatform`\ ) :ref:`🔗` + +Registers a new :ref:`EditorExportPlatform`. Export platforms provides functionality of exporting to the specific platform. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorPlugin_method_add_export_plugin: .. rst-class:: classref-method @@ -1453,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 @@ -1513,6 +1551,18 @@ Removes the debugger plugin with given script from the Debugger. ---- +.. _class_EditorPlugin_method_remove_export_platform: + +.. rst-class:: classref-method + +|void| **remove_export_platform**\ (\ platform\: :ref:`EditorExportPlatform`\ ) :ref:`🔗` + +Removes an export platform registered by :ref:`add_export_platform`. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorPlugin_method_remove_export_plugin: .. rst-class:: classref-method @@ -1543,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 7f5acd3e040..7d2bf6e55c7 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` | @@ -111,6 +121,8 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`editors/2d/viewport_border_color` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`editors/2d/zoom_speed_factor` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`editors/3d/default_fov` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`editors/3d/default_z_far` | @@ -143,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` | @@ -153,13 +169,17 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`editors/3d/navigation/navigation_scheme` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`editors/3d/navigation/orbit_modifier` | + | :ref:`int` | :ref:`editors/3d/navigation/orbit_mouse_button` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/3d/navigation/pan_mouse_button` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`editors/3d/navigation/pan_modifier` | + | :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_modifier` | + | :ref:`int` | :ref:`editors/3d/navigation/zoom_mouse_button` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`editors/3d/navigation/zoom_style` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -181,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` | @@ -197,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` | @@ -271,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` | @@ -293,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` | @@ -305,6 +391,10 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`filesystem/on_save/safe_save_on_backup_then_rename` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`filesystem/quick_open_dialog/default_display_mode` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`filesystem/quick_open_dialog/include_addons` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`filesystem/tools/oidn/oidn_denoise_path` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`input/buffering/agile_event_flushing` | @@ -337,6 +427,8 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`interface/editor/expand_to_title` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/editor/font_allow_msdf` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`interface/editor/font_antialiasing` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`interface/editor/font_disable_embedded_bitmaps` | @@ -347,6 +439,8 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`interface/editor/import_resources_when_unfocused` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/editor/keep_screen_on` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`interface/editor/localize_settings` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`interface/editor/low_processor_mode_sleep_usec` | @@ -385,6 +479,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` | @@ -507,6 +605,8 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`run/window_placement/android_window` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`run/window_placement/play_window_pip_mode` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`run/window_placement/rect` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`run/window_placement/rect_custom_position` | @@ -553,18 +653,24 @@ 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` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`text_editor/behavior/files/trim_trailing_whitespace_on_save` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/behavior/general/empty_selection_clipboard` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`text_editor/behavior/indent/auto_indent` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`text_editor/behavior/indent/indent_wrapped_lines` | @@ -615,6 +721,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` | @@ -625,10 +737,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` | @@ -707,6 +831,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 @@ -793,6 +925,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 @@ -801,6 +945,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 ---- @@ -843,6 +989,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 @@ -881,13 +1039,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 @@ -929,6 +1099,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 @@ -1095,7 +1289,7 @@ The color to use when drawing smart snapping lines in the 2D editor. The smart s :ref:`bool` **editors/2d/use_integer_zoom_by_default** :ref:`🔗` -If ``true``, the 2D editor will snap to integer zoom values while not holding the :kbd:`Alt` key and powers of two while holding it. If ``false``, this behavior is swapped. +If ``true``, the 2D editor will snap to integer zoom values when not holding the :kbd:`Alt` key. If ``false``, this behavior is swapped. .. rst-class:: classref-item-separator @@ -1113,6 +1307,18 @@ The color of the viewport border in the 2D editor. This border represents the vi ---- +.. _class_EditorSettings_property_editors/2d/zoom_speed_factor: + +.. rst-class:: classref-property + +:ref:`float` **editors/2d/zoom_speed_factor** :ref:`🔗` + +The factor to use when zooming in or out in the 2D editor. For example, ``1.1`` will zoom in by 10% with every step. If set to ``2.0``, zooming will only cycle through powers of two. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_editors/3d/default_fov: .. rst-class:: classref-property @@ -1289,7 +1495,7 @@ The grid size in units. Higher values prevent the grid from appearing "cut off" :ref:`bool` **editors/3d/grid_xy_plane** :ref:`🔗` -If ``true``, render the grid on an XY plane. This can be useful for 3D side-scrolling games. +If ``true``, renders the grid on the XY plane in perspective view. This can be useful for 3D side-scrolling games. .. rst-class:: classref-item-separator @@ -1301,7 +1507,7 @@ If ``true``, render the grid on an XY plane. This can be useful for 3D side-scro :ref:`bool` **editors/3d/grid_xz_plane** :ref:`🔗` -If ``true``, render the grid on an XZ plane. +If ``true``, renders the grid on the XZ plane in perspective view. .. rst-class:: classref-item-separator @@ -1313,7 +1519,31 @@ If ``true``, render the grid on an XZ plane. :ref:`bool` **editors/3d/grid_yz_plane** :ref:`🔗` -If ``true``, render the grid on a YZ plane. This can be useful for 3D side-scrolling games. +If ``true``, renders the grid on the YZ plane in perspective view. This can be useful for 3D side-scrolling games. + +.. rst-class:: classref-item-separator + +---- + +.. _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 @@ -1329,8 +1559,6 @@ If ``true``, enables 3-button mouse emulation mode. This is useful on laptops wh When 3-button mouse emulation mode is enabled, the pan, zoom and orbit modifiers can always be used in the 3D editor viewport, even when not holding down any mouse button. -\ **Note:** No matter the orbit modifier configured in :ref:`editors/3d/navigation/orbit_modifier`, :kbd:`Alt` will always remain usable for orbiting in this mode to improve usability with graphics tablets. - .. rst-class:: classref-item-separator ---- @@ -1377,15 +1605,17 @@ If ``true``, invert the vertical mouse axis when panning, orbiting, or using fre :ref:`int` **editors/3d/navigation/navigation_scheme** :ref:`🔗` -The navigation scheme to use in the 3D editor. Changing this setting will affect the mouse buttons that must be held down to perform certain operations in the 3D editor viewport. +The navigation scheme preset to use in the 3D editor. Changing this setting will affect the mouse button and modifier controls used to navigate the 3D editor viewport. + +All schemes can use :kbd:`Mouse wheel` to zoom. -- **Godot** Middle mouse button to orbit, :kbd:`Shift + Middle mouse button` to pan. :kbd:`Mouse wheel` to zoom. +- **Godot:** :kbd:`Middle mouse button` to orbit. :kbd:`Shift + Middle mouse button` to pan. :kbd:`Ctrl + Shift + Middle mouse button` to zoom. -- **Maya:** :kbd:`Alt + Left mouse button` to orbit. :kbd:`Middle mouse button` to pan, :kbd:`Shift + Middle mouse button` to pan 10 times faster. :kbd:`Mouse wheel` to zoom. +- **Maya:** :kbd:`Alt + Left mouse button` to orbit. :kbd:`Middle mouse button` to pan, :kbd:`Shift + Middle mouse button` to pan 10 times faster. :kbd:`Alt + Right mouse button` to zoom. - **Modo:** :kbd:`Alt + Left mouse button` to orbit. :kbd:`Alt + Shift + Left mouse button` to pan. :kbd:`Ctrl + Alt + Left mouse button` to zoom. -See also :ref:`editors/3d/freelook/freelook_navigation_scheme`. +See also :ref:`editors/3d/navigation/orbit_mouse_button`, :ref:`editors/3d/navigation/pan_mouse_button`, :ref:`editors/3d/navigation/zoom_mouse_button`, and :ref:`editors/3d/freelook/freelook_navigation_scheme`. \ **Note:** On certain window managers on Linux, the :kbd:`Alt` key will be intercepted by the window manager when clicking a mouse button at the same time. This means Godot will not see the modifier key as being pressed. @@ -1393,31 +1623,49 @@ See also :ref:`editors/3d/freelook/freelook_navigation_scheme` **editors/3d/navigation/orbit_modifier** :ref:`🔗` +:ref:`int` **editors/3d/navigation/orbit_mouse_button** :ref:`🔗` -The modifier key that must be held to orbit in the 3D editor. +The mouse button that needs to be held down to orbit in the 3D editor viewport. -\ **Note:** If :ref:`editors/3d/navigation/emulate_3_button_mouse` is ``true``, :kbd:`Alt` will always remain usable for orbiting to improve usability with graphics tablets. +.. rst-class:: classref-item-separator -\ **Note:** On certain window managers on Linux, the :kbd:`Alt` key will be intercepted by the window manager when clicking a mouse button at the same time. This means Godot will not see the modifier key as being pressed. +---- + +.. _class_EditorSettings_property_editors/3d/navigation/pan_mouse_button: + +.. rst-class:: classref-property + +:ref:`int` **editors/3d/navigation/pan_mouse_button** :ref:`🔗` + +The mouse button that needs to be held down to pan in the 3D editor viewport. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_editors/3d/navigation/pan_modifier: +.. _class_EditorSettings_property_editors/3d/navigation/show_viewport_navigation_gizmo: .. rst-class:: classref-property -:ref:`int` **editors/3d/navigation/pan_modifier** :ref:`🔗` +:ref:`bool` **editors/3d/navigation/show_viewport_navigation_gizmo** :ref:`🔗` -The modifier key that must be held to pan in the 3D editor. +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. -\ **Note:** On certain window managers on Linux, the :kbd:`Alt` key will be intercepted by the window manager when clicking a mouse button at the same time. This means Godot will not see the modifier key as being pressed. +.. 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 @@ -1435,15 +1683,13 @@ If ``true``, warps the mouse around the 3D viewport while panning in the 3D edit ---- -.. _class_EditorSettings_property_editors/3d/navigation/zoom_modifier: +.. _class_EditorSettings_property_editors/3d/navigation/zoom_mouse_button: .. rst-class:: classref-property -:ref:`int` **editors/3d/navigation/zoom_modifier** :ref:`🔗` - -The modifier key that must be held to zoom in the 3D editor. +:ref:`int` **editors/3d/navigation/zoom_mouse_button** :ref:`🔗` -\ **Note:** On certain window managers on Linux, the :kbd:`Alt` key will be intercepted by the window manager when clicking a mouse button at the same time. This means Godot will not see the modifier key as being pressed. +The mouse button that needs to be held down to zoom in the 3D editor viewport. .. rst-class:: classref-item-separator @@ -1569,6 +1815,54 @@ The color to use for the AABB gizmo that displays the :ref:`GeometryInstance3D` **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 @@ -1593,6 +1887,222 @@ The 3D editor gizmo color for :ref:`Joint3D`\ s and :ref:`Physica ---- +.. _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 @@ -1667,6 +2177,86 @@ The modulate color to use for "past" frames displayed in the animation editor's ---- +.. _class_EditorSettings_property_editors/bone_mapper/handle_colors/error: + +.. rst-class:: classref-property + +:ref:`Color` **editors/bone_mapper/handle_colors/error** :ref:`🔗` + +.. 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/bone_mapper/handle_colors/missing: + +.. rst-class:: classref-property + +:ref:`Color` **editors/bone_mapper/handle_colors/missing** :ref:`🔗` + +.. 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/bone_mapper/handle_colors/set: + +.. rst-class:: classref-property + +:ref:`Color` **editors/bone_mapper/handle_colors/set** :ref:`🔗` + +.. 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/bone_mapper/handle_colors/unset: + +.. rst-class:: classref-property + +:ref:`Color` **editors/bone_mapper/handle_colors/unset** :ref:`🔗` + +.. 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/grid_map/editor_side: + +.. rst-class:: classref-property + +:ref:`int` **editors/grid_map/editor_side** :ref:`🔗` + +Specifies the side of 3D editor's viewport where GridMap's mesh palette will appear. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_editors/grid_map/palette_min_width: + +.. rst-class:: classref-property + +:ref:`int` **editors/grid_map/palette_min_width** :ref:`🔗` + +Minimum width of GridMap's mesh palette side panel. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_editors/grid_map/pick_distance: .. rst-class:: classref-property @@ -1679,6 +2269,18 @@ The maximum distance at which tiles can be placed on a GridMap, relative to the ---- +.. _class_EditorSettings_property_editors/grid_map/preview_size: + +.. rst-class:: classref-property + +:ref:`int` **editors/grid_map/preview_size** :ref:`🔗` + +Texture size of mesh previews generated for GridMap's MeshLibrary. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_editors/panning/2d_editor_pan_speed: .. rst-class:: classref-property @@ -2113,6 +2715,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 @@ -2269,6 +2897,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 @@ -2351,6 +3003,30 @@ If ``true``, when saving a file, the editor will rename the old file to a differ ---- +.. _class_EditorSettings_property_filesystem/quick_open_dialog/default_display_mode: + +.. rst-class:: classref-property + +:ref:`int` **filesystem/quick_open_dialog/default_display_mode** :ref:`🔗` + +If set to ``Adaptive``, the dialog opens in list view or grid view depending on the requested type. If set to ``Last Used``, the display mode will always open the way you last used it. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_filesystem/quick_open_dialog/include_addons: + +.. rst-class:: classref-property + +:ref:`bool` **filesystem/quick_open_dialog/include_addons** :ref:`🔗` + +If ``true``, results will include files located in the ``addons`` folder. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_filesystem/tools/oidn/oidn_denoise_path: .. rst-class:: classref-property @@ -2555,7 +3231,7 @@ Translations are provided by the community. If you spot a mistake, :doc:`contrib :ref:`int` **interface/editor/editor_screen** :ref:`🔗` -The preferred monitor to display the editor. +The preferred monitor to display the editor. If **Auto**, the editor will remember the last screen it was displayed on across restarts. .. rst-class:: classref-item-separator @@ -2575,6 +3251,18 @@ Specific to the macOS platform. ---- +.. _class_EditorSettings_property_interface/editor/font_allow_msdf: + +.. rst-class:: classref-property + +:ref:`bool` **interface/editor/font_allow_msdf** :ref:`🔗` + +If set to ``true``, MSDF font rendering will be used for the visual shader graph editor. You may need to set this to ``false`` when using a custom main font, as some fonts will look broken due to the use of self-intersecting outlines in their font data. Downloading the font from the font maker's official website as opposed to a service like Google Fonts can help resolve this issue. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_interface/editor/font_antialiasing: .. rst-class:: classref-property @@ -2643,6 +3331,18 @@ If ``true``, (re)imports resources even if the editor window is unfocused or min ---- +.. _class_EditorSettings_property_interface/editor/keep_screen_on: + +.. rst-class:: classref-property + +:ref:`bool` **interface/editor/keep_screen_on** :ref:`🔗` + +If ``true``, keeps the screen on (even in case of inactivity), so the screensaver does not take over. Works on desktop and mobile platforms. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_interface/editor/localize_settings: .. rst-class:: classref-property @@ -2795,6 +3495,8 @@ The default **Auto** value will only enable this if the editor was compiled with \ **Note:** If :ref:`interface/editor/update_continuously` is ``true``, the spinner icon displays in red. +\ **Note:** If the editor was started with the ``--debug-canvas-item-redraw`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>`, the update spinner will *never* display regardless of this setting's value. This is to avoid confusion with what would cause redrawing in real world scenarios. + .. rst-class:: classref-item-separator ---- @@ -2805,7 +3507,9 @@ The default **Auto** value will only enable this if the editor was compiled with :ref:`bool` **interface/editor/single_window_mode** :ref:`🔗` -If ``true``, embed modal windows such as docks inside the main editor window. When single-window mode is enabled, tooltips will also be embedded inside the main editor window, which means they can't be displayed outside of the editor window. +If ``true``, embed modal windows such as docks inside the main editor window. When single-window mode is enabled, tooltips will also be embedded inside the main editor window, which means they can't be displayed outside of the editor window. Single-window mode can be faster as it does not need to create a separate window for every popup and tooltip, which can be a slow operation depending on the operating system and rendering method in use. + +This is equivalent to :ref:`ProjectSettings.display/window/subwindows/embed_subwindows` in the running project, except the setting's value is inverted. \ **Note:** To query whether the editor can use multiple windows in an editor plugin, use :ref:`EditorInterface.is_multi_window_enabled` instead of querying the value of this editor setting. @@ -2895,6 +3599,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 @@ -2971,7 +3699,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 @@ -3681,7 +4409,35 @@ If ``true``, on Linux/BSD, the editor will check for Wayland first instead of X1 :ref:`int` **run/window_placement/android_window** :ref:`🔗` -The Android window to display the project on when starting the project from the editor. +Specifies how the Play window is launched relative to the Android editor. + +- **Auto (based on screen size)** (default) will automatically choose how to launch the Play window based on the device and screen metrics. Defaults to **Same as Editor** on phones and **Side-by-side with Editor** on tablets. + +- **Same as Editor** will launch the Play window in the same window as the 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 + +---- + +.. _class_EditorSettings_property_run/window_placement/play_window_pip_mode: + +.. rst-class:: classref-property + +:ref:`int` **run/window_placement/play_window_pip_mode** :ref:`🔗` + +Specifies the picture-in-picture (PiP) mode for the Play window. + +- **Disabled:** PiP is disabled for the Play window. + +- **Enabled:** If the device supports it, PiP is always enabled for the Play window. The Play window will contain a button to enter PiP mode. + +- **Enabled when Play window is same as Editor** (default for Android editor): If the device supports it, PiP is enabled when the Play window is the same as the Editor. The Play window will contain a button to enter PiP mode. \ **Note:** Only available in the Android editor. @@ -3965,6 +4721,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 @@ -4001,6 +4769,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 @@ -4037,6 +4817,18 @@ If ``true``, trims trailing whitespace when saving a script. Trailing whitespace ---- +.. _class_EditorSettings_property_text_editor/behavior/general/empty_selection_clipboard: + +.. rst-class:: classref-property + +:ref:`bool` **text_editor/behavior/general/empty_selection_clipboard** :ref:`🔗` + +If ``true``, copying or cutting without a selection is performed on all lines with a caret. Otherwise, copy and cut require a selection. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_text_editor/behavior/indent/auto_indent: .. rst-class:: classref-property @@ -4153,7 +4945,7 @@ If ``true``, allows scrolling past the end of the file. :ref:`bool` **text_editor/behavior/navigation/smooth_scrolling** :ref:`🔗` -If ``true``, allows scrolling in sub-line intervals and enables a smooth scrolling animation when using the mouse wheel to scroll. +If ``true``, enables a smooth scrolling animation when using the mouse wheel to scroll. See :ref:`text_editor/behavior/navigation/v_scroll_speed` for the speed of this animation. \ **Note:** :ref:`text_editor/behavior/navigation/smooth_scrolling` currently behaves poorly in projects where :ref:`ProjectSettings.physics/common/physics_ticks_per_second` has been increased significantly from its default value (``60``). In this case, it is recommended to disable this setting. @@ -4203,7 +4995,7 @@ If ``true``, uses the characters in ```!"#$%&'()*+,-./:;<=>?@[\]^`{|}~``, the Un :ref:`int` **text_editor/behavior/navigation/v_scroll_speed** :ref:`🔗` -The number of pixels to scroll with every mouse wheel increment. Higher values make the script scroll by faster when using the mouse wheel. +The speed of scrolling in lines per second when :ref:`text_editor/behavior/navigation/smooth_scrolling` is ``true``. Higher values make the script scroll by faster when using the mouse wheel. \ **Note:** You can hold down :kbd:`Alt` while using the mouse wheel to temporarily scroll 5 times faster. @@ -4343,6 +5135,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 @@ -4403,6 +5231,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 @@ -4429,6 +5317,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 @@ -4907,6 +5807,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 ---- @@ -4930,8 +5878,6 @@ Adds a custom property info to a property. The dictionary must contain: - optionally ``hint``: :ref:`int` (see :ref:`PropertyHint`) and ``hint_string``: :ref:`String`\ -\ **Example:**\ - .. tabs:: diff --git a/classes/class_editorspinslider.rst b/classes/class_editorspinslider.rst index 1906c45136a..0699cf88e13 100644 --- a/classes/class_editorspinslider.rst +++ b/classes/class_editorspinslider.rst @@ -49,6 +49,20 @@ Properties | :ref:`String` | :ref:`suffix` | ``""`` | +--------------------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+ +.. rst-class:: classref-reftable-group + +Theme Properties +---------------- + +.. table:: + :widths: auto + + +-----------------------------------+---------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`updown` | + +-----------------------------------+---------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`updown_disabled` | + +-----------------------------------+---------------------------------------------------------------------------+ + .. rst-class:: classref-section-separator ---- @@ -192,6 +206,35 @@ If ``true``, the slider can't be interacted with. The suffix to display after the value (in a faded color). This should generally be a plural word. You may have to use an abbreviation if the suffix is too long to be displayed. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Theme Property Descriptions +--------------------------- + +.. _class_EditorSpinSlider_theme_icon_updown: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **updown** :ref:`🔗` + +Single texture representing both the up and down buttons. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSpinSlider_theme_icon_updown_disabled: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **updown_disabled** :ref:`🔗` + +Single texture representing both the up and down buttons, when the control is readonly or disabled. + .. |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_editorsyntaxhighlighter.rst b/classes/class_editorsyntaxhighlighter.rst index 27f6bc9de21..0fc9fb80429 100644 --- a/classes/class_editorsyntaxhighlighter.rst +++ b/classes/class_editorsyntaxhighlighter.rst @@ -12,6 +12,8 @@ EditorSyntaxHighlighter **Inherits:** :ref:`SyntaxHighlighter` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**Inherited By:** :ref:`GDScriptSyntaxHighlighter` + Base class for :ref:`SyntaxHighlighter` used by the :ref:`ScriptEditor`. .. rst-class:: classref-introduction-group diff --git a/classes/class_editorundoredomanager.rst b/classes/class_editorundoredomanager.rst index 19b1042bf1e..5e0b31c8c78 100644 --- a/classes/class_editorundoredomanager.rst +++ b/classes/class_editorundoredomanager.rst @@ -56,6 +56,8 @@ Methods +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`add_undo_reference`\ (\ object\: :ref:`Object`\ ) | +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_history`\ (\ id\: :ref:`int` = -99, increase_version\: :ref:`bool` = true\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`commit_action`\ (\ execute\: :ref:`bool` = true\ ) | +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`create_action`\ (\ name\: :ref:`String`, merge_mode\: :ref:`MergeMode` = 0, custom_context\: :ref:`Object` = null, backward_undo_ops\: :ref:`bool` = false\ ) | @@ -226,6 +228,28 @@ Register a reference for "undo" that will be erased if the "undo" history is los ---- +.. _class_EditorUndoRedoManager_method_clear_history: + +.. rst-class:: classref-method + +|void| **clear_history**\ (\ id\: :ref:`int` = -99, increase_version\: :ref:`bool` = true\ ) :ref:`🔗` + +Clears the given undo history. You can clear history for a specific scene, global history, or for all scenes at once if ``id`` is :ref:`INVALID_HISTORY`. + +If ``increase_version`` is ``true``, the undo history version will be increased, marking it as unsaved. Useful for operations that modify the scene, but don't support undo. + +:: + + var scene_root = EditorInterface.get_edited_scene_root() + var undo_redo = EditorInterface.get_editor_undo_redo() + undo_redo.clear_history(undo_redo.get_object_history_id(scene_root)) + +\ **Note:** If you want to mark an edited scene as unsaved without clearing its history, use :ref:`EditorInterface.mark_scene_as_unsaved` instead. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorUndoRedoManager_method_commit_action: .. rst-class:: classref-method diff --git a/classes/class_enetpacketpeer.rst b/classes/class_enetpacketpeer.rst index c0d0a0d3a63..1392cb7b3eb 100644 --- a/classes/class_enetpacketpeer.rst +++ b/classes/class_enetpacketpeer.rst @@ -43,6 +43,8 @@ Methods +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_channels`\ (\ ) |const| | +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_packet_flags`\ (\ ) |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_remote_address`\ (\ ) |const| | +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_remote_port`\ (\ ) |const| | @@ -359,6 +361,18 @@ Returns the number of channels allocated for communication with peer. ---- +.. _class_ENetPacketPeer_method_get_packet_flags: + +.. rst-class:: classref-method + +:ref:`int` **get_packet_flags**\ (\ ) |const| :ref:`🔗` + +Returns the ENet flags of the next packet in the received queue. See ``FLAG_*`` constants for available packet flags. Note that not all flags are replicated from the sending peer to the receiving peer. + +.. rst-class:: classref-item-separator + +---- + .. _class_ENetPacketPeer_method_get_remote_address: .. rst-class:: classref-method diff --git a/classes/class_engine.rst b/classes/class_engine.rst index 30d29582c76..5c315325d6c 100644 --- a/classes/class_engine.rst +++ b/classes/class_engine.rst @@ -40,6 +40,8 @@ Properties +---------------------------+---------------------------------------------------------------------------------------+----------+ | :ref:`bool` | :ref:`print_error_messages` | ``true`` | +---------------------------+---------------------------------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`print_to_stdout` | ``true`` | + +---------------------------+---------------------------------------------------------------------------------------+----------+ | :ref:`float` | :ref:`time_scale` | ``1.0`` | +---------------------------+---------------------------------------------------------------------------------------+----------+ @@ -221,6 +223,25 @@ If ``false``, stops printing error and warning messages to the console and edito ---- +.. _class_Engine_property_print_to_stdout: + +.. rst-class:: classref-property + +:ref:`bool` **print_to_stdout** = ``true`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_print_to_stdout**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_printing_to_stdout**\ (\ ) + +If ``false``, stops printing messages (for example using :ref:`@GlobalScope.print`) to the console, log files, and editor Output log. This property is equivalent to the :ref:`ProjectSettings.application/run/disable_stdout` project setting. + +\ **Note:** This does not stop printing errors or warnings produced by scripts to the console or log files, for more details see :ref:`print_error_messages`. + +.. rst-class:: classref-item-separator + +---- + .. _class_Engine_property_time_scale: .. rst-class:: classref-property 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_environment.rst b/classes/class_environment.rst index 29a36fa9bb1..63f7a9487d9 100644 --- a/classes/class_environment.rst +++ b/classes/class_environment.rst @@ -433,7 +433,7 @@ Linear tonemapper operator. Reads the linear data and passes it on unmodified. T :ref:`ToneMapper` **TONE_MAPPER_REINHARDT** = ``1`` -Reinhardt tonemapper operator. Performs a variation on rendered pixels' colors by this formula: ``color = color / (1 + color)``. This avoids clipping bright highlights, but the resulting image can look a bit dull. +Reinhard tonemapper operator. Performs a variation on rendered pixels' colors by this formula: ``color = color * (1 + color / (white * white)) / (1 + color)``. This avoids clipping bright highlights, but the resulting image can look a bit dull. When :ref:`tonemap_white` is left at the default value of ``1.0`` this is identical to :ref:`TONE_MAPPER_LINEAR` while also being slightly less performant. .. _class_Environment_constant_TONE_MAPPER_FILMIC: @@ -840,10 +840,12 @@ The background mode. See :ref:`BGMode` for possible val - |void| **set_fog_aerial_perspective**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_fog_aerial_perspective**\ (\ ) -If set above ``0.0`` (exclusive), blends between the fog's color and the color of the background :ref:`Sky`. This has a small performance cost when set above ``0.0``. Must have :ref:`background_mode` set to :ref:`BG_SKY`. +If set above ``0.0`` (exclusive), blends between the fog's color and the color of the background :ref:`Sky`, as read from the radiance cubemap. This has a small performance cost when set above ``0.0``. Must have :ref:`background_mode` set to :ref:`BG_SKY`. This is useful to simulate `aerial perspective `__ in large scenes with low density fog. However, it is not very useful for high-density fog, as the sky will shine through. When set to ``1.0``, the fog color comes completely from the :ref:`Sky`. If set to ``0.0``, aerial perspective is disabled. +Notice that this does not sample the :ref:`Sky` directly, but rather the radiance cubemap. The cubemap is sampled at a mipmap level depending on the depth of the rendered pixel; the farther away, the higher the resolution of the sampled mipmap. This results in the actual color being a blurred version of the sky, with more blur closer to the camera. The highest mipmap resolution is used at a depth of :ref:`Camera3D.far`. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_externaltexture.rst b/classes/class_externaltexture.rst new file mode 100644 index 00000000000..e9625e94f58 --- /dev/null +++ b/classes/class_externaltexture.rst @@ -0,0 +1,118 @@ +: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/ExternalTexture.xml. + +.. _class_ExternalTexture: + +ExternalTexture +=============== + +**Inherits:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +Texture which displays the content of an external buffer. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Displays the content of an external buffer provided by the platform. + +Requires the `OES_EGL_image_external `__ extension (OpenGL) or `VK_ANDROID_external_memory_android_hardware_buffer `__ extension (Vulkan). + +\ **Note:** This is currently only supported in Android builds. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-------------------------------+--------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`bool` | resource_local_to_scene | ``false`` (overrides :ref:`Resource`) | + +-------------------------------+--------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`size` | ``Vector2(256, 256)`` | + +-------------------------------+--------------------------------------------------+----------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-----------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_external_texture_id`\ (\ ) |const| | + +-----------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_external_buffer_id`\ (\ external_buffer_id\: :ref:`int`\ ) | + +-----------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_ExternalTexture_property_size: + +.. rst-class:: classref-property + +:ref:`Vector2` **size** = ``Vector2(256, 256)`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_size**\ (\ value\: :ref:`Vector2`\ ) +- :ref:`Vector2` **get_size**\ (\ ) + +External texture size. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_ExternalTexture_method_get_external_texture_id: + +.. rst-class:: classref-method + +:ref:`int` **get_external_texture_id**\ (\ ) |const| :ref:`🔗` + +Returns the external texture ID. + +Depending on your use case, you may need to pass this to platform APIs, for example, when creating an ``android.graphics.SurfaceTexture`` on Android. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ExternalTexture_method_set_external_buffer_id: + +.. rst-class:: classref-method + +|void| **set_external_buffer_id**\ (\ external_buffer_id\: :ref:`int`\ ) :ref:`🔗` + +Sets the external buffer ID. + +Depending on your use case, you may need to call this with data received from a platform API, for example, ``SurfaceTexture.getHardwareBuffer()`` on Android. + +.. |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_fastnoiselite.rst b/classes/class_fastnoiselite.rst index 130ca392e4e..e7281aea36f 100644 --- a/classes/class_fastnoiselite.rst +++ b/classes/class_fastnoiselite.rst @@ -130,7 +130,7 @@ Cellular includes both Worley noise and Voronoi diagrams which creates various r :ref:`NoiseType` **TYPE_SIMPLEX** = ``0`` -As opposed to :ref:`TYPE_PERLIN`, gradients exist in a simplex lattice rather than a grid lattice, avoiding directional artifacts. +As opposed to :ref:`TYPE_PERLIN`, gradients exist in a simplex lattice rather than a grid lattice, avoiding directional artifacts. Internally uses FastNoiseLite's OpenSimplex2 noise type. .. _class_FastNoiseLite_constant_TYPE_SIMPLEX_SMOOTH: @@ -138,7 +138,7 @@ As opposed to :ref:`TYPE_PERLIN`, grad :ref:`NoiseType` **TYPE_SIMPLEX_SMOOTH** = ``1`` -Modified, higher quality version of :ref:`TYPE_SIMPLEX`, but slower. +Modified, higher quality version of :ref:`TYPE_SIMPLEX`, but slower. Internally uses FastNoiseLite's OpenSimplex2S noise type. .. rst-class:: classref-item-separator diff --git a/classes/class_fileaccess.rst b/classes/class_fileaccess.rst index 73a099ac549..40dc2c1bee5 100644 --- a/classes/class_fileaccess.rst +++ b/classes/class_fileaccess.rst @@ -1185,7 +1185,7 @@ Stores a floating-point number as 32 bits in the file. |void| **store_line**\ (\ line\: :ref:`String`\ ) :ref:`🔗` -Appends ``line`` to the file followed by a line return character (``\n``), encoding the text as UTF-8. +Stores ``line`` in the file followed by a newline character (``\n``), encoding the text as UTF-8. .. rst-class:: classref-item-separator @@ -1223,7 +1223,7 @@ Stores a floating-point number in the file. |void| **store_string**\ (\ string\: :ref:`String`\ ) :ref:`🔗` -Appends ``string`` to the file without a line return, encoding the text as UTF-8. +Stores ``string`` in the file without a newline character (``\n``), encoding the text as UTF-8. \ **Note:** This method is intended to be used to write text files. The string is stored as a UTF-8 encoded buffer without string length or terminating zero, which means that it can't be loaded back easily. If you want to store a retrievable string in a binary file, consider using :ref:`store_pascal_string` instead. For retrieving strings from a text file, you can use ``get_buffer(length).get_string_from_utf8()`` (if you know the length) or :ref:`get_as_text`. diff --git a/classes/class_filedialog.rst b/classes/class_filedialog.rst index 29bc9d9638e..b5c7225d626 100644 --- a/classes/class_filedialog.rst +++ b/classes/class_filedialog.rst @@ -42,6 +42,8 @@ Properties +---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ | :ref:`FileMode` | :ref:`file_mode` | ``4`` | +---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`filename_filter` | ``""`` | + +---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`filters` | ``PackedStringArray()`` | +---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`mode_overrides_title` | ``true`` | @@ -52,6 +54,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`` | @@ -70,6 +74,8 @@ Methods +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`add_option`\ (\ name\: :ref:`String`, values\: :ref:`PackedStringArray`, default_value_index\: :ref:`int`\ ) | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_filename_filter`\ (\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`clear_filters`\ (\ ) | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`deselect_all`\ (\ ) | @@ -103,29 +109,31 @@ Theme Properties .. table:: :widths: auto - +-----------------------------------+------------------------------------------------------------------------------+--------------------------+ - | :ref:`Color` | :ref:`file_disabled_color` | ``Color(1, 1, 1, 0.25)`` | - +-----------------------------------+------------------------------------------------------------------------------+--------------------------+ - | :ref:`Color` | :ref:`file_icon_color` | ``Color(1, 1, 1, 1)`` | - +-----------------------------------+------------------------------------------------------------------------------+--------------------------+ - | :ref:`Color` | :ref:`folder_icon_color` | ``Color(1, 1, 1, 1)`` | - +-----------------------------------+------------------------------------------------------------------------------+--------------------------+ - | :ref:`Texture2D` | :ref:`back_folder` | | - +-----------------------------------+------------------------------------------------------------------------------+--------------------------+ - | :ref:`Texture2D` | :ref:`create_folder` | | - +-----------------------------------+------------------------------------------------------------------------------+--------------------------+ - | :ref:`Texture2D` | :ref:`file` | | - +-----------------------------------+------------------------------------------------------------------------------+--------------------------+ - | :ref:`Texture2D` | :ref:`folder` | | - +-----------------------------------+------------------------------------------------------------------------------+--------------------------+ - | :ref:`Texture2D` | :ref:`forward_folder` | | - +-----------------------------------+------------------------------------------------------------------------------+--------------------------+ - | :ref:`Texture2D` | :ref:`parent_folder` | | - +-----------------------------------+------------------------------------------------------------------------------+--------------------------+ - | :ref:`Texture2D` | :ref:`reload` | | - +-----------------------------------+------------------------------------------------------------------------------+--------------------------+ - | :ref:`Texture2D` | :ref:`toggle_hidden` | | - +-----------------------------------+------------------------------------------------------------------------------+--------------------------+ + +-----------------------------------+-----------------------------------------------------------------------------------+--------------------------+ + | :ref:`Color` | :ref:`file_disabled_color` | ``Color(1, 1, 1, 0.25)`` | + +-----------------------------------+-----------------------------------------------------------------------------------+--------------------------+ + | :ref:`Color` | :ref:`file_icon_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+-----------------------------------------------------------------------------------+--------------------------+ + | :ref:`Color` | :ref:`folder_icon_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+-----------------------------------------------------------------------------------+--------------------------+ + | :ref:`Texture2D` | :ref:`back_folder` | | + +-----------------------------------+-----------------------------------------------------------------------------------+--------------------------+ + | :ref:`Texture2D` | :ref:`create_folder` | | + +-----------------------------------+-----------------------------------------------------------------------------------+--------------------------+ + | :ref:`Texture2D` | :ref:`file` | | + +-----------------------------------+-----------------------------------------------------------------------------------+--------------------------+ + | :ref:`Texture2D` | :ref:`folder` | | + +-----------------------------------+-----------------------------------------------------------------------------------+--------------------------+ + | :ref:`Texture2D` | :ref:`forward_folder` | | + +-----------------------------------+-----------------------------------------------------------------------------------+--------------------------+ + | :ref:`Texture2D` | :ref:`parent_folder` | | + +-----------------------------------+-----------------------------------------------------------------------------------+--------------------------+ + | :ref:`Texture2D` | :ref:`reload` | | + +-----------------------------------+-----------------------------------------------------------------------------------+--------------------------+ + | :ref:`Texture2D` | :ref:`toggle_filename_filter` | | + +-----------------------------------+-----------------------------------------------------------------------------------+--------------------------+ + | :ref:`Texture2D` | :ref:`toggle_hidden` | | + +-----------------------------------+-----------------------------------------------------------------------------------+--------------------------+ .. rst-class:: classref-section-separator @@ -160,6 +168,18 @@ Emitted when the user selects a file by double-clicking it or pressing the **OK* ---- +.. _class_FileDialog_signal_filename_filter_changed: + +.. rst-class:: classref-signal + +**filename_filter_changed**\ (\ filter\: :ref:`String`\ ) :ref:`🔗` + +Emitted when the filter for file names changes. + +.. rst-class:: classref-item-separator + +---- + .. _class_FileDialog_signal_files_selected: .. rst-class:: classref-signal @@ -279,7 +299,7 @@ Property Descriptions The file system access scope. See :ref:`Access` constants. -\ **Warning:** Currently, in sandboxed environments such as Web builds or sandboxed macOS apps, FileDialog cannot access the host file system. See `godot-proposals#1123 `__. +\ **Warning:** In Web builds, FileDialog cannot access the host file system. In sandboxed Linux and macOS environments, :ref:`use_native_dialog` is automatically used to allow limited access to host file system. .. rst-class:: classref-item-separator @@ -298,6 +318,8 @@ The file system access scope. See :ref:`Access` constant The current working directory of the file dialog. +\ **Note:** For native file dialogs, this property is only treated as a hint and may not be respected by specific OS implementations. + .. rst-class:: classref-item-separator ---- @@ -353,6 +375,25 @@ The dialog's open or save mode, which affects the selection behavior. See :ref:` ---- +.. _class_FileDialog_property_filename_filter: + +.. rst-class:: classref-property + +:ref:`String` **filename_filter** = ``""`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_filename_filter**\ (\ value\: :ref:`String`\ ) +- :ref:`String` **get_filename_filter**\ (\ ) + +The filter for file names (case-insensitive). When set to a non-empty string, only files that contains the substring will be shown. :ref:`filename_filter` can be edited by the user with the filter button at the top of the file dialog. + +See also :ref:`filters`, which should be used to restrict the file types that can be selected instead of :ref:`filename_filter` which is meant to be set by the user. + +.. rst-class:: classref-item-separator + +---- + .. _class_FileDialog_property_filters: .. rst-class:: classref-property @@ -419,6 +460,8 @@ The number of additional :ref:`OptionButton`\ s and :ref:`Ch If non-empty, the given sub-folder will be "root" of this **FileDialog**, i.e. user won't be able to go to its parent directory. +\ **Note:** This property is ignored by native file dialogs. + .. rst-class:: classref-item-separator ---- @@ -436,6 +479,8 @@ If non-empty, the given sub-folder will be "root" of this **FileDialog**, i.e. u If ``true``, the dialog will show hidden files. +\ **Note:** This property is ignored by native file dialogs on Linux. + .. rst-class:: classref-item-separator ---- @@ -451,9 +496,13 @@ If ``true``, the dialog will show hidden files. - |void| **set_use_native_dialog**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **get_use_native_dialog**\ (\ ) -If ``true``, :ref:`access` is set to :ref:`ACCESS_FILESYSTEM`, and it is supported by the current :ref:`DisplayServer`, OS native dialog will be used instead of custom one. +If ``true``, and if supported by the current :ref:`DisplayServer`, OS native dialog will be used instead of custom one. + +\ **Note:** On Linux and macOS, sandboxed apps always use native dialogs to access the host file system. -\ **Note:** On macOS, sandboxed apps always use native dialogs to access host filesystem. +\ **Note:** On macOS, sandboxed apps will save security-scoped bookmarks to retain access to the opened folders across multiple sessions. Use :ref:`OS.get_granted_permissions` to get a list of saved bookmarks. + +\ **Note:** Native dialogs are isolated from the base process, file dialog properties can't be modified once the dialog is shown. .. rst-class:: classref-section-separator @@ -494,6 +543,18 @@ Adds an additional :ref:`OptionButton` to the file dialog. I ---- +.. _class_FileDialog_method_clear_filename_filter: + +.. rst-class:: classref-method + +|void| **clear_filename_filter**\ (\ ) :ref:`🔗` + +Clear the filter for file names. + +.. rst-class:: classref-item-separator + +---- + .. _class_FileDialog_method_clear_filters: .. rst-class:: classref-method @@ -590,6 +651,8 @@ Returns the vertical box container of the dialog, custom controls can be added t \ **Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their :ref:`CanvasItem.visible` property. +\ **Note:** Changes to this node are ignored by native file dialogs, use :ref:`add_option` to add custom elements to the dialog instead. + .. rst-class:: classref-item-separator ---- @@ -602,6 +665,8 @@ Returns the vertical box container of the dialog, custom controls can be added t Invalidate and update the current dialog content list. +\ **Note:** This method does nothing on native file dialogs. + .. rst-class:: classref-item-separator ---- @@ -767,6 +832,18 @@ Custom icon for the reload button. ---- +.. _class_FileDialog_theme_icon_toggle_filename_filter: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **toggle_filename_filter** :ref:`🔗` + +Custom icon for the toggle button for the filter for file names. + +.. rst-class:: classref-item-separator + +---- + .. _class_FileDialog_theme_icon_toggle_hidden: .. rst-class:: classref-themeproperty diff --git a/classes/class_font.rst b/classes/class_font.rst index 542dcb1a58d..0db4a8e1fc2 100644 --- a/classes/class_font.rst +++ b/classes/class_font.rst @@ -501,7 +501,7 @@ To print available variation axes of a variable font: :: var fv = FontVariation.new() - fv.set_base_font = load("res://RobotoFlex.ttf") + fv.base_font = load("res://RobotoFlex.ttf") var variation_list = fv.get_supported_variation_list() for tag in variation_list: var name = TextServerManager.get_primary_interface().tag_to_name(tag) 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_fontvariation.rst b/classes/class_fontvariation.rst index ea7a927b185..bedd7004382 100644 --- a/classes/class_fontvariation.rst +++ b/classes/class_fontvariation.rst @@ -29,8 +29,8 @@ To use simulated bold font variant: .. code-tab:: gdscript var fv = FontVariation.new() - fv.set_base_font(load("res://BarlowCondensed-Regular.ttf")) - fv.set_variation_embolden(1.2) + fv.base_font = load("res://BarlowCondensed-Regular.ttf") + fv.variation_embolden = 1.2 $Label.add_theme_font_override("font", fv) $Label.add_theme_font_size_override("font_size", 64) diff --git a/classes/class_gdextensionmanager.rst b/classes/class_gdextensionmanager.rst index 406d574613b..9352a887616 100644 --- a/classes/class_gdextensionmanager.rst +++ b/classes/class_gdextensionmanager.rst @@ -63,6 +63,34 @@ Methods Signals ------- +.. _class_GDExtensionManager_signal_extension_loaded: + +.. rst-class:: classref-signal + +**extension_loaded**\ (\ extension\: :ref:`GDExtension`\ ) :ref:`🔗` + +Emitted after the editor has finished loading a new extension. + +\ **Note:** This signal is only emitted in editor builds. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GDExtensionManager_signal_extension_unloading: + +.. rst-class:: classref-signal + +**extension_unloading**\ (\ extension\: :ref:`GDExtension`\ ) :ref:`🔗` + +Emitted before the editor starts unloading an extension. + +\ **Note:** This signal is only emitted in editor builds. + +.. rst-class:: classref-item-separator + +---- + .. _class_GDExtensionManager_signal_extensions_reloaded: .. rst-class:: classref-signal diff --git a/classes/class_gdscriptsyntaxhighlighter.rst b/classes/class_gdscriptsyntaxhighlighter.rst new file mode 100644 index 00000000000..d49f2b44fcb --- /dev/null +++ b/classes/class_gdscriptsyntaxhighlighter.rst @@ -0,0 +1,48 @@ +: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/modules/gdscript/doc_classes/GDScriptSyntaxHighlighter.xml. + +.. _class_GDScriptSyntaxHighlighter: + +GDScriptSyntaxHighlighter +========================= + +**Inherits:** :ref:`EditorSyntaxHighlighter` **<** :ref:`SyntaxHighlighter` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +A GDScript syntax highlighter that can be used with :ref:`TextEdit` and :ref:`CodeEdit` nodes. + +.. rst-class:: classref-introduction-group + +Description +----------- + +**Note:** This class can only be used for editor plugins because it relies on editor settings. + + +.. tabs:: + + .. code-tab:: gdscript + + var code_preview = TextEdit.new() + var highlighter = GDScriptSyntaxHighlighter.new() + code_preview.syntax_highlighter = highlighter + + .. code-tab:: csharp + + var codePreview = new TextEdit(); + var highlighter = new GDScriptSyntaxHighlighter(); + codePreview.SyntaxHighlighter = highlighter; + + + +.. |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_geometry2d.rst b/classes/class_geometry2d.rst index dc692e09d7a..023e8858327 100644 --- a/classes/class_geometry2d.rst +++ b/classes/class_geometry2d.rst @@ -387,9 +387,40 @@ Returns ``true`` if ``polygon``'s vertices are ordered in clockwise order, other :ref:`Variant` **line_intersects_line**\ (\ from_a\: :ref:`Vector2`, dir_a\: :ref:`Vector2`, from_b\: :ref:`Vector2`, dir_b\: :ref:`Vector2`\ ) :ref:`🔗` -Checks if the two lines (``from_a``, ``dir_a``) and (``from_b``, ``dir_b``) intersect. If yes, return the point of intersection as :ref:`Vector2`. If no intersection takes place, returns ``null``. +Returns the point of intersection between the two lines (``from_a``, ``dir_a``) and (``from_b``, ``dir_b``). Returns a :ref:`Vector2`, or ``null`` if the lines are parallel. + +\ ``from`` and ``dir`` are *not* endpoints of a line segment or ray but the slope (``dir``) and a known point (``from``) on that line. + + +.. tabs:: + + .. code-tab:: gdscript + + var from_a = Vector2.ZERO + var dir_a = Vector2.RIGHT + var from_b = Vector2.DOWN + + # Returns Vector2(1, 0) + Geometry2D.line_intersects_line(from_a, dir_a, from_b, Vector2(1, -1)) + # Returns Vector2(-1, 0) + Geometry2D.line_intersects_line(from_a, dir_a, from_b, Vector2(-1, -1)) + # Returns null + Geometry2D.line_intersects_line(from_a, dir_a, from_b, Vector2.RIGHT) + + .. code-tab:: csharp + + var fromA = Vector2.Zero; + var dirA = Vector2.Right; + var fromB = Vector2.Down; + + // Returns new Vector2(1, 0) + Geometry2D.LineIntersectsLine(fromA, dirA, fromB, new Vector2(1, -1)); + // Returns new Vector2(-1, 0) + Geometry2D.LineIntersectsLine(fromA, dirA, fromB, new Vector2(-1, -1)); + // Returns null + Geometry2D.LineIntersectsLine(fromA, dirA, fromB, Vector2.Right); + -\ **Note:** The lines are specified using direction vectors, not end points. .. rst-class:: classref-item-separator diff --git a/classes/class_gltfaccessor.rst b/classes/class_gltfaccessor.rst index d3febd05a38..a3339199826 100644 --- a/classes/class_gltfaccessor.rst +++ b/classes/class_gltfaccessor.rst @@ -12,16 +12,16 @@ GLTFAccessor **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Represents a GLTF accessor. +Represents a glTF accessor. .. rst-class:: classref-introduction-group Description ----------- -GLTFAccessor is a data structure representing GLTF a ``accessor`` that would be found in the ``"accessors"`` array. A buffer is a blob of binary data. A buffer view is a slice of a buffer. An accessor is a typed interpretation of the data in a buffer view. +GLTFAccessor is a data structure representing a glTF ``accessor`` that would be found in the ``"accessors"`` array. A buffer is a blob of binary data. A buffer view is a slice of a buffer. An accessor is a typed interpretation of the data in a buffer view. -Most custom data stored in GLTF does not need accessors, only buffer views (see :ref:`GLTFBufferView`). Accessors are for more advanced use cases such as interleaved mesh data encoded for the GPU. +Most custom data stored in glTF does not need accessors, only buffer views (see :ref:`GLTFBufferView`). Accessors are for more advanced use cases such as interleaved mesh data encoded for the GPU. .. rst-class:: classref-introduction-group @@ -163,7 +163,7 @@ Property Descriptions - |void| **set_accessor_type**\ (\ value\: :ref:`GLTFAccessorType`\ ) - :ref:`GLTFAccessorType` **get_accessor_type**\ (\ ) -The GLTF accessor type as an enum. Possible values are 0 for "SCALAR", 1 for "VEC2", 2 for "VEC3", 3 for "VEC4", 4 for "MAT2", 5 for "MAT3", and 6 for "MAT4". +The glTF accessor type as an enum. Possible values are 0 for "SCALAR", 1 for "VEC2", 2 for "VEC3", 3 for "VEC4", 4 for "MAT2", 5 for "MAT3", and 6 for "MAT4". .. rst-class:: classref-item-separator @@ -214,7 +214,7 @@ The offset relative to the start of the buffer view in bytes. - |void| **set_component_type**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_component_type**\ (\ ) -The GLTF component type as an enum. Possible values are 5120 for "BYTE", 5121 for "UNSIGNED_BYTE", 5122 for "SHORT", 5123 for "UNSIGNED_SHORT", 5125 for "UNSIGNED_INT", and 5126 for "FLOAT". A value of 5125 or "UNSIGNED_INT" must not be used for any accessor that is not referenced by mesh.primitive.indices. +The glTF component type as an enum. Possible values are 5120 for "BYTE", 5121 for "UNSIGNED_BYTE", 5122 for "SHORT", 5123 for "UNSIGNED_SHORT", 5125 for "UNSIGNED_INT", and 5126 for "FLOAT". A value of 5125 or "UNSIGNED_INT" must not be used for any accessor that is not referenced by mesh.primitive.indices. .. rst-class:: classref-item-separator @@ -250,6 +250,8 @@ The number of elements referenced by this accessor. Maximum value of each component in this accessor. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedFloat64Array` for more details. + .. rst-class:: classref-item-separator ---- @@ -267,6 +269,8 @@ Maximum value of each component in this accessor. Minimum value of each component in this accessor. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedFloat64Array` for more details. + .. rst-class:: classref-item-separator ---- @@ -403,7 +407,7 @@ The offset relative to the start of the bufferView in bytes. **Deprecated:** Use :ref:`accessor_type` instead. -The GLTF accessor type as an enum. Use :ref:`accessor_type` instead. +The glTF accessor type as an enum. Use :ref:`accessor_type` instead. .. |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_gltfanimation.rst b/classes/class_gltfanimation.rst index fd6195bdee6..1b5b651824b 100644 --- a/classes/class_gltfanimation.rst +++ b/classes/class_gltfanimation.rst @@ -109,7 +109,7 @@ Method Descriptions Gets additional arbitrary data in this **GLTFAnimation** instance. This can be used to keep per-node state data in :ref:`GLTFDocumentExtension` classes, which is important because they are stateless. -The argument should be the :ref:`GLTFDocumentExtension` name (does not have to match the extension name in the GLTF file), and the return value can be anything you set. If nothing was set, the return value is null. +The argument should be the :ref:`GLTFDocumentExtension` name (does not have to match the extension name in the glTF file), and the return value can be anything you set. If nothing was set, the return value is null. .. rst-class:: classref-item-separator @@ -123,7 +123,7 @@ The argument should be the :ref:`GLTFDocumentExtension` classes, which is important because they are stateless. -The first argument should be the :ref:`GLTFDocumentExtension` name (does not have to match the extension name in the GLTF file), and the second argument can be anything you want. +The first argument should be the :ref:`GLTFDocumentExtension` name (does not have to match the extension name in the glTF file), and the second argument can be anything you want. .. |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_gltfbufferview.rst b/classes/class_gltfbufferview.rst index dc1f3c1cb81..2bc977316a4 100644 --- a/classes/class_gltfbufferview.rst +++ b/classes/class_gltfbufferview.rst @@ -12,14 +12,14 @@ GLTFBufferView **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Represents a GLTF buffer view. +Represents a glTF buffer view. .. rst-class:: classref-introduction-group Description ----------- -GLTFBufferView is a data structure representing GLTF a ``bufferView`` that would be found in the ``"bufferViews"`` array. A buffer is a blob of binary data. A buffer view is a slice of a buffer that can be used to identify and extract data from the buffer. +GLTFBufferView is a data structure representing a glTF ``bufferView`` that would be found in the ``"bufferViews"`` array. A buffer is a blob of binary data. A buffer view is a slice of a buffer that can be used to identify and extract data from the buffer. Most custom uses of buffers only need to use the :ref:`buffer`, :ref:`byte_length`, and :ref:`byte_offset`. The :ref:`byte_stride` and :ref:`indices` properties are for more advanced use cases such as interleaved mesh data encoded for the GPU. diff --git a/classes/class_gltfcamera.rst b/classes/class_gltfcamera.rst index 418bbfa1c25..b1eced242cc 100644 --- a/classes/class_gltfcamera.rst +++ b/classes/class_gltfcamera.rst @@ -12,14 +12,14 @@ GLTFCamera **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Represents a GLTF camera. +Represents a glTF camera. .. rst-class:: classref-introduction-group Description ----------- -Represents a camera as defined by the base GLTF spec. +Represents a camera as defined by the base glTF spec. .. rst-class:: classref-introduction-group @@ -28,9 +28,9 @@ Tutorials - :doc:`Runtime file loading and saving <../tutorials/io/runtime_file_loading_and_saving>` -- `GLTF camera detailed specification `__ +- `glTF camera detailed specification `__ -- `GLTF camera spec and example file `__ +- `glTF camera spec and example file `__ .. rst-class:: classref-reftable-group @@ -90,7 +90,7 @@ Property Descriptions - |void| **set_depth_far**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_depth_far**\ (\ ) -The distance to the far culling boundary for this camera relative to its local Z axis, in meters. This maps to GLTF's ``zfar`` property. +The distance to the far culling boundary for this camera relative to its local Z axis, in meters. This maps to glTF's ``zfar`` property. .. rst-class:: classref-item-separator @@ -107,7 +107,7 @@ The distance to the far culling boundary for this camera relative to its local Z - |void| **set_depth_near**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_depth_near**\ (\ ) -The distance to the near culling boundary for this camera relative to its local Z axis, in meters. This maps to GLTF's ``znear`` property. +The distance to the near culling boundary for this camera relative to its local Z axis, in meters. This maps to glTF's ``znear`` property. .. rst-class:: classref-item-separator @@ -124,7 +124,7 @@ The distance to the near culling boundary for this camera relative to its local - |void| **set_fov**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_fov**\ (\ ) -The FOV of the camera. This class and GLTF define the camera FOV in radians, while Godot uses degrees. This maps to GLTF's ``yfov`` property. This value is only used for perspective cameras, when :ref:`perspective` is true. +The FOV of the camera. This class and glTF define the camera FOV in radians, while Godot uses degrees. This maps to glTF's ``yfov`` property. This value is only used for perspective cameras, when :ref:`perspective` is true. .. rst-class:: classref-item-separator @@ -141,7 +141,7 @@ The FOV of the camera. This class and GLTF define the camera FOV in radians, whi - |void| **set_perspective**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **get_perspective**\ (\ ) -Whether or not the camera is in perspective mode. If false, the camera is in orthographic/orthogonal mode. This maps to GLTF's camera ``type`` property. See :ref:`Camera3D.projection` and the GLTF spec for more information. +Whether or not the camera is in perspective mode. If false, the camera is in orthographic/orthogonal mode. This maps to glTF's camera ``type`` property. See :ref:`Camera3D.projection` and the glTF spec for more information. .. rst-class:: classref-item-separator @@ -158,7 +158,7 @@ Whether or not the camera is in perspective mode. If false, the camera is in ort - |void| **set_size_mag**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_size_mag**\ (\ ) -The size of the camera. This class and GLTF define the camera size magnitude as a radius in meters, while Godot defines it as a diameter in meters. This maps to GLTF's ``ymag`` property. This value is only used for orthographic/orthogonal cameras, when :ref:`perspective` is false. +The size of the camera. This class and glTF define the camera size magnitude as a radius in meters, while Godot defines it as a diameter in meters. This maps to glTF's ``ymag`` property. This value is only used for orthographic/orthogonal cameras, when :ref:`perspective` is false. .. rst-class:: classref-section-separator diff --git a/classes/class_gltfdocument.rst b/classes/class_gltfdocument.rst index f5d8a657bc0..8401f4c3592 100644 --- a/classes/class_gltfdocument.rst +++ b/classes/class_gltfdocument.rst @@ -23,7 +23,7 @@ Description GLTFDocument supports reading data from a glTF file, buffer, or Godot scene. This data can then be written to the filesystem, buffer, or used to create a Godot scene. -All of the data in a GLTF scene is stored in the :ref:`GLTFState` class. GLTFDocument processes state objects, but does not contain any scene data itself. GLTFDocument has member variables to store export configuration settings such as the image format, but is otherwise stateless. Multiple scenes can be processed with the same settings using the same GLTFDocument object and different :ref:`GLTFState` objects. +All of the data in a glTF scene is stored in the :ref:`GLTFState` class. GLTFDocument processes state objects, but does not contain any scene data itself. GLTFDocument has member variables to store export configuration settings such as the image format, but is otherwise stateless. Multiple scenes can be processed with the same settings using the same GLTFDocument object and different :ref:`GLTFState` objects. GLTFDocument can be extended with arbitrary functionality by extending the :ref:`GLTFDocumentExtension` class and registering it with GLTFDocument via :ref:`register_gltf_document_extension`. This allows for custom data to be imported and exported. @@ -62,23 +62,25 @@ Methods .. table:: :widths: auto - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`append_from_buffer`\ (\ bytes\: :ref:`PackedByteArray`, base_path\: :ref:`String`, state\: :ref:`GLTFState`, flags\: :ref:`int` = 0\ ) | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`append_from_file`\ (\ path\: :ref:`String`, state\: :ref:`GLTFState`, flags\: :ref:`int` = 0, base_path\: :ref:`String` = ""\ ) | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`append_from_scene`\ (\ node\: :ref:`Node`, state\: :ref:`GLTFState`, flags\: :ref:`int` = 0\ ) | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray` | :ref:`generate_buffer`\ (\ state\: :ref:`GLTFState`\ ) | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node` | :ref:`generate_scene`\ (\ state\: :ref:`GLTFState`, bake_fps\: :ref:`float` = 30, trimming\: :ref:`bool` = false, remove_immutable_tracks\: :ref:`bool` = true\ ) | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`register_gltf_document_extension`\ (\ extension\: :ref:`GLTFDocumentExtension`, first_priority\: :ref:`bool` = false\ ) |static| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`unregister_gltf_document_extension`\ (\ extension\: :ref:`GLTFDocumentExtension`\ ) |static| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`write_to_filesystem`\ (\ state\: :ref:`GLTFState`, path\: :ref:`String`\ ) | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`append_from_buffer`\ (\ bytes\: :ref:`PackedByteArray`, base_path\: :ref:`String`, state\: :ref:`GLTFState`, flags\: :ref:`int` = 0\ ) | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`append_from_file`\ (\ path\: :ref:`String`, state\: :ref:`GLTFState`, flags\: :ref:`int` = 0, base_path\: :ref:`String` = ""\ ) | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`append_from_scene`\ (\ node\: :ref:`Node`, state\: :ref:`GLTFState`, flags\: :ref:`int` = 0\ ) | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`generate_buffer`\ (\ state\: :ref:`GLTFState`\ ) | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node` | :ref:`generate_scene`\ (\ state\: :ref:`GLTFState`, bake_fps\: :ref:`float` = 30, trimming\: :ref:`bool` = false, remove_immutable_tracks\: :ref:`bool` = true\ ) | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_supported_gltf_extensions`\ (\ ) |static| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`register_gltf_document_extension`\ (\ extension\: :ref:`GLTFDocumentExtension`, first_priority\: :ref:`bool` = false\ ) |static| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`unregister_gltf_document_extension`\ (\ extension\: :ref:`GLTFDocumentExtension`\ ) |static| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`write_to_filesystem`\ (\ state\: :ref:`GLTFState`, path\: :ref:`String`\ ) | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -139,7 +141,7 @@ Property Descriptions - |void| **set_image_format**\ (\ value\: :ref:`String`\ ) - :ref:`String` **get_image_format**\ (\ ) -The user-friendly name of the export image format. This is used when exporting the GLTF file, including writing to a file and writing to a byte array. +The user-friendly name of the export image format. This is used when exporting the glTF file, including writing to a file and writing to a byte array. By default, Godot allows the following options: "None", "PNG", "JPEG", "Lossless WebP", and "Lossy WebP". Support for more image formats can be added in :ref:`GLTFDocumentExtension` classes. @@ -194,7 +196,7 @@ Method Descriptions :ref:`Error` **append_from_buffer**\ (\ bytes\: :ref:`PackedByteArray`, base_path\: :ref:`String`, state\: :ref:`GLTFState`, flags\: :ref:`int` = 0\ ) :ref:`🔗` -Takes a :ref:`PackedByteArray` defining a GLTF and imports the data to the given :ref:`GLTFState` object through the ``state`` parameter. +Takes a :ref:`PackedByteArray` defining a glTF and imports the data to the given :ref:`GLTFState` object through the ``state`` parameter. \ **Note:** The ``base_path`` tells :ref:`append_from_buffer` where to find dependencies and can be empty. @@ -208,7 +210,7 @@ Takes a :ref:`PackedByteArray` defining a GLTF and import :ref:`Error` **append_from_file**\ (\ path\: :ref:`String`, state\: :ref:`GLTFState`, flags\: :ref:`int` = 0, base_path\: :ref:`String` = ""\ ) :ref:`🔗` -Takes a path to a GLTF file and imports the data at that file path to the given :ref:`GLTFState` object through the ``state`` parameter. +Takes a path to a glTF file and imports the data at that file path to the given :ref:`GLTFState` object through the ``state`` parameter. \ **Note:** The ``base_path`` tells :ref:`append_from_file` where to find dependencies and can be empty. @@ -234,7 +236,7 @@ Takes a Godot Engine scene node and exports it and its descendants to the given :ref:`PackedByteArray` **generate_buffer**\ (\ state\: :ref:`GLTFState`\ ) :ref:`🔗` -Takes a :ref:`GLTFState` object through the ``state`` parameter and returns a GLTF :ref:`PackedByteArray`. +Takes a :ref:`GLTFState` object through the ``state`` parameter and returns a glTF :ref:`PackedByteArray`. .. rst-class:: classref-item-separator @@ -254,6 +256,20 @@ The ``bake_fps`` parameter overrides the bake_fps in ``state``. ---- +.. _class_GLTFDocument_method_get_supported_gltf_extensions: + +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_supported_gltf_extensions**\ (\ ) |static| :ref:`🔗` + +Returns a list of all support glTF extensions, including extensions supported directly by the engine, and extensions supported by user plugins registering :ref:`GLTFDocumentExtension` classes. + +\ **Note:** If this method is run before a GLTFDocumentExtension is registered, its extensions won't be included in the list. Be sure to only run this method after all extensions are registered. If you run this when the engine starts, consider waiting a frame before calling this method to ensure all extensions are registered. + +.. rst-class:: classref-item-separator + +---- + .. _class_GLTFDocument_method_register_gltf_document_extension: .. rst-class:: classref-method diff --git a/classes/class_gltfdocumentextension.rst b/classes/class_gltfdocumentextension.rst index 9daad61f3f2..8f3ffb226fc 100644 --- a/classes/class_gltfdocumentextension.rst +++ b/classes/class_gltfdocumentextension.rst @@ -21,7 +21,7 @@ GLTFDocumentExtension Description ----------- -Extends the functionality of the :ref:`GLTFDocument` class by allowing you to run arbitrary code at various stages of GLTF import or export. +Extends the functionality of the :ref:`GLTFDocument` class by allowing you to run arbitrary code at various stages of glTF import or export. To use, make a new class extending GLTFDocumentExtension, override any methods you need, make an instance of your class, and register it using :ref:`GLTFDocument.register_gltf_document_extension`. @@ -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`. @@ -113,7 +117,7 @@ Runs when converting the data from a Godot scene node. This method can be used t Part of the export process. This method is run after :ref:`_get_saveable_image_formats` and before :ref:`_export_post`. If this **GLTFDocumentExtension** is used for exporting images, this runs after :ref:`_serialize_texture_json`. -This method can be used to modify the final JSON of each node. Data should be primarily stored in ``gltf_node`` prior to serializing the JSON, but the original Godot ``node`` is also provided if available. The node may be null if not available, such as when exporting GLTF data not generated from a Godot scene. +This method can be used to modify the final JSON of each node. Data should be primarily stored in ``gltf_node`` prior to serializing the JSON, but the original Godot ``node`` is also provided if available. The node may be null if not available, such as when exporting glTF data not generated from a Godot scene. .. rst-class:: classref-item-separator @@ -127,7 +131,21 @@ This method can be used to modify the final JSON of each node. Data should be pr Part of the export process. This method is run last, after all other parts of the export process. -This method can be used to modify the final JSON of the generated GLTF file. +This method can be used to modify the final JSON of the generated glTF file. + +.. rst-class:: classref-item-separator + +---- + +.. _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 @@ -141,7 +159,7 @@ This method can be used to modify the final JSON of the generated GLTF file. Part of the export process. This method is run first, before all other parts of the export process. -The return value is used to determine if this **GLTFDocumentExtension** instance should be used for exporting a given GLTF file. If :ref:`@GlobalScope.OK`, the export will use this **GLTFDocumentExtension** instance. If not overridden, :ref:`@GlobalScope.OK` is returned. +The return value is used to determine if this **GLTFDocumentExtension** instance should be used for exporting a given glTF file. If :ref:`@GlobalScope.OK`, the export will use this **GLTFDocumentExtension** instance. If not overridden, :ref:`@GlobalScope.OK` is returned. .. rst-class:: classref-item-separator @@ -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. @@ -211,7 +229,7 @@ Returns an array of the image formats that can be saved/exported by this extensi Part of the import process. This method is run after :ref:`_import_preflight` and before :ref:`_parse_node_extensions`. -Returns an array of the GLTF extensions supported by this GLTFDocumentExtension class. This is used to validate if a GLTF file with required extensions can be loaded. +Returns an array of the glTF extensions supported by this GLTFDocumentExtension class. This is used to validate if a glTF file with required extensions can be loaded. .. rst-class:: classref-item-separator @@ -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 @@ -267,7 +299,7 @@ This method can be used to modify any of the data imported so far after parsing, Part of the import process. This method is run first, before all other parts of the import process. -The return value is used to determine if this **GLTFDocumentExtension** instance should be used for importing a given GLTF file. If :ref:`@GlobalScope.OK`, the import will use this **GLTFDocumentExtension** instance. If not overridden, :ref:`@GlobalScope.OK` is returned. +The return value is used to determine if this **GLTFDocumentExtension** instance should be used for importing a given glTF file. If :ref:`@GlobalScope.OK`, the import will use this **GLTFDocumentExtension** instance. If not overridden, :ref:`@GlobalScope.OK` is returned. .. rst-class:: classref-item-separator @@ -281,7 +313,7 @@ The return value is used to determine if this **GLTFDocumentExtension** instance Part of the import process. This method is run after :ref:`_parse_node_extensions` and before :ref:`_parse_texture_json`. -Runs when parsing image data from a GLTF file. The data could be sourced from a separate file, a URI, or a buffer, and then is passed as a byte array. +Runs when parsing image data from a glTF file. The data could be sourced from a separate file, a URI, or a buffer, and then is passed as a byte array. .. rst-class:: classref-item-separator @@ -309,7 +341,7 @@ Runs when parsing the node extensions of a GLTFNode. This method can be used to Part of the import process. This method is run after :ref:`_parse_image_data` and before :ref:`_generate_scene_node`. -Runs when parsing the texture JSON from the GLTF textures array. This can be used to set the source image index to use as the texture. +Runs when parsing the texture JSON from the glTF textures array. This can be used to set the source image index to use as the texture. .. rst-class:: classref-item-separator @@ -323,7 +355,7 @@ Runs when parsing the texture JSON from the GLTF textures array. This can be use Part of the export process. This method is run after :ref:`_get_saveable_image_formats` and before :ref:`_serialize_texture_json`. -This method is run when saving images separately from the GLTF file. When images are embedded, :ref:`_serialize_image_to_bytes` runs instead. Note that these methods only run when this **GLTFDocumentExtension** is selected as the image exporter. +This method is run when saving images separately from the glTF file. When images are embedded, :ref:`_serialize_image_to_bytes` runs instead. Note that these methods only run when this **GLTFDocumentExtension** is selected as the image exporter. .. rst-class:: classref-item-separator @@ -337,7 +369,7 @@ This method is run when saving images separately from the GLTF file. When images Part of the export process. This method is run after :ref:`_get_saveable_image_formats` and before :ref:`_serialize_texture_json`. -This method is run when embedding images in the GLTF file. When images are saved separately, :ref:`_save_image_at_path` runs instead. Note that these methods only run when this **GLTFDocumentExtension** is selected as the image exporter. +This method is run when embedding images in the glTF file. When images are saved separately, :ref:`_save_image_at_path` runs instead. Note that these methods only run when this **GLTFDocumentExtension** is selected as the image exporter. This method must set the image MIME type in the ``image_dict`` with the ``"mimeType"`` key. For example, for a PNG image, it would be set to ``"image/png"``. The return value must be a :ref:`PackedByteArray` containing the image data. diff --git a/classes/class_gltflight.rst b/classes/class_gltflight.rst index d92a7c3a890..f9c74903bc1 100644 --- a/classes/class_gltflight.rst +++ b/classes/class_gltflight.rst @@ -12,14 +12,14 @@ GLTFLight **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Represents a GLTF light. +Represents a glTF light. .. rst-class:: classref-introduction-group Description ----------- -Represents a light as defined by the ``KHR_lights_punctual`` GLTF extension. +Represents a light as defined by the ``KHR_lights_punctual`` glTF extension. .. rst-class:: classref-introduction-group @@ -28,7 +28,7 @@ Tutorials - :doc:`Runtime file loading and saving <../tutorials/io/runtime_file_loading_and_saving>` -- `KHR_lights_punctual GLTF extension spec `__ +- `KHR_lights_punctual glTF extension spec `__ .. rst-class:: classref-reftable-group @@ -183,7 +183,7 @@ At this angle, the light drops off to zero brightness. Between the inner and out - |void| **set_range**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_range**\ (\ ) -The range of the light, beyond which the light has no effect. GLTF lights with no range defined behave like physical lights (which have infinite range). When creating a Godot light, the range is clamped to 4096. +The range of the light, beyond which the light has no effect. glTF lights with no range defined behave like physical lights (which have infinite range). When creating a Godot light, the range is clamped to 4096. .. rst-class:: classref-section-separator diff --git a/classes/class_gltfmesh.rst b/classes/class_gltfmesh.rst index 1003478aa10..d56c474eec9 100644 --- a/classes/class_gltfmesh.rst +++ b/classes/class_gltfmesh.rst @@ -12,14 +12,14 @@ GLTFMesh **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -GLTFMesh represents a GLTF mesh. +GLTFMesh represents a glTF mesh. .. rst-class:: classref-introduction-group Description ----------- -GLTFMesh handles 3D mesh data imported from GLTF files. It includes properties for blend channels, blend weights, instance materials, and the mesh itself. +GLTFMesh handles 3D mesh data imported from glTF files. It includes properties for blend channels, blend weights, instance materials, and the mesh itself. .. rst-class:: classref-introduction-group @@ -152,7 +152,7 @@ Method Descriptions Gets additional arbitrary data in this **GLTFMesh** instance. This can be used to keep per-node state data in :ref:`GLTFDocumentExtension` classes, which is important because they are stateless. -The argument should be the :ref:`GLTFDocumentExtension` name (does not have to match the extension name in the GLTF file), and the return value can be anything you set. If nothing was set, the return value is null. +The argument should be the :ref:`GLTFDocumentExtension` name (does not have to match the extension name in the glTF file), and the return value can be anything you set. If nothing was set, the return value is null. .. rst-class:: classref-item-separator @@ -166,7 +166,7 @@ The argument should be the :ref:`GLTFDocumentExtension` classes, which is important because they are stateless. -The first argument should be the :ref:`GLTFDocumentExtension` name (does not have to match the extension name in the GLTF file), and the second argument can be anything you want. +The first argument should be the :ref:`GLTFDocumentExtension` name (does not have to match the extension name in the glTF file), and the second argument can be anything you want. .. |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_gltfnode.rst b/classes/class_gltfnode.rst index dde695d27d3..8a51908c0ca 100644 --- a/classes/class_gltfnode.rst +++ b/classes/class_gltfnode.rst @@ -12,16 +12,16 @@ GLTFNode **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -GLTF node class. +glTF node class. .. rst-class:: classref-introduction-group Description ----------- -Represents a GLTF node. GLTF nodes may have names, transforms, children (other GLTF nodes), and more specialized properties (represented by their own classes). +Represents a glTF node. glTF nodes may have names, transforms, children (other glTF nodes), and more specialized properties (represented by their own classes). -GLTF nodes generally exist inside of :ref:`GLTFState` which represents all data of a GLTF file. Most of GLTFNode's properties are indices of other data in the GLTF file. You can extend a GLTF node with additional properties by using :ref:`get_additional_data` and :ref:`set_additional_data`. +glTF nodes generally exist inside of :ref:`GLTFState` which represents all data of a glTF file. Most of GLTFNode's properties are indices of other data in the glTF file. You can extend a glTF node with additional properties by using :ref:`get_additional_data` and :ref:`set_additional_data`. .. rst-class:: classref-introduction-group @@ -30,7 +30,7 @@ Tutorials - :doc:`Runtime file loading and saving <../tutorials/io/runtime_file_loading_and_saving>` -- `GLTF scene and node spec `__ +- `glTF scene and node spec `__ .. rst-class:: classref-reftable-group @@ -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`\ ) | +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -102,7 +104,7 @@ Property Descriptions - |void| **set_camera**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_camera**\ (\ ) -If this GLTF node is a camera, the index of the :ref:`GLTFCamera` in the :ref:`GLTFState` that describes the camera's properties. If -1, this node is not a camera. +If this glTF node is a camera, the index of the :ref:`GLTFCamera` in the :ref:`GLTFState` that describes the camera's properties. If -1, this node is not a camera. .. rst-class:: classref-item-separator @@ -119,7 +121,7 @@ If this GLTF node is a camera, the index of the :ref:`GLTFCamera`\ ) - :ref:`PackedInt32Array` **get_children**\ (\ ) -The indices of the child nodes in the :ref:`GLTFState`. If this GLTF node has no children, this will be an empty array. +The indices of the child nodes in the :ref:`GLTFState`. If this glTF node has no children, this will be an empty array. **Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt32Array` for more details. @@ -155,7 +157,7 @@ How deep into the node hierarchy this node is. A root node will have a height of - |void| **set_light**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_light**\ (\ ) -If this GLTF node is a light, the index of the :ref:`GLTFLight` in the :ref:`GLTFState` that describes the light's properties. If -1, this node is not a light. +If this glTF node is a light, the index of the :ref:`GLTFLight` in the :ref:`GLTFState` that describes the light's properties. If -1, this node is not a light. .. rst-class:: classref-item-separator @@ -172,7 +174,7 @@ If this GLTF node is a light, the index of the :ref:`GLTFLight` - |void| **set_mesh**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_mesh**\ (\ ) -If this GLTF node is a mesh, the index of the :ref:`GLTFMesh` in the :ref:`GLTFState` that describes the mesh's properties. If -1, this node is not a mesh. +If this glTF node is a mesh, the index of the :ref:`GLTFMesh` in the :ref:`GLTFState` that describes the mesh's properties. If -1, this node is not a mesh. .. rst-class:: classref-item-separator @@ -223,7 +225,7 @@ The index of the parent node in the :ref:`GLTFState`. If -1, th - |void| **set_position**\ (\ value\: :ref:`Vector3`\ ) - :ref:`Vector3` **get_position**\ (\ ) -The position of the GLTF node relative to its parent. +The position of the glTF node relative to its parent. .. rst-class:: classref-item-separator @@ -240,7 +242,7 @@ The position of the GLTF node relative to its parent. - |void| **set_rotation**\ (\ value\: :ref:`Quaternion`\ ) - :ref:`Quaternion` **get_rotation**\ (\ ) -The rotation of the GLTF node relative to its parent. +The rotation of the glTF node relative to its parent. .. rst-class:: classref-item-separator @@ -257,7 +259,7 @@ The rotation of the GLTF node relative to its parent. - |void| **set_scale**\ (\ value\: :ref:`Vector3`\ ) - :ref:`Vector3` **get_scale**\ (\ ) -The scale of the GLTF node relative to its parent. +The scale of the glTF node relative to its parent. .. rst-class:: classref-item-separator @@ -274,7 +276,7 @@ The scale of the GLTF node relative to its parent. - |void| **set_skeleton**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_skeleton**\ (\ ) -If this GLTF node has a skeleton, the index of the :ref:`GLTFSkeleton` in the :ref:`GLTFState` that describes the skeleton's properties. If -1, this node does not have a skeleton. +If this glTF node has a skeleton, the index of the :ref:`GLTFSkeleton` in the :ref:`GLTFState` that describes the skeleton's properties. If -1, this node does not have a skeleton. .. rst-class:: classref-item-separator @@ -291,7 +293,7 @@ If this GLTF node has a skeleton, the index of the :ref:`GLTFSkeleton`\ ) - :ref:`int` **get_skin**\ (\ ) -If this GLTF node has a skin, the index of the :ref:`GLTFSkin` in the :ref:`GLTFState` that describes the skin's properties. If -1, this node does not have a skin. +If this glTF node has a skin, the index of the :ref:`GLTFSkin` in the :ref:`GLTFState` that describes the skin's properties. If -1, this node does not have a skin. .. rst-class:: classref-item-separator @@ -308,7 +310,7 @@ If this GLTF node has a skin, the index of the :ref:`GLTFSkin` i - |void| **set_xform**\ (\ value\: :ref:`Transform3D`\ ) - :ref:`Transform3D` **get_xform**\ (\ ) -The transform of the GLTF node relative to its parent. This property is usually unused since the position, rotation, and scale properties are preferred. +The transform of the glTF node relative to its parent. This property is usually unused since the position, rotation, and scale properties are preferred. .. rst-class:: classref-section-separator @@ -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 @@ -327,7 +341,7 @@ Method Descriptions Gets additional arbitrary data in this **GLTFNode** instance. This can be used to keep per-node state data in :ref:`GLTFDocumentExtension` classes, which is important because they are stateless. -The argument should be the :ref:`GLTFDocumentExtension` name (does not have to match the extension name in the GLTF file), and the return value can be anything you set. If nothing was set, the return value is null. +The argument should be the :ref:`GLTFDocumentExtension` name (does not have to match the extension name in the glTF file), and the return value can be anything you set. If nothing was set, the return value is null. .. rst-class:: classref-item-separator @@ -341,7 +355,7 @@ The argument should be the :ref:`GLTFDocumentExtension` classes, which is important because they are stateless. -The first argument should be the :ref:`GLTFDocumentExtension` name (does not have to match the extension name in the GLTF file), and the second argument can be anything you want. +The first argument should be the :ref:`GLTFDocumentExtension` name (does not have to match the extension name in the glTF file), and the second argument can be anything you want. .. |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_gltfphysicsbody.rst b/classes/class_gltfphysicsbody.rst index 4eb9962f904..e2879a47810 100644 --- a/classes/class_gltfphysicsbody.rst +++ b/classes/class_gltfphysicsbody.rst @@ -12,14 +12,14 @@ GLTFPhysicsBody **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Represents a GLTF physics body. +Represents a glTF physics body. .. rst-class:: classref-introduction-group Description ----------- -Represents a physics body as an intermediary between the ``OMI_physics_body`` GLTF data and Godot's nodes, and it's abstracted in a way that allows adding support for different GLTF physics extensions in the future. +Represents a physics body as an intermediary between the ``OMI_physics_body`` glTF data and Godot's nodes, and it's abstracted in a way that allows adding support for different glTF physics extensions in the future. .. rst-class:: classref-introduction-group @@ -28,7 +28,7 @@ Tutorials - :doc:`Runtime file loading and saving <../tutorials/io/runtime_file_loading_and_saving>` -- `OMI_physics_body GLTF extension `__ +- `OMI_physics_body glTF extension `__ .. rst-class:: classref-reftable-group @@ -236,7 +236,7 @@ Method Descriptions :ref:`GLTFPhysicsBody` **from_dictionary**\ (\ dictionary\: :ref:`Dictionary`\ ) |static| :ref:`🔗` -Creates a new GLTFPhysicsBody instance by parsing the given :ref:`Dictionary` in the ``OMI_physics_body`` GLTF extension format. +Creates a new GLTFPhysicsBody instance by parsing the given :ref:`Dictionary` in the ``OMI_physics_body`` glTF extension format. .. rst-class:: classref-item-separator @@ -260,7 +260,7 @@ Creates a new GLTFPhysicsBody instance from the given Godot :ref:`CollisionObjec :ref:`Dictionary` **to_dictionary**\ (\ ) |const| :ref:`🔗` -Serializes this GLTFPhysicsBody instance into a :ref:`Dictionary`. It will be in the format expected by the ``OMI_physics_body`` GLTF extension. +Serializes this GLTFPhysicsBody instance into a :ref:`Dictionary`. It will be in the format expected by the ``OMI_physics_body`` glTF extension. .. rst-class:: classref-item-separator diff --git a/classes/class_gltfphysicsshape.rst b/classes/class_gltfphysicsshape.rst index b0b5cb10d41..fae4b8bd87b 100644 --- a/classes/class_gltfphysicsshape.rst +++ b/classes/class_gltfphysicsshape.rst @@ -12,14 +12,14 @@ GLTFPhysicsShape **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Represents a GLTF physics shape. +Represents a glTF physics shape. .. rst-class:: classref-introduction-group Description ----------- -Represents a physics shape as defined by the ``OMI_physics_shape`` or ``OMI_collider`` GLTF extensions. This class is an intermediary between the GLTF data and Godot's nodes, and it's abstracted in a way that allows adding support for different GLTF physics extensions in the future. +Represents a physics shape as defined by the ``OMI_physics_shape`` or ``OMI_collider`` glTF extensions. This class is an intermediary between the glTF data and Godot's nodes, and it's abstracted in a way that allows adding support for different glTF physics extensions in the future. .. rst-class:: classref-introduction-group @@ -28,9 +28,9 @@ Tutorials - :doc:`Runtime file loading and saving <../tutorials/io/runtime_file_loading_and_saving>` -- `OMI_physics_shape GLTF extension `__ +- `OMI_physics_shape glTF extension `__ -- `OMI_collider GLTF extension `__ +- `OMI_collider glTF extension `__ .. rst-class:: classref-reftable-group @@ -151,7 +151,7 @@ This is the only variable not used in the :ref:`to_node`\ ) - :ref:`int` **get_mesh_index**\ (\ ) -The index of the shape's mesh in the GLTF file. This is only used when the shape type is "hull" (convex hull) or "trimesh" (concave trimesh). +The index of the shape's mesh in the glTF file. This is only used when the shape type is "hull" (convex hull) or "trimesh" (concave trimesh). .. rst-class:: classref-item-separator diff --git a/classes/class_gltfskeleton.rst b/classes/class_gltfskeleton.rst index 9951dfc18aa..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 ---- @@ -147,7 +151,7 @@ Method Descriptions :ref:`Dictionary` **get_godot_bone_node**\ (\ ) :ref:`🔗` -Returns a :ref:`Dictionary` that maps skeleton bone indices to the indices of GLTF nodes. This property is unused during import, and only set during export. In a GLTF file, a bone is a node, so Godot converts skeleton bones to GLTF nodes. +Returns a :ref:`Dictionary` that maps skeleton bone indices to the indices of glTF nodes. This property is unused during import, and only set during export. In a glTF file, a bone is a node, so Godot converts skeleton bones to glTF nodes. .. rst-class:: classref-item-separator @@ -187,7 +191,7 @@ Returns a :ref:`Dictionary` that maps skeleton bone indices to |void| **set_godot_bone_node**\ (\ godot_bone_node\: :ref:`Dictionary`\ ) :ref:`🔗` -Sets a :ref:`Dictionary` that maps skeleton bone indices to the indices of GLTF nodes. This property is unused during import, and only set during export. In a GLTF file, a bone is a node, so Godot converts skeleton bones to GLTF nodes. +Sets a :ref:`Dictionary` that maps skeleton bone indices to the indices of glTF nodes. This property is unused during import, and only set during export. In a glTF file, a bone is a node, so Godot converts skeleton bones to glTF nodes. .. rst-class:: classref-item-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_gltfspecgloss.rst b/classes/class_gltfspecgloss.rst index a5cb4f2d997..0cc58a899d4 100644 --- a/classes/class_gltfspecgloss.rst +++ b/classes/class_gltfspecgloss.rst @@ -12,14 +12,14 @@ GLTFSpecGloss **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Archived GLTF extension for specular/glossy materials. +Archived glTF extension for specular/glossy materials. .. rst-class:: classref-introduction-group Description ----------- -KHR_materials_pbrSpecularGlossiness is an archived GLTF extension. This means that it is deprecated and not recommended for new files. However, it is still supported for loading old files. +KHR_materials_pbrSpecularGlossiness is an archived glTF extension. This means that it is deprecated and not recommended for new files. However, it is still supported for loading old files. .. rst-class:: classref-introduction-group @@ -28,7 +28,7 @@ Tutorials - :doc:`Runtime file loading and saving <../tutorials/io/runtime_file_loading_and_saving>` -- `KHR_materials_pbrSpecularGlossiness GLTF extension spec `__ +- `KHR_materials_pbrSpecularGlossiness glTF extension spec `__ .. rst-class:: classref-reftable-group diff --git a/classes/class_gltfstate.rst b/classes/class_gltfstate.rst index 9faaf6c653d..f05d7731428 100644 --- a/classes/class_gltfstate.rst +++ b/classes/class_gltfstate.rst @@ -14,16 +14,16 @@ GLTFState **Inherited By:** :ref:`FBXState` -Represents all data of a GLTF file. +Represents all data of a glTF file. .. rst-class:: classref-introduction-group Description ----------- -Contains all nodes and resources of a GLTF file. This is used by :ref:`GLTFDocument` as data storage, which allows :ref:`GLTFDocument` and all :ref:`GLTFDocumentExtension` classes to remain stateless. +Contains all nodes and resources of a glTF file. This is used by :ref:`GLTFDocument` as data storage, which allows :ref:`GLTFDocument` and all :ref:`GLTFDocumentExtension` classes to remain stateless. -GLTFState can be populated by :ref:`GLTFDocument` reading a file or by converting a Godot scene. Then the data can either be used to create a Godot scene or save to a GLTF file. The code that converts to/from a Godot scene can be intercepted at arbitrary points by :ref:`GLTFDocumentExtension` classes. This allows for custom data to be stored in the GLTF file or for custom data to be converted to/from Godot nodes. +GLTFState can be populated by :ref:`GLTFDocument` reading a file or by converting a Godot scene. Then the data can either be used to create a Godot scene or save to a glTF file. The code that converts to/from a Godot scene can be intercepted at arbitrary points by :ref:`GLTFDocumentExtension` classes. This allows for custom data to be stored in the glTF file or for custom data to be converted to/from Godot nodes. .. rst-class:: classref-introduction-group @@ -32,7 +32,7 @@ Tutorials - :doc:`Runtime file loading and saving <../tutorials/io/runtime_file_loading_and_saving>` -- `GLTF asset header schema `__ +- `glTF asset header schema `__ .. rst-class:: classref-reftable-group @@ -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 @@ -240,7 +242,7 @@ The baking fps of the animation for either import or export. - |void| **set_base_path**\ (\ value\: :ref:`String`\ ) - :ref:`String` **get_base_path**\ (\ ) -The folder path associated with this GLTF data. This is used to find other files the GLTF file references, like images or binary buffers. This will be set during import when appending from a file, and will be set during export when writing to a file. +The folder path associated with this glTF data. This is used to find other files the glTF file references, like images or binary buffers. This will be set during import when appending from a file, and will be set during export when writing to a file. .. rst-class:: classref-item-separator @@ -276,7 +278,7 @@ The folder path associated with this GLTF data. This is used to find other files - |void| **set_copyright**\ (\ value\: :ref:`String`\ ) - :ref:`String` **get_copyright**\ (\ ) -The copyright string in the asset header of the GLTF file. This is set during import if present and export if non-empty. See the GLTF asset header documentation for more information. +The copyright string in the asset header of the glTF file. This is set during import if present and export if non-empty. See the glTF asset header documentation for more information. .. rst-class:: classref-item-separator @@ -312,7 +314,7 @@ The copyright string in the asset header of the GLTF file. This is set during im - |void| **set_filename**\ (\ value\: :ref:`String`\ ) - :ref:`String` **get_filename**\ (\ ) -The file name associated with this GLTF data. If it ends with ``.gltf``, this is text-based GLTF, otherwise this is binary GLB. This will be set during import when appending from a file, and will be set during export when writing to a file. If writing to a buffer, this will be an empty string. +The file name associated with this glTF data. If it ends with ``.gltf``, this is text-based glTF, otherwise this is binary GLB. This will be set during import when appending from a file, and will be set during export when writing to a file. If writing to a buffer, this will be an empty string. .. rst-class:: classref-item-separator @@ -420,7 +422,7 @@ The original raw JSON document corresponding to this GLTFState. - |void| **set_root_nodes**\ (\ value\: :ref:`PackedInt32Array`\ ) - :ref:`PackedInt32Array` **get_root_nodes**\ (\ ) -The root nodes of the GLTF file. Typically, a GLTF file will only have one scene, and therefore one root node. However, a GLTF file may have multiple scenes and therefore multiple root nodes, which will be generated as siblings of each other and as children of the root node of the generated Godot scene. +The root nodes of the glTF file. Typically, a glTF file will only have one scene, and therefore one root node. However, a glTF file may have multiple scenes and therefore multiple root nodes, which will be generated as siblings of each other and as children of the root node of the generated Godot scene. **Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt32Array` for more details. @@ -439,7 +441,7 @@ The root nodes of the GLTF file. Typically, a GLTF file will only have one scene - |void| **set_scene_name**\ (\ value\: :ref:`String`\ ) - :ref:`String` **get_scene_name**\ (\ ) -The name of the scene. When importing, if not specified, this will be the file name. When exporting, if specified, the scene name will be saved to the GLTF file. +The name of the scene. When importing, if not specified, this will be the file name. When exporting, if specified, the scene name will be saved to the glTF file. .. rst-class:: classref-item-separator @@ -475,7 +477,7 @@ Method Descriptions |void| **add_used_extension**\ (\ extension_name\: :ref:`String`, required\: :ref:`bool`\ ) :ref:`🔗` -Appends an extension to the list of extensions used by this GLTF file during serialization. If ``required`` is true, the extension will also be added to the list of required extensions. Do not run this in :ref:`GLTFDocumentExtension._export_post`, as that stage is too late to add extensions. The final list is sorted alphabetically. +Appends an extension to the list of extensions used by this glTF file during serialization. If ``required`` is true, the extension will also be added to the list of required extensions. Do not run this in :ref:`GLTFDocumentExtension._export_post`, as that stage is too late to add extensions. The final list is sorted alphabetically. .. rst-class:: classref-item-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 @@ -515,7 +533,7 @@ Appends the given byte array data to the buffers and creates a :ref:`GLTFBufferV Gets additional arbitrary data in this **GLTFState** instance. This can be used to keep per-file state data in :ref:`GLTFDocumentExtension` classes, which is important because they are stateless. -The argument should be the :ref:`GLTFDocumentExtension` name (does not have to match the extension name in the GLTF file), and the return value can be anything you set. If nothing was set, the return value is null. +The argument should be the :ref:`GLTFDocumentExtension` name (does not have to match the extension name in the glTF file), and the return value can be anything you set. If nothing was set, the return value is null. .. rst-class:: classref-item-separator @@ -527,7 +545,7 @@ The argument should be the :ref:`GLTFDocumentExtension` **get_animation_player**\ (\ idx\: :ref:`int`\ ) :ref:`🔗` -Returns the :ref:`AnimationPlayer` node with the given index. These nodes are only used during the export process when converting Godot :ref:`AnimationPlayer` nodes to GLTF animations. +Returns the :ref:`AnimationPlayer` node with the given index. These nodes are only used during the export process when converting Godot :ref:`AnimationPlayer` nodes to glTF animations. .. rst-class:: classref-item-separator @@ -539,7 +557,7 @@ Returns the :ref:`AnimationPlayer` node with the given in :ref:`int` **get_animation_players_count**\ (\ idx\: :ref:`int`\ ) :ref:`🔗` -Returns the number of :ref:`AnimationPlayer` nodes in this **GLTFState**. These nodes are only used during the export process when converting Godot :ref:`AnimationPlayer` nodes to GLTF animations. +Returns the number of :ref:`AnimationPlayer` nodes in this **GLTFState**. These nodes are only used during the export process when converting Godot :ref:`AnimationPlayer` nodes to glTF animations. .. rst-class:: classref-item-separator @@ -551,7 +569,7 @@ Returns the number of :ref:`AnimationPlayer` nodes in thi :ref:`Array`\[:ref:`GLTFAnimation`\] **get_animations**\ (\ ) :ref:`🔗` -Returns an array of all :ref:`GLTFAnimation`\ s in the GLTF file. When importing, these will be generated as animations in an :ref:`AnimationPlayer` node. When exporting, these will be generated from Godot :ref:`AnimationPlayer` nodes. +Returns an array of all :ref:`GLTFAnimation`\ s in the glTF file. When importing, these will be generated as animations in an :ref:`AnimationPlayer` node. When exporting, these will be generated from Godot :ref:`AnimationPlayer` nodes. .. rst-class:: classref-item-separator @@ -577,7 +595,7 @@ Returns an array of all :ref:`GLTFAnimation`\ s in the GLTF :ref:`Array`\[:ref:`GLTFCamera`\] **get_cameras**\ (\ ) :ref:`🔗` -Returns an array of all :ref:`GLTFCamera`\ s in the GLTF file. These are the cameras that the :ref:`GLTFNode.camera` index refers to. +Returns an array of all :ref:`GLTFCamera`\ s in the glTF file. These are the cameras that the :ref:`GLTFNode.camera` index refers to. .. rst-class:: classref-item-separator @@ -603,7 +621,7 @@ Returns an array of all :ref:`GLTFCamera`\ s in the GLTF file. :ref:`Array`\[:ref:`Texture2D`\] **get_images**\ (\ ) :ref:`🔗` -Gets the images of the GLTF file as an array of :ref:`Texture2D`\ s. These are the images that the :ref:`GLTFTexture.src_image` index refers to. +Gets the images of the glTF file as an array of :ref:`Texture2D`\ s. These are the images that the :ref:`GLTFTexture.src_image` index refers to. .. rst-class:: classref-item-separator @@ -615,7 +633,7 @@ Gets the images of the GLTF file as an array of :ref:`Texture2D :ref:`Array`\[:ref:`GLTFLight`\] **get_lights**\ (\ ) :ref:`🔗` -Returns an array of all :ref:`GLTFLight`\ s in the GLTF file. These are the lights that the :ref:`GLTFNode.light` index refers to. +Returns an array of all :ref:`GLTFLight`\ s in the glTF file. These are the lights that the :ref:`GLTFNode.light` index refers to. .. rst-class:: classref-item-separator @@ -641,7 +659,7 @@ Returns an array of all :ref:`GLTFLight`\ s in the GLTF file. T :ref:`Array`\[:ref:`GLTFMesh`\] **get_meshes**\ (\ ) :ref:`🔗` -Returns an array of all :ref:`GLTFMesh`\ es in the GLTF file. These are the meshes that the :ref:`GLTFNode.mesh` index refers to. +Returns an array of all :ref:`GLTFMesh`\ es in the glTF file. These are the meshes that the :ref:`GLTFNode.mesh` index refers to. .. rst-class:: classref-item-separator @@ -667,7 +685,7 @@ Returns the index of the :ref:`GLTFNode` corresponding to this G :ref:`Array`\[:ref:`GLTFNode`\] **get_nodes**\ (\ ) :ref:`🔗` -Returns an array of all :ref:`GLTFNode`\ s in the GLTF file. These are the nodes that :ref:`GLTFNode.children` and :ref:`root_nodes` refer to. This includes nodes that may not be generated in the Godot scene, or nodes that may generate multiple Godot scene nodes. +Returns an array of all :ref:`GLTFNode`\ s in the glTF file. These are the nodes that :ref:`GLTFNode.children` and :ref:`root_nodes` refer to. This includes nodes that may not be generated in the Godot scene, or nodes that may generate multiple Godot scene nodes. .. rst-class:: classref-item-separator @@ -693,7 +711,7 @@ Returns the Godot scene node that corresponds to the same index as the :ref:`GLT :ref:`Array`\[:ref:`GLTFSkeleton`\] **get_skeletons**\ (\ ) :ref:`🔗` -Returns an array of all :ref:`GLTFSkeleton`\ s in the GLTF file. These are the skeletons that the :ref:`GLTFNode.skeleton` index refers to. +Returns an array of all :ref:`GLTFSkeleton`\ s in the glTF file. These are the skeletons that the :ref:`GLTFNode.skeleton` index refers to. .. rst-class:: classref-item-separator @@ -705,7 +723,7 @@ Returns an array of all :ref:`GLTFSkeleton`\ s in the GLTF f :ref:`Array`\[:ref:`GLTFSkin`\] **get_skins**\ (\ ) :ref:`🔗` -Returns an array of all :ref:`GLTFSkin`\ s in the GLTF file. These are the skins that the :ref:`GLTFNode.skin` index refers to. +Returns an array of all :ref:`GLTFSkin`\ s in the glTF file. These are the skins that the :ref:`GLTFNode.skin` index refers to. .. rst-class:: classref-item-separator @@ -717,7 +735,7 @@ Returns an array of all :ref:`GLTFSkin`\ s in the GLTF file. The :ref:`Array`\[:ref:`GLTFTextureSampler`\] **get_texture_samplers**\ (\ ) :ref:`🔗` -Retrieves the array of texture samplers that are used by the textures contained in the GLTF. +Retrieves the array of texture samplers that are used by the textures contained in the glTF. .. rst-class:: classref-item-separator @@ -783,7 +801,7 @@ Returns an array of unique node names. This is used in both the import process a Sets additional arbitrary data in this **GLTFState** instance. This can be used to keep per-file state data in :ref:`GLTFDocumentExtension` classes, which is important because they are stateless. -The first argument should be the :ref:`GLTFDocumentExtension` name (does not have to match the extension name in the GLTF file), and the second argument can be anything you want. +The first argument should be the :ref:`GLTFDocumentExtension` name (does not have to match the extension name in the glTF file), and the second argument can be anything you want. .. rst-class:: classref-item-separator @@ -933,7 +951,7 @@ Sets the :ref:`GLTFSkin`\ s in the state. These are the skins th |void| **set_texture_samplers**\ (\ texture_samplers\: :ref:`Array`\[:ref:`GLTFTextureSampler`\]\ ) :ref:`🔗` -Sets the array of texture samplers that are used by the textures contained in the GLTF. +Sets the array of texture samplers that are used by the textures contained in the glTF. .. rst-class:: classref-item-separator diff --git a/classes/class_gltftexture.rst b/classes/class_gltftexture.rst index 187d5364509..5dff769778a 100644 --- a/classes/class_gltftexture.rst +++ b/classes/class_gltftexture.rst @@ -12,7 +12,7 @@ GLTFTexture **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -GLTFTexture represents a texture in a GLTF file. +GLTFTexture represents a texture in a glTF file. .. rst-class:: classref-introduction-group diff --git a/classes/class_gltftexturesampler.rst b/classes/class_gltftexturesampler.rst index dad254a2c83..9e120d012d1 100644 --- a/classes/class_gltftexturesampler.rst +++ b/classes/class_gltftexturesampler.rst @@ -12,14 +12,14 @@ GLTFTextureSampler **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Represents a GLTF texture sampler +Represents a glTF texture sampler .. rst-class:: classref-introduction-group Description ----------- -Represents a texture sampler as defined by the base GLTF spec. Texture samplers in GLTF specify how to sample data from the texture's base image, when rendering the texture on an object. +Represents a texture sampler as defined by the base glTF spec. Texture samplers in glTF specify how to sample data from the texture's base image, when rendering the texture on an object. .. rst-class:: classref-introduction-group diff --git a/classes/class_graphedit.rst b/classes/class_graphedit.rst index 9baee6bee1c..884226e695f 100644 --- a/classes/class_graphedit.rst +++ b/classes/class_graphedit.rst @@ -296,6 +296,18 @@ Emitted when this **GraphEdit** captures a ``ui_copy`` action (:kbd:`Ctrl + C` b ---- +.. _class_GraphEdit_signal_cut_nodes_request: + +.. rst-class:: classref-signal + +**cut_nodes_request**\ (\ ) :ref:`🔗` + +Emitted when this **GraphEdit** captures a ``ui_cut`` action (:kbd:`Ctrl + X` by default). In general, this signal indicates that the selected :ref:`GraphElement`\ s should be cut. + +.. rst-class:: classref-item-separator + +---- + .. _class_GraphEdit_signal_delete_nodes_request: .. rst-class:: classref-signal diff --git a/classes/class_httpclient.rst b/classes/class_httpclient.rst index e91837ea0dd..6d6e5998302 100644 --- a/classes/class_httpclient.rst +++ b/classes/class_httpclient.rst @@ -35,7 +35,7 @@ For more information on HTTP, see `MDN's documentation on HTTP `__. If you host the server in question, you should modify its backend to allow requests from foreign origins by adding the ``Access-Control-Allow-Origin: *`` HTTP header. -\ **Note:** TLS support is currently limited to TLS 1.0, TLS 1.1, and TLS 1.2. Attempting to connect to a TLS 1.3-only server will return an error. +\ **Note:** TLS support is currently limited to TLSv1.2 and TLSv1.3. Attempting to connect to a server that only supports older (insecure) TLS versions will return an error. \ **Warning:** TLS certificate revocation and certificate pinning are currently not supported. Revoked certificates are accepted as long as they are otherwise valid. If this is a concern, you may want to use automatically managed certificates with a short validity period. @@ -930,9 +930,7 @@ Returns the response headers. :ref:`Dictionary` **get_response_headers_as_dictionary**\ (\ ) :ref:`🔗` -Returns all response headers as a Dictionary of structure ``{ "key": "value1; value2" }`` where the case-sensitivity of the keys and values is kept like the server delivers it. A value is a simple String, this string can have more than one value where "; " is used as separator. - -\ **Example:**\ +Returns all response headers as a :ref:`Dictionary`. Each entry is composed by the header name, and a :ref:`String` containing the values separated by ``"; "``. The casing is kept the same as the headers were received. :: diff --git a/classes/class_image.rst b/classes/class_image.rst index 4e594fca6d5..03479cc4f22 100644 --- a/classes/class_image.rst +++ b/classes/class_image.rst @@ -137,6 +137,8 @@ Methods +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_invisible`\ (\ ) |const| | +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`linear_to_srgb`\ (\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`load`\ (\ path\: :ref:`String`\ ) | +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`load_bmp_from_buffer`\ (\ buffer\: :ref:`PackedByteArray`\ ) | @@ -1382,6 +1384,18 @@ Returns ``true`` if all the image's pixels have an alpha value of 0. Returns ``f ---- +.. _class_Image_method_linear_to_srgb: + +.. rst-class:: classref-method + +|void| **linear_to_srgb**\ (\ ) :ref:`🔗` + +Converts the entire image from the linear colorspace to the sRGB colorspace. Only works on images with :ref:`FORMAT_RGB8` or :ref:`FORMAT_RGBA8` formats. + +.. rst-class:: classref-item-separator + +---- + .. _class_Image_method_load: .. rst-class:: classref-method @@ -1734,8 +1748,6 @@ Overwrites data of an existing **Image**. Non-static equivalent of :ref:`create_ Sets the :ref:`Color` of the pixel at ``(x, y)`` to ``color``. -\ **Example:**\ - .. tabs:: @@ -1771,8 +1783,6 @@ This is the same as :ref:`set_pixelv`, but with a Sets the :ref:`Color` of the pixel at ``point`` to ``color``. -\ **Example:**\ - .. tabs:: @@ -1818,7 +1828,7 @@ Shrinks the image by a factor of 2 on each axis (this divides the pixel count by |void| **srgb_to_linear**\ (\ ) :ref:`🔗` -Converts the raw data from the sRGB colorspace to a linear scale. +Converts the raw data from the sRGB colorspace to a linear scale. Only works on images with :ref:`FORMAT_RGB8` or :ref:`FORMAT_RGBA8` formats. .. |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_importermesh.rst b/classes/class_importermesh.rst index 45246548813..fbb9070e815 100644 --- a/classes/class_importermesh.rst +++ b/classes/class_importermesh.rst @@ -25,18 +25,6 @@ Unlike its runtime counterpart, **ImporterMesh** contains mesh data before vario .. rst-class:: classref-reftable-group -Properties ----------- - -.. table:: - :widths: auto - - +-------------------------------------+-------------------------------------------------+------------------------+ - | :ref:`Dictionary` | :ref:`_data` | ``{ "surfaces": [] }`` | - +-------------------------------------+-------------------------------------------------+------------------------+ - -.. rst-class:: classref-reftable-group - Methods ------- @@ -97,25 +85,6 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- - -.. _class_ImporterMesh_property__data: - -.. rst-class:: classref-property - -:ref:`Dictionary` **_data** = ``{ "surfaces": [] }`` :ref:`🔗` - -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! - -.. rst-class:: classref-section-separator - ----- - -.. rst-class:: classref-descriptions-group - Method Descriptions ------------------- diff --git a/classes/class_input.rst b/classes/class_input.rst index bae03e0b96f..cf5c2f9321d 100644 --- a/classes/class_input.rst +++ b/classes/class_input.rst @@ -672,6 +672,8 @@ On Linux: \ ``steam_input_index``: The Steam Input gamepad index, if the device is not a Steam Input device this key won't be present. +\ **Note:** The returned dictionary is always empty on Web, iOS, Android, and macOS. + .. rst-class:: classref-item-separator ---- @@ -934,8 +936,6 @@ Returns ``true`` if you are pressing the key in the physical location on the 101 Feeds an :ref:`InputEvent` to the game. Can be used to artificially trigger input events from code. Also generates :ref:`Node._input` calls. -\ **Example:**\ - .. tabs:: 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_inputeventmousemotion.rst b/classes/class_inputeventmousemotion.rst index c2a16ef66fb..f96c1679e06 100644 --- a/classes/class_inputeventmousemotion.rst +++ b/classes/class_inputeventmousemotion.rst @@ -23,6 +23,8 @@ Stores information about a mouse or a pen motion. This includes relative positio \ **Note:** By default, this event is only emitted once per frame rendered at most. If you need more precise input reporting, set :ref:`Input.use_accumulated_input` to ``false`` to make events emitted as often as possible. If you use InputEventMouseMotion to draw lines, consider implementing `Bresenham's line algorithm `__ as well to avoid visible gaps in lines if the user is moving the mouse quickly. +\ **Note:** This event may be emitted even when the mouse hasn't moved, either by the operating system or by Godot itself. If you really need to know if the mouse has moved (e.g. to suppress displaying a tooltip), you should check that ``relative.is_zero_approx()`` is ``false``. + .. rst-class:: classref-introduction-group Tutorials @@ -116,7 +118,7 @@ Represents the pressure the user puts on the pen. Ranges from ``0.0`` to ``1.0`` The mouse position relative to the previous position (position at the last frame). -\ **Note:** Since **InputEventMouseMotion** is only emitted when the mouse moves, the last event won't have a relative position of ``Vector2(0, 0)`` when the user stops moving the mouse. +\ **Note:** Since **InputEventMouseMotion** may only be emitted when the mouse moves, it is not possible to reliably detect when the mouse has stopped moving by checking this property. A separate, short timer may be necessary. \ **Note:** :ref:`relative` is automatically scaled according to the content scale factor, which is defined by the project's stretch mode settings. This means mouse sensitivity will appear different depending on resolution when using :ref:`relative` in a script that handles mouse aiming with the :ref:`Input.MOUSE_MODE_CAPTURED` mouse mode. To avoid this, use :ref:`screen_relative` instead. @@ -137,7 +139,9 @@ The mouse position relative to the previous position (position at the last frame The unscaled mouse position relative to the previous position in the coordinate system of the screen (position at the last frame). -\ **Note:** Since **InputEventMouseMotion** is only emitted when the mouse moves, the last event won't have a relative position of ``Vector2(0, 0)`` when the user stops moving the mouse. This coordinate is *not* scaled according to the content scale factor or calls to :ref:`InputEvent.xformed_by`. This should be preferred over :ref:`relative` for mouse aiming when using the :ref:`Input.MOUSE_MODE_CAPTURED` mouse mode, regardless of the project's stretch mode. +\ **Note:** Since **InputEventMouseMotion** may only be emitted when the mouse moves, it is not possible to reliably detect when the mouse has stopped moving by checking this property. A separate, short timer may be necessary. + +\ **Note:** This coordinate is *not* scaled according to the content scale factor or calls to :ref:`InputEvent.xformed_by`. This should be preferred over :ref:`relative` for mouse aiming when using the :ref:`Input.MOUSE_MODE_CAPTURED` mouse mode, regardless of the project's stretch mode. .. rst-class:: classref-item-separator diff --git a/classes/class_inputeventshortcut.rst b/classes/class_inputeventshortcut.rst index 8a1170f1f5d..bdebcaf978a 100644 --- a/classes/class_inputeventshortcut.rst +++ b/classes/class_inputeventshortcut.rst @@ -19,7 +19,7 @@ Represents a triggered keyboard :ref:`Shortcut`. Description ----------- -InputEventShortcut is a special event that can be received in :ref:`Node._unhandled_key_input`. It is typically sent by the editor's Command Palette to trigger actions, but can also be sent manually using :ref:`Viewport.push_input`. +InputEventShortcut is a special event that can be received in :ref:`Node._input`, :ref:`Node._shortcut_input`, and :ref:`Node._unhandled_input`. It is typically sent by the editor's Command Palette to trigger actions, but can also be sent manually using :ref:`Viewport.push_input`. .. rst-class:: classref-reftable-group diff --git a/classes/class_inputmap.rst b/classes/class_inputmap.rst index e28b63284fb..406fc00140d 100644 --- a/classes/class_inputmap.rst +++ b/classes/class_inputmap.rst @@ -51,7 +51,7 @@ Methods +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`action_set_deadzone`\ (\ action\: :ref:`StringName`, deadzone\: :ref:`float`\ ) | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`add_action`\ (\ action\: :ref:`StringName`, deadzone\: :ref:`float` = 0.5\ ) | + | |void| | :ref:`add_action`\ (\ action\: :ref:`StringName`, deadzone\: :ref:`float` = 0.2\ ) | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`erase_action`\ (\ action\: :ref:`StringName`\ ) | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -163,7 +163,7 @@ Sets a deadzone value for the action. .. rst-class:: classref-method -|void| **add_action**\ (\ action\: :ref:`StringName`, deadzone\: :ref:`float` = 0.5\ ) :ref:`🔗` +|void| **add_action**\ (\ action\: :ref:`StringName`, deadzone\: :ref:`float` = 0.2\ ) :ref:`🔗` Adds an empty action to the **InputMap** with a configurable ``deadzone``. diff --git a/classes/class_itemlist.rst b/classes/class_itemlist.rst index 85458737052..0a8477db865 100644 --- a/classes/class_itemlist.rst +++ b/classes/class_itemlist.rst @@ -46,6 +46,8 @@ Properties +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`auto_height` | ``false`` | +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`auto_width` | ``false`` | + +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | clip_contents | ``true`` (overrides :ref:`Control`) | +---------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`int` | :ref:`fixed_column_width` | ``0`` | @@ -79,97 +81,101 @@ Methods .. table:: :widths: auto - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`add_icon_item`\ (\ icon\: :ref:`Texture2D`, selectable\: :ref:`bool` = true\ ) | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`add_item`\ (\ text\: :ref:`String`, icon\: :ref:`Texture2D` = null, selectable\: :ref:`bool` = true\ ) | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`clear`\ (\ ) | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`deselect`\ (\ idx\: :ref:`int`\ ) | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`deselect_all`\ (\ ) | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`ensure_current_is_visible`\ (\ ) | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`force_update_list_size`\ (\ ) | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_item_at_position`\ (\ position\: :ref:`Vector2`, exact\: :ref:`bool` = false\ ) |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`get_item_custom_bg_color`\ (\ idx\: :ref:`int`\ ) |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`get_item_custom_fg_color`\ (\ idx\: :ref:`int`\ ) |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D` | :ref:`get_item_icon`\ (\ idx\: :ref:`int`\ ) |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`get_item_icon_modulate`\ (\ idx\: :ref:`int`\ ) |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2` | :ref:`get_item_icon_region`\ (\ idx\: :ref:`int`\ ) |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_item_language`\ (\ idx\: :ref:`int`\ ) |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`get_item_metadata`\ (\ idx\: :ref:`int`\ ) |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2` | :ref:`get_item_rect`\ (\ idx\: :ref:`int`, expand\: :ref:`bool` = true\ ) |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_item_text`\ (\ idx\: :ref:`int`\ ) |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TextDirection` | :ref:`get_item_text_direction`\ (\ idx\: :ref:`int`\ ) |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_item_tooltip`\ (\ idx\: :ref:`int`\ ) |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array` | :ref:`get_selected_items`\ (\ ) | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`VScrollBar` | :ref:`get_v_scroll_bar`\ (\ ) | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_anything_selected`\ (\ ) | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_item_disabled`\ (\ idx\: :ref:`int`\ ) |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_item_icon_transposed`\ (\ idx\: :ref:`int`\ ) |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_item_selectable`\ (\ idx\: :ref:`int`\ ) |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_item_tooltip_enabled`\ (\ idx\: :ref:`int`\ ) |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_selected`\ (\ idx\: :ref:`int`\ ) |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`move_item`\ (\ from_idx\: :ref:`int`, to_idx\: :ref:`int`\ ) | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`remove_item`\ (\ idx\: :ref:`int`\ ) | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`select`\ (\ idx\: :ref:`int`, single\: :ref:`bool` = true\ ) | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_item_custom_bg_color`\ (\ idx\: :ref:`int`, custom_bg_color\: :ref:`Color`\ ) | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_item_custom_fg_color`\ (\ idx\: :ref:`int`, custom_fg_color\: :ref:`Color`\ ) | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_item_disabled`\ (\ idx\: :ref:`int`, disabled\: :ref:`bool`\ ) | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_item_icon`\ (\ idx\: :ref:`int`, icon\: :ref:`Texture2D`\ ) | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_item_icon_modulate`\ (\ idx\: :ref:`int`, modulate\: :ref:`Color`\ ) | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_item_icon_region`\ (\ idx\: :ref:`int`, rect\: :ref:`Rect2`\ ) | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_item_icon_transposed`\ (\ idx\: :ref:`int`, transposed\: :ref:`bool`\ ) | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_item_language`\ (\ idx\: :ref:`int`, language\: :ref:`String`\ ) | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_item_metadata`\ (\ idx\: :ref:`int`, metadata\: :ref:`Variant`\ ) | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_item_selectable`\ (\ idx\: :ref:`int`, selectable\: :ref:`bool`\ ) | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_item_text`\ (\ idx\: :ref:`int`, text\: :ref:`String`\ ) | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_item_text_direction`\ (\ idx\: :ref:`int`, direction\: :ref:`TextDirection`\ ) | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_item_tooltip`\ (\ idx\: :ref:`int`, tooltip\: :ref:`String`\ ) | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_item_tooltip_enabled`\ (\ idx\: :ref:`int`, enable\: :ref:`bool`\ ) | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`sort_items_by_text`\ (\ ) | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`add_icon_item`\ (\ icon\: :ref:`Texture2D`, selectable\: :ref:`bool` = true\ ) | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`add_item`\ (\ text\: :ref:`String`, icon\: :ref:`Texture2D` = null, selectable\: :ref:`bool` = true\ ) | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear`\ (\ ) | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`deselect`\ (\ idx\: :ref:`int`\ ) | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`deselect_all`\ (\ ) | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`ensure_current_is_visible`\ (\ ) | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`force_update_list_size`\ (\ ) | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_item_at_position`\ (\ position\: :ref:`Vector2`, exact\: :ref:`bool` = false\ ) |const| | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AutoTranslateMode` | :ref:`get_item_auto_translate_mode`\ (\ idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_item_custom_bg_color`\ (\ idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_item_custom_fg_color`\ (\ idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`get_item_icon`\ (\ idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_item_icon_modulate`\ (\ idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`get_item_icon_region`\ (\ idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_item_language`\ (\ idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_item_metadata`\ (\ idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`get_item_rect`\ (\ idx\: :ref:`int`, expand\: :ref:`bool` = true\ ) |const| | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_item_text`\ (\ idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TextDirection` | :ref:`get_item_text_direction`\ (\ idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_item_tooltip`\ (\ idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_selected_items`\ (\ ) | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`VScrollBar` | :ref:`get_v_scroll_bar`\ (\ ) | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_anything_selected`\ (\ ) | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_item_disabled`\ (\ idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_item_icon_transposed`\ (\ idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_item_selectable`\ (\ idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_item_tooltip_enabled`\ (\ idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_selected`\ (\ idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`move_item`\ (\ from_idx\: :ref:`int`, to_idx\: :ref:`int`\ ) | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_item`\ (\ idx\: :ref:`int`\ ) | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`select`\ (\ idx\: :ref:`int`, single\: :ref:`bool` = true\ ) | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_auto_translate_mode`\ (\ idx\: :ref:`int`, mode\: :ref:`AutoTranslateMode`\ ) | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_custom_bg_color`\ (\ idx\: :ref:`int`, custom_bg_color\: :ref:`Color`\ ) | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_custom_fg_color`\ (\ idx\: :ref:`int`, custom_fg_color\: :ref:`Color`\ ) | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_disabled`\ (\ idx\: :ref:`int`, disabled\: :ref:`bool`\ ) | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_icon`\ (\ idx\: :ref:`int`, icon\: :ref:`Texture2D`\ ) | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_icon_modulate`\ (\ idx\: :ref:`int`, modulate\: :ref:`Color`\ ) | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_icon_region`\ (\ idx\: :ref:`int`, rect\: :ref:`Rect2`\ ) | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_icon_transposed`\ (\ idx\: :ref:`int`, transposed\: :ref:`bool`\ ) | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_language`\ (\ idx\: :ref:`int`, language\: :ref:`String`\ ) | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_metadata`\ (\ idx\: :ref:`int`, metadata\: :ref:`Variant`\ ) | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_selectable`\ (\ idx\: :ref:`int`, selectable\: :ref:`bool`\ ) | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_text`\ (\ idx\: :ref:`int`, text\: :ref:`String`\ ) | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_text_direction`\ (\ idx\: :ref:`int`, direction\: :ref:`TextDirection`\ ) | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_tooltip`\ (\ idx\: :ref:`int`, tooltip\: :ref:`String`\ ) | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_tooltip_enabled`\ (\ idx\: :ref:`int`, enable\: :ref:`bool`\ ) | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`sort_items_by_text`\ (\ ) | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -234,7 +240,9 @@ Signals **empty_clicked**\ (\ at_position\: :ref:`Vector2`, mouse_button_index\: :ref:`int`\ ) :ref:`🔗` -Triggered when any mouse click is issued within the rect of the list but on empty space. +Emitted when any mouse click is issued within the rect of the list but on empty space. + +\ ``at_position`` is the click position in this control's local coordinate system. .. rst-class:: classref-item-separator @@ -246,7 +254,7 @@ Triggered when any mouse click is issued within the rect of the list but on empt **item_activated**\ (\ index\: :ref:`int`\ ) :ref:`🔗` -Triggered when specified list item is activated via double-clicking or by pressing :kbd:`Enter`. +Emitted when specified list item is activated via double-clicking or by pressing :kbd:`Enter`. .. rst-class:: classref-item-separator @@ -258,9 +266,9 @@ Triggered when specified list item is activated via double-clicking or by pressi **item_clicked**\ (\ index\: :ref:`int`, at_position\: :ref:`Vector2`, mouse_button_index\: :ref:`int`\ ) :ref:`🔗` -Triggered when specified list item has been clicked with any mouse button. +Emitted when specified list item has been clicked with any mouse button. -The click position is also provided to allow appropriate popup of context menus at the correct location. +\ ``at_position`` is the click position in this control's local coordinate system. .. rst-class:: classref-item-separator @@ -272,7 +280,7 @@ The click position is also provided to allow appropriate popup of context menus **item_selected**\ (\ index\: :ref:`int`\ ) :ref:`🔗` -Triggered when specified item has been selected. +Emitted when specified item has been selected. Only applicable in single selection mode. \ :ref:`allow_reselect` must be enabled to reselect an item. @@ -286,7 +294,7 @@ Triggered when specified item has been selected. **multi_selected**\ (\ index\: :ref:`int`, selected\: :ref:`bool`\ ) :ref:`🔗` -Triggered when a multiple selection is altered on a list allowing multiple selection. +Emitted when a multiple selection is altered on a list allowing multiple selection. .. rst-class:: classref-section-separator @@ -422,6 +430,23 @@ If ``true``, the control will automatically resize the height to fit its content ---- +.. _class_ItemList_property_auto_width: + +.. rst-class:: classref-property + +:ref:`bool` **auto_width** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_auto_width**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **has_auto_width**\ (\ ) + +If ``true``, the control will automatically resize the width to fit its content. + +.. rst-class:: classref-item-separator + +---- + .. _class_ItemList_property_fixed_column_width: .. rst-class:: classref-property @@ -713,6 +738,18 @@ When there is no item at that point, -1 will be returned if ``exact`` is ``true` ---- +.. _class_ItemList_method_get_item_auto_translate_mode: + +.. rst-class:: classref-method + +:ref:`AutoTranslateMode` **get_item_auto_translate_mode**\ (\ idx\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns item's auto translate mode. + +.. rst-class:: classref-item-separator + +---- + .. _class_ItemList_method_get_item_custom_bg_color: .. rst-class:: classref-method @@ -983,6 +1020,20 @@ Select the item at the specified index. ---- +.. _class_ItemList_method_set_item_auto_translate_mode: + +.. rst-class:: classref-method + +|void| **set_item_auto_translate_mode**\ (\ idx\: :ref:`int`, mode\: :ref:`AutoTranslateMode`\ ) :ref:`🔗` + +Sets the auto translate mode of the item associated with the specified index. + +Items use :ref:`Node.AUTO_TRANSLATE_MODE_INHERIT` by default, which uses the same auto translate mode as the **ItemList** itself. + +.. rst-class:: classref-item-separator + +---- + .. _class_ItemList_method_set_item_custom_bg_color: .. rst-class:: classref-method 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_javascriptobject.rst b/classes/class_javascriptobject.rst index f42c6517c1d..87addd31d18 100644 --- a/classes/class_javascriptobject.rst +++ b/classes/class_javascriptobject.rst @@ -21,8 +21,6 @@ Description JavaScriptObject is used to interact with JavaScript objects retrieved or created via :ref:`JavaScriptBridge.get_interface`, :ref:`JavaScriptBridge.create_object`, or :ref:`JavaScriptBridge.create_callback`. -\ **Example:**\ - :: extends Node diff --git a/classes/class_json.rst b/classes/class_json.rst index 8276d936dcf..b741881af36 100644 --- a/classes/class_json.rst +++ b/classes/class_json.rst @@ -19,13 +19,11 @@ Helper class for creating and parsing JSON data. Description ----------- -The **JSON** enables all data types to be converted to and from a JSON string. This useful for serializing data to save to a file or send over the network. +The **JSON** class enables all data types to be converted to and from a JSON string. This is useful for serializing data, e.g. to save to a file or send over the network. \ :ref:`stringify` is used to convert any data type into a JSON string. -\ :ref:`parse` is used to convert any existing JSON data into a :ref:`Variant` that can be used within Godot. If successfully parsed, use :ref:`data` to retrieve the :ref:`Variant`, and use ``typeof`` to check if the Variant's type is what you expect. JSON Objects are converted into a :ref:`Dictionary`, but JSON data can be used to store :ref:`Array`\ s, numbers, :ref:`String`\ s and even just a boolean. - -\ **Example**\ +\ :ref:`parse` is used to convert any existing JSON data into a :ref:`Variant` that can be used within Godot. If successfully parsed, use :ref:`data` to retrieve the :ref:`Variant`, and use :ref:`@GlobalScope.typeof` to check if the Variant's type is what you expect. JSON Objects are converted into a :ref:`Dictionary`, but JSON data can be used to store :ref:`Array`\ s, numbers, :ref:`String`\ s and even just a boolean. :: @@ -45,7 +43,7 @@ The **JSON** enables all data types to be converted to and from a JSON string. T else: print("JSON Parse Error: ", json.get_error_message(), " in ", json_string, " at line ", json.get_error_line()) -Alternatively, you can parse string using the static :ref:`parse_string` method, but it doesn't allow to handle errors. +Alternatively, you can parse strings using the static :ref:`parse_string` method, but it doesn't handle errors. :: @@ -59,7 +57,7 @@ Alternatively, you can parse string using the static :ref:`parse_string` which is generally more lax than the JSON specification. -- Certain errors, such as invalid Unicode sequences, do not cause a parser error. Instead, the string is cleansed and an error is logged to the console. +- Certain errors, such as invalid Unicode sequences, do not cause a parser error. Instead, the string is cleaned up and an error is logged to the console. .. rst-class:: classref-reftable-group @@ -81,6 +79,8 @@ Methods .. table:: :widths: auto + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`from_native`\ (\ variant\: :ref:`Variant`, allow_classes\: :ref:`bool` = false, allow_scripts\: :ref:`bool` = false\ ) |static| | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_error_line`\ (\ ) |const| | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -94,6 +94,8 @@ Methods +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`stringify`\ (\ data\: :ref:`Variant`, indent\: :ref:`String` = "", sort_keys\: :ref:`bool` = true, full_precision\: :ref:`bool` = false\ ) |static| | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`to_native`\ (\ json\: :ref:`Variant`, allow_classes\: :ref:`bool` = false, allow_scripts\: :ref:`bool` = false\ ) |static| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -126,6 +128,20 @@ Contains the parsed JSON data in :ref:`Variant` form. Method Descriptions ------------------- +.. _class_JSON_method_from_native: + +.. rst-class:: classref-method + +:ref:`Variant` **from_native**\ (\ variant\: :ref:`Variant`, allow_classes\: :ref:`bool` = false, allow_scripts\: :ref:`bool` = false\ ) |static| :ref:`🔗` + +Converts a native engine type to a JSON-compliant dictionary. + +By default, classes and scripts are ignored for security reasons, unless ``allow_classes`` or ``allow_scripts`` are specified. + +.. rst-class:: classref-item-separator + +---- + .. _class_JSON_method_get_error_line: .. rst-class:: classref-method @@ -156,7 +172,7 @@ Returns an empty string if the last call to :ref:`parse :ref:`String` **get_parsed_text**\ (\ ) |const| :ref:`🔗` -Return the text parsed by :ref:`parse` as long as the function is instructed to keep it. +Return the text parsed by :ref:`parse` (requires passing ``keep_text`` to :ref:`parse`). .. rst-class:: classref-item-separator @@ -170,7 +186,7 @@ Return the text parsed by :ref:`parse` as long as the f Attempts to parse the ``json_text`` provided. -Returns an :ref:`Error`. If the parse was successful, it returns :ref:`@GlobalScope.OK` and the result can be retrieved using :ref:`data`. If unsuccessful, use :ref:`get_error_line` and :ref:`get_error_message` for identifying the source of the failure. +Returns an :ref:`Error`. If the parse was successful, it returns :ref:`@GlobalScope.OK` and the result can be retrieved using :ref:`data`. If unsuccessful, use :ref:`get_error_line` and :ref:`get_error_message` to identify the source of the failure. Non-static variant of :ref:`parse_string`, if you want custom error handling. @@ -204,7 +220,7 @@ Converts a :ref:`Variant` var to JSON text and returns the result \ **Note:** If ``full_precision`` is ``true``, when stringifying floats, the unreliable digits are stringified in addition to the reliable digits to guarantee exact decoding. -The ``indent`` parameter controls if and how something is indented, the string used for this parameter will be used where there should be an indent in the output, even spaces like ``" "`` will work. ``\t`` and ``\n`` can also be used for a tab indent, or to make a newline for each indent respectively. +The ``indent`` parameter controls if and how something is indented; its contents will be used where there should be an indent in the output. Even spaces like ``" "`` will work. ``\t`` and ``\n`` can also be used for a tab indent, or to make a newline for each indent respectively. \ **Example output:**\ @@ -245,6 +261,20 @@ The ``indent`` parameter controls if and how something is indented, the string u ...] } +.. rst-class:: classref-item-separator + +---- + +.. _class_JSON_method_to_native: + +.. rst-class:: classref-method + +:ref:`Variant` **to_native**\ (\ json\: :ref:`Variant`, allow_classes\: :ref:`bool` = false, allow_scripts\: :ref:`bool` = false\ ) |static| :ref:`🔗` + +Converts a JSON-compliant dictionary that was created with :ref:`from_native` back to native engine types. + +By default, classes and scripts are ignored for security reasons, unless ``allow_classes`` or ``allow_scripts`` are specified. + .. |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_label.rst b/classes/class_label.rst index 909c66b28b5..f1230f65431 100644 --- a/classes/class_label.rst +++ b/classes/class_label.rst @@ -225,7 +225,7 @@ Controls the text's horizontal alignment. Supports left, center, right, and fill - |void| **set_justification_flags**\ (\ value\: |bitfield|\[:ref:`JustificationFlag`\]\ ) - |bitfield|\[:ref:`JustificationFlag`\] **get_justification_flags**\ (\ ) -Line fill alignment rules. For more info see :ref:`JustificationFlag`. +Line fill alignment rules. See :ref:`JustificationFlag` for more information. .. rst-class:: classref-item-separator @@ -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_label3d.rst b/classes/class_label3d.rst index 594fc95ac52..7fe374de68a 100644 --- a/classes/class_label3d.rst +++ b/classes/class_label3d.rst @@ -454,7 +454,7 @@ Controls the text's horizontal alignment. Supports left, center, right, and fill - |void| **set_justification_flags**\ (\ value\: |bitfield|\[:ref:`JustificationFlag`\]\ ) - |bitfield|\[:ref:`JustificationFlag`\] **get_justification_flags**\ (\ ) -Line fill alignment rules. For more info see :ref:`JustificationFlag`. +Line fill alignment rules. See :ref:`JustificationFlag` for more information. .. rst-class:: classref-item-separator diff --git a/classes/class_lineedit.rst b/classes/class_lineedit.rst index a084669c4cc..04d45d011c6 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 (by default :kbd:`Enter` or :kbd:`Kp Enter`). + +- To exit edit mode, press ``ui_text_submit`` or ``ui_cancel`` (by default :kbd:`Escape`) actions. + +- Check :ref:`edit`, :ref:`unedit`, :ref:`is_editing`, and :ref:`editing_toggled` for more information. + +\ **Important:**\ + +- Focusing the **LineEdit** with ``ui_focus_next`` (by default :kbd:`Tab`) or ``ui_focus_prev`` (by 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`\ (\ ) | +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ @@ -157,6 +175,8 @@ Methods +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`deselect`\ (\ ) | +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`edit`\ (\ ) | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PopupMenu` | :ref:`get_menu`\ (\ ) |const| | +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_scroll_offset`\ (\ ) |const| | @@ -167,10 +187,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`\ ) | @@ -179,6 +207,8 @@ Methods +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`select_all`\ (\ ) | +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`unedit`\ (\ ) | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -235,6 +265,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 @@ -265,7 +307,7 @@ Emitted when the text changes. **text_submitted**\ (\ new_text\: :ref:`String`\ ) :ref:`🔗` -Emitted when the user presses :ref:`@GlobalScope.KEY_ENTER` on the **LineEdit**. +Emitted when the user presses the ``ui_text_submit`` action (by default: :kbd:`Enter` or :kbd:`Kp Enter`) while the **LineEdit** has focus. .. rst-class:: classref-section-separator @@ -887,9 +929,9 @@ Language code used for line-breaking and text shaping algorithms. If left empty, Maximum number of characters that can be entered inside the **LineEdit**. If ``0``, there is no limit. -When a limit is defined, characters that would exceed :ref:`max_length` are truncated. This happens both for existing :ref:`text` contents when setting the max length, or for new text inserted in the **LineEdit**, including pasting. If any input text is truncated, the :ref:`text_change_rejected` signal is emitted with the truncated substring as parameter. +When a limit is defined, characters that would exceed :ref:`max_length` are truncated. This happens both for existing :ref:`text` contents when setting the max length, or for new text inserted in the **LineEdit**, including pasting. -\ **Example:**\ +If any input text is truncated, the :ref:`text_change_rejected` signal is emitted with the truncated substring as parameter: .. tabs:: @@ -1167,6 +1209,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 @@ -1215,6 +1281,20 @@ Clears the current selection. ---- +.. _class_LineEdit_method_edit: + +.. rst-class:: classref-method + +|void| **edit**\ (\ ) :ref:`🔗` + +Allows entering edit mode whether the **LineEdit** is focused or not. + +Use :ref:`Callable.call_deferred` if you want to enter edit mode on :ref:`text_submitted`. + +.. rst-class:: classref-item-separator + +---- + .. _class_LineEdit_method_get_menu: .. rst-class:: classref-method @@ -1322,6 +1402,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 +1438,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 +1462,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 @@ -1409,6 +1537,18 @@ Selects characters inside **LineEdit** between ``from`` and ``to``. By default, Selects the whole :ref:`String`. +.. rst-class:: classref-item-separator + +---- + +.. _class_LineEdit_method_unedit: + +.. rst-class:: classref-method + +|void| **unedit**\ (\ ) :ref:`🔗` + +Allows exiting edit mode while preserving focus. + .. rst-class:: classref-section-separator ---- diff --git a/classes/class_linkbutton.rst b/classes/class_linkbutton.rst index 6a6f3fca4d4..6fd24d30a39 100644 --- a/classes/class_linkbutton.rst +++ b/classes/class_linkbutton.rst @@ -248,8 +248,6 @@ The underline mode to use for the text. See :ref:`UnderlineMode`__ for this **LinkButton**. If set to a valid URI, pressing the button opens the URI using the operating system's default program for the protocol (via :ref:`OS.shell_open`). HTTP and HTTPS URLs open the default web browser. -\ **Examples:**\ - .. tabs:: 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_meshdatatool.rst b/classes/class_meshdatatool.rst index befab3f9868..40f22a67cf5 100644 --- a/classes/class_meshdatatool.rst +++ b/classes/class_meshdatatool.rst @@ -320,9 +320,7 @@ Calculates and returns the face normal of the given face. Returns the specified vertex index of the given face. -Vertex argument must be either 0, 1, or 2 because faces contain three vertices. - -\ **Example:**\ +\ ``vertex`` must be either ``0``, ``1``, or ``2`` because faces contain three vertices. .. tabs:: 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_mobilevrinterface.rst b/classes/class_mobilevrinterface.rst index 14b69591f74..b5bcd4ce413 100644 --- a/classes/class_mobilevrinterface.rst +++ b/classes/class_mobilevrinterface.rst @@ -29,7 +29,7 @@ You can initialize this interface as follows: var interface = XRServer.find_interface("Native mobile") if interface and interface.initialize(): - get_viewport().xr = true + get_viewport().use_xr = true .. rst-class:: classref-reftable-group diff --git a/classes/class_multimesh.rst b/classes/class_multimesh.rst index e212c9e387b..8cdee6bb9b4 100644 --- a/classes/class_multimesh.rst +++ b/classes/class_multimesh.rst @@ -53,31 +53,33 @@ Properties .. table:: :widths: auto - +--------------------------------------------------------+--------------------------------------------------------------------------------+----------------------------+ - | :ref:`PackedFloat32Array` | :ref:`buffer` | ``PackedFloat32Array()`` | - +--------------------------------------------------------+--------------------------------------------------------------------------------+----------------------------+ - | :ref:`PackedColorArray` | :ref:`color_array` | | - +--------------------------------------------------------+--------------------------------------------------------------------------------+----------------------------+ - | :ref:`AABB` | :ref:`custom_aabb` | ``AABB(0, 0, 0, 0, 0, 0)`` | - +--------------------------------------------------------+--------------------------------------------------------------------------------+----------------------------+ - | :ref:`PackedColorArray` | :ref:`custom_data_array` | | - +--------------------------------------------------------+--------------------------------------------------------------------------------+----------------------------+ - | :ref:`int` | :ref:`instance_count` | ``0`` | - +--------------------------------------------------------+--------------------------------------------------------------------------------+----------------------------+ - | :ref:`Mesh` | :ref:`mesh` | | - +--------------------------------------------------------+--------------------------------------------------------------------------------+----------------------------+ - | :ref:`PackedVector2Array` | :ref:`transform_2d_array` | | - +--------------------------------------------------------+--------------------------------------------------------------------------------+----------------------------+ - | :ref:`PackedVector3Array` | :ref:`transform_array` | | - +--------------------------------------------------------+--------------------------------------------------------------------------------+----------------------------+ - | :ref:`TransformFormat` | :ref:`transform_format` | ``0`` | - +--------------------------------------------------------+--------------------------------------------------------------------------------+----------------------------+ - | :ref:`bool` | :ref:`use_colors` | ``false`` | - +--------------------------------------------------------+--------------------------------------------------------------------------------+----------------------------+ - | :ref:`bool` | :ref:`use_custom_data` | ``false`` | - +--------------------------------------------------------+--------------------------------------------------------------------------------+----------------------------+ - | :ref:`int` | :ref:`visible_instance_count` | ``-1`` | - +--------------------------------------------------------+--------------------------------------------------------------------------------+----------------------------+ + +--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`PackedFloat32Array` | :ref:`buffer` | ``PackedFloat32Array()`` | + +--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`PackedColorArray` | :ref:`color_array` | | + +--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`AABB` | :ref:`custom_aabb` | ``AABB(0, 0, 0, 0, 0, 0)`` | + +--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`PackedColorArray` | :ref:`custom_data_array` | | + +--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`int` | :ref:`instance_count` | ``0`` | + +--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Mesh` | :ref:`mesh` | | + +--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`PhysicsInterpolationQuality` | :ref:`physics_interpolation_quality` | ``0`` | + +--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`PackedVector2Array` | :ref:`transform_2d_array` | | + +--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`PackedVector3Array` | :ref:`transform_array` | | + +--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`TransformFormat` | :ref:`transform_format` | ``0`` | + +--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`bool` | :ref:`use_colors` | ``false`` | + +--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`bool` | :ref:`use_custom_data` | ``false`` | + +--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`int` | :ref:`visible_instance_count` | ``-1`` | + +--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+----------------------------+ .. rst-class:: classref-reftable-group @@ -87,25 +89,29 @@ Methods .. table:: :widths: auto - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AABB` | :ref:`get_aabb`\ (\ ) |const| | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`get_instance_color`\ (\ instance\: :ref:`int`\ ) |const| | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`get_instance_custom_data`\ (\ instance\: :ref:`int`\ ) |const| | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`get_instance_transform`\ (\ instance\: :ref:`int`\ ) |const| | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D` | :ref:`get_instance_transform_2d`\ (\ instance\: :ref:`int`\ ) |const| | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_instance_color`\ (\ instance\: :ref:`int`, color\: :ref:`Color`\ ) | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_instance_custom_data`\ (\ instance\: :ref:`int`, custom_data\: :ref:`Color`\ ) | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_instance_transform`\ (\ instance\: :ref:`int`, transform\: :ref:`Transform3D`\ ) | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_instance_transform_2d`\ (\ instance\: :ref:`int`, transform\: :ref:`Transform2D`\ ) | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB` | :ref:`get_aabb`\ (\ ) |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_instance_color`\ (\ instance\: :ref:`int`\ ) |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_instance_custom_data`\ (\ instance\: :ref:`int`\ ) |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`get_instance_transform`\ (\ instance\: :ref:`int`\ ) |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`get_instance_transform_2d`\ (\ instance\: :ref:`int`\ ) |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reset_instance_physics_interpolation`\ (\ instance\: :ref:`int`\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_buffer_interpolated`\ (\ buffer_curr\: :ref:`PackedFloat32Array`, buffer_prev\: :ref:`PackedFloat32Array`\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_instance_color`\ (\ instance\: :ref:`int`, color\: :ref:`Color`\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_instance_custom_data`\ (\ instance\: :ref:`int`, custom_data\: :ref:`Color`\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_instance_transform`\ (\ instance\: :ref:`int`, transform\: :ref:`Transform3D`\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_instance_transform_2d`\ (\ instance\: :ref:`int`, transform\: :ref:`Transform2D`\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -138,6 +144,32 @@ Use this when using 2D transforms. Use this when using 3D transforms. +.. rst-class:: classref-item-separator + +---- + +.. _enum_MultiMesh_PhysicsInterpolationQuality: + +.. rst-class:: classref-enumeration + +enum **PhysicsInterpolationQuality**: :ref:`🔗` + +.. _class_MultiMesh_constant_INTERP_QUALITY_FAST: + +.. rst-class:: classref-enumeration-constant + +:ref:`PhysicsInterpolationQuality` **INTERP_QUALITY_FAST** = ``0`` + +Always interpolate using Basis lerping, which can produce warping artifacts in some situations. + +.. _class_MultiMesh_constant_INTERP_QUALITY_HIGH: + +.. rst-class:: classref-enumeration-constant + +:ref:`PhysicsInterpolationQuality` **INTERP_QUALITY_HIGH** = ``1`` + +Attempt to interpolate using Basis slerping (spherical linear interpolation) where possible, otherwise fall back to lerping. + .. rst-class:: classref-section-separator ---- @@ -162,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 ---- @@ -253,6 +287,27 @@ The looks of the individual instances can be modified using :ref:`set_instance_c ---- +.. _class_MultiMesh_property_physics_interpolation_quality: + +.. rst-class:: classref-property + +:ref:`PhysicsInterpolationQuality` **physics_interpolation_quality** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_physics_interpolation_quality**\ (\ value\: :ref:`PhysicsInterpolationQuality`\ ) +- :ref:`PhysicsInterpolationQuality` **get_physics_interpolation_quality**\ (\ ) + +Choose whether to use an interpolation method that favors speed or quality. + +When using low physics tick rates (typically below 20) or high rates of object rotation, you may get better results from the high quality setting. + +\ **Note:** Fast quality does not equate to low quality. Except in the special cases mentioned above, the quality should be comparable to high quality. + +.. rst-class:: classref-item-separator + +---- + .. _class_MultiMesh_property_transform_2d_array: .. rst-class:: classref-property @@ -418,6 +473,36 @@ Returns the :ref:`Transform2D` of a specific instance. ---- +.. _class_MultiMesh_method_reset_instance_physics_interpolation: + +.. rst-class:: classref-method + +|void| **reset_instance_physics_interpolation**\ (\ instance\: :ref:`int`\ ) :ref:`🔗` + +When using *physics interpolation*, this function allows you to prevent interpolation on an instance in the current physics tick. + +This allows you to move instances instantaneously, and should usually be used when initially placing an instance such as a bullet to prevent graphical glitches. + +.. rst-class:: classref-item-separator + +---- + +.. _class_MultiMesh_method_set_buffer_interpolated: + +.. rst-class:: classref-method + +|void| **set_buffer_interpolated**\ (\ buffer_curr\: :ref:`PackedFloat32Array`, buffer_prev\: :ref:`PackedFloat32Array`\ ) :ref:`🔗` + +An alternative to setting the :ref:`buffer` property, which can be used with *physics interpolation*. This method takes two arrays, and can set the data for the current and previous tick in one go. The renderer will automatically interpolate the data at each frame. + +This is useful for situations where the order of instances may change from physics tick to tick, such as particle systems. + +When the order of instances is coherent, the simpler alternative of setting :ref:`buffer` can still be used with interpolation. + +.. rst-class:: classref-item-separator + +---- + .. _class_MultiMesh_method_set_instance_color: .. rst-class:: classref-method @@ -426,6 +511,8 @@ Returns the :ref:`Transform2D` of a specific instance. Sets the color of a specific instance by *multiplying* the mesh's existing vertex colors. This allows for different color tinting per instance. +\ **Note:** Each component is stored in 32 bits in the Forward+ and Mobile rendering methods, but is packed into 16 bits in the Compatibility rendering method. + For the color to take effect, ensure that :ref:`use_colors` is ``true`` on the **MultiMesh** and :ref:`BaseMaterial3D.vertex_color_use_as_albedo` is ``true`` on the material. If you intend to set an absolute color instead of tinting, make sure the material's albedo color is set to pure white (``Color(1, 1, 1)``). .. rst-class:: classref-item-separator @@ -440,6 +527,8 @@ For the color to take effect, ensure that :ref:`use_colors` type only to contain 4 floating-point numbers. +\ **Note:** Each number is stored in 32 bits in the Forward+ and Mobile rendering methods, but is packed into 16 bits in the Compatibility rendering method. + For the custom data to be used, ensure that :ref:`use_custom_data` is ``true``. This custom instance data has to be manually accessed in your custom shader using ``INSTANCE_CUSTOM``. diff --git a/classes/class_multiplayerspawner.rst b/classes/class_multiplayerspawner.rst index 557d860fb72..ff3de51dda8 100644 --- a/classes/class_multiplayerspawner.rst +++ b/classes/class_multiplayerspawner.rst @@ -79,7 +79,7 @@ Signals **despawned**\ (\ node\: :ref:`Node`\ ) :ref:`🔗` -Emitted when a spawnable scene or custom spawn was despawned by the multiplayer authority. Only called on puppets. +Emitted when a spawnable scene or custom spawn was despawned by the multiplayer authority. Only called on remote peers. .. rst-class:: classref-item-separator @@ -91,7 +91,7 @@ Emitted when a spawnable scene or custom spawn was despawned by the multiplayer **spawned**\ (\ node\: :ref:`Node`\ ) :ref:`🔗` -Emitted when a spawnable scene or custom spawn was spawned by the multiplayer authority. Only called on puppets. +Emitted when a spawnable scene or custom spawn was spawned by the multiplayer authority. Only called on remote peers. .. rst-class:: classref-section-separator @@ -113,7 +113,7 @@ Property Descriptions - |void| **set_spawn_function**\ (\ value\: :ref:`Callable`\ ) - :ref:`Callable` **get_spawn_function**\ (\ ) -Method called on all peers when for every custom :ref:`spawn` requested by the authority. Will receive the ``data`` parameter, and should return a :ref:`Node` that is not in the scene tree. +Method called on all peers when a custom :ref:`spawn` is requested by the authority. Will receive the ``data`` parameter, and should return a :ref:`Node` that is not in the scene tree. \ **Note:** The returned node should **not** be added to the scene with :ref:`Node.add_child`. This is done automatically. @@ -132,7 +132,7 @@ Method called on all peers when for every custom :ref:`spawn`\ ) - :ref:`int` **get_spawn_limit**\ (\ ) -Maximum nodes that is allowed to be spawned by this spawner. Includes both spawnable scenes and custom spawns. +Maximum number of nodes allowed to be spawned by this spawner. Includes both spawnable scenes and custom spawns. When set to ``0`` (the default), there is no limit. diff --git a/classes/class_navigationlink2d.rst b/classes/class_navigationlink2d.rst index ee524d16615..ee45e15a15b 100644 --- a/classes/class_navigationlink2d.rst +++ b/classes/class_navigationlink2d.rst @@ -69,6 +69,8 @@ Methods +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`get_navigation_layer_value`\ (\ layer_number\: :ref:`int`\ ) |const| | +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_navigation_map`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`get_rid`\ (\ ) |const| | +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_global_end_position`\ (\ position\: :ref:`Vector2`\ ) | @@ -77,6 +79,8 @@ Methods +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_navigation_layer_value`\ (\ layer_number\: :ref:`int`, value\: :ref:`bool`\ ) | +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_navigation_map`\ (\ navigation_map\: :ref:`RID`\ ) | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -255,6 +259,18 @@ Returns whether or not the specified layer of the :ref:`navigation_layers` **get_navigation_map**\ (\ ) |const| :ref:`🔗` + +Returns the current navigation map :ref:`RID` used by this link. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationLink2D_method_get_rid: .. rst-class:: classref-method @@ -299,6 +315,18 @@ Sets the :ref:`start_position` t Based on ``value``, enables or disables the specified layer in the :ref:`navigation_layers` bitmask, given a ``layer_number`` between 1 and 32. +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationLink2D_method_set_navigation_map: + +.. rst-class:: classref-method + +|void| **set_navigation_map**\ (\ navigation_map\: :ref:`RID`\ ) :ref:`🔗` + +Sets the :ref:`RID` of the navigation map this link should use. By default the link will automatically join the :ref:`World2D` default navigation map so this function is only required to override the default map. + .. |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_navigationlink3d.rst b/classes/class_navigationlink3d.rst index 11a90a70ecd..698f0dff394 100644 --- a/classes/class_navigationlink3d.rst +++ b/classes/class_navigationlink3d.rst @@ -69,6 +69,8 @@ Methods +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`get_navigation_layer_value`\ (\ layer_number\: :ref:`int`\ ) |const| | +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_navigation_map`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`get_rid`\ (\ ) |const| | +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_global_end_position`\ (\ position\: :ref:`Vector3`\ ) | @@ -77,6 +79,8 @@ Methods +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_navigation_layer_value`\ (\ layer_number\: :ref:`int`, value\: :ref:`bool`\ ) | +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_navigation_map`\ (\ navigation_map\: :ref:`RID`\ ) | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -255,6 +259,18 @@ Returns whether or not the specified layer of the :ref:`navigation_layers` **get_navigation_map**\ (\ ) |const| :ref:`🔗` + +Returns the current navigation map :ref:`RID` used by this link. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationLink3D_method_get_rid: .. rst-class:: classref-method @@ -299,6 +315,18 @@ Sets the :ref:`start_position` t Based on ``value``, enables or disables the specified layer in the :ref:`navigation_layers` bitmask, given a ``layer_number`` between 1 and 32. +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationLink3D_method_set_navigation_map: + +.. rst-class:: classref-method + +|void| **set_navigation_map**\ (\ navigation_map\: :ref:`RID`\ ) :ref:`🔗` + +Sets the :ref:`RID` of the navigation map this link should use. By default the link will automatically join the :ref:`World3D` default navigation map so this function is only required to override the default map. + .. |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_navigationmesh.rst b/classes/class_navigationmesh.rst index 1562e6021af..7e37ec9c77a 100644 --- a/classes/class_navigationmesh.rst +++ b/classes/class_navigationmesh.rst @@ -75,7 +75,7 @@ Properties +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`int` | :ref:`geometry_collision_mask` | ``4294967295`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`ParsedGeometryType` | :ref:`geometry_parsed_geometry_type` | ``0`` | + | :ref:`ParsedGeometryType` | :ref:`geometry_parsed_geometry_type` | ``2`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`SourceGeometryMode` | :ref:`geometry_source_geometry_mode` | ``0`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+ @@ -567,7 +567,7 @@ Only used when :ref:`geometry_parsed_geometry_type` **geometry_parsed_geometry_type** = ``0`` :ref:`🔗` +:ref:`ParsedGeometryType` **geometry_parsed_geometry_type** = ``2`` :ref:`🔗` .. rst-class:: classref-property-setget diff --git a/classes/class_navigationmeshsourcegeometrydata2d.rst b/classes/class_navigationmeshsourcegeometrydata2d.rst index 557a839f4c5..cb2bb11b82e 100644 --- a/classes/class_navigationmeshsourcegeometrydata2d.rst +++ b/classes/class_navigationmeshsourcegeometrydata2d.rst @@ -46,6 +46,8 @@ Methods +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`clear_projected_obstructions`\ (\ ) | +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`get_bounds`\ (\ ) | + +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`PackedVector2Array`\] | :ref:`get_obstruction_outlines`\ (\ ) |const| | +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`get_projected_obstructions`\ (\ ) |const| | @@ -156,6 +158,18 @@ Clears all projected obstructions. ---- +.. _class_NavigationMeshSourceGeometryData2D_method_get_bounds: + +.. rst-class:: classref-method + +:ref:`Rect2` **get_bounds**\ (\ ) :ref:`🔗` + +Returns an axis-aligned bounding box that covers all the stored geometry data. The bounds are calculated when calling this function with the result cached until further geometry changes are made. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationMeshSourceGeometryData2D_method_get_obstruction_outlines: .. rst-class:: classref-method diff --git a/classes/class_navigationmeshsourcegeometrydata3d.rst b/classes/class_navigationmeshsourcegeometrydata3d.rst index 1543fe5205e..65a1c0f99d6 100644 --- a/classes/class_navigationmeshsourcegeometrydata3d.rst +++ b/classes/class_navigationmeshsourcegeometrydata3d.rst @@ -46,6 +46,8 @@ Methods +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`clear_projected_obstructions`\ (\ ) | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB` | :ref:`get_bounds`\ (\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedInt32Array` | :ref:`get_indices`\ (\ ) |const| | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`get_projected_obstructions`\ (\ ) |const| | @@ -156,6 +158,18 @@ Clears all projected obstructions. ---- +.. _class_NavigationMeshSourceGeometryData3D_method_get_bounds: + +.. rst-class:: classref-method + +:ref:`AABB` **get_bounds**\ (\ ) :ref:`🔗` + +Returns an axis-aligned bounding box that covers all the stored geometry data. The bounds are calculated when calling this function with the result cached until further geometry changes are made. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationMeshSourceGeometryData3D_method_get_indices: .. rst-class:: classref-method diff --git a/classes/class_navigationpolygon.rst b/classes/class_navigationpolygon.rst index b55607d9068..8b2eecc205f 100644 --- a/classes/class_navigationpolygon.rst +++ b/classes/class_navigationpolygon.rst @@ -88,25 +88,27 @@ Properties .. table:: :widths: auto - +----------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------------------------------------+ - | :ref:`float` | :ref:`agent_radius` | ``10.0`` | - +----------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------------------------------------+ - | :ref:`Rect2` | :ref:`baking_rect` | ``Rect2(0, 0, 0, 0)`` | - +----------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------------------------------------+ - | :ref:`Vector2` | :ref:`baking_rect_offset` | ``Vector2(0, 0)`` | - +----------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------------------------------------+ - | :ref:`float` | :ref:`border_size` | ``0.0`` | - +----------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------------------------------------+ - | :ref:`float` | :ref:`cell_size` | ``1.0`` | - +----------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------------------------------------+ - | :ref:`int` | :ref:`parsed_collision_mask` | ``4294967295`` | - +----------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------------------------------------+ - | :ref:`ParsedGeometryType` | :ref:`parsed_geometry_type` | ``2`` | - +----------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------------------------------------+ - | :ref:`StringName` | :ref:`source_geometry_group_name` | ``&"navigation_polygon_source_geometry_group"`` | - +----------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------------------------------------+ - | :ref:`SourceGeometryMode` | :ref:`source_geometry_mode` | ``0`` | - +----------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------------------------------------+ + +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------------------------------------+ + | :ref:`float` | :ref:`agent_radius` | ``10.0`` | + +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------------------------------------+ + | :ref:`Rect2` | :ref:`baking_rect` | ``Rect2(0, 0, 0, 0)`` | + +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------------------------------------+ + | :ref:`Vector2` | :ref:`baking_rect_offset` | ``Vector2(0, 0)`` | + +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------------------------------------+ + | :ref:`float` | :ref:`border_size` | ``0.0`` | + +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------------------------------------+ + | :ref:`float` | :ref:`cell_size` | ``1.0`` | + +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------------------------------------+ + | :ref:`int` | :ref:`parsed_collision_mask` | ``4294967295`` | + +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------------------------------------+ + | :ref:`ParsedGeometryType` | :ref:`parsed_geometry_type` | ``2`` | + +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------------------------------------+ + | :ref:`SamplePartitionType` | :ref:`sample_partition_type` | ``0`` | + +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------------------------------------+ + | :ref:`StringName` | :ref:`source_geometry_group_name` | ``&"navigation_polygon_source_geometry_group"`` | + +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------------------------------------+ + | :ref:`SourceGeometryMode` | :ref:`source_geometry_mode` | ``0`` | + +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -163,6 +165,40 @@ Methods Enumerations ------------ +.. _enum_NavigationPolygon_SamplePartitionType: + +.. rst-class:: classref-enumeration + +enum **SamplePartitionType**: :ref:`🔗` + +.. _class_NavigationPolygon_constant_SAMPLE_PARTITION_CONVEX_PARTITION: + +.. rst-class:: classref-enumeration-constant + +:ref:`SamplePartitionType` **SAMPLE_PARTITION_CONVEX_PARTITION** = ``0`` + +Convex partitioning that yields navigation mesh with convex polygons. + +.. _class_NavigationPolygon_constant_SAMPLE_PARTITION_TRIANGULATE: + +.. rst-class:: classref-enumeration-constant + +:ref:`SamplePartitionType` **SAMPLE_PARTITION_TRIANGULATE** = ``1`` + +Triangulation partitioning that yields navigation mesh with triangle polygons. + +.. _class_NavigationPolygon_constant_SAMPLE_PARTITION_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`SamplePartitionType` **SAMPLE_PARTITION_MAX** = ``2`` + +Represents the size of the :ref:`SamplePartitionType` enum. + +.. rst-class:: classref-item-separator + +---- + .. _enum_NavigationPolygon_ParsedGeometryType: .. rst-class:: classref-enumeration @@ -377,6 +413,23 @@ Determines which type of nodes will be parsed as geometry. See :ref:`ParsedGeome ---- +.. _class_NavigationPolygon_property_sample_partition_type: + +.. rst-class:: classref-property + +:ref:`SamplePartitionType` **sample_partition_type** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_sample_partition_type**\ (\ value\: :ref:`SamplePartitionType`\ ) +- :ref:`SamplePartitionType` **get_sample_partition_type**\ (\ ) + +Partitioning algorithm for creating the navigation mesh polys. See :ref:`SamplePartitionType` for possible values. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationPolygon_property_source_geometry_group_name: .. rst-class:: classref-property 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 370ebd0bf5e..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| | @@ -472,6 +478,14 @@ Constant to get the number of navigation mesh polygon edges that are considered Constant to get the number of navigation mesh polygon edges that could not be merged but may be still connected by edge proximity or with links. +.. _class_NavigationServer3D_constant_INFO_OBSTACLE_COUNT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ProcessInfo` **INFO_OBSTACLE_COUNT** = ``9`` + +Constant to get the number of active navigation obstacles. + .. rst-class:: classref-section-separator ---- @@ -1317,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 @@ -1329,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 @@ -1341,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 @@ -1353,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 @@ -1911,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 318db3705a8..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`\ (\ ) | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -1781,7 +1785,7 @@ The Tween will start automatically on the next process frame or physics frame (d :ref:`Node` **duplicate**\ (\ flags\: :ref:`int` = 15\ ) |const| :ref:`🔗` -Duplicates the node, returning a new node with all of its properties, signals and groups copied from the original. The behavior can be tweaked through the ``flags`` (see :ref:`DuplicateFlags`). +Duplicates the node, returning a new node with all of its properties, signals, groups, and children copied from the original. The behavior can be tweaked through the ``flags`` (see :ref:`DuplicateFlags`). \ **Note:** For nodes with a :ref:`Script` attached, if :ref:`Object._init` has been defined with required parameters, the duplicated node will not have a :ref:`Script`. @@ -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_node3d.rst b/classes/class_node3d.rst index f8a6153a0cc..2f1eea7f782 100644 --- a/classes/class_node3d.rst +++ b/classes/class_node3d.rst @@ -101,6 +101,8 @@ Methods +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`Node3DGizmo`\] | :ref:`get_gizmos`\ (\ ) |const| | +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`get_global_transform_interpolated`\ (\ ) | + +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Node3D` | :ref:`get_parent_node_3d`\ (\ ) |const| | +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`World3D` | :ref:`get_world_3d`\ (\ ) |const| | @@ -648,6 +650,22 @@ Returns all the gizmos attached to this **Node3D**. ---- +.. _class_Node3D_method_get_global_transform_interpolated: + +.. rst-class:: classref-method + +:ref:`Transform3D` **get_global_transform_interpolated**\ (\ ) :ref:`🔗` + +When using physics interpolation, there will be circumstances in which you want to know the interpolated (displayed) transform of a node rather than the standard transform (which may only be accurate to the most recent physics tick). + +This is particularly important for frame-based operations that take place in :ref:`Node._process`, rather than :ref:`Node._physics_process`. Examples include :ref:`Camera3D`\ s focusing on a node, or finding where to fire lasers from on a frame rather than physics tick. + +\ **Note:** This function creates an interpolation pump on the **Node3D** the first time it is called, which can respond to physics interpolation resets. If you get problems with "streaking" when initially following a **Node3D**, be sure to call :ref:`get_global_transform_interpolated` at least once *before* resetting the **Node3D** physics interpolation. + +.. rst-class:: classref-item-separator + +---- + .. _class_Node3D_method_get_parent_node_3d: .. rst-class:: classref-method diff --git a/classes/class_object.rst b/classes/class_object.rst index 4910f84f598..d3a1ebce0b0 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,10 @@ Methods +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`get_signal_list`\ (\ ) |const| | +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_translation_domain`\ (\ ) |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_connections`\ (\ signal\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_meta`\ (\ name\: :ref:`StringName`\ ) |const| | +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_method`\ (\ method\: :ref:`StringName`\ ) |const| | @@ -175,6 +185,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 +295,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: @@ -431,7 +443,7 @@ The example below displays a list of numbers shown as words going from ``ZERO`` } } - private List _numbers = new(); + private Godot.Collections.Array _numbers = new(); public override Godot.Collections.Array _GetPropertyList() { @@ -468,7 +480,7 @@ The example below displays a list of numbers shown as words going from ``ZERO`` if (propertyName.StartsWith("number_")) { int index = int.Parse(propertyName.Substring("number_".Length)); - numbers[index] = value.As(); + _numbers[index] = value.As(); return true; } return false; @@ -499,6 +511,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 @@ -695,7 +774,7 @@ Override this method to customize existing properties. Every property info goes public override void _ValidateProperty(Godot.Collections.Dictionary property) { - if (property["name"].AsStringName() == PropertyName.Number && IsNumberEditable) + if (property["name"].AsStringName() == PropertyName.Number && !IsNumberEditable) { var usage = property["usage"].As() | PropertyUsageFlags.ReadOnly; property["usage"] = (int)usage; @@ -1346,6 +1425,32 @@ 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_connections: + +.. rst-class:: classref-method + +:ref:`bool` **has_connections**\ (\ signal\: :ref:`StringName`\ ) |const| :ref:`🔗` + +Returns ``true`` if any connection exists on the given ``signal`` name. + +\ **Note:** In C#, ``signal`` must be in snake_case when referring to built-in Godot methods. Prefer using the names exposed in the ``SignalName`` class to avoid allocating a new :ref:`StringName` on each call. + +.. rst-class:: classref-item-separator + +---- + .. _class_Object_method_has_meta: .. rst-class:: classref-method @@ -1743,6 +1848,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_openxrapiextension.rst b/classes/class_openxrapiextension.rst index 60781adebea..56724f4ddc3 100644 --- a/classes/class_openxrapiextension.rst +++ b/classes/class_openxrapiextension.rst @@ -50,9 +50,13 @@ Methods .. table:: :widths: auto + +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`begin_debug_label_region`\ (\ label_name\: :ref:`String`\ ) | +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`can_render`\ (\ ) | +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`end_debug_label_region`\ (\ ) | + +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_error_string`\ (\ result\: :ref:`int`\ ) | +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_hand_tracker`\ (\ hand_index\: :ref:`int`\ ) | @@ -73,6 +77,8 @@ Methods +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_system_id`\ (\ ) | +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`insert_debug_label`\ (\ label_name\: :ref:`String`\ ) | + +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`OpenXRAlphaBlendModeSupport` | :ref:`is_environment_blend_mode_alpha_supported`\ (\ ) | +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_initialized`\ (\ ) | @@ -85,6 +91,8 @@ Methods +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_emulate_environment_blend_mode_alpha_blend`\ (\ enabled\: :ref:`bool`\ ) | +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_object_name`\ (\ object_type\: :ref:`int`, object_handle\: :ref:`int`, object_name\: :ref:`String`\ ) | + +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform3D` | :ref:`transform_from_pose`\ (\ pose\: ``const void*``\ ) | +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`unregister_composition_layer_provider`\ (\ extension\: :ref:`OpenXRExtensionWrapperExtension`\ ) | @@ -140,6 +148,18 @@ Means that :ref:`XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND`\ ) :ref:`🔗` + +Begins a new debug label region, this label will be reported in debug messages for any calls following this until :ref:`end_debug_label_region` is called. Debug labels can be stacked. + +.. rst-class:: classref-item-separator + +---- + .. _class_OpenXRAPIExtension_method_can_render: .. rst-class:: classref-method @@ -152,6 +172,18 @@ Returns ``true`` if OpenXR is initialized for rendering with an XR viewport. ---- +.. _class_OpenXRAPIExtension_method_end_debug_label_region: + +.. rst-class:: classref-method + +|void| **end_debug_label_region**\ (\ ) :ref:`🔗` + +Marks the end of a debug label region. Removes the latest debug label region added by calling :ref:`begin_debug_label_region`. + +.. rst-class:: classref-item-separator + +---- + .. _class_OpenXRAPIExtension_method_get_error_string: .. rst-class:: classref-method @@ -274,6 +306,18 @@ Returns the id of the system, which is a `XrSystemId `\ ) :ref:`🔗` + +Inserts a debug label, this label is reported in any debug message resulting from the OpenXR calls that follows, until any of :ref:`begin_debug_label_region`, :ref:`end_debug_label_region`, or :ref:`insert_debug_label` is called. + +.. rst-class:: classref-item-separator + +---- + .. _class_OpenXRAPIExtension_method_is_environment_blend_mode_alpha_supported: .. rst-class:: classref-method @@ -346,6 +390,18 @@ If set to ``true``, an OpenXR extension is loaded which is capable of emulating ---- +.. _class_OpenXRAPIExtension_method_set_object_name: + +.. rst-class:: classref-method + +|void| **set_object_name**\ (\ object_type\: :ref:`int`, object_handle\: :ref:`int`, object_name\: :ref:`String`\ ) :ref:`🔗` + +Set the object name of an OpenXR object, used for debug output. ``object_type`` must be a valid OpenXR ``XrObjectType`` enum and ``object_handle`` must be a valid OpenXR object handle. + +.. rst-class:: classref-item-separator + +---- + .. _class_OpenXRAPIExtension_method_transform_from_pose: .. 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_openxrextensionwrapperextension.rst b/classes/class_openxrextensionwrapperextension.rst index 672d1ab4b43..730fdcdda6b 100644 --- a/classes/class_openxrextensionwrapperextension.rst +++ b/classes/class_openxrextensionwrapperextension.rst @@ -82,6 +82,8 @@ Methods +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_on_viewport_composition_layer_destroyed`\ (\ layer\: ``const void*``\ ) |virtual| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_set_android_surface_swapchain_create_info_and_get_next_pointer`\ (\ property_values\: :ref:`Dictionary`, next_pointer\: ``void*``\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_set_hand_joint_locations_and_get_next_pointer`\ (\ hand_index\: :ref:`int`, next_pointer\: ``void*``\ ) |virtual| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_set_instance_create_info_and_get_next_pointer`\ (\ next_pointer\: ``void*``\ ) |virtual| | @@ -434,6 +436,20 @@ Called when a composition layer created via :ref:`OpenXRCompositionLayer` **_set_android_surface_swapchain_create_info_and_get_next_pointer**\ (\ property_values\: :ref:`Dictionary`, next_pointer\: ``void*``\ ) |virtual| :ref:`🔗` + +Adds additional data structures to Android surface swapchains created by :ref:`OpenXRCompositionLayer`. + +\ ``property_values`` contains the values of the properties returned by :ref:`_get_viewport_composition_layer_extension_properties`. + +.. rst-class:: classref-item-separator + +---- + .. _class_OpenXRExtensionWrapperExtension_private_method__set_hand_joint_locations_and_get_next_pointer: .. rst-class:: classref-method diff --git a/classes/class_openxrinterface.rst b/classes/class_openxrinterface.rst index 56f5cb446cd..66479ab7a6a 100644 --- a/classes/class_openxrinterface.rst +++ b/classes/class_openxrinterface.rst @@ -137,7 +137,7 @@ Informs the user queued a recenter of the player position. Informs the user the HMD refresh rate has changed. -\ **Node:** Only emitted if XR runtime supports the refresh rate extension. +\ **Note:** Only emitted if XR runtime supports the refresh rate extension. .. rst-class:: classref-item-separator diff --git a/classes/class_openxrvisibilitymask.rst b/classes/class_openxrvisibilitymask.rst new file mode 100644 index 00000000000..d74f8e0019e --- /dev/null +++ b/classes/class_openxrvisibilitymask.rst @@ -0,0 +1,33 @@ +: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/modules/openxr/doc_classes/OpenXRVisibilityMask.xml. + +.. _class_OpenXRVisibilityMask: + +OpenXRVisibilityMask +==================== + +**Inherits:** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` + +Draws a stereo correct visibility mask. + +.. rst-class:: classref-introduction-group + +Description +----------- + +The visibility mask allows us to black out the part of the render result that is invisible due to lens distortion. + +As this is rendered first, it prevents fragments with expensive lighting calculations to be processed as they are discarded through z-checking. + +.. |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_optimizedtranslation.rst b/classes/class_optimizedtranslation.rst index baa1e451239..dd370a1f3b0 100644 --- a/classes/class_optimizedtranslation.rst +++ b/classes/class_optimizedtranslation.rst @@ -50,6 +50,8 @@ Method Descriptions Generates and sets an optimized translation from the given :ref:`Translation` resource. +\ **Note:** This method is intended to be used in the editor. It does nothing when called from an exported project. + .. |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_os.rst b/classes/class_os.rst index ae8e98be3b2..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| | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -231,6 +231,14 @@ The OpenGL 3 rendering driver. It uses OpenGL 3.3 Core Profile on desktop platfo The Direct3D 12 rendering driver. +.. _class_OS_constant_RENDERING_DRIVER_METAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`RenderingDriver` **RENDERING_DRIVER_METAL** = ``3`` + +The Metal rendering driver. + .. rst-class:: classref-item-separator ---- @@ -573,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). @@ -1057,6 +1067,8 @@ Returns the exit code of a spawned process once it has finished running (see :re Returns ``-1`` if the ``pid`` is not a PID of a spawned child process, the process is still running, or the method is not implemented for the current platform. +\ **Note:** Returns ``-1`` if the ``pid`` is a macOS bundled app process. + \ **Note:** This method is implemented on Android, Linux, macOS and Windows. .. rst-class:: classref-item-separator diff --git a/classes/class_packedbytearray.rst b/classes/class_packedbytearray.rst index 4cd742c92e8..64b1351e2c2 100644 --- a/classes/class_packedbytearray.rst +++ b/classes/class_packedbytearray.rst @@ -124,6 +124,8 @@ Methods +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`find`\ (\ value\: :ref:`int`, from\: :ref:`int` = 0\ ) |const| | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_string_from_ascii`\ (\ ) |const| | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_string_from_utf8`\ (\ ) |const| | @@ -677,6 +679,18 @@ Searches the array for a value and returns its index or ``-1`` if not found. Opt ---- +.. _class_PackedByteArray_method_get: + +.. rst-class:: classref-method + +:ref:`int` **get**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the byte at the given ``index`` in the array. This is the same as using the ``[]`` operator (``array[index]``). + +.. rst-class:: classref-item-separator + +---- + .. _class_PackedByteArray_method_get_string_from_ascii: .. rst-class:: classref-method diff --git a/classes/class_packedcolorarray.rst b/classes/class_packedcolorarray.rst index 7b3775ce4ea..f92ee2d4446 100644 --- a/classes/class_packedcolorarray.rst +++ b/classes/class_packedcolorarray.rst @@ -68,6 +68,8 @@ Methods +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`find`\ (\ value\: :ref:`Color`, from\: :ref:`int` = 0\ ) |const| | +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has`\ (\ value\: :ref:`Color`\ ) |const| | +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`insert`\ (\ at_index\: :ref:`int`, value\: :ref:`Color`\ ) | @@ -263,6 +265,18 @@ Searches the array for a value and returns its index or ``-1`` if not found. Opt ---- +.. _class_PackedColorArray_method_get: + +.. rst-class:: classref-method + +:ref:`Color` **get**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the :ref:`Color` at the given ``index`` in the array. This is the same as using the ``[]`` operator (``array[index]``). + +.. rst-class:: classref-item-separator + +---- + .. _class_PackedColorArray_method_has: .. rst-class:: classref-method diff --git a/classes/class_packedfloat32array.rst b/classes/class_packedfloat32array.rst index d06bec47b6d..91c9237520a 100644 --- a/classes/class_packedfloat32array.rst +++ b/classes/class_packedfloat32array.rst @@ -68,6 +68,8 @@ Methods +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`find`\ (\ value\: :ref:`float`, from\: :ref:`int` = 0\ ) |const| | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has`\ (\ value\: :ref:`float`\ ) |const| | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`insert`\ (\ at_index\: :ref:`int`, value\: :ref:`float`\ ) | @@ -263,6 +265,18 @@ Searches the array for a value and returns its index or ``-1`` if not found. Opt ---- +.. _class_PackedFloat32Array_method_get: + +.. rst-class:: classref-method + +:ref:`float` **get**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the 32-bit float at the given ``index`` in the array. This is the same as using the ``[]`` operator (``array[index]``). + +.. rst-class:: classref-item-separator + +---- + .. _class_PackedFloat32Array_method_has: .. rst-class:: classref-method diff --git a/classes/class_packedfloat64array.rst b/classes/class_packedfloat64array.rst index c77ec3e8124..9ba45264cba 100644 --- a/classes/class_packedfloat64array.rst +++ b/classes/class_packedfloat64array.rst @@ -70,6 +70,8 @@ Methods +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`find`\ (\ value\: :ref:`float`, from\: :ref:`int` = 0\ ) |const| | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has`\ (\ value\: :ref:`float`\ ) |const| | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`insert`\ (\ at_index\: :ref:`int`, value\: :ref:`float`\ ) | @@ -265,6 +267,18 @@ Searches the array for a value and returns its index or ``-1`` if not found. Opt ---- +.. _class_PackedFloat64Array_method_get: + +.. rst-class:: classref-method + +:ref:`float` **get**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the 64-bit float at the given ``index`` in the array. This is the same as using the ``[]`` operator (``array[index]``). + +.. rst-class:: classref-item-separator + +---- + .. _class_PackedFloat64Array_method_has: .. rst-class:: classref-method diff --git a/classes/class_packedint32array.rst b/classes/class_packedint32array.rst index 66bb53c8e28..30751a7f602 100644 --- a/classes/class_packedint32array.rst +++ b/classes/class_packedint32array.rst @@ -68,6 +68,8 @@ Methods +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`find`\ (\ value\: :ref:`int`, from\: :ref:`int` = 0\ ) |const| | +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has`\ (\ value\: :ref:`int`\ ) |const| | +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`insert`\ (\ at_index\: :ref:`int`, value\: :ref:`int`\ ) | @@ -257,6 +259,18 @@ Searches the array for a value and returns its index or ``-1`` if not found. Opt ---- +.. _class_PackedInt32Array_method_get: + +.. rst-class:: classref-method + +:ref:`int` **get**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the 32-bit integer at the given ``index`` in the array. This is the same as using the ``[]`` operator (``array[index]``). + +.. rst-class:: classref-item-separator + +---- + .. _class_PackedInt32Array_method_has: .. rst-class:: classref-method diff --git a/classes/class_packedint64array.rst b/classes/class_packedint64array.rst index 4a7ea79463b..745f91dda52 100644 --- a/classes/class_packedint64array.rst +++ b/classes/class_packedint64array.rst @@ -70,6 +70,8 @@ Methods +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`find`\ (\ value\: :ref:`int`, from\: :ref:`int` = 0\ ) |const| | +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has`\ (\ value\: :ref:`int`\ ) |const| | +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`insert`\ (\ at_index\: :ref:`int`, value\: :ref:`int`\ ) | @@ -259,6 +261,18 @@ Searches the array for a value and returns its index or ``-1`` if not found. Opt ---- +.. _class_PackedInt64Array_method_get: + +.. rst-class:: classref-method + +:ref:`int` **get**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the 64-bit integer at the given ``index`` in the array. This is the same as using the ``[]`` operator (``array[index]``). + +.. rst-class:: classref-item-separator + +---- + .. _class_PackedInt64Array_method_has: .. rst-class:: classref-method diff --git a/classes/class_packedscene.rst b/classes/class_packedscene.rst index 497d46b6eb9..7b4c67b1d6b 100644 --- a/classes/class_packedscene.rst +++ b/classes/class_packedscene.rst @@ -110,18 +110,6 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- - -.. table:: - :widths: auto - - +-------------------------------------+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`_bundled` | ``{ "conn_count": 0, "conns": PackedInt32Array(), "editable_instances": [], "names": PackedStringArray(), "node_count": 0, "node_paths": [], "nodes": PackedInt32Array(), "variants": [], "version": 3 }`` | - +-------------------------------------+------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - -.. rst-class:: classref-reftable-group - Methods ------- @@ -197,25 +185,6 @@ It's similar to :ref:`GEN_EDIT_STATE_MAIN` **_bundled** = ``{ "conn_count": 0, "conns": PackedInt32Array(), "editable_instances": [], "names": PackedStringArray(), "node_count": 0, "node_paths": [], "nodes": PackedInt32Array(), "variants": [], "version": 3 }`` :ref:`🔗` - -A dictionary representation of the scene contents. - -Available keys include "names" and "variants" for resources, "node_count", "nodes", "node_paths" for nodes, "editable_instances" for paths to overridden nodes, "conn_count" and "conns" for signal connections, and "version" for the format style of the PackedScene. - -.. rst-class:: classref-section-separator - ----- - -.. rst-class:: classref-descriptions-group - Method Descriptions ------------------- diff --git a/classes/class_packedstringarray.rst b/classes/class_packedstringarray.rst index 76fca07c585..c26cb572959 100644 --- a/classes/class_packedstringarray.rst +++ b/classes/class_packedstringarray.rst @@ -83,6 +83,8 @@ Methods +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`find`\ (\ value\: :ref:`String`, from\: :ref:`int` = 0\ ) |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get`\ (\ index\: :ref:`int`\ ) |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has`\ (\ value\: :ref:`String`\ ) |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`insert`\ (\ at_index\: :ref:`int`, value\: :ref:`String`\ ) | @@ -272,6 +274,18 @@ Searches the array for a value and returns its index or ``-1`` if not found. Opt ---- +.. _class_PackedStringArray_method_get: + +.. rst-class:: classref-method + +:ref:`String` **get**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the :ref:`String` at the given ``index`` in the array. This is the same as using the ``[]`` operator (``array[index]``). + +.. rst-class:: classref-item-separator + +---- + .. _class_PackedStringArray_method_has: .. rst-class:: classref-method diff --git a/classes/class_packedvector2array.rst b/classes/class_packedvector2array.rst index 33783faf019..d9c5ea19fb6 100644 --- a/classes/class_packedvector2array.rst +++ b/classes/class_packedvector2array.rst @@ -19,7 +19,7 @@ Description An array specifically designed to hold :ref:`Vector2`. Packs data tightly, so it saves memory for large array sizes. -\ **Differences between packed arrays, typed arrays, and untyped arrays:** Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. :ref:`PackedVector3Array` versus ``Array[Vector2]``). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as :ref:`Array.map`. Typed arrays are in turn faster to iterate on and modify than untyped arrays. +\ **Differences between packed arrays, typed arrays, and untyped arrays:** Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. **PackedVector2Array** versus ``Array[Vector2]``). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as :ref:`Array.map`. Typed arrays are in turn faster to iterate on and modify than untyped arrays. \ **Note:** Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use :ref:`duplicate`. This is *not* the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will *not* affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again. @@ -75,6 +75,8 @@ Methods +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`find`\ (\ value\: :ref:`Vector2`, from\: :ref:`int` = 0\ ) |const| | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has`\ (\ value\: :ref:`Vector2`\ ) |const| | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`insert`\ (\ at_index\: :ref:`int`, value\: :ref:`Vector2`\ ) | @@ -278,6 +280,18 @@ Searches the array for a value and returns its index or ``-1`` if not found. Opt ---- +.. _class_PackedVector2Array_method_get: + +.. rst-class:: classref-method + +:ref:`Vector2` **get**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the :ref:`Vector2` at the given ``index`` in the array. This is the same as using the ``[]`` operator (``array[index]``). + +.. rst-class:: classref-item-separator + +---- + .. _class_PackedVector2Array_method_has: .. rst-class:: classref-method diff --git a/classes/class_packedvector3array.rst b/classes/class_packedvector3array.rst index 9b667b549ed..a706938f48b 100644 --- a/classes/class_packedvector3array.rst +++ b/classes/class_packedvector3array.rst @@ -68,6 +68,8 @@ Methods +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`find`\ (\ value\: :ref:`Vector3`, from\: :ref:`int` = 0\ ) |const| | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has`\ (\ value\: :ref:`Vector3`\ ) |const| | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`insert`\ (\ at_index\: :ref:`int`, value\: :ref:`Vector3`\ ) | @@ -271,6 +273,18 @@ Searches the array for a value and returns its index or ``-1`` if not found. Opt ---- +.. _class_PackedVector3Array_method_get: + +.. rst-class:: classref-method + +:ref:`Vector3` **get**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the :ref:`Vector3` at the given ``index`` in the array. This is the same as using the ``[]`` operator (``array[index]``). + +.. rst-class:: classref-item-separator + +---- + .. _class_PackedVector3Array_method_has: .. rst-class:: classref-method diff --git a/classes/class_packedvector4array.rst b/classes/class_packedvector4array.rst index 1ddf1682fac..119b8ffb415 100644 --- a/classes/class_packedvector4array.rst +++ b/classes/class_packedvector4array.rst @@ -66,6 +66,8 @@ Methods +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`find`\ (\ value\: :ref:`Vector4`, from\: :ref:`int` = 0\ ) |const| | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`get`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has`\ (\ value\: :ref:`Vector4`\ ) |const| | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`insert`\ (\ at_index\: :ref:`int`, value\: :ref:`Vector4`\ ) | @@ -267,6 +269,18 @@ Searches the array for a value and returns its index or ``-1`` if not found. Opt ---- +.. _class_PackedVector4Array_method_get: + +.. rst-class:: classref-method + +:ref:`Vector4` **get**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the :ref:`Vector4` at the given ``index`` in the array. This is the same as using the ``[]`` operator (``array[index]``). + +.. rst-class:: classref-item-separator + +---- + .. _class_PackedVector4Array_method_has: .. rst-class:: classref-method diff --git a/classes/class_particleprocessmaterial.rst b/classes/class_particleprocessmaterial.rst index 0ea83a1e990..1347a023e85 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` | | @@ -674,6 +676,8 @@ Property Descriptions The alpha value of each particle's color will be multiplied by this :ref:`CurveTexture` over its lifetime. +\ **Note:** :ref:`alpha_curve` multiplies the particle mesh's vertex colors. To have a visible effect on a :ref:`BaseMaterial3D`, :ref:`BaseMaterial3D.vertex_color_use_as_albedo` *must* be ``true``. For a :ref:`ShaderMaterial`, ``ALBEDO *= COLOR.rgb;`` must be inserted in the shader's ``fragment()`` function. Otherwise, :ref:`alpha_curve` will have no visible effect. + .. rst-class:: classref-item-separator ---- @@ -1210,7 +1214,7 @@ Particle color will be modulated by color determined by sampling this texture at Each particle's color will be multiplied by this :ref:`CurveTexture` over its lifetime. -\ **Note:** This property won't have a visible effect unless the render material is marked as unshaded. +\ **Note:** :ref:`emission_curve` multiplies the particle mesh's vertex colors. To have a visible effect on a :ref:`BaseMaterial3D`, :ref:`BaseMaterial3D.vertex_color_use_as_albedo` *must* be ``true``. For a :ref:`ShaderMaterial`, ``ALBEDO *= COLOR.rgb;`` must be inserted in the shader's ``fragment()`` function. Otherwise, :ref:`emission_curve` will have no visible effect. .. rst-class:: classref-item-separator @@ -1284,6 +1288,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_pckpacker.rst b/classes/class_pckpacker.rst index 019f889c9d8..78ef8344e9a 100644 --- a/classes/class_pckpacker.rst +++ b/classes/class_pckpacker.rst @@ -55,7 +55,7 @@ Methods +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`flush`\ (\ verbose\: :ref:`bool` = false\ ) | +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`pck_start`\ (\ pck_name\: :ref:`String`, alignment\: :ref:`int` = 32, key\: :ref:`String` = "0000000000000000000000000000000000000000000000000000000000000000", encrypt_directory\: :ref:`bool` = false\ ) | + | :ref:`Error` | :ref:`pck_start`\ (\ pck_path\: :ref:`String`, alignment\: :ref:`int` = 32, key\: :ref:`String` = "0000000000000000000000000000000000000000000000000000000000000000", encrypt_directory\: :ref:`bool` = false\ ) | +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -95,9 +95,9 @@ Writes the files specified using all :ref:`add_file` **pck_start**\ (\ pck_name\: :ref:`String`, alignment\: :ref:`int` = 32, key\: :ref:`String` = "0000000000000000000000000000000000000000000000000000000000000000", encrypt_directory\: :ref:`bool` = false\ ) :ref:`🔗` +:ref:`Error` **pck_start**\ (\ pck_path\: :ref:`String`, alignment\: :ref:`int` = 32, key\: :ref:`String` = "0000000000000000000000000000000000000000000000000000000000000000", encrypt_directory\: :ref:`bool` = false\ ) :ref:`🔗` -Creates a new PCK file with the name ``pck_name``. The ``.pck`` file extension isn't added automatically, so it should be part of ``pck_name`` (even though it's not required). +Creates a new PCK file at the file path ``pck_path``. The ``.pck`` file extension isn't added automatically, so it should be part of ``pck_path`` (even though it's not required). .. |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_performance.rst b/classes/class_performance.rst index 8928c4e8237..6bf532036b7 100644 --- a/classes/class_performance.rst +++ b/classes/class_performance.rst @@ -332,11 +332,59 @@ Number of polygon edges that are considered connected by edge proximity :ref:`Na Number of navigation mesh polygon edges that could not be merged in the :ref:`NavigationServer3D`. The edges still may be connected by edge proximity or with links. +.. _class_Performance_constant_NAVIGATION_OBSTACLE_COUNT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Monitor` **NAVIGATION_OBSTACLE_COUNT** = ``33`` + +Number of active navigation obstacles in the :ref:`NavigationServer3D`. + +.. _class_Performance_constant_PIPELINE_COMPILATIONS_CANVAS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Monitor` **PIPELINE_COMPILATIONS_CANVAS** = ``34`` + +Number of pipeline compilations that were triggered by the 2D canvas renderer. + +.. _class_Performance_constant_PIPELINE_COMPILATIONS_MESH: + +.. rst-class:: classref-enumeration-constant + +:ref:`Monitor` **PIPELINE_COMPILATIONS_MESH** = ``35`` + +Number of pipeline compilations that were triggered by loading meshes. These compilations will show up as longer loading times the first time a user runs the game and the pipeline is required. + +.. _class_Performance_constant_PIPELINE_COMPILATIONS_SURFACE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Monitor` **PIPELINE_COMPILATIONS_SURFACE** = ``36`` + +Number of pipeline compilations that were triggered by building the surface cache before rendering the scene. These compilations will show up as a stutter when loading an scene the first time a user runs the game and the pipeline is required. + +.. _class_Performance_constant_PIPELINE_COMPILATIONS_DRAW: + +.. rst-class:: classref-enumeration-constant + +:ref:`Monitor` **PIPELINE_COMPILATIONS_DRAW** = ``37`` + +Number of pipeline compilations that were triggered while drawing the scene. These compilations will show up as stutters during gameplay the first time a user runs the game and the pipeline is required. + +.. _class_Performance_constant_PIPELINE_COMPILATIONS_SPECIALIZATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`Monitor` **PIPELINE_COMPILATIONS_SPECIALIZATION** = ``38`` + +Number of pipeline compilations that were triggered to optimize the current scene. These compilations are done in the background and should not cause any stutters whatsoever. + .. _class_Performance_constant_MONITOR_MAX: .. rst-class:: classref-enumeration-constant -:ref:`Monitor` **MONITOR_MAX** = ``33`` +:ref:`Monitor` **MONITOR_MAX** = ``39`` Represents the size of the :ref:`Monitor` enum. diff --git a/classes/class_physicsserver2d.rst b/classes/class_physicsserver2d.rst index 8a58d30b956..500395ab270 100644 --- a/classes/class_physicsserver2d.rst +++ b/classes/class_physicsserver2d.rst @@ -208,6 +208,8 @@ Methods +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`body_set_state`\ (\ body\: :ref:`RID`, state\: :ref:`BodyState`, value\: :ref:`Variant`\ ) | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_set_state_sync_callback`\ (\ body\: :ref:`RID`, callable\: :ref:`Callable`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`body_test_motion`\ (\ body\: :ref:`RID`, parameters\: :ref:`PhysicsTestMotionParameters2D`, result\: :ref:`PhysicsTestMotionResult2D` = null\ ) | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`capsule_shape_create`\ (\ ) | @@ -2151,6 +2153,24 @@ Sets the value of a body's state. See :ref:`BodyState`, callable\: :ref:`Callable`\ ) :ref:`🔗` + +Sets the body's state synchronization callback function to ``callable``. Use an empty :ref:`Callable` (``Callable()``) to clear the callback. + +The function ``callable`` will be called every physics frame, assuming that the body was active during the previous physics tick, and can be used to fetch the latest state from the physics server. + +The function ``callable`` must take the following parameters: + +1. ``state``: a :ref:`PhysicsDirectBodyState2D`, used to retrieve the body's state. + +.. rst-class:: classref-item-separator + +---- + .. _class_PhysicsServer2D_method_body_test_motion: .. rst-class:: classref-method diff --git a/classes/class_physicsserver2dextension.rst b/classes/class_physicsserver2dextension.rst index c93a466d3c2..c0bb62666d8 100644 --- a/classes/class_physicsserver2dextension.rst +++ b/classes/class_physicsserver2dextension.rst @@ -1386,7 +1386,7 @@ Overridable version of :ref:`PhysicsServer2D.body_set_state` is called. See also :ref:`_sync`. -Overridable version of :ref:`PhysicsServer2D`'s internal ``body_set_state_sync_callback`` method. +Overridable version of :ref:`PhysicsServer2D.body_set_state_sync_callback`. .. rst-class:: classref-item-separator diff --git a/classes/class_physicsserver3d.rst b/classes/class_physicsserver3d.rst index bb6015042b8..cd8e76c55ed 100644 --- a/classes/class_physicsserver3d.rst +++ b/classes/class_physicsserver3d.rst @@ -206,6 +206,8 @@ Methods +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`body_set_state`\ (\ body\: :ref:`RID`, state\: :ref:`BodyState`, value\: :ref:`Variant`\ ) | +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_set_state_sync_callback`\ (\ body\: :ref:`RID`, callable\: :ref:`Callable`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`body_test_motion`\ (\ body\: :ref:`RID`, parameters\: :ref:`PhysicsTestMotionParameters3D`, result\: :ref:`PhysicsTestMotionResult3D` = null\ ) | +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`box_shape_create`\ (\ ) | @@ -2887,6 +2889,24 @@ Sets a body state (see :ref:`BodyState` constant ---- +.. _class_PhysicsServer3D_method_body_set_state_sync_callback: + +.. rst-class:: classref-method + +|void| **body_set_state_sync_callback**\ (\ body\: :ref:`RID`, callable\: :ref:`Callable`\ ) :ref:`🔗` + +Sets the body's state synchronization callback function to ``callable``. Use an empty :ref:`Callable` (``Callable()``) to clear the callback. + +The function ``callable`` will be called every physics frame, assuming that the body was active during the previous physics tick, and can be used to fetch the latest state from the physics server. + +The function ``callable`` must take the following parameters: + +1. ``state``: a :ref:`PhysicsDirectBodyState3D`, used to retrieve the body's state. + +.. rst-class:: classref-item-separator + +---- + .. _class_PhysicsServer3D_method_body_test_motion: .. rst-class:: classref-method diff --git a/classes/class_polygon2d.rst b/classes/class_polygon2d.rst index 3ccc0cef189..ebcae4cf138 100644 --- a/classes/class_polygon2d.rst +++ b/classes/class_polygon2d.rst @@ -32,8 +32,6 @@ Properties +-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ | :ref:`bool` | :ref:`antialiased` | ``false`` | +-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ - | :ref:`Array` | :ref:`bones` | ``[]`` | - +-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ | :ref:`Color` | :ref:`color` | ``Color(1, 1, 1, 1)`` | +-----------------------------------------------------+------------------------------------------------------------------------------+--------------------------+ | :ref:`int` | :ref:`internal_vertex_count` | ``0`` | @@ -115,18 +113,6 @@ If ``true``, polygon edges will be anti-aliased. ---- -.. _class_Polygon2D_property_bones: - -.. rst-class:: classref-property - -:ref:`Array` **bones** = ``[]`` :ref:`🔗` - -Internal list of :ref:`Bone2D` nodes used by the assigned :ref:`skeleton`. Edited using the Polygon2D editor ("UV" button on the top toolbar). - -.. rst-class:: classref-item-separator - ----- - .. _class_Polygon2D_property_color: .. rst-class:: classref-property 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_popupmenu.rst b/classes/class_popupmenu.rst index d58bc3a5406..d6536eb814b 100644 --- a/classes/class_popupmenu.rst +++ b/classes/class_popupmenu.rst @@ -1835,7 +1835,7 @@ Font size of the menu items. :ref:`StyleBox` **panel** :ref:`🔗` -:ref:`StyleBox` for the the background panel. +:ref:`StyleBox` for the background panel. .. rst-class:: classref-item-separator diff --git a/classes/class_popuppanel.rst b/classes/class_popuppanel.rst index c72c9c55a66..b58dcc0bb73 100644 --- a/classes/class_popuppanel.rst +++ b/classes/class_popuppanel.rst @@ -48,7 +48,7 @@ Theme Property Descriptions :ref:`StyleBox` **panel** :ref:`🔗` -:ref:`StyleBox` for the the background panel. +:ref:`StyleBox` for the background panel. .. |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_portablecompressedtexture2d.rst b/classes/class_portablecompressedtexture2d.rst index 5ccb0fd9995..3fbe6b1667b 100644 --- a/classes/class_portablecompressedtexture2d.rst +++ b/classes/class_portablecompressedtexture2d.rst @@ -37,15 +37,13 @@ Properties .. table:: :widths: auto - +-----------------------------------------------+--------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray` | :ref:`_data` | ``PackedByteArray()`` | - +-----------------------------------------------+--------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`keep_compressed_buffer` | ``false`` | - +-----------------------------------------------+--------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ - | :ref:`bool` | resource_local_to_scene | ``false`` (overrides :ref:`Resource`) | - +-----------------------------------------------+--------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`size_override` | ``Vector2(0, 0)`` | - +-----------------------------------------------+--------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + +-------------------------------+--------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`keep_compressed_buffer` | ``false`` | + +-------------------------------+--------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`bool` | resource_local_to_scene | ``false`` (overrides :ref:`Resource`) | + +-------------------------------+--------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`size_override` | ``Vector2(0, 0)`` | + +-------------------------------+--------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -163,20 +161,6 @@ enum **CompressionMode**: :ref:`🔗` **_data** = ``PackedByteArray()`` :ref:`🔗` - -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! - -.. rst-class:: classref-item-separator - ----- - .. _class_PortableCompressedTexture2D_property_keep_compressed_buffer: .. rst-class:: classref-property diff --git a/classes/class_projectsettings.rst b/classes/class_projectsettings.rst index be606a64b82..ded3b5d3e1e 100644 --- a/classes/class_projectsettings.rst +++ b/classes/class_projectsettings.rst @@ -213,6 +213,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`debug/gdscript/warnings/integer_division` | ``1`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/missing_tool` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`debug/gdscript/warnings/narrowing_conversion` | ``1`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`debug/gdscript/warnings/native_method_override` | ``2`` | @@ -277,6 +279,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`debug/settings/gdscript/max_call_stack` | ``1024`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`debug/settings/physics_interpolation/enable_warnings` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`debug/settings/profiler/max_functions` | ``16384`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`debug/settings/profiler/max_timestamp_query_elements` | ``256`` | @@ -399,8 +403,6 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`display/window/energy_saving/keep_screen_on` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`display/window/energy_saving/keep_screen_on.editor_hint` | ``false`` | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`display/window/handheld/orientation` | ``0`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`display/window/ios/allow_high_refresh_rate` | ``true`` | @@ -493,7 +495,7 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`editor/run/main_run_args` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`editor/script/search_in_file_extensions` | ``PackedStringArray("gd", "gdshader")`` | + | :ref:`PackedStringArray` | :ref:`editor/script/search_in_file_extensions` | | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`editor/script/templates_search_path` | ``"res://script_templates"`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ @@ -703,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`` | @@ -723,6 +727,14 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`input_devices/pointing/emulate_touch_from_mouse` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`input_devices/sensors/enable_accelerometer` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`input_devices/sensors/enable_gravity` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`input_devices/sensors/enable_gyroscope` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`input_devices/sensors/enable_magnetometer` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`internationalization/locale/fallback` | ``"en"`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`internationalization/locale/include_text_server_data` | ``false`` | @@ -1273,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`` | @@ -1417,6 +1431,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/lightmapping/denoising/denoiser` | ``0`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/lightmapping/lightmap_gi/use_bicubic_filter` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`rendering/lightmapping/primitive_meshes/texel_size` | ``0.2`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`rendering/lightmapping/probe_capture/update_speed` | ``15`` | @@ -1523,6 +1539,12 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`rendering/rendering_device/driver.windows` | | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :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`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`rendering/rendering_device/pipeline_cache/save_chunk_size_mb` | ``3.0`` | @@ -1561,8 +1583,6 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`rendering/shading/overrides/force_vertex_shading` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`rendering/shading/overrides/force_vertex_shading.mobile` | ``true`` | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/textures/canvas_textures/default_texture_filter` | ``1`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/textures/canvas_textures/default_texture_repeat` | ``0`` | @@ -1579,6 +1599,10 @@ 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`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`rendering/textures/vram_compression/import_s3tc_bptc` | ``false`` | @@ -1605,11 +1629,19 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`xr/openxr/environment_blend_mode` | ``"0"`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`xr/openxr/extensions/debug_message_types` | ``"15"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`xr/openxr/extensions/debug_utils` | ``"0"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`xr/openxr/extensions/eye_gaze_interaction` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`xr/openxr/extensions/hand_interaction_profile` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`xr/openxr/extensions/hand_tracking` | ``true`` | + | :ref:`bool` | :ref:`xr/openxr/extensions/hand_tracking` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`xr/openxr/extensions/hand_tracking_controller_data_source` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`xr/openxr/extensions/hand_tracking_unobstructed_data_source` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`xr/openxr/form_factor` | ``"0"`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ @@ -1998,7 +2030,7 @@ It may take several seconds at a stable frame rate before the smoothing is initi If ``true``, disables printing to standard error. If ``true``, this also hides error and warning messages printed by :ref:`@GlobalScope.push_error` and :ref:`@GlobalScope.push_warning`. See also :ref:`application/run/disable_stdout`. -Changes to this setting will only be applied upon restarting the application. +Changes to this setting will only be applied upon restarting the application. To control this at runtime, use :ref:`Engine.print_error_messages`. .. rst-class:: classref-item-separator @@ -2012,7 +2044,7 @@ Changes to this setting will only be applied upon restarting the application. If ``true``, disables printing to standard output. This is equivalent to starting the editor or project with the ``--quiet`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>`. See also :ref:`application/run/disable_stderr`. -Changes to this setting will only be applied upon restarting the application. +Changes to this setting will only be applied upon restarting the application. To control this at runtime, use :ref:`Engine.print_to_stdout`. .. rst-class:: classref-item-separator @@ -2796,6 +2828,18 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w ---- +.. _class_ProjectSettings_property_debug/gdscript/warnings/missing_tool: + +.. rst-class:: classref-property + +:ref:`int` **debug/gdscript/warnings/missing_tool** = ``1`` :ref:`🔗` + +When set to ``warn`` or ``error``, produces a warning or an error respectively when the base class script has the ``@tool`` annotation, but the current class script does not have it. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_debug/gdscript/warnings/narrowing_conversion: .. rst-class:: classref-property @@ -3184,6 +3228,20 @@ Maximum call stack allowed for debugging GDScript. ---- +.. _class_ProjectSettings_property_debug/settings/physics_interpolation/enable_warnings: + +.. rst-class:: classref-property + +:ref:`bool` **debug/settings/physics_interpolation/enable_warnings** = ``true`` :ref:`🔗` + +If ``true``, enables warnings which can help pinpoint where nodes are being incorrectly updated, which will result in incorrect interpolation and visual glitches. + +When a node is being interpolated, it is essential that the transform is set during :ref:`Node._physics_process` (during a physics tick) rather than :ref:`Node._process` (during a frame). + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_debug/settings/profiler/max_functions: .. rst-class:: classref-property @@ -3918,18 +3976,6 @@ If ``true``, keeps the screen on (even in case of inactivity), so the screensave ---- -.. _class_ProjectSettings_property_display/window/energy_saving/keep_screen_on.editor_hint: - -.. rst-class:: classref-property - -:ref:`bool` **display/window/energy_saving/keep_screen_on.editor_hint** = ``false`` :ref:`🔗` - -Editor-only override for :ref:`display/window/energy_saving/keep_screen_on`. Does not affect running project. - -.. rst-class:: classref-item-separator - ----- - .. _class_ProjectSettings_property_display/window/handheld/orientation: .. rst-class:: classref-property @@ -4274,7 +4320,11 @@ The policy to use to determine the final scale factor for 2D elements. This affe :ref:`bool` **display/window/subwindows/embed_subwindows** = ``true`` :ref:`🔗` -If ``true`` subwindows are embedded in the main window. +If ``true``, subwindows are embedded in the main window (this is also called single-window mode). Single-window mode can be faster as it does not need to create a separate window for every popup and tooltip, which can be a slow operation depending on the operating system and rendering method in use. + +If ``false``, subwindows are created as separate windows (this is also called multi-window mode). This allows them to be moved outside the main window and use native operating system window decorations. + +This is equivalent to :ref:`EditorSettings.interface/editor/single_window_mode` in the editor, except the setting's value is inverted. .. rst-class:: classref-item-separator @@ -4578,7 +4628,7 @@ For example, this can be used to force the project to run on the dedicated GPU i .. rst-class:: classref-property -:ref:`PackedStringArray` **editor/script/search_in_file_extensions** = ``PackedStringArray("gd", "gdshader")`` :ref:`🔗` +:ref:`PackedStringArray` **editor/script/search_in_file_extensions** :ref:`🔗` Text-based file extensions to include in the script editor's "Find in Files" feature. You can add e.g. ``tscn`` if you wish to also parse your scene files, especially if you use built-in scripts which are serialized in the scene files. @@ -5938,7 +5988,7 @@ macOS specific override for the shortcut to select the word currently under the :ref:`Dictionary` **input/ui_text_skip_selection_for_next_occurrence** :ref:`🔗` -If no selection is currently active with the last caret in text fields, searches for the next occurrence of the the word currently under the caret and moves the caret to the next occurrence. The action can be performed sequentially for other occurrences of the word under the last caret. +If no selection is currently active with the last caret in text fields, searches for the next occurrence of the word currently under the caret and moves the caret to the next occurrence. The action can be performed sequentially for other occurrences of the word under the last caret. If a selection is currently active with the last caret in text fields, searches for the next occurrence of the selection, adds a caret, selects the next occurrence then deselects the previous selection and its associated caret. The action can be performed sequentially for other occurrences of the selection of the last caret. @@ -5992,6 +6042,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 @@ -6126,6 +6190,54 @@ If ``true``, sends touch input events when clicking or dragging the mouse. ---- +.. _class_ProjectSettings_property_input_devices/sensors/enable_accelerometer: + +.. rst-class:: classref-property + +:ref:`bool` **input_devices/sensors/enable_accelerometer** = ``false`` :ref:`🔗` + +If ``true``, the accelerometer sensor is enabled and :ref:`Input.get_accelerometer` returns valid data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_input_devices/sensors/enable_gravity: + +.. rst-class:: classref-property + +:ref:`bool` **input_devices/sensors/enable_gravity** = ``false`` :ref:`🔗` + +If ``true``, the gravity sensor is enabled and :ref:`Input.get_gravity` returns valid data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_input_devices/sensors/enable_gyroscope: + +.. rst-class:: classref-property + +:ref:`bool` **input_devices/sensors/enable_gyroscope** = ``false`` :ref:`🔗` + +If ``true``, the gyroscope sensor is enabled and :ref:`Input.get_gyroscope` returns valid data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_input_devices/sensors/enable_magnetometer: + +.. rst-class:: classref-property + +:ref:`bool` **input_devices/sensors/enable_magnetometer** = ``false`` :ref:`🔗` + +If ``true``, the magnetometer sensor is enabled and :ref:`Input.get_magnetometer` returns valid data. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_internationalization/locale/fallback: .. rst-class:: classref-property @@ -9142,6 +9254,8 @@ Sets which physics engine to use for 2D physics. "DEFAULT" and "GodotPhysics2D" are the same, as there is currently no alternative 2D physics server implemented. +"Dummy" is a 2D physics server that does nothing and returns only dummy values, effectively disabling all 2D physics functionality. + .. rst-class:: classref-item-separator ---- @@ -9378,6 +9492,8 @@ Sets which physics engine to use for 3D physics. "DEFAULT" and "GodotPhysics3D" are the same, as there is currently no alternative 3D physics server implemented. +"Dummy" is a 3D physics server that does nothing and returns only dummy values, effectively disabling all 3D physics functionality. + .. rst-class:: classref-item-separator ---- @@ -9530,8 +9646,6 @@ If ``true``, the renderer will interpolate the transforms of physics objects bet \ **Note:** This property is only read when the project starts. To toggle physics interpolation at runtime, set :ref:`SceneTree.physics_interpolation` instead. -\ **Note:** This feature is currently only implemented in the 2D renderer. - .. rst-class:: classref-item-separator ---- @@ -9544,7 +9658,9 @@ If ``true``, the renderer will interpolate the transforms of physics objects bet Controls how much physics ticks are synchronized with real time. For 0 or less, the ticks are synchronized. Such values are recommended for network games, where clock synchronization matters. Higher values cause higher deviation of in-game clock and real clock, but allows smoothing out framerate jitters. The default value of 0.5 should be good enough for most; values above 2 could cause the game to react to dropped frames with a noticeable delay and are not recommended. -\ **Note:** When using a physics interpolation solution (such as enabling :ref:`physics/common/physics_interpolation` or using a custom solution), the physics jitter fix should be disabled by setting :ref:`physics/common/physics_jitter_fix` to ``0.0``. +\ **Note:** Jitter fix is automatically disabled at runtime when :ref:`physics/common/physics_interpolation` is enabled. + +\ **Note:** When using a custom physics interpolation solution, the physics jitter fix should be disabled by setting :ref:`physics/common/physics_jitter_fix` to ``0.0``. \ **Note:** This property is only read when the project starts. To change the physics jitter fix at runtime, set :ref:`Engine.physics_jitter_fix` instead. @@ -9568,6 +9684,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 @@ -9654,10 +9782,12 @@ If ``true``, vertices of :ref:`CanvasItem` nodes will snap to :ref:`int` **rendering/anti_aliasing/quality/msaa_2d** = ``0`` :ref:`🔗` -Sets the number of MSAA samples to use for 2D/Canvas rendering (as a power of two). MSAA is used to reduce aliasing around the edges of polygons. A higher MSAA value results in smoother edges but can be significantly slower on some hardware, especially integrated graphics due to their limited memory bandwidth. This has no effect on shader-induced aliasing or texture aliasing. +Sets the number of multisample antialiasing (MSAA) samples to use for 2D/Canvas rendering (as a power of two). MSAA is used to reduce aliasing around the edges of polygons. A higher MSAA value results in smoother edges but can be significantly slower on some hardware, especially integrated graphics due to their limited memory bandwidth. This has no effect on shader-induced aliasing or texture aliasing. \ **Note:** MSAA is only supported in the Forward+ and Mobile rendering methods, not Compatibility. +\ **Note:** This property is only read when the project starts. To set the number of 2D MSAA samples at runtime, set :ref:`Viewport.msaa_2d` or use :ref:`RenderingServer.viewport_set_msaa_2d`. + .. rst-class:: classref-item-separator ---- @@ -9668,7 +9798,9 @@ Sets the number of MSAA samples to use for 2D/Canvas rendering (as a power of tw :ref:`int` **rendering/anti_aliasing/quality/msaa_3d** = ``0`` :ref:`🔗` -Sets the number of MSAA samples to use for 3D rendering (as a power of two). MSAA is used to reduce aliasing around the edges of polygons. A higher MSAA value results in smoother edges but can be significantly slower on some hardware, especially integrated graphics due to their limited memory bandwidth. See also :ref:`rendering/scaling_3d/mode` for supersampling, which provides higher quality but is much more expensive. This has no effect on shader-induced aliasing or texture aliasing. +Sets the number of multisample antialiasing (MSAA) samples to use for 3D rendering (as a power of two). MSAA is used to reduce aliasing around the edges of polygons. A higher MSAA value results in smoother edges but can be significantly slower on some hardware, especially integrated graphics due to their limited memory bandwidth. See also :ref:`rendering/scaling_3d/mode` for supersampling, which provides higher quality but is much more expensive. This has no effect on shader-induced aliasing or texture aliasing. + +\ **Note:** This property is only read when the project starts. To set the number of 3D MSAA samples at runtime, set :ref:`Viewport.msaa_3d` or use :ref:`RenderingServer.viewport_set_msaa_3d`. .. rst-class:: classref-item-separator @@ -9686,6 +9818,8 @@ Another way to combat specular aliasing is to enable :ref:`rendering/anti_aliasi \ **Note:** Screen-space antialiasing is only supported in the Forward+ and Mobile rendering methods, not Compatibility. +\ **Note:** This property is only read when the project starts. To set the screen-space antialiasing mode at runtime, set :ref:`Viewport.screen_space_aa` on the root :ref:`Viewport` instead, or use :ref:`RenderingServer.viewport_set_screen_space_aa`. + .. rst-class:: classref-item-separator ---- @@ -9700,7 +9834,7 @@ If ``true``, uses a fast post-processing filter to make banding significantly le In some cases, debanding may introduce a slightly noticeable dithering pattern. It's recommended to enable debanding only when actually needed since the dithering pattern will make lossless-compressed screenshots larger. -\ **Note:** This property is only read when the project starts. To set debanding at run-time, set :ref:`Viewport.use_debanding` on the root :ref:`Viewport` instead. +\ **Note:** This property is only read when the project starts. To set debanding at runtime, set :ref:`Viewport.use_debanding` on the root :ref:`Viewport` instead, or use :ref:`RenderingServer.viewport_set_use_debanding`. .. rst-class:: classref-item-separator @@ -9712,12 +9846,14 @@ In some cases, debanding may introduce a slightly noticeable dithering pattern. :ref:`bool` **rendering/anti_aliasing/quality/use_taa** = ``false`` :ref:`🔗` -Enables Temporal Anti-Aliasing for the default screen :ref:`Viewport`. TAA works by jittering the camera and accumulating the images of the last rendered frames, motion vector rendering is used to account for camera and object motion. Enabling TAA can make the image blurrier, which is partially counteracted by automatically using a negative mipmap LOD bias (see :ref:`rendering/textures/default_filters/texture_mipmap_bias`). +Enables temporal antialiasing for the default screen :ref:`Viewport`. TAA works by jittering the camera and accumulating the images of the last rendered frames, motion vector rendering is used to account for camera and object motion. Enabling TAA can make the image blurrier, which is partially counteracted by automatically using a negative mipmap LOD bias (see :ref:`rendering/textures/default_filters/texture_mipmap_bias`). \ **Note:** The implementation is not complete yet. Some visual instances such as particles and skinned meshes may show ghosting artifacts in motion. \ **Note:** TAA is only supported in the Forward+ rendering method, not Mobile or Compatibility. +\ **Note:** This property is only read when the project starts. To set TAA at runtime, set :ref:`Viewport.use_taa` on the root :ref:`Viewport` instead, or use :ref:`RenderingServer.viewport_set_use_taa`. + .. rst-class:: classref-item-separator ---- @@ -10238,9 +10374,9 @@ If ``true``, the compatibility renderer will fall back to OpenGLES if desktop Op :ref:`bool` **rendering/gl_compatibility/fallback_to_native** = ``true`` :ref:`🔗` -If ``true``, the compatibility renderer will fall back to native OpenGL if ANGLE over Metal is not supported. +If ``true``, the compatibility renderer will fall back to native OpenGL if ANGLE is not supported, or ANGLE dynamic libraries aren't found. -\ **Note:** This setting is implemented only on macOS. +\ **Note:** This setting is implemented on macOS and Windows. .. rst-class:: classref-item-separator @@ -10516,6 +10652,20 @@ If no GPU acceleration is configured on the system, multi-threaded CPU-based den ---- +.. _class_ProjectSettings_property_rendering/lightmapping/lightmap_gi/use_bicubic_filter: + +.. rst-class:: classref-property + +:ref:`bool` **rendering/lightmapping/lightmap_gi/use_bicubic_filter** = ``true`` :ref:`🔗` + +If ``true``, applies a bicubic filter during lightmap sampling. This makes lightmaps look much smoother, at a moderate performance cost. + +\ **Note:** The bicubic filter exaggerates the 'bleeding' effect that occurs when a lightmap's resolution is low enough. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_rendering/lightmapping/primitive_meshes/texel_size: .. rst-class:: classref-property @@ -10846,9 +10996,9 @@ The minimum number of instances that must be present in a scene to enable cullin :ref:`float` **rendering/limits/time/time_rollover_secs** = ``3600`` :ref:`🔗` -.. container:: contribute +Maximum time (in seconds) before the ``TIME`` shader built-in variable rolls over. The ``TIME`` variable increments by ``delta`` each frame, and when it exceeds this value, it rolls over to ``0.0``. Since large floating-point values are less precise than small floating-point values, this should be set as low as possible to maximize the precision of the ``TIME`` built-in variable in shaders. This is especially important on mobile platforms where precision in shaders is significantly reduced. However, if this is set too low, shader animations may appear to restart from the beginning while the project is running. - There is currently no description for this property. Please help us by :ref:`contributing one `! +On desktop platforms, values below ``4096`` are recommended, ideally below ``2048``. On mobile platforms, values below ``64`` are recommended, ideally below ``32``. .. rst-class:: classref-item-separator @@ -11202,6 +11352,48 @@ Windows override for :ref:`rendering/rendering_device/driver` **rendering/rendering_device/fallback_to_d3d12** = ``true`` :ref:`🔗` + +If ``true``, the forward renderer will fall back to Direct3D 12 if Vulkan is not supported. + +\ **Note:** This setting is implemented only on Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _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 + +:ref:`bool` **rendering/rendering_device/fallback_to_vulkan** = ``true`` :ref:`🔗` + +If ``true``, the forward renderer will fall back to Vulkan if Direct3D 12 is not supported. + +\ **Note:** This setting is implemented only on Windows. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_rendering/rendering_device/pipeline_cache/enable: .. rst-class:: classref-property @@ -11462,22 +11654,6 @@ Lower-end override for :ref:`rendering/shading/overrides/force_lambert_over_burl If ``true``, forces vertex shading for all rendering. This can increase performance a lot, but also reduces quality immensely. Can be used to optimize performance on low-end mobile devices. -\ **Note:** This setting currently has no effect, as vertex shading is not implemented yet. - -.. rst-class:: classref-item-separator - ----- - -.. _class_ProjectSettings_property_rendering/shading/overrides/force_vertex_shading.mobile: - -.. rst-class:: classref-property - -:ref:`bool` **rendering/shading/overrides/force_vertex_shading.mobile** = ``true`` :ref:`🔗` - -Lower-end override for :ref:`rendering/shading/overrides/force_vertex_shading` on mobile devices, due to performance concerns or driver support. - -\ **Note:** This setting currently has no effect, as vertex shading is not implemented yet. - .. rst-class:: classref-item-separator ---- @@ -11592,6 +11768,34 @@ 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, improving the import time of large images. + +\ **Note:** This only functions on a device which supports either Vulkan, D3D12, or Metal available as a rendering backend. + +\ **Note:** Currently this only affects certain compressed formats (BC1, BC4, and BC6), all of which are exclusive to desktop platforms and consoles. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_rendering/textures/vram_compression/import_etc2_astc: .. rst-class:: classref-property @@ -11654,7 +11858,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 @@ -11771,6 +11979,30 @@ Specify how OpenXR should blend in the environment. This is specific to certain ---- +.. _class_ProjectSettings_property_xr/openxr/extensions/debug_message_types: + +.. rst-class:: classref-property + +:ref:`int` **xr/openxr/extensions/debug_message_types** = ``"15"`` :ref:`🔗` + +Specifies the message types for which we request debug messages. Requires :ref:`xr/openxr/extensions/debug_utils` to be set and the extension to be supported by the XR runtime. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_xr/openxr/extensions/debug_utils: + +.. rst-class:: classref-property + +:ref:`int` **xr/openxr/extensions/debug_utils** = ``"0"`` :ref:`🔗` + +Enables debug utilities on XR runtimes that supports the debug utils extension. Sets the maximum severity being reported (0 = disabled, 1 = error, 2 = warning, 3 = info, 4 = verbose). + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_xr/openxr/extensions/eye_gaze_interaction: .. rst-class:: classref-property @@ -11789,7 +12021,7 @@ Specify whether to enable eye tracking for this project. Depending on the platfo :ref:`bool` **xr/openxr/extensions/hand_interaction_profile** = ``false`` :ref:`🔗` -If true the hand interaction profile extension will be activated if supported by the platform. +If ``true`` the hand interaction profile extension will be activated if supported by the platform. .. rst-class:: classref-item-separator @@ -11799,9 +12031,39 @@ If true the hand interaction profile extension will be activated if supported by .. rst-class:: classref-property -:ref:`bool` **xr/openxr/extensions/hand_tracking** = ``true`` :ref:`🔗` +:ref:`bool` **xr/openxr/extensions/hand_tracking** = ``false`` :ref:`🔗` + +If ``true``, the hand tracking extension is enabled if available. -If true we enable the hand tracking extension if available. +\ **Note:** By default hand tracking will only work for data sources chosen by the XR runtime. For SteamVR this is the controller inferred data source, for most other runtimes this is the unobstructed data source. There is no way to query this. If a runtime supports the OpenXR data source extension you can use the :ref:`xr/openxr/extensions/hand_tracking_controller_data_source` and/or :ref:`xr/openxr/extensions/hand_tracking_unobstructed_data_source` to indicate you wish to enable these data sources. If neither is selected the data source extension is not enabled and the XR runtimes default behavior persists. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_xr/openxr/extensions/hand_tracking_controller_data_source: + +.. rst-class:: classref-property + +:ref:`bool` **xr/openxr/extensions/hand_tracking_controller_data_source** = ``false`` :ref:`🔗` + +If ``true``, support for the controller inferred data source is requested. If supported, you will receive hand tracking data even if the user has a controller in hand, with finger positions automatically inferred from controller input and/or sensors. + +\ **Node:** This requires the OpenXR data source extension and controller inferred handtracking to be supported by the XR runtime. If not supported this setting will be ignored. :ref:`xr/openxr/extensions/hand_tracking` must be enabled for this setting to be used. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_xr/openxr/extensions/hand_tracking_unobstructed_data_source: + +.. rst-class:: classref-property + +:ref:`bool` **xr/openxr/extensions/hand_tracking_unobstructed_data_source** = ``false`` :ref:`🔗` + +If ``true``, support for the unobstructed data source is requested. If supported, you will receive hand tracking data based on the actual finger positions of the user often determined by optical tracking. + +\ **Node:** This requires the OpenXR data source extension and unobstructed handtracking to be supported by the XR runtime. If not supported this setting will be ignored. :ref:`xr/openxr/extensions/hand_tracking` must be enabled for this setting to be used. .. rst-class:: classref-item-separator @@ -11926,8 +12188,6 @@ Adds a custom property info to a property. The dictionary must contain: - optionally ``"hint"``: :ref:`int` (see :ref:`PropertyHint`) and ``"hint_string"``: :ref:`String`\ -\ **Example:**\ - .. tabs:: @@ -12020,8 +12280,6 @@ Returns the order of a configuration value (influences when saved to the config Returns the value of the setting identified by ``name``. If the setting doesn't exist and ``default_value`` is specified, the value of ``default_value`` is returned. Otherwise, ``null`` is returned. -\ **Example:**\ - .. tabs:: @@ -12051,9 +12309,7 @@ Returns the value of the setting identified by ``name``. If the setting doesn't Similar to :ref:`get_setting`, but applies feature tag overrides if any exists and is valid. -\ **Example:**\ - -If the following setting override exists "application/config/name.windows", and the following code is executed: +\ **Example:**\ If the setting override ``"application/config/name.windows"`` exists, and the following code is executed on a *Windows* operating system, the overridden setting is printed instead: .. tabs:: @@ -12068,8 +12324,6 @@ If the following setting override exists "application/config/name.windows", and -Then the overridden setting will be returned instead if the project is running on the *Windows* operating system. - .. rst-class:: classref-item-separator ---- @@ -12238,8 +12492,6 @@ Sets whether a setting requires restarting the editor to properly take effect. Sets the value of a setting. -\ **Example:**\ - .. tabs:: diff --git a/classes/class_propertytweener.rst b/classes/class_propertytweener.rst index 966125b95f8..65d20e588fa 100644 --- a/classes/class_propertytweener.rst +++ b/classes/class_propertytweener.rst @@ -21,6 +21,8 @@ Description **PropertyTweener** is used to interpolate a property in an object. See :ref:`Tween.tween_property` for more usage information. +The tweener will finish automatically if the target object is freed. + \ **Note:** :ref:`Tween.tween_property` is the only correct way to create **PropertyTweener**. Any **PropertyTweener** created manually will not function correctly. .. rst-class:: classref-reftable-group @@ -64,12 +66,12 @@ Method Descriptions When called, the final value will be used as a relative value instead. -\ **Example:**\ +\ **Example:** Move the node by ``100`` pixels to the right. :: var tween = get_tree().create_tween() - tween.tween_property(self, "position", Vector2.RIGHT * 100, 1).as_relative() #the node will move by 100 pixels to the right + tween.tween_property(self, "position", Vector2.RIGHT * 100, 1).as_relative() .. rst-class:: classref-item-separator @@ -83,12 +85,12 @@ When called, the final value will be used as a relative value instead. Sets a custom initial value to the **PropertyTweener**. -\ **Example:**\ +\ **Example:** Move the node from position ``(100, 100)`` to ``(200, 100)``. :: var tween = get_tree().create_tween() - tween.tween_property(self, "position", Vector2(200, 100), 1).from(Vector2(100, 100)) #this will move the node from position (100, 100) to (200, 100) + tween.tween_property(self, "position", Vector2(200, 100), 1).from(Vector2(100, 100)) .. rst-class:: classref-item-separator @@ -119,8 +121,6 @@ Makes the **PropertyTweener** use the current property value (i.e. at the time o Allows interpolating the value with a custom easing function. The provided ``interpolator_method`` will be called with a value ranging from ``0.0`` to ``1.0`` and is expected to return a value within the same range (values outside the range can be used for overshoot). The return value of the method is then used for interpolation between initial and final value. Note that the parameter passed to the method is still subject to the tweener's own easing. -\ **Example:**\ - :: @export var curve: Curve 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_rect2.rst b/classes/class_rect2.rst index 65d11ae327c..ba2d6e7f15c 100644 --- a/classes/class_rect2.rst +++ b/classes/class_rect2.rst @@ -95,6 +95,8 @@ Methods +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_center`\ (\ ) |const| | +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_support`\ (\ direction\: :ref:`Vector2`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Rect2` | :ref:`grow`\ (\ amount\: :ref:`float`\ ) |const| | +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Rect2` | :ref:`grow_individual`\ (\ left\: :ref:`float`, top\: :ref:`float`, right\: :ref:`float`, bottom\: :ref:`float`\ ) |const| | @@ -337,6 +339,18 @@ Returns the center point of the rectangle. This is the same as ``position + (siz ---- +.. _class_Rect2_method_get_support: + +.. rst-class:: classref-method + +:ref:`Vector2` **get_support**\ (\ direction\: :ref:`Vector2`\ ) |const| :ref:`🔗` + +Returns the vertex's position of this rect that's the farthest in the given direction. This point is commonly known as the support point in collision detection algorithms. + +.. rst-class:: classref-item-separator + +---- + .. _class_Rect2_method_grow: .. rst-class:: classref-method diff --git a/classes/class_refcounted.rst b/classes/class_refcounted.rst index fefdffe9bce..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:`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_regex.rst b/classes/class_regex.rst index 57368a09e3c..27f2b19d7ad 100644 --- a/classes/class_regex.rst +++ b/classes/class_regex.rst @@ -86,9 +86,9 @@ Methods +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`clear`\ (\ ) | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`compile`\ (\ pattern\: :ref:`String`\ ) | + | :ref:`Error` | :ref:`compile`\ (\ pattern\: :ref:`String`, show_error\: :ref:`bool` = true\ ) | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RegEx` | :ref:`create_from_string`\ (\ pattern\: :ref:`String`\ ) |static| | + | :ref:`RegEx` | :ref:`create_from_string`\ (\ pattern\: :ref:`String`, show_error\: :ref:`bool` = true\ ) |static| | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_group_count`\ (\ ) |const| | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -130,9 +130,9 @@ This method resets the state of the object, as if it was freshly created. Namely .. rst-class:: classref-method -:ref:`Error` **compile**\ (\ pattern\: :ref:`String`\ ) :ref:`🔗` +:ref:`Error` **compile**\ (\ pattern\: :ref:`String`, show_error\: :ref:`bool` = true\ ) :ref:`🔗` -Compiles and assign the search pattern to use. Returns :ref:`@GlobalScope.OK` if the compilation is successful. If an error is encountered, details are printed to standard output and an error is returned. +Compiles and assign the search pattern to use. Returns :ref:`@GlobalScope.OK` if the compilation is successful. If compilation fails, returns :ref:`@GlobalScope.FAILED` and when ``show_error`` is ``true``, details are printed to standard output. .. rst-class:: classref-item-separator @@ -142,9 +142,9 @@ Compiles and assign the search pattern to use. Returns :ref:`@GlobalScope.OK` **create_from_string**\ (\ pattern\: :ref:`String`\ ) |static| :ref:`🔗` +:ref:`RegEx` **create_from_string**\ (\ pattern\: :ref:`String`, show_error\: :ref:`bool` = true\ ) |static| :ref:`🔗` -Creates and compiles a new **RegEx** object. +Creates and compiles a new **RegEx** object. See also :ref:`compile`. .. rst-class:: classref-item-separator diff --git a/classes/class_renderingdevice.rst b/classes/class_renderingdevice.rst index d7e988760f8..2ddbf90b608 100644 --- a/classes/class_renderingdevice.rst +++ b/classes/class_renderingdevice.rst @@ -85,7 +85,7 @@ Methods +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`draw_command_insert_label`\ (\ name\: :ref:`String`, color\: :ref:`Color`\ ) | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`draw_list_begin`\ (\ framebuffer\: :ref:`RID`, initial_color_action\: :ref:`InitialAction`, final_color_action\: :ref:`FinalAction`, initial_depth_action\: :ref:`InitialAction`, final_depth_action\: :ref:`FinalAction`, clear_color_values\: :ref:`PackedColorArray` = PackedColorArray(), clear_depth\: :ref:`float` = 1.0, clear_stencil\: :ref:`int` = 0, region\: :ref:`Rect2` = Rect2(0, 0, 0, 0)\ ) | + | :ref:`int` | :ref:`draw_list_begin`\ (\ framebuffer\: :ref:`RID`, initial_color_action\: :ref:`InitialAction`, final_color_action\: :ref:`FinalAction`, initial_depth_action\: :ref:`InitialAction`, final_depth_action\: :ref:`FinalAction`, clear_color_values\: :ref:`PackedColorArray` = PackedColorArray(), clear_depth\: :ref:`float` = 1.0, clear_stencil\: :ref:`int` = 0, region\: :ref:`Rect2` = Rect2(0, 0, 0, 0), breadcrumb\: :ref:`int` = 0\ ) | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`draw_list_begin_for_screen`\ (\ screen\: :ref:`int` = 0, clear_color\: :ref:`Color` = Color(0, 0, 0, 1)\ ) | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -147,18 +147,42 @@ Methods +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_captured_timestamps_frame`\ (\ ) |const| | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_device_allocation_count`\ (\ ) |const| | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_device_allocs_by_object_type`\ (\ type\: :ref:`int`\ ) |const| | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_device_memory_by_object_type`\ (\ type\: :ref:`int`\ ) |const| | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_device_name`\ (\ ) |const| | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_device_pipeline_cache_uuid`\ (\ ) |const| | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_device_total_memory`\ (\ ) |const| | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_device_vendor_name`\ (\ ) |const| | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_driver_allocation_count`\ (\ ) |const| | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_driver_allocs_by_object_type`\ (\ type\: :ref:`int`\ ) |const| | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_driver_and_device_memory_report`\ (\ ) |const| | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_driver_memory_by_object_type`\ (\ type\: :ref:`int`\ ) |const| | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_driver_resource`\ (\ resource\: :ref:`DriverResource`, rid\: :ref:`RID`, index\: :ref:`int`\ ) | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_driver_total_memory`\ (\ ) |const| | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_frame_delay`\ (\ ) |const| | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_memory_usage`\ (\ type\: :ref:`MemoryType`\ ) |const| | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_perf_report`\ (\ ) |const| | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_tracked_object_name`\ (\ type_index\: :ref:`int`\ ) |const| | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_tracked_object_type_count`\ (\ ) |const| | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`index_array_create`\ (\ index_buffer\: :ref:`RID`, index_offset\: :ref:`int`, index_count\: :ref:`int`\ ) | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`index_buffer_create`\ (\ size_indices\: :ref:`int`, format\: :ref:`IndexBufferFormat`, data\: :ref:`PackedByteArray` = PackedByteArray(), use_restart_indices\: :ref:`bool` = false\ ) | @@ -4507,6 +4531,172 @@ Memory taken by buffers. Total memory taken. This is greater than the sum of :ref:`MEMORY_TEXTURES` and :ref:`MEMORY_BUFFERS`, as it also includes miscellaneous memory usage. +.. rst-class:: classref-item-separator + +---- + +.. _enum_RenderingDevice_BreadcrumbMarker: + +.. rst-class:: classref-enumeration + +enum **BreadcrumbMarker**: :ref:`🔗` + +.. _class_RenderingDevice_constant_NONE: + +.. rst-class:: classref-enumeration-constant + +:ref:`BreadcrumbMarker` **NONE** = ``0`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one `! + + + +.. _class_RenderingDevice_constant_REFLECTION_PROBES: + +.. rst-class:: classref-enumeration-constant + +:ref:`BreadcrumbMarker` **REFLECTION_PROBES** = ``65536`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one `! + + + +.. _class_RenderingDevice_constant_SKY_PASS: + +.. rst-class:: classref-enumeration-constant + +:ref:`BreadcrumbMarker` **SKY_PASS** = ``131072`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one `! + + + +.. _class_RenderingDevice_constant_LIGHTMAPPER_PASS: + +.. rst-class:: classref-enumeration-constant + +:ref:`BreadcrumbMarker` **LIGHTMAPPER_PASS** = ``196608`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one `! + + + +.. _class_RenderingDevice_constant_SHADOW_PASS_DIRECTIONAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`BreadcrumbMarker` **SHADOW_PASS_DIRECTIONAL** = ``262144`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one `! + + + +.. _class_RenderingDevice_constant_SHADOW_PASS_CUBE: + +.. rst-class:: classref-enumeration-constant + +:ref:`BreadcrumbMarker` **SHADOW_PASS_CUBE** = ``327680`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one `! + + + +.. _class_RenderingDevice_constant_OPAQUE_PASS: + +.. rst-class:: classref-enumeration-constant + +:ref:`BreadcrumbMarker` **OPAQUE_PASS** = ``393216`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one `! + + + +.. _class_RenderingDevice_constant_ALPHA_PASS: + +.. rst-class:: classref-enumeration-constant + +:ref:`BreadcrumbMarker` **ALPHA_PASS** = ``458752`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one `! + + + +.. _class_RenderingDevice_constant_TRANSPARENT_PASS: + +.. rst-class:: classref-enumeration-constant + +:ref:`BreadcrumbMarker` **TRANSPARENT_PASS** = ``524288`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one `! + + + +.. _class_RenderingDevice_constant_POST_PROCESSING_PASS: + +.. rst-class:: classref-enumeration-constant + +:ref:`BreadcrumbMarker` **POST_PROCESSING_PASS** = ``589824`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one `! + + + +.. _class_RenderingDevice_constant_BLIT_PASS: + +.. rst-class:: classref-enumeration-constant + +:ref:`BreadcrumbMarker` **BLIT_PASS** = ``655360`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one `! + + + +.. _class_RenderingDevice_constant_UI_PASS: + +.. rst-class:: classref-enumeration-constant + +:ref:`BreadcrumbMarker` **UI_PASS** = ``720896`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one `! + + + +.. _class_RenderingDevice_constant_DEBUG_PASS: + +.. rst-class:: classref-enumeration-constant + +:ref:`BreadcrumbMarker` **DEBUG_PASS** = ``786432`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one `! + + + .. rst-class:: classref-section-separator ---- @@ -4839,7 +5029,7 @@ This method does nothing. .. rst-class:: classref-method -:ref:`int` **draw_list_begin**\ (\ framebuffer\: :ref:`RID`, initial_color_action\: :ref:`InitialAction`, final_color_action\: :ref:`FinalAction`, initial_depth_action\: :ref:`InitialAction`, final_depth_action\: :ref:`FinalAction`, clear_color_values\: :ref:`PackedColorArray` = PackedColorArray(), clear_depth\: :ref:`float` = 1.0, clear_stencil\: :ref:`int` = 0, region\: :ref:`Rect2` = Rect2(0, 0, 0, 0)\ ) :ref:`🔗` +:ref:`int` **draw_list_begin**\ (\ framebuffer\: :ref:`RID`, initial_color_action\: :ref:`InitialAction`, final_color_action\: :ref:`FinalAction`, initial_depth_action\: :ref:`InitialAction`, final_depth_action\: :ref:`FinalAction`, clear_color_values\: :ref:`PackedColorArray` = PackedColorArray(), clear_depth\: :ref:`float` = 1.0, clear_stencil\: :ref:`int` = 0, region\: :ref:`Rect2` = Rect2(0, 0, 0, 0), breadcrumb\: :ref:`int` = 0\ ) :ref:`🔗` Starts a list of raster drawing commands created with the ``draw_*`` methods. The returned value should be passed to other ``draw_list_*`` functions. @@ -4851,7 +5041,7 @@ A simple drawing operation might look like this (code is not a complete example) var rd = RenderingDevice.new() var clear_colors = PackedColorArray([Color(0, 0, 0, 0), Color(0, 0, 0, 0), Color(0, 0, 0, 0)]) - var draw_list = rd.draw_list_begin(framebuffers[i], RenderingDevice.INITIAL_ACTION_CLEAR, RenderingDevice.FINAL_ACTION_READ, RenderingDevice.INITIAL_ACTION_CLEAR, RenderingDevice.FINAL_ACTION_DISCARD, clear_colors) + var draw_list = rd.draw_list_begin(framebuffers[i], RenderingDevice.INITIAL_ACTION_CLEAR, RenderingDevice.FINAL_ACTION_READ, RenderingDevice.INITIAL_ACTION_CLEAR, RenderingDevice.FINAL_ACTION_DISCARD, clear_colors, RenderingDevice.OPAQUE_PASS) # Draw opaque. rd.draw_list_bind_render_pipeline(draw_list, raster_pipeline) @@ -4866,6 +5056,14 @@ A simple drawing operation might look like this (code is not a complete example) rd.draw_list_end() +The ``breadcrumb`` parameter can be an arbitrary 32-bit integer that is useful to diagnose GPU crashes. If Godot is built in dev or debug mode; when the GPU crashes Godot will dump all shaders that were being executed at the time of the crash and the breadcrumb is useful to diagnose what passes did those shaders belong to. + +It does not affect rendering behavior and can be set to 0. It is recommended to use :ref:`BreadcrumbMarker` enumerations for consistency but it's not required. It is also possible to use bitwise operations to add extra data. e.g. + +:: + + rd.draw_list_begin(fb[i], RenderingDevice.INITIAL_ACTION_CLEAR, RenderingDevice.FINAL_ACTION_READ, RenderingDevice.INITIAL_ACTION_CLEAR, RenderingDevice.FINAL_ACTION_DISCARD, clear_colors, RenderingDevice.OPAQUE_PASS | 5) + .. rst-class:: classref-item-separator ---- @@ -5248,6 +5446,52 @@ Returns the index of the last frame rendered that has rendering timestamps avail ---- +.. _class_RenderingDevice_method_get_device_allocation_count: + +.. rst-class:: classref-method + +:ref:`int` **get_device_allocation_count**\ (\ ) |const| :ref:`🔗` + +Returns how many allocations the GPU has performed for internal driver structures. + +This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderingDevice_method_get_device_allocs_by_object_type: + +.. rst-class:: classref-method + +:ref:`int` **get_device_allocs_by_object_type**\ (\ type\: :ref:`int`\ ) |const| :ref:`🔗` + +Same as :ref:`get_device_allocation_count` but filtered for a given object type. + +The type argument must be in range ``[0; get_tracked_object_type_count - 1]``. If :ref:`get_tracked_object_type_count` is 0, then type argument is ignored and always returns 0. + +This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderingDevice_method_get_device_memory_by_object_type: + +.. rst-class:: classref-method + +:ref:`int` **get_device_memory_by_object_type**\ (\ type\: :ref:`int`\ ) |const| :ref:`🔗` + +Same as :ref:`get_device_total_memory` but filtered for a given object type. + +The type argument must be in range ``[0; get_tracked_object_type_count - 1]``. If :ref:`get_tracked_object_type_count` is 0, then type argument is ignored and always returns 0. + +This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingDevice_method_get_device_name: .. rst-class:: classref-method @@ -5272,6 +5516,20 @@ Returns the universally unique identifier for the pipeline cache. This is used t ---- +.. _class_RenderingDevice_method_get_device_total_memory: + +.. rst-class:: classref-method + +:ref:`int` **get_device_total_memory**\ (\ ) |const| :ref:`🔗` + +Returns how much bytes the GPU is using. + +This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingDevice_method_get_device_vendor_name: .. rst-class:: classref-method @@ -5284,6 +5542,86 @@ Returns the vendor of the video adapter (e.g. "NVIDIA Corporation"). Equivalent ---- +.. _class_RenderingDevice_method_get_driver_allocation_count: + +.. rst-class:: classref-method + +:ref:`int` **get_driver_allocation_count**\ (\ ) |const| :ref:`🔗` + +Returns how many allocations the GPU driver has performed for internal driver structures. + +This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderingDevice_method_get_driver_allocs_by_object_type: + +.. rst-class:: classref-method + +:ref:`int` **get_driver_allocs_by_object_type**\ (\ type\: :ref:`int`\ ) |const| :ref:`🔗` + +Same as :ref:`get_driver_allocation_count` but filtered for a given object type. + +The type argument must be in range ``[0; get_tracked_object_type_count - 1]``. If :ref:`get_tracked_object_type_count` is 0, then type argument is ignored and always returns 0. + +This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderingDevice_method_get_driver_and_device_memory_report: + +.. rst-class:: classref-method + +:ref:`String` **get_driver_and_device_memory_report**\ (\ ) |const| :ref:`🔗` + +Returns string report in CSV format using the following methods: + +- :ref:`get_tracked_object_name`\ + +- :ref:`get_tracked_object_type_count`\ + +- :ref:`get_driver_total_memory`\ + +- :ref:`get_driver_allocation_count`\ + +- :ref:`get_driver_memory_by_object_type`\ + +- :ref:`get_driver_allocs_by_object_type`\ + +- :ref:`get_device_total_memory`\ + +- :ref:`get_device_allocation_count`\ + +- :ref:`get_device_memory_by_object_type`\ + +- :ref:`get_device_allocs_by_object_type`\ + +This is only used by Vulkan in debug builds. Godot must also be started with the ``--extra-gpu-memory-tracking`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderingDevice_method_get_driver_memory_by_object_type: + +.. rst-class:: classref-method + +:ref:`int` **get_driver_memory_by_object_type**\ (\ type\: :ref:`int`\ ) |const| :ref:`🔗` + +Same as :ref:`get_driver_total_memory` but filtered for a given object type. + +The type argument must be in range ``[0; get_tracked_object_type_count - 1]``. If :ref:`get_tracked_object_type_count` is 0, then type argument is ignored and always returns 0. + +This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingDevice_method_get_driver_resource: .. rst-class:: classref-method @@ -5296,6 +5634,20 @@ Returns the unique identifier of the driver ``resource`` for the specified ``rid ---- +.. _class_RenderingDevice_method_get_driver_total_memory: + +.. rst-class:: classref-method + +:ref:`int` **get_driver_total_memory**\ (\ ) |const| :ref:`🔗` + +Returns how much bytes the GPU driver is using for internal driver structures. + +This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingDevice_method_get_frame_delay: .. rst-class:: classref-method @@ -5320,6 +5672,58 @@ Returns the memory usage in bytes corresponding to the given ``type``. When usin ---- +.. _class_RenderingDevice_method_get_perf_report: + +.. rst-class:: classref-method + +:ref:`String` **get_perf_report**\ (\ ) |const| :ref:`🔗` + +Returns a string with a performance report from the past frame. Updates every frame. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderingDevice_method_get_tracked_object_name: + +.. rst-class:: classref-method + +:ref:`String` **get_tracked_object_name**\ (\ type_index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the name of the type of object for the given ``type_index``. This value must be in range ``[0; get_tracked_object_type_count - 1]``. If :ref:`get_tracked_object_type_count` is 0, then type argument is ignored and always returns the same string. + +The return value is important because it gives meaning to the types passed to :ref:`get_driver_memory_by_object_type`, :ref:`get_driver_allocs_by_object_type`, :ref:`get_device_memory_by_object_type`, and :ref:`get_device_allocs_by_object_type`. Examples of strings it can return (not exhaustive): + +- DEVICE_MEMORY + +- PIPELINE_CACHE + +- SWAPCHAIN_KHR + +- COMMAND_POOL + +Thus if e.g. ``get_tracked_object_name(5)`` returns "COMMAND_POOL", then ``get_device_memory_by_object_type(5)`` returns the bytes used by the GPU for command pools. + +This is only used by Vulkan in debug builds. Godot must also be started with the ``--extra-gpu-memory-tracking`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderingDevice_method_get_tracked_object_type_count: + +.. rst-class:: classref-method + +:ref:`int` **get_tracked_object_type_count**\ (\ ) |const| :ref:`🔗` + +Returns how many types of trackable objects are. + +This is only used by Vulkan in debug builds. Godot must also be started with the ``--extra-gpu-memory-tracking`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>`. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingDevice_method_index_array_create: .. rst-class:: classref-method @@ -5692,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 21fd6d7b8fc..6e5226a106d 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`\ (\ ) | @@ -477,6 +479,8 @@ Methods +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`instance_geometry_set_visibility_range`\ (\ instance\: :ref:`RID`, min\: :ref:`float`, max\: :ref:`float`, min_margin\: :ref:`float`, max_margin\: :ref:`float`, fade_mode\: :ref:`VisibilityRangeFadeMode`\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`instance_reset_physics_interpolation`\ (\ instance\: :ref:`RID`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`instance_set_base`\ (\ instance\: :ref:`RID`, base\: :ref:`RID`\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`instance_set_blend_shape_weight`\ (\ instance\: :ref:`RID`, shape\: :ref:`int`, weight\: :ref:`float`\ ) | @@ -487,6 +491,8 @@ Methods +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`instance_set_ignore_culling`\ (\ instance\: :ref:`RID`, enabled\: :ref:`bool`\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`instance_set_interpolated`\ (\ instance\: :ref:`RID`, interpolated\: :ref:`bool`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`instance_set_layer_mask`\ (\ instance\: :ref:`RID`, mask\: :ref:`int`\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`instance_set_pivot_data`\ (\ instance\: :ref:`RID`, sorting_offset\: :ref:`float`, use_aabb_center\: :ref:`bool`\ ) | @@ -561,6 +567,8 @@ Methods +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`lightmap_set_textures`\ (\ lightmap\: :ref:`RID`, light\: :ref:`RID`, uses_sh\: :ref:`bool`\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`lightmaps_set_bicubic_filter`\ (\ enable\: :ref:`bool`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`make_sphere_mesh`\ (\ latitudes\: :ref:`int`, longitudes\: :ref:`int`, radius\: :ref:`float`\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`material_create`\ (\ ) | @@ -649,6 +657,8 @@ Methods +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform2D` | :ref:`multimesh_instance_get_transform_2d`\ (\ multimesh\: :ref:`RID`, index\: :ref:`int`\ ) |const| | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`multimesh_instance_reset_physics_interpolation`\ (\ multimesh\: :ref:`RID`, index\: :ref:`int`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`multimesh_instance_set_color`\ (\ multimesh\: :ref:`RID`, index\: :ref:`int`, color\: :ref:`Color`\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`multimesh_instance_set_custom_data`\ (\ multimesh\: :ref:`RID`, index\: :ref:`int`, custom_data\: :ref:`Color`\ ) | @@ -659,10 +669,16 @@ Methods +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`multimesh_set_buffer`\ (\ multimesh\: :ref:`RID`, buffer\: :ref:`PackedFloat32Array`\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`multimesh_set_buffer_interpolated`\ (\ multimesh\: :ref:`RID`, buffer\: :ref:`PackedFloat32Array`, buffer_previous\: :ref:`PackedFloat32Array`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`multimesh_set_custom_aabb`\ (\ multimesh\: :ref:`RID`, aabb\: :ref:`AABB`\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`multimesh_set_mesh`\ (\ multimesh\: :ref:`RID`, mesh\: :ref:`RID`\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`multimesh_set_physics_interpolated`\ (\ multimesh\: :ref:`RID`, interpolated\: :ref:`bool`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`multimesh_set_physics_interpolation_quality`\ (\ multimesh\: :ref:`RID`, quality\: :ref:`MultimeshPhysicsInterpolationQuality`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`multimesh_set_visible_instances`\ (\ multimesh\: :ref:`RID`, visible\: :ref:`int`\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`occluder_create`\ (\ ) | @@ -883,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| | @@ -1088,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 @@ -1866,6 +1918,32 @@ Use :ref:`Transform3D` to store MultiMesh transform. ---- +.. _enum_RenderingServer_MultimeshPhysicsInterpolationQuality: + +.. rst-class:: classref-enumeration + +enum **MultimeshPhysicsInterpolationQuality**: :ref:`🔗` + +.. _class_RenderingServer_constant_MULTIMESH_INTERP_QUALITY_FAST: + +.. rst-class:: classref-enumeration-constant + +:ref:`MultimeshPhysicsInterpolationQuality` **MULTIMESH_INTERP_QUALITY_FAST** = ``0`` + +MultiMesh physics interpolation favors speed over quality. + +.. _class_RenderingServer_constant_MULTIMESH_INTERP_QUALITY_HIGH: + +.. rst-class:: classref-enumeration-constant + +:ref:`MultimeshPhysicsInterpolationQuality` **MULTIMESH_INTERP_QUALITY_HIGH** = ``1`` + +MultiMesh physics interpolation favors quality over speed. + +.. rst-class:: classref-item-separator + +---- + .. _enum_RenderingServer_LightProjectorFilter: .. rst-class:: classref-enumeration @@ -3822,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: @@ -4078,7 +4156,7 @@ Output color as they came in. This can cause bright lighting to look blown out, :ref:`EnvironmentToneMapper` **ENV_TONE_MAPPER_REINHARD** = ``1`` -Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors by this formula: ``color = color / (1 + color)``. This avoids clipping bright highlights, but the resulting image can look a bit dull. +Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors by this formula: ``color = color * (1 + color / (white * white)) / (1 + color)``. This avoids clipping bright highlights, but the resulting image can look a bit dull. When :ref:`Environment.tonemap_white` is left at the default value of ``1.0`` this is identical to :ref:`ENV_TONE_MAPPER_LINEAR` while also being slightly less performant. .. _class_RenderingServer_constant_ENV_TONE_MAPPER_FILMIC: @@ -5504,11 +5582,19 @@ Color global shader parameter (``global uniform vec4 ...``). Equivalent to :ref: Cubemap sampler global shader parameter (``global uniform samplerCube ...``). Exposed as a :ref:`Cubemap` in the editor UI. +.. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_SAMPLEREXT: + +.. rst-class:: classref-enumeration-constant + +:ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_SAMPLEREXT** = ``28`` + +External sampler global shader parameter (``global uniform samplerExternalOES ...``). Exposed as a :ref:`ExternalTexture` in the editor UI. + .. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_MAX: .. rst-class:: classref-enumeration-constant -:ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_MAX** = ``28`` +:ref:`GlobalShaderParameterType` **GLOBAL_VAR_TYPE_MAX** = ``29`` Represents the size of the :ref:`GlobalShaderParameterType` enum. @@ -5570,6 +5656,104 @@ Buffer memory used (in bytes). This includes vertex data, uniform buffers, and m Video memory used (in bytes). When using the Forward+ or mobile rendering backends, this is always greater than the sum of :ref:`RENDERING_INFO_TEXTURE_MEM_USED` and :ref:`RENDERING_INFO_BUFFER_MEM_USED`, since there is miscellaneous data not accounted for by those two metrics. When using the GL Compatibility backend, this is equal to the sum of :ref:`RENDERING_INFO_TEXTURE_MEM_USED` and :ref:`RENDERING_INFO_BUFFER_MEM_USED`. +.. _class_RenderingServer_constant_RENDERING_INFO_PIPELINE_COMPILATIONS_CANVAS: + +.. rst-class:: classref-enumeration-constant + +:ref:`RenderingInfo` **RENDERING_INFO_PIPELINE_COMPILATIONS_CANVAS** = ``6`` + +Number of pipeline compilations that were triggered by the 2D canvas renderer. + +.. _class_RenderingServer_constant_RENDERING_INFO_PIPELINE_COMPILATIONS_MESH: + +.. rst-class:: classref-enumeration-constant + +:ref:`RenderingInfo` **RENDERING_INFO_PIPELINE_COMPILATIONS_MESH** = ``7`` + +Number of pipeline compilations that were triggered by loading meshes. These compilations will show up as longer loading times the first time a user runs the game and the pipeline is required. + +.. _class_RenderingServer_constant_RENDERING_INFO_PIPELINE_COMPILATIONS_SURFACE: + +.. rst-class:: classref-enumeration-constant + +:ref:`RenderingInfo` **RENDERING_INFO_PIPELINE_COMPILATIONS_SURFACE** = ``8`` + +Number of pipeline compilations that were triggered by building the surface cache before rendering the scene. These compilations will show up as a stutter when loading an scene the first time a user runs the game and the pipeline is required. + +.. _class_RenderingServer_constant_RENDERING_INFO_PIPELINE_COMPILATIONS_DRAW: + +.. rst-class:: classref-enumeration-constant + +:ref:`RenderingInfo` **RENDERING_INFO_PIPELINE_COMPILATIONS_DRAW** = ``9`` + +Number of pipeline compilations that were triggered while drawing the scene. These compilations will show up as stutters during gameplay the first time a user runs the game and the pipeline is required. + +.. _class_RenderingServer_constant_RENDERING_INFO_PIPELINE_COMPILATIONS_SPECIALIZATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`RenderingInfo` **RENDERING_INFO_PIPELINE_COMPILATIONS_SPECIALIZATION** = ``10`` + +Number of pipeline compilations that were triggered to optimize the current scene. These compilations are done in the background and should not cause any stutters whatsoever. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_RenderingServer_PipelineSource: + +.. rst-class:: classref-enumeration + +enum **PipelineSource**: :ref:`🔗` + +.. _class_RenderingServer_constant_PIPELINE_SOURCE_CANVAS: + +.. rst-class:: classref-enumeration-constant + +:ref:`PipelineSource` **PIPELINE_SOURCE_CANVAS** = ``0`` + +Pipeline compilation that was triggered by the 2D canvas renderer. + +.. _class_RenderingServer_constant_PIPELINE_SOURCE_MESH: + +.. rst-class:: classref-enumeration-constant + +:ref:`PipelineSource` **PIPELINE_SOURCE_MESH** = ``1`` + +Pipeline compilation that was triggered by loading a mesh. + +.. _class_RenderingServer_constant_PIPELINE_SOURCE_SURFACE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PipelineSource` **PIPELINE_SOURCE_SURFACE** = ``2`` + +Pipeline compilation that was triggered by building the surface cache before rendering the scene. + +.. _class_RenderingServer_constant_PIPELINE_SOURCE_DRAW: + +.. rst-class:: classref-enumeration-constant + +:ref:`PipelineSource` **PIPELINE_SOURCE_DRAW** = ``3`` + +Pipeline compilation that was triggered while drawing the scene. + +.. _class_RenderingServer_constant_PIPELINE_SOURCE_SPECIALIZATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`PipelineSource` **PIPELINE_SOURCE_SPECIALIZATION** = ``4`` + +Pipeline compilation that was triggered to optimize the current scene. + +.. _class_RenderingServer_constant_PIPELINE_SOURCE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`PipelineSource` **PIPELINE_SOURCE_MAX** = ``5`` + +Represents the size of the :ref:`PipelineSource` enum. + .. rst-class:: classref-item-separator ---- @@ -6184,6 +6368,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 ---- @@ -6274,6 +6460,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 @@ -7020,7 +7218,7 @@ Sets the Z range of objects that will be affected by this light. Equivalent to : Transforms both the current and previous stored transform for a canvas light. -This allows transforming a light without creating a "glitch" in the interpolation, which is is particularly useful for large worlds utilizing a shifting origin. +This allows transforming a light without creating a "glitch" in the interpolation, which is particularly useful for large worlds utilizing a shifting origin. .. rst-class:: classref-item-separator @@ -7086,7 +7284,9 @@ Sets the shape of the occluder polygon. |void| **canvas_set_item_mirroring**\ (\ canvas\: :ref:`RID`, item\: :ref:`RID`, mirroring\: :ref:`Vector2`\ ) :ref:`🔗` -A copy of the canvas item will be drawn with a local offset of the mirroring :ref:`Vector2`. +A copy of the canvas item will be drawn with a local offset of the ``mirroring``. + +\ **Note:** This is equivalent to calling :ref:`canvas_set_item_repeat` like ``canvas_set_item_repeat(item, mirroring, 1)``, with an additional check ensuring ``canvas`` is a parent of ``item``. .. rst-class:: classref-item-separator @@ -8432,6 +8632,20 @@ Sets the visibility range values for the given geometry instance. Equivalent to ---- +.. _class_RenderingServer_method_instance_reset_physics_interpolation: + +.. rst-class:: classref-method + +|void| **instance_reset_physics_interpolation**\ (\ instance\: :ref:`RID`\ ) :ref:`🔗` + +Prevents physics interpolation for the current physics tick. + +This is useful when moving an instance to a new location, to give an instantaneous change rather than interpolation from the previous location. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_instance_set_base: .. rst-class:: classref-method @@ -8492,6 +8706,18 @@ If ``true``, ignores both frustum and occlusion culling on the specified 3D geom ---- +.. _class_RenderingServer_method_instance_set_interpolated: + +.. rst-class:: classref-method + +|void| **instance_set_interpolated**\ (\ instance\: :ref:`RID`, interpolated\: :ref:`bool`\ ) :ref:`🔗` + +Turns on and off physics interpolation for the instance. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_instance_set_layer_mask: .. rst-class:: classref-method @@ -8962,6 +9188,18 @@ Set the textures on the given ``lightmap`` GI instance to the texture array poin ---- +.. _class_RenderingServer_method_lightmaps_set_bicubic_filter: + +.. rst-class:: classref-method + +|void| **lightmaps_set_bicubic_filter**\ (\ enable\: :ref:`bool`\ ) :ref:`🔗` + +Toggles whether a bicubic filter should be used when lightmaps are sampled. This smoothens their appearance at a performance cost. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_make_sphere_mesh: .. rst-class:: classref-method @@ -9526,6 +9764,20 @@ Returns the :ref:`Transform2D` of the specified instance. For ---- +.. _class_RenderingServer_method_multimesh_instance_reset_physics_interpolation: + +.. rst-class:: classref-method + +|void| **multimesh_instance_reset_physics_interpolation**\ (\ multimesh\: :ref:`RID`, index\: :ref:`int`\ ) :ref:`🔗` + +Prevents physics interpolation for the specified instance during the current physics tick. + +This is useful when moving an instance to a new location, to give an instantaneous change rather than interpolation from the previous location. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_multimesh_instance_set_color: .. rst-class:: classref-method @@ -9597,6 +9849,26 @@ The per-instance data size and expected data order is: - Position + Custom data: 16 floats (12 floats for Transform3D, 4 floats of custom data) - Position + Vertex color + Custom data: 20 floats (12 floats for Transform3D, 4 floats for Color, 4 floats of custom data) +Instance transforms are in row-major order. Specifically: + +- For :ref:`Transform2D` the float-order is: ``(x.x, y.x, padding_float, origin.x, x.y, y.y, padding_float, origin.y)``. + +- For :ref:`Transform3D` the float-order is: ``(basis.x.x, basis.y.x, basis.z.x, origin.x, basis.x.y, basis.y.y, basis.z.y, origin.y, basis.x.z, basis.y.z, basis.z.z, origin.z)``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderingServer_method_multimesh_set_buffer_interpolated: + +.. rst-class:: classref-method + +|void| **multimesh_set_buffer_interpolated**\ (\ multimesh\: :ref:`RID`, buffer\: :ref:`PackedFloat32Array`, buffer_previous\: :ref:`PackedFloat32Array`\ ) :ref:`🔗` + +Alternative version of :ref:`multimesh_set_buffer` for use with physics interpolation. + +Takes both an array of current data and an array of data for the previous physics tick. + .. rst-class:: classref-item-separator ---- @@ -9625,6 +9897,32 @@ Sets the mesh to be drawn by the multimesh. Equivalent to :ref:`MultiMesh.mesh`, interpolated\: :ref:`bool`\ ) :ref:`🔗` + +Turns on and off physics interpolation for this MultiMesh resource. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderingServer_method_multimesh_set_physics_interpolation_quality: + +.. rst-class:: classref-method + +|void| **multimesh_set_physics_interpolation_quality**\ (\ multimesh\: :ref:`RID`, quality\: :ref:`MultimeshPhysicsInterpolationQuality`\ ) :ref:`🔗` + +Sets the physics interpolation quality for the :ref:`MultiMesh`. + +A value of :ref:`MULTIMESH_INTERP_QUALITY_FAST` gives fast but low quality interpolation, a value of :ref:`MULTIMESH_INTERP_QUALITY_HIGH` gives slower but higher quality interpolation. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_multimesh_set_visible_instances: .. rst-class:: classref-method @@ -10965,7 +11263,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. @@ -11043,6 +11341,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 @@ -11278,7 +11590,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``. @@ -11542,7 +11854,7 @@ Sets the measurement for the given ``viewport`` RID (obtained using :ref:`Viewpo |void| **viewport_set_msaa_2d**\ (\ viewport\: :ref:`RID`, msaa\: :ref:`ViewportMSAA`\ ) :ref:`🔗` -Sets the multisample anti-aliasing mode for 2D/Canvas on the specified ``viewport`` RID. See :ref:`ViewportMSAA` for options. +Sets the multisample antialiasing mode for 2D/Canvas on the specified ``viewport`` RID. See :ref:`ViewportMSAA` for options. Equivalent to :ref:`ProjectSettings.rendering/anti_aliasing/quality/msaa_2d` or :ref:`Viewport.msaa_2d`. .. rst-class:: classref-item-separator @@ -11554,7 +11866,7 @@ Sets the multisample anti-aliasing mode for 2D/Canvas on the specified ``viewpor |void| **viewport_set_msaa_3d**\ (\ viewport\: :ref:`RID`, msaa\: :ref:`ViewportMSAA`\ ) :ref:`🔗` -Sets the multisample anti-aliasing mode for 3D on the specified ``viewport`` RID. See :ref:`ViewportMSAA` for options. +Sets the multisample antialiasing mode for 3D on the specified ``viewport`` RID. See :ref:`ViewportMSAA` for options. Equivalent to :ref:`ProjectSettings.rendering/anti_aliasing/quality/msaa_3d` or :ref:`Viewport.msaa_3d`. .. rst-class:: classref-item-separator @@ -11678,7 +11990,7 @@ Sets a viewport's scenario. The scenario contains information about environment |void| **viewport_set_screen_space_aa**\ (\ viewport\: :ref:`RID`, mode\: :ref:`ViewportScreenSpaceAA`\ ) :ref:`🔗` -Sets the viewport's screen-space antialiasing mode. +Sets the viewport's screen-space antialiasing mode. Equivalent to :ref:`ProjectSettings.rendering/anti_aliasing/quality/screen_space_aa` or :ref:`Viewport.screen_space_aa`. .. rst-class:: classref-item-separator @@ -11776,7 +12088,7 @@ Sets when the viewport should be updated. See :ref:`ViewportUpdateMode`, enable\: :ref:`bool`\ ) :ref:`🔗` -If ``true``, enables debanding on the specified viewport. Equivalent to :ref:`ProjectSettings.rendering/anti_aliasing/quality/use_debanding`. +If ``true``, enables debanding on the specified viewport. Equivalent to :ref:`ProjectSettings.rendering/anti_aliasing/quality/use_debanding` or :ref:`Viewport.use_debanding`. .. rst-class:: classref-item-separator @@ -11814,7 +12126,7 @@ If ``true``, enables occlusion culling on the specified viewport. Equivalent to |void| **viewport_set_use_taa**\ (\ viewport\: :ref:`RID`, enable\: :ref:`bool`\ ) :ref:`🔗` -If ``true``, use Temporal Anti-Aliasing. Equivalent to :ref:`ProjectSettings.rendering/anti_aliasing/quality/use_taa`. +If ``true``, use temporal antialiasing. Equivalent to :ref:`ProjectSettings.rendering/anti_aliasing/quality/use_taa` or :ref:`Viewport.use_taa`. .. rst-class:: classref-item-separator diff --git a/classes/class_resource.rst b/classes/class_resource.rst index 830345729a1..36a651ddc09 100644 --- a/classes/class_resource.rst +++ b/classes/class_resource.rst @@ -64,25 +64,39 @@ Methods .. table:: :widths: auto - +---------------------------------+-----------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_get_rid`\ (\ ) |virtual| | - +---------------------------------+-----------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_setup_local_to_scene`\ (\ ) |virtual| | - +---------------------------------+-----------------------------------------------------------------------------------------------------------------+ - | :ref:`Resource` | :ref:`duplicate`\ (\ subresources\: :ref:`bool` = false\ ) |const| | - +---------------------------------+-----------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`emit_changed`\ (\ ) | - +---------------------------------+-----------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`generate_scene_unique_id`\ (\ ) |static| | - +---------------------------------+-----------------------------------------------------------------------------------------------------------------+ - | :ref:`Node` | :ref:`get_local_scene`\ (\ ) |const| | - +---------------------------------+-----------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_rid`\ (\ ) |const| | - +---------------------------------+-----------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`setup_local_to_scene`\ (\ ) | - +---------------------------------+-----------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`take_over_path`\ (\ path\: :ref:`String`\ ) | - +---------------------------------+-----------------------------------------------------------------------------------------------------------------+ + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_get_rid`\ (\ ) |virtual| |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_reset_state`\ (\ ) |virtual| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_path_cache`\ (\ path\: :ref:`String`\ ) |virtual| |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_setup_local_to_scene`\ (\ ) |virtual| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Resource` | :ref:`duplicate`\ (\ subresources\: :ref:`bool` = false\ ) |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`emit_changed`\ (\ ) | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`generate_scene_unique_id`\ (\ ) |static| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_id_for_path`\ (\ path\: :ref:`String`\ ) |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node` | :ref:`get_local_scene`\ (\ ) |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_rid`\ (\ ) |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_built_in`\ (\ ) |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reset_state`\ (\ ) | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_id_for_path`\ (\ path\: :ref:`String`, id\: :ref:`String`\ ) | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_path_cache`\ (\ path\: :ref:`String`\ ) | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`setup_local_to_scene`\ (\ ) | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`take_over_path`\ (\ path\: :ref:`String`\ ) | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -215,7 +229,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`RID` **_get_rid**\ (\ ) |virtual| :ref:`🔗` +:ref:`RID` **_get_rid**\ (\ ) |virtual| |const| :ref:`🔗` Override this method to return a custom :ref:`RID` when :ref:`get_rid` is called. @@ -223,6 +237,30 @@ Override this method to return a custom :ref:`RID` when :ref:`get_rid ---- +.. _class_Resource_private_method__reset_state: + +.. rst-class:: classref-method + +|void| **_reset_state**\ (\ ) |virtual| :ref:`🔗` + +For resources that use a variable number of properties, either via :ref:`Object._validate_property` or :ref:`Object._get_property_list`, this method should be implemented to correctly clear the resource's state. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Resource_private_method__set_path_cache: + +.. rst-class:: classref-method + +|void| **_set_path_cache**\ (\ path\: :ref:`String`\ ) |virtual| |const| :ref:`🔗` + +Sets the resource's path to ``path`` without involving the resource cache. + +.. rst-class:: classref-item-separator + +---- + .. _class_Resource_private_method__setup_local_to_scene: .. rst-class:: classref-method @@ -304,6 +342,20 @@ Generates a unique identifier for a resource to be contained inside a :ref:`Pack ---- +.. _class_Resource_method_get_id_for_path: + +.. rst-class:: classref-method + +:ref:`String` **get_id_for_path**\ (\ path\: :ref:`String`\ ) |const| :ref:`🔗` + +Returns the unique identifier for the resource with the given ``path`` from the resource cache. If the resource is not loaded and cached, an empty string is returned. + +\ **Note:** This method is only implemented when running in an editor context. At runtime, it returns an empty string. + +.. rst-class:: classref-item-separator + +---- + .. _class_Resource_method_get_local_scene: .. rst-class:: classref-method @@ -328,6 +380,56 @@ Returns the :ref:`RID` of this resource (or an empty RID). Many resou ---- +.. _class_Resource_method_is_built_in: + +.. rst-class:: classref-method + +:ref:`bool` **is_built_in**\ (\ ) |const| :ref:`🔗` + +Returns ``true`` if the resource is built-in (from the engine) or ``false`` if it is user-defined. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Resource_method_reset_state: + +.. rst-class:: classref-method + +|void| **reset_state**\ (\ ) :ref:`🔗` + +For resources that use a variable number of properties, either via :ref:`Object._validate_property` or :ref:`Object._get_property_list`, override :ref:`_reset_state` to correctly clear the resource's state. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Resource_method_set_id_for_path: + +.. rst-class:: classref-method + +|void| **set_id_for_path**\ (\ path\: :ref:`String`, id\: :ref:`String`\ ) :ref:`🔗` + +Sets the unique identifier to ``id`` for the resource with the given ``path`` in the resource cache. If the unique identifier is empty, the cache entry using ``path`` is removed if it exists. + +\ **Note:** This method is only implemented when running in an editor context. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Resource_method_set_path_cache: + +.. rst-class:: classref-method + +|void| **set_path_cache**\ (\ path\: :ref:`String`\ ) :ref:`🔗` + +Sets the resource's path to ``path`` without involving the resource cache. + +.. rst-class:: classref-item-separator + +---- + .. _class_Resource_method_setup_local_to_scene: .. rst-class:: classref-method diff --git a/classes/class_resourceimporterdynamicfont.rst b/classes/class_resourceimporterdynamicfont.rst index c0388887f2e..65f38724cdd 100644 --- a/classes/class_resourceimporterdynamicfont.rst +++ b/classes/class_resourceimporterdynamicfont.rst @@ -73,7 +73,7 @@ Properties +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-----------+ | :ref:`Dictionary` | :ref:`script_support` | ``{}`` | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-----------+ - | :ref:`int` | :ref:`subpixel_positioning` | ``1`` | + | :ref:`int` | :ref:`subpixel_positioning` | ``4`` | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-----------+ .. rst-class:: classref-section-separator @@ -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. @@ -299,7 +299,7 @@ Override the list of language scripts supported by this font. If left empty, thi .. rst-class:: classref-property -:ref:`int` **subpixel_positioning** = ``1`` :ref:`🔗` +:ref:`int` **subpixel_positioning** = ``4`` :ref:`🔗` Subpixel positioning improves font rendering appearance, especially at smaller font sizes. The downside is that it takes more time to initially render the font, which can cause stuttering during gameplay, especially if used with large font sizes. This should be set to **Disabled** for fonts with a pixel art appearance. @@ -311,6 +311,8 @@ Subpixel positioning improves font rendering appearance, especially at smaller f \ **One Quarter of a Pixel:** Always perform precise subpixel positioning regardless of font size. Highest quality, slowest rendering. +\ **Auto (Except Pixel Fonts):** **Disabled** for the pixel style fonts (each glyph contours contain only straight horizontal and vertical lines), **Auto** for the other fonts. + .. |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_resourceimporterimagefont.rst b/classes/class_resourceimporterimagefont.rst index 989f5f61ffb..d6882106b0b 100644 --- a/classes/class_resourceimporterimagefont.rst +++ b/classes/class_resourceimporterimagefont.rst @@ -183,7 +183,7 @@ Margin to cut on the sides of the entire image. This can be used to cut parts of Kerning pairs for the font. Kerning pair adjust the spacing between two characters. -Each string consist of three space separated values: "from" string, "to" string and integer offset. Each combination form the two string for a kerning pair, e.g, ``ab cd -3`` will create kerning pairs ``ac``, ``ad``, ``bc``, and ``bd`` with offset ``-3``. +Each string consist of three space separated values: "from" string, "to" string and integer offset. Each combination form the two string for a kerning pair, e.g, ``ab cd -3`` will create kerning pairs ``ac``, ``ad``, ``bc``, and ``bd`` with offset ``-3``. ``\uXXXX`` escape sequences can be used to add Unicode characters. **Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray` for more details. diff --git a/classes/class_resourceimporterobj.rst b/classes/class_resourceimporterobj.rst index db0de9ba1fd..cfc2b3127c6 100644 --- a/classes/class_resourceimporterobj.rst +++ b/classes/class_resourceimporterobj.rst @@ -45,8 +45,6 @@ Properties +-------------------------------+----------------------------------------------------------------------------------------------------------+----------------------+ | :ref:`Vector3` | :ref:`offset_mesh` | ``Vector3(0, 0, 0)`` | +-------------------------------+----------------------------------------------------------------------------------------------------------+----------------------+ - | :ref:`bool` | :ref:`optimize_mesh` | ``true`` | - +-------------------------------+----------------------------------------------------------------------------------------------------------+----------------------+ | :ref:`Vector3` | :ref:`scale_mesh` | ``Vector3(1, 1, 1)`` | +-------------------------------+----------------------------------------------------------------------------------------------------------+----------------------+ @@ -97,18 +95,6 @@ Offsets the mesh's data by the specified value. This can be used to work around ---- -.. _class_ResourceImporterOBJ_property_optimize_mesh: - -.. rst-class:: classref-property - -:ref:`bool` **optimize_mesh** = ``true`` :ref:`🔗` - -Unused parameter. This currently has no effect. - -.. rst-class:: classref-item-separator - ----- - .. _class_ResourceImporterOBJ_property_scale_mesh: .. rst-class:: classref-property 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_resourceimportertexture.rst b/classes/class_resourceimportertexture.rst index 5be053430fd..37acc7b5219 100644 --- a/classes/class_resourceimportertexture.rst +++ b/classes/class_resourceimportertexture.rst @@ -329,9 +329,9 @@ More information about normal maps (including a coordinate order table for popul An alternative to fixing darkened borders with :ref:`process/fix_alpha_border` is to use premultiplied alpha. By enabling this option, the texture will be converted to this format. A premultiplied alpha texture requires specific materials to be displayed correctly: -- In 2D, a :ref:`CanvasItemMaterial` will need to be created and configured to use the :ref:`CanvasItemMaterial.BLEND_MODE_PREMULT_ALPHA` blend mode on :ref:`CanvasItem`\ s that use this texture. +- In 2D, a :ref:`CanvasItemMaterial` will need to be created and configured to use the :ref:`CanvasItemMaterial.BLEND_MODE_PREMULT_ALPHA` blend mode on :ref:`CanvasItem`\ s that use this texture. In custom ``@canvas_item`` shaders, ``render_mode blend_premul_alpha;`` should be used. -- In 3D, there is no support for premultiplied alpha blend mode yet, so this option is only suited for 2D. +- In 3D, a :ref:`BaseMaterial3D` will need to be created and configured to use the :ref:`BaseMaterial3D.BLEND_MODE_PREMULT_ALPHA` blend mode on materials that use this texture. In custom ``spatial`` shaders, ``render_mode blend_premul_alpha;`` should be used. .. rst-class:: classref-item-separator diff --git a/classes/class_resourceimporterwav.rst b/classes/class_resourceimporterwav.rst index 6cbf8292c99..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,15 +73,15 @@ 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. -\ **Disabled:** Imports audio data without any compression. This results in the highest possible quality. +- **PCM (Uncompressed):** Imports audio data without any form of compression, preserving the highest possible quality. It has the lowest CPU cost, but the highest memory usage. -\ **RAM (Ima-ADPCM):** Performs fast lossy compression on import. Low CPU cost, but quality is noticeably decreased compared to Ogg Vorbis or even MP3. +- **IMA ADPCM:** Applies fast, lossy compression during import, noticeably decreasing the quality, but with low CPU cost and memory usage. Does not support seeking and only Forward loop mode is supported. -\ **QOA (`Quite OK Audio `__):** Performs lossy compression on import. CPU cost is slightly higher than IMA-ADPCM, but quality is much higher. +- **\ `Quite OK Audio `__:** Also applies lossy compression on import, having a slightly higher CPU cost compared to IMA ADPCM, but much higher quality and the lowest memory usage. .. rst-class:: classref-item-separator @@ -115,15 +117,17 @@ The end loop point to use when :ref:`edit/loop_mode` **edit/loop_mode** = ``0`` :ref:`🔗` -Controls how audio should loop. This is automatically read from the WAV metadata on import. +Controls how audio should loop. + +- **Detect From WAV:** Uses loop information from the WAV metadata. -\ **Disabled:** Don't loop audio, even if metadata indicates the file should be played back looping. +- **Disabled:** Don't loop audio, even if the metadata indicates the file playback should loop. -\ **Forward:** Standard audio looping. +- **Forward:** Standard audio looping. Plays the audio forward from the beginning to :ref:`edit/loop_end`, then returns to :ref:`edit/loop_begin` and repeats. -\ **Ping-Pong:** Play audio forward until it's done playing, then play it backward and repeat. This is similar to mirrored texture repeat, but for audio. +- **Ping-Pong:** Plays the audio forward until :ref:`edit/loop_end`, then backwards to :ref:`edit/loop_begin`, repeating this cycle. -\ **Backward:** Play audio in reverse and loop back to the end when done playing. +- **Backward:** Plays the audio backwards from :ref:`edit/loop_end` to :ref:`edit/loop_begin`, then repeats. \ **Note:** In :ref:`AudioStreamPlayer`, the :ref:`AudioStreamPlayer.finished` signal won't be emitted for looping audio when it reaches the end of the audio file, as the audio will keep playing indefinitely. diff --git a/classes/class_resourceloader.rst b/classes/class_resourceloader.rst index 845ce3d19e0..a039c11dda5 100644 --- a/classes/class_resourceloader.rst +++ b/classes/class_resourceloader.rst @@ -45,6 +45,8 @@ Methods +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`exists`\ (\ path\: :ref:`String`, type_hint\: :ref:`String` = ""\ ) | +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Resource` | :ref:`get_cached_ref`\ (\ path\: :ref:`String`\ ) | + +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`get_dependencies`\ (\ path\: :ref:`String`\ ) | +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`get_recognized_extensions_for_type`\ (\ type\: :ref:`String`\ ) | @@ -202,6 +204,20 @@ An optional ``type_hint`` can be used to further specify the :ref:`Resource` **get_cached_ref**\ (\ path\: :ref:`String`\ ) :ref:`🔗` + +Returns the cached resource reference for the given ``path``. + +\ **Note:** If the resource is not cached, the returned :ref:`Resource` will be invalid. + +.. rst-class:: classref-item-separator + +---- + .. _class_ResourceLoader_method_get_dependencies: .. rst-class:: classref-method diff --git a/classes/class_resourcesaver.rst b/classes/class_resourcesaver.rst index 9a132f8b9c2..5cae353d276 100644 --- a/classes/class_resourcesaver.rst +++ b/classes/class_resourcesaver.rst @@ -36,6 +36,8 @@ Methods +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`get_recognized_extensions`\ (\ type\: :ref:`Resource`\ ) | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_resource_id_for_path`\ (\ path\: :ref:`String`, generate\: :ref:`bool` = false\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`remove_resource_format_saver`\ (\ format_saver\: :ref:`ResourceFormatSaver`\ ) | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`save`\ (\ resource\: :ref:`Resource`, path\: :ref:`String` = "", flags\: |bitfield|\[:ref:`SaverFlags`\] = 0\ ) | @@ -155,6 +157,18 @@ Returns the list of extensions available for saving a resource of a given type. ---- +.. _class_ResourceSaver_method_get_resource_id_for_path: + +.. rst-class:: classref-method + +:ref:`int` **get_resource_id_for_path**\ (\ path\: :ref:`String`, generate\: :ref:`bool` = false\ ) :ref:`🔗` + +Returns the resource ID for the given path. If ``generate`` is ``true``, a new resource ID will be generated if one for the path is not found. If ``generate`` is ``false`` and the path is not found, :ref:`ResourceUID.INVALID_ID` is returned. + +.. rst-class:: classref-item-separator + +---- + .. _class_ResourceSaver_method_remove_resource_format_saver: .. rst-class:: classref-method diff --git a/classes/class_resourceuid.rst b/classes/class_resourceuid.rst index cc39a4191b4..47a1cf2a7ea 100644 --- a/classes/class_resourceuid.rst +++ b/classes/class_resourceuid.rst @@ -19,7 +19,7 @@ A singleton that manages the unique identifiers of all resources within a projec Description ----------- -Resource UIDs (Unique IDentifiers) allow the engine to keep references between resources intact, even if files can renamed or moved. They can be accessed with ``uid://``. +Resource UIDs (Unique IDentifiers) allow the engine to keep references between resources intact, even if files are renamed or moved. They can be accessed with ``uid://``. \ **ResourceUID** keeps track of all registered resource UIDs in a project, generates new UIDs, and converts between their string and integer representations. diff --git a/classes/class_richtextlabel.rst b/classes/class_richtextlabel.rst index f1a0d6a2b4e..0f10265ceaa 100644 --- a/classes/class_richtextlabel.rst +++ b/classes/class_richtextlabel.rst @@ -67,6 +67,10 @@ Properties +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`hint_underlined` | ``true`` | +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`HorizontalAlignment` | :ref:`horizontal_alignment` | ``0`` | + +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | |bitfield|\[:ref:`JustificationFlag`\] | :ref:`justification_flags` | ``163`` | + +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`String` | :ref:`language` | ``""`` | +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`meta_underlined` | ``true`` | @@ -87,6 +91,8 @@ Properties +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`int` | :ref:`tab_size` | ``4`` | +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array` | :ref:`tab_stops` | ``PackedFloat32Array()`` | + +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`String` | :ref:`text` | ``""`` | +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`TextDirection` | :ref:`text_direction` | ``0`` | @@ -157,6 +163,8 @@ Methods +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`invalidate_paragraph`\ (\ paragraph\: :ref:`int`\ ) | +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_finished`\ (\ ) |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_menu_visible`\ (\ ) |const| | +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_ready`\ (\ ) |const| | @@ -722,6 +730,40 @@ If ``true``, the label underlines hint tags such as ``[hint=description]{text}[/ ---- +.. _class_RichTextLabel_property_horizontal_alignment: + +.. rst-class:: classref-property + +:ref:`HorizontalAlignment` **horizontal_alignment** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_horizontal_alignment**\ (\ value\: :ref:`HorizontalAlignment`\ ) +- :ref:`HorizontalAlignment` **get_horizontal_alignment**\ (\ ) + +Controls the text's horizontal alignment. Supports left, center, right, and fill, or justify. Set it to one of the :ref:`HorizontalAlignment` constants. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RichTextLabel_property_justification_flags: + +.. rst-class:: classref-property + +|bitfield|\[:ref:`JustificationFlag`\] **justification_flags** = ``163`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_justification_flags**\ (\ value\: |bitfield|\[:ref:`JustificationFlag`\]\ ) +- |bitfield|\[:ref:`JustificationFlag`\] **get_justification_flags**\ (\ ) + +Line fill alignment rules. See :ref:`JustificationFlag` for more information. + +.. rst-class:: classref-item-separator + +---- + .. _class_RichTextLabel_property_language: .. rst-class:: classref-property @@ -894,6 +936,25 @@ The number of spaces associated with a single tab length. Does not affect ``\t`` ---- +.. _class_RichTextLabel_property_tab_stops: + +.. rst-class:: classref-property + +:ref:`PackedFloat32Array` **tab_stops** = ``PackedFloat32Array()`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_tab_stops**\ (\ value\: :ref:`PackedFloat32Array`\ ) +- :ref:`PackedFloat32Array` **get_tab_stops**\ (\ ) + +Aligns text to the given tab-stops. + +**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 + +---- + .. _class_RichTextLabel_property_text: .. rst-class:: classref-property @@ -1089,7 +1150,7 @@ Clears the current selection. Returns the line number of the character position provided. Line and character numbers are both zero-indexed. -\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_ready` or :ref:`finished` to determine whether document is fully loaded. +\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_finished` or :ref:`finished` to determine whether document is fully loaded. .. rst-class:: classref-item-separator @@ -1103,7 +1164,7 @@ Returns the line number of the character position provided. Line and character n Returns the paragraph number of the character position provided. Paragraph and character numbers are both zero-indexed. -\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_ready` or :ref:`finished` to determine whether document is fully loaded. +\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_finished` or :ref:`finished` to determine whether document is fully loaded. .. rst-class:: classref-item-separator @@ -1117,7 +1178,7 @@ Returns the paragraph number of the character position provided. Paragraph and c Returns the height of the content. -\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_ready` or :ref:`finished` to determine whether document is fully loaded. +\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_finished` or :ref:`finished` to determine whether document is fully loaded. .. rst-class:: classref-item-separator @@ -1131,7 +1192,7 @@ Returns the height of the content. Returns the width of the content. -\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_ready` or :ref:`finished` to determine whether document is fully loaded. +\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_finished` or :ref:`finished` to determine whether document is fully loaded. .. rst-class:: classref-item-separator @@ -1145,7 +1206,7 @@ Returns the width of the content. Returns the total number of lines in the text. Wrapped text is counted as multiple lines. -\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_ready` or :ref:`finished` to determine whether document is fully loaded. +\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_finished` or :ref:`finished` to determine whether document is fully loaded. .. rst-class:: classref-item-separator @@ -1159,7 +1220,7 @@ Returns the total number of lines in the text. Wrapped text is counted as multip Returns the vertical offset of the line found at the provided index. -\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_ready` or :ref:`finished` to determine whether document is fully loaded. +\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_finished` or :ref:`finished` to determine whether document is fully loaded. .. rst-class:: classref-item-separator @@ -1244,7 +1305,7 @@ Returns the total number of paragraphs (newlines or ``p`` tags in the tag stack' Returns the vertical offset of the paragraph found at the provided index. -\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_ready` or :ref:`finished` to determine whether document is fully loaded. +\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_finished` or :ref:`finished` to determine whether document is fully loaded. .. rst-class:: classref-item-separator @@ -1332,7 +1393,7 @@ Returns the vertical scrollbar. Returns the number of visible lines. -\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_ready` or :ref:`finished` to determine whether document is fully loaded. +\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_finished` or :ref:`finished` to determine whether document is fully loaded. .. rst-class:: classref-item-separator @@ -1346,7 +1407,7 @@ Returns the number of visible lines. Returns the number of visible paragraphs. A paragraph is considered visible if at least one of its lines is visible. -\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_ready` or :ref:`finished` to determine whether document is fully loaded. +\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_finished` or :ref:`finished` to determine whether document is fully loaded. .. rst-class:: classref-item-separator @@ -1401,6 +1462,18 @@ Invalidates ``paragraph`` and all subsequent paragraphs cache. ---- +.. _class_RichTextLabel_method_is_finished: + +.. rst-class:: classref-method + +:ref:`bool` **is_finished**\ (\ ) |const| :ref:`🔗` + +If :ref:`threaded` is enabled, returns ``true`` if the background thread has finished text processing, otherwise always return ``true``. + +.. rst-class:: classref-item-separator + +---- + .. _class_RichTextLabel_method_is_menu_visible: .. rst-class:: classref-method @@ -1419,6 +1492,8 @@ Returns whether the menu is visible. Use this instead of ``get_menu().visible`` :ref:`bool` **is_ready**\ (\ ) |const| :ref:`🔗` +**Deprecated:** Use :ref:`is_finished` instead. + If :ref:`threaded` is enabled, returns ``true`` if the background thread has finished text processing, otherwise always return ``true``. .. rst-class:: classref-item-separator diff --git a/classes/class_scenemultiplayer.rst b/classes/class_scenemultiplayer.rst index 385ea6b4d3f..683287f4d44 100644 --- a/classes/class_scenemultiplayer.rst +++ b/classes/class_scenemultiplayer.rst @@ -157,7 +157,7 @@ If ``true``, the MultiplayerAPI will allow encoding and decoding of object durin - |void| **set_auth_callback**\ (\ value\: :ref:`Callable`\ ) - :ref:`Callable` **get_auth_callback**\ (\ ) -The callback to execute when when receiving authentication data sent via :ref:`send_auth`. If the :ref:`Callable` is empty (default), peers will be automatically accepted as soon as they connect. +The callback to execute when receiving authentication data sent via :ref:`send_auth`. If the :ref:`Callable` is empty (default), peers will be automatically accepted as soon as they connect. .. rst-class:: classref-item-separator @@ -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_scenetree.rst b/classes/class_scenetree.rst index 82e2d63d69c..3b3562a856e 100644 --- a/classes/class_scenetree.rst +++ b/classes/class_scenetree.rst @@ -730,7 +730,7 @@ Returns ``true`` if a node added to the given group ``name`` exists in the tree. |void| **notify_group**\ (\ group\: :ref:`StringName`, notification\: :ref:`int`\ ) :ref:`🔗` -Calls :ref:`Object.notification` with the given ``notification`` to all nodes inside this tree added to the ``group``. See also :ref:`call_group` and :ref:`set_group`. +Calls :ref:`Object.notification` with the given ``notification`` to all nodes inside this tree added to the ``group``. See also :doc:`Godot notifications <../tutorials/best_practices/godot_notifications>` and :ref:`call_group` and :ref:`set_group`. \ **Note:** This method acts immediately on all selected nodes at once, which may cause stuttering in some performance-intensive situations. 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 f7963518b6d..81f899c43ba 100644 --- a/classes/class_scripteditor.rst +++ b/classes/class_scripteditor.rst @@ -31,6 +31,8 @@ Methods .. table:: :widths: auto + +------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_breakpoints`\ (\ ) | +------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`ScriptEditorBase` | :ref:`get_current_editor`\ (\ ) |const| | +------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -50,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 @@ -89,6 +93,18 @@ Emitted when editor is about to close the active script. Argument is a :ref:`Scr Method Descriptions ------------------- +.. _class_ScriptEditor_method_get_breakpoints: + +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_breakpoints**\ (\ ) :ref:`🔗` + +Returns array of breakpoints. + +.. rst-class:: classref-item-separator + +---- + .. _class_ScriptEditor_method_get_current_editor: .. rst-class:: classref-method @@ -147,8 +163,6 @@ Opens help for the given topic. The ``topic`` is an encoded string that controls The supported ``topic`` formats include ``class_name:class``, ``class_method:class:method``, ``class_constant:class:constant``, ``class_signal:class:signal``, ``class_annotation:class:@annotation``, ``class_property:class:property``, and ``class_theme_item:class:item``, where ``class`` is the class name, ``method`` is the method name, ``constant`` is the constant name, ``signal`` is the signal name, ``annotation`` is the annotation name, ``property`` is the property name, and ``item`` is the theme item. -\ **Examples:**\ - :: # Shows help for the Node class. @@ -222,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_scriptlanguageextension.rst b/classes/class_scriptlanguageextension.rst index 5c3fde62ee9..4ad7879b7b4 100644 --- a/classes/class_scriptlanguageextension.rst +++ b/classes/class_scriptlanguageextension.rst @@ -127,6 +127,8 @@ Methods +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_reload_all_scripts`\ (\ ) |virtual| | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_reload_scripts`\ (\ scripts\: :ref:`Array`, soft_reload\: :ref:`bool`\ ) |virtual| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_reload_tool_script`\ (\ script\: :ref:`Script`, soft_reload\: :ref:`bool`\ ) |virtual| | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_remove_named_global_constant`\ (\ name\: :ref:`StringName`\ ) |virtual| | @@ -1180,6 +1182,20 @@ Returns the line where the function is defined in the code, or ``-1`` if the fun ---- +.. _class_ScriptLanguageExtension_private_method__reload_scripts: + +.. rst-class:: classref-method + +|void| **_reload_scripts**\ (\ scripts\: :ref:`Array`, soft_reload\: :ref:`bool`\ ) |virtual| :ref:`🔗` + +.. container:: contribute + + There is currently no description for this method. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + .. _class_ScriptLanguageExtension_private_method__reload_tool_script: .. rst-class:: classref-method diff --git a/classes/class_scrollcontainer.rst b/classes/class_scrollcontainer.rst index d5b548c9050..9a7de32f836 100644 --- a/classes/class_scrollcontainer.rst +++ b/classes/class_scrollcontainer.rst @@ -166,6 +166,14 @@ Scrolling enabled, scrollbar will be always visible. Scrolling enabled, scrollbar will be hidden. +.. _class_ScrollContainer_constant_SCROLL_MODE_RESERVE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ScrollMode` **SCROLL_MODE_RESERVE** = ``4`` + +Combines :ref:`SCROLL_MODE_AUTO` and :ref:`SCROLL_MODE_SHOW_ALWAYS`. The scrollbar is only visible if necessary, but the content size is adjusted as if it was always visible. It's useful for ensuring that content size stays the same regardless if the scrollbar is visible. + .. rst-class:: classref-section-separator ---- diff --git a/classes/class_semaphore.rst b/classes/class_semaphore.rst index dba9b2dc128..ab7c8890dcb 100644 --- a/classes/class_semaphore.rst +++ b/classes/class_semaphore.rst @@ -46,13 +46,13 @@ Methods .. table:: :widths: auto - +-------------------------+--------------------------------------------------------+ - | |void| | :ref:`post`\ (\ ) | - +-------------------------+--------------------------------------------------------+ - | :ref:`bool` | :ref:`try_wait`\ (\ ) | - +-------------------------+--------------------------------------------------------+ - | |void| | :ref:`wait`\ (\ ) | - +-------------------------+--------------------------------------------------------+ + +-------------------------+-----------------------------------------------------------------------------------+ + | |void| | :ref:`post`\ (\ count\: :ref:`int` = 1\ ) | + +-------------------------+-----------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`try_wait`\ (\ ) | + +-------------------------+-----------------------------------------------------------------------------------+ + | |void| | :ref:`wait`\ (\ ) | + +-------------------------+-----------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -67,9 +67,9 @@ Method Descriptions .. rst-class:: classref-method -|void| **post**\ (\ ) :ref:`🔗` +|void| **post**\ (\ count\: :ref:`int` = 1\ ) :ref:`🔗` -Lowers the **Semaphore**, allowing one more thread in. +Lowers the **Semaphore**, allowing one thread in, or more if ``count`` is specified. .. rst-class:: classref-item-separator diff --git a/classes/class_shader.rst b/classes/class_shader.rst index 00d4576142b..20d7683c8d3 100644 --- a/classes/class_shader.rst +++ b/classes/class_shader.rst @@ -52,15 +52,15 @@ Methods .. table:: :widths: auto - +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D` | :ref:`get_default_texture_parameter`\ (\ name\: :ref:`StringName`, index\: :ref:`int` = 0\ ) |const| | - +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Mode` | :ref:`get_mode`\ (\ ) |const| | - +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`get_shader_uniform_list`\ (\ get_groups\: :ref:`bool` = false\ ) | - +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_default_texture_parameter`\ (\ name\: :ref:`StringName`, texture\: :ref:`Texture2D`, index\: :ref:`int` = 0\ ) | - +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture` | :ref:`get_default_texture_parameter`\ (\ name\: :ref:`StringName`, index\: :ref:`int` = 0\ ) |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Mode` | :ref:`get_mode`\ (\ ) |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`get_shader_uniform_list`\ (\ get_groups\: :ref:`bool` = false\ ) | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_default_texture_parameter`\ (\ name\: :ref:`StringName`, texture\: :ref:`Texture`, index\: :ref:`int` = 0\ ) | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -152,7 +152,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Texture2D` **get_default_texture_parameter**\ (\ name\: :ref:`StringName`, index\: :ref:`int` = 0\ ) |const| :ref:`🔗` +:ref:`Texture` **get_default_texture_parameter**\ (\ name\: :ref:`StringName`, index\: :ref:`int` = 0\ ) |const| :ref:`🔗` Returns the texture that is set as default for the specified parameter. @@ -194,7 +194,7 @@ If argument ``get_groups`` is true, parameter grouping hints will be provided. .. rst-class:: classref-method -|void| **set_default_texture_parameter**\ (\ name\: :ref:`StringName`, texture\: :ref:`Texture2D`, index\: :ref:`int` = 0\ ) :ref:`🔗` +|void| **set_default_texture_parameter**\ (\ name\: :ref:`StringName`, texture\: :ref:`Texture`, index\: :ref:`int` = 0\ ) :ref:`🔗` Sets the default texture to be used with a texture uniform. The default is used if a texture is not set in the :ref:`ShaderMaterial`. diff --git a/classes/class_shapecast2d.rst b/classes/class_shapecast2d.rst index fefcbd4e2df..0e93e897b49 100644 --- a/classes/class_shapecast2d.rst +++ b/classes/class_shapecast2d.rst @@ -153,7 +153,7 @@ If ``true``, collisions with :ref:`PhysicsBody2D`\ s will b - |void| **set_collision_mask**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_collision_mask**\ (\ ) -The shape's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. +The shape's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. See `Collision layers and masks <../tutorials/physics/physics_introduction.html#collision-layers-and-masks>`__ in the documentation for more information. .. rst-class:: classref-item-separator @@ -165,6 +165,10 @@ The shape's collision mask. Only objects in at least one collision layer enabled :ref:`Array` **collision_result** = ``[]`` :ref:`🔗` +.. rst-class:: classref-property-setget + +- :ref:`Array` **get_collision_result**\ (\ ) + Returns the complete collision information from the collision sweep. The data returned is the same as in the :ref:`PhysicsDirectSpaceState2D.get_rest_info` method. .. rst-class:: classref-item-separator @@ -250,7 +254,7 @@ The number of intersections can be limited with this parameter, to reduce the pr - |void| **set_shape**\ (\ value\: :ref:`Shape2D`\ ) - :ref:`Shape2D` **get_shape**\ (\ ) -The :ref:`Shape2D`-derived shape to be used for collision queries. +The shape to be used for collision queries. .. rst-class:: classref-item-separator @@ -267,7 +271,7 @@ The :ref:`Shape2D`-derived shape to be used for collision queries - |void| **set_target_position**\ (\ value\: :ref:`Vector2`\ ) - :ref:`Vector2` **get_target_position**\ (\ ) -The shape's destination point, relative to this node's ``position``. +The shape's destination point, relative to this node's :ref:`Node2D.position`. .. rst-class:: classref-section-separator @@ -284,7 +288,7 @@ Method Descriptions |void| **add_exception**\ (\ node\: :ref:`CollisionObject2D`\ ) :ref:`🔗` -Adds a collision exception so the shape does not report collisions with the specified :ref:`CollisionObject2D` node. +Adds a collision exception so the shape does not report collisions with the specified node. .. rst-class:: classref-item-separator @@ -322,7 +326,7 @@ Removes all collision exceptions for this shape. Updates the collision information for the shape immediately, without waiting for the next ``_physics_process`` call. Use this method, for example, when the shape or its parent has changed state. -\ **Note:** ``enabled == true`` is not required for this to work. +\ **Note:** Setting :ref:`enabled` to ``true`` is not required for this to work. .. rst-class:: classref-item-separator @@ -334,7 +338,7 @@ Updates the collision information for the shape immediately, without waiting for :ref:`float` **get_closest_collision_safe_fraction**\ (\ ) |const| :ref:`🔗` -The fraction from the **ShapeCast2D**'s origin to its :ref:`target_position` (between 0 and 1) of how far the shape can move without triggering a collision. +Returns the fraction from this cast's origin to its :ref:`target_position` of how far the shape can move without triggering a collision, as a value between ``0.0`` and ``1.0``. .. rst-class:: classref-item-separator @@ -346,7 +350,7 @@ The fraction from the **ShapeCast2D**'s origin to its :ref:`target_position` **get_closest_collision_unsafe_fraction**\ (\ ) |const| :ref:`🔗` -The fraction from the **ShapeCast2D**'s origin to its :ref:`target_position` (between 0 and 1) of how far the shape must move to trigger a collision. +Returns the fraction from this cast's origin to its :ref:`target_position` of how far the shape must move to trigger a collision, as a value between ``0.0`` and ``1.0``. In ideal conditions this would be the same as :ref:`get_closest_collision_safe_fraction`, however shape casting is calculated in discrete steps, so the precise point of collision can occur between two calculated positions. @@ -434,7 +438,7 @@ Returns the normal of one of the multiple collisions at ``index`` of the interse Returns the collision point of one of the multiple collisions at ``index`` where the shape intersects the colliding object. -\ **Note:** this point is in the **global** coordinate system. +\ **Note:** This point is in the **global** coordinate system. .. rst-class:: classref-item-separator @@ -458,7 +462,7 @@ Returns whether any object is intersecting with the shape's vector (considering |void| **remove_exception**\ (\ node\: :ref:`CollisionObject2D`\ ) :ref:`🔗` -Removes a collision exception so the shape does report collisions with the specified :ref:`CollisionObject2D` node. +Removes a collision exception so the shape does report collisions with the specified node. .. rst-class:: classref-item-separator diff --git a/classes/class_shapecast3d.rst b/classes/class_shapecast3d.rst index 09a71f904f8..cb1dc3cbd71 100644 --- a/classes/class_shapecast3d.rst +++ b/classes/class_shapecast3d.rst @@ -169,6 +169,10 @@ The shape's collision mask. Only objects in at least one collision layer enabled :ref:`Array` **collision_result** = ``[]`` :ref:`🔗` +.. rst-class:: classref-property-setget + +- :ref:`Array` **get_collision_result**\ (\ ) + Returns the complete collision information from the collision sweep. The data returned is the same as in the :ref:`PhysicsDirectSpaceState3D.get_rest_info` method. .. rst-class:: classref-item-separator @@ -273,7 +277,7 @@ The number of intersections can be limited with this parameter, to reduce the pr - |void| **set_shape**\ (\ value\: :ref:`Shape3D`\ ) - :ref:`Shape3D` **get_shape**\ (\ ) -The :ref:`Shape3D`-derived shape to be used for collision queries. +The shape to be used for collision queries. .. rst-class:: classref-item-separator @@ -290,7 +294,7 @@ The :ref:`Shape3D`-derived shape to be used for collision queries - |void| **set_target_position**\ (\ value\: :ref:`Vector3`\ ) - :ref:`Vector3` **get_target_position**\ (\ ) -The shape's destination point, relative to this node's ``position``. +The shape's destination point, relative to this node's :ref:`Node3D.position`. .. rst-class:: classref-section-separator @@ -307,7 +311,7 @@ Method Descriptions |void| **add_exception**\ (\ node\: :ref:`CollisionObject3D`\ ) :ref:`🔗` -Adds a collision exception so the shape does not report collisions with the specified :ref:`CollisionObject3D` node. +Adds a collision exception so the shape does not report collisions with the specified node. .. rst-class:: classref-item-separator @@ -331,7 +335,7 @@ Adds a collision exception so the shape does not report collisions with the spec |void| **clear_exceptions**\ (\ ) :ref:`🔗` -Removes all collision exceptions for this **ShapeCast3D**. +Removes all collision exceptions for this shape. .. rst-class:: classref-item-separator @@ -345,7 +349,7 @@ Removes all collision exceptions for this **ShapeCast3D**. Updates the collision information for the shape immediately, without waiting for the next ``_physics_process`` call. Use this method, for example, when the shape or its parent has changed state. -\ **Note:** ``enabled == true`` is not required for this to work. +\ **Note:** Setting :ref:`enabled` to ``true`` is not required for this to work. .. rst-class:: classref-item-separator @@ -357,7 +361,7 @@ Updates the collision information for the shape immediately, without waiting for :ref:`float` **get_closest_collision_safe_fraction**\ (\ ) |const| :ref:`🔗` -The fraction from the **ShapeCast3D**'s origin to its :ref:`target_position` (between 0 and 1) of how far the shape can move without triggering a collision. +Returns the fraction from this cast's origin to its :ref:`target_position` of how far the shape can move without triggering a collision, as a value between ``0.0`` and ``1.0``. .. rst-class:: classref-item-separator @@ -369,7 +373,7 @@ The fraction from the **ShapeCast3D**'s origin to its :ref:`target_position` **get_closest_collision_unsafe_fraction**\ (\ ) |const| :ref:`🔗` -The fraction from the **ShapeCast3D**'s origin to its :ref:`target_position` (between 0 and 1) of how far the shape must move to trigger a collision. +Returns the fraction from this cast's origin to its :ref:`target_position` of how far the shape must move to trigger a collision, as a value between ``0.0`` and ``1.0``. In ideal conditions this would be the same as :ref:`get_closest_collision_safe_fraction`, however shape casting is calculated in discrete steps, so the precise point of collision can occur between two calculated positions. @@ -457,7 +461,7 @@ Returns the normal of one of the multiple collisions at ``index`` of the interse Returns the collision point of one of the multiple collisions at ``index`` where the shape intersects the colliding object. -\ **Note:** this point is in the **global** coordinate system. +\ **Note:** This point is in the **global** coordinate system. .. rst-class:: classref-item-separator @@ -481,7 +485,7 @@ Returns whether any object is intersecting with the shape's vector (considering |void| **remove_exception**\ (\ node\: :ref:`CollisionObject3D`\ ) :ref:`🔗` -Removes a collision exception so the shape does report collisions with the specified :ref:`CollisionObject3D` node. +Removes a collision exception so the shape does report collisions with the specified node. .. rst-class:: classref-item-separator 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_signal.rst b/classes/class_signal.rst index de512669939..d6d55d46bd2 100644 --- a/classes/class_signal.rst +++ b/classes/class_signal.rst @@ -17,7 +17,7 @@ A built-in type representing a signal of an :ref:`Object`. Description ----------- -**Signal** is a built-in :ref:`Variant` type that represents a signal of an :ref:`Object` instance. Like all :ref:`Variant` types, it can be stored in variables and passed to functions. Signals allow all connected :ref:`Callable`\ s (and by extension their respective objects) to listen and react to events, without directly referencing one another. This keeps the code flexible and easier to manage. +**Signal** is a built-in :ref:`Variant` type that represents a signal of an :ref:`Object` instance. Like all :ref:`Variant` types, it can be stored in variables and passed to functions. Signals allow all connected :ref:`Callable`\ s (and by extension their respective objects) to listen and react to events, without directly referencing one another. This keeps the code flexible and easier to manage. You can check whether an :ref:`Object` has a given signal name using :ref:`Object.has_signal`. In GDScript, signals can be declared with the ``signal`` keyword. In C#, you may use the ``[Signal]`` attribute on a delegate. @@ -96,6 +96,8 @@ Methods +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_object_id`\ (\ ) |const| | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_connections`\ (\ ) |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_connected`\ (\ callable\: :ref:`Callable`\ ) |const| | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_null`\ (\ ) |const| | @@ -150,7 +152,7 @@ Constructs a **Signal** as a copy of the given **Signal**. :ref:`Signal` **Signal**\ (\ object\: :ref:`Object`, signal\: :ref:`StringName`\ ) -Creates a new **Signal** named ``signal`` in the specified ``object``. +Creates a **Signal** object referencing a signal named ``signal`` in the specified ``object``. .. rst-class:: classref-section-separator @@ -261,6 +263,18 @@ Returns the ID of the object emitting this signal (see :ref:`Object.get_instance ---- +.. _class_Signal_method_has_connections: + +.. rst-class:: classref-method + +:ref:`bool` **has_connections**\ (\ ) |const| :ref:`🔗` + +Returns ``true`` if any :ref:`Callable` is connected to this signal. + +.. rst-class:: classref-item-separator + +---- + .. _class_Signal_method_is_connected: .. rst-class:: classref-method @@ -279,7 +293,7 @@ Returns ``true`` if the specified :ref:`Callable` is connected t :ref:`bool` **is_null**\ (\ ) |const| :ref:`🔗` -Returns ``true`` if the signal's name does not exist in its object, or the object is not valid. +Returns ``true`` if this **Signal** has no object and the signal name is empty. Equivalent to ``signal == Signal()``. .. rst-class:: classref-section-separator 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_skeletonmodifier3d.rst b/classes/class_skeletonmodifier3d.rst index 401d766dee5..c00c09b431f 100644 --- a/classes/class_skeletonmodifier3d.rst +++ b/classes/class_skeletonmodifier3d.rst @@ -25,7 +25,14 @@ Description If there is :ref:`AnimationMixer`, modification always performs after playback process of the :ref:`AnimationMixer`. -This node should be used to implement custom IK solvers, constraints, or skeleton physics +This node should be used to implement custom IK solvers, constraints, or skeleton physics. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- `Design of the Skeleton Modifier 3D `__ .. rst-class:: classref-reftable-group 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 fe44c94d495..e917bda31bb 100644 --- a/classes/class_spinbox.rst +++ b/classes/class_spinbox.rst @@ -24,7 +24,7 @@ Description **SpinBox** is a numerical input text field. It allows entering integers and floating-point numbers. -\ **Example:**\ +\ **Example:** Create a **SpinBox**, disable its context menu and set its text alignment to right. .. tabs:: @@ -47,13 +47,11 @@ Description -The above code will create a **SpinBox**, disable context menu on it and set the text alignment to right. - See :ref:`Range` class for more options over the **SpinBox**. \ **Note:** With the **SpinBox**'s context menu disabled, you can right-click the bottom half of the spinbox to set the value to its minimum, while right-clicking the top half sets the value to its maximum. -\ **Note:** **SpinBox** relies on an underlying :ref:`LineEdit` node. To theme a **SpinBox**'s background, add theme items for :ref:`LineEdit` and customize them. +\ **Note:** **SpinBox** relies on an underlying :ref:`LineEdit` node. To theme a **SpinBox**'s background, add theme items for :ref:`LineEdit` and customize them. The :ref:`LineEdit` has the ``SpinBoxInnerLineEdit`` theme variation, so that you can give it a distinct appearance from regular :ref:`LineEdit`\ s. \ **Note:** If you want to implement drag and drop for the underlying :ref:`LineEdit`, you can use :ref:`Control.set_drag_forwarding` on the node returned by :ref:`get_line_edit`. @@ -107,9 +105,69 @@ Theme Properties .. table:: :widths: auto - +-----------------------------------+------------------------------------------------+ - | :ref:`Texture2D` | :ref:`updown` | - +-----------------------------------+------------------------------------------------+ + +-----------------------------------+--------------------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`down_disabled_icon_modulate` | ``Color(0.875, 0.875, 0.875, 0.5)`` | + +-----------------------------------+--------------------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`down_hover_icon_modulate` | ``Color(0.95, 0.95, 0.95, 1)`` | + +-----------------------------------+--------------------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`down_icon_modulate` | ``Color(0.875, 0.875, 0.875, 1)`` | + +-----------------------------------+--------------------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`down_pressed_icon_modulate` | ``Color(0.95, 0.95, 0.95, 1)`` | + +-----------------------------------+--------------------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`up_disabled_icon_modulate` | ``Color(0.875, 0.875, 0.875, 0.5)`` | + +-----------------------------------+--------------------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`up_hover_icon_modulate` | ``Color(0.95, 0.95, 0.95, 1)`` | + +-----------------------------------+--------------------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`up_icon_modulate` | ``Color(0.875, 0.875, 0.875, 1)`` | + +-----------------------------------+--------------------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`up_pressed_icon_modulate` | ``Color(0.95, 0.95, 0.95, 1)`` | + +-----------------------------------+--------------------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`buttons_vertical_separation` | ``0`` | + +-----------------------------------+--------------------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`buttons_width` | ``16`` | + +-----------------------------------+--------------------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`field_and_buttons_separation` | ``2`` | + +-----------------------------------+--------------------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`set_min_buttons_width_from_icons` | ``1`` | + +-----------------------------------+--------------------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D` | :ref:`down` | | + +-----------------------------------+--------------------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D` | :ref:`down_disabled` | | + +-----------------------------------+--------------------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D` | :ref:`down_hover` | | + +-----------------------------------+--------------------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D` | :ref:`down_pressed` | | + +-----------------------------------+--------------------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D` | :ref:`up` | | + +-----------------------------------+--------------------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D` | :ref:`up_disabled` | | + +-----------------------------------+--------------------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D` | :ref:`up_hover` | | + +-----------------------------------+--------------------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D` | :ref:`up_pressed` | | + +-----------------------------------+--------------------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D` | :ref:`updown` | | + +-----------------------------------+--------------------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`down_background` | | + +-----------------------------------+--------------------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`down_background_disabled` | | + +-----------------------------------+--------------------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`down_background_hovered` | | + +-----------------------------------+--------------------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`down_background_pressed` | | + +-----------------------------------+--------------------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`field_and_buttons_separator` | | + +-----------------------------------+--------------------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`up_background` | | + +-----------------------------------+--------------------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`up_background_disabled` | | + +-----------------------------------+--------------------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`up_background_hovered` | | + +-----------------------------------+--------------------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`up_background_pressed` | | + +-----------------------------------+--------------------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`up_down_buttons_separator` | | + +-----------------------------------+--------------------------------------------------------------------------------------------------------+-------------------------------------+ .. rst-class:: classref-section-separator @@ -275,13 +333,373 @@ Returns the :ref:`LineEdit` instance from this **SpinBox**. You Theme Property Descriptions --------------------------- +.. _class_SpinBox_theme_color_down_disabled_icon_modulate: + +.. rst-class:: classref-themeproperty + +:ref:`Color` **down_disabled_icon_modulate** = ``Color(0.875, 0.875, 0.875, 0.5)`` :ref:`🔗` + +Down button icon modulation color, when the button is disabled. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SpinBox_theme_color_down_hover_icon_modulate: + +.. rst-class:: classref-themeproperty + +:ref:`Color` **down_hover_icon_modulate** = ``Color(0.95, 0.95, 0.95, 1)`` :ref:`🔗` + +Down button icon modulation color, when the button is hovered. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SpinBox_theme_color_down_icon_modulate: + +.. rst-class:: classref-themeproperty + +:ref:`Color` **down_icon_modulate** = ``Color(0.875, 0.875, 0.875, 1)`` :ref:`🔗` + +Down button icon modulation color. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SpinBox_theme_color_down_pressed_icon_modulate: + +.. rst-class:: classref-themeproperty + +:ref:`Color` **down_pressed_icon_modulate** = ``Color(0.95, 0.95, 0.95, 1)`` :ref:`🔗` + +Down button icon modulation color, when the button is being pressed. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SpinBox_theme_color_up_disabled_icon_modulate: + +.. rst-class:: classref-themeproperty + +:ref:`Color` **up_disabled_icon_modulate** = ``Color(0.875, 0.875, 0.875, 0.5)`` :ref:`🔗` + +Up button icon modulation color, when the button is disabled. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SpinBox_theme_color_up_hover_icon_modulate: + +.. rst-class:: classref-themeproperty + +:ref:`Color` **up_hover_icon_modulate** = ``Color(0.95, 0.95, 0.95, 1)`` :ref:`🔗` + +Up button icon modulation color, when the button is hovered. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SpinBox_theme_color_up_icon_modulate: + +.. rst-class:: classref-themeproperty + +:ref:`Color` **up_icon_modulate** = ``Color(0.875, 0.875, 0.875, 1)`` :ref:`🔗` + +Up button icon modulation color. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SpinBox_theme_color_up_pressed_icon_modulate: + +.. rst-class:: classref-themeproperty + +:ref:`Color` **up_pressed_icon_modulate** = ``Color(0.95, 0.95, 0.95, 1)`` :ref:`🔗` + +Up button icon modulation color, when the button is being pressed. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SpinBox_theme_constant_buttons_vertical_separation: + +.. rst-class:: classref-themeproperty + +:ref:`int` **buttons_vertical_separation** = ``0`` :ref:`🔗` + +Vertical separation between the up and down buttons. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SpinBox_theme_constant_buttons_width: + +.. rst-class:: classref-themeproperty + +: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. If smaller than ``0``, the width is automatically adjusted from the icon size. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SpinBox_theme_constant_field_and_buttons_separation: + +.. rst-class:: classref-themeproperty + +:ref:`int` **field_and_buttons_separation** = ``2`` :ref:`🔗` + +Width of the horizontal separation between the text input field (:ref:`LineEdit`) and the buttons. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SpinBox_theme_constant_set_min_buttons_width_from_icons: + +.. rst-class:: classref-themeproperty + +:ref:`int` **set_min_buttons_width_from_icons** = ``1`` :ref:`🔗` + +If not ``0``, the minimum button width corresponds to the widest of all icons set on those buttons, even if :ref:`buttons_width` is smaller. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SpinBox_theme_icon_down: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **down** :ref:`🔗` + +Down button icon, displayed in the middle of the down (value-decreasing) button. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SpinBox_theme_icon_down_disabled: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **down_disabled** :ref:`🔗` + +Down button icon when the button is disabled. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SpinBox_theme_icon_down_hover: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **down_hover** :ref:`🔗` + +Down button icon when the button is hovered. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SpinBox_theme_icon_down_pressed: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **down_pressed** :ref:`🔗` + +Down button icon when the button is being pressed. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SpinBox_theme_icon_up: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **up** :ref:`🔗` + +Up button icon, displayed in the middle of the up (value-increasing) button. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SpinBox_theme_icon_up_disabled: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **up_disabled** :ref:`🔗` + +Up button icon when the button is disabled. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SpinBox_theme_icon_up_hover: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **up_hover** :ref:`🔗` + +Up button icon when the button is hovered. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SpinBox_theme_icon_up_pressed: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **up_pressed** :ref:`🔗` + +Up button icon when the button is being pressed. + +.. rst-class:: classref-item-separator + +---- + .. _class_SpinBox_theme_icon_updown: .. rst-class:: classref-themeproperty :ref:`Texture2D` **updown** :ref:`🔗` -Sets a custom :ref:`Texture2D` for up and down arrows of the **SpinBox**. +Single texture representing both the up and down buttons icons. It is displayed in the middle of the buttons and does not change upon interaction. It is recommended to use individual :ref:`up` and :ref:`down` graphics for better usability. This can also be used as additional decoration between the two buttons. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SpinBox_theme_style_down_background: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **down_background** :ref:`🔗` + +Background style of the down button. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SpinBox_theme_style_down_background_disabled: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **down_background_disabled** :ref:`🔗` + +Background style of the down button when disabled. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SpinBox_theme_style_down_background_hovered: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **down_background_hovered** :ref:`🔗` + +Background style of the down button when hovered. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SpinBox_theme_style_down_background_pressed: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **down_background_pressed** :ref:`🔗` + +Background style of the down button when being pressed. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SpinBox_theme_style_field_and_buttons_separator: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **field_and_buttons_separator** :ref:`🔗` + +:ref:`StyleBox` drawn in the space occupied by the separation between the input field and the buttons. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SpinBox_theme_style_up_background: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **up_background** :ref:`🔗` + +Background style of the up button. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SpinBox_theme_style_up_background_disabled: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **up_background_disabled** :ref:`🔗` + +Background style of the up button when disabled. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SpinBox_theme_style_up_background_hovered: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **up_background_hovered** :ref:`🔗` + +Background style of the up button when hovered. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SpinBox_theme_style_up_background_pressed: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **up_background_pressed** :ref:`🔗` + +Background style of the up button when being pressed. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SpinBox_theme_style_up_down_buttons_separator: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **up_down_buttons_separator** :ref:`🔗` + +:ref:`StyleBox` drawn in the space occupied by the separation between the up and down buttons. .. |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_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_sprite2d.rst b/classes/class_sprite2d.rst index 4040bce9faa..dce848200f5 100644 --- a/classes/class_sprite2d.rst +++ b/classes/class_sprite2d.rst @@ -263,7 +263,7 @@ If ``true``, texture is cut from a larger atlas texture. See :ref:`region_rect`\ ) - :ref:`bool` **is_region_filter_clip_enabled**\ (\ ) -If ``true``, the outermost pixels get blurred out. :ref:`region_enabled` must be ``true``. +If ``true``, the area outside of the :ref:`region_rect` is clipped to avoid bleeding of the surrounding texture pixels. :ref:`region_enabled` must be ``true``. .. rst-class:: classref-item-separator @@ -331,9 +331,9 @@ Method Descriptions :ref:`Rect2` **get_rect**\ (\ ) |const| :ref:`🔗` -Returns a :ref:`Rect2` representing the Sprite2D's boundary in local coordinates. Can be used to detect if the Sprite2D was clicked. +Returns a :ref:`Rect2` representing the Sprite2D's boundary in local coordinates. -\ **Example:**\ +\ **Example:** Detect if the Sprite2D was clicked: .. tabs:: 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 c9e175f5fc5..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:: @@ -137,6 +137,8 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_subsequence_ofn`\ (\ text\: :ref:`String`\ ) |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_valid_ascii_identifier`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_valid_filename`\ (\ ) |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_valid_float`\ (\ ) |const| | @@ -151,6 +153,8 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_valid_ip_address`\ (\ ) |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_valid_unicode_identifier`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`join`\ (\ parts\: :ref:`PackedStringArray`\ ) |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`json_escape`\ (\ ) |const| | @@ -816,8 +820,6 @@ Splits the string using a ``delimiter`` and returns the substring at index ``sli This is faster than :ref:`split`, if you only need one substring. -\ **Example:**\ - :: print("i/am/example/hi".get_slice("/", 2)) # Prints "example" @@ -1033,6 +1035,27 @@ Returns ``true`` if all characters of this string can be found in ``text`` in th ---- +.. _class_String_method_is_valid_ascii_identifier: + +.. rst-class:: classref-method + +:ref:`bool` **is_valid_ascii_identifier**\ (\ ) |const| :ref:`🔗` + +Returns ``true`` if this string is a valid ASCII identifier. A valid ASCII identifier may contain only letters, digits, and underscores (``_``), and the first character may not be a digit. + +:: + + print("node_2d".is_valid_ascii_identifier()) # Prints true + print("TYPE_FLOAT".is_valid_ascii_identifier()) # Prints true + print("1st_method".is_valid_ascii_identifier()) # Prints false + print("MyMethod#2".is_valid_ascii_identifier()) # Prints false + +See also :ref:`is_valid_unicode_identifier`. + +.. rst-class:: classref-item-separator + +---- + .. _class_String_method_is_valid_filename: .. rst-class:: classref-method @@ -1104,6 +1127,8 @@ Returns ``true`` if this string is a valid color in hexadecimal HTML notation. T :ref:`bool` **is_valid_identifier**\ (\ ) |const| :ref:`🔗` +**Deprecated:** Use :ref:`is_valid_ascii_identifier` instead. + Returns ``true`` if this string is a valid identifier. A valid identifier may contain only letters, digits and underscores (``_``), and the first character may not be a digit. :: @@ -1149,6 +1174,33 @@ Returns ``true`` if this string represents a well-formatted IPv4 or IPv6 address ---- +.. _class_String_method_is_valid_unicode_identifier: + +.. rst-class:: classref-method + +:ref:`bool` **is_valid_unicode_identifier**\ (\ ) |const| :ref:`🔗` + +Returns ``true`` if this string is a valid Unicode identifier. + +A valid Unicode identifier must begin with a Unicode character of class ``XID_Start`` or ``"_"``, and may contain Unicode characters of class ``XID_Continue`` in the other positions. + +:: + + print("node_2d".is_valid_unicode_identifier()) # Prints true + print("1st_method".is_valid_unicode_identifier()) # Prints false + print("MyMethod#2".is_valid_unicode_identifier()) # Prints false + print("állóképesség".is_valid_unicode_identifier()) # Prints true + print("выносливость".is_valid_unicode_identifier()) # Prints true + print("体力".is_valid_unicode_identifier()) # Prints true + +See also :ref:`is_valid_ascii_identifier`. + +\ **Note:** This method checks identifiers the same way as GDScript. See :ref:`TextServer.is_valid_identifier` for more advanced checks. + +.. rst-class:: classref-item-separator + +---- + .. _class_String_method_join: .. rst-class:: classref-method @@ -1157,8 +1209,6 @@ Returns ``true`` if this string represents a well-formatted IPv4 or IPv6 address Returns the concatenation of ``parts``' elements, with each element separated by the string calling this method. This method is the opposite of :ref:`split`. -\ **Example:**\ - .. tabs:: @@ -1362,8 +1412,6 @@ If ``decimals`` is ``-1`` as by default, the string representation may only have Trailing zeros are not included in the string. The last digit is rounded, not truncated. -\ **Example:**\ - :: String.num(3.141593) # Returns "3.141593" @@ -1598,8 +1646,6 @@ If ``allow_empty`` is ``false``, empty strings between adjacent delimiters are e If ``maxsplit`` is greater than ``0``, the number of splits may not exceed ``maxsplit``. By default, the entire string is split, which is mostly identical to :ref:`split`. -\ **Example:**\ - .. tabs:: @@ -1732,8 +1778,6 @@ If ``allow_empty`` is ``false``, empty strings between adjacent delimiters are e If ``maxsplit`` is greater than ``0``, the number of splits may not exceed ``maxsplit``. By default, the entire string is split. -\ **Example:**\ - .. tabs:: diff --git a/classes/class_stringname.rst b/classes/class_stringname.rst index 3355a4ee007..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:: @@ -130,6 +130,8 @@ Methods +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_subsequence_ofn`\ (\ text\: :ref:`String`\ ) |const| | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_valid_ascii_identifier`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_valid_filename`\ (\ ) |const| | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_valid_float`\ (\ ) |const| | @@ -144,6 +146,8 @@ Methods +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_valid_ip_address`\ (\ ) |const| | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_valid_unicode_identifier`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`join`\ (\ parts\: :ref:`PackedStringArray`\ ) |const| | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`json_escape`\ (\ ) |const| | @@ -763,8 +767,6 @@ Splits the string using a ``delimiter`` and returns the substring at index ``sli This is faster than :ref:`split`, if you only need one substring. -\ **Example:**\ - :: print("i/am/example/hi".get_slice("/", 2)) # Prints "example" @@ -966,6 +968,27 @@ Returns ``true`` if all characters of this string can be found in ``text`` in th ---- +.. _class_StringName_method_is_valid_ascii_identifier: + +.. rst-class:: classref-method + +:ref:`bool` **is_valid_ascii_identifier**\ (\ ) |const| :ref:`🔗` + +Returns ``true`` if this string is a valid ASCII identifier. A valid ASCII identifier may contain only letters, digits, and underscores (``_``), and the first character may not be a digit. + +:: + + print("node_2d".is_valid_ascii_identifier()) # Prints true + print("TYPE_FLOAT".is_valid_ascii_identifier()) # Prints true + print("1st_method".is_valid_ascii_identifier()) # Prints false + print("MyMethod#2".is_valid_ascii_identifier()) # Prints false + +See also :ref:`is_valid_unicode_identifier`. + +.. rst-class:: classref-item-separator + +---- + .. _class_StringName_method_is_valid_filename: .. rst-class:: classref-method @@ -1037,6 +1060,8 @@ Returns ``true`` if this string is a valid color in hexadecimal HTML notation. T :ref:`bool` **is_valid_identifier**\ (\ ) |const| :ref:`🔗` +**Deprecated:** Use :ref:`is_valid_ascii_identifier` instead. + Returns ``true`` if this string is a valid identifier. A valid identifier may contain only letters, digits and underscores (``_``), and the first character may not be a digit. :: @@ -1082,6 +1107,33 @@ Returns ``true`` if this string represents a well-formatted IPv4 or IPv6 address ---- +.. _class_StringName_method_is_valid_unicode_identifier: + +.. rst-class:: classref-method + +:ref:`bool` **is_valid_unicode_identifier**\ (\ ) |const| :ref:`🔗` + +Returns ``true`` if this string is a valid Unicode identifier. + +A valid Unicode identifier must begin with a Unicode character of class ``XID_Start`` or ``"_"``, and may contain Unicode characters of class ``XID_Continue`` in the other positions. + +:: + + print("node_2d".is_valid_unicode_identifier()) # Prints true + print("1st_method".is_valid_unicode_identifier()) # Prints false + print("MyMethod#2".is_valid_unicode_identifier()) # Prints false + print("állóképesség".is_valid_unicode_identifier()) # Prints true + print("выносливость".is_valid_unicode_identifier()) # Prints true + print("体力".is_valid_unicode_identifier()) # Prints true + +See also :ref:`is_valid_ascii_identifier`. + +\ **Note:** This method checks identifiers the same way as GDScript. See :ref:`TextServer.is_valid_identifier` for more advanced checks. + +.. rst-class:: classref-item-separator + +---- + .. _class_StringName_method_join: .. rst-class:: classref-method @@ -1090,8 +1142,6 @@ Returns ``true`` if this string represents a well-formatted IPv4 or IPv6 address Returns the concatenation of ``parts``' elements, with each element separated by the string calling this method. This method is the opposite of :ref:`split`. -\ **Example:**\ - .. tabs:: @@ -1434,8 +1484,6 @@ If ``allow_empty`` is ``false``, empty strings between adjacent delimiters are e If ``maxsplit`` is greater than ``0``, the number of splits may not exceed ``maxsplit``. By default, the entire string is split, which is mostly identical to :ref:`split`. -\ **Example:**\ - .. tabs:: @@ -1568,8 +1616,6 @@ If ``allow_empty`` is ``false``, empty strings between adjacent delimiters are e If ``maxsplit`` is greater than ``0``, the number of splits may not exceed ``maxsplit``. By default, the entire string is split. -\ **Example:**\ - .. tabs:: diff --git a/classes/class_styleboxflat.rst b/classes/class_styleboxflat.rst index 1b8f6d7b08a..043c1a26f31 100644 --- a/classes/class_styleboxflat.rst +++ b/classes/class_styleboxflat.rst @@ -21,9 +21,7 @@ Description By configuring various properties of this style box, you can achieve many common looks without the need of a texture. This includes optionally rounded borders, antialiasing, shadows, and skew. -Setting corner radius to high values is allowed. As soon as corners overlap, the stylebox will switch to a relative system. - -\ **Example:**\ +Setting corner radius to high values is allowed. As soon as corners overlap, the stylebox will switch to a relative system: .. code:: text 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 f71171de46c..0bc1520bca5 100644 --- a/classes/class_textedit.rst +++ b/classes/class_textedit.rst @@ -73,6 +73,8 @@ Properties +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`editable` | ``true`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`empty_selection_clipboard_enabled` | ``true`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`highlight_all_occurrences` | ``false`` | @@ -95,6 +97,8 @@ Properties +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`scroll_fit_content_height` | ``false`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`scroll_fit_content_width` | ``false`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`scroll_horizontal` | ``0`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`scroll_past_end_of_file` | ``false`` | @@ -1359,6 +1363,23 @@ If ``false``, existing text cannot be modified and new text cannot be added. ---- +.. _class_TextEdit_property_empty_selection_clipboard_enabled: + +.. rst-class:: classref-property + +:ref:`bool` **empty_selection_clipboard_enabled** = ``true`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_empty_selection_clipboard_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_empty_selection_clipboard_enabled**\ (\ ) + +If ``true``, copying or cutting without a selection is performed on all lines with a caret. Otherwise, copy and cut require a selection. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextEdit_property_highlight_all_occurrences: .. rst-class:: classref-property @@ -1508,7 +1529,24 @@ Text shown when the **TextEdit** is empty. It is **not** the **TextEdit**'s defa - |void| **set_fit_content_height_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_fit_content_height_enabled**\ (\ ) -If ``true``, **TextEdit** will disable vertical scroll and fit minimum height to the number of visible lines. +If ``true``, **TextEdit** will disable vertical scroll and fit minimum height to the number of visible lines. When both this property and :ref:`scroll_fit_content_width` are ``true``, no scrollbars will be displayed. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextEdit_property_scroll_fit_content_width: + +.. rst-class:: classref-property + +:ref:`bool` **scroll_fit_content_width** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_fit_content_width_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_fit_content_width_enabled**\ (\ ) + +If ``true``, **TextEdit** will disable horizontal scroll and fit minimum width to the widest line in the text. When both this property and :ref:`scroll_fit_content_height` are ``true``, no scrollbars will be displayed. .. rst-class:: classref-item-separator @@ -1680,7 +1718,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_textmesh.rst b/classes/class_textmesh.rst index 5eb39463e92..0514e2e76fc 100644 --- a/classes/class_textmesh.rst +++ b/classes/class_textmesh.rst @@ -200,7 +200,7 @@ Controls the text's horizontal alignment. Supports left, center, right, and fill - |void| **set_justification_flags**\ (\ value\: |bitfield|\[:ref:`JustificationFlag`\]\ ) - |bitfield|\[:ref:`JustificationFlag`\] **get_justification_flags**\ (\ ) -Line fill alignment rules. For more info see :ref:`JustificationFlag`. +Line fill alignment rules. See :ref:`JustificationFlag` for more information. .. rst-class:: classref-item-separator diff --git a/classes/class_textparagraph.rst b/classes/class_textparagraph.rst index 2309a3997fd..98997a0c315 100644 --- a/classes/class_textparagraph.rst +++ b/classes/class_textparagraph.rst @@ -234,7 +234,7 @@ Ellipsis character used for text clipping. - |void| **set_justification_flags**\ (\ value\: |bitfield|\[:ref:`JustificationFlag`\]\ ) - |bitfield|\[:ref:`JustificationFlag`\] **get_justification_flags**\ (\ ) -Line fill alignment rules. For more info see :ref:`JustificationFlag`. +Line fill alignment rules. See :ref:`JustificationFlag` for more information. .. rst-class:: classref-item-separator @@ -593,7 +593,7 @@ Returns TextServer line buffer RID. :ref:`Vector2` **get_line_size**\ (\ line\: :ref:`int`\ ) |const| :ref:`🔗` -Returns size of the bounding box of the line of text. +Returns size of the bounding box of the line of text. Returned size is rounded up. .. rst-class:: classref-item-separator diff --git a/classes/class_textserver.rst b/classes/class_textserver.rst index 655d54c9d71..12d9ea2749a 100644 --- a/classes/class_textserver.rst +++ b/classes/class_textserver.rst @@ -157,6 +157,8 @@ Methods +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`font_get_supported_chars`\ (\ font_rid\: :ref:`RID`\ ) |const| | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`font_get_supported_glyphs`\ (\ font_rid\: :ref:`RID`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`font_get_texture_count`\ (\ font_rid\: :ref:`RID`, size\: :ref:`Vector2i`\ ) |const| | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Image` | :ref:`font_get_texture_image`\ (\ font_rid\: :ref:`RID`, size\: :ref:`Vector2i`, texture_index\: :ref:`int`\ ) |const| | @@ -1894,6 +1896,16 @@ Returns outline contours of the glyph as a :ref:`Dictionary` w \ ``orientation`` - :ref:`bool`, contour orientation. If ``true``, clockwise contours must be filled. +- Two successive :ref:`CONTOUR_CURVE_TAG_ON` points indicate a line segment. + +- One :ref:`CONTOUR_CURVE_TAG_OFF_CONIC` point between two :ref:`CONTOUR_CURVE_TAG_ON` points indicates a single conic (quadratic) Bézier arc. + +- Two :ref:`CONTOUR_CURVE_TAG_OFF_CUBIC` points between two :ref:`CONTOUR_CURVE_TAG_ON` points indicate a single cubic Bézier arc. + +- Two successive :ref:`CONTOUR_CURVE_TAG_OFF_CONIC` points indicate two successive conic (quadratic) Bézier arcs with a virtual :ref:`CONTOUR_CURVE_TAG_ON` point at their middle. + +- Each contour is closed. The last point of a contour uses the first point of a contour as its next point, and vice versa. The first point can be :ref:`CONTOUR_CURVE_TAG_OFF_CONIC` point. + .. rst-class:: classref-item-separator ---- @@ -2250,6 +2262,18 @@ Returns a string containing all the characters available in the font. ---- +.. _class_TextServer_method_font_get_supported_glyphs: + +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **font_get_supported_glyphs**\ (\ font_rid\: :ref:`RID`\ ) |const| :ref:`🔗` + +Returns an array containing all glyph indices in the font. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServer_method_font_get_texture_count: .. rst-class:: classref-method @@ -4145,7 +4169,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_textserverextension.rst b/classes/class_textserverextension.rst index 04c009aa4eb..45d910800d5 100644 --- a/classes/class_textserverextension.rst +++ b/classes/class_textserverextension.rst @@ -142,6 +142,8 @@ Methods +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`_font_get_supported_chars`\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`_font_get_supported_glyphs`\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_font_get_texture_count`\ (\ font_rid\: :ref:`RID`, size\: :ref:`Vector2i`\ ) |virtual| |const| | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Image` | :ref:`_font_get_texture_image`\ (\ font_rid\: :ref:`RID`, size\: :ref:`Vector2i`, texture_index\: :ref:`int`\ ) |virtual| |const| | @@ -1244,6 +1246,20 @@ Returns a string containing all the characters available in the font. ---- +.. _class_TextServerExtension_private_method__font_get_supported_glyphs: + +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **_font_get_supported_glyphs**\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| :ref:`🔗` + +**Required.**\ + +Returns an array containing all glyph indices in the font. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServerExtension_private_method__font_get_texture_count: .. rst-class:: classref-method diff --git a/classes/class_texture2d.rst b/classes/class_texture2d.rst index 6f90d931f2a..32def563b39 100644 --- a/classes/class_texture2d.rst +++ b/classes/class_texture2d.rst @@ -12,7 +12,7 @@ Texture2D **Inherits:** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`AnimatedTexture`, :ref:`AtlasTexture`, :ref:`CameraTexture`, :ref:`CanvasTexture`, :ref:`CompressedTexture2D`, :ref:`CurveTexture`, :ref:`CurveXYZTexture`, :ref:`GradientTexture1D`, :ref:`GradientTexture2D`, :ref:`ImageTexture`, :ref:`MeshTexture`, :ref:`NoiseTexture2D`, :ref:`PlaceholderTexture2D`, :ref:`PortableCompressedTexture2D`, :ref:`Texture2DRD`, :ref:`ViewportTexture` +**Inherited By:** :ref:`AnimatedTexture`, :ref:`AtlasTexture`, :ref:`CameraTexture`, :ref:`CanvasTexture`, :ref:`CompressedTexture2D`, :ref:`CurveTexture`, :ref:`CurveXYZTexture`, :ref:`ExternalTexture`, :ref:`GradientTexture1D`, :ref:`GradientTexture2D`, :ref:`ImageTexture`, :ref:`MeshTexture`, :ref:`NoiseTexture2D`, :ref:`PlaceholderTexture2D`, :ref:`PortableCompressedTexture2D`, :ref:`Texture2DRD`, :ref:`ViewportTexture` Texture for 2D and 3D. 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 ff0db80faff..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 @@ -521,7 +585,7 @@ Enables/disables one-way collisions on the polygon at index ``polygon_index`` fo |void| **set_collision_polygon_one_way_margin**\ (\ layer_id\: :ref:`int`, polygon_index\: :ref:`int`, one_way_margin\: :ref:`float`\ ) :ref:`🔗` -Enables/disables one-way collisions on the polygon at index ``polygon_index`` for TileSet physics layer with index ``layer_id``. +Sets the one-way margin (for one-way platforms) of the polygon at index ``polygon_index`` for TileSet physics layer with index ``layer_id``. .. rst-class:: classref-item-separator @@ -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_tilemap.rst b/classes/class_tilemap.rst index bc63e741979..c5afd5f3356 100644 --- a/classes/class_tilemap.rst +++ b/classes/class_tilemap.rst @@ -13,7 +13,7 @@ TileMap ======= -**Deprecated:** Use multiple :ref:`TileMapLayer` nodes instead. +**Deprecated:** Use multiple :ref:`TileMapLayer` nodes instead. To convert a TileMap to a set of TileMapLayer nodes, open the TileMap bottom panel with the node selected, click the toolbox icon in the top-right corner and choose 'Extract TileMap layers as individual TileMapLayer nodes'. **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` @@ -132,6 +132,12 @@ Methods +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Rect2i` | :ref:`get_used_rect`\ (\ ) |const| | +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_cell_flipped_h`\ (\ layer\: :ref:`int`, coords\: :ref:`Vector2i`, use_proxies\: :ref:`bool` = false\ ) |const| | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_cell_flipped_v`\ (\ layer\: :ref:`int`, coords\: :ref:`Vector2i`, use_proxies\: :ref:`bool` = false\ ) |const| | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_cell_transposed`\ (\ layer\: :ref:`int`, coords\: :ref:`Vector2i`, use_proxies\: :ref:`bool` = false\ ) |const| | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_layer_enabled`\ (\ layer\: :ref:`int`\ ) |const| | +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_layer_navigation_enabled`\ (\ layer\: :ref:`int`\ ) |const| | @@ -732,6 +738,42 @@ Returns a rectangle enclosing the used (non-empty) tiles of the map, including a ---- +.. _class_TileMap_method_is_cell_flipped_h: + +.. rst-class:: classref-method + +:ref:`bool` **is_cell_flipped_h**\ (\ layer\: :ref:`int`, coords\: :ref:`Vector2i`, use_proxies\: :ref:`bool` = false\ ) |const| :ref:`🔗` + +Returns ``true`` if the cell on layer ``layer`` at coordinates ``coords`` is flipped horizontally. The result is valid only for atlas sources. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMap_method_is_cell_flipped_v: + +.. rst-class:: classref-method + +:ref:`bool` **is_cell_flipped_v**\ (\ layer\: :ref:`int`, coords\: :ref:`Vector2i`, use_proxies\: :ref:`bool` = false\ ) |const| :ref:`🔗` + +Returns ``true`` if the cell on layer ``layer`` at coordinates ``coords`` is flipped vertically. The result is valid only for atlas sources. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMap_method_is_cell_transposed: + +.. rst-class:: classref-method + +:ref:`bool` **is_cell_transposed**\ (\ layer\: :ref:`int`, coords\: :ref:`Vector2i`, use_proxies\: :ref:`bool` = false\ ) |const| :ref:`🔗` + +Returns ``true`` if the cell on layer ``layer`` at coordinates ``coords`` is transposed. The result is valid only for atlas sources. + +.. rst-class:: classref-item-separator + +---- + .. _class_TileMap_method_is_layer_enabled: .. rst-class:: classref-method diff --git a/classes/class_tilemaplayer.rst b/classes/class_tilemaplayer.rst index 62145b9fa45..58a5a61ea49 100644 --- a/classes/class_tilemaplayer.rst +++ b/classes/class_tilemaplayer.rst @@ -44,6 +44,8 @@ Properties +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ | :ref:`DebugVisibilityMode` | :ref:`navigation_visibility_mode` | ``0`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`occlusion_enabled` | ``true`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ | :ref:`int` | :ref:`rendering_quadrant_size` | ``16`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ | :ref:`PackedByteArray` | :ref:`tile_map_data` | ``PackedByteArray()`` | @@ -102,6 +104,12 @@ Methods +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_body_rid`\ (\ body\: :ref:`RID`\ ) |const| | +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_cell_flipped_h`\ (\ coords\: :ref:`Vector2i`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_cell_flipped_v`\ (\ coords\: :ref:`Vector2i`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_cell_transposed`\ (\ coords\: :ref:`Vector2i`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2i` | :ref:`local_to_map`\ (\ local_position\: :ref:`Vector2`\ ) |const| | +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2i` | :ref:`map_pattern`\ (\ position_in_tilemap\: :ref:`Vector2i`, coords_in_pattern\: :ref:`Vector2i`, pattern\: :ref:`TileMapPattern`\ ) | @@ -275,6 +283,23 @@ Show or hide the **TileMapLayer**'s navigation meshes. If set to :ref:`DEBUG_VIS ---- +.. _class_TileMapLayer_property_occlusion_enabled: + +.. rst-class:: classref-property + +:ref:`bool` **occlusion_enabled** = ``true`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_occlusion_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_occlusion_enabled**\ (\ ) + +Enable or disable light occlusion. + +.. rst-class:: classref-item-separator + +---- + .. _class_TileMapLayer_property_rendering_quadrant_size: .. rst-class:: classref-property @@ -630,6 +655,42 @@ Returns whether the provided ``body`` :ref:`RID` belongs to one of th ---- +.. _class_TileMapLayer_method_is_cell_flipped_h: + +.. rst-class:: classref-method + +:ref:`bool` **is_cell_flipped_h**\ (\ coords\: :ref:`Vector2i`\ ) |const| :ref:`🔗` + +Returns ``true`` if the cell at coordinates ``coords`` is flipped horizontally. The result is valid only for atlas sources. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_is_cell_flipped_v: + +.. rst-class:: classref-method + +:ref:`bool` **is_cell_flipped_v**\ (\ coords\: :ref:`Vector2i`\ ) |const| :ref:`🔗` + +Returns ``true`` if the cell at coordinates ``coords`` is flipped vertically. The result is valid only for atlas sources. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_is_cell_transposed: + +.. rst-class:: classref-method + +:ref:`bool` **is_cell_transposed**\ (\ coords\: :ref:`Vector2i`\ ) |const| :ref:`🔗` + +Returns ``true`` if the cell at coordinates ``coords`` is transposed. The result is valid only for atlas sources. + +.. rst-class:: classref-item-separator + +---- + .. _class_TileMapLayer_method_local_to_map: .. rst-class:: classref-method diff --git a/classes/class_timer.rst b/classes/class_timer.rst index fee0bdb49e2..0b0a08f8f1b 100644 --- a/classes/class_timer.rst +++ b/classes/class_timer.rst @@ -266,7 +266,7 @@ Returns ``true`` if the timer is stopped or has not started. |void| **start**\ (\ time_sec\: :ref:`float` = -1\ ) :ref:`🔗` -Starts the timer, if it was not started already. Fails if the timer is not inside the tree. If ``time_sec`` is greater than ``0``, this value is used for the :ref:`wait_time`. +Starts the timer, or resets the timer if it was started already. Fails if the timer is not inside the tree. If ``time_sec`` is greater than ``0``, this value is used for the :ref:`wait_time`. \ **Note:** This method does not resume a paused timer. See :ref:`paused`. diff --git a/classes/class_translationdomain.rst b/classes/class_translationdomain.rst new file mode 100644 index 00000000000..9f52c1a1ec3 --- /dev/null +++ b/classes/class_translationdomain.rst @@ -0,0 +1,352 @@ +: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 + +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`pseudolocalization_accents_enabled` | ``true`` | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`pseudolocalization_double_vowels_enabled` | ``false`` | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`pseudolocalization_enabled` | ``false`` | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`pseudolocalization_expansion_ratio` | ``0.0`` | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`pseudolocalization_fake_bidi_enabled` | ``false`` | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`pseudolocalization_override_enabled` | ``false`` | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`String` | :ref:`pseudolocalization_prefix` | ``"["`` | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`pseudolocalization_skip_placeholders_enabled` | ``true`` | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`String` | :ref:`pseudolocalization_suffix` | ``"]"`` | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------+-----------+ + +.. 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| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`pseudolocalize`\ (\ message\: :ref:`StringName`\ ) |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 + +Property Descriptions +--------------------- + +.. _class_TranslationDomain_property_pseudolocalization_accents_enabled: + +.. rst-class:: classref-property + +:ref:`bool` **pseudolocalization_accents_enabled** = ``true`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_pseudolocalization_accents_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_pseudolocalization_accents_enabled**\ (\ ) + +Replace all characters with their accented variants during pseudolocalization. + +\ **Note:** Updating this property does not automatically update texts in the scene tree. Please propagate the :ref:`MainLoop.NOTIFICATION_TRANSLATION_CHANGED` notification manually after you have finished modifying pseudolocalization related options. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TranslationDomain_property_pseudolocalization_double_vowels_enabled: + +.. rst-class:: classref-property + +:ref:`bool` **pseudolocalization_double_vowels_enabled** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_pseudolocalization_double_vowels_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_pseudolocalization_double_vowels_enabled**\ (\ ) + +Double vowels in strings during pseudolocalization to simulate the lengthening of text due to localization. + +\ **Note:** Updating this property does not automatically update texts in the scene tree. Please propagate the :ref:`MainLoop.NOTIFICATION_TRANSLATION_CHANGED` notification manually after you have finished modifying pseudolocalization related options. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TranslationDomain_property_pseudolocalization_enabled: + +.. rst-class:: classref-property + +:ref:`bool` **pseudolocalization_enabled** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_pseudolocalization_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_pseudolocalization_enabled**\ (\ ) + +If ``true``, enables pseudolocalization for the project. This can be used to spot untranslatable strings or layout issues that may occur once the project is localized to languages that have longer strings than the source language. + +\ **Note:** Updating this property does not automatically update texts in the scene tree. Please propagate the :ref:`MainLoop.NOTIFICATION_TRANSLATION_CHANGED` notification manually after you have finished modifying pseudolocalization related options. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TranslationDomain_property_pseudolocalization_expansion_ratio: + +.. rst-class:: classref-property + +:ref:`float` **pseudolocalization_expansion_ratio** = ``0.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_pseudolocalization_expansion_ratio**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_pseudolocalization_expansion_ratio**\ (\ ) + +The expansion ratio to use during pseudolocalization. A value of ``0.3`` is sufficient for most practical purposes, and will increase the length of each string by 30%. + +\ **Note:** Updating this property does not automatically update texts in the scene tree. Please propagate the :ref:`MainLoop.NOTIFICATION_TRANSLATION_CHANGED` notification manually after you have finished modifying pseudolocalization related options. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TranslationDomain_property_pseudolocalization_fake_bidi_enabled: + +.. rst-class:: classref-property + +:ref:`bool` **pseudolocalization_fake_bidi_enabled** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_pseudolocalization_fake_bidi_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_pseudolocalization_fake_bidi_enabled**\ (\ ) + +If ``true``, emulate bidirectional (right-to-left) text when pseudolocalization is enabled. This can be used to spot issues with RTL layout and UI mirroring that will crop up if the project is localized to RTL languages such as Arabic or Hebrew. + +\ **Note:** Updating this property does not automatically update texts in the scene tree. Please propagate the :ref:`MainLoop.NOTIFICATION_TRANSLATION_CHANGED` notification manually after you have finished modifying pseudolocalization related options. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TranslationDomain_property_pseudolocalization_override_enabled: + +.. rst-class:: classref-property + +:ref:`bool` **pseudolocalization_override_enabled** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_pseudolocalization_override_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_pseudolocalization_override_enabled**\ (\ ) + +Replace all characters in the string with ``*``. Useful for finding non-localizable strings. + +\ **Note:** Updating this property does not automatically update texts in the scene tree. Please propagate the :ref:`MainLoop.NOTIFICATION_TRANSLATION_CHANGED` notification manually after you have finished modifying pseudolocalization related options. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TranslationDomain_property_pseudolocalization_prefix: + +.. rst-class:: classref-property + +:ref:`String` **pseudolocalization_prefix** = ``"["`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_pseudolocalization_prefix**\ (\ value\: :ref:`String`\ ) +- :ref:`String` **get_pseudolocalization_prefix**\ (\ ) + +Prefix that will be prepended to the pseudolocalized string. + +\ **Note:** Updating this property does not automatically update texts in the scene tree. Please propagate the :ref:`MainLoop.NOTIFICATION_TRANSLATION_CHANGED` notification manually after you have finished modifying pseudolocalization related options. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TranslationDomain_property_pseudolocalization_skip_placeholders_enabled: + +.. rst-class:: classref-property + +:ref:`bool` **pseudolocalization_skip_placeholders_enabled** = ``true`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_pseudolocalization_skip_placeholders_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_pseudolocalization_skip_placeholders_enabled**\ (\ ) + +Skip placeholders for string formatting like ``%s`` or ``%f`` during pseudolocalization. Useful to identify strings which need additional control characters to display correctly. + +\ **Note:** Updating this property does not automatically update texts in the scene tree. Please propagate the :ref:`MainLoop.NOTIFICATION_TRANSLATION_CHANGED` notification manually after you have finished modifying pseudolocalization related options. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TranslationDomain_property_pseudolocalization_suffix: + +.. rst-class:: classref-property + +:ref:`String` **pseudolocalization_suffix** = ``"]"`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_pseudolocalization_suffix**\ (\ value\: :ref:`String`\ ) +- :ref:`String` **get_pseudolocalization_suffix**\ (\ ) + +Suffix that will be appended to the pseudolocalized string. + +\ **Note:** Updating this property does not automatically update texts in the scene tree. Please propagate the :ref:`MainLoop.NOTIFICATION_TRANSLATION_CHANGED` notification manually after you have finished modifying pseudolocalization related options. + +.. 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_pseudolocalize: + +.. rst-class:: classref-method + +:ref:`StringName` **pseudolocalize**\ (\ message\: :ref:`StringName`\ ) |const| :ref:`🔗` + +Returns the pseudolocalized string based on the ``message`` passed in. + +.. 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..2c2a3e67eba 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`\ ) | @@ -114,7 +122,7 @@ Property Descriptions - |void| **set_pseudolocalization_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_pseudolocalization_enabled**\ (\ ) -If ``true``, enables the use of pseudolocalization. See :ref:`ProjectSettings.internationalization/pseudolocalization/use_pseudolocalization` for details. +If ``true``, enables the use of pseudolocalization on the main translation domain. See :ref:`ProjectSettings.internationalization/pseudolocalization/use_pseudolocalization` for details. .. rst-class:: classref-section-separator @@ -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 + +---- + +.. _class_TranslationServer_method_has_domain: + +.. rst-class:: classref-method -It will return ``null`` if there is no :ref:`Translation` instance that matches the ``locale``. +: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 @@ -307,6 +337,8 @@ It will return ``null`` if there is no :ref:`Translation` ins Returns the pseudolocalized string based on the ``message`` passed in. +\ **Note:** This method always uses the main translation domain. + .. rst-class:: classref-item-separator ---- @@ -317,7 +349,21 @@ Returns the pseudolocalized string based on the ``message`` passed in. |void| **reload_pseudolocalization**\ (\ ) :ref:`🔗` -Reparses the pseudolocalization options and reloads the translation. +Reparses the pseudolocalization options and reloads the translation for the main translation domain. + +.. rst-class:: classref-item-separator + +---- + +.. _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 @@ -329,7 +375,7 @@ Reparses the pseudolocalization options and reloads the translation. |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 +413,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 +427,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..6cbcd7e3f31 100644 --- a/classes/class_treeitem.rst +++ b/classes/class_treeitem.rst @@ -68,6 +68,8 @@ Methods +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`erase_button`\ (\ column\: :ref:`int`, button_index\: :ref:`int`\ ) | +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AutoTranslateMode` | :ref:`get_auto_translate_mode`\ (\ column\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`AutowrapMode` | :ref:`get_autowrap_mode`\ (\ column\: :ref:`int`\ ) |const| | +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Texture2D` | :ref:`get_button`\ (\ column\: :ref:`int`, button_index\: :ref:`int`\ ) |const| | @@ -110,6 +112,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`\ (\ ) | @@ -184,6 +188,8 @@ Methods +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`select`\ (\ column\: :ref:`int`\ ) | +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_auto_translate_mode`\ (\ column\: :ref:`int`, mode\: :ref:`AutoTranslateMode`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_autowrap_mode`\ (\ column\: :ref:`int`, autowrap_mode\: :ref:`AutowrapMode`\ ) | +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_button`\ (\ column\: :ref:`int`, button_index\: :ref:`int`, button\: :ref:`Texture2D`\ ) | @@ -226,6 +232,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 +288,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 +296,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 +314,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 +416,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 @@ -500,6 +508,18 @@ Removes the button at index ``button_index`` in column ``column``. ---- +.. _class_TreeItem_method_get_auto_translate_mode: + +.. rst-class:: classref-method + +:ref:`AutoTranslateMode` **get_auto_translate_mode**\ (\ column\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the column's auto translate mode. + +.. rst-class:: classref-item-separator + +---- + .. _class_TreeItem_method_get_autowrap_mode: .. rst-class:: classref-method @@ -754,6 +774,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 @@ -1214,6 +1246,20 @@ Selects the given ``column``. ---- +.. _class_TreeItem_method_set_auto_translate_mode: + +.. rst-class:: classref-method + +|void| **set_auto_translate_mode**\ (\ column\: :ref:`int`, mode\: :ref:`AutoTranslateMode`\ ) :ref:`🔗` + +Sets the given column's auto translate mode to ``mode``. + +All columns use :ref:`Node.AUTO_TRANSLATE_MODE_INHERIT` by default, which uses the same auto translate mode as the :ref:`Tree` itself. + +.. rst-class:: classref-item-separator + +---- + .. _class_TreeItem_method_set_autowrap_mode: .. rst-class:: classref-method @@ -1444,7 +1490,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 +1520,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_tween.rst b/classes/class_tween.rst index 615b14683d0..042f19a5ae8 100644 --- a/classes/class_tween.rst +++ b/classes/class_tween.rst @@ -617,8 +617,6 @@ Aborts all tweening operations and invalidates the **Tween**. Makes the next :ref:`Tweener` run parallelly to the previous one. -\ **Example:**\ - .. tabs:: @@ -965,8 +963,6 @@ Creates and appends a :ref:`MethodTweener`. This method is Creates and appends a :ref:`PropertyTweener`. This method tweens a ``property`` of an ``object`` between an initial value and ``final_val`` in a span of time equal to ``duration``, in seconds. The initial value by default is the property's value at the time the tweening of the :ref:`PropertyTweener` starts. -\ **Example:**\ - .. tabs:: diff --git a/classes/class_tweener.rst b/classes/class_tweener.rst index 355996804c2..5e7ae765ec4 100644 --- a/classes/class_tweener.rst +++ b/classes/class_tweener.rst @@ -38,7 +38,7 @@ Signals **finished**\ (\ ) :ref:`🔗` -Emitted when the **Tweener** has just finished its job. +Emitted when the **Tweener** has just finished its job or became invalid (e.g. due to a freed object). .. |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_upnp.rst b/classes/class_upnp.rst index c178ce766c1..648596817d9 100644 --- a/classes/class_upnp.rst +++ b/classes/class_upnp.rst @@ -53,13 +53,13 @@ To close a specific port (e.g. after you have finished using it): if err != OK: push_error(str(err)) - emit_signal("upnp_completed", err) + upnp_completed.emit(err) return if upnp.get_gateway() and upnp.get_gateway().is_valid_gateway(): upnp.add_port_mapping(server_port, server_port, ProjectSettings.get_setting("application/config/name"), "UDP") upnp.add_port_mapping(server_port, server_port, ProjectSettings.get_setting("application/config/name"), "TCP") - emit_signal("upnp_completed", OK) + upnp_completed.emit(OK) func _ready(): thread = Thread.new() diff --git a/classes/class_vector4i.rst b/classes/class_vector4i.rst index 87bb06bdca1..e84af60a362 100644 --- a/classes/class_vector4i.rst +++ b/classes/class_vector4i.rst @@ -566,7 +566,7 @@ Gets the remainder of each component of the **Vector4i** with the components of :ref:`Vector4i` **operator %**\ (\ right\: :ref:`int`\ ) :ref:`🔗` -Gets the remainder of each component of the **Vector4i** with the the given :ref:`int`. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using :ref:`@GlobalScope.posmod` instead if you want to handle negative numbers. +Gets the remainder of each component of the **Vector4i** with the given :ref:`int`. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using :ref:`@GlobalScope.posmod` instead if you want to handle negative numbers. :: diff --git a/classes/class_vehiclewheel3d.rst b/classes/class_vehiclewheel3d.rst index 1df0021c1e3..91699631298 100644 --- a/classes/class_vehiclewheel3d.rst +++ b/classes/class_vehiclewheel3d.rst @@ -76,15 +76,19 @@ Methods .. table:: :widths: auto - +-----------------------------+-------------------------------------------------------------------------------------+ - | :ref:`Node3D` | :ref:`get_contact_body`\ (\ ) |const| | - +-----------------------------+-------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_rpm`\ (\ ) |const| | - +-----------------------------+-------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_skidinfo`\ (\ ) |const| | - +-----------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_in_contact`\ (\ ) |const| | - +-----------------------------+-------------------------------------------------------------------------------------+ + +-------------------------------+-----------------------------------------------------------------------------------------+ + | :ref:`Node3D` | :ref:`get_contact_body`\ (\ ) |const| | + +-------------------------------+-----------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_contact_normal`\ (\ ) |const| | + +-------------------------------+-----------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_contact_point`\ (\ ) |const| | + +-------------------------------+-----------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_rpm`\ (\ ) |const| | + +-------------------------------+-----------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_skidinfo`\ (\ ) |const| | + +-------------------------------+-----------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_in_contact`\ (\ ) |const| | + +-------------------------------+-----------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -123,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 @@ -140,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 @@ -212,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 @@ -358,6 +362,30 @@ Returns ``null`` if the wheel is not in contact with a surface, or the contact b ---- +.. _class_VehicleWheel3D_method_get_contact_normal: + +.. rst-class:: classref-method + +:ref:`Vector3` **get_contact_normal**\ (\ ) |const| :ref:`🔗` + +Returns the normal of the suspension's collision in world space if the wheel is in contact. If the wheel isn't in contact with anything, returns a vector pointing directly along the suspension axis toward the vehicle in world space. + +.. rst-class:: classref-item-separator + +---- + +.. _class_VehicleWheel3D_method_get_contact_point: + +.. rst-class:: classref-method + +:ref:`Vector3` **get_contact_point**\ (\ ) |const| :ref:`🔗` + +Returns the point of the suspension's collision in world space if the wheel is in contact. If the wheel isn't in contact with anything, returns the maximum point of the wheel's ray cast in world space, which is defined by ``wheel_rest_length + wheel_radius``. + +.. rst-class:: classref-item-separator + +---- + .. _class_VehicleWheel3D_method_get_rpm: .. rst-class:: classref-method diff --git a/classes/class_viewport.rst b/classes/class_viewport.rst index a49e66d7ff7..305cd1bdbdf 100644 --- a/classes/class_viewport.rst +++ b/classes/class_viewport.rst @@ -60,99 +60,101 @@ Properties .. table:: :widths: auto - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`bool` | :ref:`audio_listener_enable_2d` | ``false`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`bool` | :ref:`audio_listener_enable_3d` | ``false`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`int` | :ref:`canvas_cull_mask` | ``4294967295`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`DefaultCanvasItemTextureFilter` | :ref:`canvas_item_default_texture_filter` | ``1`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`DefaultCanvasItemTextureRepeat` | :ref:`canvas_item_default_texture_repeat` | ``0`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`Transform2D` | :ref:`canvas_transform` | | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`DebugDraw` | :ref:`debug_draw` | ``0`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`bool` | :ref:`disable_3d` | ``false`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`float` | :ref:`fsr_sharpness` | ``0.2`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`Transform2D` | :ref:`global_canvas_transform` | | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`bool` | :ref:`gui_disable_input` | ``false`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`bool` | :ref:`gui_embed_subwindows` | ``false`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`bool` | :ref:`gui_snap_controls_to_pixels` | ``true`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`bool` | :ref:`handle_input_locally` | ``true`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`float` | :ref:`mesh_lod_threshold` | ``1.0`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`MSAA` | :ref:`msaa_2d` | ``0`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`MSAA` | :ref:`msaa_3d` | ``0`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`bool` | :ref:`own_world_3d` | ``false`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`bool` | :ref:`physics_object_picking` | ``false`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`bool` | :ref:`physics_object_picking_first_only` | ``false`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`bool` | :ref:`physics_object_picking_sort` | ``false`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`bool` | :ref:`positional_shadow_atlas_16_bits` | ``true`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`PositionalShadowAtlasQuadrantSubdiv` | :ref:`positional_shadow_atlas_quad_0` | ``2`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`PositionalShadowAtlasQuadrantSubdiv` | :ref:`positional_shadow_atlas_quad_1` | ``2`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`PositionalShadowAtlasQuadrantSubdiv` | :ref:`positional_shadow_atlas_quad_2` | ``3`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`PositionalShadowAtlasQuadrantSubdiv` | :ref:`positional_shadow_atlas_quad_3` | ``4`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`int` | :ref:`positional_shadow_atlas_size` | ``2048`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`Scaling3DMode` | :ref:`scaling_3d_mode` | ``0`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`float` | :ref:`scaling_3d_scale` | ``1.0`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`ScreenSpaceAA` | :ref:`screen_space_aa` | ``0`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`SDFOversize` | :ref:`sdf_oversize` | ``1`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`SDFScale` | :ref:`sdf_scale` | ``1`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`bool` | :ref:`snap_2d_transforms_to_pixel` | ``false`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`bool` | :ref:`snap_2d_vertices_to_pixel` | ``false`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`float` | :ref:`texture_mipmap_bias` | ``0.0`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`bool` | :ref:`transparent_bg` | ``false`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`bool` | :ref:`use_debanding` | ``false`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`bool` | :ref:`use_hdr_2d` | ``false`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`bool` | :ref:`use_occlusion_culling` | ``false`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`bool` | :ref:`use_taa` | ``false`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`bool` | :ref:`use_xr` | ``false`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`VRSMode` | :ref:`vrs_mode` | ``0`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`Texture2D` | :ref:`vrs_texture` | | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`VRSUpdateMode` | :ref:`vrs_update_mode` | ``1`` | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`World2D` | :ref:`world_2d` | | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ - | :ref:`World3D` | :ref:`world_3d` | | - +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`audio_listener_enable_2d` | ``false`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`audio_listener_enable_3d` | ``false`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`canvas_cull_mask` | ``4294967295`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`DefaultCanvasItemTextureFilter` | :ref:`canvas_item_default_texture_filter` | ``1`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`DefaultCanvasItemTextureRepeat` | :ref:`canvas_item_default_texture_repeat` | ``0`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`canvas_transform` | | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`DebugDraw` | :ref:`debug_draw` | ``0`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`disable_3d` | ``false`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`fsr_sharpness` | ``0.2`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`global_canvas_transform` | | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`gui_disable_input` | ``false`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`gui_embed_subwindows` | ``false`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`gui_snap_controls_to_pixels` | ``true`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`handle_input_locally` | ``true`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`mesh_lod_threshold` | ``1.0`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`MSAA` | :ref:`msaa_2d` | ``0`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`MSAA` | :ref:`msaa_3d` | ``0`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`own_world_3d` | ``false`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`PhysicsInterpolationMode` | physics_interpolation_mode | ``1`` (overrides :ref:`Node`) | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`physics_object_picking` | ``false`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`physics_object_picking_first_only` | ``false`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`physics_object_picking_sort` | ``false`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`positional_shadow_atlas_16_bits` | ``true`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`PositionalShadowAtlasQuadrantSubdiv` | :ref:`positional_shadow_atlas_quad_0` | ``2`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`PositionalShadowAtlasQuadrantSubdiv` | :ref:`positional_shadow_atlas_quad_1` | ``2`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`PositionalShadowAtlasQuadrantSubdiv` | :ref:`positional_shadow_atlas_quad_2` | ``3`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`PositionalShadowAtlasQuadrantSubdiv` | :ref:`positional_shadow_atlas_quad_3` | ``4`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`positional_shadow_atlas_size` | ``2048`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Scaling3DMode` | :ref:`scaling_3d_mode` | ``0`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`scaling_3d_scale` | ``1.0`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`ScreenSpaceAA` | :ref:`screen_space_aa` | ``0`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`SDFOversize` | :ref:`sdf_oversize` | ``1`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`SDFScale` | :ref:`sdf_scale` | ``1`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`snap_2d_transforms_to_pixel` | ``false`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`snap_2d_vertices_to_pixel` | ``false`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`texture_mipmap_bias` | ``0.0`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`transparent_bg` | ``false`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`use_debanding` | ``false`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`use_hdr_2d` | ``false`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`use_occlusion_culling` | ``false`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`use_taa` | ``false`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`use_xr` | ``false`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`VRSMode` | :ref:`vrs_mode` | ``0`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`vrs_texture` | | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`VRSUpdateMode` | :ref:`vrs_update_mode` | ``1`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`World2D` | :ref:`world_2d` | | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`World3D` | :ref:`world_3d` | | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -167,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| | @@ -191,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| | @@ -1329,7 +1337,9 @@ To control this property on the root viewport, set the :ref:`ProjectSettings.ren - |void| **set_msaa_2d**\ (\ value\: :ref:`MSAA`\ ) - :ref:`MSAA` **get_msaa_2d**\ (\ ) -The multisample anti-aliasing mode for 2D/Canvas rendering. A higher number results in smoother edges at the cost of significantly worse performance. A value of 2 or 4 is best unless targeting very high-end systems. This has no effect on shader-induced aliasing or texture aliasing. +The multisample antialiasing mode for 2D/Canvas rendering. A higher number results in smoother edges at the cost of significantly worse performance. A value of :ref:`MSAA_2X` or :ref:`MSAA_4X` is best unless targeting very high-end systems. This has no effect on shader-induced aliasing or texture aliasing. + +See also :ref:`ProjectSettings.rendering/anti_aliasing/quality/msaa_2d` and :ref:`RenderingServer.viewport_set_msaa_2d`. .. rst-class:: classref-item-separator @@ -1346,7 +1356,9 @@ The multisample anti-aliasing mode for 2D/Canvas rendering. A higher number resu - |void| **set_msaa_3d**\ (\ value\: :ref:`MSAA`\ ) - :ref:`MSAA` **get_msaa_3d**\ (\ ) -The multisample anti-aliasing mode for 3D rendering. A higher number results in smoother edges at the cost of significantly worse performance. A value of 2 or 4 is best unless targeting very high-end systems. See also bilinear scaling 3d :ref:`scaling_3d_mode` for supersampling, which provides higher quality but is much more expensive. This has no effect on shader-induced aliasing or texture aliasing. +The multisample antialiasing mode for 3D rendering. A higher number results in smoother edges at the cost of significantly worse performance. A value of :ref:`MSAA_2X` or :ref:`MSAA_4X` is best unless targeting very high-end systems. See also bilinear scaling 3d :ref:`scaling_3d_mode` for supersampling, which provides higher quality but is much more expensive. This has no effect on shader-induced aliasing or texture aliasing. + +See also :ref:`ProjectSettings.rendering/anti_aliasing/quality/msaa_3d` and :ref:`RenderingServer.viewport_set_msaa_3d`. .. rst-class:: classref-item-separator @@ -1587,6 +1599,8 @@ To control this property on the root viewport, set the :ref:`ProjectSettings.ren Sets the screen-space antialiasing method used. Screen-space antialiasing works by selectively blurring edges in a post-process shader. It differs from MSAA which takes multiple coverage samples while rendering objects. Screen-space AA methods are typically faster than MSAA and will smooth out specular aliasing, but tend to make scenes appear blurry. +See also :ref:`ProjectSettings.rendering/anti_aliasing/quality/screen_space_aa` and :ref:`RenderingServer.viewport_set_screen_space_aa`. + .. rst-class:: classref-item-separator ---- @@ -1712,10 +1726,12 @@ If ``true``, the viewport should render its background as transparent. - |void| **set_use_debanding**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_using_debanding**\ (\ ) -If ``true``, uses a fast post-processing filter to make banding significantly less visible in 3D. 2D rendering is *not* affected by debanding unless the :ref:`Environment.background_mode` is :ref:`Environment.BG_CANVAS`. See also :ref:`ProjectSettings.rendering/anti_aliasing/quality/use_debanding`. +If ``true``, uses a fast post-processing filter to make banding significantly less visible in 3D. 2D rendering is *not* affected by debanding unless the :ref:`Environment.background_mode` is :ref:`Environment.BG_CANVAS`. In some cases, debanding may introduce a slightly noticeable dithering pattern. It's recommended to enable debanding only when actually needed since the dithering pattern will make lossless-compressed screenshots larger. +See also :ref:`ProjectSettings.rendering/anti_aliasing/quality/use_debanding` and :ref:`RenderingServer.viewport_set_use_debanding`. + .. rst-class:: classref-item-separator ---- @@ -1771,10 +1787,12 @@ If ``true``, :ref:`OccluderInstance3D` nodes will be u - |void| **set_use_taa**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_using_taa**\ (\ ) -Enables Temporal Anti-Aliasing for this viewport. TAA works by jittering the camera and accumulating the images of the last rendered frames, motion vector rendering is used to account for camera and object motion. +Enables temporal antialiasing for this viewport. TAA works by jittering the camera and accumulating the images of the last rendered frames, motion vector rendering is used to account for camera and object motion. \ **Note:** The implementation is not complete yet, some visual instances such as particles and skinned meshes may show artifacts. +See also :ref:`ProjectSettings.rendering/anti_aliasing/quality/use_taa` and :ref:`RenderingServer.viewport_set_use_taa`. + .. rst-class:: classref-item-separator ---- @@ -1925,6 +1943,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 @@ -2051,6 +2093,8 @@ Returns the viewport's texture. await RenderingServer.frame_post_draw $Viewport.get_texture().get_image().save_png("user://Screenshot.png") +\ **Note:** When :ref:`use_hdr_2d` is ``true`` the returned texture will be an HDR image encoded in linear space. + .. rst-class:: classref-item-separator ---- @@ -2079,6 +2123,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 @@ -2135,7 +2191,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_viewporttexture.rst b/classes/class_viewporttexture.rst index 96387139a62..2684c184d88 100644 --- a/classes/class_viewporttexture.rst +++ b/classes/class_viewporttexture.rst @@ -27,6 +27,13 @@ To get a **ViewportTexture** in code, use the :ref:`Viewport.get_texture` with :ref:`Viewport.use_hdr_2d` set to ``true`` the returned texture will be an HDR image encoded in linear space. This may look darker than normal when displayed directly on screen. To convert to gamma space, you can do the following: + +:: + + img.convert(Image.FORMAT_RGBA8) + imb.linear_to_srgb() + .. rst-class:: classref-introduction-group Tutorials diff --git a/classes/class_visibleonscreennotifier2d.rst b/classes/class_visibleonscreennotifier2d.rst index 37e3e0554ab..b789caf2362 100644 --- a/classes/class_visibleonscreennotifier2d.rst +++ b/classes/class_visibleonscreennotifier2d.rst @@ -21,7 +21,7 @@ A rectangular region of 2D space that detects whether it is visible on screen. Description ----------- -:ref:`VisibleOnScreenEnabler2D` represents a rectangular region of 2D space. When any part of this region becomes visible on screen or in a viewport, it will emit a :ref:`screen_entered` signal, and likewise it will emit a :ref:`screen_exited` signal when no part of it remains visible. +**VisibleOnScreenNotifier2D** represents a rectangular region of 2D space. When any part of this region becomes visible on screen or in a viewport, it will emit a :ref:`screen_entered` signal, and likewise it will emit a :ref:`screen_exited` signal when no part of it remains visible. If you want a node to be enabled automatically when this region is visible on screen, use :ref:`VisibleOnScreenEnabler2D`. diff --git a/classes/class_visibleonscreennotifier3d.rst b/classes/class_visibleonscreennotifier3d.rst index d201ffa6166..ded7a0e147a 100644 --- a/classes/class_visibleonscreennotifier3d.rst +++ b/classes/class_visibleonscreennotifier3d.rst @@ -21,7 +21,7 @@ A box-shaped region of 3D space that detects whether it is visible on screen. Description ----------- -:ref:`VisibleOnScreenEnabler3D` represents a box-shaped region of 3D space. When any part of this region becomes visible on screen or in a :ref:`Camera3D`'s view, it will emit a :ref:`screen_entered` signal, and likewise it will emit a :ref:`screen_exited` signal when no part of it remains visible. +**VisibleOnScreenNotifier3D** represents a box-shaped region of 3D space. When any part of this region becomes visible on screen or in a :ref:`Camera3D`'s view, it will emit a :ref:`screen_entered` signal, and likewise it will emit a :ref:`screen_exited` signal when no part of it remains visible. If you want a node to be enabled automatically when this region is visible on screen, use :ref:`VisibleOnScreenEnabler3D`. diff --git a/classes/class_visualinstance3d.rst b/classes/class_visualinstance3d.rst index 713d99f60ff..4645f7c459b 100644 --- a/classes/class_visualinstance3d.rst +++ b/classes/class_visualinstance3d.rst @@ -12,7 +12,7 @@ VisualInstance3D **Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`Decal`, :ref:`FogVolume`, :ref:`GeometryInstance3D`, :ref:`GPUParticlesAttractor3D`, :ref:`GPUParticlesCollision3D`, :ref:`Light3D`, :ref:`LightmapGI`, :ref:`OccluderInstance3D`, :ref:`ReflectionProbe`, :ref:`RootMotionView`, :ref:`VisibleOnScreenNotifier3D`, :ref:`VoxelGI` +**Inherited By:** :ref:`Decal`, :ref:`FogVolume`, :ref:`GeometryInstance3D`, :ref:`GPUParticlesAttractor3D`, :ref:`GPUParticlesCollision3D`, :ref:`Light3D`, :ref:`LightmapGI`, :ref:`OccluderInstance3D`, :ref:`OpenXRVisibilityMask`, :ref:`ReflectionProbe`, :ref:`RootMotionView`, :ref:`VisibleOnScreenNotifier3D`, :ref:`VoxelGI` Parent of all visual 3D nodes. diff --git a/classes/class_visualshadernodecubemap.rst b/classes/class_visualshadernodecubemap.rst index 4e4b786940b..108da2e1a91 100644 --- a/classes/class_visualshadernodecubemap.rst +++ b/classes/class_visualshadernodecubemap.rst @@ -30,7 +30,7 @@ Properties :widths: auto +--------------------------------------------------------------+--------------------------------------------------------------------------+-------+ - | :ref:`Cubemap` | :ref:`cube_map` | | + | :ref:`TextureLayered` | :ref:`cube_map` | | +--------------------------------------------------------------+--------------------------------------------------------------------------+-------+ | :ref:`Source` | :ref:`source` | ``0`` | +--------------------------------------------------------------+--------------------------------------------------------------------------+-------+ @@ -131,12 +131,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Cubemap` **cube_map** :ref:`🔗` +:ref:`TextureLayered` **cube_map** :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_cube_map**\ (\ value\: :ref:`Cubemap`\ ) -- :ref:`Cubemap` **get_cube_map**\ (\ ) +- |void| **set_cube_map**\ (\ value\: :ref:`TextureLayered`\ ) +- :ref:`TextureLayered` **get_cube_map**\ (\ ) The :ref:`Cubemap` texture to sample when using :ref:`SOURCE_TEXTURE` as :ref:`source`. diff --git a/classes/class_visualshadernodeintparameter.rst b/classes/class_visualshadernodeintparameter.rst index ee79ad55fc1..bb727fd7a96 100644 --- a/classes/class_visualshadernodeintparameter.rst +++ b/classes/class_visualshadernodeintparameter.rst @@ -29,19 +29,21 @@ Properties .. table:: :widths: auto - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+-----------+ - | :ref:`int` | :ref:`default_value` | ``0`` | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`default_value_enabled` | ``false`` | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+-----------+ - | :ref:`Hint` | :ref:`hint` | ``0`` | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+-----------+ - | :ref:`int` | :ref:`max` | ``100`` | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+-----------+ - | :ref:`int` | :ref:`min` | ``0`` | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+-----------+ - | :ref:`int` | :ref:`step` | ``1`` | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+-----------+ + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`int` | :ref:`default_value` | ``0`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`bool` | :ref:`default_value_enabled` | ``false`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`PackedStringArray` | :ref:`enum_names` | ``PackedStringArray()`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Hint` | :ref:`hint` | ``0`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`int` | :ref:`max` | ``100`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`int` | :ref:`min` | ``0`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`int` | :ref:`step` | ``1`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+-------------------------+ .. rst-class:: classref-section-separator @@ -82,11 +84,19 @@ The parameter's value must be within the specified :ref:`min` between values. +.. _class_VisualShaderNodeIntParameter_constant_HINT_ENUM: + +.. rst-class:: classref-enumeration-constant + +:ref:`Hint` **HINT_ENUM** = ``3`` + +The parameter uses an enum to associate preset values to names in the editor. + .. _class_VisualShaderNodeIntParameter_constant_HINT_MAX: .. rst-class:: classref-enumeration-constant -:ref:`Hint` **HINT_MAX** = ``3`` +:ref:`Hint` **HINT_MAX** = ``4`` Represents the size of the :ref:`Hint` enum. @@ -133,6 +143,25 @@ If ``true``, the node will have a custom default value. ---- +.. _class_VisualShaderNodeIntParameter_property_enum_names: + +.. rst-class:: classref-property + +:ref:`PackedStringArray` **enum_names** = ``PackedStringArray()`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_enum_names**\ (\ value\: :ref:`PackedStringArray`\ ) +- :ref:`PackedStringArray` **get_enum_names**\ (\ ) + +The names used for the enum select in the editor. :ref:`hint` must be :ref:`HINT_ENUM` for this to take effect. + +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray` for more details. + +.. rst-class:: classref-item-separator + +---- + .. _class_VisualShaderNodeIntParameter_property_hint: .. rst-class:: classref-property diff --git a/classes/class_visualshadernoderemap.rst b/classes/class_visualshadernoderemap.rst index d1dc531405d..b127da50fe2 100644 --- a/classes/class_visualshadernoderemap.rst +++ b/classes/class_visualshadernoderemap.rst @@ -21,6 +21,121 @@ Description Remap will transform the input range into output range, e.g. you can change a ``0..1`` value to ``-2..2`` etc. See :ref:`@GlobalScope.remap` for more details. +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +--------------------------------------------------+--------------------------------------------------------------+-------+ + | :ref:`OpType` | :ref:`op_type` | ``0`` | + +--------------------------------------------------+--------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_VisualShaderNodeRemap_OpType: + +.. rst-class:: classref-enumeration + +enum **OpType**: :ref:`🔗` + +.. _class_VisualShaderNodeRemap_constant_OP_TYPE_SCALAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_SCALAR** = ``0`` + +A floating-point scalar type. + +.. _class_VisualShaderNodeRemap_constant_OP_TYPE_VECTOR_2D: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_VECTOR_2D** = ``1`` + +A 2D vector type. + +.. _class_VisualShaderNodeRemap_constant_OP_TYPE_VECTOR_2D_SCALAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_VECTOR_2D_SCALAR** = ``2`` + +The ``value`` port uses a 2D vector type, while the ``input min``, ``input max``, ``output min``, and ``output max`` ports use a floating-point scalar type. + +.. _class_VisualShaderNodeRemap_constant_OP_TYPE_VECTOR_3D: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_VECTOR_3D** = ``3`` + +A 3D vector type. + +.. _class_VisualShaderNodeRemap_constant_OP_TYPE_VECTOR_3D_SCALAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_VECTOR_3D_SCALAR** = ``4`` + +The ``value`` port uses a 3D vector type, while the ``input min``, ``input max``, ``output min``, and ``output max`` ports use a floating-point scalar type. + +.. _class_VisualShaderNodeRemap_constant_OP_TYPE_VECTOR_4D: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_VECTOR_4D** = ``5`` + +A 4D vector type. + +.. _class_VisualShaderNodeRemap_constant_OP_TYPE_VECTOR_4D_SCALAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_VECTOR_4D_SCALAR** = ``6`` + +The ``value`` port uses a 4D vector type, while the ``input min``, ``input max``, ``output min``, and ``output max`` ports use a floating-point scalar type. + +.. _class_VisualShaderNodeRemap_constant_OP_TYPE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpType` **OP_TYPE_MAX** = ``7`` + +Represents the size of the :ref:`OpType` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_VisualShaderNodeRemap_property_op_type: + +.. rst-class:: classref-property + +:ref:`OpType` **op_type** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_op_type**\ (\ value\: :ref:`OpType`\ ) +- :ref:`OpType` **get_op_type**\ (\ ) + +.. container:: contribute + + There is currently no description for this property. 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.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_visualshadernodetexture2darray.rst b/classes/class_visualshadernodetexture2darray.rst index 3b725a70229..20823d66ce6 100644 --- a/classes/class_visualshadernodetexture2darray.rst +++ b/classes/class_visualshadernodetexture2darray.rst @@ -30,7 +30,7 @@ Properties :widths: auto +---------------------------------------------+-----------------------------------------------------------------------------------+ - | :ref:`Texture2DArray` | :ref:`texture_array` | + | :ref:`TextureLayered` | :ref:`texture_array` | +---------------------------------------------+-----------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -46,12 +46,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Texture2DArray` **texture_array** :ref:`🔗` +:ref:`TextureLayered` **texture_array** :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_texture_array**\ (\ value\: :ref:`Texture2DArray`\ ) -- :ref:`Texture2DArray` **get_texture_array**\ (\ ) +- |void| **set_texture_array**\ (\ value\: :ref:`TextureLayered`\ ) +- :ref:`TextureLayered` **get_texture_array**\ (\ ) A source texture array. Used if :ref:`VisualShaderNodeSample3D.source` is set to :ref:`VisualShaderNodeSample3D.SOURCE_TEXTURE`. diff --git a/classes/class_websocketpeer.rst b/classes/class_websocketpeer.rst index c7d7d73de46..b2104534c39 100644 --- a/classes/class_websocketpeer.rst +++ b/classes/class_websocketpeer.rst @@ -482,7 +482,7 @@ Sends the given ``message`` using WebSocket text mode. Prefer this method over : |void| **set_no_delay**\ (\ enabled\: :ref:`bool`\ ) :ref:`🔗` -Disable Nagle's algorithm on the underling TCP socket (default). See :ref:`StreamPeerTCP.set_no_delay` for more information. +Disable Nagle's algorithm on the underlying TCP socket (default). See :ref:`StreamPeerTCP.set_no_delay` for more information. \ **Note:** Not available in the Web export. diff --git a/classes/class_webxrinterface.rst b/classes/class_webxrinterface.rst index de4deb8f978..a2526124c2c 100644 --- a/classes/class_webxrinterface.rst +++ b/classes/class_webxrinterface.rst @@ -376,7 +376,7 @@ enum **TargetRayMode**: :ref:`🔗` :ref:`TargetRayMode` **TARGET_RAY_MODE_UNKNOWN** = ``0`` -We don't know the the target ray mode. +We don't know the target ray mode. .. _class_WebXRInterface_constant_TARGET_RAY_MODE_GAZE: diff --git a/classes/class_window.rst b/classes/class_window.rst index bf0a89c2cf9..004a0b70cf9 100644 --- a/classes/class_window.rst +++ b/classes/class_window.rst @@ -2137,6 +2137,12 @@ Causes the window to grab focus, allowing it to receive user input. Shows the **Window** and makes it transient (see :ref:`transient`). If ``rect`` is provided, it will be set as the **Window**'s size. Fails if called on the main window. +If :ref:`ProjectSettings.display/window/subwindows/embed_subwindows` is ``true`` (single-window mode), ``rect``'s coordinates are global and relative to the main window's top-left corner (excluding window decorations). If ``rect``'s position coordinates are negative, the window will be located outside the main window and may not be visible as a result. + +If :ref:`ProjectSettings.display/window/subwindows/embed_subwindows` is ``false`` (multi-window mode), ``rect``'s coordinates are global and relative to the top-left corner of the leftmost screen. If ``rect``'s position coordinates are negative, the window will be placed at the top-left corner of the screen. + +\ **Note:** ``rect`` must be in global coordinates if specified. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_xrhandtracker.rst b/classes/class_xrhandtracker.rst index 9aeb48e332c..8fbfbbf92a9 100644 --- a/classes/class_xrhandtracker.rst +++ b/classes/class_xrhandtracker.rst @@ -117,11 +117,19 @@ The source of hand tracking data is unobstructed, meaning that an accurate metho The source of hand tracking data is a controller, meaning that joint positions are inferred from controller inputs. +.. _class_XRHandTracker_constant_HAND_TRACKING_SOURCE_NOT_TRACKED: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandTrackingSource` **HAND_TRACKING_SOURCE_NOT_TRACKED** = ``3`` + +No hand tracking data is tracked, this either means the hand is obscured, the controller is turned off, or tracking is not supported for the current input type. + .. _class_XRHandTracker_constant_HAND_TRACKING_SOURCE_MAX: .. rst-class:: classref-enumeration-constant -:ref:`HandTrackingSource` **HAND_TRACKING_SOURCE_MAX** = ``3`` +:ref:`HandTrackingSource` **HAND_TRACKING_SOURCE_MAX** = ``4`` Represents the size of the :ref:`HandTrackingSource` enum. 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 fd3c02edabc..2c70342955a 100644 --- a/classes/index.rst +++ b/classes/index.rst @@ -177,6 +177,7 @@ Nodes class_openxrcompositionlayerequirect class_openxrcompositionlayerquad class_openxrhand + class_openxrvisibilitymask class_optionbutton class_panel class_panelcontainer @@ -397,6 +398,7 @@ Resources class_editorsettings class_editorsyntaxhighlighter class_environment + class_externaltexture class_fastnoiselite class_fbxdocument class_fbxstate @@ -406,6 +408,7 @@ Resources class_fontvariation class_gdextension class_gdscript + class_gdscriptsyntaxhighlighter class_gltfaccessor class_gltfanimation class_gltfbufferview @@ -722,10 +725,12 @@ Other objects class_diraccess class_displayserver class_dtlsserver + class_editorcontextmenuplugin class_editordebuggerplugin class_editordebuggersession class_editorexportplatform class_editorexportplatformandroid + class_editorexportplatformextension class_editorexportplatformios class_editorexportplatformlinuxbsd class_editorexportplatformmacos @@ -733,6 +738,7 @@ Other objects class_editorexportplatformweb class_editorexportplatformwindows class_editorexportplugin + class_editorexportpreset class_editorfeatureprofile class_editorfilesystemdirectory class_editorfilesystemimportformatsupportquery @@ -780,6 +786,7 @@ Other objects class_ip class_javaclass class_javaclasswrapper + class_javaobject class_javascriptbridge class_javascriptobject class_jnisingleton @@ -933,6 +940,7 @@ Other objects class_tiledata class_time class_tlsoptions + class_translationdomain class_translationserver class_treeitem class_trianglemesh @@ -976,10 +984,12 @@ Editor-only :name: toc-class-ref-editors class_editorcommandpalette + class_editorcontextmenuplugin class_editordebuggerplugin class_editordebuggersession class_editorexportplatform class_editorexportplatformandroid + class_editorexportplatformextension class_editorexportplatformios class_editorexportplatformlinuxbsd class_editorexportplatformmacos @@ -987,6 +997,7 @@ Editor-only class_editorexportplatformweb class_editorexportplatformwindows class_editorexportplugin + class_editorexportpreset class_editorfeatureprofile class_editorfiledialog class_editorfilesystem