Duik Tools
Read the Duik User Guide > Tools for more information about each method.
#include 'Duik16_tools_functions.jsxinc'


static copiedExpression

The expression which has been copied by Duik.tools.copyExpression and which can be pasted by Duik.tools.pasteExpression.

static functions

All the tools methods stored as objects which can be parsed easily, for example to automatically build a ui with a button for each method.
Name Type Description
name string A display name for the method
fn string The source script to eval


static align(positionopt, rotationopt, scaleopt, opacityopt)

Align selected Layers to the last selected one
Name Type Attributes Default Description
position boolean <optional>
true Wether to align the position.
rotation boolean <optional>
true Wether to align the rotation.
scale boolean <optional>
true Wether to align the scale.
opacity boolean <optional>
true Wether to align the opacity.

static copyExpression() → {string}

Copies the expression from the selected property. You can paste it with Duik.tools.pasteExpression.
string - The expression

static editMode()

Toggle Edit Mode on selected layers.

static pasteExpression(expressionopt)

Pastes the expression previously copied with Duik.tools.copyExpression to the selected properties
Name Type Attributes Description
expression string <optional>
The expression to set. If not provided, will automatically use the expression copied by Duik.tools.copyExpression.

static removeExpressions(keepPostExpressionValueopt)

Remove expressions from selected properties.
Name Type Attributes Default Description
keepPostExpressionValue bool <optional>
true Set to false to just remove the expressions and get back the pre expression value