Namespace: DuAELayer

DuAELayer

After Effects layer methods

Methods

staticDuAELayer.addNull(layer){Layer}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 27168
Adds a new Null object just above a layer, at the same position.
This is a convenience function calling DuAEComp.addNull.
Name Type Description
layer Layer The layer
Returns:
Type Description
Layer the null

staticDuAELayer.addPseudoEffect(layer, preset, matchName, name){PropertyGroup|null}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 26867
This method is a workaround to AE API method layer.applyPreset to work like addProperty when adding pseudoEffects
Name Type Description
layer Layer The layer
preset File The preset file
matchName string The pseudo Effect matchName.
name string optional The name to set on the effect
Returns:
Type Description
PropertyGroup | null The effect or null if anything went wrong

staticDuAELayer.align(layers, target, position, rotation, scale, opacity)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 27392
Aligns the layers' transformations (position, rotation, scale) to another layer
Name Type Default Description
layers Array.<Layer> | LayerCollection The layers to align.
target Layer The reference layer.
position boolean true optional True to align position.
rotation boolean true optional True to align orientation.
scale boolean true optional True to align scale.
opacity boolean false optional True to align opcacity.

staticDuAELayer.alignOpacity(layer, target)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 27375
Aligns a layer's opcaity to another layer
Name Type Description
layer Layer The layer to align.
target Layer The reference layer.

staticDuAELayer.alignOrientation(layer, target)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 27331
Aligns a layer's orientation to another layer
Name Type Description
layer Layer The layer to align.
target Layer The reference layer.

staticDuAELayer.alignPosition(layer, target)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 27308
Aligns a layer in position to another layer
Name Type Description
layer Layer The layer to align.
target Layer The reference layer.

staticDuAELayer.alignScale(layer, target)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 27353
Aligns a layer's scale to another layer
Name Type Description
layer Layer The layer to align.
target Layer The reference layer.

staticDuAELayer.applyPreset(layer, preset, matchName){PropertyGroup|null}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 26834
Adds an animation preset on the layer.
Be careful as layer selection will be kept but not properties selection,
and this can result in an "invalid object" if referencing a property.
Name Type Description
layer Layer The layer
preset File The preset file
matchName string The pseudo Effect matchName
Returns:
Type Description
PropertyGroup | null The effect corresponding to matchName or null if anything went wrong

staticDuAELayer.autoDuration(layer, preExpression)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 27502
Sets the In and Out points of a layer according to its opacity (cuts at 0%)
Name Type Default Description
layer Layer The layer
preExpression boolean false optional Whether to check for the opacity post or pre-expression value

staticDuAELayer.bake(layer, mode, frameStep)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 27987
Bakes the expressions to keyframes and removes all non-renderable layers.
Name Type Default Description
layer Layer The layer to bake.
mode DuAEExpression.BakeAlgorithm DuAEExpression.BakeAlgorithm.SMART optional The algorithm to use for baking the expressions.
frameStep float 1.0 optional By default, checks one value per keyframe. A lower value increases the precision and allows for sub-frame sampling. A higher value is faster but less precise.

staticDuAELayer.copyToComp(layers, destinationComp, withPropertyLinks){Array.<Layer>}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 27188
Copies the layers to another comp
Name Type Default Description
layers Array.<Layer> The layers to copy and paste
destinationComp CompItem The composition to copy to
withPropertyLinks boolean false optional Add expressions on the properties to link them to the orriginal layers
Works only on 12.0 and above, ignored on 11.0 (CS6) and below
Returns:
Type Description
Array.<Layer> The new layers

staticDuAELayer.createLocator(layerOrComp){ShapeLayer}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 27850
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

staticDuAELayer.doLayers(method, undoGroupName)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 26374
Runs a function on all the layers
Name Type Description
method function The function to run on the layers, which takes a layer as its only argument.
undoGroupName string optional The name of the undoGroup created before the execution. If not provided, there will not be any undoGroup created.
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 27553
Gets an expression linking to the layer
Name Type Default Description
layer Layer The layer
useThisComp Boolean false optional Whether to begin the expression by 'thisComp' or 'comp("name")'
Returns:
Type Description
str The expression link to the layer

