DuAEF.Duik.Bone

Bones

Members

static, readonly BoneTypes :int

The shapes/type/icon of the bones
Properties:
Name Type Description
PIN int
VERTEX int
TANGENT int
BEND_PIN int
ADVANCED_PIN int
STANDARD int

static color :Array.<float>

The default color for new bones
Default Value:
  • DuAEF.DuJS.Color.Colors.RAINBOX_RED

static size :int

The default size for new bones if boneSizeHint is DuAEF.Duik.Sizes.CUSTOM
Default Value:
  • 100

static sizeHint :int

Size hint of bones
Default Value:
  • DuAEF.Duik.Sizes.SMALL

Methods

static addBone(prop, sizeopt, tangentsopt) → {Array.<Bone>}

Links the property to a bone. This will automatically detect the type of the property to create the corresponding bones.
Parameters:
Name Type Attributes Default Description
prop Property | PropertyInfo The property
size float <optional>
The bone size, a percentage. By default, it will adjust automatically depending on comp size and DuAEF.Duik.Bone.sizeHint
tangents bool <optional>
true True to create bones for the tangents if prop is a Shape
Returns:
Array.<Bone> - The bones created.

static addBones(propertyGroup, sizeopt, tangentsopt) → {Array.<Bone>}

Links the spatial child properties to bones
Parameters:
Name Type Attributes Default Description
propertyGroup PropertyGroup | PropertyInfo The property
size float <optional>
The bone size, a percentage. By default, it will adjust automatically depending on comp size and DuAEF.Duik.Bone.sizeHint
tangents bool <optional>
true True to create bones for the tangents if prop is a Shape
Returns:
Array.<Bone> - The bones created.

static addPinBone(prop, size) → {Bone}

Adds a bone on a puppet pin
Parameters:
Name Type Description
prop PropertyGroup The puppet pin
size float The bone size, a percentage. By default, it will adjust automatically depending on comp size and DuAEF.Duik.Bone.sizeHint
Returns:
Bone - The new bone.

static addPositionBone(prop, size) → {Bone}

Creates a bone for a multi-dimensionnal property.
Parameters:
Name Type Description
prop Property The property
size float The bone size, a percentage. By default, it will adjust automatically depending on comp size and DuAEF.Duik.Bone.sizeHint
Returns:
Bone - The new bone.

static addShapeBone(prop, size) → {Bone}

Creates a bone for a vertex or a tangent of a shape, using the corresponding effect set by Duik (DuAEF.Duik.PseudoEffects.SHAPE_LINKER).
Parameters:
Name Type Description
prop Property The property of the DuAEF.Duik.PseudoEffects.SHAPE_LINKER
size float The bone size, a percentage. By default, it will adjust automatically depending on comp size and DuAEF.Duik.Bone.sizeHint
Returns:
Bone - The new bone.

static createBone(compopt, sizeopt, typeopt) → {Bone}

Creates a stand alone bone in the comp
Parameters:
Name Type Attributes Default Description
comp CompItem <optional>
DuAEF.DuAE.Project.getActiveComp() The containing composition
size float <optional>
The bone size, a percentage. By default, it will adjust automatically depending on comp size and DuAEF.Duik.Bone.sizeHint
type DuAEF.Duik.Bone.BoneTypes <optional>
DuAEF.Duik.Bone.BoneTypes.PIN The type
Returns:
Bone - The bone

static getBoneByName(comp, name, selectedOnlyopt) → {Bone|null}

Gets Bones in the comp or the selection.
Parameters:
Name Type Attributes Default Description
comp CompItem The composition where to get the bones
name String A name filter
selectedOnly boolean <optional>
false Selected layers only
Returns:
Bone | null - The bones.

static getBones(compopt, selectedOnlyopt) → {Array.<Bone>}

Gets Bones in the comp or the selection.
Parameters:
Name Type Attributes Default Description
comp CompItem <optional>
The composition where to get the bones. The active comp if not provided
selectedOnly boolean <optional>
false Selected layers only
Returns:
Array.<Bone> - The bones.

static linkPositionToBone(prop, boneLayer, keepOffsetopt) → {PropertyGroup}

Links a spatial property to a layer
Parameters:
Name Type Attributes Default Description
prop Property | PropertyInfo The property to link
boneLayer Layer The parent layer
keepOffset bool <optional>
true True to not move the parent layer to the position of the property
Returns:
PropertyGroup - The effect created to link the bone.

static rigShape(prop, sizeopt, tangentsopt, createBonesopt) → {Array.<Bone>}

Links the shape to bones
Works with After Effects CC2018 (15.0) and newer only
Parameters:
Name Type Attributes Default Description
prop Property | PropertyInfo The property
size float <optional>
The bone size, a percentage. By default, it will adjust automatically depending on comp size and DuAEF.Duik.Bone.sizeHint
tangents bool <optional>
true True to create bones for the tangents if prop is a Shape
createBones bool <optional>
true True to create bones, false to only create a controller effect
Returns:
Array.<Bone> - The bones created.