2022-03-15 13:29:32 +01:00
<?xml version="1.0" encoding="UTF-8" ?>
2024-02-25 10:26:26 +01:00
<class name= "GLTFState" inherits= "Resource" version= "4.3" >
2022-03-15 13:29:32 +01:00
<brief_description >
2023-05-01 12:46:55 +02:00
Represents all data of a GLTF file.
2022-03-15 13:29:32 +01:00
</brief_description>
<description >
2022-08-08 19:45:06 +02:00
[b]Note:[/b] This class is only compiled in editor builds. Run-time glTF loading and saving is [i]not[/i] available in exported projects. References to [GLTFState] within a script will cause an error in an exported project.
2022-03-15 13:29:32 +01:00
</description>
<tutorials >
</tutorials>
<methods >
2022-12-22 19:24:45 +01:00
<method name= "add_used_extension" >
<return type= "void" />
<argument index= "0" name= "extension_name" type= "String" />
<argument index= "1" name= "required" type= "bool" />
<description >
Appends an extension to the list of extensions used by this GLTF file during serialization. If [code]required[/code] 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>
2022-03-15 13:29:32 +01:00
<method name= "get_accessors" >
<return type= "Array" />
<description >
</description>
</method>
2022-12-22 19:24:45 +01:00
<method name= "get_additional_data" >
<return type= "Variant" />
<argument index= "0" name= "extension_name" type= "String" />
<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.
</description>
</method>
2022-03-15 13:29:32 +01:00
<method name= "get_animation_player" >
<return type= "AnimationPlayer" />
<argument index= "0" name= "idx" type= "int" />
<description >
</description>
</method>
<method name= "get_animation_players_count" >
<return type= "int" />
<argument index= "0" name= "idx" type= "int" />
<description >
</description>
</method>
<method name= "get_animations" >
<return type= "Array" />
<description >
2023-05-01 12:46:55 +02:00
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.
2022-03-15 13:29:32 +01:00
</description>
</method>
<method name= "get_buffer_views" >
<return type= "Array" />
<description >
</description>
</method>
<method name= "get_cameras" >
<return type= "Array" />
<description >
2023-05-01 12:46:55 +02:00
Returns an array of all [GLTFCamera]s in the GLTF file. These are the cameras that the [member GLTFNode.camera] index refers to.
2022-03-15 13:29:32 +01:00
</description>
</method>
<method name= "get_images" >
<return type= "Array" />
<description >
</description>
</method>
<method name= "get_lights" >
<return type= "Array" />
<description >
2023-05-01 12:46:55 +02:00
Returns an array of all [GLTFLight]s in the GLTF file. These are the lights that the [member GLTFNode.light] index refers to.
2022-03-15 13:29:32 +01:00
</description>
</method>
<method name= "get_materials" >
<return type= "Array" />
<description >
</description>
</method>
<method name= "get_meshes" >
<return type= "Array" />
<description >
2023-05-01 12:46:55 +02:00
Returns an array of all [GLTFMesh]es in the GLTF file. These are the meshes that the [member GLTFNode.mesh] index refers to.
2022-03-15 13:29:32 +01:00
</description>
</method>
<method name= "get_nodes" >
<return type= "Array" />
<description >
2023-05-01 12:46:55 +02:00
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.
2022-03-15 13:29:32 +01:00
</description>
</method>
<method name= "get_scene_node" >
<return type= "Node" />
<argument index= "0" name= "idx" type= "int" />
<description >
</description>
</method>
<method name= "get_skeleton_to_node" >
<return type= "Dictionary" />
<description >
</description>
</method>
<method name= "get_skeletons" >
<return type= "Array" />
<description >
2023-05-01 12:46:55 +02:00
Returns an array of all [GLTFSkeleton]s in the GLTF file. These are the skeletons that the [member GLTFNode.skeleton] index refers to.
2022-03-15 13:29:32 +01:00
</description>
</method>
<method name= "get_skins" >
<return type= "Array" />
<description >
2023-05-01 12:46:55 +02:00
Returns an array of all [GLTFSkin]s in the GLTF file. These are the skins that the [member GLTFNode.skin] index refers to.
2022-03-15 13:29:32 +01:00
</description>
</method>
2021-10-04 17:49:42 +02:00
<method name= "get_texture_samplers" >
<return type= "Array" />
<description >
Retrieves the array of texture samplers that are used by the textures contained in the GLTF.
</description>
</method>
2022-03-15 13:29:32 +01:00
<method name= "get_textures" >
<return type= "Array" />
<description >
</description>
</method>
<method name= "get_unique_animation_names" >
<return type= "Array" />
<description >
2023-05-01 12:46:55 +02:00
Returns an array of unique animation names. This is only used during the import process.
2022-03-15 13:29:32 +01:00
</description>
</method>
<method name= "get_unique_names" >
<return type= "Array" />
<description >
2023-05-01 12:46:55 +02:00
Returns an array of unique node names. This is used in both the import process and export process.
2022-03-15 13:29:32 +01:00
</description>
</method>
<method name= "set_accessors" >
<return type= "void" />
<argument index= "0" name= "accessors" type= "Array" />
<description >
</description>
</method>
2022-12-22 19:24:45 +01:00
<method name= "set_additional_data" >
<return type= "void" />
<argument index= "0" name= "extension_name" type= "String" />
<argument 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.
</description>
</method>
2022-03-15 13:29:32 +01:00
<method name= "set_animations" >
<return type= "void" />
<argument index= "0" name= "animations" type= "Array" />
<description >
</description>
</method>
<method name= "set_buffer_views" >
<return type= "void" />
<argument index= "0" name= "buffer_views" type= "Array" />
<description >
</description>
</method>
<method name= "set_cameras" >
<return type= "void" />
<argument index= "0" name= "cameras" type= "Array" />
<description >
</description>
</method>
<method name= "set_images" >
<return type= "void" />
<argument index= "0" name= "images" type= "Array" />
<description >
</description>
</method>
<method name= "set_lights" >
<return type= "void" />
<argument index= "0" name= "lights" type= "Array" />
<description >
</description>
</method>
<method name= "set_materials" >
<return type= "void" />
<argument index= "0" name= "materials" type= "Array" />
<description >
</description>
</method>
<method name= "set_meshes" >
<return type= "void" />
<argument index= "0" name= "meshes" type= "Array" />
<description >
</description>
</method>
<method name= "set_nodes" >
<return type= "void" />
<argument index= "0" name= "nodes" type= "Array" />
<description >
</description>
</method>
<method name= "set_skeleton_to_node" >
<return type= "void" />
<argument index= "0" name= "skeleton_to_node" type= "Dictionary" />
<description >
</description>
</method>
<method name= "set_skeletons" >
<return type= "void" />
<argument index= "0" name= "skeletons" type= "Array" />
<description >
</description>
</method>
<method name= "set_skins" >
<return type= "void" />
<argument index= "0" name= "skins" type= "Array" />
<description >
</description>
</method>
2021-10-04 17:49:42 +02:00
<method name= "set_texture_samplers" >
<return type= "void" />
<argument index= "0" name= "texture_samplers" type= "Array" />
<description >
Sets the array of texture samplers that are used by the textures contained in the GLTF.
</description>
</method>
2022-03-15 13:29:32 +01:00
<method name= "set_textures" >
<return type= "void" />
<argument index= "0" name= "textures" type= "Array" />
<description >
</description>
</method>
<method name= "set_unique_animation_names" >
<return type= "void" />
<argument index= "0" name= "unique_animation_names" type= "Array" />
<description >
</description>
</method>
<method name= "set_unique_names" >
<return type= "void" />
<argument index= "0" name= "unique_names" type= "Array" />
<description >
</description>
</method>
</methods>
<members >
2022-08-08 19:45:06 +02:00
<member name= "buffers" type= "Array" setter= "set_buffers" getter= "get_buffers" default= "[ ]" >
2022-03-15 13:29:32 +01:00
</member>
2022-08-09 19:39:58 +02:00
<member name= "create_animations" type= "bool" setter= "set_create_animations" getter= "get_create_animations" default= "true" >
</member>
2022-08-08 19:45:06 +02:00
<member name= "glb_data" type= "PoolByteArray" setter= "set_glb_data" getter= "get_glb_data" default= "PoolByteArray( )" >
2022-03-15 13:29:32 +01:00
</member>
<member name= "json" type= "Dictionary" setter= "set_json" getter= "get_json" default= "{}" >
</member>
<member name= "major_version" type= "int" setter= "set_major_version" getter= "get_major_version" default= "0" >
</member>
<member name= "minor_version" type= "int" setter= "set_minor_version" getter= "get_minor_version" default= "0" >
</member>
2022-08-08 19:45:06 +02:00
<member name= "root_nodes" type= "Array" setter= "set_root_nodes" getter= "get_root_nodes" default= "[ ]" >
2023-05-01 12:46:55 +02:00
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.
2022-03-15 13:29:32 +01:00
</member>
<member name= "scene_name" type= "String" setter= "set_scene_name" getter= "get_scene_name" default= """" >
2023-05-01 12:46:55 +02:00
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.
2022-03-15 13:29:32 +01:00
</member>
<member name= "use_named_skin_binds" type= "bool" setter= "set_use_named_skin_binds" getter= "get_use_named_skin_binds" default= "false" >
</member>
</members>
2022-08-08 19:45:06 +02:00
<constants >
</constants>
2022-03-15 13:29:32 +01:00
</class>