Class: DuAEProperty

DuAEProperty

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.

new DuAEProperty(property)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 18277
Constructs a new DuAEProperty
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.
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

readonlycompCompItem

The containing comp

readonlyeffectPropertyGroup null

The containing effect, if any.

readonlyisEffectBoolean

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

readonlylayerLayer

The containing layer

readonlymatchNamestring

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

readonlynamestring

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

readonlynameint

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

Methods

staticDuAEProperty.getAverageSpeed(props, preExpression, fastMode){float}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 21462
Gets the average speed of the animated propreties
Name Type Default Description
props Array.<Property> | Array.<DuAEProperty> | DuList.<DuAEProperty> | DuList.<Property> The Properties
preExpression bool true optional True to get the velocity from keyframes instead of the result of the exression
fastMode bool true optional True to limit the number of samples used to compute the velocity and make the process faster.
Returns:
Type Description
float The average speed in unit per second

staticDuAEProperty.getMaximumSpeed(props, preExpression){float}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 21421
Gets the maximum speed of the animated properties
Name Type Default Description
props Array.<Property> | Array.<DuAEProperty> The Properties
preExpression bool true optional True to get the velocity from keyframes instead of the result of the exression
Returns:
Type Description
float The average speed

staticDuAEProperty.getProps(property, filter, strict, caseSensitive){Array.<DuAEProperty>}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 21320
Gets the After Effects properties in the property
Name Type 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 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 found

staticDuAEProperty.isPathProperty(prop){Boolean}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 21690
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.
Name Type Description
prop PropertyGroup The property to check
Returns:
Type Description
Boolean true if it's a path property.

staticDuAEProperty.lock(properties)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 21437
Locks the properties with an expression so thier values cannot be changed
Name Type Description
properties PropertyBase | DuAEProperty | Array.<PropertyBase> | Array.<DuAEProperty> The property or properties

staticDuAEProperty.newUniqueMarkerName(newName, markerProp, increment){string}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 21369
Generates a new unique name for a marker for this marker porperty
Name Type Default Description
newName string The wanted new name
markerProp Property The marker property
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.

staticDuAEProperty.pathBounds(pathProperties, includeTangents){Array.<float>}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 21621
Gets the sourceRect of the properties (their bounds) in layer coordinates
Name Type Default Description
pathProperties Array.<Property> The After Effects Properties containing the paths
includeTangents Boolean false optional Wether to include tangents in the bounds or not
Returns:
Type Description
Array.<float> The bounds [top, left, width, height]

staticDuAEProperty.pathHorizontalSymetry(pathProperties)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 21521
Makes a horizontal symetry transformation on the paths, using the same axis of symetry for all shapes (shapes must be on the same layer).
Name Type Description
pathProperties Array.<Property> | Array.<DuAEProperty> The After Effects Properties containing the paths to symetrize

staticDuAEProperty.pathVerticalSymetry(pathProperties)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 21570
Makes a vertical symetry transformation on the paths, using the same axis of symetry for all shapes (shapes must be on the same layer).
Name Type Description
pathProperties Array.<Property> The After Effects Properties containing the paths to symetrize

staticDuAEProperty.rename(prop, name){string}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 21702
Safely renames a property (without breaking expressions)
Name Type Description
prop PropertyBase The property
name string The new name.
Returns:
Type Description
string The new name.

staticDuAEProperty.setInterpolationType(layers, props, typeIn, typeOut, easeInValue, easeOutValue)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 21388
Changes the interpolation type on selected keyframes, or sets a new key at current time if there are no keyframes selected.
Name Type 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 typeIn optional The out interpolation type (see AE API)
easeInValue Array.<int> | int 33 optional The in interpolation ease value (used if typeIn is KeyframeInterpolationType.BEZIER)
easeOutValue Array.<int> | int easeInValue optional The out interpolation ease value (used if typeOut is KeyframeInterpolationType.BEZIER)

staticDuAEProperty.shapeValueEquals(shape1, shape2){bool}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 21715
Compares two shape values
Name Type Description
shape1 Shape
shape2 Shape
Returns:
Type Description
bool true if they're the same

staticDuAEProperty.textValueEquals(text1, text2){bool}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 21732
Compares two text values
Name Type Description
text1 TextDocument
text2 TextDocument
Returns:
Type Description
bool true if they're the same

addKey(typeIn, typeOut, time)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 19264
Adds a new key
Name Type Default Description
typeIn KeyframeInterpolationType | string KeyframeInterpolationType.LINEAR optional The in interpolation type (see AE API) or the string "roving" or "continuous"
typeOut KeyframeInterpolationType | string typeIn optional The out interpolation type (see AE API)
time float optional If omitted, the current comp time

addToEGP(){int}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 20453

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.
Returns:
Type Description
int The number of properties added

animated(){boolean}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 20522
Checks if the property has an animation (keyframes)
Returns:
Type Description
boolean True if the property is animated

animation(selected, timeRange){DuAEPropertyGroupAnimation|DuAEPropertyAnimation}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 18995

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.
Name Type Default Description
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. If not provided, will use the comp time range.
Returns:
Type Description
DuAEPropertyGroupAnimation | DuAEPropertyAnimation The animations. A DuAEPropertyAnimation if prop is a Property, a PopertyGroupAnim if it is a PropertyGroup

averageSpeed(preExpression, fastMode){float}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 20935
Gets the average speed of the proprety
Name Type Default Description
preExpression bool true optional True to get the velocity from keyframes instead of the result of the exression
fastMode bool true optional True to limit the number of samples used to compute the velocity and make the process faster.
Returns:
Type Description
float The average speed in unit per second

bakeExpression()

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 21213

bakeExpressions(mode, frameStep)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 21206

Recursive: this method can run on a property group.

Bakes the expressions to keyframes
Name Type Default Description
mode DuAEExpression.BakeAlgorithm DuAEExpression.BakeAlgorithm.SMART 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.
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.

cleanKeyframes(precision)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 20096

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.
Name Type Default Description
precision int 1 optional The precision for float number comparison, number of decimals. Set to -1 to not use.

dimensions(){int}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 18771
Gets the number of dimensions of a property
Returns:
Type Description
int The number of dimensions, 0 if this is not a dimensionnal value (ie color, text, shape...)

dimensionsSeparated(){Bool}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 18460
Reimplements the Property.dimensionsSeparated attribute for convenience.
Returns:
Type Description
Bool true if the property is a separation leader and has its dimensions seperated.

do(func)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 18403

Recursive: this method can run on a property group.

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

editable(){bool}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 18799
Checks if this property value can be edited
Returns:
Type Description
bool true if the value of the property can be edited, false otherwise

exportPathToJsxinc(file, offsetToCenter, append, varName){Boolean}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 20870
Export the (shape) property to the given file.
Name Type Default Description
file String The path or File where the jsxinc shape will be written
offsetToCenter Boolean false optional If true, offset the path to the center
append Boolean false optional If true, appends the shape at the end of the file instead of overwriting it.
varName string "shape" optional A name for the variable storing the shape
Returns:
Type Description
Boolean Success
Example
var props = DuAEComp.getSelectedProps(PropertyValueType.SHAPE);
var prop = props[0].getProperty();
var out = prop.exportPathToJsxinc("D:/shape.test");

expression(){string}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 18470
Reimplements the Property.expression attribute for convenience.
Returns:
Type Description
string the expression.
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 19539
Gets an expression link to the property
Name Type Default Description
useThisComp bool false optional Whether to begin the expression by 'thisComp' or 'comp("name")'
fromLayer bool true optional Whether to begin the expression by comp.layer or directly from the first prop of the layer
Returns:
Type Description
str The expression link to the property

findInComp(comp){DuAEProperty|null}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 21227
Finds the same property in the given comp (same path & name)
Name Type Description
comp CompItem The composition where to find the property
Returns:
Type Description
DuAEProperty | null The property or null if it wasn't found

firstKeyTime(selected){float|null}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 19065

