Controller related tools.
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
|
File
# static readonly PseudoEffect
The pre-rigged pseudo effects
Properties:
Name | Type | Description |
---|---|---|
EYES |
File
|
|
FINGERS |
File
|
|
HAND |
File
|
|
HEAD |
File
|
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
|
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 |
# 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 |
# 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 |
# 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. |
# 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 |
# 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 |
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 |
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.
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. |
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
-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. |
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 |
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 |
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. |
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 |
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 |
# static pseudoEffect(preset)
Applies a pre-rigged pseudo effect to the layer
Parameters:
Name | Type | Description |
---|---|---|
preset |
Duik.Controller.PseudoEffect
|
The preset |
# 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 |
# 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 |
# 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 |
# 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 |
# 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 |
# 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 |
# 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 |
# 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 |
# 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 |
# 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 |
# 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 |
# 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 |
# 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. |
# 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 |
# 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 |