beautypg.com

Adobe After Effects CS4 User Manual

Page 681

background image

675

USING AFTER EFFECTS CS4

Expressions

Last updated 12/21/2009

Camera attributes and methods (expression reference)

Camera objects have the same attributes and methods as Layer objects, except for

source

,

effect

,

mask

,

width

,

height

,

anchorPoint

,

scale

,

opacity

,

audioLevels

,

timeRemap

, and all of the material properties.

pointOfInterest

Return type: Property [3].

Returns the point of interest values of a camera in world space.

zoom

Return type: Property.

Returns the zoom values of a camera in pixels.

Here’s an expression for the Scale property of a layer that maintains the relative size of the layer in frame while
changing the z position (depth) of a layer or the Zoom value of a camera:

cam = thisComp.activeCamera;

distance = length(sub(position, cam.position));

scale * distance / cam.zoom;

depthOfField

Return type: Property.

Returns 1 if the Depth Of Field property of a camera is on, or returns 0 if the Depth Of Field property is off.

focusDistance

Return type: Property.

Returns the focus distance value of a camera, in pixels.

aperture

Return type: Property.

Returns the aperture value of a camera, in pixels.

blurLevel

Return type: Property.

Returns the blur level value of a camera as a percentage.

active

Return type: Boolean.

Returns true if the camera is the active camera for the composition at the current time: the Video switch

for the

camera layer is on, the current time is in the range from the In point of the camera layer to the Out point of the camera
layer, and it is the first (topmost) such camera layer listed in the Timeline panel. Returns false otherwise.

More Help topics

Cameras, lights, and points of interest

” on page 186

Light attributes and methods (expression reference)

Light objects have the same attributes and methods as Layer objects, except for

source

,

effect

,

mask

,

width

,

height

,

anchorPoint

,

scale

,

opacity

,

audioLevels

,

timeRemap

, and all of the material properties.

pointOfInterest

Return type: Property [3].

Returns the point of interest values for a light in world space.

intensity

Return type: Property.

Returns the intensity values of a light as a percentage.

color

Return type: Property [4].

Returns the color value of a light.

coneAngle

Return type: Property.

This manual is related to the following products: