Namespace

Constraint

Duik.Constraint

Members

int

# static IKType

The types of IK for three-layer chains.
Properties:
Name Type Description
ONE_TWO int
TWO_ONE int
FK int
BEZIER_IK int
BEZIER_FK int

View Source DuAEF_Duik_api.jsxinc, line 40172

Methods

# static alignLayers(positionopt, rotationopt, scaleopt, opacityopt)

Align selected Layers to the last selected one
Parameters:
Name Type Attributes Default Description
position Boolean <optional>
true whether to align the position.
rotation Boolean <optional>
true whether to align the rotation.
scale Boolean <optional>
true whether to align the scale.
opacity Boolean <optional>
true whether to align the opacity.

View Source DuAEF_Duik_api.jsxinc, line 40637

# static applyLocatorValues(layersopt, disableopt)

Sets the current values of the locators. This fixes some bugs when unparenting layers parented to the locators.
Parameters:
Name Type Attributes Default Description
layers Layer | LayerCollection | Array.<Layer> | DuList.<Layer> <optional>
DuAEComp.getSelectedLayers() The layer(s). If omitted, will use all selected layers in the comp
disable boolean <optional>
true whether to disable the expressions after having applied the values

View Source DuAEF_Duik_api.jsxinc, line 43602

# static autoParent(orphansOnlyopt, layersopt)

Auto-Parent. Parent selected layers to the last selected one.
Parameters:
Name Type Attributes Default Description
orphansOnly Boolean <optional>
false When true, parent only the orphans to the last selected layers
layers Array.<Layer> | DuList.<Layer> <optional>
The layers

View Source DuAEF_Duik_api.jsxinc, line 43317

# static bezierFK(layers, goalopt, controlleropt, showGuidesopt, rootControlleropt) → {Array.<Layer>}

Creates a bezier fk on the layers
Parameters:
Name Type Attributes Default Description
layers Array.<Layer> | DuList.<Layer> The layers, ordered from root to end
goal Layer | null <optional>
The goal layer, at the end of the IK
controller Layer | null <optional>
The layer to use as controller, can be automatically created.
Must be provided if goal is undefined.
showGuides Boolean <optional>
true Set to false to hide guides on the controllers (and improve performance)
rootController Layer | null <optional>
The layer to use as root controller, can be automatically created.

View Source DuAEF_Duik_api.jsxinc, line 43042

The controllers [curve,end,root,rootpos, rootrot]
Array.<Layer>

# static bezierIK(layers, goalopt, controlleropt, showGuidesopt) → {Array.<Layer>}

Creates a bezier ik on the layers
Parameters:
Name Type Attributes Default Description
layers Array.<Layer> | DuList.<Layer> The layers, ordered from root to end
goal Layer | null <optional>
The goal layer, at the end of the IK
controller Layer | null <optional>
The layer to use as controller, can be automatically created.
Must be provided if goal is undefined.
showGuides Boolean <optional>
true Set to false to hide guides on the controllers (and improve performance)

View Source DuAEF_Duik_api.jsxinc, line 42756

The controllers [curve,end,root]
Array.<Layer>

# static connector(props, masterProp, minopt, maxopt, axisopt, typeopt) → {PropertyGroup}

Connects the properties to a master property.
Parameters:
Name Type Attributes Default Description
props Array.<DuAEProperty> | DuList.<DuAEProperty> The child properties
masterProp Property | DuAEProperty The parent property
min float <optional>
0 The minimum value
max float <optional>
100 The maximum value
axis DuAE.Axis <optional>
DuAE.Axis.X The axis or channel to connect
type DuAE.Type <optional>
DuAE.Type.VALUE The type

View Source DuAEF_Duik_api.jsxinc, line 44130

The controlling effect created
PropertyGroup

# static createList(prop) → {DuAEProperty}

Adds a list on a property
Parameters:
Name Type Description
prop Property | DuAEProperty The Property

View Source DuAEF_Duik_api.jsxinc, line 40209

The list effect
DuAEProperty

# static createLocator(layerOrCompopt) → {ShapeLayer}

Creates a new locator linked to the layer
Parameters:
Name Type Attributes Description
layerOrComp Layer | CompItem <optional>
The layer or the containing comp

View Source DuAEF_Duik_api.jsxinc, line 43498

The locator
ShapeLayer

# static disableLocator(layersopt, disableopt)