Recursive: this method can run on a property group.

Recursilvely gets the time of the first keyFrame in this prop or subprops
Name Type Default Description
selected Boolean false optional true to check selected keyframes only
Returns:
Type Description
float | null The keyframe time or null if there are no keyframe

fixSpatialInterpolation(precision, selectedKeyframesOnly)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 19989
Fixes the spatial interpolation of the selected keys.
Sets the interpolation to linear when the property does not move between keyframes
Name Type Default Description
precision int 1 optional The precision for float number comparison, number of decimals. Set to -1 to not use.
selectedKeyframesOnly Bool false optional If true, only set the selected keyframes.

fixValue(property, value){any}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 20948
Adjust the value so it can be set on the specific property (adjust the number of dimensions or the type of value)
Name Type Description
property Property | DuAEProperty The property
value any The value to set
Returns:
Type Description
any The converted value

getAnimatedProps(filter, strict, caseSensitive){Array.<DuAEProperty>}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 20539

Recursive: this method can run on a property group.

Gets the After Effects animated (with keyframes) properties in the propertyGroup
Name Type 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 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

getProperty(){PropertyBase}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 18755
Gets the original Property
Always works even if this DuAEProperty represents an effect which has been broken
---AE Hack---
TODO
  • When returning an effect, check if the matchName corresponds too.
Returns:
Type Description
PropertyBase The property

hasSelectedKeys(){boolean}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 19888

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.
Returns:
Type Description
boolean true if the property have at least one selected keyframe

isAngle(){Boolean}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 18620
Whether the value is an angle
Returns:
Type Description
Boolean

isDropdown(){Boolean}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 18639
Check if this is a dropdown property or effect.
Note: On After Effects < 17.0.1 this always returns false.
Returns:
Type Description
Boolean

isGroup(){Boolean}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 18417
Checks if this source property is a group of properties or a property
Returns:
Type Description
Boolean True if it's a group

isMasterProperty(){Boolean}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 18844
Checks if a property is part of the master properties of a precomp
Returns:
Type Description
Boolean true if property is part of the master properties

isPercent(){Boolean}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 18611
Whether the value is a percent
Returns:
Type Description
Boolean

isPixels(){Boolean}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 18629
Whether the value is a pixel value
Returns:
Type Description
Boolean

isProperty(){Boolean}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 18434
Checks if this source property is a group of properties or a property
Returns:
Type Description
Boolean True if it's a property

isSeparationLeader(){Bool}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 18451
Reimplements the Property.isSeparationLeader attribute for convenience.
Returns:
Type Description
Bool true if the property is a separation leader.

isSpatial(){Bool}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 18442
Reimplements the Property.isSpatial attribute for convenience.
Returns:
Type Description
Bool true if the property is spatial.

keyAtIndex(keyIndex){DuAEKeyframe}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 18881
Gets the key at a given index on a property
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)
Returns:
Type Description
DuAEKeyframe The keyframe, or null if incorrect index

keyAtTime(time){DuAEKeyframe}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 18934
Gets the key at an exactly given time on a property
Name Type Description
time float The time of the key to retrieve.
Returns:
Type Description
DuAEKeyframe The keyframe, or null if incorrect time

keyInSpatialTangent(key){Array.<float>}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 20039
Reimplements the Property.keyInSpatialTangent method.
Name Type Description
key int | DuAEKeyframe The keyframe or its index.
Returns:
Type Description
Array.<float> The tangent

keyLabel(index){*}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 18550
Reimplements the Property.keyValue method for convenience.
Name Type Description
index int The index of the keyframe.
Returns:
Type Description
* The value of the key.

keyOutSpatialTangent(key){Array.<float>}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 20052
Reimplements the Property.keyOutSpatialTangent method.
Name Type Description
key int | DuAEKeyframe The keyframe or its index.
Returns:
Type Description
Array.<float> The tangent

keys(selected, timeRange){Array.<DuAEKeyframe>}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 18952
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.
Name Type Default Description
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. If not provided, will use the comp time range.
Ignored if selected is true;
Returns:
Type Description
Array.<DuAEKeyframe> The keyframes, or null of this property is of type PropertyValueType.NO_VALUE or PropertyValueType.CUSTOM_VALUE

keyTime(index){float}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 18528
Reimplements the Property.keyTime method for convenience.
Name Type Description
index int The index of the keyframe.
Returns:
Type Description
float The time of the key.

keyValue(index){*}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 18539
Reimplements the Property.keyValue method for convenience.
Name Type Description
index int The index of the keyframe.
Returns:
Type Description
* The value of the key.

lastKeyTime(selected){float|null}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 19105

Recursive: this method can run on a property group.

Recursilvely gets the time of the last keyFrame in this prop or subprops
Name Type Default Description
selected boolean false optional true to check selected keyframes only
Returns:
Type Description
float | null The keyframe time or null if there are no keyframe

linkProperties(parentProp, useThisComp, timeLayer)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 20294

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).
Name Type 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 null optional 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.

maxSpeed(preExpression, fastMode){float}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 20651
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.
Name Type Default Description
preExpression bool true optional True to get the velocity from keyframes instead of the result of the exression
fastMode bool true optional 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.
Returns:
Type Description
float The velocity.

maxVelocity(axis, preExpression, fastMode){float}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 20700
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.
Name Type Default Description
axis int The axis
preExpression bool true optional True to get the velocity from keyframes instead of the result of the exression
fastMode bool true optional 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.
Returns:
Type Description
float The velocity.

minVelocity(axis, preExpression, fastMode){float}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 20756
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.
Name Type Default Description
axis int The axis
preExpression bool true optional True to get the velocity from keyframes instead of the result of the exression
fastMode bool true optional 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.
Returns:
Type Description
float The velocity.

nearestKeyAtTime(time){DuAEKeyframe|null}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 18923
Gets the nearest key at a given time on a property
Name Type Description
time float optional The time of the key to retrieve. The current time by default.
Returns:
Type Description
DuAEKeyframe | null The keyframe, or null if incorrect time or not found

nearestKeyIndex(t)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 18573
Reimplements the Property.nearestKeyIndex method for convenience.
Name Type Description
t float The time of the keyframe.

numerical(){bool}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 19202
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.
Returns:
Type Description
bool

numKeys(recursive){int}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 18661
Gets the number of keyframes in the property
Name Type Default Description
recursive Boolean true optional If true and this is a group, returns the number of keyframes of all contained property
Returns:
Type Description
int

numProperties(){int}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 18686
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.
Returns:
Type Description
int The number of sub-properties.

parentProperty(){DuAEProperty|null}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 18707
Getter for the PropertyBase.parentProperty attribute for convenience.
Returns:
Type Description
DuAEProperty | null The parent property or null if not found.

pathProperty(){DuAEProperty|null}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 20913
Checks if the property is a bezier property, or return the child bezier property if this is a shape or a mask
Returns:
Type Description
DuAEProperty | null the bezier property or null if it is not.

pickWhip(parentProp, useThisComp)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 20267
Adds an expression to the property, linking it to the parent property
Name Type 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

prop(index){DuAEProperty|null}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 18697
Reimplements the PropertyGroup.property() method for convenience.
Name Type Description
index string | int Either the name, matchName or the index.
Returns:
Type Description
DuAEProperty | null The sub-property as DuAEProperty object or null if not found.

propertyValueType(){PropertyValueType|null}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 20028
Reimplements the Property.propertyValueType attribute.
Returns:
Type Description
PropertyValueType | null The value type, or null if this is a group

quickBakeExpression()

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 21036

quickBakeExpressions(frameStep)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 20996

Recursive: this method can run on a property group.

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

range(axis, preExpression, fastMode){Array.<float>}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 20591
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.
Name Type Default Description
axis int 0 optional The axis (or the color channel) to get the range
preExpression bool true optional True to get the range from keyframes instead of the result of the exression
fastMode bool true optional 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.
Returns:
Type Description
Array.<float> The minimum and maximum value.
The first item in the Array is not necesarily the lowest value, it is the first in time.

removeAnimation(prop, removeExpression)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 19487

Recursive: this method can run on a property group.

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

removeDataExpressions()

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 20378

Recursive: this method can run on a property group.

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

removeExpression()

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 20438

removeExpressions(filter, keepPostExpressionValue)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 20417

Recursive: this method can run on a property group.

Removes all expressions found in the property.
Name Type 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 true optional Set to false to just remove the expressions and get back the pre expression value

removeKey(key)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 18562
Reimplements the Property.removeKey method for convenience.
Name Type Description
key int | DuAEKeyframe The index or the keyframe.

replaceInExpressions(oldString, newString, caseSensitive)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 20245

Recursive: this method can run on a property group.

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

riggable(){bool}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 18857
Checks if this property value can be rigged (with an expression)
Returns:
Type Description
bool true if the value of the property can be rigged, false otherwise

scriptifyPath(offsetToCenter, varName){string}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 20808
Scriptifies the given shape property.
Works only with path (bezier) properties.
Name Type Default Description
offsetToCenter Boolean false optional If true, offset the path to the center
varName string shape optional A name for the variable storing the shape
Returns:
Type Description
string The scriptified shape

selectedKeys(){Array.<int>}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 18517
Reimplements the Property.selectedKeys attribute for convenience.
Returns:
Type Description
Array.<int> The list of selected keyframe indices.

selectKeys(inTime, outTime)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 19507

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.
Name Type Default Description
inTime float 0 optional The time at which to select the keyframes
outTime float inTime optional The end time

setAnim(anim, time, setExpression, replace, offset){boolean}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 19348
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().
Name Type Default Description
anim DuAEPropertyAnimation The animation
time float comp.time optional The time where to begin the animation
setExpression boolean false optional Sets the expression too
replace boolean false optional true to remove any existing keyframe on the properties before adding new keyframes
offset boolean false optional true to offset the current value, instead of replacing it
Returns:
Type Description
boolean true if the anim was actually set.

setAnimation(anim, time, ignoreName, setExpression, onlyKeyframes, replace, whiteList, offset){boolean}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 19427

Recursive: this method can run on a property group.

Sets all animations on a Property or a PropertyGroup.
Name Type Default Description
anim DuAEPropertyAnimation | DuAEPropertyGroupAnimation 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 animation.
setExpression boolean false optional Sets the expression too
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.
Ignored if the list is empty.
offset boolean false optional true to offset the current value, instead of replacing it
Returns:
Type Description
boolean true if the anim was actually set.

setEase(props, easeInValue, easeOutValue, velocityInValue, velocityOutValue, velocityAsPercent)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 19652
Changes the ease influences of the selected keys
Name Type 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 false optional 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.

setExpression(expr, keepValue)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 20203
Sets an expression to a property.
With the ability to keep the initial value.
Name Type Default Description
expr string The expression
keepValue bool true optional When true, the method will try to keep the same resulting value as before applying the expression.

setInterpolation(typeIn, typeOut, easeInValue, easeOutValue, selectedKeyframesOnly)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 19812

Recursive: this method can run on a property group.

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

setKey(key, timeOffset)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 19145
Sets a DuAEKeyframe on a property
Name Type Default Description
key DuAEKeyframe The DuAEKeyframe.
timeOffset float comp.time optional The time offset (added to DuAEKeyframe._time) where to add the key frame.

setKeyInterpolation(key, typeIn, typeOut, easeInValue, easeOutValue)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 19588
Sets interpolations on a keyframe.
Name Type 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 typeIn optional The out interpolation type (see AE API)
easeInValue Array.<int> | int 33 optional The in interpolation ease value (used if typeIn is KeyframeInterpolationType.BEZIER)
easeOutValue Array.<int> | int easeInValue optional The out interpolation ease value (used if typeOut is KeyframeInterpolationType.BEZIER)

setKeySpeed(key, speed)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 19781
Sets the speed of a keyframe.
Name Type Description
key int The key index
speed float The speed

