SkeletonProfile
Base class for a profile of a virtual skeleton used as a target for retargeting.
SkeletonProfile.swift:19class 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
.
This object emits the following signals:
Superclasses
class Resource
Base class for serializable objects.
Citizens in SwiftGodot
Conformances
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol Identifiable<ID>
A class of types whose instances hold the value of an entity with stable identity.
protocol VariantRepresentable
Types that conform to VariantRepresentable can be stored directly in
Variant
with no conversion. These include all of the Variant types from Godot (for exampleGString
,Rect
,Plane
), Godot objects (those that subclass SwiftGodot.Object) as well as the built-in Swift types UInt8, Int64 and Double.protocol VariantStorable
Types that conform to VariantStorable can be stored in a Variant and can be extracted back out of a Variant.
Types
Type members
Instance members
var boneSize: Int32
The amount of bones in retargeting section’s
BoneMap
editor. For example,SkeletonProfileHumanoid
has 56 bones.var groupSize: Int32
The amount of groups of bones in retargeting section’s
BoneMap
editor. For example,SkeletonProfileHumanoid
has 4 groups.var profileUpdated: SimpleSignal
This signal is emitted when change the value in profile. This is used to update key name in the
BoneMap
and to redraw theBoneMap
editor.var rootBone: StringName
A bone name that will be used as the root bone in
AnimationTree
. This should be the bone of the parent of hips that exists at the world origin.var scaleBaseBone: StringName
A bone name which will use model’s height as the coefficient for normalization. For example,
SkeletonProfileHumanoid
defines it asHips
.func findBone(boneName: StringName
) -> Int32 Returns the bone index that matches
boneName
as its name.func getBoneName(boneIdx: Int32
) -> StringName Returns the name of the bone at
boneIdx
that will be the key name in theBoneMap
.func getBoneParent(boneIdx: Int32
) -> StringName Returns the name of the bone which is the parent to the bone at
boneIdx
. The result is empty if the bone has no parent.func getBoneTail(boneIdx: Int32
) -> StringName Returns the name of the bone which is the tail of the bone at
boneIdx
.func getGroup(boneIdx: Int32
) -> StringName Returns the group of the bone at
boneIdx
.func getGroupName(groupIdx: Int32
) -> StringName Returns the name of the group at
groupIdx
that will be the drawing group in theBoneMap
editor.func getHandleOffset(boneIdx: Int32
) -> Vector2 Returns the offset of the bone at
boneIdx
that will be the button position in theBoneMap
editor.func getReferencePose(boneIdx: Int32
) -> Transform3D Returns the reference pose transform for bone
boneIdx
.func getTailDirection(boneIdx: Int32
) -> SkeletonProfile.TailDirection Returns the tail direction of the bone at
boneIdx
.func getTexture(groupIdx: Int32
) -> Texture2D? Returns the texture of the group at
groupIdx
that will be the drawing group background image in theBoneMap
editor.func setBoneName(boneIdx: Int32, boneName: StringName
) Sets the name of the bone at
boneIdx
that will be the key name in theBoneMap
.func setBoneParent(boneIdx: Int32, boneParent: StringName
) Sets the bone with name
boneParent
as the parent of the bone atboneIdx
. If an empty string is passed, then the bone has no parent.func setBoneTail(boneIdx: Int32, boneTail: StringName
) Sets the bone with name
boneTail
as the tail of the bone atboneIdx
.func setGroup(boneIdx: Int32, group: StringName
) Sets the group of the bone at
boneIdx
.func setGroupName(groupIdx: Int32, groupName: StringName
) Sets the name of the group at
groupIdx
that will be the drawing group in theBoneMap
editor.func setHandleOffset(boneIdx: Int32, handleOffset: Vector2
) Sets the offset of the bone at
boneIdx
that will be the button position in theBoneMap
editor.func setReferencePose(boneIdx: Int32, boneName: Transform3D
) Sets the reference pose transform for bone
boneIdx
.func setTailDirection(boneIdx: Int32, tailDirection: SkeletonProfile.TailDirection
) Sets the tail direction of the bone at
boneIdx
.func setTexture(groupIdx: Int32, texture: Texture2D?
) Sets the texture of the group at
groupIdx
that will be the drawing group background image in theBoneMap
editor.
Subclasses
class SkeletonProfileHumanoid
A humanoid
SkeletonProfile
preset.