Disables the locator. Disable the transform expressions
Parameters:
Name Type Attributes Default Description
layers Layer | LayerCollection | Array.<Layer> | DuList.<Layer> <optional>
DuAEComp.getSelectedLayers() The layer(s). If omitted, will use all selected layers in the comp
disable boolean <optional>
true

View Source DuAEF_Duik_api.jsxinc, line 43636

# static exposeTransform(compopt, layersopt) → {Array.<ShapeLayer>}

Expose Transform
Parameters:
Name Type Attributes Description
comp CompItem <optional>
The composition where to create the expose transform controller. The active composition by default.
layers Array.<Layer> <optional>
The layer with the transformation to expose. The selected layers by default. Can be an empty list too, in this case the Expose Transform controller is not set to measure any layer.

View Source DuAEF_Duik_api.jsxinc, line 40668

The list of the new Expose Transform controllers. One per given layer.
Array.<ShapeLayer>

# static extractLocator(locator, preCompLayer, useEssentialPropertiesopt) → {ShapeLayer}

Extracts one locator from a precomposition
Parameters:
Name Type Attributes Default Description
locator ShapeLayer The locator to extract
preCompLayer AVLayer The precomposition layer
useEssentialProperties Boolean <optional>
true true to extract using master properties instead of expressions (ignored in Ae < 15.1, false by default if 15.1 <= Ae < 17 and true by default in Ae >= 17)

View Source DuAEF_Duik_api.jsxinc, line 43538

The extracted locator
ShapeLayer

# static extractLocators(useEssentialPropertiesopt, precompLayersopt)

Extract Locators
Parameters:
Name Type Attributes Description
useEssentialProperties Boolean <optional>
whether to use essential properties instead of expressions to extract the controllers. True by default if Ae >= 17.0
precompLayers Array.<Layer> | DuList.<Layer> <optional>
The layers

View Source DuAEF_Duik_api.jsxinc, line 43508

# static fk(layersopt, controlleropt) → {Layer}

Creates a FK with auto-overlapping and its controller on the layers.
Parameters:
Name Type Attributes Description
layers Array.<Layer> | DuList.<Layer> <optional>
The layers, already parented or ordered from root (at index 0) to end
controller Layer <optional>
An already existing controller.

View Source DuAEF_Duik_api.jsxinc, line 43117

The controller of the FK.
Layer

# static ik(typeopt, forceBezieropt, layersopt, controlleropt, bezierFKopt) → {Array.<Layer>}

Creates an IK on the layers
Parameters:
Name Type Attributes Default Description
type Duik.IKType <optional>
Duik.Constraint.IKType.ONE_TWO The type of IK to use with three layers.
forceBezier boolean <optional>
false force the use of a bezier IK even with two or three layers
layers Array.<Layer> | LayerCollection | DuList.<Layer> | Layer <optional>
DuAEComp.getSelectedLayers() The layer. If omitted, will use all selected layers in the comp
controller Layer <optional>
An already existing controller.
bezierFK boolean <optional>
false If forceBezier, adds a layer for FK Control

View Source DuAEF_Duik_api.jsxinc, line 41384

The controller(s) of the IK.
Array.<Layer>

# static linkLayersToDropdown(dropdown, layersopt)

Connects a dropdown menu effect to a list of layers, using their opacities.
Note: On After Effects < 17.0.1, the list is not updated to reflect the list of layers.
Parameters:
Name Type Attributes Description
dropdown DuAEProperty | Property The dropdown menu property.
layers Array.<Layer> | DuList.<Layer> <optional>
The layers to control. The selected layers by default.

View Source DuAEF_Duik_api.jsxinc, line 44492

# static locator(layersopt)

Add Locator
Parameters:
Name Type Attributes Description
layers Array.<Layer> | DuList.<Layer> <optional>
The layers

View Source DuAEF_Duik_api.jsxinc, line 43481

# static lock(propsopt)

Lock propery values
Parameters:
Name Type Attributes Description
props Property | DuAEProperty | Array.<Property> | Array.<DuAeProperty> | DuList.<Property> | DuList.<DuAEProperty> <optional>
The properties. If omitted, locks the selected properties

View Source DuAEF_Duik_api.jsxinc, line 40450

# static morphKeys()

Morph Keys

View Source DuAEF_Duik_api.jsxinc, line 41154

# static moveAnchorPoint(location, marginopt, includeMasksopt, layersopt)

