Skip to content

Project

Project dataclass

Project(bits_per_channel: BitsPerChannel, effect_names: list[str], expression_engine: str | None, file: str, footage_timecode_display_start_type: FootageTimecodeDisplayStartType, frame_rate: float, frames_count_type: FramesCountType, project_items: dict[int, Item], time_display_type: TimeDisplayType, ae_version: str | None = None, xmp_packet: Element | None = None)

Object storing information about an After Effects project.

Attributes:

Name Type Description
ae_version str | None

The version of After Effects that created the project.

bits_per_channel BitsPerChannel

The color depth of the current project, either 8, 16, or 32 bits.

effect_names list[str]

The names of all effects used in the project.

expression_engine str | None

The Expressions Engine setting in the Project Settings dialog box ("extendscript" or "javascript-1.0").

file str

The full path to the project file.

footage_timecode_display_start_type FootageTimecodeDisplayStartType

The Footage Start Time setting in the Project Settings dialog box, which is enabled when Timecode is selected as the time display style.

frame_rate float

The frame rate of the project.

frames_count_type FramesCountType

The Frame Count menu setting in the Project Settings dialog box.

project_items dict[int, Item]

All the items in the project.

time_display_type TimeDisplayType

The time display style, corresponding to the Time Display Style section in the Project Settings dialog box.

xmp_packet Element | None

The XMP packet for the project, containing metadata.

root_folder property

root_folder: Folder

The root folder.

This is a virtual folder that contains all items in the Project panel, but not items contained inside other folders in the Project panel.

compositions property

compositions: list[CompItem]

All the compositions in the project.

folders property

folders: list[Folder]

All the folders in the project.

footages property

footages: list[FootageItem]

All the footages in the project.

__post_init__

__post_init__() -> None

Set computed fields after initialization.

Source code in src/aep_parser/models/project.py
def __post_init__(self) -> None:
    """Set computed fields after initialization."""
    self.display_start_frame = self.frames_count_type.value % 2

__iter__

__iter__() -> Iterator[Item]

Return an iterator over the project's items.

Source code in src/aep_parser/models/project.py
def __iter__(self) -> typing.Iterator[Item]:
    """Return an iterator over the project's items."""
    return iter(self.project_items.values())

layer_by_id

layer_by_id(layer_id: int) -> Layer

Get a layer by its unique ID.

Source code in src/aep_parser/models/project.py
def layer_by_id(self, layer_id: int) -> Layer:
    """Get a layer by its unique ID."""
    if self._layers_by_uid is None:
        self._layers_by_uid = {
            layer.layer_id: layer
            for comp in self.compositions
            for layer in comp.layers
        }
    return self._layers_by_uid[layer_id]

composition

composition(name: str) -> CompItem | None

Get a composition by name.

Source code in src/aep_parser/models/project.py
def composition(self, name: str) -> CompItem | None:
    """Get a composition by name."""
    for comp in self.compositions:
        if comp.name == name:
            return comp
    return None

folder

folder(name: str) -> Folder | None

Get a folder by name.

Source code in src/aep_parser/models/project.py
def folder(self, name: str) -> Folder | None:
    """Get a folder by name."""
    for folder in self.folders:
        if folder.name == name:
            return folder
    return None

footage

footage(name: str) -> FootageItem | None

Get a footage by name.

Source code in src/aep_parser/models/project.py
def footage(self, name: str) -> FootageItem | None:
    """Get a footage by name."""
    for footage in self.footages:
        if footage.name == name:
            return footage
    return None