mirror of
https://github.com/godotengine/godot.git
synced 2024-11-21 11:32:13 +00:00
Fix glTF capitalization in class reference
This commit is contained in:
parent
ee363af0ed
commit
012ce1eaff
@ -1,11 +1,11 @@
|
||||
# Godot GLTF import and export module
|
||||
# Godot glTF import and export module
|
||||
|
||||
In a nutshell, the GLTF module works like this:
|
||||
In a nutshell, the glTF module works like this:
|
||||
|
||||
* The [`structures/`](structures/) folder contains GLTF structures, the
|
||||
small pieces that make up a GLTF file, represented as C++ classes.
|
||||
* The [`extensions/`](extensions/) folder contains GLTF extensions, which
|
||||
are optional features that build on top of the base GLTF spec.
|
||||
* The [`structures/`](structures/) folder contains glTF structures, the
|
||||
small pieces that make up a glTF file, represented as C++ classes.
|
||||
* The [`extensions/`](extensions/) folder contains glTF extensions, which
|
||||
are optional features that build on top of the base glTF spec.
|
||||
* [`GLTFState`](gltf_state.h) holds collections of structures and extensions.
|
||||
* [`GLTFDocument`](gltf_document.h) operates on GLTFState and its elements.
|
||||
* The [`editor/`](editor/) folder uses GLTFDocument to import and export 3D models.
|
||||
|
@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="GLTFAccessor" inherits="Resource" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
|
||||
<brief_description>
|
||||
Represents a GLTF accessor.
|
||||
Represents a glTF accessor.
|
||||
</brief_description>
|
||||
<description>
|
||||
GLTFAccessor is a data structure representing GLTF a [code]accessor[/code] that would be found in the [code]"accessors"[/code] array. A buffer is a blob of binary data. A buffer view is a slice of a buffer. An accessor is a typed interpretation of the data in a buffer view.
|
||||
Most custom data stored in GLTF does not need accessors, only buffer views (see [GLTFBufferView]). Accessors are for more advanced use cases such as interleaved mesh data encoded for the GPU.
|
||||
GLTFAccessor is a data structure representing a glTF [code]accessor[/code] that would be found in the [code]"accessors"[/code] array. A buffer is a blob of binary data. A buffer view is a slice of a buffer. An accessor is a typed interpretation of the data in a buffer view.
|
||||
Most custom data stored in glTF does not need accessors, only buffer views (see [GLTFBufferView]). Accessors are for more advanced use cases such as interleaved mesh data encoded for the GPU.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="Buffers, BufferViews, and Accessors in Khronos glTF specification">https://github.com/KhronosGroup/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_005_BuffersBufferViewsAccessors.md</link>
|
||||
@ -13,7 +13,7 @@
|
||||
</tutorials>
|
||||
<members>
|
||||
<member name="accessor_type" type="int" setter="set_accessor_type" getter="get_accessor_type" enum="GLTFAccessor.GLTFAccessorType" default="0">
|
||||
The GLTF accessor type as an enum. Possible values are 0 for "SCALAR", 1 for "VEC2", 2 for "VEC3", 3 for "VEC4", 4 for "MAT2", 5 for "MAT3", and 6 for "MAT4".
|
||||
The glTF accessor type as an enum. Possible values are 0 for "SCALAR", 1 for "VEC2", 2 for "VEC3", 3 for "VEC4", 4 for "MAT2", 5 for "MAT3", and 6 for "MAT4".
|
||||
</member>
|
||||
<member name="buffer_view" type="int" setter="set_buffer_view" getter="get_buffer_view" default="-1">
|
||||
The index of the buffer view this accessor is referencing. If [code]-1[/code], this accessor is not referencing any buffer view.
|
||||
@ -22,7 +22,7 @@
|
||||
The offset relative to the start of the buffer view in bytes.
|
||||
</member>
|
||||
<member name="component_type" type="int" setter="set_component_type" getter="get_component_type" default="0">
|
||||
The GLTF component type as an enum. Possible values are 5120 for "BYTE", 5121 for "UNSIGNED_BYTE", 5122 for "SHORT", 5123 for "UNSIGNED_SHORT", 5125 for "UNSIGNED_INT", and 5126 for "FLOAT". A value of 5125 or "UNSIGNED_INT" must not be used for any accessor that is not referenced by mesh.primitive.indices.
|
||||
The glTF component type as an enum. Possible values are 5120 for "BYTE", 5121 for "UNSIGNED_BYTE", 5122 for "SHORT", 5123 for "UNSIGNED_SHORT", 5125 for "UNSIGNED_INT", and 5126 for "FLOAT". A value of 5125 or "UNSIGNED_INT" must not be used for any accessor that is not referenced by mesh.primitive.indices.
|
||||
</member>
|
||||
<member name="count" type="int" setter="set_count" getter="get_count" default="0">
|
||||
The number of elements referenced by this accessor.
|
||||
@ -55,7 +55,7 @@
|
||||
The offset relative to the start of the bufferView in bytes.
|
||||
</member>
|
||||
<member name="type" type="int" setter="set_type" getter="get_type" deprecated="Use [member accessor_type] instead.">
|
||||
The GLTF accessor type as an enum. Use [member accessor_type] instead.
|
||||
The glTF accessor type as an enum. Use [member accessor_type] instead.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
|
@ -13,7 +13,7 @@
|
||||
<param index="0" name="extension_name" type="StringName" />
|
||||
<description>
|
||||
Gets additional arbitrary data in this [GLTFAnimation] instance. This can be used to keep per-node state data in [GLTFDocumentExtension] classes, which is important because they are stateless.
|
||||
The argument should be the [GLTFDocumentExtension] name (does not have to match the extension name in the GLTF file), and the return value can be anything you set. If nothing was set, the return value is null.
|
||||
The argument should be the [GLTFDocumentExtension] name (does not have to match the extension name in the glTF file), and the return value can be anything you set. If nothing was set, the return value is null.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_additional_data">
|
||||
@ -22,7 +22,7 @@
|
||||
<param index="1" name="additional_data" type="Variant" />
|
||||
<description>
|
||||
Sets additional arbitrary data in this [GLTFAnimation] instance. This can be used to keep per-node state data in [GLTFDocumentExtension] classes, which is important because they are stateless.
|
||||
The first argument should be the [GLTFDocumentExtension] name (does not have to match the extension name in the GLTF file), and the second argument can be anything you want.
|
||||
The first argument should be the [GLTFDocumentExtension] name (does not have to match the extension name in the glTF file), and the second argument can be anything you want.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
|
@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="GLTFBufferView" inherits="Resource" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
|
||||
<brief_description>
|
||||
Represents a GLTF buffer view.
|
||||
Represents a glTF buffer view.
|
||||
</brief_description>
|
||||
<description>
|
||||
GLTFBufferView is a data structure representing GLTF a [code]bufferView[/code] that would be found in the [code]"bufferViews"[/code] array. A buffer is a blob of binary data. A buffer view is a slice of a buffer that can be used to identify and extract data from the buffer.
|
||||
GLTFBufferView is a data structure representing a glTF [code]bufferView[/code] that would be found in the [code]"bufferViews"[/code] array. A buffer is a blob of binary data. A buffer view is a slice of a buffer that can be used to identify and extract data from the buffer.
|
||||
Most custom uses of buffers only need to use the [member buffer], [member byte_length], and [member byte_offset]. The [member byte_stride] and [member indices] properties are for more advanced use cases such as interleaved mesh data encoded for the GPU.
|
||||
</description>
|
||||
<tutorials>
|
||||
|
@ -1,15 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="GLTFCamera" inherits="Resource" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
|
||||
<brief_description>
|
||||
Represents a GLTF camera.
|
||||
Represents a glTF camera.
|
||||
</brief_description>
|
||||
<description>
|
||||
Represents a camera as defined by the base GLTF spec.
|
||||
Represents a camera as defined by the base glTF spec.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="Runtime file loading and saving">$DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html</link>
|
||||
<link title="GLTF camera detailed specification">https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#reference-camera</link>
|
||||
<link title="GLTF camera spec and example file">https://github.com/KhronosGroup/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_015_SimpleCameras.md</link>
|
||||
<link title="glTF camera detailed specification">https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#reference-camera</link>
|
||||
<link title="glTF camera spec and example file">https://github.com/KhronosGroup/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_015_SimpleCameras.md</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="from_dictionary" qualifiers="static">
|
||||
@ -41,19 +41,19 @@
|
||||
</methods>
|
||||
<members>
|
||||
<member name="depth_far" type="float" setter="set_depth_far" getter="get_depth_far" default="4000.0">
|
||||
The distance to the far culling boundary for this camera relative to its local Z axis, in meters. This maps to GLTF's [code]zfar[/code] property.
|
||||
The distance to the far culling boundary for this camera relative to its local Z axis, in meters. This maps to glTF's [code]zfar[/code] property.
|
||||
</member>
|
||||
<member name="depth_near" type="float" setter="set_depth_near" getter="get_depth_near" default="0.05">
|
||||
The distance to the near culling boundary for this camera relative to its local Z axis, in meters. This maps to GLTF's [code]znear[/code] property.
|
||||
The distance to the near culling boundary for this camera relative to its local Z axis, in meters. This maps to glTF's [code]znear[/code] property.
|
||||
</member>
|
||||
<member name="fov" type="float" setter="set_fov" getter="get_fov" default="1.309">
|
||||
The FOV of the camera. This class and GLTF define the camera FOV in radians, while Godot uses degrees. This maps to GLTF's [code]yfov[/code] property. This value is only used for perspective cameras, when [member perspective] is true.
|
||||
The FOV of the camera. This class and glTF define the camera FOV in radians, while Godot uses degrees. This maps to glTF's [code]yfov[/code] property. This value is only used for perspective cameras, when [member perspective] is true.
|
||||
</member>
|
||||
<member name="perspective" type="bool" setter="set_perspective" getter="get_perspective" default="true">
|
||||
Whether or not the camera is in perspective mode. If false, the camera is in orthographic/orthogonal mode. This maps to GLTF's camera [code]type[/code] property. See [member Camera3D.projection] and the GLTF spec for more information.
|
||||
Whether or not the camera is in perspective mode. If false, the camera is in orthographic/orthogonal mode. This maps to glTF's camera [code]type[/code] property. See [member Camera3D.projection] and the glTF spec for more information.
|
||||
</member>
|
||||
<member name="size_mag" type="float" setter="set_size_mag" getter="get_size_mag" default="0.5">
|
||||
The size of the camera. This class and GLTF define the camera size magnitude as a radius in meters, while Godot defines it as a diameter in meters. This maps to GLTF's [code]ymag[/code] property. This value is only used for orthographic/orthogonal cameras, when [member perspective] is false.
|
||||
The size of the camera. This class and glTF define the camera size magnitude as a radius in meters, while Godot defines it as a diameter in meters. This maps to glTF's [code]ymag[/code] property. This value is only used for orthographic/orthogonal cameras, when [member perspective] is false.
|
||||
</member>
|
||||
</members>
|
||||
</class>
|
||||
|
@ -5,7 +5,7 @@
|
||||
</brief_description>
|
||||
<description>
|
||||
GLTFDocument supports reading data from a glTF file, buffer, or Godot scene. This data can then be written to the filesystem, buffer, or used to create a Godot scene.
|
||||
All of the data in a GLTF scene is stored in the [GLTFState] class. GLTFDocument processes state objects, but does not contain any scene data itself. GLTFDocument has member variables to store export configuration settings such as the image format, but is otherwise stateless. Multiple scenes can be processed with the same settings using the same GLTFDocument object and different [GLTFState] objects.
|
||||
All of the data in a glTF scene is stored in the [GLTFState] class. GLTFDocument processes state objects, but does not contain any scene data itself. GLTFDocument has member variables to store export configuration settings such as the image format, but is otherwise stateless. Multiple scenes can be processed with the same settings using the same GLTFDocument object and different [GLTFState] objects.
|
||||
GLTFDocument can be extended with arbitrary functionality by extending the [GLTFDocumentExtension] class and registering it with GLTFDocument via [method register_gltf_document_extension]. This allows for custom data to be imported and exported.
|
||||
</description>
|
||||
<tutorials>
|
||||
@ -21,7 +21,7 @@
|
||||
<param index="2" name="state" type="GLTFState" />
|
||||
<param index="3" name="flags" type="int" default="0" />
|
||||
<description>
|
||||
Takes a [PackedByteArray] defining a GLTF and imports the data to the given [GLTFState] object through the [param state] parameter.
|
||||
Takes a [PackedByteArray] defining a glTF and imports the data to the given [GLTFState] object through the [param state] parameter.
|
||||
[b]Note:[/b] The [param base_path] tells [method append_from_buffer] where to find dependencies and can be empty.
|
||||
</description>
|
||||
</method>
|
||||
@ -32,7 +32,7 @@
|
||||
<param index="2" name="flags" type="int" default="0" />
|
||||
<param index="3" name="base_path" type="String" default="""" />
|
||||
<description>
|
||||
Takes a path to a GLTF file and imports the data at that file path to the given [GLTFState] object through the [param state] parameter.
|
||||
Takes a path to a glTF file and imports the data at that file path to the given [GLTFState] object through the [param state] parameter.
|
||||
[b]Note:[/b] The [param base_path] tells [method append_from_file] where to find dependencies and can be empty.
|
||||
</description>
|
||||
</method>
|
||||
@ -49,7 +49,7 @@
|
||||
<return type="PackedByteArray" />
|
||||
<param index="0" name="state" type="GLTFState" />
|
||||
<description>
|
||||
Takes a [GLTFState] object through the [param state] parameter and returns a GLTF [PackedByteArray].
|
||||
Takes a [GLTFState] object through the [param state] parameter and returns a glTF [PackedByteArray].
|
||||
</description>
|
||||
</method>
|
||||
<method name="generate_scene">
|
||||
@ -91,7 +91,7 @@
|
||||
</methods>
|
||||
<members>
|
||||
<member name="image_format" type="String" setter="set_image_format" getter="get_image_format" default=""PNG"">
|
||||
The user-friendly name of the export image format. This is used when exporting the GLTF file, including writing to a file and writing to a byte array.
|
||||
The user-friendly name of the export image format. This is used when exporting the glTF file, including writing to a file and writing to a byte array.
|
||||
By default, Godot allows the following options: "None", "PNG", "JPEG", "Lossless WebP", and "Lossy WebP". Support for more image formats can be added in [GLTFDocumentExtension] classes.
|
||||
</member>
|
||||
<member name="lossy_quality" type="float" setter="set_lossy_quality" getter="get_lossy_quality" default="0.75">
|
||||
|
@ -4,7 +4,7 @@
|
||||
[GLTFDocument] extension class.
|
||||
</brief_description>
|
||||
<description>
|
||||
Extends the functionality of the [GLTFDocument] class by allowing you to run arbitrary code at various stages of GLTF import or export.
|
||||
Extends the functionality of the [GLTFDocument] class by allowing you to run arbitrary code at various stages of glTF import or export.
|
||||
To use, make a new class extending GLTFDocumentExtension, override any methods you need, make an instance of your class, and register it using [method GLTFDocument.register_gltf_document_extension].
|
||||
[b]Note:[/b] Like GLTFDocument itself, all GLTFDocumentExtension classes must be stateless in order to function properly. If you need to store data, use the [code]set_additional_data[/code] and [code]get_additional_data[/code] methods in [GLTFState] or [GLTFNode].
|
||||
</description>
|
||||
@ -30,7 +30,7 @@
|
||||
<param index="3" name="node" type="Node" />
|
||||
<description>
|
||||
Part of the export process. This method is run after [method _get_saveable_image_formats] and before [method _export_post]. If this [GLTFDocumentExtension] is used for exporting images, this runs after [method _serialize_texture_json].
|
||||
This method can be used to modify the final JSON of each node. Data should be primarily stored in [param gltf_node] prior to serializing the JSON, but the original Godot [param node] is also provided if available. The node may be null if not available, such as when exporting GLTF data not generated from a Godot scene.
|
||||
This method can be used to modify the final JSON of each node. Data should be primarily stored in [param gltf_node] prior to serializing the JSON, but the original Godot [param node] is also provided if available. The node may be null if not available, such as when exporting glTF data not generated from a Godot scene.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_export_post" qualifiers="virtual">
|
||||
@ -38,7 +38,7 @@
|
||||
<param index="0" name="state" type="GLTFState" />
|
||||
<description>
|
||||
Part of the export process. This method is run last, after all other parts of the export process.
|
||||
This method can be used to modify the final JSON of the generated GLTF file.
|
||||
This method can be used to modify the final JSON of the generated glTF file.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_export_preflight" qualifiers="virtual">
|
||||
@ -47,7 +47,7 @@
|
||||
<param index="1" name="root" type="Node" />
|
||||
<description>
|
||||
Part of the export process. This method is run first, before all other parts of the export process.
|
||||
The return value is used to determine if this [GLTFDocumentExtension] instance should be used for exporting a given GLTF file. If [constant OK], the export will use this [GLTFDocumentExtension] instance. If not overridden, [constant OK] is returned.
|
||||
The return value is used to determine if this [GLTFDocumentExtension] instance should be used for exporting a given glTF file. If [constant OK], the export will use this [GLTFDocumentExtension] instance. If not overridden, [constant OK] is returned.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_export_preserialize" qualifiers="virtual">
|
||||
@ -86,7 +86,7 @@
|
||||
<return type="PackedStringArray" />
|
||||
<description>
|
||||
Part of the import process. This method is run after [method _import_preflight] and before [method _parse_node_extensions].
|
||||
Returns an array of the GLTF extensions supported by this GLTFDocumentExtension class. This is used to validate if a GLTF file with required extensions can be loaded.
|
||||
Returns an array of the glTF extensions supported by this GLTFDocumentExtension class. This is used to validate if a glTF file with required extensions can be loaded.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_import_node" qualifiers="virtual">
|
||||
@ -123,7 +123,7 @@
|
||||
<param index="1" name="extensions" type="PackedStringArray" />
|
||||
<description>
|
||||
Part of the import process. This method is run first, before all other parts of the import process.
|
||||
The return value is used to determine if this [GLTFDocumentExtension] instance should be used for importing a given GLTF file. If [constant OK], the import will use this [GLTFDocumentExtension] instance. If not overridden, [constant OK] is returned.
|
||||
The return value is used to determine if this [GLTFDocumentExtension] instance should be used for importing a given glTF file. If [constant OK], the import will use this [GLTFDocumentExtension] instance. If not overridden, [constant OK] is returned.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_parse_image_data" qualifiers="virtual">
|
||||
@ -134,7 +134,7 @@
|
||||
<param index="3" name="ret_image" type="Image" />
|
||||
<description>
|
||||
Part of the import process. This method is run after [method _parse_node_extensions] and before [method _parse_texture_json].
|
||||
Runs when parsing image data from a GLTF file. The data could be sourced from a separate file, a URI, or a buffer, and then is passed as a byte array.
|
||||
Runs when parsing image data from a glTF file. The data could be sourced from a separate file, a URI, or a buffer, and then is passed as a byte array.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_parse_node_extensions" qualifiers="virtual">
|
||||
@ -154,7 +154,7 @@
|
||||
<param index="2" name="ret_gltf_texture" type="GLTFTexture" />
|
||||
<description>
|
||||
Part of the import process. This method is run after [method _parse_image_data] and before [method _generate_scene_node].
|
||||
Runs when parsing the texture JSON from the GLTF textures array. This can be used to set the source image index to use as the texture.
|
||||
Runs when parsing the texture JSON from the glTF textures array. This can be used to set the source image index to use as the texture.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_save_image_at_path" qualifiers="virtual">
|
||||
@ -166,7 +166,7 @@
|
||||
<param index="4" name="lossy_quality" type="float" />
|
||||
<description>
|
||||
Part of the export process. This method is run after [method _get_saveable_image_formats] and before [method _serialize_texture_json].
|
||||
This method is run when saving images separately from the GLTF file. When images are embedded, [method _serialize_image_to_bytes] runs instead. Note that these methods only run when this [GLTFDocumentExtension] is selected as the image exporter.
|
||||
This method is run when saving images separately from the glTF file. When images are embedded, [method _serialize_image_to_bytes] runs instead. Note that these methods only run when this [GLTFDocumentExtension] is selected as the image exporter.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_serialize_image_to_bytes" qualifiers="virtual">
|
||||
@ -178,7 +178,7 @@
|
||||
<param index="4" name="lossy_quality" type="float" />
|
||||
<description>
|
||||
Part of the export process. This method is run after [method _get_saveable_image_formats] and before [method _serialize_texture_json].
|
||||
This method is run when embedding images in the GLTF file. When images are saved separately, [method _save_image_at_path] runs instead. Note that these methods only run when this [GLTFDocumentExtension] is selected as the image exporter.
|
||||
This method is run when embedding images in the glTF file. When images are saved separately, [method _save_image_at_path] runs instead. Note that these methods only run when this [GLTFDocumentExtension] is selected as the image exporter.
|
||||
This method must set the image MIME type in the [param image_dict] with the [code]"mimeType"[/code] key. For example, for a PNG image, it would be set to [code]"image/png"[/code]. The return value must be a [PackedByteArray] containing the image data.
|
||||
</description>
|
||||
</method>
|
||||
|
@ -1,14 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="GLTFLight" inherits="Resource" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
|
||||
<brief_description>
|
||||
Represents a GLTF light.
|
||||
Represents a glTF light.
|
||||
</brief_description>
|
||||
<description>
|
||||
Represents a light as defined by the [code]KHR_lights_punctual[/code] GLTF extension.
|
||||
Represents a light as defined by the [code]KHR_lights_punctual[/code] glTF extension.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="Runtime file loading and saving">$DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html</link>
|
||||
<link title="KHR_lights_punctual GLTF extension spec">https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_lights_punctual</link>
|
||||
<link title="KHR_lights_punctual glTF extension spec">https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_lights_punctual</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="from_dictionary" qualifiers="static">
|
||||
@ -70,7 +70,7 @@
|
||||
At this angle, the light drops off to zero brightness. Between the inner and outer cone angles, there is a transition from full brightness to zero brightness. If this angle is a half turn, then the spotlight emits in all directions. When creating a Godot [SpotLight3D], the outer cone angle is used as the angle of the spotlight.
|
||||
</member>
|
||||
<member name="range" type="float" setter="set_range" getter="get_range" default="inf">
|
||||
The range of the light, beyond which the light has no effect. GLTF lights with no range defined behave like physical lights (which have infinite range). When creating a Godot light, the range is clamped to 4096.
|
||||
The range of the light, beyond which the light has no effect. glTF lights with no range defined behave like physical lights (which have infinite range). When creating a Godot light, the range is clamped to 4096.
|
||||
</member>
|
||||
</members>
|
||||
</class>
|
||||
|
@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="GLTFMesh" inherits="Resource" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
|
||||
<brief_description>
|
||||
GLTFMesh represents a GLTF mesh.
|
||||
GLTFMesh represents a glTF mesh.
|
||||
</brief_description>
|
||||
<description>
|
||||
GLTFMesh handles 3D mesh data imported from GLTF files. It includes properties for blend channels, blend weights, instance materials, and the mesh itself.
|
||||
GLTFMesh handles 3D mesh data imported from glTF files. It includes properties for blend channels, blend weights, instance materials, and the mesh itself.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="Runtime file loading and saving">$DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html</link>
|
||||
@ -15,7 +15,7 @@
|
||||
<param index="0" name="extension_name" type="StringName" />
|
||||
<description>
|
||||
Gets additional arbitrary data in this [GLTFMesh] instance. This can be used to keep per-node state data in [GLTFDocumentExtension] classes, which is important because they are stateless.
|
||||
The argument should be the [GLTFDocumentExtension] name (does not have to match the extension name in the GLTF file), and the return value can be anything you set. If nothing was set, the return value is null.
|
||||
The argument should be the [GLTFDocumentExtension] name (does not have to match the extension name in the glTF file), and the return value can be anything you set. If nothing was set, the return value is null.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_additional_data">
|
||||
@ -24,7 +24,7 @@
|
||||
<param index="1" name="additional_data" type="Variant" />
|
||||
<description>
|
||||
Sets additional arbitrary data in this [GLTFMesh] instance. This can be used to keep per-node state data in [GLTFDocumentExtension] classes, which is important because they are stateless.
|
||||
The first argument should be the [GLTFDocumentExtension] name (does not have to match the extension name in the GLTF file), and the second argument can be anything you want.
|
||||
The first argument should be the [GLTFDocumentExtension] name (does not have to match the extension name in the glTF file), and the second argument can be anything you want.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
|
@ -1,15 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="GLTFNode" inherits="Resource" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
|
||||
<brief_description>
|
||||
GLTF node class.
|
||||
glTF node class.
|
||||
</brief_description>
|
||||
<description>
|
||||
Represents a GLTF node. GLTF nodes may have names, transforms, children (other GLTF nodes), and more specialized properties (represented by their own classes).
|
||||
GLTF nodes generally exist inside of [GLTFState] which represents all data of a GLTF file. Most of GLTFNode's properties are indices of other data in the GLTF file. You can extend a GLTF node with additional properties by using [method get_additional_data] and [method set_additional_data].
|
||||
Represents a glTF node. glTF nodes may have names, transforms, children (other glTF nodes), and more specialized properties (represented by their own classes).
|
||||
glTF nodes generally exist inside of [GLTFState] which represents all data of a glTF file. Most of GLTFNode's properties are indices of other data in the glTF file. You can extend a glTF node with additional properties by using [method get_additional_data] and [method set_additional_data].
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="Runtime file loading and saving">$DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html</link>
|
||||
<link title="GLTF scene and node spec">https://github.com/KhronosGroup/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_004_ScenesNodes.md"</link>
|
||||
<link title="glTF scene and node spec">https://github.com/KhronosGroup/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_004_ScenesNodes.md"</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_additional_data">
|
||||
@ -17,7 +17,7 @@
|
||||
<param index="0" name="extension_name" type="StringName" />
|
||||
<description>
|
||||
Gets additional arbitrary data in this [GLTFNode] instance. This can be used to keep per-node state data in [GLTFDocumentExtension] classes, which is important because they are stateless.
|
||||
The argument should be the [GLTFDocumentExtension] name (does not have to match the extension name in the GLTF file), and the return value can be anything you set. If nothing was set, the return value is null.
|
||||
The argument should be the [GLTFDocumentExtension] name (does not have to match the extension name in the glTF file), and the return value can be anything you set. If nothing was set, the return value is null.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_additional_data">
|
||||
@ -26,25 +26,25 @@
|
||||
<param index="1" name="additional_data" type="Variant" />
|
||||
<description>
|
||||
Sets additional arbitrary data in this [GLTFNode] instance. This can be used to keep per-node state data in [GLTFDocumentExtension] classes, which is important because they are stateless.
|
||||
The first argument should be the [GLTFDocumentExtension] name (does not have to match the extension name in the GLTF file), and the second argument can be anything you want.
|
||||
The first argument should be the [GLTFDocumentExtension] name (does not have to match the extension name in the glTF file), and the second argument can be anything you want.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="camera" type="int" setter="set_camera" getter="get_camera" default="-1">
|
||||
If this GLTF node is a camera, the index of the [GLTFCamera] in the [GLTFState] that describes the camera's properties. If -1, this node is not a camera.
|
||||
If this glTF node is a camera, the index of the [GLTFCamera] in the [GLTFState] that describes the camera's properties. If -1, this node is not a camera.
|
||||
</member>
|
||||
<member name="children" type="PackedInt32Array" setter="set_children" getter="get_children" default="PackedInt32Array()">
|
||||
The indices of the child nodes in the [GLTFState]. If this GLTF node has no children, this will be an empty array.
|
||||
The indices of the child nodes in the [GLTFState]. If this glTF node has no children, this will be an empty array.
|
||||
</member>
|
||||
<member name="height" type="int" setter="set_height" getter="get_height" default="-1">
|
||||
How deep into the node hierarchy this node is. A root node will have a height of 0, its children will have a height of 1, and so on. If -1, the height has not been calculated.
|
||||
</member>
|
||||
<member name="light" type="int" setter="set_light" getter="get_light" default="-1">
|
||||
If this GLTF node is a light, the index of the [GLTFLight] in the [GLTFState] that describes the light's properties. If -1, this node is not a light.
|
||||
If this glTF node is a light, the index of the [GLTFLight] in the [GLTFState] that describes the light's properties. If -1, this node is not a light.
|
||||
</member>
|
||||
<member name="mesh" type="int" setter="set_mesh" getter="get_mesh" default="-1">
|
||||
If this GLTF node is a mesh, the index of the [GLTFMesh] in the [GLTFState] that describes the mesh's properties. If -1, this node is not a mesh.
|
||||
If this glTF node is a mesh, the index of the [GLTFMesh] in the [GLTFState] that describes the mesh's properties. If -1, this node is not a mesh.
|
||||
</member>
|
||||
<member name="original_name" type="String" setter="set_original_name" getter="get_original_name" default="""">
|
||||
The original name of the node.
|
||||
@ -53,22 +53,22 @@
|
||||
The index of the parent node in the [GLTFState]. If -1, this node is a root node.
|
||||
</member>
|
||||
<member name="position" type="Vector3" setter="set_position" getter="get_position" default="Vector3(0, 0, 0)">
|
||||
The position of the GLTF node relative to its parent.
|
||||
The position of the glTF node relative to its parent.
|
||||
</member>
|
||||
<member name="rotation" type="Quaternion" setter="set_rotation" getter="get_rotation" default="Quaternion(0, 0, 0, 1)">
|
||||
The rotation of the GLTF node relative to its parent.
|
||||
The rotation of the glTF node relative to its parent.
|
||||
</member>
|
||||
<member name="scale" type="Vector3" setter="set_scale" getter="get_scale" default="Vector3(1, 1, 1)">
|
||||
The scale of the GLTF node relative to its parent.
|
||||
The scale of the glTF node relative to its parent.
|
||||
</member>
|
||||
<member name="skeleton" type="int" setter="set_skeleton" getter="get_skeleton" default="-1">
|
||||
If this GLTF node has a skeleton, the index of the [GLTFSkeleton] in the [GLTFState] that describes the skeleton's properties. If -1, this node does not have a skeleton.
|
||||
If this glTF node has a skeleton, the index of the [GLTFSkeleton] in the [GLTFState] that describes the skeleton's properties. If -1, this node does not have a skeleton.
|
||||
</member>
|
||||
<member name="skin" type="int" setter="set_skin" getter="get_skin" default="-1">
|
||||
If this GLTF node has a skin, the index of the [GLTFSkin] in the [GLTFState] that describes the skin's properties. If -1, this node does not have a skin.
|
||||
If this glTF node has a skin, the index of the [GLTFSkin] in the [GLTFState] that describes the skin's properties. If -1, this node does not have a skin.
|
||||
</member>
|
||||
<member name="xform" type="Transform3D" setter="set_xform" getter="get_xform" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)">
|
||||
The transform of the GLTF node relative to its parent. This property is usually unused since the position, rotation, and scale properties are preferred.
|
||||
The transform of the glTF node relative to its parent. This property is usually unused since the position, rotation, and scale properties are preferred.
|
||||
</member>
|
||||
</members>
|
||||
</class>
|
||||
|
@ -1,21 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="GLTFPhysicsBody" inherits="Resource" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
|
||||
<brief_description>
|
||||
Represents a GLTF physics body.
|
||||
Represents a glTF physics body.
|
||||
</brief_description>
|
||||
<description>
|
||||
Represents a physics body as an intermediary between the [code]OMI_physics_body[/code] GLTF data and Godot's nodes, and it's abstracted in a way that allows adding support for different GLTF physics extensions in the future.
|
||||
Represents a physics body as an intermediary between the [code]OMI_physics_body[/code] glTF data and Godot's nodes, and it's abstracted in a way that allows adding support for different glTF physics extensions in the future.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="Runtime file loading and saving">$DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html</link>
|
||||
<link title="OMI_physics_body GLTF extension">https://github.com/omigroup/gltf-extensions/tree/main/extensions/2.0/OMI_physics_body</link>
|
||||
<link title="OMI_physics_body glTF extension">https://github.com/omigroup/gltf-extensions/tree/main/extensions/2.0/OMI_physics_body</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="from_dictionary" qualifiers="static">
|
||||
<return type="GLTFPhysicsBody" />
|
||||
<param index="0" name="dictionary" type="Dictionary" />
|
||||
<description>
|
||||
Creates a new GLTFPhysicsBody instance by parsing the given [Dictionary] in the [code]OMI_physics_body[/code] GLTF extension format.
|
||||
Creates a new GLTFPhysicsBody instance by parsing the given [Dictionary] in the [code]OMI_physics_body[/code] glTF extension format.
|
||||
</description>
|
||||
</method>
|
||||
<method name="from_node" qualifiers="static">
|
||||
@ -28,7 +28,7 @@
|
||||
<method name="to_dictionary" qualifiers="const">
|
||||
<return type="Dictionary" />
|
||||
<description>
|
||||
Serializes this GLTFPhysicsBody instance into a [Dictionary]. It will be in the format expected by the [code]OMI_physics_body[/code] GLTF extension.
|
||||
Serializes this GLTFPhysicsBody instance into a [Dictionary]. It will be in the format expected by the [code]OMI_physics_body[/code] glTF extension.
|
||||
</description>
|
||||
</method>
|
||||
<method name="to_node" qualifiers="const">
|
||||
|
@ -1,15 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="GLTFPhysicsShape" inherits="Resource" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
|
||||
<brief_description>
|
||||
Represents a GLTF physics shape.
|
||||
Represents a glTF physics shape.
|
||||
</brief_description>
|
||||
<description>
|
||||
Represents a physics shape as defined by the [code]OMI_physics_shape[/code] or [code]OMI_collider[/code] GLTF extensions. This class is an intermediary between the GLTF data and Godot's nodes, and it's abstracted in a way that allows adding support for different GLTF physics extensions in the future.
|
||||
Represents a physics shape as defined by the [code]OMI_physics_shape[/code] or [code]OMI_collider[/code] glTF extensions. This class is an intermediary between the glTF data and Godot's nodes, and it's abstracted in a way that allows adding support for different glTF physics extensions in the future.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="Runtime file loading and saving">$DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html</link>
|
||||
<link title="OMI_physics_shape GLTF extension">https://github.com/omigroup/gltf-extensions/tree/main/extensions/2.0/OMI_physics_shape</link>
|
||||
<link title="OMI_collider GLTF extension">https://github.com/omigroup/gltf-extensions/tree/main/extensions/2.0/Archived/OMI_collider</link>
|
||||
<link title="OMI_physics_shape glTF extension">https://github.com/omigroup/gltf-extensions/tree/main/extensions/2.0/OMI_physics_shape</link>
|
||||
<link title="OMI_collider glTF extension">https://github.com/omigroup/gltf-extensions/tree/main/extensions/2.0/Archived/OMI_collider</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="from_dictionary" qualifiers="static">
|
||||
@ -66,7 +66,7 @@
|
||||
This is the only variable not used in the [method to_node] method, it's intended to be used alongside when deciding where to add the generated node as a child.
|
||||
</member>
|
||||
<member name="mesh_index" type="int" setter="set_mesh_index" getter="get_mesh_index" default="-1">
|
||||
The index of the shape's mesh in the GLTF file. This is only used when the shape type is "hull" (convex hull) or "trimesh" (concave trimesh).
|
||||
The index of the shape's mesh in the glTF file. This is only used when the shape type is "hull" (convex hull) or "trimesh" (concave trimesh).
|
||||
</member>
|
||||
<member name="radius" type="float" setter="set_radius" getter="get_radius" default="0.5">
|
||||
The radius of the shape, in meters. This is only used when the shape type is "capsule", "cylinder", or "sphere". This value should not be negative.
|
||||
|
@ -22,7 +22,7 @@
|
||||
<method name="get_godot_bone_node">
|
||||
<return type="Dictionary" />
|
||||
<description>
|
||||
Returns a [Dictionary] that maps skeleton bone indices to the indices of GLTF nodes. This property is unused during import, and only set during export. In a GLTF file, a bone is a node, so Godot converts skeleton bones to GLTF nodes.
|
||||
Returns a [Dictionary] that maps skeleton bone indices to the indices of glTF nodes. This property is unused during import, and only set during export. In a glTF file, a bone is a node, so Godot converts skeleton bones to glTF nodes.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_godot_skeleton">
|
||||
@ -39,7 +39,7 @@
|
||||
<return type="void" />
|
||||
<param index="0" name="godot_bone_node" type="Dictionary" />
|
||||
<description>
|
||||
Sets a [Dictionary] that maps skeleton bone indices to the indices of GLTF nodes. This property is unused during import, and only set during export. In a GLTF file, a bone is a node, so Godot converts skeleton bones to GLTF nodes.
|
||||
Sets a [Dictionary] that maps skeleton bone indices to the indices of glTF nodes. This property is unused during import, and only set during export. In a glTF file, a bone is a node, so Godot converts skeleton bones to glTF nodes.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_unique_names">
|
||||
|
@ -1,14 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="GLTFSpecGloss" inherits="Resource" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
|
||||
<brief_description>
|
||||
Archived GLTF extension for specular/glossy materials.
|
||||
Archived glTF extension for specular/glossy materials.
|
||||
</brief_description>
|
||||
<description>
|
||||
KHR_materials_pbrSpecularGlossiness is an archived GLTF extension. This means that it is deprecated and not recommended for new files. However, it is still supported for loading old files.
|
||||
KHR_materials_pbrSpecularGlossiness is an archived glTF extension. This means that it is deprecated and not recommended for new files. However, it is still supported for loading old files.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="Runtime file loading and saving">$DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html</link>
|
||||
<link title="KHR_materials_pbrSpecularGlossiness GLTF extension spec">https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Archived/KHR_materials_pbrSpecularGlossiness</link>
|
||||
<link title="KHR_materials_pbrSpecularGlossiness glTF extension spec">https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Archived/KHR_materials_pbrSpecularGlossiness</link>
|
||||
</tutorials>
|
||||
<members>
|
||||
<member name="diffuse_factor" type="Color" setter="set_diffuse_factor" getter="get_diffuse_factor" default="Color(1, 1, 1, 1)">
|
||||
|
@ -1,15 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="GLTFState" inherits="Resource" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
|
||||
<brief_description>
|
||||
Represents all data of a GLTF file.
|
||||
Represents all data of a glTF file.
|
||||
</brief_description>
|
||||
<description>
|
||||
Contains all nodes and resources of a GLTF file. This is used by [GLTFDocument] as data storage, which allows [GLTFDocument] and all [GLTFDocumentExtension] classes to remain stateless.
|
||||
GLTFState can be populated by [GLTFDocument] reading a file or by converting a Godot scene. Then the data can either be used to create a Godot scene or save to a GLTF file. The code that converts to/from a Godot scene can be intercepted at arbitrary points by [GLTFDocumentExtension] classes. This allows for custom data to be stored in the GLTF file or for custom data to be converted to/from Godot nodes.
|
||||
Contains all nodes and resources of a glTF file. This is used by [GLTFDocument] as data storage, which allows [GLTFDocument] and all [GLTFDocumentExtension] classes to remain stateless.
|
||||
GLTFState can be populated by [GLTFDocument] reading a file or by converting a Godot scene. Then the data can either be used to create a Godot scene or save to a glTF file. The code that converts to/from a Godot scene can be intercepted at arbitrary points by [GLTFDocumentExtension] classes. This allows for custom data to be stored in the glTF file or for custom data to be converted to/from Godot nodes.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="Runtime file loading and saving">$DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html</link>
|
||||
<link title="GLTF asset header schema">https://github.com/KhronosGroup/glTF/blob/main/specification/2.0/schema/asset.schema.json"</link>
|
||||
<link title="glTF asset header schema">https://github.com/KhronosGroup/glTF/blob/main/specification/2.0/schema/asset.schema.json"</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="add_used_extension">
|
||||
@ -17,7 +17,7 @@
|
||||
<param index="0" name="extension_name" type="String" />
|
||||
<param index="1" name="required" type="bool" />
|
||||
<description>
|
||||
Appends an extension to the list of extensions used by this GLTF file during serialization. If [param required] is true, the extension will also be added to the list of required extensions. Do not run this in [method GLTFDocumentExtension._export_post], as that stage is too late to add extensions. The final list is sorted alphabetically.
|
||||
Appends an extension to the list of extensions used by this glTF file during serialization. If [param required] is true, the extension will also be added to the list of required extensions. Do not run this in [method GLTFDocumentExtension._export_post], as that stage is too late to add extensions. The final list is sorted alphabetically.
|
||||
</description>
|
||||
</method>
|
||||
<method name="append_data_to_buffers">
|
||||
@ -38,27 +38,27 @@
|
||||
<param index="0" name="extension_name" type="StringName" />
|
||||
<description>
|
||||
Gets additional arbitrary data in this [GLTFState] instance. This can be used to keep per-file state data in [GLTFDocumentExtension] classes, which is important because they are stateless.
|
||||
The argument should be the [GLTFDocumentExtension] name (does not have to match the extension name in the GLTF file), and the return value can be anything you set. If nothing was set, the return value is null.
|
||||
The argument should be the [GLTFDocumentExtension] name (does not have to match the extension name in the glTF file), and the return value can be anything you set. If nothing was set, the return value is null.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_animation_player">
|
||||
<return type="AnimationPlayer" />
|
||||
<param index="0" name="idx" type="int" />
|
||||
<description>
|
||||
Returns the [AnimationPlayer] node with the given index. These nodes are only used during the export process when converting Godot [AnimationPlayer] nodes to GLTF animations.
|
||||
Returns the [AnimationPlayer] node with the given index. These nodes are only used during the export process when converting Godot [AnimationPlayer] nodes to glTF animations.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_animation_players_count">
|
||||
<return type="int" />
|
||||
<param index="0" name="idx" type="int" />
|
||||
<description>
|
||||
Returns the number of [AnimationPlayer] nodes in this [GLTFState]. These nodes are only used during the export process when converting Godot [AnimationPlayer] nodes to GLTF animations.
|
||||
Returns the number of [AnimationPlayer] nodes in this [GLTFState]. These nodes are only used during the export process when converting Godot [AnimationPlayer] nodes to glTF animations.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_animations">
|
||||
<return type="GLTFAnimation[]" />
|
||||
<description>
|
||||
Returns an array of all [GLTFAnimation]s in the GLTF file. When importing, these will be generated as animations in an [AnimationPlayer] node. When exporting, these will be generated from Godot [AnimationPlayer] nodes.
|
||||
Returns an array of all [GLTFAnimation]s in the glTF file. When importing, these will be generated as animations in an [AnimationPlayer] node. When exporting, these will be generated from Godot [AnimationPlayer] nodes.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_buffer_views">
|
||||
@ -69,7 +69,7 @@
|
||||
<method name="get_cameras">
|
||||
<return type="GLTFCamera[]" />
|
||||
<description>
|
||||
Returns an array of all [GLTFCamera]s in the GLTF file. These are the cameras that the [member GLTFNode.camera] index refers to.
|
||||
Returns an array of all [GLTFCamera]s in the glTF file. These are the cameras that the [member GLTFNode.camera] index refers to.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_handle_binary_image">
|
||||
@ -80,13 +80,13 @@
|
||||
<method name="get_images">
|
||||
<return type="Texture2D[]" />
|
||||
<description>
|
||||
Gets the images of the GLTF file as an array of [Texture2D]s. These are the images that the [member GLTFTexture.src_image] index refers to.
|
||||
Gets the images of the glTF file as an array of [Texture2D]s. These are the images that the [member GLTFTexture.src_image] index refers to.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_lights">
|
||||
<return type="GLTFLight[]" />
|
||||
<description>
|
||||
Returns an array of all [GLTFLight]s in the GLTF file. These are the lights that the [member GLTFNode.light] index refers to.
|
||||
Returns an array of all [GLTFLight]s in the glTF file. These are the lights that the [member GLTFNode.light] index refers to.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_materials">
|
||||
@ -97,7 +97,7 @@
|
||||
<method name="get_meshes">
|
||||
<return type="GLTFMesh[]" />
|
||||
<description>
|
||||
Returns an array of all [GLTFMesh]es in the GLTF file. These are the meshes that the [member GLTFNode.mesh] index refers to.
|
||||
Returns an array of all [GLTFMesh]es in the glTF file. These are the meshes that the [member GLTFNode.mesh] index refers to.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_node_index">
|
||||
@ -111,7 +111,7 @@
|
||||
<method name="get_nodes">
|
||||
<return type="GLTFNode[]" />
|
||||
<description>
|
||||
Returns an array of all [GLTFNode]s in the GLTF file. These are the nodes that [member GLTFNode.children] and [member root_nodes] refer to. This includes nodes that may not be generated in the Godot scene, or nodes that may generate multiple Godot scene nodes.
|
||||
Returns an array of all [GLTFNode]s in the glTF file. These are the nodes that [member GLTFNode.children] and [member root_nodes] refer to. This includes nodes that may not be generated in the Godot scene, or nodes that may generate multiple Godot scene nodes.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_scene_node">
|
||||
@ -125,19 +125,19 @@
|
||||
<method name="get_skeletons">
|
||||
<return type="GLTFSkeleton[]" />
|
||||
<description>
|
||||
Returns an array of all [GLTFSkeleton]s in the GLTF file. These are the skeletons that the [member GLTFNode.skeleton] index refers to.
|
||||
Returns an array of all [GLTFSkeleton]s in the glTF file. These are the skeletons that the [member GLTFNode.skeleton] index refers to.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_skins">
|
||||
<return type="GLTFSkin[]" />
|
||||
<description>
|
||||
Returns an array of all [GLTFSkin]s in the GLTF file. These are the skins that the [member GLTFNode.skin] index refers to.
|
||||
Returns an array of all [GLTFSkin]s in the glTF file. These are the skins that the [member GLTFNode.skin] index refers to.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_texture_samplers">
|
||||
<return type="GLTFTextureSampler[]" />
|
||||
<description>
|
||||
Retrieves the array of texture samplers that are used by the textures contained in the GLTF.
|
||||
Retrieves the array of texture samplers that are used by the textures contained in the glTF.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_textures">
|
||||
@ -169,7 +169,7 @@
|
||||
<param index="1" name="additional_data" type="Variant" />
|
||||
<description>
|
||||
Sets additional arbitrary data in this [GLTFState] instance. This can be used to keep per-file state data in [GLTFDocumentExtension] classes, which is important because they are stateless.
|
||||
The first argument should be the [GLTFDocumentExtension] name (does not have to match the extension name in the GLTF file), and the second argument can be anything you want.
|
||||
The first argument should be the [GLTFDocumentExtension] name (does not have to match the extension name in the glTF file), and the second argument can be anything you want.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_animations">
|
||||
@ -250,7 +250,7 @@
|
||||
<return type="void" />
|
||||
<param index="0" name="texture_samplers" type="GLTFTextureSampler[]" />
|
||||
<description>
|
||||
Sets the array of texture samplers that are used by the textures contained in the GLTF.
|
||||
Sets the array of texture samplers that are used by the textures contained in the glTF.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_textures">
|
||||
@ -279,17 +279,17 @@
|
||||
The baking fps of the animation for either import or export.
|
||||
</member>
|
||||
<member name="base_path" type="String" setter="set_base_path" getter="get_base_path" default="""">
|
||||
The folder path associated with this GLTF data. This is used to find other files the GLTF file references, like images or binary buffers. This will be set during import when appending from a file, and will be set during export when writing to a file.
|
||||
The folder path associated with this glTF data. This is used to find other files the glTF file references, like images or binary buffers. This will be set during import when appending from a file, and will be set during export when writing to a file.
|
||||
</member>
|
||||
<member name="buffers" type="PackedByteArray[]" setter="set_buffers" getter="get_buffers" default="[]">
|
||||
</member>
|
||||
<member name="copyright" type="String" setter="set_copyright" getter="get_copyright" default="""">
|
||||
The copyright string in the asset header of the GLTF file. This is set during import if present and export if non-empty. See the GLTF asset header documentation for more information.
|
||||
The copyright string in the asset header of the glTF file. This is set during import if present and export if non-empty. See the glTF asset header documentation for more information.
|
||||
</member>
|
||||
<member name="create_animations" type="bool" setter="set_create_animations" getter="get_create_animations" default="true">
|
||||
</member>
|
||||
<member name="filename" type="String" setter="set_filename" getter="get_filename" default="""">
|
||||
The file name associated with this GLTF data. If it ends with [code].gltf[/code], this is text-based GLTF, otherwise this is binary GLB. This will be set during import when appending from a file, and will be set during export when writing to a file. If writing to a buffer, this will be an empty string.
|
||||
The file name associated with this glTF data. If it ends with [code].gltf[/code], this is text-based glTF, otherwise this is binary GLB. This will be set during import when appending from a file, and will be set during export when writing to a file. If writing to a buffer, this will be an empty string.
|
||||
</member>
|
||||
<member name="glb_data" type="PackedByteArray" setter="set_glb_data" getter="get_glb_data" default="PackedByteArray()">
|
||||
The binary buffer attached to a .glb file.
|
||||
@ -305,10 +305,10 @@
|
||||
<member name="minor_version" type="int" setter="set_minor_version" getter="get_minor_version" default="0">
|
||||
</member>
|
||||
<member name="root_nodes" type="PackedInt32Array" setter="set_root_nodes" getter="get_root_nodes" default="PackedInt32Array()">
|
||||
The root nodes of the GLTF file. Typically, a GLTF file will only have one scene, and therefore one root node. However, a GLTF file may have multiple scenes and therefore multiple root nodes, which will be generated as siblings of each other and as children of the root node of the generated Godot scene.
|
||||
The root nodes of the glTF file. Typically, a glTF file will only have one scene, and therefore one root node. However, a glTF file may have multiple scenes and therefore multiple root nodes, which will be generated as siblings of each other and as children of the root node of the generated Godot scene.
|
||||
</member>
|
||||
<member name="scene_name" type="String" setter="set_scene_name" getter="get_scene_name" default="""">
|
||||
The name of the scene. When importing, if not specified, this will be the file name. When exporting, if specified, the scene name will be saved to the GLTF file.
|
||||
The name of the scene. When importing, if not specified, this will be the file name. When exporting, if specified, the scene name will be saved to the glTF file.
|
||||
</member>
|
||||
<member name="use_named_skin_binds" type="bool" setter="set_use_named_skin_binds" getter="get_use_named_skin_binds" default="false">
|
||||
</member>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="GLTFTexture" inherits="Resource" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
|
||||
<brief_description>
|
||||
GLTFTexture represents a texture in a GLTF file.
|
||||
GLTFTexture represents a texture in a glTF file.
|
||||
</brief_description>
|
||||
<description>
|
||||
</description>
|
||||
|
@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="GLTFTextureSampler" inherits="Resource" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
|
||||
<brief_description>
|
||||
Represents a GLTF texture sampler
|
||||
Represents a glTF texture sampler
|
||||
</brief_description>
|
||||
<description>
|
||||
Represents a texture sampler as defined by the base GLTF spec. Texture samplers in GLTF specify how to sample data from the texture's base image, when rendering the texture on an object.
|
||||
Represents a texture sampler as defined by the base glTF spec. Texture samplers in glTF specify how to sample data from the texture's base image, when rendering the texture on an object.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="Runtime file loading and saving">$DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html</link>
|
||||
|
Loading…
Reference in New Issue
Block a user