Repositions the anchor points of the layers
Parameters:
Name Type Attributes Default Description
location DuMath.Location The new location of the anchor points relative to the layer bounds.
margin float <optional>
0.0 A margin, in pixels.
includeMasks Boolean <optional>
false Use masks to compute the bounds.
layers Array.<Layer> | LayerCollection | DuList.<Layer> | Layer <optional>
DuAEComp.getSelectedLayers() The layer. If omitted, will use all selected layers in the comp

View Source DuAEF_Duik_api.jsxinc, line 40525

# static oneLayerIK(layer, goalopt, controlleropt, showGuidesopt) → {Layer}

Creates a one-layer-ik on the layer
Parameters:
Name Type Attributes Default Description
layer Layer The layer
goal Layer | null <optional>
The goal layer, at the end of the IK
controller Layer | Controller | null <optional>
The layer to use as a controller, can be automatically created.
Must be provided if goal is undefined
showGuides Boolean <optional>
true Set to false to hide guides on the controllers (and improve performance)

View Source DuAEF_Duik_api.jsxinc, line 41448

The controller created
Layer

# static oneTwoLayerIK(layer1, layer2, layer3, goalopt, controlleropt, showGuidesopt) → {Layer}

Creates a 1+2-layer-ik on the layer
Parameters:
Name Type Attributes Default Description
layer1 Layer The root layer
layer2 Layer The middle layer
layer3 Layer The end layer
goal Layer | null <optional>
The goal layer, at the end of the IK
controller Layer | null <optional>
The layer to use as a controller, can be automatically created.
Must be provided if goal is undefined
showGuides Boolean <optional>
true Set to false to hide guides on the controllers (and improve performance)

View Source DuAEF_Duik_api.jsxinc, line 42661

The controller created
Layer

# static orientation(layersopt)

Adds an orientation constraint to the layers
Parameters:
Name Type Attributes Description
layers Array.<Layer> | DuList.<Layer> <optional>
The layers

View Source DuAEF_Duik_api.jsxinc, line 43827

# static parent(layersopt)

Parent Constraint
Parameters:
Name Type Attributes Description
layers Array.<Layer> | DuList.<Layer> <optional>
The layers

View Source DuAEF_Duik_api.jsxinc, line 43335

# static parentAcrossComp(parent, useEssentialPropertiesopt, childrenopt)

Parent the layers across compositions to the chosen layer
Parameters:
Name Type Attributes Default Description
parent Layer The parent layer
useEssentialProperties Boolean <optional>
true true to extract using master properties instead of expressions (ignored in Ae < 15.1, false by default if 15.1 <= Ae < 17 and true by default in Ae >= 17)
children Array.<Layer> | DuList.<Layer> <optional>
The child layers

View Source DuAEF_Duik_api.jsxinc, line 43665

# static path(pathopt, layersopt, moveToPathopt) → {Boolean}

Description
Parameters:
Name Type Attributes Default Description
path PropertyBase | DuAEProperty <optional>
The path, taken from the layer selection if omitted
layers Array.<Layer> | DuList.<Layer> <optional>
The layers
moveToPath boolean <optional>
false Set to true to move the layer to the first point on the path

View Source DuAEF_Duik_api.jsxinc, line 43868

true if a constraint could be created
Boolean

# static pin(tangentsopt, propsopt) → {Array.<ShapeLayer>}

Add pins on the properties
Parameters:
Name Type Attributes Default Description
tangents Boolean <optional>
true Set to false to ignore B├ęzier path tangents
props Array.<PropertyBase> <optional>
The properties to pin

View Source DuAEF_Duik_api.jsxinc, line 43953

The pins
Array.<ShapeLayer>

# static position(layersopt)

Adds a position constraint to the layers
Parameters:
Name Type Attributes Description
layers Array.<Layer> | DuList.<Layer> <optional>
The layers

View Source DuAEF_Duik_api.jsxinc, line 43781

# static quickConnector(propsopt)

Connects the properties together to a % slider
Parameters:
Name Type Attributes Description
props Array.<Property> | Array.<DuAEProperty> <optional>
The properties to connect. The selected properties by default.

View Source DuAEF_Duik_api.jsxinc, line 44425

# static removeCompInExpressions(selectionModeopt)

Replace all comp("name") occurences by thisComp.
Parameters:
Name Type Attributes Default Description
selectionMode Duik.SelectionMode <optional>
DuAE.SelectionMode.ACTIVE_COMPOSITION The items where to modify the expressions.

View Source DuAEF_Duik_api.jsxinc, line 44083

# static removeLayerInExpressions(selectionModeopt)

