Namespace

Controller

Duik.Controller

Controller related tools.

View Source api3.jsxinc, line 6181

Members

Number

# static readonly LayerMode

The type of layers to use for controllers
Properties:
Name Type Description
NULL Number
SHAPE Number
DRAFT_SHAPE Number
RASTER Number

View Source api3.jsxinc, line 6250

Array.<string>

# static Name

Some (localized) controller names

View Source api3.jsxinc, line 6261

File

# static readonly PseudoEffect

The pre-rigged pseudo effects
Properties:
Name Type Description
EYES File
FINGERS File
HAND File
HEAD File

View Source api3.jsxinc, line 6238

DuBinary

# static RasterIconFile

The PNG files to be used as raster controllers

View Source api3.jsxinc, line 6267

Number

# static readonly Type

The shapes/type/icon of the controllers
Properties:
Name Type Description
ROTATION Number
X_POSITION Number
Y_POSITION Number
POSITION Number
TRANSFORM Number
SLIDER Number
DOUBLE_SLIDER Number
ANGLE Number
CAMERA Number
HEAD Number
HAND Number
FOOT Number
CLAWS Number
HOOF Number
EYE Number
EYES Number
FACE Number
SQUARE Number
HIPS Number
BODY Number
SHOULDERS Number
TAIL Number
PENIS Number
VULVA Number
WALK_CYCLE Number
BLENDER Number
NULL Number
CONNECTOR Number
EXPOSE_TRANSFORM Number
EAR Number
HAIR Number
MOUTH Number
NOSE Number
EYEBROW Number
PONEYTAIL Number
PINCER Number
WING Number
FIN Number
AUDIO Number
VERTEBRAE Number
TORSO Number
AE_NULL Number

View Source api3.jsxinc, line 6188

Methods

# static anchorColor(layeropt) → {DuColor}

Checks the color of the anchor of the controller layer
Parameters:
Name Type Attributes Default Description
layer Layer <optional>
DuAEComp.getActiveLayer The layer. If omitted, will check the first selected bone of the current comp

View Source api3.jsxinc, line 7640

DuColor

# static anchorOpacity(layeropt) → {DuColor}

Checks the opacity of the anchor of the controller layer
Parameters:
Name Type Attributes Default Description
layer Layer <optional>
DuAEComp.getActiveLayer The layer. If omitted, will check the first selected bone of the current comp

View Source api3.jsxinc, line 7723

DuColor

# static anchorSize(layeropt) → {DuColor}

Checks the size of the anchor of the controller layer
Parameters:
Name Type Attributes Default Description
layer Layer <optional>
DuAEComp.getActiveLayer The layer. If omitted, will check the first selected bone of the current comp

View Source api3.jsxinc, line 7682

DuColor

# static bake(layersopt)

Bakes the appearance of the selected controllers to improve performance by removing appearance-only expressions and effects.
Parameters:
Name Type Attributes Description
layers Array.<Layer> | DuList.<Layer> | Layer <optional>
The layers to bake; will use selected layers from the current comp if omitted.

View Source api3.jsxinc, line 7203

# static color(layeropt) → {DuColor}

Checks the color of the controller layer
Parameters:
Name Type Attributes Default Description
layer Layer <optional>
DuAEComp.getActiveLayer The layer. If omitted, will check the first selected bone of the current comp

View Source api3.jsxinc, line 7518

DuColor

# static controlledComp(layeropt) → {int}

Gets the îd of the comp controlled by this extracted controller layer.
Parameters:
Name Type Attributes Default Description
layer Layer <optional>
DuAEComp.getActiveLayer The layer. If omitted, will check the first selected bone of the current comp

View Source api3.jsxinc, line 7879

int

# static create(compopt, typeopt, layeropt, parentopt) → {ShapeLayer|AVLayer|null}

Creates a new controller
Parameters:
Name Type Attributes Default Description
comp CompItem <optional>
The composition
type Duik.Controller.Type <optional>
Duik.Controller.Type.TRANSFORM The type of Controller.
layer Layer | Array.<Layer> | LayerCollection <optional>
The layer(s) where to create the controller.
If several layers are provided, will create the controller at the average center of their world positions.
parent boolean <optional>
false True to automatically parent the layer(s) to the controller

View Source api3.jsxinc, line 6575

The controller or null if it couldn't be created.
ShapeLayer | AVLayer | null

# static extract(preComposition, useEssentialPropertiesopt, bakeopt) → {int}

