Namespace: Controller

Duik. Controller

Controller related tools.

Members

staticDuik.Controller.draftBoolean

When set to true, controllers will be displayed in draft mode

static,readonlyDuik.Controller.PseudoEffectFile

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

static,readonlyDuik.Controller.Typeint

The shapes/type/icon of the controllers
Properties:
Name Type Default Description
ROTATION int 1
X_POSITION int 2
Y_POSITION int 3
POSITION int 4
TRANSFORM int 5
SLIDER int 6
DOUBLE_SLIDER int 7
ANGLE int 8
CAMERA int 9
HEAD int 10
HAND int 11
FOOT int 12
CLAWS int 13
HOOF int 14
EYE int 15
EYES int 16
FACE int 17
SQUARE int 18
HIPS int 19
BODY int 20
SHOULDERS int 21
TAIL int 22
PENIS int 23
VULVA int 24
WALK_CYCLE int 25
BLENDER int 26
NULL int 27
CONNECTOR int 28
EXPOSE_TRANSFORM int 29
EAR int 30
HAIR int 31
MOUTH int 32
NOSE int 33
EYEBROW int 34
PONEYTAIL int 35
PINCER int 36
WING int 37
FIN int 38
AUDIO int 39
VERTEBRAE int 40
TORSO int 41

Methods

staticDuik.Controller.bake(layers)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 37493
Bakes the appearance of the selected controllers to improve performance by removing appearance-only expressions and effects.
Name Type Description
layers Array.<Layer> | DuList.<Layer> | Layer optional The layers to bake; will use selected layers from the current comp if omitted.

staticDuik.Controller.color(layer){DuColor}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 37806
Checks the color of the controller layer
Name Type Default Description
layer Layer DuAEComp.getActiveLayer optional The layer. If omitted, will check the first selected bone of the current comp
Returns:
Type Description
DuColor

staticDuik.Controller.controlledComp(layer){int}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 38048
Gets the îd of the comp controlled by this extracted controller layer.
Name Type Default Description
layer Layer DuAEComp.getActiveLayer optional The layer. If omitted, will check the first selected bone of the current comp
Returns:
Type Description
int

staticDuik.Controller.create(comp, type, layer, parent){ShapeLayer|null}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 35598
Creates a new controller
Name Type Default Description
comp CompItem optional The composition
type Duik.Controller.Type Duik.Controller.Type.TRANSFORM optional 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 false optional True to automatically parent the layer(s) to the controller
Returns:
Type Description
ShapeLayer | null The controller or null if it couldn't be created.

staticDuik.Controller.extract(preComposition, useEssentialProperties, bake){int}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 37565
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.
Name Type Default Description
preComposition AVLayer The precomposition layer
useEssentialProperties boolean true optional 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 true optional Bakes the appearances of the controllers before extracting them.
Note: this fixes some issues when extracting controllers between compositions of different sizes.
Returns:
Type Description
int 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

staticDuik.Controller.fromLayers(type, parent, single){Array.<ShapeLayer>}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 35540
Creates an controller in the current comp on selected layers.
Name Type Default Description
type Duik.Controller.Type Duik.Controller.Type.TRANSFORM optional The type of the controller.
parent boolean false optional Whether to parent the selected layers to the controllers or not.
single boolean false optional Whether to create a single controller for all the layers or not.
Returns:
Type Description
Array.<ShapeLayer> The new controllers.

staticDuik.Controller.get(selectedOnly, comp){Array.<ShapeLayer>}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 35584
Gets the controllers in the comp
Name Type Default Description
selectedOnly Boolean true optional Whether to get only the selected layers or all of them
comp CompItem DuAEProject.getActiveComp() optional The comp
Returns:
Type Description
Array.<ShapeLayer> The controllers

staticDuik.Controller.getCreate(layer, type, controllers){Layer}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 37433
Gets an existing controller if there is one at the correct location, or creates a new one.
Name Type Default Description
layer Layer The layer where to create the controller.
type Duik.Controller.Type Duik.Controller.Type.TRANSFORM optional 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.
Returns:
Type Description
Layer The controller

