CreateBone()

Syntax

CreateBone(#Mesh, Bone$, ParentBone$, x, y, z, RotationX, RotationY, RotationZ, RotationW, Mode)
Description
Creates a new bone for the specified #Mesh. If the mesh doesn't have a skeleton, it has to be created with CreateSkeleton() before using this command.

Parameters

#Mesh The mesh to use.
Bone$ The new bone name.
ParentBone$ The parent bone name. If this string value is empty, the bone is created at the root of the skeleton.
x, y, z The new bone coordinate, in world unit.
RotationX, RotationY, RotationZ, RotationW The new bone rotation.
Mode The mode to use for the bone rotation. It can be one of the following value:
  #PB_Orientation_PitchYawRoll  : 'RotationX' (pitch), 'RotationY' (yaw), 'RotationZ' (roll), applied in this order (default).
  #PB_Orientation_Quaternion    : 'RotationX', 'RotationY', 'RotationZ', 'RotationW' for quaternion values
  #PB_Orientation_AngleAxis     : 'RotationX', 'RotationY', 'RotationZ' for rotation axis, and 'RotationW' for the angle (in degree).
  #PB_Orientation_Direction     : alias for #PB_Orientation_DirectionLDVZN
  #PB_Orientation_DirectionLDVX : 'RotationX', 'RotationY', 'RotationZ' for direction vector (local direction vector X), and 'RotationW' for angle (in degree).
  #PB_Orientation_DirectionLDVY : 'RotationX', 'RotationY', 'RotationZ' for direction vector (local direction vector Y), and 'RotationW' for angle (in degree).
  #PB_Orientation_DirectionLDVZ : 'RotationX', 'RotationY', 'RotationZ' for direction vector (local direction vector Z), and 'RotationW' for angle (in degree).
  #PB_Orientation_DirectionLDVXN: 'RotationX', 'RotationY', 'RotationZ' for direction vector (local direction vector -X), and 'RotationW' for angle (in degree).
  #PB_Orientation_DirectionLDVYN: 'RotationX', 'RotationY', 'RotationZ' for direction vector (local direction vector -Y), and 'RotationW' for angle (in degree).
  #PB_Orientation_DirectionLDVZN: 'RotationX', 'RotationY', 'RotationZ' for direction vector (local direction vector -Z), and 'RotationW' for angle (in degree).

Return value

None.

Supported OS

All

<- AddSkeletonAnimationKeyFrame() - Skeleton Index - CreateSkeleton() ->