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.