Duik.tools

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

Members

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.
Properties:
Name Type Description
name string A display name for the method
fn string The source script to eval

Methods

static align(positionopt, rotationopt, scaleopt, opacityopt)

Align selected Layers to the last selected one
Parameters:
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.
Returns:
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
Parameters:
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()

Remove expressions from selected properties.