When to Use Expressions

What Is an Expression?

Adding Expressions

The Pick Whip

Vectors and Dimensions

Ranges of Values

Interpolation Methods


Global Objects

The Default Object

Methods and Attributes

Vector Math

an example




Project Index


The Default Object — this_layer

Object references can quickly become very wordy, and hard to read. After Effects tries to simplify the most common references by offering a default object: this_layer. If you don’t specify any other global object, After Effects will assume you meant to use this_layer, and will proceed from there. This is why you can write simply ‘opacity’ without having to write ‘this_layer.opacity’.

If the idea of a default object seems strange to you, think about the the address analogy we used earlier. When sending a letter inside the US, you could omit the country and the postal service would make delivery with no problem. They’d simply assume that you meant to specify the US. The US in this example is a kind of ‘default object’. Whenever you don’t specify some other country — that is, some other global object — the system will assume you meant to specify the US and carry on from there. Similarly, if you don't specify a global object in After Effects, it will assume that you meant to use its default object, ‘this_layer’.

Of course, if you want to refer to anything outside the current layer, you’ll need to start by specifying the appropriate global object.

Even when you just want to select another layer in the same comp, you can’t just write ‘layer("Layer 1")’ because layers are not global objects–they belong to comps, and After Effects needs to know which comp you’re talking about. So you’ll need to start with the global object ‘this_comp’:

this_comp.layer("Layer 1")

Remember this construction — you’ll use it more than you might expect.


Entire contents © 2001 JJ Gifford.