Namespace: Automation

Duik. Automation

The lazy animator's toolkit.

Members

static,readonlyDuik.Automation.NLACompTypeint

The types of the comps in an NLA
Properties:
Name Type Default Description
NONE int 0
ORIGINAL int 1
RENDER int 2
CLIP int 3
EDIT int 4

static,readonlyDuik.Automation.NLAPrefixesstring

The prefixes for the NLA comp & folder names.
These may be localized, don't use the actual strings!
Properties:
Name Type Default Description
FOLDER string
ORIGINAL string
RENDER string
CLIP string
EDIT string

Methods

staticDuik.Automation.addNLAClip(nlaComp){int}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 45308
Creates a clip and adds it to the NLA
Name Type Description
nlaComp CompItem optional A comp belonging to an NLA, the active comp if omitted.
Returns:
Type Description
int 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

staticDuik.Automation.bakeComposition(mode, frameStep)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 45487
Bakes the expressions to keyframes, and remove all non-renderable layers
Name Type Default Description
mode DuAEExpression.BakeAlgorithm DuAEExpression.BakeAlgorithm.SMART optional The algorithm to use for baking the expressions.
frameStep float 1.0 optional 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.

staticDuik.Automation.bakeExpressions(mode, frameStep, selectionMode)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 45445
Bakes the expressions to keyframes
Name Type Default Description
mode DuAEExpression.BakeAlgorithm DuAEExpression.BakeAlgorithm.SMART optional The algorithm to use for baking the expressions.
frameStep float 1.0 optional 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 DuAE.SelectionMode.SELECTED_PROPERTIES optional The expressions to bake

staticDuik.Automation.copyExpression(prop){string}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 45374
Copies the expression from the property, which can be pasted in multiple properties with Duik.Automation.pasteExpression.
Name Type Description
prop Property | DuAEProperty optional The property, the selected/active property if omitted.
Returns:
Type Description
string The expression.

staticDuik.Automation.effector(comp)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 45520
Creates a spatial effector to control the selected properties.
Name Type Description
comp CompItem optional The composition containing the effector. The active composition by default.

staticDuik.Automation.effectorMap(mapLayer, props)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 45750
Creates a map (texture) effector to control the selected properties.
Name Type 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).

staticDuik.Automation.getNLAComps(nlaFolder){Array.<CompItem>}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 45099
Gets the render, original and edit comps for this NLA
Name Type Description
nlaFolder FolderItem The NLA Folder
Returns:
Type Description
Array.<CompItem> The compositions in this order: [Original, Edit, Render]. Note that if one is not found, null is returned.

staticDuik.Automation.getNLAFolder(comp){FolderItem|null}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 45088
Gets the folder containing the NLA Compositions like the given comp.
Name Type Description
comp CompItem The comp
Returns:
Type Description
FolderItem | null The folder or null if the comp is not part of an NLA

staticDuik.Automation.kleaner(props, effect){PropertyGroup|null}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 45867
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.
Name Type 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.
Returns:
Type Description
PropertyGroup | null The Kleaner effect (or null if there's no property to setup).

staticDuik.Automation.looper(props, effect){PropertyGroup}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 45350
Adds a loop expression and pseudo effect with more options than the loopOut and loopIn expressions.
Name Type 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.
Returns:
Type Description
PropertyGroup The pseudo-effect

staticDuik.Automation.motionTrail(createNewLayer, layers)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 47577
Draws a trail following the selected layers.
Name Type Default Description
createNewLayer Boolean false optional Option to create a new layer for each trail.
layers AVLayer | Array.<AVLayer> | DuList.<AVLayer> DuAEComp.getSelectedLayers() optional The layers

staticDuik.Automation.moveAway(layers)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 47179
Adds a control to move the layers away from their parent.
Name Type Default Description
layers AVLayer | Array.<AVLayer> | DuList.<AVLayer> DuAEComp.getSelectedLayers() optional The layers

staticDuik.Automation.NLAType(){Duik.Automation.NLACompType}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 45070
Checks if the given comp is part of an NLA
Returns:
Type Description
Duik.Automation.NLACompType The type of the comp; Duik.Automation.NLACompType.NONE if it's not part of an NLA.

staticDuik.Automation.paintRig(layers)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 47892
Rigs paint effects and brush strokes to animate them more easily.
Name Type Default Description
layers AVLayer | Array.<AVLayer> | DuList.<AVLayer> DuAEComp.getSelectedLayers() optional The layers

staticDuik.Automation.pasteExpression(props, expression)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 45396
Pastes the expression previously copied with Duik.Automation.copyExpression.
Name Type 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.

staticDuik.Automation.random(separateDimensions, individualControls, props)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 46973
Adds a completely random animation to the selected properties.
Name Type Default Description
separateDimensions Bool false optional Use one value for each dimension/channel.
individualControls Bool false optional 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).

staticDuik.Automation.randomizeKeyTimes(min, max, offset, gaussian, props)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 47439
Shuffles the key times (moves them in time).
Name Type Default Description
min int The minimum value, in frames.
max int The maximum value, in frames.
offset Boolean true optional If true, offsets the current values. If false, sets absolute values.
gaussian Boolean true optional 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).

staticDuik.Automation.randomizeKeyValues(xMin, xMax, yMin, yMax, zMin, zMax, offset, separate, gaussian, props)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 47509
Assigns random values to the values of the selected keyframes.
Name Type 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 true optional If true, offsets the current values. If false, sets absolute values.
separate Boolean true optional 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 true optional 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).

