SkeletonProfile

package
v0.0.0-...-7325ca5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2025 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

Package SkeletonProfile provides methods for working with SkeletonProfile object instances.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Advanced

type Advanced = class

Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.

type Any

type Any interface {
	gd.IsClass
	AsSkeletonProfile() Instance
}

type Instance

type Instance [1]gdclass.SkeletonProfile

This resource is used in [EditorScenePostImport]. Some parameters are referring to bones in [Skeleton3D], [Skin], [Animation], and some other nodes are rewritten based on the parameters of [SkeletonProfile]. [b]Note:[/b] These parameters need to be set only when creating a custom profile. In [SkeletonProfileHumanoid], they are defined internally as read-only values.

var Nil Instance

Nil is a nil/null instance of the class. Equivalent to the zero value.

func New

func New() Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsRefCounted

func (self Instance) AsRefCounted() [1]gd.RefCounted

func (Instance) AsResource

func (self Instance) AsResource() Resource.Instance

func (Instance) AsSkeletonProfile

func (self Instance) AsSkeletonProfile() Instance

func (Instance) BoneSize

func (self Instance) BoneSize() int

func (Instance) FindBone

func (self Instance) FindBone(bone_name string) int

Returns the bone index that matches [param bone_name] as its name.

func (Instance) GetBoneName

func (self Instance) GetBoneName(bone_idx int) string

Returns the name of the bone at [param bone_idx] that will be the key name in the [BoneMap]. In the retargeting process, the returned bone name is the bone name of the target skeleton.

func (Instance) GetBoneParent

func (self Instance) GetBoneParent(bone_idx int) string

Returns the name of the bone which is the parent to the bone at [param bone_idx]. The result is empty if the bone has no parent.

func (Instance) GetBoneTail

func (self Instance) GetBoneTail(bone_idx int) string

Returns the name of the bone which is the tail of the bone at [param bone_idx].

func (Instance) GetGroup

func (self Instance) GetGroup(bone_idx int) string

Returns the group of the bone at [param bone_idx].

func (Instance) GetGroupName

func (self Instance) GetGroupName(group_idx int) string

Returns the name of the group at [param group_idx] that will be the drawing group in the [BoneMap] editor.

func (Instance) GetHandleOffset

func (self Instance) GetHandleOffset(bone_idx int) Vector2.XY

Returns the offset of the bone at [param bone_idx] that will be the button position in the [BoneMap] editor. This is the offset with origin at the top left corner of the square.

func (Instance) GetReferencePose

func (self Instance) GetReferencePose(bone_idx int) Transform3D.BasisOrigin

Returns the reference pose transform for bone [param bone_idx].

func (Instance) GetTailDirection

func (self Instance) GetTailDirection(bone_idx int) gdclass.SkeletonProfileTailDirection

Returns the tail direction of the bone at [param bone_idx].

func (Instance) GetTexture

func (self Instance) GetTexture(group_idx int) [1]gdclass.Texture2D

Returns the texture of the group at [param group_idx] that will be the drawing group background image in the [BoneMap] editor.

func (Instance) GroupSize

func (self Instance) GroupSize() int

func (Instance) IsRequired

func (self Instance) IsRequired(bone_idx int) bool

Returns whether the bone at [param bone_idx] is required for retargeting. This value is used by the bone map editor. If this method returns [code]true[/code], and no bone is assigned, the handle color will be red on the bone map editor.

func (Instance) OnProfileUpdated

func (self Instance) OnProfileUpdated(cb func())

func (Instance) RootBone

func (self Instance) RootBone() string

func (Instance) ScaleBaseBone

func (self Instance) ScaleBaseBone() string

func (Instance) SetBoneName

func (self Instance) SetBoneName(bone_idx int, bone_name string)

Sets the name of the bone at [param bone_idx] that will be the key name in the [BoneMap]. In the retargeting process, the setting bone name is the bone name of the target skeleton.

func (Instance) SetBoneParent

func (self Instance) SetBoneParent(bone_idx int, bone_parent string)

Sets the bone with name [param bone_parent] as the parent of the bone at [param bone_idx]. If an empty string is passed, then the bone has no parent.

func (Instance) SetBoneSize

func (self Instance) SetBoneSize(value int)

func (Instance) SetBoneTail

func (self Instance) SetBoneTail(bone_idx int, bone_tail string)

Sets the bone with name [param bone_tail] as the tail of the bone at [param bone_idx].

func (Instance) SetGroup

func (self Instance) SetGroup(bone_idx int, group string)

Sets the group of the bone at [param bone_idx].

func (Instance) SetGroupName

func (self Instance) SetGroupName(group_idx int, group_name string)

Sets the name of the group at [param group_idx] that will be the drawing group in the [BoneMap] editor.

func (Instance) SetGroupSize

func (self Instance) SetGroupSize(value int)

func (Instance) SetHandleOffset

func (self Instance) SetHandleOffset(bone_idx int, handle_offset Vector2.XY)

Sets the offset of the bone at [param bone_idx] that will be the button position in the [BoneMap] editor. This is the offset with origin at the top left corner of the square.

func (Instance) SetReferencePose

func (self Instance) SetReferencePose(bone_idx int, bone_name Transform3D.BasisOrigin)

Sets the reference pose transform for bone [param bone_idx].

func (Instance) SetRequired

func (self Instance) SetRequired(bone_idx int, required bool)

Sets the required status for bone [param bone_idx] to [param required].

func (Instance) SetRootBone

func (self Instance) SetRootBone(value string)

func (Instance) SetScaleBaseBone

func (self Instance) SetScaleBaseBone(value string)

func (Instance) SetTailDirection

func (self Instance) SetTailDirection(bone_idx int, tail_direction gdclass.SkeletonProfileTailDirection)

Sets the tail direction of the bone at [param bone_idx]. [b]Note:[/b] This only specifies the method of calculation. The actual coordinates required should be stored in an external skeleton, so the calculation itself needs to be done externally.

func (Instance) SetTexture

func (self Instance) SetTexture(group_idx int, texture [1]gdclass.Texture2D)

Sets the texture of the group at [param group_idx] that will be the drawing group background image in the [BoneMap] editor.

func (*Instance) UnsafePointer

func (self *Instance) UnsafePointer() unsafe.Pointer

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

type TailDirection

type TailDirection = gdclass.SkeletonProfileTailDirection //gd:SkeletonProfile.TailDirection
const (
	/*Direction to the average coordinates of bone children.*/
	TailDirectionAverageChildren TailDirection = 0
	/*Direction to the coordinates of specified bone child.*/
	TailDirectionSpecificChild TailDirection = 1
	/*Direction is not calculated.*/
	TailDirectionEnd TailDirection = 2
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL