The comp
thisComp.layer("Name") or thisComp.layer(1) (1-based, top first) returns a layer.
| Member | What it is |
|---|---|
thisComp.width, thisComp.height | Comp size in pixels. |
thisComp.duration | Seconds. |
thisComp.frameDuration | Seconds per frame. |
thisComp.numLayers | |
thisComp.name |
Layers
| Member | What it is |
|---|---|
name | The layer's name. |
index | 1-based. |
inPoint, startTime | The layer's in point, seconds. |
outPoint | Seconds. |
hasParent | true/false. |
parent | The parent layer. |
transform | The Transform group. |
position, scale, rotation, opacity, anchorPoint | Transform properties (also under transform.). |
effect("Name") | An effect on the layer, by name. |
On the expression's own layer these can be used bare: index, position, effect("Slider Control")("Slider").
Properties expressions can read
position, xPosition, yPosition, anchorPoint, scale, rotation (also zRotation), opacity, the shape and text values Drivers can reach, and effect parameters via effect("Name")("Param").
A property used in arithmetic reads as its value now. Members:
| Member | What it is |
|---|---|
.value | The value now. |
.valueAtTime(t) | The keyframed value at t seconds. |
.numKeys | Keyframe count. |
.loopOut(type, n), .loopIn(type, n) | See Looping and time. |
Effects
effect("Bounce")("Slider")
thisComp.layer("Controls").effect("Angle Control")("Angle")
A parameter can be named by string or number. Effects are found by their name in the layer's effect stack — rename them to make expressions readable.
Examples
// follow another layer
thisComp.layer("Null 1").transform.position
// offset copies by their index
value + [index * 40, 0]
// rotate from a slider
effect("Speed")("Slider") * time
Notes
- A property that has its own expression is evaluated first, then read.
.valueAtTime()at another time reads the keyframed value before modifiers. At the current time, every read is the fully resolved value.