DuAEF.Duik.Animation

Animation tools

Methods

static extractControllersFromComp(preComposition, useMasterPropertiesopt) → {int}

Extracts the controllers from the precomposition,< br/> and copies them to the composition, linking all precomposed controllers
to the new ones.
WARNING This method uses the native copy and paste commands of After Effects,
DO NOT enclose it in an undoGroup.
Undo groups will be handled by this method itself.
Parameters:
Name Type Attributes Default Description
preComposition AVLayer The precomposition layer
useMasterProperties boolean <optional>
true Only in Ae v15.1 (CC2018) and up, true to use Master Properties
instead of expressions to link the controllers. Ignored on previous versions of After Effects.
Returns:
int - Error code:
-3: No controllers found in the precomp
-2: The layer is not a precomposition
-1: Some controllers can not be extracted
0: Unknown error
1: OK

static fk2ik(controller)

Snaps the FK rotation values to the IK position
Parameters:
Name Type Description
controller Controller | Layer The IK Controller

static ik2fk(controller)

Snaps the IK position to the FK rotation values
Parameters:
Name Type Description
controller Controller | Layer The IK Controller

static motionTrail(compopt, layeropt, trailLayeropt, coloropt) → {ShapeLayer}

Creates a motion trail for the layer
Parameters:
Name Type Attributes Description
comp CompItem <optional>
The comp where to create the trails, can be omitted if you provide a layer
layer Layer <optional>
The layer source of the motion. If not provided, will just create an empty motion trail control
trailLayer ShapeLayer | null <optional>
An existing shape layer containing the trails
color Array.<float> | null <optional>
A color for the motion trail. If not provided, random
Returns:
ShapeLayer - The layer containing the motion trail created

static smartInterpolation(prop, easeStartopt, easeEndopt)

Automatically adjust the best bezier interpolations on the keyframes
Parameters:
Name Type Attributes Default Description
prop Property | PropertyInfo The property containing the keyframes
easeStart boolean <optional>
true true to ease the first keyframe, false to set it to linear
easeEnd boolean <optional>
true true to ease the last keyframe, false to set it to linear
To Do:
  • ability to change ease influence (only when velocity is 0?)
  • implement a better multidimensionnal algo

static switchIkFk(controller)

Automatically witches between IK and FK
Parameters:
Name Type Description
controller Controller | Layer The IK Controller

static timeRemap(layers, loopTypeopt)

Activate the time remapping on the layers, adding some useful controls or expressions
Parameters:
Name Type Attributes Description
layers Array.<Layer> | LayerCollection The layers
loopType string <optional>
Looping time, 'in' or 'out'

static xSheet(comp, propopt, effectopt) → {PropertyGroup}

Adds animation exposure controls
Parameters:
Name Type Attributes Description
comp CompItem The comp where to create the X-Sheet
prop Property | PropertyInfo <optional>
The property controlled. If not provided, will add an X-Sheet adjustment layer in the comp.
effect PropertyGroup | null <optional>
an X-Sheet effect already created to use as a control for the prop
Returns:
PropertyGroup - The effect used to control