Extracts the controllers from the precomposition,< br/> and copies them to the composition, linking all precomposed controllers
to the new ones.
WARNING This method uses the native copy and paste commands of After Effects,
DO NOT enclose it in an undoGroup.
Undo groups will be handled by this method itself.
Parameters:
Name Type Attributes Default Description
preComposition AVLayer The precomposition layer
useEssentialProperties boolean <optional>
true Only in Ae v15.1 (CC2018) and up, true to use Master Properties
instead of expressions to link the controllers. Ignored on previous versions of After Effects.
bake boolean <optional>
true Bakes the appearances of the controllers before extracting them.
Note: this fixes some issues when extracting controllers between compositions of different sizes.

View Source api3.jsxinc, line 7273

Error code:
-3: No controllers found in the precomp
-2: The layer is not a precomposition
-1: Some controllers can not be extracted
0: Unknown error
1: OK
int

# static fromLayers(typeopt, parentopt, singleopt) → {Array.<ShapeLayer>}

Creates an controller in the current comp on selected layers.
Parameters:
Name Type Attributes Default Description
type Duik.Controller.Type <optional>
Duik.Controller.Type.TRANSFORM The type of the controller.
parent boolean <optional>
false Whether to parent the selected layers to the controllers or not.
single boolean <optional>
false Whether to create a single controller for all the layers or not.

View Source api3.jsxinc, line 6523

The new controllers.
Array.<ShapeLayer>

# static get(selectedOnlyopt, compopt) → {Array.<ShapeLayer>}

Gets the controllers in the comp
Parameters:
Name Type Attributes Default Description
selectedOnly Boolean <optional>
true Whether to get only the selected layers or all of them
comp CompItem <optional>
DuAEProject.getActiveComp() The comp

View Source api3.jsxinc, line 6562

The controllers
Array.<ShapeLayer>

# static getControllerType(name, fuzzyopt) → {Duik.Controller.Type}

Gets the controller type according to the (localized) given name, using the synonyms dictionnary
Parameters:
Name Type Attributes Default Description
name string The name to look for
fuzzy boolean <optional>
true Performs a fuzzy search

View Source api3.jsxinc, line 7901

The controller type

# static getCreate(layer, typeopt, controllersopt) → {Layer}

Gets an existing controller if there is one at the correct location, or creates a new one.
Parameters:
Name Type Attributes Default Description
layer Layer The layer where to create the controller.
type Duik.Controller.Type <optional>
Duik.Controller.Type.TRANSFORM The type of Controller.
controllers Array.<Layer> | DuList.<Layer> <optional>
A list of existing controllers. If omitted, will get all the controllers of the comp.

View Source api3.jsxinc, line 7108

The controller
Layer

# static id(layeropt) → {int}

Gets the unique ID of the controller layer.
Parameters:
Name Type Attributes Default Description
layer Layer <optional>
DuAEComp.getActiveLayer The layer. If omitted, will check the first selected bone of the current comp

View Source api3.jsxinc, line 7868

int

# static opacity(layeropt) → {DuColor}

Checks the opacity of the controller layer
Parameters:
Name Type Attributes Default Description
layer Layer <optional>
DuAEComp.getActiveLayer The layer. If omitted, will check the first selected bone of the current comp

View Source api3.jsxinc, line 7601

DuColor

# static pseudoEffect(preset)

Applies a pre-rigged pseudo effect to the layer
Parameters:
Name Type Description
preset Duik.Controller.PseudoEffect The preset

View Source api3.jsxinc, line 7785

# static select(compopt)

Selects all the controllers in the comp (and deselects any other layer)
Parameters:
Name Type Attributes Default Description
comp CompItem <optional>
DuAEProject.getActiveComp() The comp

View Source api3.jsxinc, line 7762

# static setAnchorColor(coloropt, layersopt) → {DuColor}

Sets the color of the anchor of the controller layers
Parameters:
Name Type Attributes Default Description
color DuColor | null <optional>
The color. If omitted or null, will assign a random color for each bone.
layers Layer | LayerCollection | Array.<Layer> | DuList.<Layer> <optional>
DuAEComp.getSelectedLayers() The layer(s). If omitted, will use all selected layers in the comp

View Source api3.jsxinc, line 7658

DuColor

# static setAnchorOpacity(opacity, layersopt) → {DuColor}

Sets the opacity of the anchor of the controller layers
Parameters:
Name Type Attributes Default Description
opacity float The opacity
layers Layer | LayerCollection | Array.<Layer> | DuList.<Layer> <optional>
DuAEComp.getSelectedLayers() The layer(s). If omitted, will use all selected layers in the comp

