The lazy animator's toolkit.
Members
number
# static readonly NLACompType
The types of the comps in an NLA
Properties:
Name | Type | Description |
---|---|---|
NONE |
number
|
|
ORIGINAL |
number
|
|
RENDER |
number
|
|
CLIP |
number
|
|
EDIT |
number
|
string
# static readonly NLAPrefixes
The prefixes for the NLA comp & folder names.
These may be localized, don't use the actual strings!
These may be localized, don't use the actual strings!
Properties:
Name | Type | Description |
---|---|---|
FOLDER |
string
|
|
ORIGINAL |
string
|
|
RENDER |
string
|
|
CLIP |
string
|
|
EDIT |
string
|
Methods
# static addNLAClip(nlaCompopt) → {int}
Creates a clip and adds it to the NLA
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
nlaComp |
CompItem
|
<optional> |
A comp belonging to an NLA, the active comp if omitted. |
Success code: 1 if the clip could be created, 0 if the original comp is not found, -1 if the NLA is invalid/not found
int
# static bakeComposition(modeopt, frameStepopt)
Bakes the expressions to keyframes, and remove all non-renderable layers
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
mode |
DuAEExpression.BakeAlgorithm
|
<optional> |
DuAEExpression.BakeAlgorithm.SMART | The algorithm to use for baking the expressions. |
frameStep |
float
|
<optional> |
1.0 | By default, checks one value per keyframe. A lower value increases the precision and allows for sub-frame sampling. A higher value is faster but less precise. |
# static bakeExpressions(modeopt, frameStepopt, selectionModeopt)
Bakes the expressions to keyframes
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
mode |
DuAEExpression.BakeAlgorithm
|
<optional> |
DuAEExpression.BakeAlgorithm.SMART | The algorithm to use for baking the expressions. |
frameStep |
float
|
<optional> |
1.0 | By default, checks one value per keyframe. A lower value increases the precision and allows for sub-frame sampling. A higher value is faster but less precise. |
selectionMode |
Duik.SelectionMode
|
<optional> |
DuAE.SelectionMode.SELECTED_PROPERTIES | The expressions to bake |
# static copyExpression(propopt) → {string}
Copies the expression from the property, which can be pasted in multiple properties with
Duik.Automation.pasteExpression
.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
prop |
Property
|
DuAEProperty
|
<optional> |
The property, the selected/active property if omitted. |
The expression.
string
# static effector(compopt)
Creates a spatial effector to control the selected properties.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
comp |
CompItem
|
<optional> |
The composition containing the effector. The active composition by default. |
# static effectorMap(mapLayer, propsopt)
Creates a map (texture) effector to control the selected properties.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
mapLayer |
AVLayer
|
The layer to use as a texture/map. | |
props |
Array.<Property>
|
Array.<DuAEProperty>
|
<optional> |
The properties, the selected properties if omitted (or the selected layers). |
# static getNLAComps(nlaFolder) → {Array.<CompItem>}
Gets the render, original and edit comps for this NLA
Parameters:
Name | Type | Description |
---|---|---|
nlaFolder |
FolderItem
|
The NLA Folder |
The compositions in this order: [Original, Edit, Render]. Note that if one is not found, null is returned.
Array.<CompItem>
# static getNLAFolder(comp) → {FolderItem|null}
Gets the folder containing the NLA Compositions like the given comp.
Parameters:
Name | Type | Description |
---|---|---|
comp |
CompItem
|
The comp |
The folder or null if the comp is not part of an NLA
FolderItem
|
null
# static kleaner(propsopt, effectopt) → {PropertyGroup|null}
Adds the Kleaner effect and expression to the properties.
The Kleaner (Keyframe Cleaner) makes it quick and easy to interpolate, add anticipation, overlap and follow through to any animation.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
props |
Array.<PropertyBase>
|
Array.<DuAEProperty>
|
DuList.<PropertyBase>
|
PropertyBase
|
DuAEProperty
|
<optional> |
The properties, the selected properties if omitted (or the selected layers). |
effect |
PropertyGroup
|
<optional> |
The pseudo effect to use if it already exists. |
The Kleaner effect (or null if there's no property to setup).
PropertyGroup
|
null
# static looper(propsopt, effectopt) → {PropertyGroup}
Adds a loop expression and pseudo effect with more options than the loopOut and loopIn expressions.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
props |
Array.<PropertyBase>
|
DuList.<PropertyBase>
|
PropertyBase
|
<optional> |
The properties to loop. 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 motionTrail(createNewLayeropt, layersopt)
Draws a trail following the selected layers.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
createNewLayer |
Boolean
|
<optional> |
false | Option to create a new layer for each trail. |
layers |
AVLayer
|
Array.<AVLayer>
|
DuList.<AVLayer>
|
<optional> |
DuAEComp.getSelectedLayers() | The layers |
# static moveAway(layersopt)
Adds a control to move the layers away from their parent.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
layers |
AVLayer
|
Array.<AVLayer>
|
DuList.<AVLayer>
|
<optional> |
DuAEComp.getSelectedLayers() | The layers |
# static NLAType() → {Duik.Automation.NLACompType}
Checks if the given comp is part of an NLA
The type of the comp; Duik.Automation.NLACompType.NONE if it's not part of an NLA.
# static paintRig(layersopt)
Rigs paint effects and brush strokes to animate them more easily.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
layers |
AVLayer
|
Array.<AVLayer>
|
DuList.<AVLayer>
|
<optional> |
DuAEComp.getSelectedLayers() | The layers |
# static pasteExpression(propsopt, expressionopt)
Pastes the expression previously copied with
Duik.Automation.copyExpression
.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
props |
Array.<Property>
|
Array.<DuAEProperty>
|
<optional> |
The properties where to paste the expression, the selecte properties if omitted. |
expression |
string
|
<optional> |
A specific expression to paste. |
# static random(separateDimensionsopt, individualControlsopt, propsopt)
Adds a completely random animation to the selected properties.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
separateDimensions |
Bool
|
<optional> |
false | Use one value for each dimension/channel. |
individualControls |
Bool
|
<optional> |
false | Use one control for each of the properties. |
props |
Array.<PropertyBase>
|
Array.<DuAEProperty>
|
DuList.<PropertyBase>
|
PropertyBase
|
DuAEProperty
|
<optional> |
The properties, the selected properties if omitted (or the selected layers). |
# static randomizeKeyTimes(min, max, offsetopt, gaussianopt, propsopt)
Shuffles the key times (moves them in time).
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
min |
int
|
The minimum value, in frames. | ||
max |
int
|
The maximum value, in frames. | ||
offset |
Boolean
|
<optional> |
true | If true, offsets the current values. If false, sets absolute values. |
gaussian |
Boolean
|
<optional> |
true | If true, uses random values with a gaussian distribution instead of true random values. |
props |
Array.<PropertyBase>
|
Array.<DuAEProperty>
|
DuList.<PropertyBase>
|
PropertyBase
|
DuAEProperty
|
<optional> |
The properties, the selected properties if omitted (or the selected layers). |
# static randomizeKeyValues(xMinopt, xMaxopt, yMinopt, yMaxopt, zMinopt, zMaxopt, offsetopt, separateopt, gaussianopt, propsopt)
Assigns random values to the values of the selected keyframes.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
xMin |
float
|
<optional> |
The minimum X Value | |
xMax |
float
|
<optional> |
The maximum X Value | |
yMin |
float
|
<optional> |
The minimum Y Value | |
yMax |
float
|
<optional> |
The maximum Y Value | |
zMin |
float
|
<optional> |
The minimum Z Value | |
zMax |
float
|
<optional> |
The maximum Z Value | |
offset |
Boolean
|
<optional> |
true | If true, offsets the current values. If false, sets absolute values. |
separate |
Boolean
|
<optional> |
true | If true, sets a different value for all axis. If false, use the same value for all axis, ignore Y and Z values. |
gaussian |
Boolean
|
<optional> |
true | If true, uses random values with a gaussian distribution instead of true random values. |
props |
Array.<PropertyBase>
|
Array.<DuAEProperty>
|
DuList.<PropertyBase>
|
PropertyBase
|
DuAEProperty
|
<optional> |
The properties, the selected properties if omitted (or the selected layers). |
# static randomizeLayerIndices(min, max, offsetopt, gaussianopt, layersopt)
Shuffles the layer indices (their position in the layer stack).
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
min |
int
|
The minimum value, in frames. | ||
max |
int
|
The maximum value, in frames. | ||
offset |
Boolean
|
<optional> |
true | If true, offsets the current values. If false, sets absolute values. |
gaussian |
Boolean
|
<optional> |
true | If true, uses random values with a gaussian distribution instead of true random values. |
layers |
AVLayer
|
Array.<AVLayer>
|
DuList.<AVLayer>
|
<optional> |
DuAEComp.getSelectedLayers() | The layers |
# static randomizeLayerInPoints(min, max, offsetopt, gaussianopt, layersopt)
Shuffles the layer in points.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
min |
int
|
The minimum value, in frames. | ||
max |
int
|
The maximum value, in frames. | ||
offset |
Boolean
|
<optional> |
true | If true, offsets the current values. If false, sets absolute values. |
gaussian |
Boolean
|
<optional> |
true | If true, uses random values with a gaussian distribution instead of true random values. |
layers |
AVLayer
|
Array.<AVLayer>
|
DuList.<AVLayer>
|
<optional> |
DuAEComp.getSelectedLayers() | The layers |
# static randomizeLayerOutPoints(min, max, offsetopt, gaussianopt, layersopt)
Shuffles the layer out points.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
min |
int
|
The minimum value, in frames. | ||
max |
int
|
The maximum value, in frames. | ||
offset |
Boolean
|
<optional> |
true | If true, offsets the current values. If false, sets absolute values. |
gaussian |
Boolean
|
<optional> |
true | If true, uses random values with a gaussian distribution instead of true random values. |
layers |
AVLayer
|
Array.<AVLayer>
|
DuList.<AVLayer>
|
<optional> |
DuAEComp.getSelectedLayers() | The layers |
# static randomizeLayerTimes(min, max, offsetopt, gaussianopt, layersopt)
Shuffles the layer start times (moves them in time).
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
min |
int
|
The minimum value, in frames. | ||
max |
int
|
The maximum value, in frames. | ||
offset |
Boolean
|
<optional> |
true | If true, offsets the current values. If false, sets absolute values. |
gaussian |
Boolean
|
<optional> |
true | If true, uses random values with a gaussian distribution instead of true random values. |
layers |
AVLayer
|
Array.<AVLayer>
|
DuList.<AVLayer>
|
<optional> |
DuAEComp.getSelectedLayers() | The layers |
# static randomizeValues(xMinopt, xMaxopt, yMinopt, yMaxopt, zMinopt, zMaxopt, offsetopt, separateopt, gaussianopt, propsopt)
Assigns random values to the properties at the current time.
This method creates keyframes if the properties are animated.
This method creates keyframes if the properties are animated.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
xMin |
float
|
<optional> |
The minimum X Value | |
xMax |
float
|
<optional> |
The maximum X Value | |
yMin |
float
|
<optional> |
The minimum Y Value | |
yMax |
float
|
<optional> |
The maximum Y Value | |
zMin |
float
|
<optional> |
The minimum Z Value | |
zMax |
float
|
<optional> |
The maximum Z Value | |
offset |
Boolean
|
<optional> |
true | If true, offsets the current values. If false, sets absolute values. |
separate |
Boolean
|
<optional> |
true | If true, sets a different value for all axis. If false, use the same value for all axis, ignore Y and Z values. |
gaussian |
Boolean
|
<optional> |
true | If true, uses random values with a gaussian distribution instead of true random values. |
props |
Array.<PropertyBase>
|
Array.<DuAEProperty>
|
DuList.<PropertyBase>
|
PropertyBase
|
DuAEProperty
|
<optional> |
The properties, the selected properties if omitted (or the selected layers). |
# static removeExpressions(keepPostExpressionValueopt, propsopt)
Removes the expressions from the properties.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
keepPostExpressionValue |
Boolean
|
<optional> |
true | Set to false to just remove the expressions and get back the pre expression value. |
props |
Array.<Property>
|
Array.<DuAEProperty>
|
<optional> |
The properties, the selected properties if omitted (or the selected layers). |
# static rigWalk(ctrls)
Animates the given controllers with a wolk/run cycle.
Parameters:
Name | Type | Description |
---|---|---|
ctrls |
Object
|
The controllers to setup. An object containing these layers:ctrls.head The head controllerctrls.neck The neck controllerctrls.torso The torso controllerctrls.spine The spine controllerctrls.hips The hips controllerctrls.body The body controllerctrls.rHand The right hand controllerctrls.lHand The left hand controllerctrls.rFoot The right foot controllerctrls.lFoot The left foot controllerNote that some of these may be undefined/null. |
# static setupNLA(compopt, selectedPropsopt, transformPropsopt, effectPropsopt, layerTypesopt, propsopt)
Sets up a non-linear animation comp.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
comp |
CompItem
|
<optional> |
The composition to set up. The active composition if omitted. | |
selectedProps |
Boolean
|
<optional> |
true | Use only currently selected properties if true, all properties (according to the other options) if false. |
transformProps |
Boolean
|
<optional> |
If true, filters only properties in the transform group of the layers. Ignored if selectedProps is true. | |
effectProps |
Boolean
|
<optional> |
If true, filters only properties in effects. Ignored if selectedProps is true. | |
layerTypes |
Array.<Duik.Layer.Type>
|
<optional> |
[Duik.Layer.Type.CONTROLLER] | The types of layer to setup if there's no selected layer; if empty, will setup all layers. |
props |
Array.<PropertyBase>
|
DuList
|
Array.<DuAEProperty>
|
<optional> |
A list of properties to set up. In case this parameter is provided, all other parameters are ignored. |
# static shifts(propsopt) → {DuAEProperty|null}
Adds the Shifts effect and expression to the properties.
The Shifts tool makes the property shift value at random (or regular, or quasi-regular) intervals
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
props |
Array.<PropertyBase>
|
Array.<DuAEProperty>
|
DuList
|
PropertyBase
|
DuAEProperty
|
<optional> |
The properties, the selected properties if omitted. |
The Swink effect.
DuAEProperty
|
null
# static swink(propsopt, blinkopt) → {Array.<DuAEProperty>}
Adds the Swink effect and expression to the properties.
The Swink (Swing and Blink) makes the property swing between two values, with optional controls on the interpolation.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
props |
Array.<PropertyBase>
|
Array.<DuAEProperty>
|
DuList
|
PropertyBase
|
DuAEProperty
|
<optional> |
The properties, the selected properties if omitted (or the selected layers). | |
blink |
boolean
|
<optional> |
false | Set to true to set the interpolation to hold by default. |
The Swink effects.
Array.<DuAEProperty>
# static timeRemap(layersopt)
Activates the time remapping on the layers, adjusts the keyframes and adds a loop effect.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
layers |
AVLayer
|
Array.<AVLayer>
|
DuList.<AVLayer>
|
<optional> |
DuAEComp.getSelectedLayers() | The layers |
# static toggleExpressions(propsopt)
Disables the expressions from the properties.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
props |
Array.<Property>
|
Array.<DuAEProperty>
|
<optional> |
The properties, the selected properties if omitted (or the selected layers). |
# static walk(controllersopt)
Animates the selected character using a procedural walk or run cycle.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
controllers |
Array.<Layer>
|
DuList.<Layer>
|
<optional> |
The controllers to setup. If omitted, will get the selected controllers, or all the controllers of the current comp. |
# static wheel(layersopt)
Automates the rotation of layers as wheels
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
layers |
AVLayer
|
Array.<AVLayer>
|
DuList.<AVLayer>
|
<optional> |
DuAEComp.getSelectedLayers() | The layers |
# static wiggle(separateDimensionsopt, individualControlsopt, propsopt)
Adds a random but smooth animation to the selected properties.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
separateDimensions |
Bool
|
<optional> |
false | Use one value for each dimension/channel. |
individualControls |
Bool
|
<optional> |
false | Use one control for each of the properties. |
props |
Array.<PropertyBase>
|
Array.<DuAEProperty>
|
DuList.<PropertyBase>
|
PropertyBase
|
DuAEProperty
|
<optional> |
The properties, the selected properties if omitted (or the selected layers). |