Skip to content

Skin

Inherits: Resource < RefCounted < Object

A list of inverse bind poses and corresponding bones.

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.

Returns Method
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)

add_bind

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.

add_named_bind

void add_named_bind(name: String, pose: Transform3D)

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

clear_binds

void clear_binds()

Clears the bind pose list.

get_bind_bone

int get_bind_bone(bind_index: int) const

Returns the bone index associated with bind pose bind_index.

get_bind_count

int get_bind_count() const

Returns the length of the bind pose list.

get_bind_name

StringName get_bind_name(bind_index: int) const

Returns the bone name associated with bind pose bind_index.

get_bind_pose

Transform3D get_bind_pose(bind_index: int) const

Returns the bind pose matrix at bind_index.

set_bind_bone

void set_bind_bone(bind_index: int, bone: int)

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

set_bind_count

void set_bind_count(bind_count: int)

Resizes the bind pose list to a length of bind_count.

set_bind_name

void set_bind_name(bind_index: int, name: StringName)

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

set_bind_pose

void set_bind_pose(bind_index: int, pose: Transform3D)

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