setPropertyParameters(names)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 18723
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.
Name Type Description
names Array.<string> The list of names.

setRoving()

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 21252

Recursive: this method can run on a property group.

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

setSpatialInterpolation(typeIn, typeOut, selectedKeyframesOnly)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 19912
Sets the spatial interpolation of the keyframes on the property
Name Type Default Description
typeIn KeyframeInterpolationType The in interpolation type (see AE API)
typeOut KeyframeInterpolationType typeIn optional The in interpolation type (see AE API)
selectedKeyframesOnly Bool false optional If true, only set the selected keyframes.

setSpatialInterpolationAtKey(key, typeIn, typeOut)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 19935
Sets the spatial interpolation of the keyframes
Name Type Default Description
key int | DuAEKeyframe The keyframe or its index
typeIn KeyframeInterpolationType The in interpolation type (see AE API)
typeOut KeyframeInterpolationType typeIn optional The in interpolation type (see AE API)

setSpatialTangentsAtKey(key, inTangent, outTangent)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 20066
Reimplements the Property.setSpatialTangentsAtKey method.
Name Type Description
key int | DuAEKeyframe The keyframe or its index.
inTangent Array.<float> The in tangent.
outTangent Array.<float> The out tangent.

setValue(value, defaultTime){boolean}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 19219
Sets a value on a property, adjusting the dimensions if needed
Name Type Default Description
value any The value to set
defaultTime float comp().time optional The time at which to set the value if the property has keyframes
Returns:
Type Description
boolean True if the value has correctly been set, false otherwise.

setValueAtKey(value, key){boolean}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 19313
Sets a new keyframe value, adjusting the dimensions if needed
Name Type Description
value any The value to set
key int The index the keyframe
Returns:
Type Description
boolean True if the value has correctly been set, false otherwise.

setValueAtTime(value, time){boolean}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 19284
Sets a new keyframe on a property, adjusting the dimensions if needed, at desired time
Name Type Description
value any The value to set
time float optional The time of the new keyframe
Returns:
Type Description
boolean True if the value has correctly been set, false otherwise.

smartBakeExpression()

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 21191

smartBakeExpressions(frameStep)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 21050

Recursive: this method can run on a property group.

Uses a smarter algorithm to bake the expression to keyframes
Name Type Default Description
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.

snapKeys(keys)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 21282
Snaps keyframes to the closest frames if they're in between.

Recursive: this method can run on a property group.

Name Type 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.

speedAtTime(time, preExpression){float}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 20151
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)
Name Type Default Description
time float comp().time optional The time.
preExpression boolean true optional true to get the pre-expression speed.
Returns:
Type Description
float The speed

unit(){string}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 18583
Gets the unit of the property
Returns:
Type Description
string The unit

unitsText(){string}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 18602
The units text of the property, same as DuAEProperty.getProperty().unitsText
Returns:
Type Description
string The unit

value(preExpression){*}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 18480
Reimplements the Property.value attribute for convenience.
Name Type Default Description
preExpression Bool false optional Set to true to get the pre-expression value.
Returns:
Type Description
* 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(time, preExpression){*}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 18502
Reimplements the Property.valueAtTime mehtod for convenience.
Name Type Default Description
time float optional If omitted, the current comp time.
preExpression Bool false optional Set to true to get the pre-expression value.
Returns:
Type Description
* 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(time, preExpression){Array.<float>}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 20172
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)
Name Type Default Description
time float comp().time optional The time.
preExpression boolean true optional true to get the pre-expression velocity.
Returns:
Type Description
Array.<float> The velocity

velocityToPercent(keyIndex){Array.<float>}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 19842
Computes a percentage from a velocity on a given keyframe.
Name Type Description
keyIndex int The index of the keyframe where to compute the velocity
Returns:
Type Description
Array.<float> The velocities [in, out] as a percentage.

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

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 20891
Gets the vertices array in comp coordinates.
Works only with path (bezier) properties.
Returns:
Type Description
Array.<Array.<float>> The vertices in comp coordinates.