staticDuAELayer.firstKeyFrameTime(layer, selected){float|null}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 26932
Gets the time of the first keyFrame
Name Type Description
layer Array.<Layer> | LayerCollection The layer
selected boolean true to check selected keyframes only
Returns:
Type Description
float | null The keyframe time or null if there are no keyframe

staticDuAELayer.getActiveProperty(layer){DuAEProperty|null}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 26481
Gets the After Effects active property (the last selected one)
Name Type Description
layer Layer The layer
Returns:
Type Description
DuAEProperty | null The selected property, or null if there isn't any.

staticDuAELayer.getAnim(layer, selected, timeRange){DuAELayerAnimation}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 26496
Gets all animations on the layer in the whole timeline or in the time range
The first DuAEKeyframe._time will be adjusted relatively to the start of the time range (if provided) instead of the startTime of the composition.
Name Type Default Description
layer Layer The layer.
selected Boolean false optional true to get only selected keyframes.
timeRange Array.<float> optional The time range, an array of two time values, in seconds.
Returns:
Type Description
DuAELayerAnimation The animation.

staticDuAELayer.getAnims(layers, selected, timeRange){Array.<DuAELayerAnimation>}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 26527
Gets all animations on the layers in the whole timeline or in the time range
The first DuAEKeyframe._time will be adjusted relatively to the start of the time range (if provided) instead of the startTime of the composition.
Name Type Default Description
layers Array.<Layer> | LayerCollection The layers.
selected Boolean false optional true to get only selected keyframes.
timeRange Array.<float> optional The time range, an array of two time values, in seconds.
Returns:
Type Description
Array.<DuAELayerAnimation> The animations.

staticDuAELayer.getChildren(layer){Array.<Layer>}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 26699
Gets the children of a layer
Name Type Description
layer Layer The layer.
Returns:
Type Description
Array.<Layer> All the children of the layer

staticDuAELayer.getCreateLayerEffect(layer, targetLayer, effectName){DuAEProperty|null}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 27828
Gets or create a layer control effect targetting the given target layer.
Name Type Description
layer Layer The layer to get the effect from
targetLayer Layer The targetted layer, which must be in the same comp than the layer.
effectName string optional The name to use when creating the effect.
Returns:
Type Description
DuAEProperty | null The effect or null if the two layers are not in the same comp.

staticDuAELayer.getDistance(layer1, layer2){float}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 26765
Measures the distance between two layers
Name Type Description
layer1 Layer optional The first layer. If omitted, will use the selected layers in the current comp
layer2 Layer optional The second layer
Returns:
Type Description
float The distance (in pixels). -1 if less than two layers are found

staticDuAELayer.getMaxDistance(layers){float}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 26786
Gets the maximum distance between a bunch of layers
Name Type Description
layers Array.<Layer> | DuList.<Layer> | LayerCollection The layers
Returns:
Type Description
float The distance (in pixels)

staticDuAELayer.getPuppetPins(layer){Array.<DuAEProperty>}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 27265
Gets all the (selected) puppet pins found on the layer.
Will return all puppet pins if there is no puppet selection.
Name Type Description
layer Layer The layer
Returns:
Type Description
Array.<DuAEProperty> The properties

staticDuAELayer.getRelation(layer1, layer2){int|null}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 26735
Checks if a layer is a descendant of another layer
Name Type Description
layer1 Layer The first layer
layer2 Layer The second layer
Returns:
Type Description
int | null the degree of relation. 0 if layer1 is not a relative of layer2,
negative if layer2 is a descendant of layer1, positive if layer2 is an ancestor.
null if the two layers are not in the same composition or if they are the same layer.

staticDuAELayer.getSelectedProps(layer, filter, strict, caseSensitive){Array.<DuAEProperty>}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 26432
Gets the After Effects selected properties in the layer
Name Type Default Description
layer Layer The layer
filter PropertyType | PropertyValueType | string | function optional A filter to get only a certain type, or value type, or property name or matchName.
A function which take one PropertyBase as argument can be used to filter the properties: the Property will be returned if the function returns true.
strict boolean false optional If a string filter is provided, whether to search for the exact name/matchName or if it contains the filter.
caseSensitive boolean true optional If a string filter is provided, and not strict is false, does the search have to be case sensitive?
Returns:
Type Description
Array.<DuAEProperty> The selected properties, an empty Array if nothing active or selected

