Constraint tools.
Members
-
staticDuik.Constraint.IKTypeint
-
The types of IK for three-layer chains.
Properties:
Name Type Default Description ONE_TWO
int 1 TWO_ONE
int 2 FK
int 3 BEZIER_IK
int 4 BEZIER_FK
int 5
Methods
-
staticDuik.Constraint.alignLayers(position, rotation, scale, opacity)
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 38542 -
Align selected Layers to the last selected one
Name Type Default Description position
Boolean true optional whether to align the position. rotation
Boolean true optional whether to align the rotation. scale
Boolean true optional whether to align the scale. opacity
Boolean true optional whether to align the opacity. -
staticDuik.Constraint.applyLocatorValues(layers, disable)
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 41439 -
Sets the current values of the locators. This fixes some bugs when unparenting layers parented to the locators.
Name Type Default Description layers
Layer | LayerCollection | Array.<Layer> | DuList.<Layer> DuAEComp.getSelectedLayers() optional The layer(s). If omitted, will use all selected layers in the comp disable
boolean true optional whether to disable the expressions after having applied the values -
staticDuik.Constraint.autoParent(orphansOnly, layers)
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 41184 -
Auto-Parent. Parent selected layers to the last selected one.
Name Type Default Description orphansOnly
Boolean false optional When true, parent only the orphans to the last selected layers layers
Array.<Layer> | DuList.<Layer> optional The layers -
staticDuik.Constraint.bezierFK(layers, goal, controller, showGuides, rootController){Array.<Layer>}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 40947 -
Creates a bezier fk on the layers
Name Type 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 true optional 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. Returns:
Type Description Array.<Layer> The controllers [curve,end,root,rootpos, rootrot] -
staticDuik.Constraint.bezierIK(layers, goal, controller, showGuides){Array.<Layer>}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 40661 -
Creates a bezier ik on the layers
Name Type 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 true optional Set to false to hide guides on the controllers (and improve performance) Returns:
Type Description Array.<Layer> The controllers [curve,end,root] -
staticDuik.Constraint.connector(props, masterProp, min, max, axis, type){PropertyGroup}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 41967 -
Connects the properties to a master property.
Name Type Default Description props
Array.<DuAEProperty> | DuList.<DuAEProperty> The child properties masterProp
Property | DuAEProperty The parent property min
float 0 optional The minimum value max
float 100 optional The maximum value axis
DuAE.Axis DuAE.Axis.X optional The axis or channel to connect type
DuAE.Type DuAE.Type.VALUE optional The type Returns:
Type Description PropertyGroup The controlling effect created -
staticDuik.Constraint.createList(prop){DuAEProperty}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 38114 -
Adds a list on a property
Name Type Description prop
Property | DuAEProperty The Property Returns:
Type Description DuAEProperty The list effect -
staticDuik.Constraint.createLocator(layerOrComp){ShapeLayer}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 41335 -
Creates a new locator linked to the layer
Name Type Description layerOrComp
Layer | CompItem optional The layer or the containing comp Returns:
Type Description ShapeLayer The locator -
staticDuik.Constraint.disableLocator(layers, disable)
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 41473 -
Disables the locator. Disable the transform expressions
Name Type Default Description layers
Layer | LayerCollection | Array.<Layer> | DuList.<Layer> DuAEComp.getSelectedLayers() optional The layer(s). If omitted, will use all selected layers in the comp disable
boolean true optional -
staticDuik.Constraint.exposeTransform(comp, layers){Array.<ShapeLayer>}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 38573 -
Expose Transform
Name Type 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. Returns:
Type Description Array.<ShapeLayer> The list of the new Expose Transform controllers. One per given layer. -
staticDuik.Constraint.extractLocator(locator, preCompLayer, useEssentialProperties){ShapeLayer}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 41375 -
Extracts one locator from a precomposition
Name Type Default Description locator
ShapeLayer The locator to extract preCompLayer
AVLayer The precomposition layer useEssentialProperties
Boolean true optional 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) Returns:
Type Description ShapeLayer The extracted locator -
staticDuik.Constraint.extractLocators(useEssentialProperties, precompLayers)
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 41345 -
Extract Locators
Name Type 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 -
staticDuik.Constraint.fk(layers, controller){Layer}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 41022 -
Creates a FK with auto-overlapping and its controller on the layers.
Name Type 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. Returns:
Type Description Layer The controller of the FK. -
staticDuik.Constraint.ik(type, forceBezier, layers, controller, bezierFK){Array.<Layer>}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 39289 -
Creates an IK on the layers
Name Type Default Description type
Duik.IKType Duik.Constraint.IKType.ONE_TWO optional The type of IK to use with three layers. forceBezier
boolean false optional force the use of a bezier IK even with two or three layers layers
Array.<Layer> | LayerCollection | DuList.<Layer> | Layer DuAEComp.getSelectedLayers() optional The layer. If omitted, will use all selected layers in the comp controller
Layer optional An already existing controller. bezierFK
boolean false optional If forceBezier, adds a layer for FK Control Returns:
Type Description Array.<Layer> The controller(s) of the IK. -
staticDuik.Constraint.linkLayersToDropdown(dropdown, layers)
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 42329 -
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.Name Type Description dropdown
DuAEProperty | Property The dropdown menu property. layers
Array.<Layer> | DuList.<Layer> optional The layers to control. The selected layers by default. -
staticDuik.Constraint.list()
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 38094 -
List
-
staticDuik.Constraint.locator(layers)
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 41318 -
Add Locator
Name Type Description layers
Array.<Layer> | DuList.<Layer> optional The layers -
staticDuik.Constraint.lock(props)
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 38355 -
Lock propery values
Name Type Description props
Property | DuAEProperty | Array.<Property> | Array.<DuAeProperty> | DuList.<Property> | DuList.<DuAEProperty> optional The properties. If omitted, locks the selected properties -
staticDuik.Constraint.morphKeys()
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 39059 -
Morph Keys
-
staticDuik.Constraint.moveAnchorPoint(location, margin, includeMasks, layers)
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 38430 -
Repositions the anchor points of the layers
Name Type Default Description location
DuMath.Location The new location of the anchor points relative to the layer bounds. margin
float 0.0 optional A margin, in pixels. includeMasks
Boolean false optional Use masks to compute the bounds. layers
Array.<Layer> | LayerCollection | DuList.<Layer> | Layer DuAEComp.getSelectedLayers() optional The layer. If omitted, will use all selected layers in the comp -
staticDuik.Constraint.oneLayerIK(layer, goal, controller, showGuides){Layer}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 39353 -
Creates a one-layer-ik on the layer
Name Type 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 undefinedshowGuides
Boolean true optional Set to false to hide guides on the controllers (and improve performance) Returns:
Type Description Layer The controller created -
staticDuik.Constraint.oneTwoLayerIK(layer1, layer2, layer3, goal, controller, showGuides){Layer}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 40566 -
Creates a 1+2-layer-ik on the layer
Name Type 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 undefinedshowGuides
Boolean true optional Set to false to hide guides on the controllers (and improve performance) Returns:
Type Description Layer The controller created -
staticDuik.Constraint.orientation(layers)
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 41664 -
Adds an orientation constraint to the layers
Name Type Description layers
Array.<Layer> | DuList.<Layer> optional The layers -
staticDuik.Constraint.parent(layers)
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 41202 -
Parent Constraint
Name Type Description layers
Array.<Layer> | DuList.<Layer> optional The layers -
staticDuik.Constraint.parentAcrossComp(parent, useEssentialProperties, children)
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 41502 -
Parent the layers across compositions to the chosen layer
Name Type Default Description parent
Layer The parent layer useEssentialProperties
Boolean true optional 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 -
staticDuik.Constraint.path(path, layers, moveToPath){Boolean}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 41705 -
Description
Name Type 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 false optional Set to true to move the layer to the first point on the path Returns:
Type Description Boolean true if a constraint could be created -
staticDuik.Constraint.pin(tangents, props){Array.<ShapeLayer>}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 41790 -
Add pins on the properties
Name Type Default Description tangents
Boolean true optional Set to false to ignore Bézier path tangents props
Array.<PropertyBase> optional The properties to pin Returns:
Type Description Array.<ShapeLayer> The pins -
staticDuik.Constraint.position(layers)
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 41618 -
Adds a position constraint to the layers
Name Type Description layers
Array.<Layer> | DuList.<Layer> optional The layers -
staticDuik.Constraint.quickConnector(props)
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 42262 -
Connects the properties together to a % slider
Name Type Description props
Array.<Property> | Array.<DuAEProperty> optional The properties to connect. The selected properties by default. -
staticDuik.Constraint.removeCompInExpressions(selectionMode)
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 41920 -
Replace all
comp("name")
occurences bythisComp
.Name Type Default Description selectionMode
Duik.SelectionMode DuAE.SelectionMode.ACTIVE_COMPOSITION optional The items where to modify the expressions. -
staticDuik.Constraint.removeLayerInExpressions(selectionMode)
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 41948 -
Replace all
layer("name")
occurences bythisLayer
.Name Type Default Description selectionMode
Duik.SelectionMode DuAE.SelectionMode.ACTIVE_COMPOSITION optional The items where to modify the expressions. -
staticDuik.Constraint.removeThisCompInExpressions(selectionMode)
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 41906 -
Replace all
thisComp
occurences bycomp("name")
.Name Type Default Description selectionMode
Duik.SelectionMode DuAE.SelectionMode.ACTIVE_COMPOSITION optional The items where to modify the expressions. -
staticDuik.Constraint.removeThisLayerInExpressions(selectionMode)
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 41934 -
Replace all
thisLayer
occurences bylayer("name")
.Name Type Default Description selectionMode
Duik.SelectionMode DuAE.SelectionMode.ACTIVE_COMPOSITION optional The items where to modify the expressions. -
staticDuik.Constraint.resetPRS(layers, opacity)
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 38487 -
Resets the transformation of the selected layers to 0.
Name Type Default Description layers
Array.<Layer> | LayerCollection | DuList.<Layer> | Layer DuAEComp.getSelectedLayers() optional The layer. If omitted, will use all selected layers in the comp opacity
Boolean false optional When true, also resets the opacity to 100% -
staticDuik.Constraint.separateDimensions()
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 38180 -
Separate Dimensions
-
staticDuik.Constraint.separatePropDimensions(prop){Array.<DuAEProperty>}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 38199 -
Separates the dimensions of the properties into an effect.
Works with 2D, 3D, and colorsName Type Description prop
Property | DuAEProperty The property Returns:
Type Description Array.<DuAEProperty> The seperated properties (or the original one if it could not be separated) -
staticDuik.Constraint.setupAudioController(audioLayer){DuAEProperty}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 42370 -
Prepares a visual audio controller to connect to properties
Name Type Description audioLayer
AVLayer optional The layer with the audio to setup. The selected layer by default. Returns:
Type Description DuAEProperty The value to use with the connector -
staticDuik.Constraint.simpleFK(layers, controller){Layer}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 41852 -
A very simple FK control
Name Type 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. Returns:
Type Description Layer The controller of the FK. -
staticDuik.Constraint.twoLayerIK(layer1, layer2, goal, controller, showGuides){Layer}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 39734 -
Creates a two-layer-ik on the layer
Name Type 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 undefinedshowGuides
Boolean true optional Set to false to hide guides on the controllers (and improve performance) Returns:
Type Description Layer The controller created -
staticDuik.Constraint.twoOneLayerIK(layer1, layer2, layer3, goal, controller, showGuides){Layer}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 40586 -
Creates a 1+2-layer-ik on the layer
Name Type 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 undefinedshowGuides
Boolean true optional Set to false to hide guides on the controllers (and improve performance) Returns:
Type Description Layer The controller created -
staticDuik.Constraint.zero(layers){Array.<ShapeLayer>}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 38373 -
Zero-out selected layers
Name Type Default Description layers
Array.<Layer> | LayerCollection | DuList.<Layer> | Layer DuAEComp.getSelectedLayers() optional The layer. If omitted, will use all selected layers in the comp Returns:
Type Description Array.<ShapeLayer> The zeroes