GLTFState

Inherits: Resource < Reference < Object

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

Array

buffers

[  ]

bool

create_animations

true

PoolByteArray

glb_data

PoolByteArray(  )

Dictionary

json

{}

int

major_version

0

int

minor_version

0

Array

root_nodes

[  ]

String

scene_name

""

bool

use_named_skin_binds

false

Methods

void

add_used_extension ( String extension_name, bool required )

Array

get_accessors ( )

Variant

get_additional_data ( String extension_name )

AnimationPlayer

get_animation_player ( int idx )

int

get_animation_players_count ( int idx )

Array

get_animations ( )

Array

get_buffer_views ( )

Array

get_cameras ( )

Array

get_images ( )

Array

get_lights ( )

Array

get_materials ( )

Array

get_meshes ( )

Array

get_nodes ( )

Node

get_scene_node ( int idx )

Dictionary

get_skeleton_to_node ( )

Array

get_skeletons ( )

Array

get_skins ( )

Array

get_texture_samplers ( )

Array

get_textures ( )

Array

get_unique_animation_names ( )

Array

get_unique_names ( )

void

set_accessors ( Array accessors )

void

set_additional_data ( String extension_name, Variant additional_data )

void

set_animations ( Array animations )

void

set_buffer_views ( Array buffer_views )

void

set_cameras ( Array cameras )

void

set_images ( Array images )

void

set_lights ( Array lights )

void

set_materials ( Array materials )

void

set_meshes ( Array meshes )

void

set_nodes ( Array nodes )

void

set_skeleton_to_node ( Dictionary skeleton_to_node )

void

set_skeletons ( Array skeletons )

void

set_skins ( Array skins )

void

set_texture_samplers ( Array texture_samplers )

void

set_textures ( Array textures )

void

set_unique_animation_names ( Array unique_animation_names )

void

set_unique_names ( Array unique_names )


Property Descriptions

Array buffers = [  ]

  • void set_buffers ( Array value )

  • Array get_buffers ( )

There is currently no description for this property. Please help us by contributing one!


bool create_animations = true

  • void set_create_animations ( bool value )

  • bool get_create_animations ( )

There is currently no description for this property. Please help us by contributing one!


PoolByteArray glb_data = PoolByteArray(  )

There is currently no description for this property. Please help us by contributing one!


Dictionary json = {}

There is currently no description for this property. Please help us by contributing one!


int major_version = 0

  • void set_major_version ( int value )

  • int get_major_version ( )

There is currently no description for this property. Please help us by contributing one!


int minor_version = 0

  • void set_minor_version ( int value )

  • int get_minor_version ( )

There is currently no description for this property. Please help us by contributing one!


Array root_nodes = [  ]

  • void set_root_nodes ( Array value )

  • Array get_root_nodes ( )

There is currently no description for this property. Please help us by contributing one!


String scene_name = ""

  • void set_scene_name ( String value )

  • String get_scene_name ( )

There is currently no description for this property. Please help us by contributing one!


bool use_named_skin_binds = false

  • void set_use_named_skin_binds ( bool value )

  • bool get_use_named_skin_binds ( )

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 ( )

There is currently no description for this method. Please help us by contributing one!


Array get_buffer_views ( )

There is currently no description for this method. Please help us by contributing one!


Array get_cameras ( )

There is currently no description for this method. Please help us by contributing one!


Array get_images ( )

There is currently no description for this method. Please help us by contributing one!


Array get_lights ( )

There is currently no description for this method. Please help us by contributing one!


Array get_materials ( )

There is currently no description for this method. Please help us by contributing one!


Array get_meshes ( )

There is currently no description for this method. Please help us by contributing one!


Array 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!


Dictionary get_skeleton_to_node ( )

There is currently no description for this method. Please help us by contributing one!


Array get_skeletons ( )

There is currently no description for this method. Please help us by contributing one!


Array get_skins ( )

There is currently no description for this method. Please help us by contributing one!


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 ( )

There is currently no description for this method. Please help us by contributing one!


Array get_unique_names ( )

There is currently no description for this method. Please help us by contributing one!


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!