Namespace

Controller

Duik.Controller

Controller related tools.

View Source Duik_api_fordoc.jsxinc, line 40703

Members

int

# static readonly LayerMode

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

View Source Duik_api_fordoc.jsxinc, line 40772

Duik.Controller.LayerMode

# static layerMode

The type of layers to use for controllers The default (Duik.Controller.LayerMode.SHAPE) can be changed with DuESF.scriptSettings.set("controllers/layerMode" , Duik.Controller.LayerMode);

View Source Duik_api_fordoc.jsxinc, line 40783

Array.<string>

# static Name

Some (localized) controller names

View Source Duik_api_fordoc.jsxinc, line 40789

File

# static readonly PseudoEffect

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

View Source Duik_api_fordoc.jsxinc, line 40760

int

# static readonly Type

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

View Source Duik_api_fordoc.jsxinc, line 40710

Methods

# 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 Duik_api_fordoc.jsxinc, line 41623

# 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 Duik_api_fordoc.jsxinc, line 41934

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 Duik_api_fordoc.jsxinc, line 42173

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 Duik_api_fordoc.jsxinc, line 41059

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 Duik_api_fordoc.jsxinc, line 41691

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 Duik_api_fordoc.jsxinc, line 41007

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 Duik_api_fordoc.jsxinc, line 41046

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 Duik_api_fordoc.jsxinc, line 42195

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 Duik_api_fordoc.jsxinc, line 41533

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 Duik_api_fordoc.jsxinc, line 42162

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 Duik_api_fordoc.jsxinc, line 42017

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 Duik_api_fordoc.jsxinc, line 42079

# 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 Duik_api_fordoc.jsxinc, line 42056

# 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 Duik_api_fordoc.jsxinc, line 42122

# 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 Duik_api_fordoc.jsxinc, line 41952

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 Duik_api_fordoc.jsxinc, line 42132

# 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 Duik_api_fordoc.jsxinc, line 42152

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

Sets the opacity of the controller layers
Parameters:
Name Type Attributes Default Description
opacity 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 Duik_api_fordoc.jsxinc, line 42035

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 Duik_api_fordoc.jsxinc, line 42142

# 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 Duik_api_fordoc.jsxinc, line 41996

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 Duik_api_fordoc.jsxinc, line 41976

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 Duik_api_fordoc.jsxinc, line 42098

# 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 Duik_api_fordoc.jsxinc, line 42066

# 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 Duik_api_fordoc.jsxinc, line 41920