Key attributes and methods (expression reference) – Adobe After Effects User Manual

Page 702

Advertising
background image

name

To the top

value

Returns the index of a property relative to other properties in its property group, including property groups within masks, effects, text animators,
selectors, shapes, trackers, and track points.

Return type: String.

Returns the name of the property or property group.

Example: Animating with the propertyGroup method and propertyIndex attribute

Values of propertyGroup relative to Position property of a brush stroke
A. propertyGroup(4) B. propertyGroup(3) C. propertyGroup(2) D. propertyGroup(1) E. Position propertyIndex value is 2; Rotation propertyIndex
value is 4.

In this example, the propertyGroup method for each brush stroke targets the Brush property group because that group is two property groups

up from the Rotation property. The propertyIndex attribute in each Brush stroke then returns a unique value for each Brush stroke. The

resulting value is then multiplied by the time and 200 and applied to each rotation value, rotating each brush stroke differently, creating swirling
paint strokes: propertyGroup(2).propertyIndex * time * 200

propertyGroup(2).propertyIndex * time * 200

Animating a brush stroke with an expression

Key attributes and methods (expression reference)

When you access a Key object, you can get time, index, and value properties from it. For example, the following expression gives you the

value of the third Position keyframe: position.key(3).value.

The following expression, when written on an Opacity property with keyframes, ignores the keyframe values and uses only the placement of the
keyframes in time to determine where a flash should occur: d = Math.abs(time - nearestKey(time).time); easeOut(d, 0,

.1, 100, 0)

d = Math.abs(time - nearestKey(time).time);
easeOut(d, 0, .1, 100, 0)

Return type: Number or Array.

Returns the value of the keyframe.

698

Advertising
This manual is related to the following products: