Class

DuAEProperty

DuAEProperty(property)

Get some handy informations about a property
This class is able to "fix" effects properties which have been broken by the addition of another effect on the same layer, as long as the class has been instanciated before the effect has been broken.
Some methods in this class (but not all) are recursive: they can be run even if the property is a group containing other properties.
Constructor

# new DuAEProperty(property)

Constructs a new DuAEProperty
Parameters:
Name Type Description
property PropertyBase | DuAEProperty The property. If a DuAEProperty is provided, the constructor returns it (it does not make a copy).
This makes it easy to avoid type checking, as you can always pass any property or DuAEProperty to the constructor to be sure to handle a DuAEProperty, without any impact on performance.

View Source DuAEF_Duik_api.jsxinc, line 18496

Examples
var propInfo = new DuAEProperty(property);
layer("ADBE effect parade").addProperty("ADBE layer control"); //now the property object is broken
property = propInfo.getProperty(); // You can retrieve the property like this, fixed if it's an effect
myFunction (prop) //This function can be passed either a property or a DuAEProperty
{
  propInfo = new DuAEProperty(prop);
  prop = propInfo.getProperty();
}

Members

CompItem

# readonly comp

The containing comp

View Source DuAEF_Duik_api.jsxinc, line 18600

PropertyGroup | null

# readonly effect

The containing effect, if any.

View Source DuAEF_Duik_api.jsxinc, line 18560

Boolean

# readonly isEffect

Is this an effect? same as DuAEProperty.getProperty().isEffect

View Source DuAEF_Duik_api.jsxinc, line 18552

Layer

# readonly layer

The containing layer

View Source DuAEF_Duik_api.jsxinc, line 18569

string

# readonly matchName

The original matchName of the property, same as DuAEProperty.getProperty().matchName

View Source DuAEF_Duik_api.jsxinc, line 18536

string

# readonly name

The original name of the property, same as DuAEProperty.getProperty().name

View Source DuAEF_Duik_api.jsxinc, line 18528

int

# readonly name

The original property index of the property, same as DuAEProperty.getProperty().propertyIndex

View Source DuAEF_Duik_api.jsxinc, line 18544

Methods

# static getAverageSpeed(props, preExpressionopt, fastModeopt) → {float}

Gets the average speed of the animated propreties
Parameters:
Name Type Attributes Default Description
props Array.<Property> | Array.<DuAEProperty> | DuList.<DuAEProperty> | DuList.<Property> The Properties
preExpression bool <optional>
true True to get the velocity from keyframes instead of the result of the exression
fastMode bool <optional>
true True to limit the number of samples used to compute the velocity and make the process faster.

View Source DuAEF_Duik_api.jsxinc, line 21690

The average speed in unit per second
float

# static getMaximumSpeed(props, preExpressionopt) → {float}

Gets the maximum speed of the animated properties
Parameters:
Name Type Attributes Default Description
props Array.<Property> | Array.<DuAEProperty> The Properties
preExpression bool <optional>
true True to get the velocity from keyframes instead of the result of the exression

View Source DuAEF_Duik_api.jsxinc, line 21649

The average speed
float

# static getProps(property, filteropt, strictopt, caseSensitiveopt) → {Array.<DuAEProperty>}

Gets the After Effects properties in the property
Parameters:
Name Type Attributes Default Description
property PropertyBase | DuAEProperty 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 <optional>
false If a string filter is provided, whether to search for the exact name/matchName or if it contains the filter.
caseSensitive boolean <optional>
true If a string filter is provided, and not strict is false, does the search have to be case sensitive?

View Source DuAEF_Duik_api.jsxinc, line 21548

The selected properties, an empty Array if nothing found
Array.<DuAEProperty>

# static isPathProperty(prop) → {Boolean}

Checks if the property contains a B├ęzier "path" property (it's a mask path or a shape layer path).
The function can be used as a filter for DuAELayer.getSelectedProps.
Parameters:
Name Type Description
prop PropertyGroup The property to check

View Source DuAEF_Duik_api.jsxinc, line 21918

true if it's a path property.
Boolean

# static lock(properties)

Locks the properties with an expression so thier values cannot be changed
Parameters:
Name Type Description
properties PropertyBase | DuAEProperty | Array.<PropertyBase> | Array.<DuAEProperty> The property or properties

View Source DuAEF_Duik_api.jsxinc, line 21665

# static newUniqueMarkerName(newName, markerProp, incrementopt) → {string}

Generates a new unique name for a marker for this marker porperty
Parameters:
Name Type Attributes Default Description
newName string The wanted new name
markerProp Property The marker property
increment boolean <optional>
true true to automatically increment the new name if it already ends with a digit

View Source DuAEF_Duik_api.jsxinc, line 21597

The unique name, with a new number at the end if needed.
string

# static pathBounds(pathProperties, includeTangentsopt) → {Array.<float>}

Gets the sourceRect of the properties (their bounds) in layer coordinates
Parameters:
Name Type Attributes Default Description
pathProperties Array.<Property> The After Effects Properties containing the paths
includeTangents Boolean <optional>
false Wether to include tangents in the bounds or not

View Source DuAEF_Duik_api.jsxinc, line 21849

The bounds [top, left, width, height]
Array.<float>

# static pathHorizontalSymetry(pathProperties)

Makes a horizontal symetry transformation on the paths, using the same axis of symetry for all shapes (shapes must be on the same layer).
Parameters:
Name Type Description
pathProperties Array.<Property> | Array.<DuAEProperty> The After Effects Properties containing the paths to symetrize

View Source DuAEF_Duik_api.jsxinc, line 21749

# static pathVerticalSymetry(pathProperties)

Makes a vertical symetry transformation on the paths, using the same axis of symetry for all shapes (shapes must be on the same layer).
Parameters:
Name Type Description
pathProperties Array.<Property> The After Effects Properties containing the paths to symetrize

View Source DuAEF_Duik_api.jsxinc, line 21798

# static rename(prop, name) → {string}

Safely renames a property (without breaking expressions)
Parameters:
Name Type Description
prop PropertyBase The property
name string The new name.

View Source DuAEF_Duik_api.jsxinc, line 21930

The new name.
string

# static setInterpolationType(layers, props, typeIn, typeOutopt, easeInValueopt, easeOutValueopt)

Changes the interpolation type on selected keyframes, or sets a new key at current time if there are no keyframes selected.
Parameters:
Name Type Attributes Default Description
layers Array.<Layer> | LayerCollection The layers containing the properties
props Array.<PropertyBase> | Array.<DuAEProperty> The properties
typeIn KeyframeInterpolationType | string The in interpolation type (see AE API) or the string "roving" or "continuous"
typeOut KeyframeInterpolationType | string <optional>
typeIn The out interpolation type (see AE API)
easeInValue Array.<int> | int <optional>
33 The in interpolation ease value (used if typeIn is KeyframeInterpolationType.BEZIER)
easeOutValue Array.<int> | int <optional>
easeInValue The out interpolation ease value (used if typeOut is KeyframeInterpolationType.BEZIER)

View Source DuAEF_Duik_api.jsxinc, line 21616

# static shapeValueEquals(shape1, shape2) → {bool}

Compares two shape values
Parameters:
Name Type Description
shape1 Shape
shape2 Shape

View Source DuAEF_Duik_api.jsxinc, line 21943

true if they're the same
bool

# static textValueEquals(text1, text2) → {bool}

Compares two text values
Parameters:
Name Type Description
text1 TextDocument
text2 TextDocument

View Source DuAEF_Duik_api.jsxinc, line 21960

true if they're the same
bool

# addKey(typeInopt, typeOutopt, timeopt, easeInValueopt, easeOutValueopt)

Adds a new key
Parameters:
Name Type Attributes Default Description
typeIn KeyframeInterpolationType | string <optional>
KeyframeInterpolationType.LINEAR The in interpolation type (see AE API) or the string "roving" or "continuous"
typeOut KeyframeInterpolationType | string <optional>
typeIn The out interpolation type (see AE API)
time float <optional>
If omitted, the current comp time
easeInValue Array.<int> | int <optional>
33 The in interpolation ease value (used if typeIn is KeyframeInterpolationType.BEZIER)
easeOutValue Array.<int> | int <optional>
easeInValue The out interpolation ease value (used if typeOut is KeyframeInterpolationType.BEZIER)

View Source DuAEF_Duik_api.jsxinc, line 19487

# addToEGP() → {int}

Recursive: this method can run on a property group.

Recursilvely adds all the (supported) properties found to the essential graphics panel
Note: any Property or PropertyGroup (and its subproperties) named "data" will be ignored.

View Source DuAEF_Duik_api.jsxinc, line 20681

The number of properties added
int

# animated() → {boolean}

Checks if the property has an animation (keyframes)

View Source DuAEF_Duik_api.jsxinc, line 20750

True if the property is animated
boolean

# animation(selectedopt, timeRangeopt) → {DuAEPropertyGroupAnimation|DuAEPropertyAnimation}

Recursive: this method can run on a property group.

Recursilvely gets all animations in the property and subproperties 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.
Parameters:
Name Type Attributes Default Description
selected boolean <optional>
false true to get only selected keyframes.
timeRange Array.<float> <optional>
The time range, an array of two time values, in seconds. If not provided, will use the comp time range.

View Source DuAEF_Duik_api.jsxinc, line 19215

The animations. A DuAEPropertyAnimation if prop is a Property, a PopertyGroupAnim if it is a PropertyGroup

# averageSpeed(preExpressionopt, fastModeopt) → {float}

Gets the average speed of the proprety
Parameters:
Name Type Attributes Default Description
preExpression bool <optional>
true True to get the velocity from keyframes instead of the result of the exression
fastMode bool <optional>
true True to limit the number of samples used to compute the velocity and make the process faster.

View Source DuAEF_Duik_api.jsxinc, line 21163

The average speed in unit per second
float

# bakeExpressions(modeopt, frameStepopt)

Recursive: this method can run on a property group.

Bakes the expressions to keyframes
Parameters:
Name Type Attributes Default Description
mode DuAEExpression.BakeAlgorithm <optional>
DuAEExpression.BakeAlgorithm.SMART 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.
frameStep float <optional>
1.0 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.

View Source DuAEF_Duik_api.jsxinc, line 21434

# cleanKeyframes(precisionopt)

Recursive: this method can run on a property group.

Removes all unneeded keyframes from the property.< br/> Also checks the interpolation values to reset the correct display as linear/smooth.
Parameters:
Name Type Attributes Default Description
precision int <optional>
1 The precision for float number comparison, number of decimals. Set to -1 to not use.

View Source DuAEF_Duik_api.jsxinc, line 20324

# dimensions() → {int}

Gets the number of dimensions of a property

View Source DuAEF_Duik_api.jsxinc, line 18991

The number of dimensions, 0 if this is not a dimensionnal value (ie color, text, shape...)
int

# dimensionsSeparated() → {Bool}

Reimplements the Property.dimensionsSeparated attribute for convenience.

View Source DuAEF_Duik_api.jsxinc, line 18680

true if the property is a separation leader and has its dimensions seperated.
Bool

# do(func)

Recursive: this method can run on a property group.

Recursively runs a method on all nested properties
Parameters:
Name Type Description
func function The function to run. It must take a DuAEProperty object as its single argument

View Source DuAEF_Duik_api.jsxinc, line 18623

# editable() → {bool}

Checks if this property value can be edited

View Source DuAEF_Duik_api.jsxinc, line 19019

true if the value of the property can be edited, false otherwise
bool

# exportPathToJsxinc(file, offsetToCenteropt, appendopt, varNameopt) → {Boolean}

Export the (shape) property to the given file.
Parameters:
Name Type Attributes Default Description
file String The path or File where the jsxinc shape will be written
offsetToCenter Boolean <optional>
false If true, offset the path to the center
append Boolean <optional>
false If true, appends the shape at the end of the file instead of overwriting it.
varName string <optional>
"shape" A name for the variable storing the shape

View Source DuAEF_Duik_api.jsxinc, line 21098

Success
Boolean
Example
var props = DuAEComp.getSelectedProps(PropertyValueType.SHAPE);
var prop = props[0].getProperty();
var out = prop.exportPathToJsxinc("D:/shape.test");

# expression() → {string}

Reimplements the Property.expression attribute for convenience.

View Source DuAEF_Duik_api.jsxinc, line 18690

the expression.
string
Gets an expression link to the property
Parameters:
Name Type Attributes Default Description
useThisComp bool <optional>
false Whether to begin the expression by 'thisComp' or 'comp("name")'
fromLayer bool <optional>
true Whether to begin the expression by comp.layer or directly from the first prop of the layer

View Source DuAEF_Duik_api.jsxinc, line 19767

The expression link to the property
str

# findInComp(comp) → {DuAEProperty|null}

Finds the same property in the given comp (same path & name)
Parameters:
Name Type Description
comp CompItem The composition where to find the property

View Source DuAEF_Duik_api.jsxinc, line 21455

The property or null if it wasn't found
DuAEProperty | null

# firstKeyTime(selectedopt) → {float|null}

Recursive: this method can run on a property group.

Recursilvely gets the time of the first keyFrame in this prop or subprops
Parameters:
Name Type Attributes Default Description
selected Boolean <optional>
false true to check selected keyframes only

View Source DuAEF_Duik_api.jsxinc, line 19286

The keyframe time or null if there are no keyframe
float | null

# fixSpatialInterpolation(precisionopt, selectedKeyframesOnlyopt)

Fixes the spatial interpolation of the selected keys.
Sets the interpolation to linear when the property does not move between keyframes
Parameters:
Name Type Attributes Default Description
precision int <optional>
1 The precision for float number comparison, number of decimals. Set to -1 to not use.
selectedKeyframesOnly Bool <optional>
false If true, only set the selected keyframes.

View Source DuAEF_Duik_api.jsxinc, line 20217

# fixValue(property, value) → {any}

Adjust the value so it can be set on the specific property (adjust the number of dimensions or the type of value)
Parameters:
Name Type Description
property Property | DuAEProperty The property
value any The value to set

View Source DuAEF_Duik_api.jsxinc, line 21176

The converted value
any

# getAnimatedProps(filteropt, strictopt, caseSensitiveopt) → {Array.<DuAEProperty>}

Recursive: this method can run on a property group.

Gets the After Effects animated (with keyframes) properties in the propertyGroup
Parameters:
Name Type Attributes Default Description
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 <optional>
false If a string filter is provided, whether to search for the exact name/matchName or if it contains the filter.
caseSensitive boolean <optional>
true If a string filter is provided, and not strict is false, does the search have to be case sensitive?

View Source DuAEF_Duik_api.jsxinc, line 20767

The selected properties, an empty Array if nothing active or selected
Array.<DuAEProperty>

# getProperty() → {PropertyBase}

Gets the original Property
Always works even if this DuAEProperty represents an effect which has been broken
---AE Hack---
To Do:
  • When returning an effect, check if the matchName corresponds too.

View Source DuAEF_Duik_api.jsxinc, line 18975

The property
PropertyBase

# hasSelectedKeys() → {boolean}

Recursive: this method can run on a property group.

Checks if the property has some selected keyframes.
The property can be either a Property or a PropertyGroup.

View Source DuAEF_Duik_api.jsxinc, line 20116

true if the property have at least one selected keyframe
boolean

# isAngle() → {Boolean}

Whether the value is an angle

View Source DuAEF_Duik_api.jsxinc, line 18840

Boolean

# isDropdown() → {Boolean}

Check if this is a dropdown property or effect.
Note: On After Effects < 17.0.1 this always returns false.

View Source DuAEF_Duik_api.jsxinc, line 18859

Boolean

# isGroup() → {Boolean}

Checks if this source property is a group of properties or a property

View Source DuAEF_Duik_api.jsxinc, line 18637

True if it's a group
Boolean

# isMasterProperty() → {Boolean}

Checks if a property is part of the master properties of a precomp

View Source DuAEF_Duik_api.jsxinc, line 19064

true if property is part of the master properties
Boolean

# isPercent() → {Boolean}

Whether the value is a percent

View Source DuAEF_Duik_api.jsxinc, line 18831

Boolean

# isPixels() → {Boolean}

Whether the value is a pixel value

View Source DuAEF_Duik_api.jsxinc, line 18849

Boolean

# isProperty() → {Boolean}

Checks if this source property is a group of properties or a property

View Source DuAEF_Duik_api.jsxinc, line 18654

True if it's a property
Boolean

# isSeparationLeader() → {Bool}

Reimplements the Property.isSeparationLeader attribute for convenience.

View Source DuAEF_Duik_api.jsxinc, line 18671

true if the property is a separation leader.
Bool

# isSpatial() → {Bool}

Reimplements the Property.isSpatial attribute for convenience.

View Source DuAEF_Duik_api.jsxinc, line 18662

true if the property is spatial.
Bool

# keyAtIndex(keyIndex) → {DuAEKeyframe}

Gets the key at a given index on a property
Parameters:
Name Type Description
keyIndex int The index of the key to retrieve. If the index is negative, it is counted from the end i.e. to retrieve the keyframe before the last one, use -2 (-1 is the last)

View Source DuAEF_Duik_api.jsxinc, line 19101

The keyframe, or null if incorrect index
DuAEKeyframe

# keyAtTime(time) → {DuAEKeyframe}

Gets the key at an exactly given time on a property
Parameters:
Name Type Description
time float The time of the key to retrieve.

View Source DuAEF_Duik_api.jsxinc, line 19154

The keyframe, or null if incorrect time
DuAEKeyframe

# keyInSpatialTangent(key) → {Array.<float>}

Reimplements the Property.keyInSpatialTangent method.
Parameters:
Name Type Description
key int | DuAEKeyframe The keyframe or its index.

View Source DuAEF_Duik_api.jsxinc, line 20267

The tangent
Array.<float>

# keyLabel(index) → {*}

Reimplements the Property.keyValue method for convenience.
Parameters:
Name Type Description
index int The index of the keyframe.

View Source DuAEF_Duik_api.jsxinc, line 18770

The value of the key.
*

# keyOutSpatialTangent(key) → {Array.<float>}

Reimplements the Property.keyOutSpatialTangent method.
Parameters:
Name Type Description
key int | DuAEKeyframe The keyframe or its index.

View Source DuAEF_Duik_api.jsxinc, line 20280

The tangent
Array.<float>

# keys(selectedopt, timeRangeopt) → {Array.<DuAEKeyframe>}

Gets the property keyframes in the whole timeline or in the time range
The DuAEKeyframe._time will be adjusted relatively to the start of the time range instead of the startTime of the composition.
Parameters:
Name Type Attributes Default Description
selected boolean <optional>
false true to get only selected keyframes.
timeRange Array.<float> <optional>
The time range, an array of two time values, in seconds. If not provided, will use the comp time range.
Ignored if selected is true;

View Source DuAEF_Duik_api.jsxinc, line 19172

The keyframes, or null of this property is of type PropertyValueType.NO_VALUE or PropertyValueType.CUSTOM_VALUE
Array.<DuAEKeyframe>

# keyTime(index) → {float}

Reimplements the Property.keyTime method for convenience.
Parameters:
Name Type Description
index int The index of the keyframe.

View Source DuAEF_Duik_api.jsxinc, line 18748

The time of the key.
float

# keyValue(index) → {*}

Reimplements the Property.keyValue method for convenience.
Parameters:
Name Type Description
index int The index of the keyframe.

View Source DuAEF_Duik_api.jsxinc, line 18759

The value of the key.
*

# lastKeyTime(selectedopt) → {float|null}

Recursive: this method can run on a property group.

Recursilvely gets the time of the last keyFrame in this prop or subprops
Parameters:
Name Type Attributes Default Description
selected boolean <optional>
false true to check selected keyframes only

View Source DuAEF_Duik_api.jsxinc, line 19326

The keyframe time or null if there are no keyframe
float | null

# linkProperties(parentProp, useThisCompopt, timeLayeropt)

Recursive: this method can run on a property group.

Link all the properties found in this prop to all the same properties of parentProp (this is a recursive method)
Note: any Property or PropertyGroup (and its subproperties) named "Data" will be linked the opposite way (from parentProp to childProp).
Parameters:
Name Type Attributes Default Description
parentProp PropertyBase | DuAEProperty The parent property
useThisComp bool <optional>
Whether to begin the expression by 'thisComp' or 'comp("name")', default: will detect if the properties are in the same comp
timeLayer LayerItem <optional>
null A layer used to offset the time (typically, in case of link between precompositions, the precomposition layer).
When not null, the start time of this layer will be taken into account to get the values and synchronize them.

View Source DuAEF_Duik_api.jsxinc, line 20522

# maxSpeed(preExpressionopt, fastModeopt) → {float}

Gets the maximum speed of the animated property.
The property type must be one of: one D, two D, three D (spatial or not), Color. If the property is not one of these types, returns 0.
Parameters:
Name Type Attributes Default Description
preExpression bool <optional>
true True to get the velocity from keyframes instead of the result of the exression
fastMode bool <optional>
true True to limit the number of samples used to compute the velocity and make the process faster.
The number of samples is automatically adapted from the duration of the composition.
When true and if there are more than one keyframe, the velocity is sampled only between keyframes.

View Source DuAEF_Duik_api.jsxinc, line 20879

The velocity.
float

# maxVelocity(axis, preExpressionopt, fastModeopt) → {float}

Gets the maximum velocity of the animated property ofr a given axis.
The property type must be one of: one D, two D, three D (spatial or not), Color. If the property is not one of these types, returns 0.
Parameters:
Name Type Attributes Default Description
axis int The axis
preExpression bool <optional>
true True to get the velocity from keyframes instead of the result of the exression
fastMode bool <optional>
true True to limit the number of samples used to compute the velocity and make the process faster.
The number of samples is automatically adapted from the duration of the composition.
When true and if there are more than one keyframe, the velocity is sampled only between keyframes.

View Source DuAEF_Duik_api.jsxinc, line 20928

The velocity.
float

# minVelocity(axis, preExpressionopt, fastModeopt) → {float}

Gets the minimum velocity of the animated property ofr a given axis.
The property type must be one of: one D, two D, three D (spatial or not), Color. If the property is not one of these types, returns 0.
Parameters:
Name Type Attributes Default Description
axis int The axis
preExpression bool <optional>
true True to get the velocity from keyframes instead of the result of the exression
fastMode bool <optional>
true True to limit the number of samples used to compute the velocity and make the process faster.
The number of samples is automatically adapted from the duration of the composition.
When true and if there are more than one keyframe, the velocity is sampled only between keyframes.

View Source DuAEF_Duik_api.jsxinc, line 20984

The velocity.
float

# nearestKeyAtTime(timeopt) → {DuAEKeyframe|null}

Gets the nearest key at a given time on a property
Parameters:
Name Type Attributes Description
time float <optional>
The time of the key to retrieve. The current time by default.

View Source DuAEF_Duik_api.jsxinc, line 19143

The keyframe, or null if incorrect time or not found
DuAEKeyframe | null

# nearestKeyIndex(t)

Reimplements the Property.nearestKeyIndex method for convenience.
Parameters:
Name Type Description
t float The time of the keyframe.

View Source DuAEF_Duik_api.jsxinc, line 18793

# numerical() → {bool}

Checks if the property value is a number or an Array of Number.
I.e if its value type is one of: one D, two D, three D (spatial or not), Color.

View Source DuAEF_Duik_api.jsxinc, line 19423

bool

# numKeys(recursiveopt) → {int}

Gets the number of keyframes in the property
Parameters:
Name Type Attributes Default Description
recursive Boolean <optional>
true If true and this is a group, returns the number of keyframes of all contained property

View Source DuAEF_Duik_api.jsxinc, line 18881

int

# numProperties() → {int}

Reimplements the PropertyGroup.numProperties attribute.
Use this to be sure to get the right number of props, in case some have been added or removed after the creation of the DuAEProperty object.

View Source DuAEF_Duik_api.jsxinc, line 18906

The number of sub-properties.
int

# parentProperty() → {DuAEProperty|null}

Getter for the PropertyBase.parentProperty attribute for convenience.

View Source DuAEF_Duik_api.jsxinc, line 18927

The parent property or null if not found.
DuAEProperty | null

# pathProperty() → {DuAEProperty|null}

Checks if the property is a bezier property, or return the child bezier property if this is a shape or a mask

View Source DuAEF_Duik_api.jsxinc, line 21141

the bezier property or null if it is not.
DuAEProperty | null

# pickWhip(parentProp, useThisCompopt)

Adds an expression to the property, linking it to the parent property
Parameters:
Name Type Attributes Description
parentProp DuAEProperty | Property The parent property.
useThisComp bool <optional>
Whether to begin the expression by 'thisComp' or 'comp("name")', default: will detect if the properties are in the same comp

View Source DuAEF_Duik_api.jsxinc, line 20495

# prop(index) → {DuAEProperty|null}

Reimplements the PropertyGroup.property() method for convenience.
Parameters:
Name Type Description
index string | int Either the name, matchName or the index.

View Source DuAEF_Duik_api.jsxinc, line 18917

The sub-property as DuAEProperty object or null if not found.
DuAEProperty | null

# propertyValueType() → {PropertyValueType|null}

Reimplements the Property.propertyValueType attribute.

View Source DuAEF_Duik_api.jsxinc, line 20256

The value type, or null if this is a group
PropertyValueType | null

# quickBakeExpressions(frameStepopt)

Recursive: this method can run on a property group.

Quickly bakes an expression, adding a keyframe/frame
Parameters:
Name Type Attributes Default Description
frameStep float <optional>
1.0 By default, adds one keyframe per frame. Use a lower value to add sub-frame keyframes, a higher value to add less keyframes.

View Source DuAEF_Duik_api.jsxinc, line 21224

# range(axisopt, preExpressionopt, fastModeopt) → {Array.<float>}

Gets the value range of the animated property.
The property type must be one of: one D, two D, three D (spatial or not), Color. If the property is not one of these types, returns an empty Array.
Parameters:
Name Type Attributes Default Description
axis int <optional>
0 The axis (or the color channel) to get the range
preExpression bool <optional>
true True to get the range from keyframes instead of the result of the exression
fastMode bool <optional>
true True to check the range with values only at keyframe times. False to check the range with all values, at each frame of the comp.

View Source DuAEF_Duik_api.jsxinc, line 20819

The minimum and maximum value.
The first item in the Array is not necesarily the lowest value, it is the first in time.
Array.<float>

# removeAnimation(prop, removeExpressionopt)

Recursive: this method can run on a property group.

Removes the animation from the property
Parameters:
Name Type Attributes Default Description
prop Property | DuAEProperty The property
removeExpression boolean <optional>
false Set to true to remove the expression too

View Source DuAEF_Duik_api.jsxinc, line 19715

# removeDataExpressions()

Recursive: this method can run on a property group.

Removes all expressions found in groups or sections named "Data" in the property.

View Source DuAEF_Duik_api.jsxinc, line 20606

# removeExpressions(filter, keepPostExpressionValueopt)

Recursive: this method can run on a property group.

Removes all expressions found in the property.
Parameters:
Name Type Attributes Default Description
filter function A function which takes a string as a parameter (the expression). Returns true if the expression has to be removed.
keepPostExpressionValue Boolean <optional>
true Set to false to just remove the expressions and get back the pre expression value

View Source DuAEF_Duik_api.jsxinc, line 20645

# removeKey(key)

Reimplements the Property.removeKey method for convenience.
Parameters:
Name Type Description
key int | DuAEKeyframe The index or the keyframe.

View Source DuAEF_Duik_api.jsxinc, line 18782

# replaceInExpressions(oldString, newString, caseSensitiveopt)

Recursive: this method can run on a property group.

Replaces text in Expressions
Parameters:
Name Type Attributes Default Description
oldString string The string to replace
newString string The new string
caseSensitive boolean <optional>
true Whether the search has to be case sensitive

View Source DuAEF_Duik_api.jsxinc, line 20473

# riggable() → {bool}

Checks if this property value can be rigged (with an expression)

View Source DuAEF_Duik_api.jsxinc, line 19077

true if the value of the property can be rigged, false otherwise
bool

# scriptifyPath(offsetToCenteropt, varNameopt) → {string}

Scriptifies the given shape property.
Works only with path (bezier) properties.
Parameters:
Name Type Attributes Default Description
offsetToCenter Boolean <optional>
false If true, offset the path to the center
varName string <optional>
shape A name for the variable storing the shape

View Source DuAEF_Duik_api.jsxinc, line 21036

The scriptified shape
string

# selectedKeys() → {Array.<int>}

Reimplements the Property.selectedKeys attribute for convenience.

View Source DuAEF_Duik_api.jsxinc, line 18737

The list of selected keyframe indices.
Array.<int>

# selectKeys(inTimeopt, outTimeopt)

Recursive: this method can run on a property group.

Selects the keyframes in the propoerty.
Selects all nested keyframes if the property is a group.
Parameters:
Name Type Attributes Default Description
inTime float <optional>
0 The time at which to select the keyframes
outTime float <optional>
inTime The end time

View Source DuAEF_Duik_api.jsxinc, line 19735

# setAnim(anim, timeopt, setExpressionopt, replaceopt, offsetopt) → {boolean}

Sets the property animation on the property. This is a lower-level method than DuAEProperty.setAnimation().
Use this method only to force the animation onto the property without checks.
Must be used on a Property (not a group) with a DuAEPropertyAnimation (not a DuAEPropertyGroupAnimation).
To easily set an animation on a property with automatic compatibility checks, you should use setAnimation().
Parameters:
Name Type Attributes Default Description
anim DuAEPropertyAnimation The animation
time float <optional>
comp.time The time where to begin the animation
setExpression boolean <optional>
false Sets the expression too
replace boolean <optional>
false true to remove any existing keyframe on the properties before adding new keyframes
offset boolean <optional>
false true to offset the current value, instead of replacing it

View Source DuAEF_Duik_api.jsxinc, line 19576

true if the anim was actually set.
boolean

# setAnimation(anim, timeopt, ignoreNameopt, setExpressionopt, onlyKeyframesopt, replaceopt, whiteListopt, offsetopt) → {boolean}

Recursive: this method can run on a property group.

Sets all animations on a Property or a PropertyGroup.
Parameters:
Name Type Attributes Default Description
anim DuAEPropertyAnimation | DuAEPropertyGroupAnimation The animation
time float <optional>
comp().time The time where to begin the animation
ignoreName boolean <optional>
false true to set the anim even if name of the property do not match the animation.
setExpression boolean <optional>
false Sets the expression too
onlyKeyframes boolean <optional>
true If false, the value of properties without keyframes will be set too.
replace boolean <optional>
false 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.
Ignored if the list is empty.
offset boolean <optional>
false true to offset the current value, instead of replacing it

View Source DuAEF_Duik_api.jsxinc, line 19655

true if the anim was actually set.
boolean

# setEase(props, easeInValueopt, easeOutValueopt, velocityInValueopt, velocityOutValueopt, velocityAsPercentopt)

Changes the ease influences of the selected keys
Parameters:
Name Type Attributes Default Description
props Array.<PropertyBase> | Array.<PropertyInfo> The properties
easeInValue Array.<int> | int <optional>
The in interpolation ease value. Will be ignored if undefined.
easeOutValue Array.<int> | int <optional>
The out interpolation ease value. Will be ignored if undefined.
velocityInValue Array.<int> | int <optional>
The out interpolation ease value. Will be ignored if undefined.
velocityOutValue Array.<int> | int <optional>
The out interpolation ease value. Will be ignored if undefined.
velocityAsPercent boolean <optional>
false Use a percent instead of a value to set velocities.
In this case, the proper velocity value will be deduced by multiplying the max speed of the property by the percent.

View Source DuAEF_Duik_api.jsxinc, line 19880

# setExpression(expr, keepValueopt)

Sets an expression to a property.
With the ability to keep the initial value.
Parameters:
Name Type Attributes Default Description
expr string The expression
keepValue bool <optional>
true When true, the method will try to keep the same resulting value as before applying the expression.

View Source DuAEF_Duik_api.jsxinc, line 20431

# setInterpolation(typeIn, typeOutopt, easeInValueopt, easeOutValueopt, selectedKeyframesOnlyopt)

Recursive: this method can run on a property group.

Sets interpolations for all keyframes.
Parameters:
Name Type Attributes Default Description
typeIn KeyframeInterpolationType | string The in interpolation type (see AE API) or the string "roving" or "continuous"
typeOut KeyframeInterpolationType | string <optional>
typeIn The out interpolation type (see AE API)
easeInValue Array.<int> | int <optional>
33 The in interpolation ease value (used if typeIn is KeyframeInterpolationType.BEZIER)
easeOutValue Array.<int> | int <optional>
easeInValue The out interpolation ease value (used if typeOut is KeyframeInterpolationType.BEZIER)
selectedKeyframesOnly Bool <optional>
false If true, only set the selected keyframes.

View Source DuAEF_Duik_api.jsxinc, line 20040

# setKey(key, timeOffsetopt)

Sets a DuAEKeyframe on a property
Parameters:
Name Type Attributes Default Description
key DuAEKeyframe The DuAEKeyframe.
timeOffset float <optional>
comp.time The time offset (added to DuAEKeyframe._time) where to add the key frame.

View Source DuAEF_Duik_api.jsxinc, line 19366

# setKeyInterpolation(key, typeIn, typeOutopt, easeInValueopt, easeOutValueopt)

Sets interpolations on a keyframe.
Parameters:
Name Type Attributes Default Description
key int The key index
typeIn KeyframeInterpolationType | string The in interpolation type (see AE API) or the string "roving" or "continuous"
typeOut KeyframeInterpolationType | string <optional>
typeIn The out interpolation type (see AE API)
easeInValue Array.<int> | int <optional>
33 The in interpolation ease value (used if typeIn is KeyframeInterpolationType.BEZIER)
easeOutValue Array.<int> | int <optional>
easeInValue The out interpolation ease value (used if typeOut is KeyframeInterpolationType.BEZIER)

View Source DuAEF_Duik_api.jsxinc, line 19816

# setKeySpeed(key, speed)

Sets the speed of a keyframe.
Parameters:
Name Type Description
key int The key index
speed float The speed

View Source DuAEF_Duik_api.jsxinc, line 20009

# setPropertyParameters(names)

Reimplements the Property.setPropertyParameters() method.

Works around issues caused by the AE API:
- The property object is invalidated (-> fix: use of DuAEProperty.getProperty)
- The effect loses its name (-> fix: name is reset afterwards)
- Names are not sanitized and may throw errors (-> fix: names are sanitized so no errors are thrown)
- Throws an error on AE < 17.0.1 (-> fix: just do nothing in this case)

This method can be called either from the actual Property or its containing effect.
Parameters:
Name Type Description
names Array.<string> The list of names.

View Source DuAEF_Duik_api.jsxinc, line 18943

# setRoving()

Recursive: this method can run on a property group.

Automatically sets all "transition" keyframes to roving, if the property is spatial.

View Source DuAEF_Duik_api.jsxinc, line 21480

# setSpatialInterpolation(typeIn, typeOutopt, selectedKeyframesOnlyopt)

Sets the spatial interpolation of the keyframes on the property
Parameters:
Name Type Attributes Default Description
typeIn KeyframeInterpolationType The in interpolation type (see AE API)
typeOut KeyframeInterpolationType <optional>
typeIn The in interpolation type (see AE API)
selectedKeyframesOnly Bool <optional>
false If true, only set the selected keyframes.

View Source DuAEF_Duik_api.jsxinc, line 20140

# setSpatialInterpolationAtKey(key, typeIn, typeOutopt)

Sets the spatial interpolation of the keyframes
Parameters:
Name Type Attributes Default Description
key int | DuAEKeyframe The keyframe or its index
typeIn KeyframeInterpolationType The in interpolation type (see AE API)
typeOut KeyframeInterpolationType <optional>
typeIn The in interpolation type (see AE API)

View Source DuAEF_Duik_api.jsxinc, line 20163

# setSpatialTangentsAtKey(key, inTangent, outTangent)

Reimplements the Property.setSpatialTangentsAtKey method.
Parameters:
Name Type Description
key int | DuAEKeyframe The keyframe or its index.
inTangent Array.<float> The in tangent.
outTangent Array.<float> The out tangent.

View Source DuAEF_Duik_api.jsxinc, line 20294

# setValue(value, defaultTimeopt) → {boolean}

Sets a value on a property, adjusting the dimensions if needed
Parameters:
Name Type Attributes Default Description
value any The value to set
defaultTime float <optional>
comp().time The time at which to set the value if the property has keyframes

View Source DuAEF_Duik_api.jsxinc, line 19440

True if the value has correctly been set, false otherwise.
boolean

# setValueAtKey(value, key) → {boolean}

Sets a new keyframe value, adjusting the dimensions if needed
Parameters:
Name Type Description
value any The value to set
key int The index the keyframe

View Source DuAEF_Duik_api.jsxinc, line 19541

True if the value has correctly been set, false otherwise.
boolean

# setValueAtTime(value, timeopt) → {boolean}

Sets a new keyframe on a property, adjusting the dimensions if needed, at desired time
Parameters:
Name Type Attributes Description
value any The value to set
time float <optional>
The time of the new keyframe

View Source DuAEF_Duik_api.jsxinc, line 19512

True if the value has correctly been set, false otherwise.
boolean

# smartBakeExpressions(frameStepopt)

Recursive: this method can run on a property group.

Uses a smarter algorithm to bake the expression to keyframes
Parameters:
Name Type Attributes Default Description
frameStep float <optional>
1.0 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.

View Source DuAEF_Duik_api.jsxinc, line 21278

# snapKeys(keysopt)

Snaps keyframes to the closest frames if they're in between.

Recursive: this method can run on a property group.

Parameters:
Name Type Attributes Description
keys Array.<int> <optional>
An optional list of key indices to snap (could be DuAEProperty.selectedKeys() for example). If omitted, will snap all keyframes.

View Source DuAEF_Duik_api.jsxinc, line 21510

# speedAtTime(timeopt, preExpressionopt) → {float}

Gets the speed of a property at a given time, in unit per second (and not per frame as speeds in the After Effects API)
Parameters:
Name Type Attributes Default Description
time float <optional>
comp().time The time.
preExpression boolean <optional>
true true to get the pre-expression speed.

View Source DuAEF_Duik_api.jsxinc, line 20379

The speed
float

# unit() → {string}

Gets the unit of the property

View Source DuAEF_Duik_api.jsxinc, line 18803

The unit
string

# unitsText() → {string}

The units text of the property, same as DuAEProperty.getProperty().unitsText

View Source DuAEF_Duik_api.jsxinc, line 18822

The unit
string

# value(preExpressionopt) → {*}

Reimplements the Property.value attribute for convenience.
Parameters:
Name Type Attributes Default Description
preExpression Bool <optional>
false Set to true to get the pre-expression value.

View Source DuAEF_Duik_api.jsxinc, line 18700

A value appropriate for the type of the property (see Property.propertyValueType), or null if the property doesn't have a value (i.e. it's a group)
*

# valueAtTime(timeopt, preExpressionopt) → {*}

Reimplements the Property.valueAtTime mehtod for convenience.
Parameters:
Name Type Attributes Default Description
time float <optional>
If omitted, the current comp time.
preExpression Bool <optional>
false Set to true to get the pre-expression value.

View Source DuAEF_Duik_api.jsxinc, line 18722

A value appropriate for the type of the property (see Property.propertyValueType), or null if the property doesn't have a value (i.e. it's a group)
*

# velocityAtTime(timeopt, preExpressionopt) → {Array.<float>}

Gets the velocity of a property at a given time, in unit per second (and not per frame as speeds in the After Effects API)
Parameters:
Name Type Attributes Default Description
time float <optional>
comp().time The time.
preExpression boolean <optional>
true true to get the pre-expression velocity.

View Source DuAEF_Duik_api.jsxinc, line 20400

The velocity
Array.<float>

# velocityToPercent(keyIndex) → {Array.<float>}

Computes a percentage from a velocity on a given keyframe.
Parameters:
Name Type Description
keyIndex int The index of the keyframe where to compute the velocity

View Source DuAEF_Duik_api.jsxinc, line 20070

The velocities [in, out] as a percentage.
Array.<float>

# verticesToComp() → {Array.<Array.<float>>}

Gets the vertices array in comp coordinates.
Works only with path (bezier) properties.

View Source DuAEF_Duik_api.jsxinc, line 21119

The vertices in comp coordinates.
Array.<Array.<float>>