Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

Skin

Inherits: Resource < RefCounted < Object

A list of inverse bind poses and corresponding bones.

Description

Skin contains a list of bind pose matrices and a list of either bone names if bones are named, or bone indices if bones are not named. The bind pose matrix, also called offset matrix or inverse bind matrix, is a Transform3D offset that is multiplied with a bone's transform to get from vertex space to bone space.

Methods

void

add_bind(bone: int, pose: Transform3D)

void

add_named_bind(name: String, pose: Transform3D)

void

clear_binds()

int

get_bind_bone(bind_index: int) const

int

get_bind_count() const

StringName

get_bind_name(bind_index: int) const

Transform3D

get_bind_pose(bind_index: int) const

void

set_bind_bone(bind_index: int, bone: int)

void

set_bind_count(bind_count: int)

void

set_bind_name(bind_index: int, name: StringName)

void

set_bind_pose(bind_index: int, pose: Transform3D)


Method Descriptions

void add_bind(bone: int, pose: Transform3D) 🔗

Adds a bind pose matrix of pose and associated bone index bone to the bind pose list and increases the bind count by 1.


void add_named_bind(name: String, pose: Transform3D) 🔗

Like add_bind() but adds a bone name instead of a bone index.


void clear_binds() 🔗

Clears the bind pose list.


int get_bind_bone(bind_index: int) const 🔗

Returns the bone index associated with bind pose bind_index.


int get_bind_count() const 🔗

Returns the length of the bind pose list.


StringName get_bind_name(bind_index: int) const 🔗

Returns the bone name associated with bind pose bind_index.


Transform3D get_bind_pose(bind_index: int) const 🔗

Returns the bind pose matrix at bind_index.


void set_bind_bone(bind_index: int, bone: int) 🔗

Sets the bone index of bind pose bind_index to the given index bone.


void set_bind_count(bind_count: int) 🔗

Resizes the bind pose list to a length of bind_count.


void set_bind_name(bind_index: int, name: StringName) 🔗

Sets the name of the bone in bind pose bind_index to name.


void set_bind_pose(bind_index: int, pose: Transform3D) 🔗

Sets the bind pose bind_index with the given offset matrix pose.


User-contributed notes

Please read the User-contributed notes policy before submitting a comment.