DuAEF.DuAE.Project

After Effects project methods

Methods

static collectFiles(destinationopt, overwriteopt, zipopt, createProjectFolderopt)

Collects all dependencies in a folder
Parameters:
Name Type Attributes Default Description
destination Folder <optional>
The folder where to save the files. The project files will be collected in a subfolder called "project name.aep.archive" or "project name.aep.zip". If not provided, will use the current folder.
overwrite boolean <optional>
false Wether to overwrite existing footage in the destination.
zip boolean <optional>
false Set to true to automatically zip the archive.
createProjectFolder boolean <optional>
true Wether to create a folder for this project or use the destination as is.

static getActiveComp() → {CompItem|null}

Gets the After Effects current composition
Returns:
CompItem | null - The current composition or null if there's no current comp

static getComps(rootOnlyopt) → {Array.<CompItem>}

Gets all compositions in the project (or only the root of the project, ignoring subfolders)
Parameters:
Name Type Attributes Default Description
rootOnly boolean <optional>
false Set to true to get only comps from the root of the project
Returns:
Array.<CompItem> - The compositions

static getItemById() → {Item|null}

Retrieves an item by its Item ID
Returns:
Item | null - The item

static newUniqueCompName(newName, comp, incrementopt) → {string}

Generates a new unique name for a composition
Parameters:
Name Type Attributes Default Description
newName string The wanted new name
comp CompItem The comp
increment boolean <optional>
true true to automatically increment the new name if it already ends with a digit
Returns:
string - The unique name, with a new number at the end if needed.

static reduce(compsopt, keepExpressionOnlyopt)

Reduces the project, the same way the native command does it, but being able to keep comps used only by expressions.
Parameters:
Name Type Attributes Default Description
comps CompItem | Array.<CompItem> <optional>
The name or the id of the comp(s) to keep. If omitted, it will use all comps at the root of the project (the ones not in a subfolder).
keepExpressionOnly boolean <optional>
true Set to false to ignore comps used only by expressions (same as the native command)

static reduceSelected(keepExpressionOnlyopt)

Reduces the project using the selected compositions, the same way the native command does it, but being able to keep comps used only by expressions. If there's no comp selected, will use all comps at the root of the project.
Parameters:
Name Type Attributes Default Description
keepExpressionOnly boolean <optional>
true Set to false to ignore comps used only by expressions (same as the native command)

static replaceInExpressions(oldString, newString, caseSensitiveopt)

Replaces text in Expressions
Parameters:
Name Type Attributes Default Description
oldString string The string to replace
newString string The new string
caseSensitive boolean <optional>
true Wether the search has to be case sensitive

static setProgressMode(inProgressopt)

Sets the project in "waiting mode" to speed up things.
Parameters:
Name Type Attributes Default Description
inProgress bool <optional>
true True to set progress mode, false to stop it.

static setUniqueCompNames()

Makes sure all compositions in the project have unique names, renaming them if needed.

static updateExpressionCache()

Updates the cache of the expressions used by Duik to speed up batch process of expressions in the whole project.
It's automatically run when needed if it's not been updated in a long time (1 mn) or if it's empty