View Source api3.jsxinc, line 7741

DuColor

# static setAnchorSize(size, layersopt) → {DuColor}

Sets the size of the anchor of the controller layers
Parameters:
Name Type Attributes Default Description
size float The size
layers Layer | LayerCollection | Array.<Layer> | DuList.<Layer> <optional>
DuAEComp.getSelectedLayers() The layer(s). If omitted, will use all selected layers in the comp

View Source api3.jsxinc, line 7702

DuColor

# static setCharacterName(characterName, layeropt)

Sets the character name of the controller layer
Parameters:
Name Type Attributes Default Description
characterName string The character name.
layer Layer <optional>
DuAEComp.getSelectedLayers() The layers. If omitted, will use all selected layers in the comp

View Source api3.jsxinc, line 7828

# static setColor(coloropt, layersopt) → {DuColor}

Sets the color of the controller layers
Parameters:
Name Type Attributes Default Description
color DuColor | null <optional>
The color. If omitted or null, will assign a random color for each bone.
layers Layer | LayerCollection | Array.<Layer> | DuList.<Layer> <optional>
DuAEComp.getSelectedLayers() The layer(s). If omitted, will use all selected layers in the comp

View Source api3.jsxinc, line 7536

DuColor

# static setLimbName(limbName, layeropt)

Sets the limb name of the controller layer
Parameters:
Name Type Attributes Default Description
limbName string The limb name.
layer Layer <optional>
DuAEComp.getSelectedLayers() The layers. If omitted, will use all selected layers in the comp

View Source api3.jsxinc, line 7838

# static setLocation(side, layersopt)

Sets the location of the layer
Parameters:
Name Type Attributes Default Description
side OCO.Side The side
layers Array.<Layer> <optional>
DuAEComp.getSelectedLayers() The layers. If omitted, will use all selected layers in the comp

View Source api3.jsxinc, line 7858

# static setOpacity(opacity, layersopt) → {DuColor}

Sets the opacity of the controller layers
Parameters:
Name Type Attributes Default Description
opacity float The opacity
layers Layer | LayerCollection | Array.<Layer> | DuList.<Layer> <optional>
DuAEComp.getSelectedLayers() The layer(s). If omitted, will use all selected layers in the comp

View Source api3.jsxinc, line 7619

DuColor

# static setSide(side, layersopt)

Sets the side of the layer
Parameters:
Name Type Attributes Default Description
side OCO.Side The side
layers Array.<Layer> <optional>
DuAEComp.getSelectedLayers() The layer. If omitted, will use all selected layers in the comp

View Source api3.jsxinc, line 7848

# static setSize(size, layersopt) → {DuColor}

Sets the size of the controller layers
Parameters:
Name Type Attributes Default Description
size float The size
layers Layer | LayerCollection | Array.<Layer> | DuList.<Layer> <optional>
DuAEComp.getSelectedLayers() The layer(s). If omitted, will use all selected layers in the comp

View Source api3.jsxinc, line 7580

DuColor

# static size(layeropt) → {DuColor}

Checks the size of the controller layer
Parameters:
Name Type Attributes Default Description
layer Layer <optional>
DuAEComp.getActiveLayer The layer. If omitted, will check the first selected bone of the current comp

View Source api3.jsxinc, line 7560

DuColor

# static tag(layersopt, typeopt)

Sets the type of the layers to Controller
Parameters:
Name Type Attributes Default Description
layers Array.<Layer> | LayerCollection | DuList.<Layer> | Layer <optional>
The layer. If omitted, will use all selected layers in the active comp
type Duik.Controller.Type <optional>
Duik.Controller.Type.TRANSFORM The type of controllers to set. If omitted, will try to guess it from the layer name.

View Source api3.jsxinc, line 7804

# static toggleVisibility(compopt, notSelectedOnlyopt)

Show/hides all the controllers
Parameters:
Name Type Attributes Default Description
comp CompItem <optional>
DuAEProject.getActiveComp() The comp
notSelectedOnly bool <optional>
false Hides only the controllers which are not selected

View Source api3.jsxinc, line 7772

# static type(layeropt) → {Duik.Controller.Type}

Checks the tyoe of the controller layer
Parameters:
Name Type Attributes Default Description
layer Layer <optional>
DuAEComp.getActiveLayer The layer. If omitted, will check the first selected controller of the current comp

View Source api3.jsxinc, line 7504