diff --git a/classes/class_@gdscript.rst b/classes/class_@gdscript.rst index 1bbf88cc1f9..f0e4c9749b0 100644 --- a/classes/class_@gdscript.rst +++ b/classes/class_@gdscript.rst @@ -992,7 +992,7 @@ Returns the length of the given Variant ``var``. The length can be the character :ref:`Resource` **load** **(** :ref:`String` path **)** -Returns a :ref:`Resource` from the filesystem located at the absolute ``path``. Unless it's already referenced elsewhere (such as in another script or in the scene), the resource is loaded from disk on function call, which might cause a slight delay, especially when loading large scenes. To avoid unnecessary delays when loading something multiple times, either store the resource in a variable or use :ref:`preload`. +Returns a :ref:`Resource` from the filesystem located at the absolute ``path``. Unless it's already referenced elsewhere (such as in another script or in the scene), the resource is loaded from disk on function call, which might cause a slight delay, especially when loading large scenes. To avoid unnecessary delays when loading something multiple times, either store the resource in a variable or use :ref:`preload`. This method is equivalent of using :ref:`ResourceLoader.load` with :ref:`ResourceLoader.CACHE_MODE_REUSE`. \ **Note:** Resource paths can be obtained by right-clicking on a resource in the FileSystem dock and choosing "Copy Path", or by dragging the file from the FileSystem dock into the current script. diff --git a/classes/class_@globalscope.rst b/classes/class_@globalscope.rst index 28ab0c65f35..f02151c1c54 100644 --- a/classes/class_@globalscope.rst +++ b/classes/class_@globalscope.rst @@ -7225,7 +7225,7 @@ Converts the given ``variant`` to the given ``type``, using the :ref:`Variant.Ty If the type conversion cannot be done, this method will return the default value for that type, for example converting :ref:`Rect2` to :ref:`Vector2` will always return :ref:`Vector2.ZERO`. This method will never show error messages as long as ``type`` is a valid Variant type. -The returned value is a :ref:`Variant`, but the data inside and the :ref:`Variant.Type` will be the same as the requested type. +The returned value is a :ref:`Variant`, but the data inside and its type will be the same as the requested type. :: diff --git a/classes/class_animationnodestatemachine.rst b/classes/class_animationnodestatemachine.rst index dc2acc3a16d..b65fd227a20 100644 --- a/classes/class_animationnodestatemachine.rst +++ b/classes/class_animationnodestatemachine.rst @@ -413,9 +413,7 @@ Renames the given animation node. void **replace_node** **(** :ref:`StringName` name, :ref:`AnimationNode` node **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Replaces the given animation node with a new animation node. .. rst-class:: classref-item-separator diff --git a/classes/class_area2d.rst b/classes/class_area2d.rst index 1a3594d0430..ced6547a658 100644 --- a/classes/class_area2d.rst +++ b/classes/class_area2d.rst @@ -23,6 +23,8 @@ Description This node can also locally alter or override physics parameters (gravity, damping) and route audio to custom audio buses. +\ **Note:** Areas and bodies created with :ref:`PhysicsServer2D` might not interact as expected with **Area2D**\ s, and might not emit signals or track objects correctly. + .. rst-class:: classref-introduction-group Tutorials diff --git a/classes/class_area3d.rst b/classes/class_area3d.rst index 9608cf0240d..7e185b2139e 100644 --- a/classes/class_area3d.rst +++ b/classes/class_area3d.rst @@ -23,6 +23,8 @@ Description This node can also locally alter or override physics parameters (gravity, damping) and route audio to custom audio buses. +\ **Note:** Areas and bodies created with :ref:`PhysicsServer3D` might not interact as expected with **Area3D**\ s, and might not emit signals or track objects correctly. + \ **Warning:** Using a :ref:`ConcavePolygonShape3D` inside a :ref:`CollisionShape3D` child of this node (created e.g. by using the **Create Trimesh Collision Sibling** option in the **Mesh** menu that appears when selecting a :ref:`MeshInstance3D` node) may give unexpected results, since this collision shape is hollow. If this is not desired, it has to be split into multiple :ref:`ConvexPolygonShape3D`\ s or primitive shapes like :ref:`BoxShape3D`, or in some cases it may be replaceable by a :ref:`CollisionPolygon3D`. .. rst-class:: classref-introduction-group diff --git a/classes/class_audioserver.rst b/classes/class_audioserver.rst index 2aa1c5e2564..b379ba4e6a7 100644 --- a/classes/class_audioserver.rst +++ b/classes/class_audioserver.rst @@ -289,7 +289,7 @@ Name of the current device for audio output (see :ref:`get_output_device_list` value **)** - :ref:`float` **get_playback_speed_scale** **(** **)** -Scales the rate at which audio is played (i.e. setting it to ``0.5`` will make the audio be played at half its speed). +Scales the rate at which audio is played (i.e. setting it to ``0.5`` will make the audio be played at half its speed). See also :ref:`Engine.time_scale` to affect the general simulation speed, which is independent from :ref:`playback_speed_scale`. .. rst-class:: classref-section-separator diff --git a/classes/class_basematerial3d.rst b/classes/class_basematerial3d.rst index 4b5dfbecfa8..2b32099288a 100644 --- a/classes/class_basematerial3d.rst +++ b/classes/class_basematerial3d.rst @@ -479,7 +479,7 @@ enum **TextureFilter**: :ref:`TextureFilter` **TEXTURE_FILTER_NEAREST** = ``0`` -The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering, but the texture will look pixelized. +The texture filter reads from the nearest pixel only. This makes the texture look pixelated from up close, and grainy from a distance (due to mipmaps not being sampled). .. _class_BaseMaterial3D_constant_TEXTURE_FILTER_LINEAR: @@ -487,7 +487,7 @@ The texture filter reads from the nearest pixel only. The simplest and fastest m :ref:`TextureFilter` **TEXTURE_FILTER_LINEAR** = ``1`` -The texture filter blends between the nearest 4 pixels. Use this when you want to avoid a pixelated style, but do not want mipmaps. +The texture filter blends between the nearest 4 pixels. This makes the texture look smooth from up close, and grainy from a distance (due to mipmaps not being sampled). .. _class_BaseMaterial3D_constant_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS: @@ -495,7 +495,7 @@ The texture filter blends between the nearest 4 pixels. Use this when you want t :ref:`TextureFilter` **TEXTURE_FILTER_NEAREST_WITH_MIPMAPS** = ``2`` -The texture filter reads from the nearest pixel in the nearest mipmap. The fastest way to read from textures with mipmaps. +The texture filter reads from the nearest pixel and blends between the nearest 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``). This makes the texture look pixelated from up close, and smooth from a distance. .. _class_BaseMaterial3D_constant_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS: @@ -503,7 +503,7 @@ The texture filter reads from the nearest pixel in the nearest mipmap. The faste :ref:`TextureFilter` **TEXTURE_FILTER_LINEAR_WITH_MIPMAPS** = ``3`` -The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps. Use this for most cases as mipmaps are important to smooth out pixels that are far from the camera. +The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``). This makes the texture look smooth from up close, and smooth from a distance. .. _class_BaseMaterial3D_constant_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC: @@ -511,7 +511,7 @@ The texture filter blends between the nearest 4 pixels and between the nearest 2 :ref:`TextureFilter` **TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC** = ``4`` -The texture filter reads from the nearest pixel, but selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. +The texture filter reads from the nearest pixel and blends between 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``) based on the angle between the surface and the camera view. This makes the texture look pixelated from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. .. _class_BaseMaterial3D_constant_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC: @@ -519,7 +519,7 @@ The texture filter reads from the nearest pixel, but selects a mipmap based on t :ref:`TextureFilter` **TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC** = ``5`` -The texture filter blends between the nearest 4 pixels and selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. This is the slowest of the filtering options, but results in the highest quality texturing. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. +The texture filter blends between the nearest 4 pixels and blends between 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``) based on the angle between the surface and the camera view. This makes the texture look smooth from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. .. _class_BaseMaterial3D_constant_TEXTURE_FILTER_MAX: diff --git a/classes/class_cameraattributesphysical.rst b/classes/class_cameraattributesphysical.rst index 899ed72d154..a01e3278f4f 100644 --- a/classes/class_cameraattributesphysical.rst +++ b/classes/class_cameraattributesphysical.rst @@ -145,7 +145,7 @@ Only available when :ref:`ProjectSettings.rendering/lights_and_shadows/use_physi - void **set_shutter_speed** **(** :ref:`float` value **)** - :ref:`float` **get_shutter_speed** **(** **)** -Time for shutter to open and close, measured in seconds. A higher value will let in more light leading to a brighter image, while a lower amount will let in less light leading to a darker image. +Time for shutter to open and close, evaluated as ``1 / shutter_speed`` seconds. A higher value will allow less light (leading to a darker image), while a lower value will allow more light (leading to a brighter image). Only available when :ref:`ProjectSettings.rendering/lights_and_shadows/use_physical_light_units` is enabled. diff --git a/classes/class_canvasitem.rst b/classes/class_canvasitem.rst index 4fdd54522d6..778941ff915 100644 --- a/classes/class_canvasitem.rst +++ b/classes/class_canvasitem.rst @@ -288,7 +288,7 @@ The **CanvasItem** will inherit the filter from its parent. :ref:`TextureFilter` **TEXTURE_FILTER_NEAREST** = ``1`` -The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering. Useful for pixel art. +The texture filter reads from the nearest pixel only. This makes the texture look pixelated from up close, and grainy from a distance (due to mipmaps not being sampled). .. _class_CanvasItem_constant_TEXTURE_FILTER_LINEAR: @@ -296,7 +296,7 @@ The texture filter reads from the nearest pixel only. The simplest and fastest m :ref:`TextureFilter` **TEXTURE_FILTER_LINEAR** = ``2`` -The texture filter blends between the nearest four pixels. Use this for most cases where you want to avoid a pixelated style. +The texture filter blends between the nearest 4 pixels. This makes the texture look smooth from up close, and grainy from a distance (due to mipmaps not being sampled). .. _class_CanvasItem_constant_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS: @@ -304,7 +304,9 @@ The texture filter blends between the nearest four pixels. Use this for most cas :ref:`TextureFilter` **TEXTURE_FILTER_NEAREST_WITH_MIPMAPS** = ``3`` -The texture filter reads from the nearest pixel in the nearest mipmap. This is the fastest way to read from textures with mipmaps. +The texture filter reads from the nearest pixel and blends between the nearest 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``). This makes the texture look pixelated from up close, and smooth from a distance. + +Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to :ref:`Camera2D` zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. .. _class_CanvasItem_constant_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS: @@ -312,7 +314,9 @@ The texture filter reads from the nearest pixel in the nearest mipmap. This is t :ref:`TextureFilter` **TEXTURE_FILTER_LINEAR_WITH_MIPMAPS** = ``4`` -The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps. Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to :ref:`Camera2D` zoom), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. +The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``). This makes the texture look smooth from up close, and smooth from a distance. + +Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to :ref:`Camera2D` zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. .. _class_CanvasItem_constant_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC: @@ -320,9 +324,9 @@ The texture filter blends between the nearest 4 pixels and between the nearest 2 :ref:`TextureFilter` **TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC** = ``5`` -The texture filter reads from the nearest pixel, but selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. +The texture filter reads from the nearest pixel and blends between 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``) based on the angle between the surface and the camera view. This makes the texture look pixelated from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. -\ **Note:** This texture filter is rarely useful in 2D projects. :ref:`TEXTURE_FILTER_NEAREST_WITH_MIPMAPS` is usually more appropriate. +\ **Note:** This texture filter is rarely useful in 2D projects. :ref:`TEXTURE_FILTER_NEAREST_WITH_MIPMAPS` is usually more appropriate in this case. .. _class_CanvasItem_constant_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC: @@ -330,9 +334,9 @@ The texture filter reads from the nearest pixel, but selects a mipmap based on t :ref:`TextureFilter` **TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC** = ``6`` -The texture filter blends between the nearest 4 pixels and selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. This is the slowest of the filtering options, but results in the highest quality texturing. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. +The texture filter blends between the nearest 4 pixels and blends between 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``) based on the angle between the surface and the camera view. This makes the texture look smooth from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. -\ **Note:** This texture filter is rarely useful in 2D projects. :ref:`TEXTURE_FILTER_LINEAR_WITH_MIPMAPS` is usually more appropriate. +\ **Note:** This texture filter is rarely useful in 2D projects. :ref:`TEXTURE_FILTER_LINEAR_WITH_MIPMAPS` is usually more appropriate in this case. .. _class_CanvasItem_constant_TEXTURE_FILTER_MAX: diff --git a/classes/class_csgpolygon3d.rst b/classes/class_csgpolygon3d.rst index 37a2c9c44ae..384a440cc0f 100644 --- a/classes/class_csgpolygon3d.rst +++ b/classes/class_csgpolygon3d.rst @@ -348,7 +348,7 @@ When :ref:`mode` is :ref:`MODE_PATH` value **)** - :ref:`PathRotation` **get_path_rotation** **(** **)** -When :ref:`mode` is :ref:`MODE_PATH`, the :ref:`PathRotation` method used to rotate the :ref:`polygon` as it is extruded. +When :ref:`mode` is :ref:`MODE_PATH`, the path rotation method used to rotate the :ref:`polygon` as it is extruded. .. rst-class:: classref-item-separator diff --git a/classes/class_dictionary.rst b/classes/class_dictionary.rst index 0664ca4713f..89a9d73ad34 100644 --- a/classes/class_dictionary.rst +++ b/classes/class_dictionary.rst @@ -237,6 +237,8 @@ Methods +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`get` **(** :ref:`Variant` key, :ref:`Variant` default=null **)** |const| | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_or_add` **(** :ref:`Variant` key, :ref:`Variant` default=null **)** | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has` **(** :ref:`Variant` key **)** |const| | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_all` **(** :ref:`Array` keys **)** |const| | @@ -374,6 +376,18 @@ Returns the corresponding value for the given ``key`` in the dictionary. If the ---- +.. _class_Dictionary_method_get_or_add: + +.. rst-class:: classref-method + +:ref:`Variant` **get_or_add** **(** :ref:`Variant` key, :ref:`Variant` default=null **)** + +Gets a value and ensures the key is set. If the ``key`` exists in the dictionary, this behaves like :ref:`get`. Otherwise, the ``default`` value is inserted into the dictionary and returned. + +.. rst-class:: classref-item-separator + +---- + .. _class_Dictionary_method_has: .. rst-class:: classref-method diff --git a/classes/class_displayserver.rst b/classes/class_displayserver.rst index 21d52fb258f..7f981b71854 100644 --- a/classes/class_displayserver.rst +++ b/classes/class_displayserver.rst @@ -132,6 +132,8 @@ Methods +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`global_menu_get_item_tooltip` **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| | +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`global_menu_get_system_menu_roots` **(** **)** |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`global_menu_is_item_checkable` **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| | +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`global_menu_is_item_checked` **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| | @@ -1791,6 +1793,9 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). + "_apple" - Apple menu (macOS, custom items added before "Services"). + "_window" - Window menu (macOS, custom items added after "Bring All to Front"). + "_help" - Help menu (macOS). .. rst-class:: classref-item-separator @@ -1818,6 +1823,9 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). + "_apple" - Apple menu (macOS, custom items added before "Services"). + "_window" - Window menu (macOS, custom items added after "Bring All to Front"). + "_help" - Help menu (macOS). .. rst-class:: classref-item-separator @@ -1845,6 +1853,9 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). + "_apple" - Apple menu (macOS, custom items added before "Services"). + "_window" - Window menu (macOS, custom items added after "Bring All to Front"). + "_help" - Help menu (macOS). .. rst-class:: classref-item-separator @@ -1874,6 +1885,9 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). + "_apple" - Apple menu (macOS, custom items added before "Services"). + "_window" - Window menu (macOS, custom items added after "Bring All to Front"). + "_help" - Help menu (macOS). .. rst-class:: classref-item-separator @@ -1901,6 +1915,9 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). + "_apple" - Apple menu (macOS, custom items added before "Services"). + "_window" - Window menu (macOS, custom items added after "Bring All to Front"). + "_help" - Help menu (macOS). .. rst-class:: classref-item-separator @@ -1932,6 +1949,9 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). + "_apple" - Apple menu (macOS, custom items added before "Services"). + "_window" - Window menu (macOS, custom items added after "Bring All to Front"). + "_help" - Help menu (macOS). .. rst-class:: classref-item-separator @@ -1961,6 +1981,9 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). + "_apple" - Apple menu (macOS, custom items added before "Services"). + "_window" - Window menu (macOS, custom items added after "Bring All to Front"). + "_help" - Help menu (macOS). .. rst-class:: classref-item-separator @@ -1984,6 +2007,9 @@ Returns index of the inserted item, it's not guaranteed to be the same as ``inde "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). + "_apple" - Apple menu (macOS, custom items added before "Services"). + "_window" - Window menu (macOS, custom items added after "Bring All to Front"). + "_help" - Help menu (macOS). .. rst-class:: classref-item-separator @@ -2007,6 +2033,9 @@ Returns index of the inserted item, it's not guaranteed to be the same as ``inde "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). + "_apple" - Apple menu (macOS, custom items added before "Services"). + "_window" - Window menu (macOS, custom items added after "Bring All to Front"). + "_help" - Help menu (macOS). .. rst-class:: classref-item-separator @@ -2028,6 +2057,9 @@ Removes all items from the global menu with ID ``menu_root``. "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). + "_apple" - Apple menu (macOS, custom items added before "Services"). + "_window" - Window menu (macOS, custom items added after "Bring All to Front"). + "_help" - Help menu (macOS). .. rst-class:: classref-item-separator @@ -2229,6 +2261,20 @@ Returns the tooltip associated with the specified index ``idx``. ---- +.. _class_DisplayServer_method_global_menu_get_system_menu_roots: + +.. rst-class:: classref-method + +:ref:`Dictionary` **global_menu_get_system_menu_roots** **(** **)** |const| + +Returns Dictionary of supported system menu IDs and names. + +\ **Note:** This method is implemented only on macOS. + +.. rst-class:: classref-item-separator + +---- + .. _class_DisplayServer_method_global_menu_is_item_checkable: .. rst-class:: classref-method @@ -3105,6 +3151,14 @@ void **tablet_set_current_driver** **(** :ref:`String` name **)** Set active tablet driver name. +Supported drivers: + +- ``winink``: Windows Ink API, default (Windows 8.1+ required). + +- ``wintab``: Wacom Wintab API (compatible device driver required). + +- ``dummy``: Dummy driver, tablet input is disabled. + \ **Note:** This method is implemented only on Windows. .. rst-class:: classref-item-separator diff --git a/classes/class_editorsettings.rst b/classes/class_editorsettings.rst index 1c51943a532..99de256a8fa 100644 --- a/classes/class_editorsettings.rst +++ b/classes/class_editorsettings.rst @@ -61,6 +61,8 @@ Properties +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`debugger/auto_switch_to_remote_scene_tree` | +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`debugger/profile_native_calls` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`debugger/profiler_frame_history_size` | +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`debugger/profiler_frame_max_functions` | @@ -231,6 +233,10 @@ Properties +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`filesystem/external_programs/raster_image_editor` | +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`filesystem/external_programs/terminal_emulator` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`filesystem/external_programs/terminal_emulator_flags` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`filesystem/external_programs/vector_image_editor` | +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`filesystem/file_dialog/display_mode` | @@ -305,6 +311,8 @@ Properties +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`interface/editor/single_window_mode` | +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/editor/ui_layout_direction` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`interface/editor/unfocused_low_processor_mode_sleep_usec` | +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`interface/editor/use_embedded_menu` | @@ -669,6 +677,18 @@ If ``true``, automatically switches to the **Remote** scene tree when running th ---- +.. _class_EditorSettings_property_debugger/profile_native_calls: + +.. rst-class:: classref-property + +:ref:`bool` **debugger/profile_native_calls** + +If ``true``, enables collection of profiling data from non-GDScript Godot functions, such as engine class methods. Enabling this slows execution while profiling further. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_debugger/profiler_frame_history_size: .. rst-class:: classref-property @@ -1735,6 +1755,48 @@ The program that opens raster image files when clicking "Open in External Progra ---- +.. _class_EditorSettings_property_filesystem/external_programs/terminal_emulator: + +.. rst-class:: classref-property + +:ref:`String` **filesystem/external_programs/terminal_emulator** + +The terminal emulator program to use when using **Open in Terminal** context menu action in the FileSystem dock. You can enter an absolute path to a program binary, or a path to a program that is present in the ``PATH`` environment variable. + +If left empty, Godot will use the default terminal emulator for the system: + +- **Windows:** PowerShell + +- **macOS:** Terminal.app + +- **Linux:** The first terminal found on the system in this order: gnome-terminal, konsole, xfce4-terminal, lxterminal, kitty, alacritty, urxvt, xterm. + +To use Command Prompt (cmd) instead of PowerShell on Windows, enter ``cmd`` in this field and the correct flags will automatically be used. + +On macOS, make sure to point to the actual program binary located within the ``Programs/MacOS`` folder of the .app bundle, rather than the .app bundle directory. + +If specifying a custom terminal emulator, you may need to override :ref:`filesystem/external_programs/terminal_emulator_flags` so it opens in the correct folder. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_filesystem/external_programs/terminal_emulator_flags: + +.. rst-class:: classref-property + +:ref:`String` **filesystem/external_programs/terminal_emulator_flags** + +The command-line arguments to pass to the terminal emulator that is run when using **Open in Terminal** context menu action in the FileSystem dock. See also :ref:`filesystem/external_programs/terminal_emulator`. + +If left empty, the default flags are ``{directory}``, which is replaced by the absolute path to the directory that is being opened in the terminal. + +\ **Note:** If the terminal emulator is set to PowerShell, cmd, or Konsole, Godot will automatically prepend arguments to this list, as these terminals require nonstandard arguments to open in the correct folder. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_filesystem/external_programs/vector_image_editor: .. rst-class:: classref-property @@ -2229,6 +2291,18 @@ If ``true``, embed modal windows such as docks inside the main editor window. Wh ---- +.. _class_EditorSettings_property_interface/editor/ui_layout_direction: + +.. rst-class:: classref-property + +:ref:`int` **interface/editor/ui_layout_direction** + +Editor UI default layout direction. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_interface/editor/unfocused_low_processor_mode_sleep_usec: .. rst-class:: classref-property @@ -2485,9 +2559,9 @@ The icon and font color scheme to use in the editor. - **Auto** determines the color scheme to use automatically based on :ref:`interface/theme/base_color`. -- **Dark** makes fonts and icons light (suitable for dark themes). +- **Dark** makes fonts and icons dark (suitable for light themes). Icon colors are automatically converted by the editor following the set of rules defined in `this file `__. -- **Light** makes fonts and icons dark (suitable for light themes). Icon colors are automatically converted by the editor following `this set of rules `__. +- **Light** makes fonts and icons light (suitable for dark themes). .. rst-class:: classref-item-separator diff --git a/classes/class_engine.rst b/classes/class_engine.rst index 632de147e18..438bf0a22c6 100644 --- a/classes/class_engine.rst +++ b/classes/class_engine.rst @@ -228,6 +228,10 @@ If ``false``, stops printing error and warning messages to the console and edito Controls how fast or slow the in-game clock ticks versus the real life one. It defaults to 1.0. A value of 2.0 means the game moves twice as fast as real life, whilst a value of 0.5 means the game moves at half the regular speed. This also affects :ref:`Timer` and :ref:`SceneTreeTimer` (see :ref:`SceneTree.create_timer` for how to control this). +\ **Note:** This does not affect audio playback speed. Use :ref:`AudioServer.playback_speed_scale` to adjust audio playback speed independently of :ref:`time_scale`. + +\ **Note:** This does not automatically adjust :ref:`physics_ticks_per_second`, which means that with time scales above 1.0, physics simulation may become less precise (as each physics tick will stretch over a larger period of engine time). If you're using :ref:`time_scale` to speed up simulation by a large factor, consider increasing :ref:`physics_ticks_per_second` as well to improve physics reliability. + .. rst-class:: classref-section-separator ---- diff --git a/classes/class_gpuparticles2d.rst b/classes/class_gpuparticles2d.rst index 541020cbb53..b1f43904827 100644 --- a/classes/class_gpuparticles2d.rst +++ b/classes/class_gpuparticles2d.rst @@ -692,6 +692,8 @@ void **emit_particle** **(** :ref:`Transform2D` xform, :ref:` Emits a single particle. Whether ``xform``, ``velocity``, ``color`` and ``custom`` are applied depends on the value of ``flags``. See :ref:`EmitFlags`. +The default ParticleProcessMaterial will overwrite ``color`` and use the contents of ``custom`` as ``(rotation, age, animation, lifetime)``. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_gpuparticles3d.rst b/classes/class_gpuparticles3d.rst index 1266893fc5e..1891fa6e040 100644 --- a/classes/class_gpuparticles3d.rst +++ b/classes/class_gpuparticles3d.rst @@ -843,6 +843,8 @@ void **emit_particle** **(** :ref:`Transform3D` xform, :ref:` Emits a single particle. Whether ``xform``, ``velocity``, ``color`` and ``custom`` are applied depends on the value of ``flags``. See :ref:`EmitFlags`. +The default ParticleProcessMaterial will overwrite ``color`` and use the contents of ``custom`` as ``(rotation, age, animation, lifetime)``. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_graphedit.rst b/classes/class_graphedit.rst index 56ba0cb75c6..fa6e6e86b99 100644 --- a/classes/class_graphedit.rst +++ b/classes/class_graphedit.rst @@ -44,6 +44,8 @@ Properties +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`GridPattern` | :ref:`grid_pattern` | ``0`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`minimap_enabled` | ``true`` | +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`float` | :ref:`minimap_opacity` | ``0.65`` | @@ -409,6 +411,32 @@ enum **PanningScheme**: :kbd:`Mouse Wheel` will move the view, :kbd:`Ctrl + Mouse Wheel` will zoom. +.. rst-class:: classref-item-separator + +---- + +.. _enum_GraphEdit_GridPattern: + +.. rst-class:: classref-enumeration + +enum **GridPattern**: + +.. _class_GraphEdit_constant_GRID_PATTERN_LINES: + +.. rst-class:: classref-enumeration-constant + +:ref:`GridPattern` **GRID_PATTERN_LINES** = ``0`` + +Draw the grid using solid lines. + +.. _class_GraphEdit_constant_GRID_PATTERN_DOTS: + +.. rst-class:: classref-enumeration-constant + +:ref:`GridPattern` **GRID_PATTERN_DOTS** = ``1`` + +Draw the grid using dots. + .. rst-class:: classref-section-separator ---- @@ -469,6 +497,23 @@ The thickness of the lines between the nodes. ---- +.. _class_GraphEdit_property_grid_pattern: + +.. rst-class:: classref-property + +:ref:`GridPattern` **grid_pattern** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_grid_pattern** **(** :ref:`GridPattern` value **)** +- :ref:`GridPattern` **get_grid_pattern** **(** **)** + +The pattern used for drawing the grid. + +.. rst-class:: classref-item-separator + +---- + .. _class_GraphEdit_property_minimap_enabled: .. rst-class:: classref-property @@ -1010,7 +1055,7 @@ Returns the points which would make up a connection between ``from_node`` and `` :ref:`Dictionary[]` **get_connection_list** **(** **)** |const| -Returns an Array containing the list of connections. A connection consists in a structure of the form ``{ from_port: 0, from: "GraphNode name 0", to_port: 1, to: "GraphNode name 1" }``. +Returns an Array containing the list of connections. A connection consists in a structure of the form ``{ from_port: 0, from_node: "GraphNode name 0", to_port: 1, to_node: "GraphNode name 1" }``. .. rst-class:: classref-item-separator @@ -1141,7 +1186,7 @@ Color of the connection's activity (see :ref:`set_connection_activity` **grid_major** = ``Color(1, 1, 1, 0.2)`` -Color of major grid lines. +Color of major grid lines/dots. .. rst-class:: classref-item-separator @@ -1153,7 +1198,7 @@ Color of major grid lines. :ref:`Color` **grid_minor** = ``Color(1, 1, 1, 0.05)`` -Color of minor grid lines. +Color of minor grid lines/dots. .. rst-class:: classref-item-separator diff --git a/classes/class_input.rst b/classes/class_input.rst index b36ec486987..62b77b82306 100644 --- a/classes/class_input.rst +++ b/classes/class_input.rst @@ -42,11 +42,15 @@ Properties .. table:: :widths: auto - +----------------------------------------+--------------------------------------------------------------------------+ - | :ref:`MouseMode` | :ref:`mouse_mode` | - +----------------------------------------+--------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`use_accumulated_input` | - +----------------------------------------+--------------------------------------------------------------------------+ + +----------------------------------------+--------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`emulate_mouse_from_touch` | + +----------------------------------------+--------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`emulate_touch_from_mouse` | + +----------------------------------------+--------------------------------------------------------------------------------+ + | :ref:`MouseMode` | :ref:`mouse_mode` | + +----------------------------------------+--------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`use_accumulated_input` | + +----------------------------------------+--------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -379,6 +383,40 @@ Help cursor. Usually a question mark. Property Descriptions --------------------- +.. _class_Input_property_emulate_mouse_from_touch: + +.. rst-class:: classref-property + +:ref:`bool` **emulate_mouse_from_touch** + +.. rst-class:: classref-property-setget + +- void **set_emulate_mouse_from_touch** **(** :ref:`bool` value **)** +- :ref:`bool` **is_emulating_mouse_from_touch** **(** **)** + +If ``true``, sends mouse input events when tapping or swiping on the touchscreen. See also :ref:`ProjectSettings.input_devices/pointing/emulate_mouse_from_touch`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Input_property_emulate_touch_from_mouse: + +.. rst-class:: classref-property + +:ref:`bool` **emulate_touch_from_mouse** + +.. rst-class:: classref-property-setget + +- void **set_emulate_touch_from_mouse** **(** :ref:`bool` value **)** +- :ref:`bool` **is_emulating_touch_from_mouse** **(** **)** + +If ``true``, sends touch input events when clicking or dragging the mouse. See also :ref:`ProjectSettings.input_devices/pointing/emulate_touch_from_mouse`. + +.. rst-class:: classref-item-separator + +---- + .. _class_Input_property_mouse_mode: .. rst-class:: classref-property diff --git a/classes/class_label.rst b/classes/class_label.rst index a2fc0ea1187..c1fc10a8678 100644 --- a/classes/class_label.rst +++ b/classes/class_label.rst @@ -41,6 +41,8 @@ Properties +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`clip_text` | ``false`` | +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`ellipsis_char` | ``"…"`` | + +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ | :ref:`HorizontalAlignment` | :ref:`horizontal_alignment` | ``0`` | +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ | |bitfield|\<:ref:`JustificationFlag`\> | :ref:`justification_flags` | ``163`` | @@ -88,15 +90,17 @@ Methods .. table:: :widths: auto - +-----------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_line_count` **(** **)** |const| | - +-----------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_line_height` **(** :ref:`int` line=-1 **)** |const| | - +-----------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_total_character_count` **(** **)** |const| | - +-----------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_visible_line_count` **(** **)** |const| | - +-----------------------+--------------------------------------------------------------------------------------------------------------+ + +---------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`get_character_bounds` **(** :ref:`int` pos **)** |const| | + +---------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_line_count` **(** **)** |const| | + +---------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_line_height` **(** :ref:`int` line=-1 **)** |const| | + +---------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_total_character_count` **(** **)** |const| | + +---------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_visible_line_count` **(** **)** |const| | + +---------------------------+--------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -173,6 +177,23 @@ If ``true``, the Label only shows the text that fits inside its bounding rectang ---- +.. _class_Label_property_ellipsis_char: + +.. rst-class:: classref-property + +:ref:`String` **ellipsis_char** = ``"…"`` + +.. rst-class:: classref-property-setget + +- void **set_ellipsis_char** **(** :ref:`String` value **)** +- :ref:`String` **get_ellipsis_char** **(** **)** + +Ellipsis character used for text clipping. + +.. rst-class:: classref-item-separator + +---- + .. _class_Label_property_horizontal_alignment: .. rst-class:: classref-property @@ -471,6 +492,18 @@ The fraction of characters to display, relative to the total number of character Method Descriptions ------------------- +.. _class_Label_method_get_character_bounds: + +.. rst-class:: classref-method + +:ref:`Rect2` **get_character_bounds** **(** :ref:`int` pos **)** |const| + +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. + +.. rst-class:: classref-item-separator + +---- + .. _class_Label_method_get_line_count: .. rst-class:: classref-method @@ -586,6 +619,8 @@ Text outline size. \ **Note:** If using a font with :ref:`FontFile.multichannel_signed_distance_field` enabled, its :ref:`FontFile.msdf_pixel_range` must be set to at least *twice* the value of :ref:`outline_size` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. +\ **Note:** Using a value that is larger than half the font size is not recommended, as the font outline may fail to be fully closed in this case. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_multiplayerpeer.rst b/classes/class_multiplayerpeer.rst index a526e66186f..0dd972b71bf 100644 --- a/classes/class_multiplayerpeer.rst +++ b/classes/class_multiplayerpeer.rst @@ -344,7 +344,7 @@ Returns the channel over which the next available packet was received. See :ref: :ref:`TransferMode` **get_packet_mode** **(** **)** |const| -Returns the :ref:`TransferMode` the remote peer used to send the next available packet. See :ref:`PacketPeer.get_available_packet_count`. +Returns the transfer mode the remote peer used to send the next available packet. See :ref:`PacketPeer.get_available_packet_count`. .. rst-class:: classref-item-separator diff --git a/classes/class_multiplayerpeerextension.rst b/classes/class_multiplayerpeerextension.rst index 2cbbcade068..281547621fd 100644 --- a/classes/class_multiplayerpeerextension.rst +++ b/classes/class_multiplayerpeerextension.rst @@ -176,7 +176,7 @@ Called to get the channel over which the next available packet was received. See :ref:`TransferMode` **_get_packet_mode** **(** **)** |virtual| |const| -Called to get the :ref:`TransferMode` the remote peer used to send the next available packet. See :ref:`MultiplayerPeer.get_packet_mode`. +Called to get the transfer mode the remote peer used to send the next available packet. See :ref:`MultiplayerPeer.get_packet_mode`. .. rst-class:: classref-item-separator diff --git a/classes/class_navigationagent2d.rst b/classes/class_navigationagent2d.rst index c9dbd0af47a..8a3e1024762 100644 --- a/classes/class_navigationagent2d.rst +++ b/classes/class_navigationagent2d.rst @@ -153,7 +153,7 @@ Signals **link_reached** **(** :ref:`Dictionary` details **)** -Notifies when a navigation link has been reached. +Signals that the agent reached a navigation link. Emitted when the agent moves within :ref:`path_desired_distance` of the next position of the path when that position is a navigation link. The details dictionary may contain the following keys depending on the value of :ref:`path_metadata_flags`: @@ -179,7 +179,9 @@ The details dictionary may contain the following keys depending on the value of **navigation_finished** **(** **)** -Emitted once per loaded path when the agent internal navigation path index reaches the last index of the loaded path array. The agent internal navigation path index can be received with :ref:`get_current_navigation_path_index`. +Signals that the agent's navigation has finished. If the target is reachable, navigation ends when the target is reached. If the target is unreachable, navigation ends when the last waypoint of the path is reached. This signal is emitted only once per loaded path. + +This signal will be emitted just after :ref:`target_reached` when the target is reachable. .. rst-class:: classref-item-separator @@ -209,7 +211,11 @@ Emitted when the agent had to update the loaded path: **target_reached** **(** **)** -Emitted once per loaded path when the agent's global position is the first time within :ref:`target_desired_distance` to the :ref:`target_position`. +Signals that the agent reached the target, i.e. the agent moved within :ref:`target_desired_distance` of the :ref:`target_position`. This signal is emitted only once per loaded path. + +This signal will be emitted just before :ref:`navigation_finished` when the target is reachable. + +It may not always be possible to reach the target but it should always be possible to reach the final position. See :ref:`get_final_position`. .. rst-class:: classref-item-separator @@ -233,7 +239,7 @@ Notifies when the collision avoidance velocity is calculated. Emitted when :ref: **waypoint_reached** **(** :ref:`Dictionary` details **)** -Notifies when a waypoint along the path has been reached. +Signals that the agent reached a waypoint. Emitted when the agent moves within :ref:`path_desired_distance` of the next position of the path. The details dictionary may contain the following keys depending on the value of :ref:`path_metadata_flags`: @@ -486,7 +492,7 @@ The distance to search for other agents. - void **set_path_desired_distance** **(** :ref:`float` value **)** - :ref:`float` **get_path_desired_distance** **(** **)** -The distance threshold before a path point is considered to be reached. This allows agents to not have to hit a path point on the path exactly, but only to reach its general area. If this value is set too high, the NavigationAgent will skip points on the path, which can lead to leaving the navigation mesh. If this value is set too low, the NavigationAgent will be stuck in a repath loop because it will constantly overshoot or undershoot the distance to the next point on each physics frame update. +The distance threshold before a path point is considered to be reached. This allows agents to not have to hit a path point on the path exactly, but only to reach its general area. If this value is set too high, the NavigationAgent will skip points on the path, which can lead to it leaving the navigation mesh. If this value is set too low, the NavigationAgent will be stuck in a repath loop because it will constantly overshoot the distance to the next point on each physics frame update. .. rst-class:: classref-item-separator @@ -590,7 +596,11 @@ Does not affect normal pathfinding. To change an actor's pathfinding radius bake - void **set_target_desired_distance** **(** :ref:`float` value **)** - :ref:`float` **get_target_desired_distance** **(** **)** -The distance threshold before the final target point is considered to be reached. This allows agents to not have to hit the point of the final target exactly, but only to reach its general area. If this value is set too low, the NavigationAgent will be stuck in a repath loop because it will constantly overshoot or undershoot the distance to the final target point on each physics frame update. +The distance threshold before the target is considered to be reached. On reaching the target, :ref:`target_reached` is emitted and navigation ends (see :ref:`is_navigation_finished` and :ref:`navigation_finished`). + +You can make navigation end early by setting this property to a value greater than :ref:`path_desired_distance` (navigation will end before reaching the last waypoint). + +You can also make navigation end closer to the target than each individual path position by setting this property to a value lower than :ref:`path_desired_distance` (navigation won't immediately end when reaching the last waypoint). However, if the value set is too low, the agent will be stuck in a repath loop because it will constantly overshoot the distance to the target on each physics frame update. .. rst-class:: classref-item-separator @@ -807,9 +817,9 @@ Returns the :ref:`RID` of this agent on the :ref:`NavigationServer2D< :ref:`bool` **is_navigation_finished** **(** **)** -Returns ``true`` if the end of the currently loaded navigation path has been reached. +Returns ``true`` if the agent's navigation has finished. If the target is reachable, navigation ends when the target is reached. If the target is unreachable, navigation ends when the last waypoint of the path is reached. -\ **Note:** While true prefer to stop calling update functions like :ref:`get_next_path_position`. This avoids jittering the standing agent due to calling repeated path updates. +\ **Note:** While ``true`` prefer to stop calling update functions like :ref:`get_next_path_position`. This avoids jittering the standing agent due to calling repeated path updates. .. rst-class:: classref-item-separator @@ -833,7 +843,7 @@ Returns ``true`` if :ref:`get_final_position` **is_target_reached** **(** **)** |const| -Returns true if :ref:`target_position` is reached. It may not always be possible to reach the target position. It should always be possible to reach the final position though. See :ref:`get_final_position`. +Returns ``true`` if the agent reached the target, i.e. the agent moved within :ref:`target_desired_distance` of the :ref:`target_position`. It may not always be possible to reach the target but it should always be possible to reach the final position. See :ref:`get_final_position`. .. rst-class:: classref-item-separator diff --git a/classes/class_navigationagent3d.rst b/classes/class_navigationagent3d.rst index abcba3bae7d..b15e59a97dc 100644 --- a/classes/class_navigationagent3d.rst +++ b/classes/class_navigationagent3d.rst @@ -159,7 +159,7 @@ Signals **link_reached** **(** :ref:`Dictionary` details **)** -Notifies when a navigation link has been reached. +Signals that the agent reached a navigation link. Emitted when the agent moves within :ref:`path_desired_distance` of the next position of the path when that position is a navigation link. The details dictionary may contain the following keys depending on the value of :ref:`path_metadata_flags`: @@ -185,7 +185,9 @@ The details dictionary may contain the following keys depending on the value of **navigation_finished** **(** **)** -Emitted once per loaded path when the agent internal navigation path index reaches the last index of the loaded path array. The agent internal navigation path index can be received with :ref:`get_current_navigation_path_index`. +Signals that the agent's navigation has finished. If the target is reachable, navigation ends when the target is reached. If the target is unreachable, navigation ends when the last waypoint of the path is reached. This signal is emitted only once per loaded path. + +This signal will be emitted just after :ref:`target_reached` when the target is reachable. .. rst-class:: classref-item-separator @@ -215,7 +217,11 @@ Emitted when the agent had to update the loaded path: **target_reached** **(** **)** -Emitted once per loaded path when the agent's global position is the first time within :ref:`target_desired_distance` to the :ref:`target_position`. +Signals that the agent reached the target, i.e. the agent moved within :ref:`target_desired_distance` of the :ref:`target_position`. This signal is emitted only once per loaded path. + +This signal will be emitted just before :ref:`navigation_finished` when the target is reachable. + +It may not always be possible to reach the target but it should always be possible to reach the final position. See :ref:`get_final_position`. .. rst-class:: classref-item-separator @@ -239,7 +245,7 @@ Notifies when the collision avoidance velocity is calculated. Emitted when :ref: **waypoint_reached** **(** :ref:`Dictionary` details **)** -Notifies when a waypoint along the path has been reached. +Signals that the agent reached a waypoint. Emitted when the agent moves within :ref:`path_desired_distance` of the next position of the path. The details dictionary may contain the following keys depending on the value of :ref:`path_metadata_flags`: @@ -509,7 +515,7 @@ The distance to search for other agents. - void **set_path_desired_distance** **(** :ref:`float` value **)** - :ref:`float` **get_path_desired_distance** **(** **)** -The distance threshold before a path point is considered to be reached. This allows agents to not have to hit a path point on the path exactly, but only to reach its general area. If this value is set too high, the NavigationAgent will skip points on the path, which can lead to leaving the navigation mesh. If this value is set too low, the NavigationAgent will be stuck in a repath loop because it will constantly overshoot or undershoot the distance to the next point on each physics frame update. +The distance threshold before a path point is considered to be reached. This allows agents to not have to hit a path point on the path exactly, but only to reach its general area. If this value is set too high, the NavigationAgent will skip points on the path, which can lead to it leaving the navigation mesh. If this value is set too low, the NavigationAgent will be stuck in a repath loop because it will constantly overshoot the distance to the next point on each physics frame update. .. rst-class:: classref-item-separator @@ -630,7 +636,11 @@ Does not affect normal pathfinding. To change an actor's pathfinding radius bake - void **set_target_desired_distance** **(** :ref:`float` value **)** - :ref:`float` **get_target_desired_distance** **(** **)** -The distance threshold before the final target point is considered to be reached. This allows agents to not have to hit the point of the final target exactly, but only to reach its general area. If this value is set too low, the NavigationAgent will be stuck in a repath loop because it will constantly overshoot or undershoot the distance to the final target point on each physics frame update. +The distance threshold before the target is considered to be reached. On reaching the target, :ref:`target_reached` is emitted and navigation ends (see :ref:`is_navigation_finished` and :ref:`navigation_finished`). + +You can make navigation end early by setting this property to a value greater than :ref:`path_desired_distance` (navigation will end before reaching the last waypoint). + +You can also make navigation end closer to the target than each individual path position by setting this property to a value lower than :ref:`path_desired_distance` (navigation won't immediately end when reaching the last waypoint). However, if the value set is too low, the agent will be stuck in a repath loop because it will constantly overshoot the distance to the target on each physics frame update. .. rst-class:: classref-item-separator @@ -866,9 +876,9 @@ Returns the :ref:`RID` of this agent on the :ref:`NavigationServer3D< :ref:`bool` **is_navigation_finished** **(** **)** -Returns ``true`` if the end of the currently loaded navigation path has been reached. +Returns ``true`` if the agent's navigation has finished. If the target is reachable, navigation ends when the target is reached. If the target is unreachable, navigation ends when the last waypoint of the path is reached. -\ **Note:** While true prefer to stop calling update functions like :ref:`get_next_path_position`. This avoids jittering the standing agent due to calling repeated path updates. +\ **Note:** While ``true`` prefer to stop calling update functions like :ref:`get_next_path_position`. This avoids jittering the standing agent due to calling repeated path updates. .. rst-class:: classref-item-separator @@ -892,7 +902,7 @@ Returns ``true`` if :ref:`get_final_position` **is_target_reached** **(** **)** |const| -Returns true if :ref:`target_position` is reached. It may not always be possible to reach the target position. It should always be possible to reach the final position though. See :ref:`get_final_position`. +Returns ``true`` if the agent reached the target, i.e. the agent moved within :ref:`target_desired_distance` of the :ref:`target_position`. It may not always be possible to reach the target but it should always be possible to reach the final position. See :ref:`get_final_position`. .. rst-class:: classref-item-separator diff --git a/classes/class_navigationlink2d.rst b/classes/class_navigationlink2d.rst index d7da9c51b34..b1c02aa3997 100644 --- a/classes/class_navigationlink2d.rst +++ b/classes/class_navigationlink2d.rst @@ -67,6 +67,8 @@ Methods +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`get_navigation_layer_value` **(** :ref:`int` layer_number **)** |const| | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_rid` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_global_end_position` **(** :ref:`Vector2` position **)** | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_global_start_position` **(** :ref:`Vector2` position **)** | @@ -251,6 +253,18 @@ Returns whether or not the specified layer of the :ref:`navigation_layers` **get_rid** **(** **)** |const| + +Returns the :ref:`RID` of this link on the :ref:`NavigationServer2D`. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationLink2D_method_set_global_end_position: .. rst-class:: classref-method diff --git a/classes/class_navigationlink3d.rst b/classes/class_navigationlink3d.rst index 9ed2fb436cd..6b9e96b0e5e 100644 --- a/classes/class_navigationlink3d.rst +++ b/classes/class_navigationlink3d.rst @@ -67,6 +67,8 @@ Methods +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`get_navigation_layer_value` **(** :ref:`int` layer_number **)** |const| | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_rid` **(** **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_global_end_position` **(** :ref:`Vector3` position **)** | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_global_start_position` **(** :ref:`Vector3` position **)** | @@ -251,6 +253,18 @@ Returns whether or not the specified layer of the :ref:`navigation_layers` **get_rid** **(** **)** |const| + +Returns the :ref:`RID` of this link on the :ref:`NavigationServer3D`. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationLink3D_method_set_global_end_position: .. rst-class:: classref-method diff --git a/classes/class_navigationregion2d.rst b/classes/class_navigationregion2d.rst index 23624ff31ce..860ed9d6adf 100644 --- a/classes/class_navigationregion2d.rst +++ b/classes/class_navigationregion2d.rst @@ -85,6 +85,8 @@ Methods +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`get_region_rid` **(** **)** |const| | +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_rid` **(** **)** |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_avoidance_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_navigation_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | @@ -327,6 +329,20 @@ Returns the current navigation map :ref:`RID` used by this region. :ref:`RID` **get_region_rid** **(** **)** |const| +Returns the :ref:`RID` of this region on the :ref:`NavigationServer2D`. + +\ *Deprecated.* Use :ref:`get_rid` instead. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationRegion2D_method_get_rid: + +.. rst-class:: classref-method + +:ref:`RID` **get_rid** **(** **)** |const| + Returns the :ref:`RID` of this region on the :ref:`NavigationServer2D`. Combined with :ref:`NavigationServer2D.map_get_closest_point_owner` can be used to identify the **NavigationRegion2D** closest to a point on the merged navigation map. .. rst-class:: classref-item-separator diff --git a/classes/class_navigationregion3d.rst b/classes/class_navigationregion3d.rst index d600a0f937d..7133ffcbdde 100644 --- a/classes/class_navigationregion3d.rst +++ b/classes/class_navigationregion3d.rst @@ -79,6 +79,8 @@ Methods +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`get_region_rid` **(** **)** |const| | +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_rid` **(** **)** |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_navigation_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_navigation_map` **(** :ref:`RID` navigation_map **)** | @@ -271,6 +273,20 @@ Returns the current navigation map :ref:`RID` used by this region. :ref:`RID` **get_region_rid** **(** **)** |const| +Returns the :ref:`RID` of this region on the :ref:`NavigationServer3D`. + +\ *Deprecated.* Use :ref:`get_rid` instead. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationRegion3D_method_get_rid: + +.. rst-class:: classref-method + +:ref:`RID` **get_rid** **(** **)** |const| + Returns the :ref:`RID` of this region on the :ref:`NavigationServer3D`. Combined with :ref:`NavigationServer3D.map_get_closest_point_owner` can be used to identify the **NavigationRegion3D** closest to a point on the merged navigation map. .. rst-class:: classref-item-separator diff --git a/classes/class_navigationserver2d.rst b/classes/class_navigationserver2d.rst index 19efc01bb7a..1c4d067cb62 100644 --- a/classes/class_navigationserver2d.rst +++ b/classes/class_navigationserver2d.rst @@ -57,10 +57,34 @@ Methods +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`agent_get_avoidance_enabled` **(** :ref:`RID` agent **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`agent_get_avoidance_layers` **(** :ref:`RID` agent **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`agent_get_avoidance_mask` **(** :ref:`RID` agent **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`agent_get_avoidance_priority` **(** :ref:`RID` agent **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`agent_get_map` **(** :ref:`RID` agent **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`agent_get_max_neighbors` **(** :ref:`RID` agent **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`agent_get_max_speed` **(** :ref:`RID` agent **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`agent_get_neighbor_distance` **(** :ref:`RID` agent **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`agent_get_paused` **(** :ref:`RID` agent **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`agent_get_position` **(** :ref:`RID` agent **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`agent_get_radius` **(** :ref:`RID` agent **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`agent_get_time_horizon_agents` **(** :ref:`RID` agent **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`agent_get_time_horizon_obstacles` **(** :ref:`RID` agent **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`agent_get_velocity` **(** :ref:`RID` agent **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`agent_has_avoidance_callback` **(** :ref:`RID` agent **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`agent_is_map_changed` **(** :ref:`RID` agent **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`agent_set_avoidance_callback` **(** :ref:`RID` agent, :ref:`Callable` callback **)** | @@ -165,6 +189,8 @@ Methods +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedVector2Array` | :ref:`map_get_path` **(** :ref:`RID` map, :ref:`Vector2` origin, :ref:`Vector2` destination, :ref:`bool` optimize, :ref:`int` navigation_layers=1 **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`map_get_random_point` **(** :ref:`RID` map, :ref:`int` navigation_layers, :ref:`bool` uniformly **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID[]` | :ref:`map_get_regions` **(** :ref:`RID` map **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`map_get_use_edge_connections` **(** :ref:`RID` map **)** |const| | @@ -185,10 +211,20 @@ Methods +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`obstacle_get_avoidance_enabled` **(** :ref:`RID` obstacle **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`obstacle_get_avoidance_layers` **(** :ref:`RID` obstacle **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`obstacle_get_map` **(** :ref:`RID` obstacle **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`obstacle_get_paused` **(** :ref:`RID` obstacle **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`obstacle_get_position` **(** :ref:`RID` obstacle **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`obstacle_get_radius` **(** :ref:`RID` obstacle **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`obstacle_get_velocity` **(** :ref:`RID` obstacle **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`obstacle_get_vertices` **(** :ref:`RID` obstacle **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`obstacle_set_avoidance_enabled` **(** :ref:`RID` obstacle, :ref:`bool` enabled **)** | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`obstacle_set_avoidance_layers` **(** :ref:`RID` obstacle, :ref:`int` layers **)** | @@ -227,6 +263,10 @@ Methods +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`region_get_owner_id` **(** :ref:`RID` region **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`region_get_random_point` **(** :ref:`RID` region, :ref:`int` navigation_layers, :ref:`bool` uniformly **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`region_get_transform` **(** :ref:`RID` region **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`region_get_travel_cost` **(** :ref:`RID` region **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`region_get_use_edge_connections` **(** :ref:`RID` region **)** |const| | @@ -316,6 +356,42 @@ Return ``true`` if the specified ``agent`` uses avoidance. ---- +.. _class_NavigationServer2D_method_agent_get_avoidance_layers: + +.. rst-class:: classref-method + +:ref:`int` **agent_get_avoidance_layers** **(** :ref:`RID` agent **)** |const| + +Returns the ``avoidance_layers`` bitmask of the specified ``agent``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_agent_get_avoidance_mask: + +.. rst-class:: classref-method + +:ref:`int` **agent_get_avoidance_mask** **(** :ref:`RID` agent **)** |const| + +Returns the ``avoidance_mask`` bitmask of the specified ``agent``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_agent_get_avoidance_priority: + +.. rst-class:: classref-method + +:ref:`float` **agent_get_avoidance_priority** **(** :ref:`RID` agent **)** |const| + +Returns the ``avoidance_priority`` of the specified ``agent``. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer2D_method_agent_get_map: .. rst-class:: classref-method @@ -328,6 +404,42 @@ Returns the navigation map :ref:`RID` the requested ``agent`` is curr ---- +.. _class_NavigationServer2D_method_agent_get_max_neighbors: + +.. rst-class:: classref-method + +:ref:`int` **agent_get_max_neighbors** **(** :ref:`RID` agent **)** |const| + +Returns the maximum number of other agents the specified ``agent`` takes into account in the navigation. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_agent_get_max_speed: + +.. rst-class:: classref-method + +:ref:`float` **agent_get_max_speed** **(** :ref:`RID` agent **)** |const| + +Returns the maximum speed of the specified ``agent``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_agent_get_neighbor_distance: + +.. rst-class:: classref-method + +:ref:`float` **agent_get_neighbor_distance** **(** :ref:`RID` agent **)** |const| + +Returns the maximum distance to other agents the specified ``agent`` takes into account in the navigation. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer2D_method_agent_get_paused: .. rst-class:: classref-method @@ -340,6 +452,78 @@ Returns ``true`` if the specified ``agent`` is paused. ---- +.. _class_NavigationServer2D_method_agent_get_position: + +.. rst-class:: classref-method + +:ref:`Vector2` **agent_get_position** **(** :ref:`RID` agent **)** |const| + +Returns the position of the specified ``agent`` in world space. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_agent_get_radius: + +.. rst-class:: classref-method + +:ref:`float` **agent_get_radius** **(** :ref:`RID` agent **)** |const| + +Returns the radius of the specified ``agent``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_agent_get_time_horizon_agents: + +.. rst-class:: classref-method + +:ref:`float` **agent_get_time_horizon_agents** **(** :ref:`RID` agent **)** |const| + +Returns the minimal amount of time for which the specified ``agent``'s velocities that are computed by the simulation are safe with respect to other agents. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_agent_get_time_horizon_obstacles: + +.. rst-class:: classref-method + +:ref:`float` **agent_get_time_horizon_obstacles** **(** :ref:`RID` agent **)** |const| + +Returns the minimal amount of time for which the specified ``agent``'s velocities that are computed by the simulation are safe with respect to static avoidance obstacles. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_agent_get_velocity: + +.. rst-class:: classref-method + +:ref:`Vector2` **agent_get_velocity** **(** :ref:`RID` agent **)** |const| + +Returns the velocity of the specified ``agent``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_agent_has_avoidance_callback: + +.. rst-class:: classref-method + +:ref:`bool` **agent_has_avoidance_callback** **(** :ref:`RID` agent **)** |const| + +Return ``true`` if the specified ``agent`` has an avoidance callback. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer2D_method_agent_is_map_changed: .. rst-class:: classref-method @@ -974,6 +1158,22 @@ Returns the navigation path to reach the destination from the origin. ``navigati ---- +.. _class_NavigationServer2D_method_map_get_random_point: + +.. rst-class:: classref-method + +:ref:`Vector2` **map_get_random_point** **(** :ref:`RID` map, :ref:`int` navigation_layers, :ref:`bool` uniformly **)** |const| + +Returns a random position picked from all map region polygons with matching ``navigation_layers``. + +If ``uniformly`` is ``true``, all map regions, polygons, and faces are weighted by their surface area (slower). + +If ``uniformly`` is ``false``, just a random region and a random polygon are picked (faster). + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer2D_method_map_get_regions: .. rst-class:: classref-method @@ -1094,6 +1294,18 @@ Returns ``true`` if the provided ``obstacle`` has avoidance enabled. ---- +.. _class_NavigationServer2D_method_obstacle_get_avoidance_layers: + +.. rst-class:: classref-method + +:ref:`int` **obstacle_get_avoidance_layers** **(** :ref:`RID` obstacle **)** |const| + +Returns the ``avoidance_layers`` bitmask of the specified ``obstacle``. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer2D_method_obstacle_get_map: .. rst-class:: classref-method @@ -1118,6 +1330,54 @@ Returns ``true`` if the specified ``obstacle`` is paused. ---- +.. _class_NavigationServer2D_method_obstacle_get_position: + +.. rst-class:: classref-method + +:ref:`Vector2` **obstacle_get_position** **(** :ref:`RID` obstacle **)** |const| + +Returns the position of the specified ``obstacle`` in world space. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_obstacle_get_radius: + +.. rst-class:: classref-method + +:ref:`float` **obstacle_get_radius** **(** :ref:`RID` obstacle **)** |const| + +Returns the radius of the specified dynamic ``obstacle``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_obstacle_get_velocity: + +.. rst-class:: classref-method + +:ref:`Vector2` **obstacle_get_velocity** **(** :ref:`RID` obstacle **)** |const| + +Returns the velocity of the specified dynamic ``obstacle``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_obstacle_get_vertices: + +.. rst-class:: classref-method + +:ref:`PackedVector2Array` **obstacle_get_vertices** **(** :ref:`RID` obstacle **)** |const| + +Returns the outline vertices for the specified ``obstacle``. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer2D_method_obstacle_set_avoidance_enabled: .. rst-class:: classref-method @@ -1350,6 +1610,34 @@ Returns the ``ObjectID`` of the object which manages this region. ---- +.. _class_NavigationServer2D_method_region_get_random_point: + +.. rst-class:: classref-method + +:ref:`Vector2` **region_get_random_point** **(** :ref:`RID` region, :ref:`int` navigation_layers, :ref:`bool` uniformly **)** |const| + +Returns a random position picked from all region polygons with matching ``navigation_layers``. + +If ``uniformly`` is ``true``, all region polygons and faces are weighted by their surface area (slower). + +If ``uniformly`` is ``false``, just a random polygon and face is picked (faster). + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_region_get_transform: + +.. rst-class:: classref-method + +:ref:`Transform2D` **region_get_transform** **(** :ref:`RID` region **)** |const| + +Returns the global transformation of this ``region``. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer2D_method_region_get_travel_cost: .. rst-class:: classref-method diff --git a/classes/class_navigationserver3d.rst b/classes/class_navigationserver3d.rst index 6f1338dff4f..28cf9083e7d 100644 --- a/classes/class_navigationserver3d.rst +++ b/classes/class_navigationserver3d.rst @@ -57,12 +57,38 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`agent_get_avoidance_enabled` **(** :ref:`RID` agent **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`agent_get_avoidance_layers` **(** :ref:`RID` agent **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`agent_get_avoidance_mask` **(** :ref:`RID` agent **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`agent_get_avoidance_priority` **(** :ref:`RID` agent **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`agent_get_height` **(** :ref:`RID` agent **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`agent_get_map` **(** :ref:`RID` agent **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`agent_get_max_neighbors` **(** :ref:`RID` agent **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`agent_get_max_speed` **(** :ref:`RID` agent **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`agent_get_neighbor_distance` **(** :ref:`RID` agent **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`agent_get_paused` **(** :ref:`RID` agent **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`agent_get_position` **(** :ref:`RID` agent **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`agent_get_radius` **(** :ref:`RID` agent **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`agent_get_time_horizon_agents` **(** :ref:`RID` agent **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`agent_get_time_horizon_obstacles` **(** :ref:`RID` agent **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`agent_get_use_3d_avoidance` **(** :ref:`RID` agent **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`agent_get_velocity` **(** :ref:`RID` agent **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`agent_has_avoidance_callback` **(** :ref:`RID` agent **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`agent_is_map_changed` **(** :ref:`RID` agent **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`agent_set_avoidance_callback` **(** :ref:`RID` agent, :ref:`Callable` callback **)** | @@ -179,6 +205,8 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedVector3Array` | :ref:`map_get_path` **(** :ref:`RID` map, :ref:`Vector3` origin, :ref:`Vector3` destination, :ref:`bool` optimize, :ref:`int` navigation_layers=1 **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`map_get_random_point` **(** :ref:`RID` map, :ref:`int` navigation_layers, :ref:`bool` uniformly **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID[]` | :ref:`map_get_regions` **(** :ref:`RID` map **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`map_get_up` **(** :ref:`RID` map **)** |const| | @@ -205,12 +233,24 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`obstacle_get_avoidance_enabled` **(** :ref:`RID` obstacle **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`obstacle_get_avoidance_layers` **(** :ref:`RID` obstacle **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`obstacle_get_height` **(** :ref:`RID` obstacle **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`obstacle_get_map` **(** :ref:`RID` obstacle **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`obstacle_get_paused` **(** :ref:`RID` obstacle **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`obstacle_get_position` **(** :ref:`RID` obstacle **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`obstacle_get_radius` **(** :ref:`RID` obstacle **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`obstacle_get_use_3d_avoidance` **(** :ref:`RID` obstacle **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`obstacle_get_velocity` **(** :ref:`RID` obstacle **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array` | :ref:`obstacle_get_vertices` **(** :ref:`RID` obstacle **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`obstacle_set_avoidance_enabled` **(** :ref:`RID` obstacle, :ref:`bool` enabled **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`obstacle_set_avoidance_layers` **(** :ref:`RID` obstacle, :ref:`int` layers **)** | @@ -255,6 +295,10 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`region_get_owner_id` **(** :ref:`RID` region **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`region_get_random_point` **(** :ref:`RID` region, :ref:`int` navigation_layers, :ref:`bool` uniformly **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`region_get_transform` **(** :ref:`RID` region **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`region_get_travel_cost` **(** :ref:`RID` region **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`region_get_use_edge_connections` **(** :ref:`RID` region **)** |const| | @@ -445,6 +489,54 @@ Returns ``true`` if the provided ``agent`` has avoidance enabled. ---- +.. _class_NavigationServer3D_method_agent_get_avoidance_layers: + +.. rst-class:: classref-method + +:ref:`int` **agent_get_avoidance_layers** **(** :ref:`RID` agent **)** |const| + +Returns the ``avoidance_layers`` bitmask of the specified ``agent``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_agent_get_avoidance_mask: + +.. rst-class:: classref-method + +:ref:`int` **agent_get_avoidance_mask** **(** :ref:`RID` agent **)** |const| + +Returns the ``avoidance_mask`` bitmask of the specified ``agent``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_agent_get_avoidance_priority: + +.. rst-class:: classref-method + +:ref:`float` **agent_get_avoidance_priority** **(** :ref:`RID` agent **)** |const| + +Returns the ``avoidance_priority`` of the specified ``agent``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_agent_get_height: + +.. rst-class:: classref-method + +:ref:`float` **agent_get_height** **(** :ref:`RID` agent **)** |const| + +Returns the ``height`` of the specified ``agent``. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer3D_method_agent_get_map: .. rst-class:: classref-method @@ -457,6 +549,42 @@ Returns the navigation map :ref:`RID` the requested ``agent`` is curr ---- +.. _class_NavigationServer3D_method_agent_get_max_neighbors: + +.. rst-class:: classref-method + +:ref:`int` **agent_get_max_neighbors** **(** :ref:`RID` agent **)** |const| + +Returns the maximum number of other agents the specified ``agent`` takes into account in the navigation. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_agent_get_max_speed: + +.. rst-class:: classref-method + +:ref:`float` **agent_get_max_speed** **(** :ref:`RID` agent **)** |const| + +Returns the maximum speed of the specified ``agent``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_agent_get_neighbor_distance: + +.. rst-class:: classref-method + +:ref:`float` **agent_get_neighbor_distance** **(** :ref:`RID` agent **)** |const| + +Returns the maximum distance to other agents the specified ``agent`` takes into account in the navigation. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer3D_method_agent_get_paused: .. rst-class:: classref-method @@ -469,6 +597,54 @@ Returns ``true`` if the specified ``agent`` is paused. ---- +.. _class_NavigationServer3D_method_agent_get_position: + +.. rst-class:: classref-method + +:ref:`Vector3` **agent_get_position** **(** :ref:`RID` agent **)** |const| + +Returns the position of the specified ``agent`` in world space. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_agent_get_radius: + +.. rst-class:: classref-method + +:ref:`float` **agent_get_radius** **(** :ref:`RID` agent **)** |const| + +Returns the radius of the specified ``agent``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_agent_get_time_horizon_agents: + +.. rst-class:: classref-method + +:ref:`float` **agent_get_time_horizon_agents** **(** :ref:`RID` agent **)** |const| + +Returns the minimal amount of time for which the specified ``agent``'s velocities that are computed by the simulation are safe with respect to other agents. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_agent_get_time_horizon_obstacles: + +.. rst-class:: classref-method + +:ref:`float` **agent_get_time_horizon_obstacles** **(** :ref:`RID` agent **)** |const| + +Returns the minimal amount of time for which the specified ``agent``'s velocities that are computed by the simulation are safe with respect to static avoidance obstacles. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer3D_method_agent_get_use_3d_avoidance: .. rst-class:: classref-method @@ -481,6 +657,30 @@ Returns ``true`` if the provided ``agent`` uses avoidance in 3D space Vector3(x, ---- +.. _class_NavigationServer3D_method_agent_get_velocity: + +.. rst-class:: classref-method + +:ref:`Vector3` **agent_get_velocity** **(** :ref:`RID` agent **)** |const| + +Returns the velocity of the specified ``agent``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_agent_has_avoidance_callback: + +.. rst-class:: classref-method + +:ref:`bool` **agent_has_avoidance_callback** **(** :ref:`RID` agent **)** |const| + +Return ``true`` if the specified ``agent`` has an avoidance callback. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer3D_method_agent_is_map_changed: .. rst-class:: classref-method @@ -1191,6 +1391,22 @@ Returns the navigation path to reach the destination from the origin. ``navigati ---- +.. _class_NavigationServer3D_method_map_get_random_point: + +.. rst-class:: classref-method + +:ref:`Vector3` **map_get_random_point** **(** :ref:`RID` map, :ref:`int` navigation_layers, :ref:`bool` uniformly **)** |const| + +Returns a random position picked from all map region polygons with matching ``navigation_layers``. + +If ``uniformly`` is ``true``, all map regions, polygons, and faces are weighted by their surface area (slower). + +If ``uniformly`` is ``false``, just a random region and a random polygon are picked (faster). + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer3D_method_map_get_regions: .. rst-class:: classref-method @@ -1347,6 +1563,30 @@ Returns ``true`` if the provided ``obstacle`` has avoidance enabled. ---- +.. _class_NavigationServer3D_method_obstacle_get_avoidance_layers: + +.. rst-class:: classref-method + +:ref:`int` **obstacle_get_avoidance_layers** **(** :ref:`RID` obstacle **)** |const| + +Returns the ``avoidance_layers`` bitmask of the specified ``obstacle``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_obstacle_get_height: + +.. rst-class:: classref-method + +:ref:`float` **obstacle_get_height** **(** :ref:`RID` obstacle **)** |const| + +Returns the ``height`` of the specified ``obstacle``. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer3D_method_obstacle_get_map: .. rst-class:: classref-method @@ -1371,6 +1611,30 @@ Returns ``true`` if the specified ``obstacle`` is paused. ---- +.. _class_NavigationServer3D_method_obstacle_get_position: + +.. rst-class:: classref-method + +:ref:`Vector3` **obstacle_get_position** **(** :ref:`RID` obstacle **)** |const| + +Returns the position of the specified ``obstacle`` in world space. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_obstacle_get_radius: + +.. rst-class:: classref-method + +:ref:`float` **obstacle_get_radius** **(** :ref:`RID` obstacle **)** |const| + +Returns the radius of the specified dynamic ``obstacle``. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer3D_method_obstacle_get_use_3d_avoidance: .. rst-class:: classref-method @@ -1383,6 +1647,30 @@ Returns ``true`` if the provided ``obstacle`` uses avoidance in 3D space Vector3 ---- +.. _class_NavigationServer3D_method_obstacle_get_velocity: + +.. rst-class:: classref-method + +:ref:`Vector3` **obstacle_get_velocity** **(** :ref:`RID` obstacle **)** |const| + +Returns the velocity of the specified dynamic ``obstacle``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_obstacle_get_vertices: + +.. rst-class:: classref-method + +:ref:`PackedVector3Array` **obstacle_get_vertices** **(** :ref:`RID` obstacle **)** |const| + +Returns the outline vertices for the specified ``obstacle``. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer3D_method_obstacle_set_avoidance_enabled: .. rst-class:: classref-method @@ -1653,6 +1941,34 @@ Returns the ``ObjectID`` of the object which manages this region. ---- +.. _class_NavigationServer3D_method_region_get_random_point: + +.. rst-class:: classref-method + +:ref:`Vector3` **region_get_random_point** **(** :ref:`RID` region, :ref:`int` navigation_layers, :ref:`bool` uniformly **)** |const| + +Returns a random position picked from all region polygons with matching ``navigation_layers``. + +If ``uniformly`` is ``true``, all region polygons and faces are weighted by their surface area (slower). + +If ``uniformly`` is ``false``, just a random polygon and face is picked (faster). + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_region_get_transform: + +.. rst-class:: classref-method + +:ref:`Transform3D` **region_get_transform** **(** :ref:`RID` region **)** |const| + +Returns the global transformation of this ``region``. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer3D_method_region_get_travel_cost: .. rst-class:: classref-method diff --git a/classes/class_openxrinterface.rst b/classes/class_openxrinterface.rst index d9284235c41..ae5422bbc96 100644 --- a/classes/class_openxrinterface.rst +++ b/classes/class_openxrinterface.rst @@ -557,6 +557,8 @@ The display refresh rate for the current HMD. Only functional if this feature is Enable dynamic foveation adjustment, the interface must be initialized before this is accessible. If enabled foveation will automatically adjusted between low and :ref:`foveation_level`. +\ **Note:** Only works on compatibility renderer. + .. rst-class:: classref-item-separator ---- @@ -574,6 +576,8 @@ Enable dynamic foveation adjustment, the interface must be initialized before th Set foveation level from 0 (off) to 3 (high), the interface must be initialized before this is accessible. +\ **Note:** Only works on compatibility renderer. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_os.rst b/classes/class_os.rst index dd1a56e7484..855b9a91192 100644 --- a/classes/class_os.rst +++ b/classes/class_os.rst @@ -215,6 +215,14 @@ The Vulkan rendering driver. It requires Vulkan 1.0 support and automatically us The OpenGL 3 rendering driver. It uses OpenGL 3.3 Core Profile on desktop platforms, OpenGL ES 3.0 on mobile devices, and WebGL 2.0 on Web. +.. _class_OS_constant_RENDERING_DRIVER_D3D12: + +.. rst-class:: classref-enumeration-constant + +:ref:`RenderingDriver` **RENDERING_DRIVER_D3D12** = ``2`` + +The Direct3D 12 rendering driver. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_panoramaskymaterial.rst b/classes/class_panoramaskymaterial.rst index d1208073531..865d2dfa9cd 100644 --- a/classes/class_panoramaskymaterial.rst +++ b/classes/class_panoramaskymaterial.rst @@ -33,11 +33,13 @@ Properties .. table:: :widths: auto - +-----------------------------------+--------------------------------------------------------------+----------+ - | :ref:`bool` | :ref:`filter` | ``true`` | - +-----------------------------------+--------------------------------------------------------------+----------+ - | :ref:`Texture2D` | :ref:`panorama` | | - +-----------------------------------+--------------------------------------------------------------+----------+ + +-----------------------------------+--------------------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`energy_multiplier` | ``1.0`` | + +-----------------------------------+--------------------------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`filter` | ``true`` | + +-----------------------------------+--------------------------------------------------------------------------------+----------+ + | :ref:`Texture2D` | :ref:`panorama` | | + +-----------------------------------+--------------------------------------------------------------------------------+----------+ .. rst-class:: classref-section-separator @@ -48,6 +50,23 @@ Properties Property Descriptions --------------------- +.. _class_PanoramaSkyMaterial_property_energy_multiplier: + +.. rst-class:: classref-property + +:ref:`float` **energy_multiplier** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_energy_multiplier** **(** :ref:`float` value **)** +- :ref:`float` **get_energy_multiplier** **(** **)** + +The sky's overall brightness multiplier. Higher values result in a brighter sky. + +.. rst-class:: classref-item-separator + +---- + .. _class_PanoramaSkyMaterial_property_filter: .. rst-class:: classref-property diff --git a/classes/class_particleprocessmaterial.rst b/classes/class_particleprocessmaterial.rst index 388999bff1c..1bf60d93f7e 100644 --- a/classes/class_particleprocessmaterial.rst +++ b/classes/class_particleprocessmaterial.rst @@ -227,6 +227,8 @@ Methods .. table:: :widths: auto + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_param` **(** :ref:`Parameter` param **)** |const| | +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_param_max` **(** :ref:`Parameter` param **)** |const| | +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -236,6 +238,8 @@ Methods +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`get_particle_flag` **(** :ref:`ParticleFlags` particle_flag **)** |const| | +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_param` **(** :ref:`Parameter` param, :ref:`Vector2` value **)** | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_param_max` **(** :ref:`Parameter` param, :ref:`float` value **)** | +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_param_min` **(** :ref:`Parameter` param, :ref:`float` value **)** | @@ -2306,6 +2310,20 @@ A pivot point used to calculate radial and orbital velocity of particles. Method Descriptions ------------------- +.. _class_ParticleProcessMaterial_method_get_param: + +.. rst-class:: classref-method + +:ref:`Vector2` **get_param** **(** :ref:`Parameter` param **)** |const| + +Returns the minimum and maximum values of the given ``param`` as a vector. + +The ``x`` component of the returned vector corresponds to minimum and the ``y`` component corresponds to maximum. + +.. rst-class:: classref-item-separator + +---- + .. _class_ParticleProcessMaterial_method_get_param_max: .. rst-class:: classref-method @@ -2354,6 +2372,20 @@ Returns ``true`` if the specified particle flag is enabled. See :ref:`ParticleFl ---- +.. _class_ParticleProcessMaterial_method_set_param: + +.. rst-class:: classref-method + +void **set_param** **(** :ref:`Parameter` param, :ref:`Vector2` value **)** + +Sets the minimum and maximum values of the given ``param``. + +The ``x`` component of the argument vector corresponds to minimum and the ``y`` component corresponds to maximum. + +.. rst-class:: classref-item-separator + +---- + .. _class_ParticleProcessMaterial_method_set_param_max: .. rst-class:: classref-method diff --git a/classes/class_popupmenu.rst b/classes/class_popupmenu.rst index ae8b6dfcd23..1370b9b58cc 100644 --- a/classes/class_popupmenu.rst +++ b/classes/class_popupmenu.rst @@ -37,19 +37,21 @@ Properties .. table:: :widths: auto - +---------------------------+----------------------------------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`allow_search` | ``true`` | - +---------------------------+----------------------------------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`hide_on_checkable_item_selection` | ``true`` | - +---------------------------+----------------------------------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`hide_on_item_selection` | ``true`` | - +---------------------------+----------------------------------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`hide_on_state_item_selection` | ``false`` | - +---------------------------+----------------------------------------------------------------------------------------------------+-----------+ - | :ref:`int` | :ref:`item_count` | ``0`` | - +---------------------------+----------------------------------------------------------------------------------------------------+-----------+ - | :ref:`float` | :ref:`submenu_popup_delay` | ``0.3`` | - +---------------------------+----------------------------------------------------------------------------------------------------+-----------+ + +-----------------------------+----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`allow_search` | ``true`` | + +-----------------------------+----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`hide_on_checkable_item_selection` | ``true`` | + +-----------------------------+----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`hide_on_item_selection` | ``true`` | + +-----------------------------+----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`hide_on_state_item_selection` | ``false`` | + +-----------------------------+----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`item_count` | ``0`` | + +-----------------------------+----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`submenu_popup_delay` | ``0.3`` | + +-----------------------------+----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`String` | :ref:`system_menu_root` | ``""`` | + +-----------------------------+----------------------------------------------------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group @@ -136,6 +138,8 @@ Methods +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_item_shortcut_disabled` **(** :ref:`int` index **)** |const| | +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_system_menu` **(** **)** |const| | + +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`remove_item` **(** :ref:`int` index **)** | +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`scroll_to_item` **(** :ref:`int` index **)** | @@ -425,6 +429,23 @@ The number of items currently in the list. Sets the delay time in seconds for the submenu item to popup on mouse hovering. If the popup menu is added as a child of another (acting as a submenu), it will inherit the delay time of the parent menu item. +.. rst-class:: classref-item-separator + +---- + +.. _class_PopupMenu_property_system_menu_root: + +.. rst-class:: classref-property + +:ref:`String` **system_menu_root** = ``""`` + +.. rst-class:: classref-property-setget + +- void **set_system_menu_root** **(** :ref:`String` value **)** +- :ref:`String` **get_system_menu_root** **(** **)** + +If set to one of the values returned by :ref:`DisplayServer.global_menu_get_system_menu_roots`, this **PopupMenu** is bound to the special system menu. Only one **PopupMenu** can be bound to each special menu at a time. + .. rst-class:: classref-section-separator ---- @@ -946,6 +967,18 @@ Returns ``true`` if the specified item's shortcut is disabled. ---- +.. _class_PopupMenu_method_is_system_menu: + +.. rst-class:: classref-method + +:ref:`bool` **is_system_menu** **(** **)** |const| + +Returns ``true`` if the menu is bound to the special system menu. + +.. rst-class:: classref-item-separator + +---- + .. _class_PopupMenu_method_remove_item: .. rst-class:: classref-method diff --git a/classes/class_proceduralskymaterial.rst b/classes/class_proceduralskymaterial.rst index 33002aeb0ef..8fd0a149810 100644 --- a/classes/class_proceduralskymaterial.rst +++ b/classes/class_proceduralskymaterial.rst @@ -33,6 +33,8 @@ Properties .. table:: :widths: auto + +-----------------------------------+------------------------------------------------------------------------------------------------+--------------------------------------+ + | :ref:`float` | :ref:`energy_multiplier` | ``1.0`` | +-----------------------------------+------------------------------------------------------------------------------------------------+--------------------------------------+ | :ref:`Color` | :ref:`ground_bottom_color` | ``Color(0.2, 0.169, 0.133, 1)`` | +-----------------------------------+------------------------------------------------------------------------------------------------+--------------------------------------+ @@ -70,6 +72,23 @@ Properties Property Descriptions --------------------- +.. _class_ProceduralSkyMaterial_property_energy_multiplier: + +.. rst-class:: classref-property + +:ref:`float` **energy_multiplier** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_energy_multiplier** **(** :ref:`float` value **)** +- :ref:`float` **get_energy_multiplier** **(** **)** + +The sky's overall brightness multiplier. Higher values result in a brighter sky. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProceduralSkyMaterial_property_ground_bottom_color: .. rst-class:: classref-property diff --git a/classes/class_projectsettings.rst b/classes/class_projectsettings.rst index 6236f903fb1..7d9e570ae58 100644 --- a/classes/class_projectsettings.rst +++ b/classes/class_projectsettings.rst @@ -1453,6 +1453,12 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`rendering/renderer/rendering_method.web` | ``"gl_compatibility"`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/rendering_device/d3d12/max_misc_descriptors_per_frame` | ``512`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/rendering_device/d3d12/max_resource_descriptors_per_frame` | ``16384`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/rendering_device/d3d12/max_sampler_descriptors_per_frame` | ``1024`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`rendering/rendering_device/driver` | | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`rendering/rendering_device/driver.android` | | @@ -10628,6 +10634,48 @@ Override for :ref:`rendering/renderer/rendering_method` **rendering/rendering_device/d3d12/max_misc_descriptors_per_frame** = ``512`` + +The number of entries in the miscellaneous descriptors heap the Direct3D 12 rendering driver uses each frame, used for various operations like clearing a texture. + +Depending on the complexity of scenes, this value may be lowered or may need to be raised. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_rendering/rendering_device/d3d12/max_resource_descriptors_per_frame: + +.. rst-class:: classref-property + +:ref:`int` **rendering/rendering_device/d3d12/max_resource_descriptors_per_frame** = ``16384`` + +The number of entries in the resource descriptors heap the Direct3D 12 rendering driver uses each frame, used for most rendering operations. + +Depending on the complexity of scenes, this value may be lowered or may need to be raised. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_rendering/rendering_device/d3d12/max_sampler_descriptors_per_frame: + +.. rst-class:: classref-property + +:ref:`int` **rendering/rendering_device/d3d12/max_sampler_descriptors_per_frame** = ``1024`` + +The number of entries in the sampler descriptors heap the Direct3D 12 rendering driver uses each frame, used for most rendering operations. + +Depending on the complexity of scenes, this value may be lowered or may need to be raised. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_rendering/rendering_device/driver: .. rst-class:: classref-property @@ -11273,6 +11321,8 @@ Specify whether OpenXR should be configured for an HMD or a hand held device. If true and foveation is supported, will automatically adjust foveation level based on framerate up to the level set on :ref:`xr/openxr/foveation_level`. +\ **Note:** Only works on compatibility renderer. + .. rst-class:: classref-item-separator ---- @@ -11285,6 +11335,8 @@ If true and foveation is supported, will automatically adjust foveation level ba Applied foveation level if supported: 0 = off, 1 = low, 2 = medium, 3 = high. +\ **Note:** Only works on compatibility renderer. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_renderingdevice.rst b/classes/class_renderingdevice.rst index f55afd4f8f0..cd5114f1cd2 100644 --- a/classes/class_renderingdevice.rst +++ b/classes/class_renderingdevice.rst @@ -311,13 +311,133 @@ Represents the size of the :ref:`DeviceType` en enum **DriverResource**: +.. _class_RenderingDevice_constant_DRIVER_RESOURCE_LOGICAL_DEVICE: + +.. rst-class:: classref-enumeration-constant + +:ref:`DriverResource` **DRIVER_RESOURCE_LOGICAL_DEVICE** = ``0`` + +Specific device object based on a physical device. + +- Vulkan: Vulkan device driver resource (``VkDevice``). (``rid`` argument doesn't apply.) + +.. _class_RenderingDevice_constant_DRIVER_RESOURCE_PHYSICAL_DEVICE: + +.. rst-class:: classref-enumeration-constant + +:ref:`DriverResource` **DRIVER_RESOURCE_PHYSICAL_DEVICE** = ``1`` + +Physical device the specific logical device is based on. + +- Vulkan: ``VkDevice``. (``rid`` argument doesn't apply.) + +.. _class_RenderingDevice_constant_DRIVER_RESOURCE_TOPMOST_OBJECT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DriverResource` **DRIVER_RESOURCE_TOPMOST_OBJECT** = ``2`` + +Top-most graphics API entry object. + +- Vulkan: ``VkInstance``. (``rid`` argument doesn't apply.) + +.. _class_RenderingDevice_constant_DRIVER_RESOURCE_COMMAND_QUEUE: + +.. rst-class:: classref-enumeration-constant + +:ref:`DriverResource` **DRIVER_RESOURCE_COMMAND_QUEUE** = ``3`` + +The main graphics-compute command queue. + +- Vulkan: ``VkQueue``. (``rid`` argument doesn't apply.) + +.. _class_RenderingDevice_constant_DRIVER_RESOURCE_QUEUE_FAMILY: + +.. rst-class:: classref-enumeration-constant + +:ref:`DriverResource` **DRIVER_RESOURCE_QUEUE_FAMILY** = ``4`` + +The specific family the main queue belongs to. + +- Vulkan: the queue family index, an ``uint32_t``. (``rid`` argument doesn't apply.) + +.. _class_RenderingDevice_constant_DRIVER_RESOURCE_TEXTURE: + +.. rst-class:: classref-enumeration-constant + +:ref:`DriverResource` **DRIVER_RESOURCE_TEXTURE** = ``5`` + +- Vulkan: ``VkImage``. + +.. _class_RenderingDevice_constant_DRIVER_RESOURCE_TEXTURE_VIEW: + +.. rst-class:: classref-enumeration-constant + +:ref:`DriverResource` **DRIVER_RESOURCE_TEXTURE_VIEW** = ``6`` + +The view of an owned or shared texture. + +- Vulkan: ``VkImageView``. + +.. _class_RenderingDevice_constant_DRIVER_RESOURCE_TEXTURE_DATA_FORMAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DriverResource` **DRIVER_RESOURCE_TEXTURE_DATA_FORMAT** = ``7`` + +The native id of the data format of the texture. + +- Vulkan: ``VkFormat``. + +.. _class_RenderingDevice_constant_DRIVER_RESOURCE_SAMPLER: + +.. rst-class:: classref-enumeration-constant + +:ref:`DriverResource` **DRIVER_RESOURCE_SAMPLER** = ``8`` + +- Vulkan: ``VkSampler``. + +.. _class_RenderingDevice_constant_DRIVER_RESOURCE_UNIFORM_SET: + +.. rst-class:: classref-enumeration-constant + +:ref:`DriverResource` **DRIVER_RESOURCE_UNIFORM_SET** = ``9`` + +- Vulkan: ``VkDescriptorSet``. + +.. _class_RenderingDevice_constant_DRIVER_RESOURCE_BUFFER: + +.. rst-class:: classref-enumeration-constant + +:ref:`DriverResource` **DRIVER_RESOURCE_BUFFER** = ``10`` + +Buffer of any kind of (storage, vertex, etc.). + +- Vulkan: ``VkBuffer``. + +.. _class_RenderingDevice_constant_DRIVER_RESOURCE_COMPUTE_PIPELINE: + +.. rst-class:: classref-enumeration-constant + +:ref:`DriverResource` **DRIVER_RESOURCE_COMPUTE_PIPELINE** = ``11`` + +- Vulkan: ``VkPipeline``. + +.. _class_RenderingDevice_constant_DRIVER_RESOURCE_RENDER_PIPELINE: + +.. rst-class:: classref-enumeration-constant + +:ref:`DriverResource` **DRIVER_RESOURCE_RENDER_PIPELINE** = ``12`` + +- Vulkan: ``VkPipeline``. + .. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_DEVICE: .. rst-class:: classref-enumeration-constant :ref:`DriverResource` **DRIVER_RESOURCE_VULKAN_DEVICE** = ``0`` -Vulkan device driver resource. This is a "global" resource and ignores the RID passed in +*Deprecated.* Use :ref:`DRIVER_RESOURCE_LOGICAL_DEVICE`. .. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_PHYSICAL_DEVICE: @@ -325,7 +445,7 @@ Vulkan device driver resource. This is a "global" resource and ignores the RID p :ref:`DriverResource` **DRIVER_RESOURCE_VULKAN_PHYSICAL_DEVICE** = ``1`` -Physical device (graphics card) driver resource. +*Deprecated.* Use :ref:`DRIVER_RESOURCE_PHYSICAL_DEVICE`. .. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_INSTANCE: @@ -333,7 +453,7 @@ Physical device (graphics card) driver resource. :ref:`DriverResource` **DRIVER_RESOURCE_VULKAN_INSTANCE** = ``2`` -Vulkan instance driver resource. +*Deprecated.* Use :ref:`DRIVER_RESOURCE_TOPMOST_OBJECT`. .. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_QUEUE: @@ -341,7 +461,7 @@ Vulkan instance driver resource. :ref:`DriverResource` **DRIVER_RESOURCE_VULKAN_QUEUE** = ``3`` -Vulkan queue driver resource. +*Deprecated.* Use :ref:`DRIVER_RESOURCE_COMMAND_QUEUE`. .. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_QUEUE_FAMILY_INDEX: @@ -349,7 +469,7 @@ Vulkan queue driver resource. :ref:`DriverResource` **DRIVER_RESOURCE_VULKAN_QUEUE_FAMILY_INDEX** = ``4`` -Vulkan queue family index driver resource. +*Deprecated.* Use :ref:`DRIVER_RESOURCE_QUEUE_FAMILY`. .. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_IMAGE: @@ -357,7 +477,7 @@ Vulkan queue family index driver resource. :ref:`DriverResource` **DRIVER_RESOURCE_VULKAN_IMAGE** = ``5`` -Vulkan image driver resource. +*Deprecated.* Use :ref:`DRIVER_RESOURCE_TEXTURE`. .. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_IMAGE_VIEW: @@ -365,7 +485,7 @@ Vulkan image driver resource. :ref:`DriverResource` **DRIVER_RESOURCE_VULKAN_IMAGE_VIEW** = ``6`` -Vulkan image view driver resource. +*Deprecated.* Use :ref:`DRIVER_RESOURCE_TEXTURE_VIEW`. .. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_IMAGE_NATIVE_TEXTURE_FORMAT: @@ -373,7 +493,7 @@ Vulkan image view driver resource. :ref:`DriverResource` **DRIVER_RESOURCE_VULKAN_IMAGE_NATIVE_TEXTURE_FORMAT** = ``7`` -Vulkan image native texture format driver resource. +*Deprecated.* Use :ref:`DRIVER_RESOURCE_TEXTURE_DATA_FORMAT`. .. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_SAMPLER: @@ -381,7 +501,7 @@ Vulkan image native texture format driver resource. :ref:`DriverResource` **DRIVER_RESOURCE_VULKAN_SAMPLER** = ``8`` -Vulkan sampler driver resource. +*Deprecated.* Use :ref:`DRIVER_RESOURCE_SAMPLER`. .. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_DESCRIPTOR_SET: @@ -389,7 +509,7 @@ Vulkan sampler driver resource. :ref:`DriverResource` **DRIVER_RESOURCE_VULKAN_DESCRIPTOR_SET** = ``9`` -Vulkan `descriptor set `__ driver resource. +*Deprecated.* Use :ref:`DRIVER_RESOURCE_UNIFORM_SET`. .. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_BUFFER: @@ -397,7 +517,7 @@ Vulkan `descriptor set `__ driv :ref:`DriverResource` **DRIVER_RESOURCE_VULKAN_BUFFER** = ``10`` -Vulkan buffer driver resource. +*Deprecated.* Use :ref:`DRIVER_RESOURCE_BUFFER`. .. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_COMPUTE_PIPELINE: @@ -405,7 +525,7 @@ Vulkan buffer driver resource. :ref:`DriverResource` **DRIVER_RESOURCE_VULKAN_COMPUTE_PIPELINE** = ``11`` -Vulkan compute pipeline driver resource. +*Deprecated.* Use :ref:`DRIVER_RESOURCE_COMPUTE_PIPELINE`. .. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_RENDER_PIPELINE: @@ -413,7 +533,7 @@ Vulkan compute pipeline driver resource. :ref:`DriverResource` **DRIVER_RESOURCE_VULKAN_RENDER_PIPELINE** = ``12`` -Vulkan render pipeline driver resource. +*Deprecated.* Use :ref:`DRIVER_RESOURCE_RENDER_PIPELINE`. .. rst-class:: classref-item-separator @@ -5486,6 +5606,8 @@ Returns the internal graphics handle for this texture object. For use when commu \ **Note:** This function returns a ``uint64_t`` which internally maps to a ``GLuint`` (OpenGL) or ``VkImage`` (Vulkan). +\ *Deprecated.* Use :ref:`get_driver_resource` with :ref:`DRIVER_RESOURCE_TEXTURE` instead. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_renderingserver.rst b/classes/class_renderingserver.rst index dbe725f0eb9..f5dae16760c 100644 --- a/classes/class_renderingserver.rst +++ b/classes/class_renderingserver.rst @@ -267,6 +267,8 @@ Methods +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RenderingDevice` | :ref:`create_local_rendering_device` **(** **)** |const| | +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`debug_canvas_item_get_rect` **(** :ref:`RID` item **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`decal_create` **(** **)** | +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`decal_set_albedo_mix` **(** :ref:`RID` decal, :ref:`float` albedo_mix **)** | @@ -3186,11 +3188,19 @@ Visible render pass (excluding shadows). Shadow render pass. Objects will be rendered several times depending on the number of amounts of lights with shadows and the number of directional shadow splits. +.. _class_RenderingServer_constant_VIEWPORT_RENDER_INFO_TYPE_CANVAS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportRenderInfoType` **VIEWPORT_RENDER_INFO_TYPE_CANVAS** = ``2`` + +Canvas item rendering. This includes all 2D rendering. + .. _class_RenderingServer_constant_VIEWPORT_RENDER_INFO_TYPE_MAX: .. rst-class:: classref-enumeration-constant -:ref:`ViewportRenderInfoType` **VIEWPORT_RENDER_INFO_TYPE_MAX** = ``2`` +:ref:`ViewportRenderInfoType` **VIEWPORT_RENDER_INFO_TYPE_MAX** = ``3`` Represents the size of the :ref:`ViewportRenderInfoType` enum. @@ -4630,7 +4640,7 @@ Uses the default filter mode for this :ref:`Viewport`. :ref:`CanvasItemTextureFilter` **CANVAS_ITEM_TEXTURE_FILTER_NEAREST** = ``1`` -The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering, but the texture will look pixelized. +The texture filter reads from the nearest pixel only. This makes the texture look pixelated from up close, and grainy from a distance (due to mipmaps not being sampled). .. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_FILTER_LINEAR: @@ -4638,7 +4648,7 @@ The texture filter reads from the nearest pixel only. The simplest and fastest m :ref:`CanvasItemTextureFilter` **CANVAS_ITEM_TEXTURE_FILTER_LINEAR** = ``2`` -The texture filter blends between the nearest 4 pixels. Use this when you want to avoid a pixelated style, but do not want mipmaps. +The texture filter blends between the nearest 4 pixels. This makes the texture look smooth from up close, and grainy from a distance (due to mipmaps not being sampled). .. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS: @@ -4646,7 +4656,9 @@ The texture filter blends between the nearest 4 pixels. Use this when you want t :ref:`CanvasItemTextureFilter` **CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS** = ``3`` -The texture filter reads from the nearest pixel in the nearest mipmap. The fastest way to read from textures with mipmaps. +The texture filter reads from the nearest pixel and blends between the nearest 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``). This makes the texture look pixelated from up close, and smooth from a distance. + +Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to :ref:`Camera2D` zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. .. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS: @@ -4654,7 +4666,9 @@ The texture filter reads from the nearest pixel in the nearest mipmap. The faste :ref:`CanvasItemTextureFilter` **CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS** = ``4`` -The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps. +The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``). This makes the texture look smooth from up close, and smooth from a distance. + +Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to :ref:`Camera2D` zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. .. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC: @@ -4662,7 +4676,9 @@ The texture filter blends between the nearest 4 pixels and between the nearest 2 :ref:`CanvasItemTextureFilter` **CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC** = ``5`` -The texture filter reads from the nearest pixel, but selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. +The texture filter reads from the nearest pixel and blends between 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``) based on the angle between the surface and the camera view. This makes the texture look pixelated from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. + +\ **Note:** This texture filter is rarely useful in 2D projects. :ref:`CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS` is usually more appropriate in this case. .. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC: @@ -4670,7 +4686,9 @@ The texture filter reads from the nearest pixel, but selects a mipmap based on t :ref:`CanvasItemTextureFilter` **CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC** = ``6`` -The texture filter blends between the nearest 4 pixels and selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. This is the slowest of the filtering options, but results in the highest quality texturing. +The texture filter blends between the nearest 4 pixels and blends between 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``) based on the angle between the surface and the camera view. This makes the texture look smooth from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. + +\ **Note:** This texture filter is rarely useful in 2D projects. :ref:`CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS` is usually more appropriate in this case. .. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_FILTER_MAX: @@ -6666,6 +6684,20 @@ Creates a RenderingDevice that can be used to do draw and compute operations on ---- +.. _class_RenderingServer_method_debug_canvas_item_get_rect: + +.. rst-class:: classref-method + +:ref:`Rect2` **debug_canvas_item_get_rect** **(** :ref:`RID` item **)** + +Returns the bounding rectangle for a canvas item in local space, as calculated by the renderer. This bound is used internally for culling. + +\ **Warning:** This function is intended for debugging in the editor, and will pass through and return a zero :ref:`Rect2` in exported projects. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_decal_create: .. rst-class:: classref-method @@ -7238,7 +7270,7 @@ Sets the size of the fog volume when shape is :ref:`FOG_VOLUME_SHAPE_ELLIPSOID` swap_buffers=true, :ref:`float` frame_step=0.0 **)** -Forces redrawing of all viewports at once. +Forces redrawing of all viewports at once. Must be called from the main thread. .. rst-class:: classref-item-separator @@ -10357,7 +10389,7 @@ Updates the texture specified by the ``texture`` :ref:`RID`'s data wi :ref:`Format` **texture_get_format** **(** :ref:`RID` texture **)** |const| -Returns the :ref:`Format` for the texture. +Returns the format for the texture. .. rst-class:: classref-item-separator diff --git a/classes/class_resource.rst b/classes/class_resource.rst index d0c4350eae1..b2667834390 100644 --- a/classes/class_resource.rst +++ b/classes/class_resource.rst @@ -21,10 +21,12 @@ Base class for serializable objects. Description ----------- -Resource is the base class for all Godot-specific resource types, serving primarily as data containers. Since they inherit from :ref:`RefCounted`, resources are reference-counted and freed when no longer in use. They can also be nested within other resources, and saved on disk. Once loaded from disk, further attempts to load a resource by :ref:`resource_path` returns the same reference. :ref:`PackedScene`, one of the most common :ref:`Object`\ s in a Godot project, is also a resource, uniquely capable of storing and instantiating the :ref:`Node`\ s it contains as many times as desired. +Resource is the base class for all Godot-specific resource types, serving primarily as data containers. Since they inherit from :ref:`RefCounted`, resources are reference-counted and freed when no longer in use. They can also be nested within other resources, and saved on disk. :ref:`PackedScene`, one of the most common :ref:`Object`\ s in a Godot project, is also a resource, uniquely capable of storing and instantiating the :ref:`Node`\ s it contains as many times as desired. In GDScript, resources can loaded from disk by their :ref:`resource_path` using :ref:`@GDScript.load` or :ref:`@GDScript.preload`. +The engine keeps a global cache of all loaded resources, referenced by paths (see :ref:`ResourceLoader.has_cached`). A resource will be cached when loaded for the first time and removed from cache once all references are released. When a resource is cached, subsequent loads using its path will return the cached reference. + \ **Note:** In C#, resources will not be freed instantly after they are no longer in use. Instead, garbage collection will run periodically and will free resources that are no longer in use. This means that unused resources will linger on for a while before being removed. .. rst-class:: classref-introduction-group diff --git a/classes/class_resourceloader.rst b/classes/class_resourceloader.rst index 10f8ffba7e9..a5bcb388861 100644 --- a/classes/class_resourceloader.rst +++ b/classes/class_resourceloader.rst @@ -129,7 +129,7 @@ enum **CacheMode**: :ref:`CacheMode` **CACHE_MODE_IGNORE** = ``0`` - +The resource is always loaded from disk, even if a cache entry exists for its path, and the newly loaded copy will not be cached. Instances loaded with this mode will exist independently. .. _class_ResourceLoader_constant_CACHE_MODE_REUSE: @@ -137,7 +137,7 @@ enum **CacheMode**: :ref:`CacheMode` **CACHE_MODE_REUSE** = ``1`` - +If a resource is cached, returns the cached reference. Otherwise it's loaded from disk. .. _class_ResourceLoader_constant_CACHE_MODE_REPLACE: @@ -145,7 +145,7 @@ enum **CacheMode**: :ref:`CacheMode` **CACHE_MODE_REPLACE** = ``2`` - +The resource is always loaded from disk, even if a cache entry exists for its path. The cached entry will be replaced by the newly loaded copy. .. rst-class:: classref-section-separator @@ -180,6 +180,8 @@ Returns whether a recognized resource exists for the given ``path``. An optional ``type_hint`` can be used to further specify the :ref:`Resource` type that should be handled by the :ref:`ResourceFormatLoader`. Anything that inherits from :ref:`Resource` can be used as a type hint, for example :ref:`Image`. +\ **Note:** If you use :ref:`Resource.take_over_path`, this method will return ``true`` for the taken path even if the resource wasn't saved (i.e. exists only in resource cache). + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_richtexteffect.rst b/classes/class_richtexteffect.rst index 2d93807769e..0867182c83f 100644 --- a/classes/class_richtexteffect.rst +++ b/classes/class_richtexteffect.rst @@ -19,7 +19,7 @@ A custom effect for a :ref:`RichTextLabel`. Description ----------- -A custom effect for a :ref:`RichTextLabel`. +A custom effect for a :ref:`RichTextLabel`, which can be loaded in the :ref:`RichTextLabel` inspector or using :ref:`RichTextLabel.install_effect`. \ **Note:** For a **RichTextEffect** to be usable, a BBCode tag must be defined as a member variable called ``bbcode`` in the script. diff --git a/classes/class_richtextlabel.rst b/classes/class_richtextlabel.rst index 62c8b0cb537..f104ade88ba 100644 --- a/classes/class_richtextlabel.rst +++ b/classes/class_richtextlabel.rst @@ -1305,7 +1305,32 @@ Returns the number of visible paragraphs. A paragraph is considered visible if a void **install_effect** **(** :ref:`Variant` effect **)** -Installs a custom effect. ``effect`` should be a valid :ref:`RichTextEffect`. +Installs a custom effect. This can also be done in the RichTextLabel inspector using the :ref:`custom_effects` property. ``effect`` should be a valid :ref:`RichTextEffect`. + +Example RichTextEffect: + +:: + + # effect.gd + class_name MyCustomEffect + extends RichTextEffect + + var bbcode = "my_custom_effect" + + # ... + +Registering the above effect in RichTextLabel from script: + +:: + + # rich_text_label.gd + extends RichTextLabel + + func _ready(): + install_effect(MyCustomEffect.new()) + + # Alternatively, if not using `class_name` in the script that extends RichTextEffect: + install_effect(preload("res://effect.gd").new()) .. rst-class:: classref-item-separator diff --git a/classes/class_scenetree.rst b/classes/class_scenetree.rst index 7dcb7d56e0b..d155d61132f 100644 --- a/classes/class_scenetree.rst +++ b/classes/class_scenetree.rst @@ -93,6 +93,8 @@ Methods +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_node_count` **(** **)** |const| | +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_node_count_in_group` **(** :ref:`StringName` group **)** |const| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Node[]` | :ref:`get_nodes_in_group` **(** :ref:`StringName` group **)** | +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Tween[]` | :ref:`get_processed_tweens` **(** **)** | @@ -512,7 +514,7 @@ Changes the running scene to the one at the given ``path``, after loading it int Returns :ref:`@GlobalScope.OK` on success, :ref:`@GlobalScope.ERR_CANT_OPEN` if the ``path`` cannot be loaded into a :ref:`PackedScene`, or :ref:`@GlobalScope.ERR_CANT_CREATE` if that scene cannot be instantiated. -\ **Note:** The new scene node is added to the tree at the end of the frame. This ensures that both scenes aren't running at the same time, while still freeing the previous scene in a safe way similar to :ref:`Node.queue_free`. As such, you won't be able to access the loaded scene immediately after the :ref:`change_scene_to_file` call. +\ **Note:** See :ref:`change_scene_to_packed` for details on the order of operations. .. rst-class:: classref-item-separator @@ -528,7 +530,13 @@ Changes the running scene to a new instance of the given :ref:`PackedScene` on success, :ref:`@GlobalScope.ERR_CANT_CREATE` if the scene cannot be instantiated, or :ref:`@GlobalScope.ERR_INVALID_PARAMETER` if the scene is invalid. -\ **Note:** The new scene node is added to the tree at the end of the frame. You won't be able to access it immediately after the :ref:`change_scene_to_packed` call. +\ **Note:** Operations happen in the following order when :ref:`change_scene_to_packed` is called: + +1. The current scene node is immediately removed from the tree. From that point, :ref:`Node.get_tree` called on the current (outgoing) scene will return ``null``. :ref:`current_scene` will be ``null``, too, because the new scene is not available yet. + +2. At the end of the frame, the formerly current scene, already removed from the tree, will be deleted (freed from memory) and then the new scene will be instantiated and added to the tree. :ref:`Node.get_tree` and :ref:`current_scene` will be back to working as usual. + +This ensures that both scenes aren't running at the same time, while still freeing the previous scene in a safe way similar to :ref:`Node.queue_free`. .. rst-class:: classref-item-separator @@ -641,6 +649,18 @@ Returns the number of nodes in this **SceneTree**. ---- +.. _class_SceneTree_method_get_node_count_in_group: + +.. rst-class:: classref-method + +:ref:`int` **get_node_count_in_group** **(** :ref:`StringName` group **)** |const| + +Returns the number of nodes assigned to the given group. + +.. rst-class:: classref-item-separator + +---- + .. _class_SceneTree_method_get_nodes_in_group: .. rst-class:: classref-method diff --git a/classes/class_script.rst b/classes/class_script.rst index bfb139f48cf..06b399e7515 100644 --- a/classes/class_script.rst +++ b/classes/class_script.rst @@ -59,6 +59,8 @@ Methods +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Script` | :ref:`get_base_script` **(** **)** |const| | +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_global_name` **(** **)** |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`StringName` | :ref:`get_instance_base_type` **(** **)** |const| | +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`get_property_default_value` **(** :ref:`StringName` property **)** | @@ -135,6 +137,39 @@ Returns ``true`` if the script can be instantiated. Returns the script directly inherited by this script. +.. rst-class:: classref-item-separator + +---- + +.. _class_Script_method_get_global_name: + +.. rst-class:: classref-method + +:ref:`StringName` **get_global_name** **(** **)** |const| + +Returns the class name associated with the script, if there is one. Returns an empty string otherwise. + +To give the script a global name, you can use the ``class_name`` keyword in GDScript and the ``[GlobalClass]`` attribute in C#. + + +.. tabs:: + + .. code-tab:: gdscript + + class_name MyNode + extends Node + + .. code-tab:: csharp + + using Godot; + + [GlobalClass] + public partial class MyNode : Node + { + } + + + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_scriptlanguageextension.rst b/classes/class_scriptlanguageextension.rst index 3b7cdd84e61..003acd4ca94 100644 --- a/classes/class_scriptlanguageextension.rst +++ b/classes/class_scriptlanguageextension.rst @@ -113,6 +113,8 @@ Methods +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_profiling_get_frame_data` **(** ScriptLanguageExtensionProfilingInfo* info_array, :ref:`int` info_max **)** |virtual| | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_profiling_set_save_native_calls` **(** :ref:`bool` enable **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_profiling_start` **(** **)** |virtual| | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_profiling_stop` **(** **)** |virtual| | @@ -994,6 +996,20 @@ void **_init** **(** **)** |virtual| ---- +.. _class_ScriptLanguageExtension_private_method__profiling_set_save_native_calls: + +.. rst-class:: classref-method + +void **_profiling_set_save_native_calls** **(** :ref:`bool` enable **)** |virtual| + +.. 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__profiling_start: .. rst-class:: classref-method diff --git a/classes/class_skeleton3d.rst b/classes/class_skeleton3d.rst index 0b49aa2bbaa..413ba613242 100644 --- a/classes/class_skeleton3d.rst +++ b/classes/class_skeleton3d.rst @@ -25,8 +25,6 @@ The overall transform of a bone with respect to the skeleton is determined by bo Note that "global pose" below refers to the overall transform of the bone with respect to skeleton, so it is not the actual global/world transform of the bone. -To setup different types of inverse kinematics, consider using :ref:`SkeletonIK3D`, or add a custom IK implementation in :ref:`Node._process` as a child node. - .. rst-class:: classref-introduction-group Tutorials diff --git a/classes/class_slider.rst b/classes/class_slider.rst index 883712716da..efc975a233c 100644 --- a/classes/class_slider.rst +++ b/classes/class_slider.rst @@ -100,7 +100,7 @@ Emitted when dragging stops. If ``value_changed`` is true, :ref:`Range.value` signal. .. rst-class:: classref-section-separator diff --git a/classes/class_sprite2d.rst b/classes/class_sprite2d.rst index 51bced63328..6b3d53a8f60 100644 --- a/classes/class_sprite2d.rst +++ b/classes/class_sprite2d.rst @@ -176,7 +176,7 @@ If ``true``, texture is flipped vertically. - void **set_frame** **(** :ref:`int` value **)** - :ref:`int` **get_frame** **(** **)** -Current frame to display from sprite sheet. :ref:`hframes` or :ref:`vframes` must be greater than 1. +Current frame to display from sprite sheet. :ref:`hframes` or :ref:`vframes` must be greater than 1. This property is automatically adjusted when :ref:`hframes` or :ref:`vframes` are changed to keep pointing to the same visual frame (same column and row). If that's impossible, this value is reset to ``0``. .. rst-class:: classref-item-separator @@ -210,7 +210,7 @@ Coordinates of the frame to display from sprite sheet. This is as an alias for t - void **set_hframes** **(** :ref:`int` value **)** - :ref:`int` **get_hframes** **(** **)** -The number of columns in the sprite sheet. +The number of columns in the sprite sheet. When this property is changed, :ref:`frame` is adjusted so that the same visual frame is maintained (same row and column). If that's impossible, :ref:`frame` is reset to ``0``. .. rst-class:: classref-item-separator @@ -312,7 +312,7 @@ The region of the atlas texture to display. :ref:`region_enabled` value **)** - :ref:`int` **get_vframes** **(** **)** -The number of rows in the sprite sheet. +The number of rows in the sprite sheet. When this property is changed, :ref:`frame` is adjusted so that the same visual frame is maintained (same row and column). If that's impossible, :ref:`frame` is reset to ``0``. .. rst-class:: classref-section-separator diff --git a/classes/class_sprite3d.rst b/classes/class_sprite3d.rst index 42adf56d105..1acb2f0cff0 100644 --- a/classes/class_sprite3d.rst +++ b/classes/class_sprite3d.rst @@ -94,7 +94,7 @@ Property Descriptions - void **set_frame** **(** :ref:`int` value **)** - :ref:`int` **get_frame** **(** **)** -Current frame to display from sprite sheet. :ref:`hframes` or :ref:`vframes` must be greater than 1. +Current frame to display from sprite sheet. :ref:`hframes` or :ref:`vframes` must be greater than 1. This property is automatically adjusted when :ref:`hframes` or :ref:`vframes` are changed to keep pointing to the same visual frame (same column and row). If that's impossible, this value is reset to ``0``. .. rst-class:: classref-item-separator @@ -128,7 +128,7 @@ Coordinates of the frame to display from sprite sheet. This is as an alias for t - void **set_hframes** **(** :ref:`int` value **)** - :ref:`int` **get_hframes** **(** **)** -The number of columns in the sprite sheet. +The number of columns in the sprite sheet. When this property is changed, :ref:`frame` is adjusted so that the same visual frame is maintained (same row and column). If that's impossible, :ref:`frame` is reset to ``0``. .. rst-class:: classref-item-separator @@ -196,7 +196,7 @@ The region of the atlas texture to display. :ref:`region_enabled` value **)** - :ref:`int` **get_vframes** **(** **)** -The number of rows in the sprite sheet. +The number of rows in the sprite sheet. When this property is changed, :ref:`frame` is adjusted so that the same visual frame is maintained (same row and column). If that's impossible, :ref:`frame` is reset to ``0``. .. |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_textline.rst b/classes/class_textline.rst index f9c7092a718..0f69e797601 100644 --- a/classes/class_textline.rst +++ b/classes/class_textline.rst @@ -34,6 +34,8 @@ Properties +---------------------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ | :ref:`Direction` | :ref:`direction` | ``0`` | +---------------------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ + | :ref:`String` | :ref:`ellipsis_char` | ``"…"`` | + +---------------------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ | |bitfield|\<:ref:`JustificationFlag`\> | :ref:`flags` | ``3`` | +---------------------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ | :ref:`Orientation` | :ref:`orientation` | ``0`` | @@ -136,6 +138,23 @@ Text writing direction. ---- +.. _class_TextLine_property_ellipsis_char: + +.. rst-class:: classref-property + +:ref:`String` **ellipsis_char** = ``"…"`` + +.. rst-class:: classref-property-setget + +- void **set_ellipsis_char** **(** :ref:`String` value **)** +- :ref:`String` **get_ellipsis_char** **(** **)** + +Ellipsis character used for text clipping. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextLine_property_flags: .. rst-class:: classref-property diff --git a/classes/class_textparagraph.rst b/classes/class_textparagraph.rst index a549c5f1cf3..20f8d6ddb5d 100644 --- a/classes/class_textparagraph.rst +++ b/classes/class_textparagraph.rst @@ -38,6 +38,8 @@ Properties +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ | :ref:`Direction` | :ref:`direction` | ``0`` | +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ + | :ref:`String` | :ref:`ellipsis_char` | ``"…"`` | + +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ | |bitfield|\<:ref:`JustificationFlag`\> | :ref:`justification_flags` | ``163`` | +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ | :ref:`int` | :ref:`max_lines_visible` | ``-1`` | @@ -204,6 +206,23 @@ Text writing direction. ---- +.. _class_TextParagraph_property_ellipsis_char: + +.. rst-class:: classref-property + +:ref:`String` **ellipsis_char** = ``"…"`` + +.. rst-class:: classref-property-setget + +- void **set_ellipsis_char** **(** :ref:`String` value **)** +- :ref:`String` **get_ellipsis_char** **(** **)** + +Ellipsis character used for text clipping. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextParagraph_property_justification_flags: .. rst-class:: classref-property diff --git a/classes/class_textserver.rst b/classes/class_textserver.rst index 0ed6f5ef17e..0b544637d4b 100644 --- a/classes/class_textserver.rst +++ b/classes/class_textserver.rst @@ -326,6 +326,8 @@ Methods +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedInt32Array` | :ref:`shaped_text_get_character_breaks` **(** :ref:`RID` shaped **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`shaped_text_get_custom_ellipsis` **(** :ref:`RID` shaped **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`shaped_text_get_custom_punctuation` **(** :ref:`RID` shaped **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`shaped_text_get_descent` **(** :ref:`RID` shaped **)** |const| | @@ -404,6 +406,8 @@ Methods +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`shaped_text_set_bidi_override` **(** :ref:`RID` shaped, :ref:`Array` override **)** | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`shaped_text_set_custom_ellipsis` **(** :ref:`RID` shaped, :ref:`int` char **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`shaped_text_set_custom_punctuation` **(** :ref:`RID` shaped, :ref:`String` punct **)** | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`shaped_text_set_direction` **(** :ref:`RID` shaped, :ref:`Direction` direction=0 **)** | @@ -3359,6 +3363,18 @@ Returns array of the composite character boundaries. ---- +.. _class_TextServer_method_shaped_text_get_custom_ellipsis: + +.. rst-class:: classref-method + +:ref:`int` **shaped_text_get_custom_ellipsis** **(** :ref:`RID` shaped **)** |const| + +Returns ellipsis character used for text clipping. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServer_method_shaped_text_get_custom_punctuation: .. rst-class:: classref-method @@ -3833,6 +3849,18 @@ Override ranges should cover full source text without overlaps. BiDi algorithm w ---- +.. _class_TextServer_method_shaped_text_set_custom_ellipsis: + +.. rst-class:: classref-method + +void **shaped_text_set_custom_ellipsis** **(** :ref:`RID` shaped, :ref:`int` char **)** + +Sets ellipsis character used for text clipping. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServer_method_shaped_text_set_custom_punctuation: .. rst-class:: classref-method diff --git a/classes/class_textserverextension.rst b/classes/class_textserverextension.rst index c83473dee3d..5eb1e35f4d0 100644 --- a/classes/class_textserverextension.rst +++ b/classes/class_textserverextension.rst @@ -330,6 +330,8 @@ Methods +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedInt32Array` | :ref:`_shaped_text_get_character_breaks` **(** :ref:`RID` shaped **)** |virtual| |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_shaped_text_get_custom_ellipsis` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`_shaped_text_get_custom_punctuation` **(** :ref:`RID` shaped **)** |virtual| |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`_shaped_text_get_descent` **(** :ref:`RID` shaped **)** |virtual| |const| | @@ -406,6 +408,8 @@ Methods +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_shaped_text_set_bidi_override` **(** :ref:`RID` shaped, :ref:`Array` override **)** |virtual| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shaped_text_set_custom_ellipsis` **(** :ref:`RID` shaped, :ref:`int` char **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_shaped_text_set_custom_punctuation` **(** :ref:`RID` shaped, :ref:`String` punct **)** |virtual| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_shaped_text_set_direction` **(** :ref:`RID` shaped, :ref:`Direction` direction **)** |virtual| | @@ -2540,6 +2544,20 @@ void **_shaped_text_get_carets** **(** :ref:`RID` shaped, :ref:`int` **_shaped_text_get_custom_ellipsis** **(** :ref:`RID` shaped **)** |virtual| |const| + +.. container:: contribute + + There is currently no description for this method. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServerExtension_private_method__shaped_text_get_custom_punctuation: .. rst-class:: classref-method @@ -3072,6 +3090,20 @@ void **_shaped_text_set_bidi_override** **(** :ref:`RID` shaped, :ref ---- +.. _class_TextServerExtension_private_method__shaped_text_set_custom_ellipsis: + +.. rst-class:: classref-method + +void **_shaped_text_set_custom_ellipsis** **(** :ref:`RID` shaped, :ref:`int` char **)** |virtual| + +.. container:: contribute + + There is currently no description for this method. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServerExtension_private_method__shaped_text_set_custom_punctuation: .. rst-class:: classref-method diff --git a/classes/class_textureprogressbar.rst b/classes/class_textureprogressbar.rst index d8ab21094c1..63b4445b419 100644 --- a/classes/class_textureprogressbar.rst +++ b/classes/class_textureprogressbar.rst @@ -224,7 +224,7 @@ If ``true``, Godot treats the bar's textures like in :ref:`NinePatchRect` value **)** - :ref:`Vector2` **get_radial_center_offset** **(** **)** -Offsets :ref:`texture_progress` if :ref:`fill_mode` is :ref:`FILL_CLOCKWISE` or :ref:`FILL_COUNTER_CLOCKWISE`. +Offsets :ref:`texture_progress` if :ref:`fill_mode` is :ref:`FILL_CLOCKWISE`, :ref:`FILL_COUNTER_CLOCKWISE`, or :ref:`FILL_CLOCKWISE_AND_COUNTER_CLOCKWISE`. .. rst-class:: classref-item-separator @@ -241,7 +241,7 @@ Offsets :ref:`texture_progress` value **)** - :ref:`float` **get_fill_degrees** **(** **)** -Upper limit for the fill of :ref:`texture_progress` if :ref:`fill_mode` is :ref:`FILL_CLOCKWISE` or :ref:`FILL_COUNTER_CLOCKWISE`. When the node's ``value`` is equal to its ``max_value``, the texture fills up to this angle. +Upper limit for the fill of :ref:`texture_progress` if :ref:`fill_mode` is :ref:`FILL_CLOCKWISE`, :ref:`FILL_COUNTER_CLOCKWISE`, or :ref:`FILL_CLOCKWISE_AND_COUNTER_CLOCKWISE`. When the node's ``value`` is equal to its ``max_value``, the texture fills up to this angle. See :ref:`Range.value`, :ref:`Range.max_value`. @@ -260,7 +260,7 @@ See :ref:`Range.value`, :ref:`Range.max_value` value **)** - :ref:`float` **get_radial_initial_angle** **(** **)** -Starting angle for the fill of :ref:`texture_progress` if :ref:`fill_mode` is :ref:`FILL_CLOCKWISE` or :ref:`FILL_COUNTER_CLOCKWISE`. When the node's ``value`` is equal to its ``min_value``, the texture doesn't show up at all. When the ``value`` increases, the texture fills and tends towards :ref:`radial_fill_degrees`. +Starting angle for the fill of :ref:`texture_progress` if :ref:`fill_mode` is :ref:`FILL_CLOCKWISE`, :ref:`FILL_COUNTER_CLOCKWISE`, or :ref:`FILL_CLOCKWISE_AND_COUNTER_CLOCKWISE`. When the node's ``value`` is equal to its ``min_value``, the texture doesn't show up at all. When the ``value`` increases, the texture fills and tends towards :ref:`radial_fill_degrees`. .. rst-class:: classref-item-separator @@ -277,7 +277,7 @@ Starting angle for the fill of :ref:`texture_progress` margin, :ref:`int` value **)** - :ref:`int` **get_stretch_margin** **(** :ref:`Side` margin **)** |const| -The height of the 9-patch's bottom row. A margin of 16 means the 9-slice's bottom corners and side will have a height of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders. +The height of the 9-patch's bottom row. A margin of 16 means the 9-slice's bottom corners and side will have a height of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders. Only effective if :ref:`nine_patch_stretch` is ``true``. .. rst-class:: classref-item-separator @@ -294,7 +294,7 @@ The height of the 9-patch's bottom row. A margin of 16 means the 9-slice's botto - void **set_stretch_margin** **(** :ref:`Side` margin, :ref:`int` value **)** - :ref:`int` **get_stretch_margin** **(** :ref:`Side` margin **)** |const| -The width of the 9-patch's left column. +The width of the 9-patch's left column. Only effective if :ref:`nine_patch_stretch` is ``true``. .. rst-class:: classref-item-separator @@ -311,7 +311,7 @@ The width of the 9-patch's left column. - void **set_stretch_margin** **(** :ref:`Side` margin, :ref:`int` value **)** - :ref:`int` **get_stretch_margin** **(** :ref:`Side` margin **)** |const| -The width of the 9-patch's right column. +The width of the 9-patch's right column. Only effective if :ref:`nine_patch_stretch` is ``true``. .. rst-class:: classref-item-separator @@ -328,7 +328,7 @@ The width of the 9-patch's right column. - void **set_stretch_margin** **(** :ref:`Side` margin, :ref:`int` value **)** - :ref:`int` **get_stretch_margin** **(** :ref:`Side` margin **)** |const| -The height of the 9-patch's top row. +The height of the 9-patch's top row. Only effective if :ref:`nine_patch_stretch` is ``true``. .. rst-class:: classref-item-separator diff --git a/classes/class_tiledata.rst b/classes/class_tiledata.rst index db8f6c0bb52..ef421bc9f7d 100644 --- a/classes/class_tiledata.rst +++ b/classes/class_tiledata.rst @@ -61,55 +61,55 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_collision_polygon` **(** :ref:`int` layer_id **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_collision_polygon_one_way_margin` **(** :ref:`int` layer_id, :ref:`int` polygon_index **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array` | :ref:`get_collision_polygon_points` **(** :ref:`int` layer_id, :ref:`int` polygon_index **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_collision_polygons_count` **(** :ref:`int` layer_id **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_constant_angular_velocity` **(** :ref:`int` layer_id **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_constant_linear_velocity` **(** :ref:`int` layer_id **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`get_custom_data` **(** :ref:`String` layer_name **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`get_custom_data_by_layer_id` **(** :ref:`int` layer_id **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`NavigationPolygon` | :ref:`get_navigation_polygon` **(** :ref:`int` layer_id **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`OccluderPolygon2D` | :ref:`get_occluder` **(** :ref:`int` layer_id **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_terrain_peering_bit` **(** :ref:`CellNeighbor` peering_bit **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_collision_polygon_one_way` **(** :ref:`int` layer_id, :ref:`int` polygon_index **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_collision_polygon` **(** :ref:`int` layer_id, :ref:`int` polygon_index **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_collision_polygon_one_way` **(** :ref:`int` layer_id, :ref:`int` polygon_index, :ref:`bool` one_way **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_collision_polygon_one_way_margin` **(** :ref:`int` layer_id, :ref:`int` polygon_index, :ref:`float` one_way_margin **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_collision_polygon_points` **(** :ref:`int` layer_id, :ref:`int` polygon_index, :ref:`PackedVector2Array` polygon **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_collision_polygons_count` **(** :ref:`int` layer_id, :ref:`int` polygons_count **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_constant_angular_velocity` **(** :ref:`int` layer_id, :ref:`float` velocity **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_constant_linear_velocity` **(** :ref:`int` layer_id, :ref:`Vector2` velocity **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_custom_data` **(** :ref:`String` layer_name, :ref:`Variant` value **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_custom_data_by_layer_id` **(** :ref:`int` layer_id, :ref:`Variant` value **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_navigation_polygon` **(** :ref:`int` layer_id, :ref:`NavigationPolygon` navigation_polygon **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_occluder` **(** :ref:`int` layer_id, :ref:`OccluderPolygon2D` occluder_polygon **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_terrain_peering_bit` **(** :ref:`CellNeighbor` peering_bit, :ref:`int` terrain **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_collision_polygon` **(** :ref:`int` layer_id **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_collision_polygon_one_way_margin` **(** :ref:`int` layer_id, :ref:`int` polygon_index **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`get_collision_polygon_points` **(** :ref:`int` layer_id, :ref:`int` polygon_index **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_collision_polygons_count` **(** :ref:`int` layer_id **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_constant_angular_velocity` **(** :ref:`int` layer_id **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_constant_linear_velocity` **(** :ref:`int` layer_id **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_custom_data` **(** :ref:`String` layer_name **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_custom_data_by_layer_id` **(** :ref:`int` layer_id **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NavigationPolygon` | :ref:`get_navigation_polygon` **(** :ref:`int` layer_id, :ref:`bool` flip_h=false, :ref:`bool` flip_v=false, :ref:`bool` transpose=false **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`OccluderPolygon2D` | :ref:`get_occluder` **(** :ref:`int` layer_id, :ref:`bool` flip_h=false, :ref:`bool` flip_v=false, :ref:`bool` transpose=false **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_terrain_peering_bit` **(** :ref:`CellNeighbor` peering_bit **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_collision_polygon_one_way` **(** :ref:`int` layer_id, :ref:`int` polygon_index **)** |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_collision_polygon` **(** :ref:`int` layer_id, :ref:`int` polygon_index **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_collision_polygon_one_way` **(** :ref:`int` layer_id, :ref:`int` polygon_index, :ref:`bool` one_way **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_collision_polygon_one_way_margin` **(** :ref:`int` layer_id, :ref:`int` polygon_index, :ref:`float` one_way_margin **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_collision_polygon_points` **(** :ref:`int` layer_id, :ref:`int` polygon_index, :ref:`PackedVector2Array` polygon **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_collision_polygons_count` **(** :ref:`int` layer_id, :ref:`int` polygons_count **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_constant_angular_velocity` **(** :ref:`int` layer_id, :ref:`float` velocity **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_constant_linear_velocity` **(** :ref:`int` layer_id, :ref:`Vector2` velocity **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_custom_data` **(** :ref:`String` layer_name, :ref:`Variant` value **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_custom_data_by_layer_id` **(** :ref:`int` layer_id, :ref:`Variant` value **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_navigation_polygon` **(** :ref:`int` layer_id, :ref:`NavigationPolygon` navigation_polygon **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_occluder` **(** :ref:`int` layer_id, :ref:`OccluderPolygon2D` occluder_polygon **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_terrain_peering_bit` **(** :ref:`CellNeighbor` peering_bit, :ref:`int` terrain **)** | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -429,10 +429,12 @@ Returns the custom data value for custom data layer with index ``layer_id``. .. rst-class:: classref-method -:ref:`NavigationPolygon` **get_navigation_polygon** **(** :ref:`int` layer_id **)** |const| +:ref:`NavigationPolygon` **get_navigation_polygon** **(** :ref:`int` layer_id, :ref:`bool` flip_h=false, :ref:`bool` flip_v=false, :ref:`bool` transpose=false **)** |const| Returns the navigation polygon of the tile for the TileSet navigation layer with index ``layer_id``. +\ ``flip_h``, ``flip_v``, and ``transpose`` allow transforming the returned polygon. + .. rst-class:: classref-item-separator ---- @@ -441,10 +443,12 @@ Returns the navigation polygon of the tile for the TileSet navigation layer with .. rst-class:: classref-method -:ref:`OccluderPolygon2D` **get_occluder** **(** :ref:`int` layer_id **)** |const| +:ref:`OccluderPolygon2D` **get_occluder** **(** :ref:`int` layer_id, :ref:`bool` flip_h=false, :ref:`bool` flip_v=false, :ref:`bool` transpose=false **)** |const| 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. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_tilesetatlassource.rst b/classes/class_tilesetatlassource.rst index 8b2f0d31f48..30624c3f5ee 100644 --- a/classes/class_tilesetatlassource.rst +++ b/classes/class_tilesetatlassource.rst @@ -431,7 +431,7 @@ Returns how many animation frames has the tile at coordinates ``atlas_coords``. :ref:`TileAnimationMode` **get_tile_animation_mode** **(** :ref:`Vector2i` atlas_coords **)** |const| -Returns the :ref:`TileAnimationMode` of the tile at ``atlas_coords``. See also :ref:`set_tile_animation_mode`. +Returns the tile animation mode of the tile at ``atlas_coords``. See also :ref:`set_tile_animation_mode`. .. rst-class:: classref-item-separator @@ -655,7 +655,7 @@ Sets how many animation frames the tile at coordinates ``atlas_coords`` has. void **set_tile_animation_mode** **(** :ref:`Vector2i` atlas_coords, :ref:`TileAnimationMode` mode **)** -Sets the :ref:`TileAnimationMode` of the tile at ``atlas_coords`` to ``mode``. See also :ref:`get_tile_animation_mode`. +Sets the tile animation mode of the tile at ``atlas_coords`` to ``mode``. See also :ref:`get_tile_animation_mode`. .. rst-class:: classref-item-separator diff --git a/classes/class_tree.rst b/classes/class_tree.rst index 5228f1d0cc3..f16b6fe4889 100644 --- a/classes/class_tree.rst +++ b/classes/class_tree.rst @@ -186,125 +186,133 @@ Theme Properties .. table:: :widths: auto - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color` | :ref:`children_hl_line_color` | ``Color(0.27, 0.27, 0.27, 1)`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color` | :ref:`custom_button_font_highlight` | ``Color(0.95, 0.95, 0.95, 1)`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color` | :ref:`drop_position_color` | ``Color(1, 1, 1, 1)`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color` | :ref:`font_color` | ``Color(0.7, 0.7, 0.7, 1)`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color` | :ref:`font_selected_color` | ``Color(1, 1, 1, 1)`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color` | :ref:`guide_color` | ``Color(0.7, 0.7, 0.7, 0.25)`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color` | :ref:`parent_hl_line_color` | ``Color(0.27, 0.27, 0.27, 1)`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color` | :ref:`relationship_line_color` | ``Color(0.27, 0.27, 0.27, 1)`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color` | :ref:`title_button_color` | ``Color(0.875, 0.875, 0.875, 1)`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`button_margin` | ``4`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`children_hl_line_width` | ``1`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`draw_guides` | ``1`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`draw_relationship_lines` | ``0`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`h_separation` | ``4`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`icon_max_width` | ``0`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`inner_item_margin_bottom` | ``0`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`inner_item_margin_left` | ``0`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`inner_item_margin_right` | ``0`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`inner_item_margin_top` | ``0`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`item_margin` | ``16`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`outline_size` | ``0`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`parent_hl_line_margin` | ``0`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`parent_hl_line_width` | ``1`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`relationship_line_width` | ``1`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`scroll_border` | ``4`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`scroll_speed` | ``12`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`scrollbar_h_separation` | ``4`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`scrollbar_margin_bottom` | ``-1`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`scrollbar_margin_left` | ``-1`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`scrollbar_margin_right` | ``-1`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`scrollbar_margin_top` | ``-1`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`scrollbar_v_separation` | ``4`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`v_separation` | ``4`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Font` | :ref:`font` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Font` | :ref:`title_button_font` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`font_size` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`title_button_font_size` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Texture2D` | :ref:`arrow` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Texture2D` | :ref:`arrow_collapsed` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Texture2D` | :ref:`arrow_collapsed_mirrored` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Texture2D` | :ref:`checked` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Texture2D` | :ref:`indeterminate` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Texture2D` | :ref:`select_arrow` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Texture2D` | :ref:`unchecked` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Texture2D` | :ref:`updown` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox` | :ref:`button_pressed` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox` | :ref:`cursor` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox` | :ref:`cursor_unfocused` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox` | :ref:`custom_button` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox` | :ref:`custom_button_hover` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox` | :ref:`custom_button_pressed` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox` | :ref:`focus` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox` | :ref:`panel` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox` | :ref:`selected` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox` | :ref:`selected_focus` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox` | :ref:`title_button_hover` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox` | :ref:`title_button_normal` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox` | :ref:`title_button_pressed` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`children_hl_line_color` | ``Color(0.27, 0.27, 0.27, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`custom_button_font_highlight` | ``Color(0.95, 0.95, 0.95, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`drop_position_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`font_color` | ``Color(0.7, 0.7, 0.7, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`font_disabled_color` | ``Color(0.875, 0.875, 0.875, 0.5)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`font_selected_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`guide_color` | ``Color(0.7, 0.7, 0.7, 0.25)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`parent_hl_line_color` | ``Color(0.27, 0.27, 0.27, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`relationship_line_color` | ``Color(0.27, 0.27, 0.27, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`title_button_color` | ``Color(0.875, 0.875, 0.875, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`button_margin` | ``4`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`children_hl_line_width` | ``1`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`draw_guides` | ``1`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`draw_relationship_lines` | ``0`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`h_separation` | ``4`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`icon_max_width` | ``0`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`inner_item_margin_bottom` | ``0`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`inner_item_margin_left` | ``0`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`inner_item_margin_right` | ``0`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`inner_item_margin_top` | ``0`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`item_margin` | ``16`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`outline_size` | ``0`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`parent_hl_line_margin` | ``0`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`parent_hl_line_width` | ``1`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`relationship_line_width` | ``1`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`scroll_border` | ``4`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`scroll_speed` | ``12`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`scrollbar_h_separation` | ``4`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`scrollbar_margin_bottom` | ``-1`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`scrollbar_margin_left` | ``-1`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`scrollbar_margin_right` | ``-1`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`scrollbar_margin_top` | ``-1`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`scrollbar_v_separation` | ``4`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`v_separation` | ``4`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Font` | :ref:`font` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Font` | :ref:`title_button_font` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`font_size` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`title_button_font_size` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D` | :ref:`arrow` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D` | :ref:`arrow_collapsed` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D` | :ref:`arrow_collapsed_mirrored` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D` | :ref:`checked` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D` | :ref:`checked_disabled` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D` | :ref:`indeterminate` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D` | :ref:`indeterminate_disabled` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D` | :ref:`select_arrow` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D` | :ref:`unchecked` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D` | :ref:`unchecked_disabled` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D` | :ref:`updown` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`button_pressed` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`cursor` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`cursor_unfocused` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`custom_button` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`custom_button_hover` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`custom_button_pressed` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`focus` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`panel` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`selected` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`selected_focus` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`title_button_hover` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`title_button_normal` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`title_button_pressed` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ .. rst-class:: classref-section-separator @@ -1344,6 +1352,18 @@ Default text :ref:`Color` of the item. ---- +.. _class_Tree_theme_color_font_disabled_color: + +.. rst-class:: classref-themeproperty + +:ref:`Color` **font_disabled_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` + +Text :ref:`Color` for a :ref:`TreeItem.CELL_MODE_CHECK` mode cell when it's non-editable (see :ref:`TreeItem.set_editable`). + +.. rst-class:: classref-item-separator + +---- + .. _class_Tree_theme_color_font_outline_color: .. rst-class:: classref-themeproperty @@ -1796,7 +1816,19 @@ The arrow icon used when a foldable item is collapsed (for right-to-left layouts :ref:`Texture2D` **checked** -The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK` mode cell is checked. +The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK` mode cell is checked and editable (see :ref:`TreeItem.set_editable`). + +.. rst-class:: classref-item-separator + +---- + +.. _class_Tree_theme_icon_checked_disabled: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **checked_disabled** + +The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK` mode cell is checked and non-editable (see :ref:`TreeItem.set_editable`). .. rst-class:: classref-item-separator @@ -1808,7 +1840,19 @@ The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK` **indeterminate** -The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK` mode cell is indeterminate. +The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK` mode cell is indeterminate and editable (see :ref:`TreeItem.set_editable`). + +.. rst-class:: classref-item-separator + +---- + +.. _class_Tree_theme_icon_indeterminate_disabled: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **indeterminate_disabled** + +The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK` mode cell is indeterminate and non-editable (see :ref:`TreeItem.set_editable`). .. rst-class:: classref-item-separator @@ -1832,7 +1876,19 @@ The arrow icon to display for the :ref:`TreeItem.CELL_MODE_RANGE` **unchecked** -The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK` mode cell is unchecked. +The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK` mode cell is unchecked and editable (see :ref:`TreeItem.set_editable`). + +.. rst-class:: classref-item-separator + +---- + +.. _class_Tree_theme_icon_unchecked_disabled: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **unchecked_disabled** + +The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK` mode cell is unchecked and non-editable (see :ref:`TreeItem.set_editable`). .. rst-class:: classref-item-separator diff --git a/classes/class_videostreamplayer.rst b/classes/class_videostreamplayer.rst index 901b798505b..79901416ab2 100644 --- a/classes/class_videostreamplayer.rst +++ b/classes/class_videostreamplayer.rst @@ -23,8 +23,6 @@ A control used for playback of :ref:`VideoStream` resources. Supported video formats are `Ogg Theora `__ (``.ogv``, :ref:`VideoStreamTheora`) and any format exposed via a GDExtension plugin. -\ **Note:** Due to a bug, VideoStreamPlayer does not support localization remapping yet. - \ **Warning:** On Web, video playback *will* perform poorly due to missing architecture-specific assembly optimizations. .. rst-class:: classref-introduction-group diff --git a/classes/class_viewport.rst b/classes/class_viewport.rst index 62d8d61b1e3..fcf3ee56d3a 100644 --- a/classes/class_viewport.rst +++ b/classes/class_viewport.rst @@ -191,6 +191,8 @@ Methods +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Control` | :ref:`gui_get_focus_owner` **(** **)** |const| | +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Control` | :ref:`gui_get_hovered_control` **(** **)** |const| | + +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`gui_is_drag_successful` **(** **)** |const| | +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`gui_is_dragging` **(** **)** |const| | @@ -768,7 +770,7 @@ enum **DefaultCanvasItemTextureFilter**: :ref:`DefaultCanvasItemTextureFilter` **DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST** = ``0`` -The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering, but the texture will look pixelized. +The texture filter reads from the nearest pixel only. This makes the texture look pixelated from up close, and grainy from a distance (due to mipmaps not being sampled). .. _class_Viewport_constant_DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR: @@ -776,7 +778,7 @@ The texture filter reads from the nearest pixel only. The simplest and fastest m :ref:`DefaultCanvasItemTextureFilter` **DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR** = ``1`` -The texture filter blends between the nearest 4 pixels. Use this when you want to avoid a pixelated style, but do not want mipmaps. +The texture filter blends between the nearest 4 pixels. This makes the texture look smooth from up close, and grainy from a distance (due to mipmaps not being sampled). .. _class_Viewport_constant_DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS: @@ -784,7 +786,9 @@ The texture filter blends between the nearest 4 pixels. Use this when you want t :ref:`DefaultCanvasItemTextureFilter` **DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS** = ``2`` -The texture filter reads from the nearest pixel in the nearest mipmap. The fastest way to read from textures with mipmaps. +The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``). This makes the texture look smooth from up close, and smooth from a distance. + +Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to :ref:`Camera2D` zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. .. _class_Viewport_constant_DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS: @@ -792,7 +796,9 @@ The texture filter reads from the nearest pixel in the nearest mipmap. The faste :ref:`DefaultCanvasItemTextureFilter` **DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS** = ``3`` -The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps. +The texture filter reads from the nearest pixel and blends between the nearest 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``). This makes the texture look pixelated from up close, and smooth from a distance. + +Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to :ref:`Camera2D` zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. .. _class_Viewport_constant_DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_MAX: @@ -1907,7 +1913,7 @@ Returns the mouse's position in this **Viewport** using the coordinate system of :ref:`PositionalShadowAtlasQuadrantSubdiv` **get_positional_shadow_atlas_quadrant_subdiv** **(** :ref:`int` quadrant **)** |const| -Returns the :ref:`PositionalShadowAtlasQuadrantSubdiv` of the specified quadrant. +Returns the positional shadow atlas quadrant subdivision of the specified quadrant. .. rst-class:: classref-item-separator @@ -2005,6 +2011,20 @@ Returns the :ref:`Control` having the focus within this viewport. ---- +.. _class_Viewport_method_gui_get_hovered_control: + +.. rst-class:: classref-method + +:ref:`Control` **gui_get_hovered_control** **(** **)** |const| + +Returns the :ref:`Control` that the mouse is currently hovering over in this viewport. If no :ref:`Control` has the cursor, returns null. + +Typically the leaf :ref:`Control` node or deepest level of the subtree which claims hover. This is very useful when used together with :ref:`Node.is_ancestor_of` to find if the mouse is within a control tree. + +.. rst-class:: classref-item-separator + +---- + .. _class_Viewport_method_gui_is_drag_successful: .. rst-class:: classref-method diff --git a/classes/class_visualshadernodetextureparameter.rst b/classes/class_visualshadernodetextureparameter.rst index 9ba2f704b75..b0baaedae4e 100644 --- a/classes/class_visualshadernodetextureparameter.rst +++ b/classes/class_visualshadernodetextureparameter.rst @@ -164,7 +164,7 @@ Sample the texture using the filter determined by the node this shader is attach :ref:`TextureFilter` **FILTER_NEAREST** = ``1`` -The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering, but the texture will look pixelized. +The texture filter reads from the nearest pixel only. This makes the texture look pixelated from up close, and grainy from a distance (due to mipmaps not being sampled). .. _class_VisualShaderNodeTextureParameter_constant_FILTER_LINEAR: @@ -172,7 +172,7 @@ The texture filter reads from the nearest pixel only. The simplest and fastest m :ref:`TextureFilter` **FILTER_LINEAR** = ``2`` -The texture filter blends between the nearest four pixels. Use this for most cases where you want to avoid a pixelated style. +The texture filter blends between the nearest 4 pixels. This makes the texture look smooth from up close, and grainy from a distance (due to mipmaps not being sampled). .. _class_VisualShaderNodeTextureParameter_constant_FILTER_NEAREST_MIPMAP: @@ -180,7 +180,9 @@ The texture filter blends between the nearest four pixels. Use this for most cas :ref:`TextureFilter` **FILTER_NEAREST_MIPMAP** = ``3`` -The texture filter reads from the nearest pixel in the nearest mipmap. This is the fastest way to read from textures with mipmaps. +The texture filter reads from the nearest pixel and blends between the nearest 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``). This makes the texture look pixelated from up close, and smooth from a distance. + +Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to :ref:`Camera2D` zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. .. _class_VisualShaderNodeTextureParameter_constant_FILTER_LINEAR_MIPMAP: @@ -188,7 +190,9 @@ The texture filter reads from the nearest pixel in the nearest mipmap. This is t :ref:`TextureFilter` **FILTER_LINEAR_MIPMAP** = ``4`` -The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps. Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to :ref:`Camera2D` zoom), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. +The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``). This makes the texture look smooth from up close, and smooth from a distance. + +Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to :ref:`Camera2D` zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. .. _class_VisualShaderNodeTextureParameter_constant_FILTER_NEAREST_MIPMAP_ANISOTROPIC: @@ -196,9 +200,9 @@ The texture filter blends between the nearest 4 pixels and between the nearest 2 :ref:`TextureFilter` **FILTER_NEAREST_MIPMAP_ANISOTROPIC** = ``5`` -The texture filter reads from the nearest pixel, but selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. +The texture filter reads from the nearest pixel and blends between 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``) based on the angle between the surface and the camera view. This makes the texture look pixelated from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. -\ **Note:** This texture filter is rarely useful in 2D projects. :ref:`FILTER_LINEAR_MIPMAP` is usually more appropriate. +\ **Note:** This texture filter is rarely useful in 2D projects. :ref:`FILTER_NEAREST_MIPMAP` is usually more appropriate in this case. .. _class_VisualShaderNodeTextureParameter_constant_FILTER_LINEAR_MIPMAP_ANISOTROPIC: @@ -206,9 +210,9 @@ The texture filter reads from the nearest pixel, but selects a mipmap based on t :ref:`TextureFilter` **FILTER_LINEAR_MIPMAP_ANISOTROPIC** = ``6`` -The texture filter blends between the nearest 4 pixels and selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. This is the slowest of the filtering options, but results in the highest quality texturing. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. +The texture filter blends between the nearest 4 pixels and blends between 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``) based on the angle between the surface and the camera view. This makes the texture look smooth from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. -\ **Note:** This texture filter is rarely useful in 2D projects. :ref:`FILTER_LINEAR_MIPMAP` is usually more appropriate. +\ **Note:** This texture filter is rarely useful in 2D projects. :ref:`FILTER_LINEAR_MIPMAP` is usually more appropriate in this case. .. _class_VisualShaderNodeTextureParameter_constant_FILTER_MAX: diff --git a/classes/class_webrtcpeerconnection.rst b/classes/class_webrtcpeerconnection.rst index 7188fdf4a9a..bbde093947d 100644 --- a/classes/class_webrtcpeerconnection.rst +++ b/classes/class_webrtcpeerconnection.rst @@ -376,7 +376,7 @@ Returns the ICE :ref:`GatheringState` :ref:`SignalingState` **get_signaling_state** **(** **)** |const| -Returns the :ref:`SignalingState` on the local end of the connection while connecting or reconnecting to another peer. +Returns the signaling state on the local end of the connection while connecting or reconnecting to another peer. .. rst-class:: classref-item-separator diff --git a/classes/class_xrinterface.rst b/classes/class_xrinterface.rst index c535049adbd..09cd1f9cfeb 100644 --- a/classes/class_xrinterface.rst +++ b/classes/class_xrinterface.rst @@ -610,7 +610,7 @@ Is ``true`` if this interface supports passthrough. Sets the active environment blend mode. -\ ``mode`` is the :ref:`EnvironmentBlendMode` starting with the next frame. +\ ``mode`` is the environment blend mode starting with the next frame. \ **Note:** Not all runtimes support all environment blend modes, so it is important to check this at startup. For example: diff --git a/classes/class_xrinterfaceextension.rst b/classes/class_xrinterfaceextension.rst index ede44829506..d0de1b03526 100644 --- a/classes/class_xrinterfaceextension.rst +++ b/classes/class_xrinterfaceextension.rst @@ -233,7 +233,7 @@ Returns an :ref:`PackedVector3Array` that denotes the :ref:`PlayAreaMode` **_get_play_area_mode** **(** **)** |virtual| |const| -Returns the :ref:`PlayAreaMode` that sets up our play area. +Returns the play area mode that sets up our play area. .. rst-class:: classref-item-separator