GLTFNode

Inherits: Resource < Reference < Object

GLTF node class.

Description

Represents a GLTF node. GLTF nodes may have names, transforms, children (other GLTF nodes), and more specialized properties (represented by their own classes).

Note: This class is only compiled in editor builds. Run-time glTF loading and saving is not available in exported projects. References to GLTFNode within a script will cause an error in an exported project.

Tutorials

Properties

int

camera

-1

PoolIntArray

children

PoolIntArray(  )

int

height

-1

bool

joint

false

int

light

-1

int

mesh

-1

int

parent

-1

Quat

rotation

Quat( 0, 0, 0, 1 )

Vector3

scale

Vector3( 1, 1, 1 )

int

skeleton

-1

int

skin

-1

Vector3

translation

Vector3( 0, 0, 0 )

Transform

xform

Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )

Methods

Variant

get_additional_data ( String extension_name )

void

set_additional_data ( String extension_name, Variant additional_data )


Property Descriptions

int camera = -1

  • void set_camera ( int value )

  • int get_camera ( )

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


PoolIntArray children = PoolIntArray(  )

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


int height = -1

  • void set_height ( int value )

  • int get_height ( )

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


bool joint = false

  • void set_joint ( bool value )

  • bool get_joint ( )

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


int light = -1

  • void set_light ( int value )

  • int get_light ( )

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


int mesh = -1

  • void set_mesh ( int value )

  • int get_mesh ( )

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


int parent = -1

  • void set_parent ( int value )

  • int get_parent ( )

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


Quat rotation = Quat( 0, 0, 0, 1 )

  • void set_rotation ( Quat value )

  • Quat get_rotation ( )

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


Vector3 scale = Vector3( 1, 1, 1 )

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


int skeleton = -1

  • void set_skeleton ( int value )

  • int get_skeleton ( )

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


int skin = -1

  • void set_skin ( int value )

  • int get_skin ( )

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


Vector3 translation = Vector3( 0, 0, 0 )

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


Transform xform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )

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


Method Descriptions

Variant get_additional_data ( String extension_name )

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.


void set_additional_data ( String extension_name, Variant additional_data )

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.