staticDuik.Controller.id(layer){int}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 38036
Gets the unique ID of the controller layer.
Name Type Default Description
layer Layer DuAEComp.getActiveLayer optional The layer. If omitted, will check the first selected bone of the current comp
Returns:
Type Description
int

staticDuik.Controller.opacity(layer){DuColor}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 37895
Checks the opacity of the controller layer
Name Type Default Description
layer Layer DuAEComp.getActiveLayer optional The layer. If omitted, will check the first selected bone of the current comp
Returns:
Type Description
DuColor

staticDuik.Controller.pseudoEffect(preset)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 37962
Applies a pre-rigged pseudo effect to the layer
Name Type Description
preset Duik.Controller.PseudoEffect The preset

staticDuik.Controller.select(comp)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 37937
Selects all the controllers in the comp (and deselects any other layer)
Name Type Default Description
comp CompItem DuAEProject.getActiveComp() optional The comp

staticDuik.Controller.setCharacterName(characterName, layer)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 37992
Sets the character name of the controller layer
Name Type Default Description
characterName string The character name.
layer Layer DuAEComp.getSelectedLayers() optional The layers. If omitted, will use all selected layers in the comp

staticDuik.Controller.setColor(color, layers){DuColor}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 37825
Sets the color of the controller layers
Name Type 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> DuAEComp.getSelectedLayers() optional The layer(s). If omitted, will use all selected layers in the comp
Returns:
Type Description
DuColor

staticDuik.Controller.setLimbName(limbName, layer)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 38003
Sets the limb name of the controller layer
Name Type Default Description
limbName string The limb name.
layer Layer DuAEComp.getSelectedLayers() optional The layers. If omitted, will use all selected layers in the comp

staticDuik.Controller.setLocation(side, layers)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 38025
Sets the location of the layer
Name Type Default Description
side DuOCO.Side The side
layers Array.<Layer> DuAEComp.getSelectedLayers() optional The layers. If omitted, will use all selected layers in the comp

staticDuik.Controller.setOpacity(opacity, layers){DuColor}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 37914
Sets the opacity of the controller layers
Name Type Default Description
opacity float The size
layers Layer | LayerCollection | Array.<Layer> | DuList.<Layer> DuAEComp.getSelectedLayers() optional The layer(s). If omitted, will use all selected layers in the comp
Returns:
Type Description
DuColor

staticDuik.Controller.setSide(side, layers)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 38014
Sets the side of the layer
Name Type Default Description
side DuOCO.Side The side
layers Array.<Layer> DuAEComp.getSelectedLayers() optional The layer. If omitted, will use all selected layers in the comp

staticDuik.Controller.setSize(size, layers){DuColor}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 37872
Sets the size of the controller layers
Name Type Default Description
size float The size
layers Layer | LayerCollection | Array.<Layer> | DuList.<Layer> DuAEComp.getSelectedLayers() optional The layer(s). If omitted, will use all selected layers in the comp
Returns:
Type Description
DuColor

staticDuik.Controller.size(layer){DuColor}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 37851
Checks the size of the controller layer
Name Type Default Description
layer Layer DuAEComp.getActiveLayer optional The layer. If omitted, will check the first selected bone of the current comp
Returns:
Type Description
DuColor

staticDuik.Controller.tag(layers)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 37982
Sets the type of the layers to Controller
Name Type Description
layers Array.<Layer> | LayerCollection | DuList.<Layer> | Layer optional The layer. If omitted, will use all selected layers in the active comp

staticDuik.Controller.toggleVisibility(comp, notSelectedOnly)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 37948
Show/hides all the controllers
Name Type Default Description
comp CompItem DuAEProject.getActiveComp() optional The comp
notSelectedOnly bool false optional Hides only the controllers which are not selected