staticDuAELayer.getTransformMatrix(layer, time){Matrix}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 27423
Gets the transformation matrix of the layer from the compostion.
Use Matrix.applyToPoint(point) to transform any coordinate with the matrix returned by this method.
Name Type Description
layer Array.<Layer> the layer
time float optional the time at which to get the coordinates. Current time by default.
Returns:
Type Description
Matrix The coordinates.

staticDuAELayer.getWorldPos(layer, point, time){Array.<float>}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 26806
Gets the world coordinates of the point of a layer
Name Type Default Description
layer Layer The layer
point Array.<float> layer.transform.anchorPoint.value optional the point
time float optional the time at which to get the coordinates. Current time by default.
Returns:
Type Description
Array.<float> The world coordinates of the layer

staticDuAELayer.hasChild(layer){Boolean}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 26716
Checks if a layer has at least one child.
Name Type Description
layer Layer The layer to test
Returns:
Type Description
Boolean true if the layer has at least one child.

staticDuAELayer.haveSelectedKeys(layers){boolean}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 26916
Checks if the layers have some selected keyframes
Name Type Description
layers Array.<Layer> | LayerCollection The layers
Returns:
Type Description
boolean true if the layers have at least one selected keyframe

staticDuAELayer.height(layer){Number}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 28063
Gets the actual height of a layer (including it's scale)
Name Type Description
layer AVLayer The layer
Returns:
Type Description
Number The height, in pixels.

staticDuAELayer.insideComp(layer, useBounds){Boolean}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 27604
Checks if the layer is inside the bounds of the composition
Name Type Default Description
layer Layer the layer to check
useBounds Boolean false optional (not implemented yet) Checks the layer bounds if true, just the anchor point if false.
Returns:
Type Description
Boolean true if the layer is inside the composition

staticDuAELayer.isComp(layer){Boolean}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 27588
Checks if the given layer is a precomposition.
Name Type Description
layer Layer The layer to test
Returns:
Type Description
Boolean true if it is a composition

staticDuAELayer.isRenderable(){Bool}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 27956
Checks if a layer is renderable. A non-renderable layer can be:
  • A Null layer
  • A Guide layer
  • An empty shape layer
  • An empty text layer
  • A layer with the opacity at 0% for the whole composition
Returns:
Type Description
Bool

staticDuAELayer.isSolid(layer){Boolean}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 27573
Checks if the given layer is a solid.
Name Type Description
layer Layer The layer to test
Returns:
Type Description
Boolean true if it is a solid

staticDuAELayer.isThreeD(layer){bool}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 27540
Checks if a layer is 3D (ie is a threeDLayer or a camera or a light)
Name Type Description
layer Layer The layer
Returns:
Type Description
bool true if the layer is a 3D layer

staticDuAELayer.lastEffect(layer, name, skip){PropertyGroup|null}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 27635
Gets the last corresponding effect (instead of the first with the native layer.effect() method)
Name Type Default Description
layer Layer The layer
name string optional The name or matchname to look for. If omitted, will return the last effect.
skip int 0 optional Number of effects to skip
Returns:
Type Description
PropertyGroup | null The effect or null if not found.

staticDuAELayer.lockScale(layer)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 27176
Locks the scale with an expression so its value cannot be changed
Name Type Description
layer Layer The layer

staticDuAELayer.moveInsideComp(layer, useBounds)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 27619
Moves a layer in the center of the comp if it is outside
Name Type Default Description
layer Layer the layer to check
useBounds Boolean false optional (not implemented yet) Checks the layer bounds if true, just the anchor point if false.

staticDuAELayer.moveLayerToProperty(layer, prop)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 27470
Moves a layer to the coordinates of a spatial property
Name Type Description
layer Layer The layer
prop Property | DuAEProperty The property

staticDuAELayer.newUniqueEffectName(newName, layer, increment){string}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 26389
Generates a new unique name for an effect
Name Type Default Description
newName string The wanted new name
layer Layer The layer
increment boolean true optional true to automatically increment the new name if it already ends with a digit
Returns:
Type Description
string The unique name, with a new number at the end if needed.

staticDuAELayer.newUniqueMarkerName(newName, layer, increment){string}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 26414
Generates a new unique name for a marker for this layer
Name Type Default Description
newName string The wanted new name
layer Layer The layer
increment boolean true optional true to automatically increment the new name if it already ends with a digit
Returns:
Type Description
string The unique name, with a new number at the end if needed.

staticDuAELayer.parent(layers, parent, unparentedOnly, insert)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 27237
Parents all (unparented) layers
Name Type Default Description
layers Layer | LayerCollection | Array.<Layer> | DuList.<Layer> The layers to parent
parent Layer optional The parent. If not defined, will use the last layer of the list
unparentedOnly boolean true optional True to parent only layers which do not have a parent yet
insert boolean false optional When true, the parent will be parented to the previous parent of the given layer (or first layer if the layers param is a list)

staticDuAELayer.parentChain(layers)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 27023
Parents all the layers together beginning by the end of the array
Name Type Description
layers Array.<Layer> | DuList.<Layer> The layers to parent

staticDuAELayer.repositionAnchorPoint(layer, value)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 27654
Changes the coordinates of the anchor point without moving the layer
Name Type Description
layer Layer The layer
value Array.<float> The new coordinates

staticDuAELayer.reverseAnims(anims)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 26653
Reverses the times of the keyframes to reverse the animation
Name Type Description
anims Array.<DuAELayerAnimation> | DuAELayerAnimation The animation

staticDuAELayer.sequence(layers, expr)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 27138
Creates a sequence with the layers, but using opacities. This enables more possibilities to rig them, like with the Duik Connector
Name Type Description
layers Array.<Layer> | LayerCollection optional The layers. The selected layers by default.
expr string optional An expression to add to the opacity of the layers

staticDuAELayer.setAllAnims(layers, anims, time, ignoreName, setExpression, onlyKeyframes, replace, whiteList, offset, reverse)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 26594
Sets the animations on the layers.
If you need to set only on the same layers (same index, same name), use DuAELayer.setAnims.
Name Type Default Description
layers Array.<Layer> | LayerCollection The layers.
If there are more layers than animations, the layers array will be truncated.
anims Array.<DuAELayerAnimation> The layer animations.
If there are more animations than layers, the animations array will be truncated.
time float comp.time optional The time where to begin the animation
ignoreName Boolean false optional true to set the anim even if name of the property do not match the name animation.
This way, only the type of property (i.e. matchName) is checked.
setExpression Boolean false optional Set the expression on the property
onlyKeyframes Boolean true optional If false, the value of properties without keyframes will be set too.
replace Boolean false optional true to remove any existing keyframe on the properties before adding new keyframes
whiteList Array.<string> optional A list of matchNames used as a white list for properties to set anims.
Can be the matchName of a propertyGroup to set all the subproperties.
offset Boolean false optional true to offset the current value, instead of replacing it
reverse Boolean false optional true to reverse the keyframes (in time)
Note: the remaining animations which are returned will already be reversed, do not set this to true again if you plan to set them later.

staticDuAELayer.setAnim(layer, anims, time, ignoreName, setExpression, onlyKeyframes, replace, propertyWhiteList, offset, reverse){Boolean}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 26551
Sets the property animation on the property
Name Type Default Description
layer Layer The layer.
anims DuAELayerAnimation The animation
time float comp.time optional The time where to begin the animation
ignoreName Boolean false optional true to set the anim even if name of the property do not match the name of the animation.
This way, only the type of property (i.e. matchName) is checked.
setExpression Boolean false optional Set the expression on the property
onlyKeyframes Boolean true optional If false, the value of properties without keyframes will be set too.
replace Boolean false optional true to remove any existing keyframe on the properties before adding new keyframes
propertyWhiteList Array.<string> optional A list of matchNames used as a white list for properties to set anims.
Can be the matchName of a propertyGroup to set all the subproperties.
offset Boolean false optional true to offset the current value, instead of replacing it
reverse Boolean false optional true to reverse the keyframes (in time)
Returns:
Type Description
Boolean true if the anim was actually set.

staticDuAELayer.setAnims(layers, anims, time, ignoreName, setExpression, onlyKeyframes, replace, whiteList, offset, reverse){Array.<DuAELayerAnimation>}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 26625
Sets the animations on the corresponding layers.
The animation will be set only on layers with the same name and index.
To set all animations on all layers, not checking their names or indices, use DuAELayer.setAllAnims.
Name Type Default Description
layers Array.<Layer> | LayerCollection The layers.
anims Array.<DuAELayerAnimation> The layer animations
time float comp.time optional The time where to begin the animation
ignoreName Boolean false optional true to set the anim even if name of the property do not match the name animation.
This way, only the type of property (i.e. matchName) is checked.
setExpression Boolean false optional Set the expression on the property
onlyKeyframes Boolean true optional If false, the value of properties without keyframes will be set too.
replace Boolean false optional true to remove any existing keyframe on the properties before adding new keyframes
whiteList Array.<string> optional A list of matchNames used as a white list for properties to set anims.
Can be the matchName of a propertyGroup to set all the subproperties.
offset Boolean false optional true to offset the current value, instead of replacing it
reverse Boolean false optional true to reverse the keyframes (in time)
Note: the remaining animations which are returned will already be reversed, do not set this to true again if you plan to set them later.
Returns:
Type Description
Array.<DuAELayerAnimation> The animations which were not set (no corresponding layers)

staticDuAELayer.setPosition(layer, position, world)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 28114
Sets the new coordinates of the layer.
Name Type Default Description
layer Layer The layer to move
position Array.<float> The new coordinates
world boolean false optional Set to true to use world coordinates.

staticDuAELayer.sortByIndex(layers){Array.<Layer>}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 27009
Sort the layers by their indices. Returns a new Array, the original array or collection is not changed.
Name Type Description
layers Array.<Layer> | LayerCollection | DuList.<Layer> The layers to sort
Returns:
Type Description
Array.<Layer> The sorted array

staticDuAELayer.sortByParent(layers){Array.<Layer>}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 26954
Sort the layers by their parenting (root at first index 0)
Name Type Description
layers Array.<Layer> | Collection | DuList.<Layer> The layers to sort
Returns:
Type Description
Array.<Layer> The sorted array

staticDuAELayer.sourceRect(layer, time, includeExtents, includeMasks){Array.<float>}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 27771
Returns the bounds of the layer in local coordinates, like the sourceRectAtTime() function does in expressions, but can also include masks.
Name Type Default Description
layer Layer The layer
time float optional The time at which to get the bounds, the current time by default
includeExtents Boolean true optional Includes the extents (strokes, accents...)
includeMasks Boolean true optional Includes the masks
Returns:
Type Description
Array.<float> The bounds [top, left, width, height]

staticDuAELayer.stack(layers)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 28081
Stacks the layers in the timeline according to their order in the given array/DuList
Name Type Description
layers LayerCollection | Array.<Layer> | DuList.<Layer> The layers to stack

staticDuAELayer.toggleEditMode(layer)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 27057
(Un)parent the children of the layer.< br/> When children are unparented, an effect is added and the name of the layer is changed to show the "edit mode" is enabled.
When toggled again, the effect is removed, and the name is restored.
Name Type Description
layer Layer The layer to toggle.

staticDuAELayer.translate(layer, offset, world)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 28095
Sets the new coordinates of the layer to translate it by offset.
Name Type Default Description
layer Layer The layer to move
offset Array.<float> The value of the translation. A two or three dimensionnal array.
world boolean false optional Set to true to offset in world coordinates.

staticDuAELayer.unparent(layers)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 27045
Un-parents all the layers
Name Type Description
layers Array.<Layer> The layers

staticDuAELayer.width(layer){Number}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 28044
Gets the actual width of a layer (including it's scale)
Name Type Description
layer AVLayer The layer
Returns:
Type Description
Number The width, in pixels.