After Effects Python Documentation

Welcome to After Effects Python’s documentation!

Welcome to After Effects Python’s documentation!

Indices and tables

Layers

class ae_python.layer.layer.Layer(*args, **kwargs)[source]

The parent class for all layer types. Contains basic values.

Parameters
  • name – A string containing the name of the solid.

  • position – The position of the layer. Needs array in following style: [x, y, z]

  • rotation – The rotation of the layer. Needs array in following style: [x, y, z]

  • comment – A descriptive comment for the layer.

  • label – The label color for the item. Colors are represented by their number (0 for None, or 1 to 16 for one of the preset colors in the Labels preferences).

  • locked – When true, the layer is locked; otherwise false. This corresponds to the lock toggle in the Layer panel.

  • shy – When true, the layer is “shy”, meaning that it is hidden in the Layer panel if the composition’s “Hide all shy layers” option is toggled on.

  • solo – When true, the layer is soloed, otherwise false.

  • start_time – The time when the layer starts.

  • stretch – The layer’s time stretch, expressed as a percentage. A value of 100 means no stretch. Values between 0 and 1 are set to 1, and values between -1 and 0 (not including 0) are set to -1.

  • duration – Optional, the length of a still layer in seconds, a floating-point value.

  • scale – The scale of the layer.

  • in_point – The “in” point of the layer, expressed in composition time (seconds).

  • out_point – The “out” point of the layer, expressed in composition time (seconds).

Camera layer

class ae_python.layer.camera_layer.CameraLayer(*args, **kwargs)[source]

The Camera layer object represents a camera layer within a composition.

Parameters
  • zoom – The zoom factor of the camera.

  • center_point – The center of the new camera, a floating-point array [x, y]. This is used to set the initial x and y values of the new camera’s Point of Interest property. The z value is set to 0.

Null layer

class ae_python.layer.null_layer.NullLayer(*args, **kwargs)[source]

Shape layer

class ae_python.layer.shape_layer.ShapeLayer(*args, **kwargs)[source]

Solid layer

class ae_python.layer.solid_layer.SolidLayer(*args, **kwargs)[source]

The solid layer class, you can create a solid plane with it.

Parameters
  • color – The color of the plane.

  • pixel_aspect – The pixel_aspect of the solid.

Text layer

class ae_python.layer.text_layer.TextLayer(*args, **kwargs)[source]

The TextLayer object represents a text layer within a composition.

Parameters
  • text – The text of the text layer.

  • font_family – The font family of the text.

anchor text :parameter font_size: The font size of the text. The unit is px. Note: The value is float. :parameter font_color: The text color, the argument class is Color.