diff --git a/classes/class_@globalscope.rst b/classes/class_@globalscope.rst index a1308bea25e..2e072c6768f 100644 --- a/classes/class_@globalscope.rst +++ b/classes/class_@globalscope.rst @@ -3878,7 +3878,7 @@ The property is not stored, and does not display in the editor. This is the defa :ref:`PropertyUsageFlags` **PROPERTY_USAGE_STORAGE** = ``2`` -The property is serialized and saved in the scene file (default). +The property is serialized and saved in the scene file (default for exported properties). .. _class_@GlobalScope_constant_PROPERTY_USAGE_EDITOR: @@ -3886,7 +3886,7 @@ The property is serialized and saved in the scene file (default). :ref:`PropertyUsageFlags` **PROPERTY_USAGE_EDITOR** = ``4`` -The property is shown in the :ref:`EditorInspector` (default). +The property is shown in the :ref:`EditorInspector` (default for exported properties). .. _class_@GlobalScope_constant_PROPERTY_USAGE_INTERNAL: diff --git a/classes/class_aabb.rst b/classes/class_aabb.rst index 9a6fc2a5519..4c35ba984c8 100644 --- a/classes/class_aabb.rst +++ b/classes/class_aabb.rst @@ -441,7 +441,7 @@ For an example, see :ref:`get_longest_axis`. :ref:`Vector3` **get_shortest_axis**\ (\ ) |const| :ref:`🔗` -Returns the shortest normaalized axis of this bounding box's :ref:`size`, as a :ref:`Vector3` (:ref:`Vector3.RIGHT`, :ref:`Vector3.UP`, or :ref:`Vector3.BACK`). +Returns the shortest normalized axis of this bounding box's :ref:`size`, as a :ref:`Vector3` (:ref:`Vector3.RIGHT`, :ref:`Vector3.UP`, or :ref:`Vector3.BACK`). .. tabs:: diff --git a/classes/class_atlastexture.rst b/classes/class_atlastexture.rst index 42228a2387e..70457128a5c 100644 --- a/classes/class_atlastexture.rst +++ b/classes/class_atlastexture.rst @@ -116,7 +116,7 @@ The margin around the :ref:`region`. Useful - |void| **set_region**\ (\ value\: :ref:`Rect2`\ ) - :ref:`Rect2` **get_region**\ (\ ) -The region used to draw the :ref:`atlas`. +The region used to draw the :ref:`atlas`. If either dimension of the region's size is ``0``, the value from :ref:`atlas` size will be used for that axis instead. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_canvasitem.rst b/classes/class_canvasitem.rst index 96b02972e46..d5412e78e24 100644 --- a/classes/class_canvasitem.rst +++ b/classes/class_canvasitem.rst @@ -1470,6 +1470,8 @@ Returns ``true`` if global transform notifications are communicated to children. Returns ``true`` if the node is present in the :ref:`SceneTree`, its :ref:`visible` property is ``true`` and all its ancestors are also visible. If any ancestor is hidden, this node will not be visible in the scene tree, and is therefore not drawn (see :ref:`_draw`). +Visibility is checked only in parent nodes that inherit from **CanvasItem**, :ref:`CanvasLayer`, and :ref:`Window`. If the parent is of any other type (such as :ref:`Node`, :ref:`AnimationPlayer`, or :ref:`Node3D`), it is assumed to be visible. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_displayserver.rst b/classes/class_displayserver.rst index 069dc41ba27..86ce5173f49 100644 --- a/classes/class_displayserver.rst +++ b/classes/class_displayserver.rst @@ -190,6 +190,8 @@ Methods +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`global_menu_set_popup_callbacks`\ (\ menu_root\: :ref:`String`, open_callback\: :ref:`Callable`, close_callback\: :ref:`Callable`\ ) | +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_additional_outputs`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_feature`\ (\ feature\: :ref:`Feature`\ ) |const| | +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`help_set_search_callbacks`\ (\ search_callback\: :ref:`Callable`, action_callback\: :ref:`Callable`\ ) | @@ -230,6 +232,8 @@ Methods +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`process_events`\ (\ ) | +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`register_additional_output`\ (\ object\: :ref:`Object`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`screen_get_dpi`\ (\ screen\: :ref:`int` = -1\ ) |const| | +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Image` | :ref:`screen_get_image`\ (\ screen\: :ref:`int` = -1\ ) |const| | @@ -298,6 +302,8 @@ Methods +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`tts_stop`\ (\ ) | +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`unregister_additional_output`\ (\ object\: :ref:`Object`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`virtual_keyboard_get_height`\ (\ ) |const| | +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`virtual_keyboard_hide`\ (\ ) | @@ -1508,6 +1514,8 @@ Returns the user's clipboard as a string if possible. Returns the user's clipboard as an image if possible. +\ **Note:** This method uses the copied pixel data, e.g. from a image editing software or a web browser, not an image file copied from file explorer. + .. rst-class:: classref-item-separator ---- @@ -2875,6 +2883,18 @@ Registers callables to emit when the menu is respectively about to show or close ---- +.. _class_DisplayServer_method_has_additional_outputs: + +.. rst-class:: classref-method + +:ref:`bool` **has_additional_outputs**\ (\ ) |const| :ref:`🔗` + +Returns ``true`` if any additional outputs have been registered via :ref:`register_additional_output`. + +.. rst-class:: classref-item-separator + +---- + .. _class_DisplayServer_method_has_feature: .. rst-class:: classref-method @@ -3143,6 +3163,20 @@ Perform window manager processing, including input flushing. See also :ref:`forc ---- +.. _class_DisplayServer_method_register_additional_output: + +.. rst-class:: classref-method + +|void| **register_additional_output**\ (\ object\: :ref:`Object`\ ) :ref:`🔗` + +Registers an :ref:`Object` which represents an additional output that will be rendered too, beyond normal windows. The :ref:`Object` is only used as an identifier, which can be later passed to :ref:`unregister_additional_output`. + +This can be used to prevent Godot from skipping rendering when no normal windows are visible. + +.. rst-class:: classref-item-separator + +---- + .. _class_DisplayServer_method_screen_get_dpi: .. rst-class:: classref-method @@ -3713,6 +3747,18 @@ Stops synthesis in progress and removes all utterances from the queue. ---- +.. _class_DisplayServer_method_unregister_additional_output: + +.. rst-class:: classref-method + +|void| **unregister_additional_output**\ (\ object\: :ref:`Object`\ ) :ref:`🔗` + +Unregisters an :ref:`Object` representing an additional output, that was registered via :ref:`register_additional_output`. + +.. rst-class:: classref-item-separator + +---- + .. _class_DisplayServer_method_virtual_keyboard_get_height: .. rst-class:: classref-method diff --git a/classes/class_editorfilesystem.rst b/classes/class_editorfilesystem.rst index b144a8ac710..88106cc11bb 100644 --- a/classes/class_editorfilesystem.rst +++ b/classes/class_editorfilesystem.rst @@ -84,6 +84,18 @@ Emitted if a resource is reimported. ---- +.. _class_EditorFileSystem_signal_resources_reimporting: + +.. rst-class:: classref-signal + +**resources_reimporting**\ (\ resources\: :ref:`PackedStringArray`\ ) :ref:`🔗` + +Emitted before a resource is reimported. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorFileSystem_signal_resources_reload: .. rst-class:: classref-signal diff --git a/classes/class_editorsettings.rst b/classes/class_editorsettings.rst index e7e58f23a65..7f5acd3e040 100644 --- a/classes/class_editorsettings.rst +++ b/classes/class_editorsettings.rst @@ -307,6 +307,10 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`filesystem/tools/oidn/oidn_denoise_path` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`input/buffering/agile_event_flushing` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`input/buffering/use_accumulated_input` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`interface/editor/accept_dialog_cancel_ok_buttons` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`interface/editor/automatically_open_screenshots` | @@ -2361,6 +2365,38 @@ To enable this feature for your specific project, use :ref:`ProjectSettings.rend ---- +.. _class_EditorSettings_property_input/buffering/agile_event_flushing: + +.. rst-class:: classref-property + +:ref:`bool` **input/buffering/agile_event_flushing** :ref:`🔗` + +If ``true``, input events will be flushed just before every idle and physics frame. + +If ``false``, these events will be flushed only once per process frame, between iterations of the engine. + +Enabling this setting can greatly improve input responsiveness, especially in devices that struggle to run at the project's intended frame rate. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_input/buffering/use_accumulated_input: + +.. rst-class:: classref-property + +:ref:`bool` **input/buffering/use_accumulated_input** :ref:`🔗` + +If ``true``, similar input events sent by the operating system are accumulated. When input accumulation is enabled, all input events generated during a frame will be merged and emitted when the frame is done rendering. Therefore, this limits the number of input method calls per second to the rendering FPS. + +Input accumulation can be disabled to get slightly more precise/reactive input at the cost of increased CPU usage. + +\ **Note:** Input accumulation is *enabled* by default. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_interface/editor/accept_dialog_cancel_ok_buttons: .. rst-class:: classref-property diff --git a/classes/class_enetconnection.rst b/classes/class_enetconnection.rst index 2e2647a6fc2..17c90a4f97a 100644 --- a/classes/class_enetconnection.rst +++ b/classes/class_enetconnection.rst @@ -290,7 +290,7 @@ Sets the compression method used for network packets. These have different trade Initiates a connection to a foreign ``address`` using the specified ``port`` and allocating the requested ``channels``. Optional ``data`` can be passed during connection in the form of a 32 bit integer. -\ **Note:** You must call either :ref:`create_host` or :ref:`create_host_bound` before calling this method. +\ **Note:** You must call either :ref:`create_host` or :ref:`create_host_bound` on both ends before calling this method. .. rst-class:: classref-item-separator @@ -302,7 +302,11 @@ Initiates a connection to a foreign ``address`` using the specified ``port`` and :ref:`Error` **create_host**\ (\ max_peers\: :ref:`int` = 32, max_channels\: :ref:`int` = 0, in_bandwidth\: :ref:`int` = 0, out_bandwidth\: :ref:`int` = 0\ ) :ref:`🔗` -Create an ENetHost that will allow up to ``max_peers`` connected peers, each allocating up to ``max_channels`` channels, optionally limiting bandwidth to ``in_bandwidth`` and ``out_bandwidth``. +Creates an ENetHost that allows up to ``max_peers`` connected peers, each allocating up to ``max_channels`` channels, optionally limiting bandwidth to ``in_bandwidth`` and ``out_bandwidth`` (if greater than zero). + +This method binds a random available dynamic UDP port on the host machine at the *unspecified* address. Use :ref:`create_host_bound` to specify the address and port. + +\ **Note:** It is necessary to create a host in both client and server in order to establish a connection. .. rst-class:: classref-item-separator @@ -314,7 +318,9 @@ Create an ENetHost that will allow up to ``max_peers`` connected peers, each all :ref:`Error` **create_host_bound**\ (\ bind_address\: :ref:`String`, bind_port\: :ref:`int`, max_peers\: :ref:`int` = 32, max_channels\: :ref:`int` = 0, in_bandwidth\: :ref:`int` = 0, out_bandwidth\: :ref:`int` = 0\ ) :ref:`🔗` -Create an ENetHost like :ref:`create_host` which is also bound to the given ``bind_address`` and ``bind_port``. +Creates an ENetHost bound to the given ``bind_address`` and ``bind_port`` that allows up to ``max_peers`` connected peers, each allocating up to ``max_channels`` channels, optionally limiting bandwidth to ``in_bandwidth`` and ``out_bandwidth`` (if greater than zero). + +\ **Note:** It is necessary to create a host in both client and server in order to establish a connection. .. rst-class:: classref-item-separator @@ -438,10 +444,12 @@ Configures the DTLS server to automatically drop new connections. :ref:`Array` **service**\ (\ timeout\: :ref:`int` = 0\ ) :ref:`🔗` -Waits for events on the specified host and shuttles packets between the host and its peers, with the given ``timeout`` (in milliseconds). The returned :ref:`Array` will have 4 elements. An :ref:`EventType`, the :ref:`ENetPacketPeer` which generated the event, the event associated data (if any), the event associated channel (if any). If the generated event is :ref:`EVENT_RECEIVE`, the received packet will be queued to the associated :ref:`ENetPacketPeer`. +Waits for events on this connection and shuttles packets between the host and its peers, with the given ``timeout`` (in milliseconds). The returned :ref:`Array` will have 4 elements. An :ref:`EventType`, the :ref:`ENetPacketPeer` which generated the event, the event associated data (if any), the event associated channel (if any). If the generated event is :ref:`EVENT_RECEIVE`, the received packet will be queued to the associated :ref:`ENetPacketPeer`. Call this function regularly to handle connections, disconnections, and to receive new packets. +\ **Note:** This method must be called on both ends involved in the event (sending and receiving hosts). + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_lightmapgi.rst b/classes/class_lightmapgi.rst index 94ffc9b8123..aa78fa38d16 100644 --- a/classes/class_lightmapgi.rst +++ b/classes/class_lightmapgi.rst @@ -273,6 +273,22 @@ The user aborted the lightmap baking operation (typically by clicking the **Canc Lightmap baking failed as the maximum texture size is too small to fit some of the meshes marked for baking. +.. _class_LightmapGI_constant_BAKE_ERROR_LIGHTMAP_TOO_SMALL: + +.. rst-class:: classref-enumeration-constant + +:ref:`BakeError` **BAKE_ERROR_LIGHTMAP_TOO_SMALL** = ``10`` + +Lightmap baking failed as the lightmap is too small. + +.. _class_LightmapGI_constant_BAKE_ERROR_ATLAS_TOO_SMALL: + +.. rst-class:: classref-enumeration-constant + +:ref:`BakeError` **BAKE_ERROR_ATLAS_TOO_SMALL** = ``11`` + +Lightmap baking failed as the lightmap was unable to fit into an atlas. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_node.rst b/classes/class_node.rst index e6c2af5e0eb..318db3705a8 100644 --- a/classes/class_node.rst +++ b/classes/class_node.rst @@ -971,7 +971,7 @@ Implemented on desktop platforms. Notification received from the OS when a go back request is sent (e.g. pressing the "Back" button on Android). -Implemented only on iOS. +Implemented only on Android. .. _class_Node_constant_NOTIFICATION_WM_SIZE_CHANGED: diff --git a/classes/class_parallax2d.rst b/classes/class_parallax2d.rst index a8d7337406c..98bf826682d 100644 --- a/classes/class_parallax2d.rst +++ b/classes/class_parallax2d.rst @@ -25,6 +25,13 @@ A **Parallax2D** is used to create a parallax effect. It can move at a different \ **Note:** Any changes to this node's position made after it enters the scene tree will be overridden if :ref:`ignore_camera_scroll` is ``false`` or :ref:`screen_offset` is modified. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`2D Parallax <../tutorials/2d/2d_parallax>` + .. rst-class:: classref-reftable-group Properties diff --git a/classes/class_projectsettings.rst b/classes/class_projectsettings.rst index 9c12aa19398..be606a64b82 100644 --- a/classes/class_projectsettings.rst +++ b/classes/class_projectsettings.rst @@ -707,10 +707,6 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`input_devices/buffering/agile_event_flushing` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`input_devices/buffering/android/use_accumulated_input` | ``true`` | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`input_devices/buffering/android/use_input_buffering` | ``true`` | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`input_devices/compatibility/legacy_just_pressed_behavior` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`input_devices/pen_tablet/driver` | | @@ -6028,30 +6024,6 @@ Enabling this can greatly improve the responsiveness to input, specially in devi ---- -.. _class_ProjectSettings_property_input_devices/buffering/android/use_accumulated_input: - -.. rst-class:: classref-property - -:ref:`bool` **input_devices/buffering/android/use_accumulated_input** = ``true`` :ref:`🔗` - -If ``true``, multiple input events will be accumulated into a single input event when possible. - -.. rst-class:: classref-item-separator - ----- - -.. _class_ProjectSettings_property_input_devices/buffering/android/use_input_buffering: - -.. rst-class:: classref-property - -:ref:`bool` **input_devices/buffering/android/use_input_buffering** = ``true`` :ref:`🔗` - -If ``true``, input events will be buffered prior to being dispatched. - -.. rst-class:: classref-item-separator - ----- - .. _class_ProjectSettings_property_input_devices/compatibility/legacy_just_pressed_behavior: .. rst-class:: classref-property diff --git a/classes/class_renderingdevice.rst b/classes/class_renderingdevice.rst index bb7434a72d5..d7e988760f8 100644 --- a/classes/class_renderingdevice.rst +++ b/classes/class_renderingdevice.rst @@ -1719,7 +1719,7 @@ VRAM-compressed signed red/green channel data format with normalized value. Valu :ref:`DataFormat` **DATA_FORMAT_BC6H_UFLOAT_BLOCK** = ``142`` -VRAM-compressed unsigned red/green/blue channel data format with the floating-point value stored as-is. The format's precision is 8 bits of red channel and 8 bits of green channel. Using BC6H texture compression (also known as BPTC HDR). +VRAM-compressed unsigned red/green/blue channel data format with the floating-point value stored as-is. The format's precision is between 10 and 13 bits for the red/green/blue channels. Using BC6H texture compression (also known as BPTC HDR). .. _class_RenderingDevice_constant_DATA_FORMAT_BC6H_SFLOAT_BLOCK: @@ -1727,7 +1727,7 @@ VRAM-compressed unsigned red/green/blue channel data format with the floating-po :ref:`DataFormat` **DATA_FORMAT_BC6H_SFLOAT_BLOCK** = ``143`` -VRAM-compressed signed red/green/blue channel data format with the floating-point value stored as-is. The format's precision is between 4 and 7 bits for the red/green/blue channels and between 0 and 8 bits for the alpha channel. Using BC7 texture compression (also known as BPTC HDR). +VRAM-compressed signed red/green/blue channel data format with the floating-point value stored as-is. The format's precision is between 10 and 13 bits for the red/green/blue channels. Using BC6H texture compression (also known as BPTC HDR). .. _class_RenderingDevice_constant_DATA_FORMAT_BC7_UNORM_BLOCK: @@ -1807,7 +1807,7 @@ VRAM-compressed unsigned red/green/blue/alpha channel data format with normalize :ref:`DataFormat` **DATA_FORMAT_EAC_R11_SNORM_BLOCK** = ``153`` -11-bit VRAM-compressed signed red channel data format with normalized value. Values are in the ``[0.0, 1.0]`` range. Using ETC2 texture compression. +11-bit VRAM-compressed signed red channel data format with normalized value. Values are in the ``[-1.0, 1.0]`` range. Using ETC2 texture compression. .. _class_RenderingDevice_constant_DATA_FORMAT_EAC_R11G11_UNORM_BLOCK: @@ -1823,7 +1823,7 @@ VRAM-compressed unsigned red/green/blue/alpha channel data format with normalize :ref:`DataFormat` **DATA_FORMAT_EAC_R11G11_SNORM_BLOCK** = ``155`` -11-bit VRAM-compressed signed red/green channel data format with normalized value. Values are in the ``[0.0, 1.0]`` range. Using ETC2 texture compression. +11-bit VRAM-compressed signed red/green channel data format with normalized value. Values are in the ``[-1.0, 1.0]`` range. Using ETC2 texture compression. .. _class_RenderingDevice_constant_DATA_FORMAT_ASTC_4x4_UNORM_BLOCK: diff --git a/classes/class_renderscenebuffersrd.rst b/classes/class_renderscenebuffersrd.rst index 44cf432275c..7989b651241 100644 --- a/classes/class_renderscenebuffersrd.rst +++ b/classes/class_renderscenebuffersrd.rst @@ -35,49 +35,61 @@ Methods .. table:: :widths: auto - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`clear_context`\ (\ context\: :ref:`StringName`\ ) | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`create_texture`\ (\ context\: :ref:`StringName`, name\: :ref:`StringName`, data_format\: :ref:`DataFormat`, usage_bits\: :ref:`int`, texture_samples\: :ref:`TextureSamples`, size\: :ref:`Vector2i`, layers\: :ref:`int`, mipmaps\: :ref:`int`, unique\: :ref:`bool`\ ) | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`create_texture_from_format`\ (\ context\: :ref:`StringName`, name\: :ref:`StringName`, format\: :ref:`RDTextureFormat`, view\: :ref:`RDTextureView`, unique\: :ref:`bool`\ ) | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`create_texture_view`\ (\ context\: :ref:`StringName`, name\: :ref:`StringName`, view_name\: :ref:`StringName`, view\: :ref:`RDTextureView`\ ) | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_color_layer`\ (\ layer\: :ref:`int`, msaa\: :ref:`bool` = false\ ) | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_color_texture`\ (\ msaa\: :ref:`bool` = false\ ) | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_depth_layer`\ (\ layer\: :ref:`int`, msaa\: :ref:`bool` = false\ ) | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_depth_texture`\ (\ msaa\: :ref:`bool` = false\ ) | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i` | :ref:`get_internal_size`\ (\ ) |const| | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ViewportMSAA` | :ref:`get_msaa_3d`\ (\ ) |const| | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_render_target`\ (\ ) |const| | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_texture`\ (\ context\: :ref:`StringName`, name\: :ref:`StringName`\ ) |const| | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RDTextureFormat` | :ref:`get_texture_format`\ (\ context\: :ref:`StringName`, name\: :ref:`StringName`\ ) |const| | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_texture_slice`\ (\ context\: :ref:`StringName`, name\: :ref:`StringName`, layer\: :ref:`int`, mipmap\: :ref:`int`, layers\: :ref:`int`, mipmaps\: :ref:`int`\ ) | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i` | :ref:`get_texture_slice_size`\ (\ context\: :ref:`StringName`, name\: :ref:`StringName`, mipmap\: :ref:`int`\ ) | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_texture_slice_view`\ (\ context\: :ref:`StringName`, name\: :ref:`StringName`, layer\: :ref:`int`, mipmap\: :ref:`int`, layers\: :ref:`int`, mipmaps\: :ref:`int`, view\: :ref:`RDTextureView`\ ) | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_use_taa`\ (\ ) |const| | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_velocity_layer`\ (\ layer\: :ref:`int`, msaa\: :ref:`bool` = false\ ) | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_velocity_texture`\ (\ msaa\: :ref:`bool` = false\ ) | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_view_count`\ (\ ) |const| | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_texture`\ (\ context\: :ref:`StringName`, name\: :ref:`StringName`\ ) |const| | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_context`\ (\ context\: :ref:`StringName`\ ) | + +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`create_texture`\ (\ context\: :ref:`StringName`, name\: :ref:`StringName`, data_format\: :ref:`DataFormat`, usage_bits\: :ref:`int`, texture_samples\: :ref:`TextureSamples`, size\: :ref:`Vector2i`, layers\: :ref:`int`, mipmaps\: :ref:`int`, unique\: :ref:`bool`\ ) | + +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`create_texture_from_format`\ (\ context\: :ref:`StringName`, name\: :ref:`StringName`, format\: :ref:`RDTextureFormat`, view\: :ref:`RDTextureView`, unique\: :ref:`bool`\ ) | + +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`create_texture_view`\ (\ context\: :ref:`StringName`, name\: :ref:`StringName`, view_name\: :ref:`StringName`, view\: :ref:`RDTextureView`\ ) | + +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_color_layer`\ (\ layer\: :ref:`int`, msaa\: :ref:`bool` = false\ ) | + +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_color_texture`\ (\ msaa\: :ref:`bool` = false\ ) | + +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_depth_layer`\ (\ layer\: :ref:`int`, msaa\: :ref:`bool` = false\ ) | + +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_depth_texture`\ (\ msaa\: :ref:`bool` = false\ ) | + +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_fsr_sharpness`\ (\ ) |const| | + +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`get_internal_size`\ (\ ) |const| | + +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ViewportMSAA` | :ref:`get_msaa_3d`\ (\ ) |const| | + +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_render_target`\ (\ ) |const| | + +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ViewportScaling3DMode` | :ref:`get_scaling_3d_mode`\ (\ ) |const| | + +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ViewportScreenSpaceAA` | :ref:`get_screen_space_aa`\ (\ ) |const| | + +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`get_target_size`\ (\ ) |const| | + +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_texture`\ (\ context\: :ref:`StringName`, name\: :ref:`StringName`\ ) |const| | + +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RDTextureFormat` | :ref:`get_texture_format`\ (\ context\: :ref:`StringName`, name\: :ref:`StringName`\ ) |const| | + +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TextureSamples` | :ref:`get_texture_samples`\ (\ ) |const| | + +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_texture_slice`\ (\ context\: :ref:`StringName`, name\: :ref:`StringName`, layer\: :ref:`int`, mipmap\: :ref:`int`, layers\: :ref:`int`, mipmaps\: :ref:`int`\ ) | + +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`get_texture_slice_size`\ (\ context\: :ref:`StringName`, name\: :ref:`StringName`, mipmap\: :ref:`int`\ ) | + +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_texture_slice_view`\ (\ context\: :ref:`StringName`, name\: :ref:`StringName`, layer\: :ref:`int`, mipmap\: :ref:`int`, layers\: :ref:`int`, mipmaps\: :ref:`int`, view\: :ref:`RDTextureView`\ ) | + +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_use_debanding`\ (\ ) |const| | + +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_use_taa`\ (\ ) |const| | + +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_velocity_layer`\ (\ layer\: :ref:`int`, msaa\: :ref:`bool` = false\ ) | + +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_velocity_texture`\ (\ msaa\: :ref:`bool` = false\ ) | + +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_view_count`\ (\ ) |const| | + +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_texture`\ (\ context\: :ref:`StringName`, name\: :ref:`StringName`\ ) |const| | + +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -192,6 +204,18 @@ If ``msaa`` is **true** and MSAA is enabled, this returns the MSAA variant of th ---- +.. _class_RenderSceneBuffersRD_method_get_fsr_sharpness: + +.. rst-class:: classref-method + +:ref:`float` **get_fsr_sharpness**\ (\ ) |const| :ref:`🔗` + +Returns the FSR sharpness value used while rendering the 3D content (if :ref:`get_scaling_3d_mode` is an FSR mode). + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderSceneBuffersRD_method_get_internal_size: .. rst-class:: classref-method @@ -228,6 +252,42 @@ Returns the render target associated with this buffers object. ---- +.. _class_RenderSceneBuffersRD_method_get_scaling_3d_mode: + +.. rst-class:: classref-method + +:ref:`ViewportScaling3DMode` **get_scaling_3d_mode**\ (\ ) |const| :ref:`🔗` + +Returns the scaling mode used for upscaling. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneBuffersRD_method_get_screen_space_aa: + +.. rst-class:: classref-method + +:ref:`ViewportScreenSpaceAA` **get_screen_space_aa**\ (\ ) |const| :ref:`🔗` + +Returns the screen-space antialiasing method applied. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneBuffersRD_method_get_target_size: + +.. rst-class:: classref-method + +:ref:`Vector2i` **get_target_size**\ (\ ) |const| :ref:`🔗` + +Returns the target size of the render buffer (size after upscaling). + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderSceneBuffersRD_method_get_texture: .. rst-class:: classref-method @@ -252,6 +312,18 @@ Returns the texture format information with which a cached texture was created. ---- +.. _class_RenderSceneBuffersRD_method_get_texture_samples: + +.. rst-class:: classref-method + +:ref:`TextureSamples` **get_texture_samples**\ (\ ) |const| :ref:`🔗` + +Returns the number of MSAA samples used. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderSceneBuffersRD_method_get_texture_slice: .. rst-class:: classref-method @@ -288,6 +360,18 @@ Returns a specific view of a slice (layer or mipmap) for a cached texture. ---- +.. _class_RenderSceneBuffersRD_method_get_use_debanding: + +.. rst-class:: classref-method + +:ref:`bool` **get_use_debanding**\ (\ ) |const| :ref:`🔗` + +Returns ``true`` if debanding is enabled. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderSceneBuffersRD_method_get_use_taa: .. rst-class:: classref-method diff --git a/classes/class_resource.rst b/classes/class_resource.rst index 14f3dd0285e..830345729a1 100644 --- a/classes/class_resource.rst +++ b/classes/class_resource.rst @@ -254,9 +254,15 @@ Override this method to customize the newly duplicated resource created from :re Duplicates this resource, returning a new resource with its ``export``\ ed or :ref:`@GlobalScope.PROPERTY_USAGE_STORAGE` properties copied from the original. -If ``subresources`` is ``false``, a shallow copy is returned; nested resources within subresources are not duplicated and are shared from the original resource. If ``subresources`` is ``true``, a deep copy is returned; nested subresources will be duplicated and are not shared. +If ``subresources`` is ``false``, a shallow copy is returned; nested resources within subresources are not duplicated and are shared with the original resource (with one exception; see below). If ``subresources`` is ``true``, a deep copy is returned; nested subresources will be duplicated and are not shared (with two exceptions; see below). -Subresource properties with the :ref:`@GlobalScope.PROPERTY_USAGE_ALWAYS_DUPLICATE` flag are always duplicated even with ``subresources`` set to ``false``, and properties with the :ref:`@GlobalScope.PROPERTY_USAGE_NEVER_DUPLICATE` flag are never duplicated even with ``subresources`` set to ``true``. +\ ``subresources`` is usually respected, with the following exceptions: + +- Subresource properties with the :ref:`@GlobalScope.PROPERTY_USAGE_ALWAYS_DUPLICATE` flag are always duplicated. + +- Subresource properties with the :ref:`@GlobalScope.PROPERTY_USAGE_NEVER_DUPLICATE` flag are never duplicated. + +- Subresources inside :ref:`Array` and :ref:`Dictionary` properties are never duplicated. \ **Note:** For custom resources, this method will fail if :ref:`Object._init` has been defined with required parameters. diff --git a/classes/class_script.rst b/classes/class_script.rst index e65cc33bc26..ddb6b6145ea 100644 --- a/classes/class_script.rst +++ b/classes/class_script.rst @@ -266,6 +266,8 @@ Returns ``true`` if the script, or a base class, defines a signal with the given Returns ``true`` if the script contains non-empty source code. +\ **Note:** If a script does not have source code, this does not mean that it is invalid or unusable. For example, a :ref:`GDScript` that was exported with binary tokenization has no source code, but still behaves as expected and could be instantiated. This can be checked with :ref:`can_instantiate`. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_skeleton3d.rst b/classes/class_skeleton3d.rst index 841f6b1af75..bd90a50ffac 100644 --- a/classes/class_skeleton3d.rst +++ b/classes/class_skeleton3d.rst @@ -40,6 +40,8 @@ Properties .. table:: :widths: auto + +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`animate_physical_bones` | ``true`` | +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+-----------+ | :ref:`ModifierCallbackModeProcess` | :ref:`modifier_callback_mode_process` | ``1`` | +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+-----------+ @@ -71,8 +73,6 @@ Methods +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`force_update_bone_child_transform`\ (\ bone_idx\: :ref:`int`\ ) | +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_animate_physical_bones`\ (\ ) |const| | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedInt32Array` | :ref:`get_bone_children`\ (\ bone_idx\: :ref:`int`\ ) |const| | +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_bone_count`\ (\ ) |const| | @@ -123,8 +123,6 @@ Methods +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`reset_bone_poses`\ (\ ) | +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_animate_physical_bones`\ (\ enabled\: :ref:`bool`\ ) | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_bone_enabled`\ (\ bone_idx\: :ref:`int`, enabled\: :ref:`bool` = true\ ) | +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_bone_global_pose`\ (\ bone_idx\: :ref:`int`, pose\: :ref:`Transform3D`\ ) | @@ -276,6 +274,27 @@ Notification received when this skeleton's pose needs to be updated. In that cas Property Descriptions --------------------- +.. _class_Skeleton3D_property_animate_physical_bones: + +.. rst-class:: classref-property + +:ref:`bool` **animate_physical_bones** = ``true`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_animate_physical_bones**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_animate_physical_bones**\ (\ ) + +**Deprecated:** This property may be changed or removed in future versions. + +If you follow the recommended workflow and explicitly have :ref:`PhysicalBoneSimulator3D` as a child of **Skeleton3D**, you can control whether it is affected by raycasting without running :ref:`physical_bones_start_simulation`, by its :ref:`SkeletonModifier3D.active`. + +However, for old (deprecated) configurations, **Skeleton3D** has an internal virtual :ref:`PhysicalBoneSimulator3D` for compatibility. This property controls the internal virtual :ref:`PhysicalBoneSimulator3D`'s :ref:`SkeletonModifier3D.active`. + +.. rst-class:: classref-item-separator + +---- + .. _class_Skeleton3D_property_modifier_callback_mode_process: .. rst-class:: classref-property @@ -426,18 +445,6 @@ Force updates the bone transform for the bone at ``bone_idx`` and all of its chi ---- -.. _class_Skeleton3D_method_get_animate_physical_bones: - -.. rst-class:: classref-method - -:ref:`bool` **get_animate_physical_bones**\ (\ ) |const| :ref:`🔗` - -**Deprecated:** This method may be changed or removed in future versions. - -.. rst-class:: classref-item-separator - ----- - .. _class_Skeleton3D_method_get_bone_children: .. rst-class:: classref-method @@ -768,22 +775,6 @@ Sets all bone poses to rests. ---- -.. _class_Skeleton3D_method_set_animate_physical_bones: - -.. rst-class:: classref-method - -|void| **set_animate_physical_bones**\ (\ enabled\: :ref:`bool`\ ) :ref:`🔗` - -**Deprecated:** This method may be changed or removed in future versions. - -This method exists for compatibility with old structures in which the **Skeleton3D** does not have a :ref:`PhysicalBoneSimulator3D` as a child, but directly has :ref:`PhysicalBone3D`\ s as children. - -In case you need to raycast to it without running :ref:`physical_bones_start_simulation`, call this method with ``enabled == true``. - -.. rst-class:: classref-item-separator - ----- - .. _class_Skeleton3D_method_set_bone_enabled: .. rst-class:: classref-method diff --git a/classes/class_tilesetscenescollectionsource.rst b/classes/class_tilesetscenescollectionsource.rst index 797902b7a01..f3942c6b91d 100644 --- a/classes/class_tilesetscenescollectionsource.rst +++ b/classes/class_tilesetscenescollectionsource.rst @@ -23,6 +23,39 @@ When placed on a :ref:`TileMap`, tiles from **TileSetScenesCollec Scenes are instantiated as children of the :ref:`TileMap` when it enters the tree. If you add/remove a scene tile in the :ref:`TileMap` that is already inside the tree, the :ref:`TileMap` will automatically instantiate/free the scene accordingly. +\ **Note:** Scene tiles all occupy one tile slot and instead use alternate tile ID to identify scene index. :ref:`TileSetSource.get_tiles_count` will always return ``1``. Use :ref:`get_scene_tiles_count` to get a number of scenes in a **TileSetScenesCollectionSource**. + +Use this code if you want to find the scene path at a given tile in :ref:`TileMapLayer`: + + +.. tabs:: + + .. code-tab:: gdscript + + var source_id = tile_map_layer.get_cell_source_id(Vector2i(x, y)) + if source_id > -1: + var scene_source = tile_map_layer.tile_set.get_source(source_id) + if scene_source is TileSetScenesCollectionSource: + var alt_id = tile_map_layer.get_cell_alternative_tile(Vector2i(x, y)) + # The assigned PackedScene. + var scene = scene_source.get_scene_tile_scene(alt_id) + + .. code-tab:: csharp + + int sourceId = tileMapLayer.GetCellSourceId(new Vector2I(x, y)); + if (sourceId > -1) + { + TileSetSource source = tileMapLayer.TileSet.GetSource(sourceId); + if (source is TileSetScenesCollectionSource sceneSource) + { + int altId = tileMapLayer.GetCellAlternativeTile(new Vector2I(x, y)); + // The assigned PackedScene. + PackedScene scene = sceneSource.GetSceneTileScene(altId); + } + } + + + .. rst-class:: classref-reftable-group Methods