GLTFState¶
Inherits: Resource < Reference < Object
Represents all data of a GLTF file.
Description¶
Note: This class is only compiled in editor builds. Run-time glTF loading and saving is not available in exported projects. References to GLTFState within a script will cause an error in an exported project.
Properties¶
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Methods¶
Property Descriptions¶
Array buffers = [ ]
There is currently no description for this property. Please help us by contributing one!
bool create_animations = true
There is currently no description for this property. Please help us by contributing one!
PoolByteArray glb_data = PoolByteArray( )
void set_glb_data ( PoolByteArray value )
PoolByteArray get_glb_data ( )
There is currently no description for this property. Please help us by contributing one!
Dictionary json = {}
void set_json ( Dictionary value )
Dictionary get_json ( )
There is currently no description for this property. Please help us by contributing one!
int major_version = 0
There is currently no description for this property. Please help us by contributing one!
int minor_version = 0
There is currently no description for this property. Please help us by contributing one!
Array root_nodes = [ ]
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.
String scene_name = ""
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.
bool use_named_skin_binds = false
There is currently no description for this property. Please help us by contributing one!
Method Descriptions¶
void add_used_extension ( String extension_name, bool required )
Appends an extension to the list of extensions used by this GLTF file during serialization. If required
is true, the extension will also be added to the list of required extensions. Do not run this in GLTFDocumentExtension._export_post, as that stage is too late to add extensions. The final list is sorted alphabetically.
Array get_accessors ( )
There is currently no description for this method. Please help us by contributing one!
Variant get_additional_data ( String extension_name )
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.
AnimationPlayer get_animation_player ( int idx )
There is currently no description for this method. Please help us by contributing one!
int get_animation_players_count ( int idx )
There is currently no description for this method. Please help us by contributing one!
Array get_animations ( )
Returns an array of all GLTFAnimations 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.
Array get_buffer_views ( )
There is currently no description for this method. Please help us by contributing one!
Array get_cameras ( )
Returns an array of all GLTFCameras in the GLTF file. These are the cameras that the GLTFNode.camera index refers to.
Array get_images ( )
There is currently no description for this method. Please help us by contributing one!
Array get_lights ( )
Returns an array of all GLTFLights in the GLTF file. These are the lights that the GLTFNode.light index refers to.
Array get_materials ( )
There is currently no description for this method. Please help us by contributing one!
Array get_meshes ( )
Returns an array of all GLTFMeshes in the GLTF file. These are the meshes that the GLTFNode.mesh index refers to.
Array get_nodes ( )
Returns an array of all GLTFNodes in the GLTF file. These are the nodes that GLTFNode.children and 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.
Node get_scene_node ( int idx )
There is currently no description for this method. Please help us by contributing one!
Dictionary get_skeleton_to_node ( )
There is currently no description for this method. Please help us by contributing one!
Array get_skeletons ( )
Returns an array of all GLTFSkeletons in the GLTF file. These are the skeletons that the GLTFNode.skeleton index refers to.
Array get_skins ( )
Returns an array of all GLTFSkins in the GLTF file. These are the skins that the GLTFNode.skin index refers to.
Array get_texture_samplers ( )
Retrieves the array of texture samplers that are used by the textures contained in the GLTF.
Array get_textures ( )
There is currently no description for this method. Please help us by contributing one!
Array get_unique_animation_names ( )
Returns an array of unique animation names. This is only used during the import process.
Array get_unique_names ( )
Returns an array of unique node names. This is used in both the import process and export process.
void set_accessors ( Array accessors )
There is currently no description for this method. Please help us by contributing one!
void set_additional_data ( String extension_name, Variant additional_data )
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.
void set_animations ( Array animations )
There is currently no description for this method. Please help us by contributing one!
void set_buffer_views ( Array buffer_views )
There is currently no description for this method. Please help us by contributing one!
void set_cameras ( Array cameras )
There is currently no description for this method. Please help us by contributing one!
void set_images ( Array images )
There is currently no description for this method. Please help us by contributing one!
void set_lights ( Array lights )
There is currently no description for this method. Please help us by contributing one!
void set_materials ( Array materials )
There is currently no description for this method. Please help us by contributing one!
void set_meshes ( Array meshes )
There is currently no description for this method. Please help us by contributing one!
void set_nodes ( Array nodes )
There is currently no description for this method. Please help us by contributing one!
void set_skeleton_to_node ( Dictionary skeleton_to_node )
There is currently no description for this method. Please help us by contributing one!
void set_skeletons ( Array skeletons )
There is currently no description for this method. Please help us by contributing one!
void set_skins ( Array skins )
There is currently no description for this method. Please help us by contributing one!
void set_texture_samplers ( Array texture_samplers )
Sets the array of texture samplers that are used by the textures contained in the GLTF.
void set_textures ( Array textures )
There is currently no description for this method. Please help us by contributing one!
void set_unique_animation_names ( Array unique_animation_names )
There is currently no description for this method. Please help us by contributing one!
void set_unique_names ( Array unique_names )
There is currently no description for this method. Please help us by contributing one!