staticDuik.Automation.randomizeLayerIndices(min, max, offset, gaussian, layers)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 47329
Shuffles the layer indices (their position in the layer stack).
Name Type Default Description
min int The minimum value, in frames.
max int The maximum value, in frames.
offset Boolean true optional If true, offsets the current values. If false, sets absolute values.
gaussian Boolean true optional If true, uses random values with a gaussian distribution instead of true random values.
layers AVLayer | Array.<AVLayer> | DuList.<AVLayer> DuAEComp.getSelectedLayers() optional The layers

staticDuik.Automation.randomizeLayerInPoints(min, max, offset, gaussian, layers)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 47366
Shuffles the layer in points.
Name Type Default Description
min int The minimum value, in frames.
max int The maximum value, in frames.
offset Boolean true optional If true, offsets the current values. If false, sets absolute values.
gaussian Boolean true optional If true, uses random values with a gaussian distribution instead of true random values.
layers AVLayer | Array.<AVLayer> | DuList.<AVLayer> DuAEComp.getSelectedLayers() optional The layers

staticDuik.Automation.randomizeLayerOutPoints(min, max, offset, gaussian, layers)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 47404
Shuffles the layer out points.
Name Type Default Description
min int The minimum value, in frames.
max int The maximum value, in frames.
offset Boolean true optional If true, offsets the current values. If false, sets absolute values.
gaussian Boolean true optional If true, uses random values with a gaussian distribution instead of true random values.
layers AVLayer | Array.<AVLayer> | DuList.<AVLayer> DuAEComp.getSelectedLayers() optional The layers

staticDuik.Automation.randomizeLayerTimes(min, max, offset, gaussian, layers)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 47295
Shuffles the layer start times (moves them in time).
Name Type Default Description
min int The minimum value, in frames.
max int The maximum value, in frames.
offset Boolean true optional If true, offsets the current values. If false, sets absolute values.
gaussian Boolean true optional If true, uses random values with a gaussian distribution instead of true random values.
layers AVLayer | Array.<AVLayer> | DuList.<AVLayer> DuAEComp.getSelectedLayers() optional The layers

staticDuik.Automation.randomizeValues(xMin, xMax, yMin, yMax, zMin, zMax, offset, separate, gaussian, props)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 47228
Assigns random values to the properties at the current time.
This method creates keyframes if the properties are animated.
Name Type 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 true optional If true, offsets the current values. If false, sets absolute values.
separate Boolean true optional 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 true optional 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).

staticDuik.Automation.removeExpressions(keepPostExpressionValue, props)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 45420
Removes the expressions from the properties.
Name Type Default Description
keepPostExpressionValue Boolean true optional 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).

staticDuik.Automation.rigWalk(ctrls)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 48131
Animates the given controllers with a wolk/run cycle.
Name Type Description
ctrls Object The controllers to setup. An object containing these layers:
ctrls.head The head controller
ctrls.neck The neck controller
ctrls.torso The torso controller
ctrls.spine The spine controller
ctrls.hips The hips controller
ctrls.body The body controller
ctrls.rHand The right hand controller
ctrls.lHand The left hand controller
ctrls.rFoot The right foot controller
ctrls.lFoot The left foot controller
Note that some of these may be undefined/null.

staticDuik.Automation.setupNLA(comp, selectedProps, transformProps, effectProps, layerTypes, props)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 45136
Sets up a non-linear animation comp.
Name Type Default Description
comp CompItem optional The composition to set up. The active composition if omitted.
selectedProps Boolean true optional Use only currently selected properties if true, all properties (according to the other options) if false.
transformProps Boolean true optional If true, filters only properties in the transform group of the layers. Ignored if selectedProps is true.
effectProps Boolean false optional If true, filters only properties in effects. Ignored if selectedProps is true.
layerTypes Boolean [Duik.Layer.Type.BONE, Duik.Layer.Type.CONTROLLER] optional The types of layer to setup; if empty, will setup all layers.
props Array.<PropertyBase> | DuList.<PropertyBase> optional A list of properties to set up. In case this parameter is provided, all other parameters are ignored.

staticDuik.Automation.swink(props){Array.<DuAEProperty>}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 46686
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.
Name Type Description
props Array.<PropertyBase> | Array.<DuAEProperty> | DuList.<PropertyBase> | PropertyBase | DuAEProperty optional The properties, the selected properties if omitted (or the selected layers).
Returns:
Type Description
Array.<DuAEProperty> The Swink effects.

staticDuik.Automation.timeRemap(layers)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 47846
Activates the time remapping on the layers, adjusts the keyframes and adds a loop effect.
Name Type Default Description
layers AVLayer | Array.<AVLayer> | DuList.<AVLayer> DuAEComp.getSelectedLayers() optional The layers

staticDuik.Automation.walk(controllers)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 48062
Animates the selected character using a procedural walk or run cycle.
Name Type 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.

staticDuik.Automation.wheel(layers)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 47103
Automates the rotation of layers as wheels
Name Type Default Description
layers AVLayer | Array.<AVLayer> | DuList.<AVLayer> DuAEComp.getSelectedLayers() optional The layers

staticDuik.Automation.wiggle(separateDimensions, individualControls, props)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 46821
Adds a random but smooth animation to the selected properties.
Name Type Default Description
separateDimensions Bool false optional Use one value for each dimension/channel.
individualControls Bool false optional 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).