Up to date
This page is up to date for Godot 4.0
.
If you still find outdated information, please open an issue.
GLTFState¶
Inherits: Resource < RefCounted < Object
There is currently no description for this class. Please help us by contributing one!
Properties¶
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Methods¶
Constants¶
HANDLE_BINARY_DISCARD_TEXTURES = 0
Discards all embedded textures and uses untextured materials.
HANDLE_BINARY_EXTRACT_TEXTURES = 1
Extracts embedded textures to be reimported and compressed. Editor only. Acts as uncompressed at runtime.
HANDLE_BINARY_EMBED_AS_BASISU = 2
Embeds textures VRAM compressed with Basis Universal into the generated scene.
HANDLE_BINARY_EMBED_AS_UNCOMPRESSED = 3
Embeds textures compressed losslessly into the generated scene, matching old behavior.
Property Descriptions¶
String base_path = ""
There is currently no description for this property. Please help us by contributing one!
PackedByteArray[] buffers = []
void set_buffers ( PackedByteArray[] value )
PackedByteArray[] get_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!
PackedByteArray glb_data = PackedByteArray()
void set_glb_data ( PackedByteArray value )
PackedByteArray 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!
PackedInt32Array root_nodes = PackedInt32Array()
void set_root_nodes ( PackedInt32Array value )
PackedInt32Array get_root_nodes ( )
There is currently no description for this property. Please help us by contributing one!
String scene_name = ""
There is currently no description for this property. Please help us by contributing one!
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.
GLTFAccessor[] get_accessors ( )
There is currently no description for this method. Please help us by contributing one!
Variant get_additional_data ( StringName 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!
GLTFAnimation[] get_animations ( )
There is currently no description for this method. Please help us by contributing one!
GLTFBufferView[] get_buffer_views ( )
There is currently no description for this method. Please help us by contributing one!
GLTFCamera[] get_cameras ( )
There is currently no description for this method. Please help us by contributing one!
int get_handle_binary_image ( )
There is currently no description for this method. Please help us by contributing one!
Texture2D[] get_images ( )
There is currently no description for this method. Please help us by contributing one!
GLTFLight[] get_lights ( )
There is currently no description for this method. Please help us by contributing one!
Material[] get_materials ( )
There is currently no description for this method. Please help us by contributing one!
GLTFMesh[] get_meshes ( )
There is currently no description for this method. Please help us by contributing one!
GLTFNode[] get_nodes ( )
There is currently no description for this method. Please help us by contributing one!
Node get_scene_node ( int idx )
There is currently no description for this method. Please help us by contributing one!
GLTFSkeleton[] get_skeletons ( )
There is currently no description for this method. Please help us by contributing one!
GLTFSkin[] get_skins ( )
There is currently no description for this method. Please help us by contributing one!
GLTFTextureSampler[] get_texture_samplers ( )
Retrieves the array of texture samplers that are used by the textures contained in the GLTF.
GLTFTexture[] get_textures ( )
There is currently no description for this method. Please help us by contributing one!
String[] get_unique_animation_names ( )
There is currently no description for this method. Please help us by contributing one!
String[] get_unique_names ( )
There is currently no description for this method. Please help us by contributing one!
void set_accessors ( GLTFAccessor[] accessors )
There is currently no description for this method. Please help us by contributing one!
void set_additional_data ( StringName 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 ( GLTFAnimation[] animations )
There is currently no description for this method. Please help us by contributing one!
void set_buffer_views ( GLTFBufferView[] buffer_views )
There is currently no description for this method. Please help us by contributing one!
void set_cameras ( GLTFCamera[] cameras )
There is currently no description for this method. Please help us by contributing one!
void set_handle_binary_image ( int method )
There is currently no description for this method. Please help us by contributing one!
void set_images ( Texture2D[] images )
There is currently no description for this method. Please help us by contributing one!
void set_lights ( GLTFLight[] lights )
There is currently no description for this method. Please help us by contributing one!
void set_materials ( Material[] materials )
There is currently no description for this method. Please help us by contributing one!
void set_meshes ( GLTFMesh[] meshes )
There is currently no description for this method. Please help us by contributing one!
void set_nodes ( GLTFNode[] nodes )
There is currently no description for this method. Please help us by contributing one!
void set_skeletons ( GLTFSkeleton[] skeletons )
There is currently no description for this method. Please help us by contributing one!
void set_skins ( GLTFSkin[] skins )
There is currently no description for this method. Please help us by contributing one!
void set_texture_samplers ( GLTFTextureSampler[] texture_samplers )
Sets the array of texture samplers that are used by the textures contained in the GLTF.
void set_textures ( GLTFTexture[] textures )
There is currently no description for this method. Please help us by contributing one!
void set_unique_animation_names ( String[] unique_animation_names )
There is currently no description for this method. Please help us by contributing one!
void set_unique_names ( String[] unique_names )
There is currently no description for this method. Please help us by contributing one!