Inherits: Resource < RefCounted < Object
GLTF node class.
Represents a GLTF node. GLTF nodes may have names, transforms, children (other GLTF nodes), and more specialized properties (represented by their own classes).
GLTF nodes generally exist inside of GLTFState which represents all data of a GLTF file. Most of GLTFNode's properties are indices of other data in the GLTF file. You can extend a GLTF node with additional properties by using get_additional_data and set_additional_data.
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
|
get_additional_data ( StringName extension_name ) | |
void | set_additional_data ( StringName extension_name, Variant additional_data ) |
-1
If this GLTF node is a camera, the index of the GLTFCamera in the GLTFState that describes the camera's properties. If -1, this node is not a camera.
PackedInt32Array()
The indices of the child nodes in the GLTFState. If this GLTF node has no children, this will be an empty array.
-1
How deep into the node hierarchy this node is. A root node will have a height of 0, its children will have a height of 1, and so on. If -1, the height has not been calculated.
-1
If this GLTF node is a light, the index of the GLTFLight in the GLTFState that describes the light's properties. If -1, this node is not a light.
-1
If this GLTF node is a mesh, the index of the GLTFMesh in the GLTFState that describes the mesh's properties. If -1, this node is not a mesh.
-1
The index of the parent node in the GLTFState. If -1, this node is a root node.
Vector3(0, 0, 0)
The position of the GLTF node relative to its parent.
Quaternion(0, 0, 0, 1)
The rotation of the GLTF node relative to its parent.
Vector3(1, 1, 1)
The scale of the GLTF node relative to its parent.
-1
If this GLTF node has a skeleton, the index of the GLTFSkeleton in the GLTFState that describes the skeleton's properties. If -1, this node does not have a skeleton.
-1
If this GLTF node has a skin, the index of the GLTFSkin in the GLTFState that describes the skin's properties. If -1, this node does not have a skin.
Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
The transform of the GLTF node relative to its parent. This property is usually unused since the position, rotation, and scale properties are preferred.
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.
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.
© 2014–present Juan Linietsky, Ariel Manzur and the Godot community
Licensed under the Creative Commons Attribution Unported License v3.0.
https://docs.godotengine.org/en/4.2/classes/class_gltfnode.html