From bc67ddf32b188d44b5582a86577978234b92b63c Mon Sep 17 00:00:00 2001 From: Godot Organization Date: Sat, 9 Nov 2024 03:21:03 +0000 Subject: [PATCH] classref: Sync with current master branch (e65a237) --- classes/class_camerafeed.rst | 36 ++ classes/class_displayserver.rst | 2 +- classes/class_editorimportplugin.rst | 4 +- classes/class_gltfaccessor.rst | 108 ++++- classes/class_gltfdocument.rst | 66 ++- classes/class_gltfdocumentextension.rst | 122 ++++-- classes/class_gltfnode.rst | 30 +- classes/class_gltfobjectmodelproperty.rst | 377 ++++++++++++++++++ .../class_openxrextensionwrapperextension.rst | 30 ++ classes/class_projectsettings.rst | 4 +- classes/class_refcounted.rst | 2 +- classes/class_renderingserver.rst | 14 + classes/class_resourceloader.rst | 2 +- classes/class_springarm3d.rst | 7 + classes/index.rst | 1 + 15 files changed, 729 insertions(+), 76 deletions(-) create mode 100644 classes/class_gltfobjectmodelproperty.rst diff --git a/classes/class_camerafeed.rst b/classes/class_camerafeed.rst index 60f32bf6f..c3bb9c13f 100644 --- a/classes/class_camerafeed.rst +++ b/classes/class_camerafeed.rst @@ -56,6 +56,10 @@ Methods +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`FeedPosition` | :ref:`get_position`\ (\ ) |const| | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_texture_tex_id`\ (\ feed_image_type\: :ref:`FeedImage`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_external`\ (\ width\: :ref:`int`, height\: :ref:`int`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`set_format`\ (\ index\: :ref:`int`, parameters\: :ref:`Dictionary`\ ) | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_name`\ (\ name\: :ref:`String`\ ) | @@ -143,6 +147,14 @@ Feed supplies YCbCr images that need to be converted to RGB. Feed supplies separate Y and CbCr images that need to be combined and converted to RGB. +.. _class_CameraFeed_constant_FEED_EXTERNAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`FeedDataType` **FEED_EXTERNAL** = ``4`` + +Feed supplies external image. + .. rst-class:: classref-item-separator ---- @@ -289,6 +301,30 @@ Returns the position of camera on the device. ---- +.. _class_CameraFeed_method_get_texture_tex_id: + +.. rst-class:: classref-method + +:ref:`int` **get_texture_tex_id**\ (\ feed_image_type\: :ref:`FeedImage`\ ) :ref:`πŸ”—` + +Returns the texture backend ID (usable by some external libraries that need a handle to a texture to write data). + +.. rst-class:: classref-item-separator + +---- + +.. _class_CameraFeed_method_set_external: + +.. rst-class:: classref-method + +|void| **set_external**\ (\ width\: :ref:`int`, height\: :ref:`int`\ ) :ref:`πŸ”—` + +Sets the feed as external feed provided by another library. + +.. rst-class:: classref-item-separator + +---- + .. _class_CameraFeed_method_set_format: .. rst-class:: classref-method diff --git a/classes/class_displayserver.rst b/classes/class_displayserver.rst index b82e78221..ba7626445 100644 --- a/classes/class_displayserver.rst +++ b/classes/class_displayserver.rst @@ -1828,7 +1828,7 @@ Forces window manager processing while ignoring all :ref:`InputEvent` + +.. _class_GLTFAccessor_constant_COMPONENT_TYPE_NONE: + +.. rst-class:: classref-enumeration-constant + +:ref:`GLTFComponentType` **COMPONENT_TYPE_NONE** = ``0`` + +Component type "NONE". This is not a valid component type, and is used to indicate that the component type is not set. + +.. _class_GLTFAccessor_constant_COMPONENT_TYPE_SIGNED_BYTE: + +.. rst-class:: classref-enumeration-constant + +:ref:`GLTFComponentType` **COMPONENT_TYPE_SIGNED_BYTE** = ``5120`` + +Component type "BYTE". The value is ``0x1400`` which comes from OpenGL. This indicates data is stored in 1-byte or 8-bit signed integers. This is a core part of the glTF specification. + +.. _class_GLTFAccessor_constant_COMPONENT_TYPE_UNSIGNED_BYTE: + +.. rst-class:: classref-enumeration-constant + +:ref:`GLTFComponentType` **COMPONENT_TYPE_UNSIGNED_BYTE** = ``5121`` + +Component type "UNSIGNED_BYTE". The value is ``0x1401`` which comes from OpenGL. This indicates data is stored in 1-byte or 8-bit unsigned integers. This is a core part of the glTF specification. + +.. _class_GLTFAccessor_constant_COMPONENT_TYPE_SIGNED_SHORT: + +.. rst-class:: classref-enumeration-constant + +:ref:`GLTFComponentType` **COMPONENT_TYPE_SIGNED_SHORT** = ``5122`` + +Component type "SHORT". The value is ``0x1402`` which comes from OpenGL. This indicates data is stored in 2-byte or 16-bit signed integers. This is a core part of the glTF specification. + +.. _class_GLTFAccessor_constant_COMPONENT_TYPE_UNSIGNED_SHORT: + +.. rst-class:: classref-enumeration-constant + +:ref:`GLTFComponentType` **COMPONENT_TYPE_UNSIGNED_SHORT** = ``5123`` + +Component type "UNSIGNED_SHORT". The value is ``0x1403`` which comes from OpenGL. This indicates data is stored in 2-byte or 16-bit unsigned integers. This is a core part of the glTF specification. + +.. _class_GLTFAccessor_constant_COMPONENT_TYPE_SIGNED_INT: + +.. rst-class:: classref-enumeration-constant + +:ref:`GLTFComponentType` **COMPONENT_TYPE_SIGNED_INT** = ``5124`` + +Component type "INT". The value is ``0x1404`` which comes from OpenGL. This indicates data is stored in 4-byte or 32-bit signed integers. This is NOT a core part of the glTF specification, and may not be supported by all glTF importers. May be used by some extensions including ``KHR_interactivity``. + +.. _class_GLTFAccessor_constant_COMPONENT_TYPE_UNSIGNED_INT: + +.. rst-class:: classref-enumeration-constant + +:ref:`GLTFComponentType` **COMPONENT_TYPE_UNSIGNED_INT** = ``5125`` + +Component type "UNSIGNED_INT". The value is ``0x1405`` which comes from OpenGL. This indicates data is stored in 4-byte or 32-bit unsigned integers. This is a core part of the glTF specification. + +.. _class_GLTFAccessor_constant_COMPONENT_TYPE_SINGLE_FLOAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`GLTFComponentType` **COMPONENT_TYPE_SINGLE_FLOAT** = ``5126`` + +Component type "FLOAT". The value is ``0x1406`` which comes from OpenGL. This indicates data is stored in 4-byte or 32-bit floating point numbers. This is a core part of the glTF specification. + +.. _class_GLTFAccessor_constant_COMPONENT_TYPE_DOUBLE_FLOAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`GLTFComponentType` **COMPONENT_TYPE_DOUBLE_FLOAT** = ``5130`` + +Component type "DOUBLE". The value is ``0x140A`` which comes from OpenGL. This indicates data is stored in 8-byte or 64-bit floating point numbers. This is NOT a core part of the glTF specification, and may not be supported by all glTF importers. May be used by some extensions including ``KHR_interactivity``. + +.. _class_GLTFAccessor_constant_COMPONENT_TYPE_HALF_FLOAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`GLTFComponentType` **COMPONENT_TYPE_HALF_FLOAT** = ``5131`` + +Component type "HALF_FLOAT". The value is ``0x140B`` which comes from OpenGL. This indicates data is stored in 2-byte or 16-bit floating point numbers. This is NOT a core part of the glTF specification, and may not be supported by all glTF importers. May be used by some extensions including ``KHR_interactivity``. + +.. _class_GLTFAccessor_constant_COMPONENT_TYPE_SIGNED_LONG: + +.. rst-class:: classref-enumeration-constant + +:ref:`GLTFComponentType` **COMPONENT_TYPE_SIGNED_LONG** = ``5134`` + +Component type "LONG". The value is ``0x140E`` which comes from OpenGL. This indicates data is stored in 8-byte or 64-bit signed integers. This is NOT a core part of the glTF specification, and may not be supported by all glTF importers. May be used by some extensions including ``KHR_interactivity``. + +.. _class_GLTFAccessor_constant_COMPONENT_TYPE_UNSIGNED_LONG: + +.. rst-class:: classref-enumeration-constant + +:ref:`GLTFComponentType` **COMPONENT_TYPE_UNSIGNED_LONG** = ``5135`` + +Component type "UNSIGNED_LONG". The value is ``0x140F`` which comes from OpenGL. This indicates data is stored in 8-byte or 64-bit unsigned integers. This is NOT a core part of the glTF specification, and may not be supported by all glTF importers. May be used by some extensions including ``KHR_interactivity``. + .. rst-class:: classref-section-separator ---- @@ -214,7 +320,7 @@ The offset relative to the start of the buffer view in bytes. - |void| **set_component_type**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_component_type**\ (\ ) -The glTF component type as an enum. Possible values are 5120 for "BYTE", 5121 for "UNSIGNED_BYTE", 5122 for "SHORT", 5123 for "UNSIGNED_SHORT", 5125 for "UNSIGNED_INT", and 5126 for "FLOAT". A value of 5125 or "UNSIGNED_INT" must not be used for any accessor that is not referenced by mesh.primitive.indices. +The glTF component type as an enum. See :ref:`GLTFComponentType` for possible values. Within the core glTF specification, a value of 5125 or "UNSIGNED_INT" must not be used for any accessor that is not referenced by mesh.primitive.indices. .. rst-class:: classref-item-separator diff --git a/classes/class_gltfdocument.rst b/classes/class_gltfdocument.rst index 8401f4c35..67e3044da 100644 --- a/classes/class_gltfdocument.rst +++ b/classes/class_gltfdocument.rst @@ -62,25 +62,29 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`append_from_buffer`\ (\ bytes\: :ref:`PackedByteArray`, base_path\: :ref:`String`, state\: :ref:`GLTFState`, flags\: :ref:`int` = 0\ ) | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`append_from_file`\ (\ path\: :ref:`String`, state\: :ref:`GLTFState`, flags\: :ref:`int` = 0, base_path\: :ref:`String` = ""\ ) | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`append_from_scene`\ (\ node\: :ref:`Node`, state\: :ref:`GLTFState`, flags\: :ref:`int` = 0\ ) | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray` | :ref:`generate_buffer`\ (\ state\: :ref:`GLTFState`\ ) | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node` | :ref:`generate_scene`\ (\ state\: :ref:`GLTFState`, bake_fps\: :ref:`float` = 30, trimming\: :ref:`bool` = false, remove_immutable_tracks\: :ref:`bool` = true\ ) | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`get_supported_gltf_extensions`\ (\ ) |static| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`register_gltf_document_extension`\ (\ extension\: :ref:`GLTFDocumentExtension`, first_priority\: :ref:`bool` = false\ ) |static| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`unregister_gltf_document_extension`\ (\ extension\: :ref:`GLTFDocumentExtension`\ ) |static| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`write_to_filesystem`\ (\ state\: :ref:`GLTFState`, path\: :ref:`String`\ ) | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`append_from_buffer`\ (\ bytes\: :ref:`PackedByteArray`, base_path\: :ref:`String`, state\: :ref:`GLTFState`, flags\: :ref:`int` = 0\ ) | + +---------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`append_from_file`\ (\ path\: :ref:`String`, state\: :ref:`GLTFState`, flags\: :ref:`int` = 0, base_path\: :ref:`String` = ""\ ) | + +---------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`append_from_scene`\ (\ node\: :ref:`Node`, state\: :ref:`GLTFState`, flags\: :ref:`int` = 0\ ) | + +---------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GLTFObjectModelProperty` | :ref:`export_object_model_property`\ (\ state\: :ref:`GLTFState`, node_path\: :ref:`NodePath`, godot_node\: :ref:`Node`, gltf_node_index\: :ref:`int`\ ) |static| | + +---------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`generate_buffer`\ (\ state\: :ref:`GLTFState`\ ) | + +---------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node` | :ref:`generate_scene`\ (\ state\: :ref:`GLTFState`, bake_fps\: :ref:`float` = 30, trimming\: :ref:`bool` = false, remove_immutable_tracks\: :ref:`bool` = true\ ) | + +---------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_supported_gltf_extensions`\ (\ ) |static| | + +---------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GLTFObjectModelProperty` | :ref:`import_object_model_property`\ (\ state\: :ref:`GLTFState`, json_pointer\: :ref:`String`\ ) |static| | + +---------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`register_gltf_document_extension`\ (\ extension\: :ref:`GLTFDocumentExtension`, first_priority\: :ref:`bool` = false\ ) |static| | + +---------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`unregister_gltf_document_extension`\ (\ extension\: :ref:`GLTFDocumentExtension`\ ) |static| | + +---------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`write_to_filesystem`\ (\ state\: :ref:`GLTFState`, path\: :ref:`String`\ ) | + +---------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -230,6 +234,18 @@ Takes a Godot Engine scene node and exports it and its descendants to the given ---- +.. _class_GLTFDocument_method_export_object_model_property: + +.. rst-class:: classref-method + +:ref:`GLTFObjectModelProperty` **export_object_model_property**\ (\ state\: :ref:`GLTFState`, node_path\: :ref:`NodePath`, godot_node\: :ref:`Node`, gltf_node_index\: :ref:`int`\ ) |static| :ref:`πŸ”—` + +Determines a mapping between the given Godot ``node_path`` and the corresponding glTF Object Model JSON pointer(s) in the generated glTF file. The details of this mapping are returned in a :ref:`GLTFObjectModelProperty` object. Additional mappings can be supplied via the :ref:`GLTFDocumentExtension._import_object_model_property` callback method. + +.. rst-class:: classref-item-separator + +---- + .. _class_GLTFDocument_method_generate_buffer: .. rst-class:: classref-method @@ -270,6 +286,18 @@ Returns a list of all support glTF extensions, including extensions supported di ---- +.. _class_GLTFDocument_method_import_object_model_property: + +.. rst-class:: classref-method + +:ref:`GLTFObjectModelProperty` **import_object_model_property**\ (\ state\: :ref:`GLTFState`, json_pointer\: :ref:`String`\ ) |static| :ref:`πŸ”—` + +Determines a mapping between the given glTF Object Model ``json_pointer`` and the corresponding Godot node path(s) in the generated Godot scene. The details of this mapping are returned in a :ref:`GLTFObjectModelProperty` object. Additional mappings can be supplied via the :ref:`GLTFDocumentExtension._export_object_model_property` callback method. + +.. rst-class:: classref-item-separator + +---- + .. _class_GLTFDocument_method_register_gltf_document_extension: .. rst-class:: classref-method diff --git a/classes/class_gltfdocumentextension.rst b/classes/class_gltfdocumentextension.rst index 8f3ffb226..217e4ac04 100644 --- a/classes/class_gltfdocumentextension.rst +++ b/classes/class_gltfdocumentextension.rst @@ -42,49 +42,53 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_convert_scene_node`\ (\ state\: :ref:`GLTFState`, gltf_node\: :ref:`GLTFNode`, scene_node\: :ref:`Node`\ ) |virtual| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_export_node`\ (\ state\: :ref:`GLTFState`, gltf_node\: :ref:`GLTFNode`, json\: :ref:`Dictionary`, node\: :ref:`Node`\ ) |virtual| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_export_post`\ (\ state\: :ref:`GLTFState`\ ) |virtual| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_export_post_convert`\ (\ state\: :ref:`GLTFState`, root\: :ref:`Node`\ ) |virtual| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_export_preflight`\ (\ state\: :ref:`GLTFState`, root\: :ref:`Node`\ ) |virtual| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_export_preserialize`\ (\ state\: :ref:`GLTFState`\ ) |virtual| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node3D` | :ref:`_generate_scene_node`\ (\ state\: :ref:`GLTFState`, gltf_node\: :ref:`GLTFNode`, scene_parent\: :ref:`Node`\ ) |virtual| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_image_file_extension`\ (\ ) |virtual| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_saveable_image_formats`\ (\ ) |virtual| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_supported_extensions`\ (\ ) |virtual| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_import_node`\ (\ state\: :ref:`GLTFState`, gltf_node\: :ref:`GLTFNode`, json\: :ref:`Dictionary`, node\: :ref:`Node`\ ) |virtual| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_import_post`\ (\ state\: :ref:`GLTFState`, root\: :ref:`Node`\ ) |virtual| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_import_post_parse`\ (\ state\: :ref:`GLTFState`\ ) |virtual| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_import_pre_generate`\ (\ state\: :ref:`GLTFState`\ ) |virtual| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_import_preflight`\ (\ state\: :ref:`GLTFState`, extensions\: :ref:`PackedStringArray`\ ) |virtual| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_parse_image_data`\ (\ state\: :ref:`GLTFState`, image_data\: :ref:`PackedByteArray`, mime_type\: :ref:`String`, ret_image\: :ref:`Image`\ ) |virtual| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_parse_node_extensions`\ (\ state\: :ref:`GLTFState`, gltf_node\: :ref:`GLTFNode`, extensions\: :ref:`Dictionary`\ ) |virtual| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_parse_texture_json`\ (\ state\: :ref:`GLTFState`, texture_json\: :ref:`Dictionary`, ret_gltf_texture\: :ref:`GLTFTexture`\ ) |virtual| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_save_image_at_path`\ (\ state\: :ref:`GLTFState`, image\: :ref:`Image`, file_path\: :ref:`String`, image_format\: :ref:`String`, lossy_quality\: :ref:`float`\ ) |virtual| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray` | :ref:`_serialize_image_to_bytes`\ (\ state\: :ref:`GLTFState`, image\: :ref:`Image`, image_dict\: :ref:`Dictionary`, image_format\: :ref:`String`, lossy_quality\: :ref:`float`\ ) |virtual| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_serialize_texture_json`\ (\ state\: :ref:`GLTFState`, texture_json\: :ref:`Dictionary`, gltf_texture\: :ref:`GLTFTexture`, image_format\: :ref:`String`\ ) |virtual| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_convert_scene_node`\ (\ state\: :ref:`GLTFState`, gltf_node\: :ref:`GLTFNode`, scene_node\: :ref:`Node`\ ) |virtual| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_export_node`\ (\ state\: :ref:`GLTFState`, gltf_node\: :ref:`GLTFNode`, json\: :ref:`Dictionary`, node\: :ref:`Node`\ ) |virtual| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GLTFObjectModelProperty` | :ref:`_export_object_model_property`\ (\ state\: :ref:`GLTFState`, node_path\: :ref:`NodePath`, godot_node\: :ref:`Node`, gltf_node_index\: :ref:`int`, target_object\: :ref:`Object`, target_depth\: :ref:`int`\ ) |virtual| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_export_post`\ (\ state\: :ref:`GLTFState`\ ) |virtual| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_export_post_convert`\ (\ state\: :ref:`GLTFState`, root\: :ref:`Node`\ ) |virtual| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_export_preflight`\ (\ state\: :ref:`GLTFState`, root\: :ref:`Node`\ ) |virtual| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_export_preserialize`\ (\ state\: :ref:`GLTFState`\ ) |virtual| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node3D` | :ref:`_generate_scene_node`\ (\ state\: :ref:`GLTFState`, gltf_node\: :ref:`GLTFNode`, scene_parent\: :ref:`Node`\ ) |virtual| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_image_file_extension`\ (\ ) |virtual| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_saveable_image_formats`\ (\ ) |virtual| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_supported_extensions`\ (\ ) |virtual| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_import_node`\ (\ state\: :ref:`GLTFState`, gltf_node\: :ref:`GLTFNode`, json\: :ref:`Dictionary`, node\: :ref:`Node`\ ) |virtual| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GLTFObjectModelProperty` | :ref:`_import_object_model_property`\ (\ state\: :ref:`GLTFState`, split_json_pointer\: :ref:`PackedStringArray`, partial_paths\: :ref:`Array`\[:ref:`NodePath`\]\ ) |virtual| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_import_post`\ (\ state\: :ref:`GLTFState`, root\: :ref:`Node`\ ) |virtual| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_import_post_parse`\ (\ state\: :ref:`GLTFState`\ ) |virtual| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_import_pre_generate`\ (\ state\: :ref:`GLTFState`\ ) |virtual| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_import_preflight`\ (\ state\: :ref:`GLTFState`, extensions\: :ref:`PackedStringArray`\ ) |virtual| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_parse_image_data`\ (\ state\: :ref:`GLTFState`, image_data\: :ref:`PackedByteArray`, mime_type\: :ref:`String`, ret_image\: :ref:`Image`\ ) |virtual| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_parse_node_extensions`\ (\ state\: :ref:`GLTFState`, gltf_node\: :ref:`GLTFNode`, extensions\: :ref:`Dictionary`\ ) |virtual| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_parse_texture_json`\ (\ state\: :ref:`GLTFState`, texture_json\: :ref:`Dictionary`, ret_gltf_texture\: :ref:`GLTFTexture`\ ) |virtual| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_save_image_at_path`\ (\ state\: :ref:`GLTFState`, image\: :ref:`Image`, file_path\: :ref:`String`, image_format\: :ref:`String`, lossy_quality\: :ref:`float`\ ) |virtual| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`_serialize_image_to_bytes`\ (\ state\: :ref:`GLTFState`, image\: :ref:`Image`, image_dict\: :ref:`Dictionary`, image_format\: :ref:`String`, lossy_quality\: :ref:`float`\ ) |virtual| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_serialize_texture_json`\ (\ state\: :ref:`GLTFState`, texture_json\: :ref:`Dictionary`, gltf_texture\: :ref:`GLTFTexture`, image_format\: :ref:`String`\ ) |virtual| | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -123,6 +127,22 @@ This method can be used to modify the final JSON of each node. Data should be pr ---- +.. _class_GLTFDocumentExtension_private_method__export_object_model_property: + +.. rst-class:: classref-method + +:ref:`GLTFObjectModelProperty` **_export_object_model_property**\ (\ state\: :ref:`GLTFState`, node_path\: :ref:`NodePath`, godot_node\: :ref:`Node`, gltf_node_index\: :ref:`int`, target_object\: :ref:`Object`, target_depth\: :ref:`int`\ ) |virtual| :ref:`πŸ”—` + +Part of the export process. Allows GLTFDocumentExtension classes to provide mappings for properties of nodes in the Godot scene tree, to JSON pointers to glTF properties, as defined by the glTF object model. + +Returns a :ref:`GLTFObjectModelProperty` instance that defines how the property should be mapped. If your extension can't handle the property, return null, or an instance without any JSON pointers (see :ref:`GLTFObjectModelProperty.has_json_pointers`). You should use :ref:`GLTFObjectModelProperty.set_types` to set the types, and set the JSON pointer(s) using the :ref:`GLTFObjectModelProperty.json_pointers` property. + +The parameters provide context for the property, including the NodePath, the Godot node, the GLTF node index, and the target object. The ``target_object`` will be equal to ``godot_node`` if no sub-object can be found, otherwise it will point to a sub-object. For example, if the path is ``^"A/B/C/MeshInstance3D:mesh:surface_0/material:emission_intensity"``, it will get the node, then the mesh, and then the material, so ``target_object`` will be the :ref:`Material` resource, and ``target_depth`` will be 2 because 2 levels were traversed to get to the target. + +.. rst-class:: classref-item-separator + +---- + .. _class_GLTFDocumentExtension_private_method__export_post: .. rst-class:: classref-method @@ -249,6 +269,22 @@ This method can be used to make modifications to each of the generated Godot sce ---- +.. _class_GLTFDocumentExtension_private_method__import_object_model_property: + +.. rst-class:: classref-method + +:ref:`GLTFObjectModelProperty` **_import_object_model_property**\ (\ state\: :ref:`GLTFState`, split_json_pointer\: :ref:`PackedStringArray`, partial_paths\: :ref:`Array`\[:ref:`NodePath`\]\ ) |virtual| :ref:`πŸ”—` + +Part of the import process. Allows GLTFDocumentExtension classes to provide mappings for JSON pointers to glTF properties, as defined by the glTF object model, to properties of nodes in the Godot scene tree. + +Returns a :ref:`GLTFObjectModelProperty` instance that defines how the property should be mapped. If your extension can't handle the property, return null, or an instance without any NodePaths (see :ref:`GLTFObjectModelProperty.has_node_paths`). You should use :ref:`GLTFObjectModelProperty.set_types` to set the types, and :ref:`GLTFObjectModelProperty.append_path_to_property` function is useful for most simple cases. + +In many cases, ``partial_paths`` will contain the start of a path, allowing the extension to complete the path. For example, for ``/nodes/3/extensions/MY_ext/prop``, Godot will pass you a NodePath that leads to node 3, so the GLTFDocumentExtension class only needs to resolve the last ``MY_ext/prop`` part of the path. In this example, the extension should check ``split.size() > 4 and split[0] == "nodes" and split[2] == "extensions" and split[3] == "MY_ext"`` at the start of the function to check if this JSON pointer applies to it, then it can use ``partial_paths`` and handle ``split[4]``. + +.. rst-class:: classref-item-separator + +---- + .. _class_GLTFDocumentExtension_private_method__import_post: .. rst-class:: classref-method diff --git a/classes/class_gltfnode.rst b/classes/class_gltfnode.rst index 8a51908c0..e3a5f77c9 100644 --- a/classes/class_gltfnode.rst +++ b/classes/class_gltfnode.rst @@ -76,13 +76,15 @@ Methods .. table:: :widths: auto - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`append_child_index`\ (\ child_index\: :ref:`int`\ ) | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`get_additional_data`\ (\ extension_name\: :ref:`StringName`\ ) | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_additional_data`\ (\ extension_name\: :ref:`StringName`, additional_data\: :ref:`Variant`\ ) | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`append_child_index`\ (\ child_index\: :ref:`int`\ ) | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_additional_data`\ (\ extension_name\: :ref:`StringName`\ ) | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`get_scene_node_path`\ (\ gltf_state\: :ref:`GLTFState`, handle_skeletons\: :ref:`bool` = true\ ) | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_additional_data`\ (\ extension_name\: :ref:`StringName`, additional_data\: :ref:`Variant`\ ) | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -347,6 +349,20 @@ The argument should be the :ref:`GLTFDocumentExtension` **get_scene_node_path**\ (\ gltf_state\: :ref:`GLTFState`, handle_skeletons\: :ref:`bool` = true\ ) :ref:`πŸ”—` + +Returns the :ref:`NodePath` that this GLTF node will have in the Godot scene tree after being imported. This is useful when importing glTF object model pointers with :ref:`GLTFObjectModelProperty`, for handling extensions such as ``KHR_animation_pointer`` or ``KHR_interactivity``. + +If ``handle_skeletons`` is true, paths to skeleton bone glTF nodes will be resolved properly. For example, a path that would be ``^"A/B/C/Bone1/Bone2/Bone3"`` if false will become ``^"A/B/C/Skeleton3D:Bone3"``. + +.. rst-class:: classref-item-separator + +---- + .. _class_GLTFNode_method_set_additional_data: .. rst-class:: classref-method diff --git a/classes/class_gltfobjectmodelproperty.rst b/classes/class_gltfobjectmodelproperty.rst new file mode 100644 index 000000000..d6f0a4f42 --- /dev/null +++ b/classes/class_gltfobjectmodelproperty.rst @@ -0,0 +1,377 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/modules/gltf/doc_classes/GLTFObjectModelProperty.xml. + +.. _class_GLTFObjectModelProperty: + +GLTFObjectModelProperty +======================= + +**Inherits:** :ref:`RefCounted` **<** :ref:`Object` + +Describes how to access a property as defined in the glTF object model. + +.. rst-class:: classref-introduction-group + +Description +----------- + +GLTFObjectModelProperty defines a mapping between a property in the glTF object model and a NodePath in the Godot scene tree. This can be used to animate properties in a glTF file using the ``KHR_animation_pointer`` extension, or to access them through an engine-agnostic script such as a behavior graph as defined by the ``KHR_interactivity`` extension. + +The glTF property is identified by JSON pointer(s) stored in :ref:`json_pointers`, while the Godot property it maps to is defined by :ref:`node_paths`. In most cases :ref:`json_pointers` and :ref:`node_paths` will each only have one item, but in some cases a single glTF JSON pointer will map to multiple Godot properties, or a single Godot property will be mapped to multiple glTF JSON pointers, or it might be a many-to-many relationship. + +\ :ref:`Expression` objects can be used to define conversions between the data, such as when glTF defines an angle in radians and Godot uses degrees. The :ref:`object_model_type` property defines the type of data stored in the glTF file as defined by the object model, see :ref:`GLTFObjectModelType` for possible values. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- `GLTF Object Model `__ + +- `KHR_animation_pointer GLTF extension `__ + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+--------+ + | :ref:`Expression` | :ref:`gltf_to_godot_expression` | | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+--------+ + | :ref:`Expression` | :ref:`godot_to_gltf_expression` | | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+--------+ + | :ref:`Array`\[:ref:`PackedStringArray`\] | :ref:`json_pointers` | ``[]`` | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+--------+ + | :ref:`Array`\[:ref:`NodePath`\] | :ref:`node_paths` | ``[]`` | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+--------+ + | :ref:`GLTFObjectModelType` | :ref:`object_model_type` | ``0`` | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+--------+ + | :ref:`Variant.Type` | :ref:`variant_type` | ``0`` | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+--------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`append_node_path`\ (\ node_path\: :ref:`NodePath`\ ) | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`append_path_to_property`\ (\ node_path\: :ref:`NodePath`, prop_name\: :ref:`StringName`\ ) | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GLTFAccessorType` | :ref:`get_accessor_type`\ (\ ) |const| | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_json_pointers`\ (\ ) |const| | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_node_paths`\ (\ ) |const| | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_types`\ (\ variant_type\: :ref:`Variant.Type`, obj_model_type\: :ref:`GLTFObjectModelType`\ ) | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_GLTFObjectModelProperty_GLTFObjectModelType: + +.. rst-class:: classref-enumeration + +enum **GLTFObjectModelType**: :ref:`πŸ”—` + +.. _class_GLTFObjectModelProperty_constant_GLTF_OBJECT_MODEL_TYPE_UNKNOWN: + +.. rst-class:: classref-enumeration-constant + +:ref:`GLTFObjectModelType` **GLTF_OBJECT_MODEL_TYPE_UNKNOWN** = ``0`` + +Unknown or not set object model type. If the object model type is set to this value, the real type still needs to be determined. + +.. _class_GLTFObjectModelProperty_constant_GLTF_OBJECT_MODEL_TYPE_BOOL: + +.. rst-class:: classref-enumeration-constant + +:ref:`GLTFObjectModelType` **GLTF_OBJECT_MODEL_TYPE_BOOL** = ``1`` + +Object model type "bool". Represented in the glTF JSON as a boolean, and encoded in a :ref:`GLTFAccessor` as "SCALAR". When encoded in an accessor, a value of 0 is false, and any other value is true. + +.. _class_GLTFObjectModelProperty_constant_GLTF_OBJECT_MODEL_TYPE_FLOAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`GLTFObjectModelType` **GLTF_OBJECT_MODEL_TYPE_FLOAT** = ``2`` + +Object model type "float". Represented in the glTF JSON as a number, and encoded in a :ref:`GLTFAccessor` as "SCALAR". + +.. _class_GLTFObjectModelProperty_constant_GLTF_OBJECT_MODEL_TYPE_FLOAT_ARRAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`GLTFObjectModelType` **GLTF_OBJECT_MODEL_TYPE_FLOAT_ARRAY** = ``3`` + +Object model type "float\[\]". Represented in the glTF JSON as an array of numbers, and encoded in a :ref:`GLTFAccessor` as "SCALAR". + +.. _class_GLTFObjectModelProperty_constant_GLTF_OBJECT_MODEL_TYPE_FLOAT2: + +.. rst-class:: classref-enumeration-constant + +:ref:`GLTFObjectModelType` **GLTF_OBJECT_MODEL_TYPE_FLOAT2** = ``4`` + +Object model type "float2". Represented in the glTF JSON as an array of two numbers, and encoded in a :ref:`GLTFAccessor` as "VEC2". + +.. _class_GLTFObjectModelProperty_constant_GLTF_OBJECT_MODEL_TYPE_FLOAT3: + +.. rst-class:: classref-enumeration-constant + +:ref:`GLTFObjectModelType` **GLTF_OBJECT_MODEL_TYPE_FLOAT3** = ``5`` + +Object model type "float3". Represented in the glTF JSON as an array of three numbers, and encoded in a :ref:`GLTFAccessor` as "VEC3". + +.. _class_GLTFObjectModelProperty_constant_GLTF_OBJECT_MODEL_TYPE_FLOAT4: + +.. rst-class:: classref-enumeration-constant + +:ref:`GLTFObjectModelType` **GLTF_OBJECT_MODEL_TYPE_FLOAT4** = ``6`` + +Object model type "float4". Represented in the glTF JSON as an array of four numbers, and encoded in a :ref:`GLTFAccessor` as "VEC4". + +.. _class_GLTFObjectModelProperty_constant_GLTF_OBJECT_MODEL_TYPE_FLOAT2X2: + +.. rst-class:: classref-enumeration-constant + +:ref:`GLTFObjectModelType` **GLTF_OBJECT_MODEL_TYPE_FLOAT2X2** = ``7`` + +Object model type "float2x2". Represented in the glTF JSON as an array of four numbers, and encoded in a :ref:`GLTFAccessor` as "MAT2". + +.. _class_GLTFObjectModelProperty_constant_GLTF_OBJECT_MODEL_TYPE_FLOAT3X3: + +.. rst-class:: classref-enumeration-constant + +:ref:`GLTFObjectModelType` **GLTF_OBJECT_MODEL_TYPE_FLOAT3X3** = ``8`` + +Object model type "float3x3". Represented in the glTF JSON as an array of nine numbers, and encoded in a :ref:`GLTFAccessor` as "MAT3". + +.. _class_GLTFObjectModelProperty_constant_GLTF_OBJECT_MODEL_TYPE_FLOAT4X4: + +.. rst-class:: classref-enumeration-constant + +:ref:`GLTFObjectModelType` **GLTF_OBJECT_MODEL_TYPE_FLOAT4X4** = ``9`` + +Object model type "float4x4". Represented in the glTF JSON as an array of sixteen numbers, and encoded in a :ref:`GLTFAccessor` as "MAT4". + +.. _class_GLTFObjectModelProperty_constant_GLTF_OBJECT_MODEL_TYPE_INT: + +.. rst-class:: classref-enumeration-constant + +:ref:`GLTFObjectModelType` **GLTF_OBJECT_MODEL_TYPE_INT** = ``10`` + +Object model type "int". Represented in the glTF JSON as a number, and encoded in a :ref:`GLTFAccessor` as "SCALAR". The range of values is limited to signed integers. For ``KHR_interactivity``, only 32-bit integers are supported. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_GLTFObjectModelProperty_property_gltf_to_godot_expression: + +.. rst-class:: classref-property + +:ref:`Expression` **gltf_to_godot_expression** :ref:`πŸ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_gltf_to_godot_expression**\ (\ value\: :ref:`Expression`\ ) +- :ref:`Expression` **get_gltf_to_godot_expression**\ (\ ) + +If set, this :ref:`Expression` will be used to convert the property value from the glTF object model to the value expected by the Godot property. This is useful when the glTF object model uses a different unit system, or when the data needs to be transformed in some way. If ``null``, the value will be copied as-is. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFObjectModelProperty_property_godot_to_gltf_expression: + +.. rst-class:: classref-property + +:ref:`Expression` **godot_to_gltf_expression** :ref:`πŸ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_godot_to_gltf_expression**\ (\ value\: :ref:`Expression`\ ) +- :ref:`Expression` **get_godot_to_gltf_expression**\ (\ ) + +If set, this :ref:`Expression` will be used to convert the property value from the Godot property to the value expected by the glTF object model. This is useful when the glTF object model uses a different unit system, or when the data needs to be transformed in some way. If ``null``, the value will be copied as-is. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFObjectModelProperty_property_json_pointers: + +.. rst-class:: classref-property + +:ref:`Array`\[:ref:`PackedStringArray`\] **json_pointers** = ``[]`` :ref:`πŸ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_json_pointers**\ (\ value\: :ref:`Array`\[:ref:`PackedStringArray`\]\ ) +- :ref:`Array`\[:ref:`PackedStringArray`\] **get_json_pointers**\ (\ ) + +The glTF object model JSON pointers used to identify the property in the glTF object model. In most cases, there will be only one item in this array, but niche cases may require multiple pointers. The items are themselves arrays which represent the JSON pointer split into its components. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFObjectModelProperty_property_node_paths: + +.. rst-class:: classref-property + +:ref:`Array`\[:ref:`NodePath`\] **node_paths** = ``[]`` :ref:`πŸ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_node_paths**\ (\ value\: :ref:`Array`\[:ref:`NodePath`\]\ ) +- :ref:`Array`\[:ref:`NodePath`\] **get_node_paths**\ (\ ) + +An array of :ref:`NodePath`\ s that point to a property, or multiple properties, in the Godot scene tree. On import, this will either be set by :ref:`GLTFDocument`, or by a :ref:`GLTFDocumentExtension` class. For simple cases, use :ref:`append_path_to_property` to add properties to this array. + +In most cases :ref:`node_paths` will only have one item, but in some cases a single glTF JSON pointer will map to multiple Godot properties. For example, a :ref:`GLTFCamera` or :ref:`GLTFLight` used on multiple glTF nodes will be represented by multiple Godot nodes. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFObjectModelProperty_property_object_model_type: + +.. rst-class:: classref-property + +:ref:`GLTFObjectModelType` **object_model_type** = ``0`` :ref:`πŸ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_object_model_type**\ (\ value\: :ref:`GLTFObjectModelType`\ ) +- :ref:`GLTFObjectModelType` **get_object_model_type**\ (\ ) + +The type of data stored in the glTF file as defined by the object model. This is a superset of the available accessor types, and determines the accessor type. See :ref:`GLTFObjectModelType` for possible values. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFObjectModelProperty_property_variant_type: + +.. rst-class:: classref-property + +:ref:`Variant.Type` **variant_type** = ``0`` :ref:`πŸ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_variant_type**\ (\ value\: :ref:`Variant.Type`\ ) +- :ref:`Variant.Type` **get_variant_type**\ (\ ) + +The type of data stored in the Godot property. This is the type of the property that the :ref:`node_paths` point to. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_GLTFObjectModelProperty_method_append_node_path: + +.. rst-class:: classref-method + +|void| **append_node_path**\ (\ node_path\: :ref:`NodePath`\ ) :ref:`πŸ”—` + +Appends a :ref:`NodePath` to :ref:`node_paths`. This can be used by :ref:`GLTFDocumentExtension` classes to define how a glTF object model property maps to a Godot property, or multiple Godot properties. Prefer using :ref:`append_path_to_property` for simple cases. Be sure to also call :ref:`set_types` once (the order does not matter). + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFObjectModelProperty_method_append_path_to_property: + +.. rst-class:: classref-method + +|void| **append_path_to_property**\ (\ node_path\: :ref:`NodePath`, prop_name\: :ref:`StringName`\ ) :ref:`πŸ”—` + +High-level wrapper over :ref:`append_node_path` that handles the most common cases. It constructs a new :ref:`NodePath` using ``node_path`` as a base and appends ``prop_name`` to the subpath. Be sure to also call :ref:`set_types` once (the order does not matter). + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFObjectModelProperty_method_get_accessor_type: + +.. rst-class:: classref-method + +:ref:`GLTFAccessorType` **get_accessor_type**\ (\ ) |const| :ref:`πŸ”—` + +The GLTF accessor type associated with this property's :ref:`object_model_type`. See :ref:`GLTFAccessor.accessor_type` for possible values, and see :ref:`GLTFObjectModelType` for how the object model type maps to accessor types. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFObjectModelProperty_method_has_json_pointers: + +.. rst-class:: classref-method + +:ref:`bool` **has_json_pointers**\ (\ ) |const| :ref:`πŸ”—` + +Returns ``true`` if :ref:`json_pointers` is not empty. This is used during export to determine if a **GLTFObjectModelProperty** can handle converting a Godot property to a glTF object model property. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFObjectModelProperty_method_has_node_paths: + +.. rst-class:: classref-method + +:ref:`bool` **has_node_paths**\ (\ ) |const| :ref:`πŸ”—` + +Returns ``true`` if :ref:`node_paths` is not empty. This is used during import to determine if a **GLTFObjectModelProperty** can handle converting a glTF object model property to a Godot property. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFObjectModelProperty_method_set_types: + +.. rst-class:: classref-method + +|void| **set_types**\ (\ variant_type\: :ref:`Variant.Type`, obj_model_type\: :ref:`GLTFObjectModelType`\ ) :ref:`πŸ”—` + +Sets the :ref:`variant_type` and :ref:`object_model_type` properties. This is a convenience method to set both properties at once, since they are almost always known at the same time. This method should be called once. Calling it again with the same values will have no effect. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_openxrextensionwrapperextension.rst b/classes/class_openxrextensionwrapperextension.rst index 730fdcdda..96c96b349 100644 --- a/classes/class_openxrextensionwrapperextension.rst +++ b/classes/class_openxrextensionwrapperextension.rst @@ -54,6 +54,10 @@ Methods +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_on_main_swapchains_created`\ (\ ) |virtual| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_on_post_draw_viewport`\ (\ viewport\: :ref:`RID`\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_on_pre_draw_viewport`\ (\ viewport\: :ref:`RID`\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_on_pre_render`\ (\ ) |virtual| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_on_process`\ (\ ) |virtual| | @@ -264,6 +268,32 @@ Called right after the main swapchains are (re)created. ---- +.. _class_OpenXRExtensionWrapperExtension_private_method__on_post_draw_viewport: + +.. rst-class:: classref-method + +|void| **_on_post_draw_viewport**\ (\ viewport\: :ref:`RID`\ ) |virtual| :ref:`πŸ”—` + +Called right after the given viewport is rendered. + +\ **Note:** The draw commands might only be queued at this point, not executed. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRExtensionWrapperExtension_private_method__on_pre_draw_viewport: + +.. rst-class:: classref-method + +|void| **_on_pre_draw_viewport**\ (\ viewport\: :ref:`RID`\ ) |virtual| :ref:`πŸ”—` + +Called right before the given viewport is rendered. + +.. rst-class:: classref-item-separator + +---- + .. _class_OpenXRExtensionWrapperExtension_private_method__on_pre_render: .. rst-class:: classref-method diff --git a/classes/class_projectsettings.rst b/classes/class_projectsettings.rst index c222914b9..1ec5cd31e 100644 --- a/classes/class_projectsettings.rst +++ b/classes/class_projectsettings.rst @@ -2968,7 +2968,7 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w :ref:`int` **debug/gdscript/warnings/shadowed_variable** = ``1`` :ref:`πŸ”—` -When set to ``warn`` or ``error``, produces a warning or an error respectively when defining a local or member variable that would shadow a member variable that the class defines. +When set to ``warn`` or ``error``, produces a warning or an error respectively when a local variable or local constant shadows a member declared in the current class. .. rst-class:: classref-item-separator @@ -2980,7 +2980,7 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w :ref:`int` **debug/gdscript/warnings/shadowed_variable_base_class** = ``1`` :ref:`πŸ”—` -When set to ``warn`` or ``error``, produces a warning or an error respectively when defining a local or subclass member variable that would shadow a variable that is inherited from a parent class. +When set to ``warn`` or ``error``, produces a warning or an error respectively when a local variable or local constant shadows a member declared in a base class. .. rst-class:: classref-item-separator diff --git a/classes/class_refcounted.rst b/classes/class_refcounted.rst index bbbaac27d..ab4325661 100644 --- a/classes/class_refcounted.rst +++ b/classes/class_refcounted.rst @@ -12,7 +12,7 @@ RefCounted **Inherits:** :ref:`Object` -**Inherited By:** :ref:`AESContext`, :ref:`AStar2D`, :ref:`AStar3D`, :ref:`AStarGrid2D`, :ref:`AudioEffectInstance`, :ref:`AudioSample`, :ref:`AudioSamplePlayback`, :ref:`AudioStreamPlayback`, :ref:`CameraFeed`, :ref:`CharFXTransform`, :ref:`ConfigFile`, :ref:`Crypto`, :ref:`DirAccess`, :ref:`DTLSServer`, :ref:`EditorContextMenuPlugin`, :ref:`EditorDebuggerPlugin`, :ref:`EditorDebuggerSession`, :ref:`EditorExportPlatform`, :ref:`EditorExportPlugin`, :ref:`EditorExportPreset`, :ref:`EditorFeatureProfile`, :ref:`EditorFileSystemImportFormatSupportQuery`, :ref:`EditorInspectorPlugin`, :ref:`EditorResourceConversionPlugin`, :ref:`EditorResourcePreviewGenerator`, :ref:`EditorResourceTooltipPlugin`, :ref:`EditorSceneFormatImporter`, :ref:`EditorScenePostImport`, :ref:`EditorScenePostImportPlugin`, :ref:`EditorScript`, :ref:`EditorTranslationParserPlugin`, :ref:`EncodedObjectAsID`, :ref:`ENetConnection`, :ref:`EngineProfiler`, :ref:`Expression`, :ref:`FileAccess`, :ref:`HashingContext`, :ref:`HMACContext`, :ref:`HTTPClient`, :ref:`ImageFormatLoader`, :ref:`JavaClass`, :ref:`JavaObject`, :ref:`JavaScriptObject`, :ref:`KinematicCollision2D`, :ref:`KinematicCollision3D`, :ref:`Lightmapper`, :ref:`MeshConvexDecompositionSettings`, :ref:`MeshDataTool`, :ref:`MultiplayerAPI`, :ref:`Mutex`, :ref:`NavigationPathQueryParameters2D`, :ref:`NavigationPathQueryParameters3D`, :ref:`NavigationPathQueryResult2D`, :ref:`NavigationPathQueryResult3D`, :ref:`Node3DGizmo`, :ref:`OggPacketSequencePlayback`, :ref:`OpenXRAPIExtension`, :ref:`PackedDataContainerRef`, :ref:`PacketPeer`, :ref:`PCKPacker`, :ref:`PhysicsPointQueryParameters2D`, :ref:`PhysicsPointQueryParameters3D`, :ref:`PhysicsRayQueryParameters2D`, :ref:`PhysicsRayQueryParameters3D`, :ref:`PhysicsShapeQueryParameters2D`, :ref:`PhysicsShapeQueryParameters3D`, :ref:`PhysicsTestMotionParameters2D`, :ref:`PhysicsTestMotionParameters3D`, :ref:`PhysicsTestMotionResult2D`, :ref:`PhysicsTestMotionResult3D`, :ref:`RandomNumberGenerator`, :ref:`RDAttachmentFormat`, :ref:`RDFramebufferPass`, :ref:`RDPipelineColorBlendState`, :ref:`RDPipelineColorBlendStateAttachment`, :ref:`RDPipelineDepthStencilState`, :ref:`RDPipelineMultisampleState`, :ref:`RDPipelineRasterizationState`, :ref:`RDPipelineSpecializationConstant`, :ref:`RDSamplerState`, :ref:`RDShaderSource`, :ref:`RDTextureFormat`, :ref:`RDTextureView`, :ref:`RDUniform`, :ref:`RDVertexAttribute`, :ref:`RegEx`, :ref:`RegExMatch`, :ref:`RenderSceneBuffers`, :ref:`RenderSceneBuffersConfiguration`, :ref:`Resource`, :ref:`ResourceFormatLoader`, :ref:`ResourceFormatSaver`, :ref:`ResourceImporter`, :ref:`SceneState`, :ref:`SceneTreeTimer`, :ref:`Semaphore`, :ref:`SkinReference`, :ref:`StreamPeer`, :ref:`SurfaceTool`, :ref:`TCPServer`, :ref:`TextLine`, :ref:`TextParagraph`, :ref:`TextServer`, :ref:`Thread`, :ref:`TLSOptions`, :ref:`TranslationDomain`, :ref:`TriangleMesh`, :ref:`Tween`, :ref:`Tweener`, :ref:`UDPServer`, :ref:`UPNP`, :ref:`UPNPDevice`, :ref:`WeakRef`, :ref:`WebRTCPeerConnection`, :ref:`XMLParser`, :ref:`XRInterface`, :ref:`XRPose`, :ref:`XRTracker`, :ref:`ZIPPacker`, :ref:`ZIPReader` +**Inherited By:** :ref:`AESContext`, :ref:`AStar2D`, :ref:`AStar3D`, :ref:`AStarGrid2D`, :ref:`AudioEffectInstance`, :ref:`AudioSample`, :ref:`AudioSamplePlayback`, :ref:`AudioStreamPlayback`, :ref:`CameraFeed`, :ref:`CharFXTransform`, :ref:`ConfigFile`, :ref:`Crypto`, :ref:`DirAccess`, :ref:`DTLSServer`, :ref:`EditorContextMenuPlugin`, :ref:`EditorDebuggerPlugin`, :ref:`EditorDebuggerSession`, :ref:`EditorExportPlatform`, :ref:`EditorExportPlugin`, :ref:`EditorExportPreset`, :ref:`EditorFeatureProfile`, :ref:`EditorFileSystemImportFormatSupportQuery`, :ref:`EditorInspectorPlugin`, :ref:`EditorResourceConversionPlugin`, :ref:`EditorResourcePreviewGenerator`, :ref:`EditorResourceTooltipPlugin`, :ref:`EditorSceneFormatImporter`, :ref:`EditorScenePostImport`, :ref:`EditorScenePostImportPlugin`, :ref:`EditorScript`, :ref:`EditorTranslationParserPlugin`, :ref:`EncodedObjectAsID`, :ref:`ENetConnection`, :ref:`EngineProfiler`, :ref:`Expression`, :ref:`FileAccess`, :ref:`GLTFObjectModelProperty`, :ref:`HashingContext`, :ref:`HMACContext`, :ref:`HTTPClient`, :ref:`ImageFormatLoader`, :ref:`JavaClass`, :ref:`JavaObject`, :ref:`JavaScriptObject`, :ref:`KinematicCollision2D`, :ref:`KinematicCollision3D`, :ref:`Lightmapper`, :ref:`MeshConvexDecompositionSettings`, :ref:`MeshDataTool`, :ref:`MultiplayerAPI`, :ref:`Mutex`, :ref:`NavigationPathQueryParameters2D`, :ref:`NavigationPathQueryParameters3D`, :ref:`NavigationPathQueryResult2D`, :ref:`NavigationPathQueryResult3D`, :ref:`Node3DGizmo`, :ref:`OggPacketSequencePlayback`, :ref:`OpenXRAPIExtension`, :ref:`PackedDataContainerRef`, :ref:`PacketPeer`, :ref:`PCKPacker`, :ref:`PhysicsPointQueryParameters2D`, :ref:`PhysicsPointQueryParameters3D`, :ref:`PhysicsRayQueryParameters2D`, :ref:`PhysicsRayQueryParameters3D`, :ref:`PhysicsShapeQueryParameters2D`, :ref:`PhysicsShapeQueryParameters3D`, :ref:`PhysicsTestMotionParameters2D`, :ref:`PhysicsTestMotionParameters3D`, :ref:`PhysicsTestMotionResult2D`, :ref:`PhysicsTestMotionResult3D`, :ref:`RandomNumberGenerator`, :ref:`RDAttachmentFormat`, :ref:`RDFramebufferPass`, :ref:`RDPipelineColorBlendState`, :ref:`RDPipelineColorBlendStateAttachment`, :ref:`RDPipelineDepthStencilState`, :ref:`RDPipelineMultisampleState`, :ref:`RDPipelineRasterizationState`, :ref:`RDPipelineSpecializationConstant`, :ref:`RDSamplerState`, :ref:`RDShaderSource`, :ref:`RDTextureFormat`, :ref:`RDTextureView`, :ref:`RDUniform`, :ref:`RDVertexAttribute`, :ref:`RegEx`, :ref:`RegExMatch`, :ref:`RenderSceneBuffers`, :ref:`RenderSceneBuffersConfiguration`, :ref:`Resource`, :ref:`ResourceFormatLoader`, :ref:`ResourceFormatSaver`, :ref:`ResourceImporter`, :ref:`SceneState`, :ref:`SceneTreeTimer`, :ref:`Semaphore`, :ref:`SkinReference`, :ref:`StreamPeer`, :ref:`SurfaceTool`, :ref:`TCPServer`, :ref:`TextLine`, :ref:`TextParagraph`, :ref:`TextServer`, :ref:`Thread`, :ref:`TLSOptions`, :ref:`TranslationDomain`, :ref:`TriangleMesh`, :ref:`Tween`, :ref:`Tweener`, :ref:`UDPServer`, :ref:`UPNP`, :ref:`UPNPDevice`, :ref:`WeakRef`, :ref:`WebRTCPeerConnection`, :ref:`XMLParser`, :ref:`XRInterface`, :ref:`XRPose`, :ref:`XRTracker`, :ref:`ZIPPacker`, :ref:`ZIPReader` Base class for reference-counted objects. diff --git a/classes/class_renderingserver.rst b/classes/class_renderingserver.rst index f8416884b..da6b52160 100644 --- a/classes/class_renderingserver.rst +++ b/classes/class_renderingserver.rst @@ -349,6 +349,8 @@ Methods +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`environment_set_bg_energy`\ (\ env\: :ref:`RID`, multiplier\: :ref:`float`, exposure_value\: :ref:`float`\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`environment_set_camera_id`\ (\ env\: :ref:`RID`, id\: :ref:`int`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`environment_set_canvas_max_layer`\ (\ env\: :ref:`RID`, max_layer\: :ref:`int`\ ) | +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`environment_set_fog`\ (\ env\: :ref:`RID`, enable\: :ref:`bool`, light_color\: :ref:`Color`, light_energy\: :ref:`float`, sun_scatter\: :ref:`float`, density\: :ref:`float`, height\: :ref:`float`, height_density\: :ref:`float`, aerial_perspective\: :ref:`float`, sky_affect\: :ref:`float`, fog_mode\: :ref:`EnvironmentFogMode` = 0\ ) | @@ -7782,6 +7784,18 @@ Sets the intensity of the background color. ---- +.. _class_RenderingServer_method_environment_set_camera_id: + +.. rst-class:: classref-method + +|void| **environment_set_camera_id**\ (\ env\: :ref:`RID`, id\: :ref:`int`\ ) :ref:`πŸ”—` + +Sets the camera ID to be used as environment background. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_environment_set_canvas_max_layer: .. rst-class:: classref-method diff --git a/classes/class_resourceloader.rst b/classes/class_resourceloader.rst index a039c11dd..0bfcdaa62 100644 --- a/classes/class_resourceloader.rst +++ b/classes/class_resourceloader.rst @@ -324,7 +324,7 @@ If this is called before the loading thread is done (i.e. :ref:`load_threaded_ge Returns the status of a threaded loading operation started with :ref:`load_threaded_request` for the resource at ``path``. See :ref:`ThreadLoadStatus` for possible return values. -An array variable can optionally be passed via ``progress``, and will return a one-element array containing the percentage of completion of the threaded loading. +An array variable can optionally be passed via ``progress``, and will return a one-element array containing the ratio of completion of the threaded loading (between ``0.0``\ Β and ``1.0``). \ **Note:** The recommended way of using this method is to call it during different frames (e.g., in :ref:`Node._process`, instead of a loop). diff --git a/classes/class_springarm3d.rst b/classes/class_springarm3d.rst index 1c204ee4b..37106d50b 100644 --- a/classes/class_springarm3d.rst +++ b/classes/class_springarm3d.rst @@ -21,6 +21,13 @@ Description **SpringArm3D** casts a ray or a shape along its Z axis and moves all its direct children to the collision point, with an optional margin. This is useful for 3rd person cameras that move closer to the player when inside a tight space (you may need to exclude the player's collider from the **SpringArm3D**'s collision check). +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Third-person camera with spring arm <../tutorials/3d/spring_arm>` + .. rst-class:: classref-reftable-group Properties diff --git a/classes/index.rst b/classes/index.rst index 2c7034295..b2e89e028 100644 --- a/classes/index.rst +++ b/classes/index.rst @@ -775,6 +775,7 @@ Other objects class_gdextensionmanager class_geometry2d class_geometry3d + class_gltfobjectmodelproperty class_hashingcontext class_hmaccontext class_httpclient