Replace all layer("name") occurences by thisLayer.
Parameters:
Name Type Attributes Default Description
selectionMode Duik.SelectionMode <optional>
DuAE.SelectionMode.ACTIVE_COMPOSITION The items where to modify the expressions.

View Source DuAEF_Duik_api.jsxinc, line 44111

# static removeThisCompInExpressions(selectionModeopt)

Replace all thisComp occurences by comp("name").
Parameters:
Name Type Attributes Default Description
selectionMode Duik.SelectionMode <optional>
DuAE.SelectionMode.ACTIVE_COMPOSITION The items where to modify the expressions.

View Source DuAEF_Duik_api.jsxinc, line 44069

# static removeThisLayerInExpressions(selectionModeopt)

Replace all thisLayer occurences by layer("name").
Parameters:
Name Type Attributes Default Description
selectionMode Duik.SelectionMode <optional>
DuAE.SelectionMode.ACTIVE_COMPOSITION The items where to modify the expressions.

View Source DuAEF_Duik_api.jsxinc, line 44097

# static resetPRS(layersopt, opacityopt)

Resets the transformation of the selected layers to 0.
Parameters:
Name Type Attributes Default Description
layers Array.<Layer> | LayerCollection | DuList.<Layer> | Layer <optional>
DuAEComp.getSelectedLayers() The layer. If omitted, will use all selected layers in the comp
opacity Boolean <optional>
false When true, also resets the opacity to 100%

View Source DuAEF_Duik_api.jsxinc, line 40582

# static separateDimensions()

Separate Dimensions

View Source DuAEF_Duik_api.jsxinc, line 40275

# static separatePropDimensions(prop) → {Array.<DuAEProperty>}

Separates the dimensions of the properties into an effect.
Works with 2D, 3D, and colors
Parameters:
Name Type Description
prop Property | DuAEProperty The property

View Source DuAEF_Duik_api.jsxinc, line 40294

The seperated properties (or the original one if it could not be separated)
Array.<DuAEProperty>

# static setupAudioController(audioLayeropt) → {DuAEProperty}

Prepares a visual audio controller to connect to properties
Parameters:
Name Type Attributes Description
audioLayer AVLayer <optional>
The layer with the audio to setup. The selected layer by default.

View Source DuAEF_Duik_api.jsxinc, line 44533

The value to use with the connector
DuAEProperty

# static simpleFK(layersopt, controlleropt) → {Layer}

A very simple FK control
Parameters:
Name Type Attributes Description
layers Array.<Layer> | DuList.<Layer> <optional>
The layers, already parented or ordered from root (at index 0) to end
controller Layer <optional>
An already existing controller.

View Source DuAEF_Duik_api.jsxinc, line 44015

The controller of the FK.
Layer

# static twoLayerIK(layer1, layer2, goalopt, controlleropt, showGuidesopt) → {Layer}

Creates a two-layer-ik on the layer
Parameters:
Name Type Attributes Default Description
layer1 Layer The root layer
layer2 Layer The end layer
goal Layer | null <optional>
The goal layer, at the end of the IK
controller Layer | null <optional>
The layer to use as a controller, can be automatically created.
Must be provided if goal is undefined
showGuides Boolean <optional>
true Set to false to hide guides on the controllers (and improve performance)

View Source DuAEF_Duik_api.jsxinc, line 41829

The controller created
Layer

# static twoOneLayerIK(layer1, layer2, layer3, goalopt, controlleropt, showGuidesopt) → {Layer}

Creates a 1+2-layer-ik on the layer
Parameters:
Name Type Attributes Default Description
layer1 Layer The root layer
layer2 Layer The middle layer
layer3 Layer The end layer
goal Layer | null <optional>
The goal layer, at the end of the IK
controller Layer | null <optional>
The layer to use as a controller, can be automatically created.
Must be provided if goal is undefined
showGuides Boolean <optional>
true Set to false to hide guides on the controllers (and improve performance)

View Source DuAEF_Duik_api.jsxinc, line 42681

The controller created
Layer

# static zero(layersopt) → {Array.<ShapeLayer>}

Zero-out selected layers
Parameters:
Name Type Attributes Default Description
layers Array.<Layer> | LayerCollection | DuList.<Layer> | Layer <optional>
DuAEComp.getSelectedLayers() The layer. If omitted, will use all selected layers in the comp

View Source DuAEF_Duik_api.jsxinc, line 40468

The zeroes
Array.<ShapeLayer>