The animator's toolkit.
Methods
# static addContinuousKey(animatedPropsopt, selectedLayersopt)
Adds a Continuous key to the properties at current time
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
animatedProps |
Bool
|
<optional> |
true | Set to false to add a key to all selected properties, instead of all animated properties. |
selectedLayers |
Bool
|
<optional> |
true | Set to false to add a key to all layers instead of just the selection. |
# static addEaseInKey(animatedPropsopt, selectedLayersopt, easeopt)
Adds an Ease In key to the properties at current time
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
animatedProps |
Bool
|
<optional> |
true | Set to false to add a key to all selected properties, instead of all animated properties. |
selectedLayers |
Bool
|
<optional> |
true | Set to false to add a key to all layers instead of just the selection. |
ease |
int
|
<optional> |
33 | The ease influence. |
# static addEaseOutKey(animatedPropsopt, selectedLayersopt, easeopt)
Adds an Ease Out key to the properties at current time
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
animatedProps |
Bool
|
<optional> |
true | Set to false to add a key to all selected properties, instead of all animated properties. |
selectedLayers |
Bool
|
<optional> |
true | Set to false to add a key to all layers instead of just the selection. |
ease |
int
|
<optional> |
33 | The ease influence. |
# static addEasyEaseKey(animatedPropsopt, selectedLayersopt, easeInopt, easeOutopt)
Adds an Easy Ease key to the properties at current time
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
animatedProps |
Bool
|
<optional> |
true | Set to false to add a key to all selected properties, instead of all animated properties. |
selectedLayers |
Bool
|
<optional> |
true | Set to false to add a key to all layers instead of just the selection. |
easeIn |
int
|
<optional> |
33 | The ease in influence. |
easeOut |
int
|
<optional> |
33 | The ease out influence. |
# static addHoldKey(animatedPropsopt, selectedLayersopt)
Adds a Hold key to the properties at current time
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
animatedProps |
Bool
|
<optional> |
true | Set to false to add a key to all selected properties, instead of all animated properties. |
selectedLayers |
Bool
|
<optional> |
true | Set to false to add a key to all layers instead of just the selection. |
# static addLinearKey(animatedPropsopt, selectedLayersopt)
Adds a linear key to the properties at current time
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
animatedProps |
Bool
|
<optional> |
true | Set to false to add a key to all selected properties, instead of all animated properties. |
selectedLayers |
Bool
|
<optional> |
true | Set to false to add a key to all layers instead of just the selection. |
# static addRovingKey(animatedPropsopt, selectedLayersopt)
Adds a roving key to the properties at current time
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
animatedProps |
Bool
|
<optional> |
true | Set to false to add a key to all selected properties, instead of all animated properties. |
selectedLayers |
Bool
|
<optional> |
true | Set to false to add a key to all layers instead of just the selection. |
# static celOnionSkin(enabledopt, framesopt, exposureopt, inOpacityopt, outOpacityopt)
(De)activates or updates the onion skin of a Duik cel animation comp.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
enabled |
Boolean
|
<optional> |
true | If omitted, will try to get it from the existing cels. |
frames |
int
|
<optional> |
5 | The duration (in frames) of the onion skin. If omitted, will try to get it from the existing cels. |
exposure |
int
|
<optional> |
2 | The animation exposure. If omitted, will try to get it from the existing cels. |
inOpacity |
float
|
<optional> |
50 | The in opacity. If omitted, will try to get it from the existing cels. |
outOpacity |
float
|
<optional> |
50 | The out opacity. If omitted, will try to get it from the existing cels. |
# static cleanKeyframes(propsopt)
Removes all unneeded keyframes
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
props |
Property
|
DuAEProperty
|
Array.<Property>
|
Array.<DuAEProperty>
|
DuList
|
<optional> |
DuAEComp.getSelectedProps() | The properties |
# static copy(compopt) → {Array.<DuAELayerAnimation>}
Copies the currently selected keyframes, which can then be pasted with
Duik.Animation.paste
.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
comp |
CompItem
|
<optional> |
DuAEProject.getActiveComp | The composition |
The list of animations which have been copied.
Array.<DuAELayerAnimation>
# static cut(compopt) → {Array.<DuAELayerAnimation>}
Cuts the currently selected keyframes, which can then be pasted with
Duik.Animation.paste
.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
comp |
CompItem
|
<optional> |
DuAEProject.getActiveComp | The composition |
The list of animations which have been copied.
Array.<DuAELayerAnimation>
# static fixSpatialInterpolation()
Sets the selected keyframes spatial interpolation to linear
# static freezePose(animatedPropsopt, selectedLayersopt, useNextPoseopt)
Freezes the pose; copies the previous keyframe to the current time.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
animatedProps |
Bool
|
<optional> |
true | Set to false to add a key to all selected properties, instead of all animated properties. |
selectedLayers |
Bool
|
<optional> |
true | Set to false to add a key to all layers instead of just the selection. |
useNextPose |
Bool
|
<optional> |
false | If true, will freeze the next pose instead of the previous one (copies the next keyframe to the current time). |
# static interpolator(propsopt, effectopt) → {PropertyGroup}
Control the selected keyframes with advanced but easy-to-use keyframe interpolation driven by an effect.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
props |
Array.<PropertyBase>
|
DuList
|
PropertyBase
|
<optional> |
The properties to interpolate. The selected properties in the active comp if omitted. |
effect |
PropertyGroup
|
<optional> |
The pseudo effect to use if it already exists. |
The pseudo-effect
PropertyGroup
# static newCel(createNewLayeropt)
Creates a new cel for a Duik cel animation
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
createNewLayer |
Boolean
|
<optional> |
false | Set to true to create the cel on a new layer |
# static nextCel(exposureopt)
Goes to the next frame in a Duik cel animation
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
exposure |
int
|
<optional> |
2 | The animation exposure |
# static paste(compopt, replaceopt, offsetopt, reverseopt)
Pastes the animation previously copied by
Duik.Animation.copy
to the selected properties.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
comp |
CompItem
|
<optional> |
The composition. | |
replace |
Boolean
|
<optional> |
false | Whether to completely erase and replace the current animation |
offset |
Boolean
|
<optional> |
false | Whether to offset the animation from the current value |
reverse |
Boolean
|
<optional> |
false | Whether to reverse the animation |
# static previousCel(exposureopt)
Goes to the previous frame in a Duik cel animation
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
exposure |
int
|
<optional> |
2 | The animation exposure |
# static selectKeyframes(compopt, selectedLayersopt, controllersOnlyopt, rangeopt, propertyMatchNamesopt)
Selects the keyframes in the comp
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
comp |
CompItem
|
<optional> |
DuAEProject.getActiveComp | The composition |
selectedLayers |
Boolean
|
<optional> |
false | Set to true to get the keyframes only on the selected layers instead of all the layers. |
controllersOnly |
Boolean
|
<optional> |
true | Set to false to get the keyframes from all types of layers instead of just the controllers. |
range |
Array.<Number>
|
<optional> |
The time range to select the keyframes, [in, out]. If omitted, will use the work area of the composition. | |
propertyMatchNames |
Array.<string>
|
DuList
|
<optional> |
[] | The list of matchnames to select only keyframes of a specific type. If empty, will select all types of keyframes. |
# static sequenceKeys(durationopt, reverseopt, interpolationopt)
Sequences selected keyframes.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
duration |
int
|
<optional> |
24 | The transition duration, in frames |
reverse |
Bool
|
<optional> |
false | Set to true to reverse the order. |
interpolation |
function
|
<optional> |
DuInterpolation.linear | An interpolation function, taking 4 arguments in the form i(value, min, max, targetMin, targetMax) |
# static sequenceLayers(durationopt, moveLayersopt, useInPointsopt, reverseopt, interpolationopt)
Sequences selected layers.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
duration |
int
|
<optional> |
24 | The transition duration, in frames |
moveLayers |
Bool
|
<optional> |
true | If set to false, the layer are not moved, and the in or out points are changed instead (layers are "cut") |
useInPoints |
Bool
|
<optional> |
true | If moveLayers is false, setting this to false changes the out points instead of the in points (cuts the end instead of the start). |
reverse |
Bool
|
<optional> |
false | Set to true to reverse the order. |
interpolation |
function
|
<optional> |
DuInterpolation.linear | An interpolation function, taking 4 arguments in the form i(value, min, max, targetMin, targetMax) |
# static setContinuous()
Sets the selected keyframes to continuous
# static setEase(easeIn, easeOut)
Sets the ease values on the selected keyframes
Parameters:
Name | Type | Description |
---|---|---|
easeIn |
float
|
The in ease |
easeOut |
float
|
The out ease |
# static setEaseIn(easeopt)
Sets the selected keyframes to ease in
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
ease |
int
|
<optional> |
33 | The ease influence. |
# static setEaseOut(easeopt)
Sets the selected keyframes to ease out
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
ease |
int
|
<optional> |
33 | The ease influence. |
# static setEasyEase(easeInopt, easeOutopt)
Sets the selected keyframes to easy ease
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
easeIn |
int
|
<optional> |
33 | The ease in influence. |
easeOut |
int
|
<optional> |
33 | The ease out influence. |
# static setSpatialBezier()
Sets the selected keyframes spatial interpolation to linear
# static setSpatialBezierIn()
Sets the selected keyframes spatial interpolation to linear
# static setSpatialBezierOut()
Sets the selected keyframes spatial interpolation to linear
# static setSpatialInterpolation()
Sets the selected keyframes spatial interpolation
# static setSpatialLinear()
Sets the selected keyframes spatial interpolation to linear
# static setVelocity(vIn, vOut)
Sets the velocity values on the selected keyframes
Parameters:
Name | Type | Description |
---|---|---|
vIn |
float
|
The in velocity |
vOut |
float
|
The out velocity |
# static snapFK(ctrlsopt)
Snaps the FK to the IK values.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
ctrls |
Array.<Layer>
|
DuList.<Layer>
|
<optional> |
The controllers to snap. |
# static snapIK(ctrlsopt)
Snaps the IK to the FK values.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
ctrls |
Array.<Layer>
|
DuList.<Layer>
|
<optional> |
The controllers to snap. |
# static snapKeys()
Snaps selected (or all) keyframes to the closest frames if they're in between.
# static splitKeys(durationopt, alignmentopt)
Splits the selected keyframes into couple of keyframes with the same values
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
duration |
int
|
<optional> |
2 | The number of frames between the two keyframes. |
alignment |
DuAE.TimeAlignment
|
<optional> |
DuAE.TimeAlignment.CENTER | How to align the new keyframes according to the current time. |
# static switchIKFK(ctrlsopt, addKeyframesopt)
Switches between IK and FK.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
ctrls |
Array.<Layer>
|
DuList.<Layer>
|
<optional> |
The controllers to switch. | |
addKeyframes |
bool
|
<optional> |
true | Whether to add keyframes on FK and IK properties to keep the switch at the current frame. |
# static syncKeys(onLastopt)
Syncs the selected keyframes; moves them to the current time.< br />
If multiple keyframes are selected for the same property, they're offset to the current time, keeping the animation.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
onLast |
Boolean
|
<optional> |
false | If true, syncs using the last keyframe instead of the first |
# static tween(tweenRatioopt, animatedPropsopt, selectedLayersopt)
Adds a key to the properties at current time, tweening according to the previous and next keyframe
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
tweenRatio |
float
|
<optional> |
0.5 | The value ratio for tweening: 0.0 is the value of the previous key, 1.0 is the value of the next key. Note that this value can be < 0 and > 1.0 if you wish. |
animatedProps |
Bool
|
<optional> |
true | Set to false to add a key to all selected properties, instead of all animated properties. |
selectedLayers |
Bool
|
<optional> |
true | Set to false to add a key to all layers instead of just the selection. |
# static xSheet(autoComputeopt)
Adjusts the exposure of the animation.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
autoCompute |
Bool
|
<optional> |
false | (Try to) auto-compute the best values.. |