Namespace: DuAEProject

DuAEProject

After Effects project methods

Members

staticDuAEProject.settings

The Settings of the current project, an object similar to DuSettings except that it saves in the Project XMP

Methods

staticDuAEProject.bakeCompositions(mode, frameStep)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 25074
Bakes the expressions to keyframes
Name Type Default Description
mode DuAEExpression.BakeAlgorithm DuAEExpression.BakeAlgorithm.SMART optional The algorithm to use for baking the expressions.
frameStep float 1.0 optional By default, checks one value per keyframe. A lower value increases the precision and allows for sub-frame sampling. A higher value is faster but less precise.

staticDuAEProject.bakeExpressions(mode, frameStep)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 25063
Bakes the expressions to keyframes
Name Type Default Description
mode DuAEExpression.BakeAlgorithm DuAEExpression.BakeAlgorithm.SMART optional The algorithm to use for baking the expressions.
frameStep float 1.0 optional By default, checks one value per keyframe. A lower value increases the precision and allows for sub-frame sampling. A higher value is faster but less precise.

staticDuAEProject.checkCompNames(){Object}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 24722
Checks if all comps have a different name.
Returns:
Type Description
Object The list of names used several times. Check the length attribute to know how many duplicates were found, loop through the keys to get the names. Eech key is an array containing the list of comps with that name.
Example
var dupes = DuAEProject.checkCompNames();
if (dupes.length != 0) {
for (name in dupes)
{
    if (dupes.hasOwnProperty(name)) alert(dupes[name]); //dupes[name] is an array of Layer
}
}

staticDuAEProject.collectFiles(destination, overwrite, zip, createProjectFolder)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 24851
Collects all dependencies in a folder
Name Type 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 false optional Whether to overwrite existing footage in the destination.
zip boolean false optional Set to true to automatically zip the archive.
createProjectFolder boolean true optional Whether to create a folder for this project or use the destination as is.

staticDuAEProject.doComps(func, selectedOnly)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 24643
Runs a function on all comps of the project
Name Type Default Description
func function The function, which must take a CompItem as its single argument.
selectedOnly Boolean false optional Runs only on selected compositions

staticDuAEProject.expressionEngine(){string}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 24761
The Expressions Engine setting in the Project Settings dialog box, as a string.
Returns:
Type Description
string One of: "extendscript", "javascript-1.0"

staticDuAEProject.getActiveComp(){CompItem|null}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 24655
Gets the After Effects current composition
Returns:
Type Description
CompItem | null The current composition or null if there's no current comp

staticDuAEProject.getComps(rootOnly){Array.<CompItem>}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 24591
Gets all compositions in the project (or only the root of the project, ignoring subfolders)
Name Type Default Description
rootOnly boolean false optional Set to true to get only comps from the root of the project
Returns:
Type Description
Array.<CompItem> The compositions

staticDuAEProject.getFolderItem(folderName){FolderItem|null}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 24998
Gets a folder with its name. If name is "Project Root" or empty, returns the root of the project.
Name Type Description
folderName string The name of the folder
Returns:
Type Description
FolderItem | null The folder or null if not found.

staticDuAEProject.getItemById(){Item|null}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 24671
Retrieves an item by its Item ID
Returns:
Type Description
Item | null The item

staticDuAEProject.getItemByName(){Item|null}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 24686
Retrieves the first item with the given name
Returns:
Type Description
Item | null The item

staticDuAEProject.getPrecompsAtRoot(){Array.<CompItem>}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 25039
Gets all the precompositions located at the root of the project.
Returns:
Type Description
Array.<CompItem>

staticDuAEProject.getSelectedComp(){CompItem|null}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 24622
Gets either the active comp or the first selected one
Returns:
Type Description
CompItem | null The composition

staticDuAEProject.getSelectedComps(){Array.<CompItem>}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 24608
Gets all selected compositions in the project
Returns:
Type Description
Array.<CompItem> The compositions

staticDuAEProject.getSize(){int}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 24750
Gets the size of the current project file
Returns:
Type Description
int the size in Bytes. -1 if it has not been saved yet.

staticDuAEProject.getUnusedComps(folder){Array.<CompItem>}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 25019
Gets the unused compositions, except the ones in the given folder.
Name Type Description
folder FolderItem optional The folder to exclude.
Returns:
Type Description
Array.<CompItem> The unused compositions

staticDuAEProject.getUnusedFootages(){Array.<FootageItem>}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 24982
Gets the unused footages.
Returns:
Type Description
Array.<FootageItem> The list of unused items.

staticDuAEProject.name(){string}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 25054
Gets the project name (i.e. the file name without extension)
Returns:
Type Description
string The project name.

staticDuAEProject.newUniqueCompName(newName, comp, increment){string}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 24701
Generates a new unique name for a composition
Name Type Default Description
newName string The wanted new name
comp CompItem The comp
increment boolean true optional true to automatically increment the new name if it already ends with a digit
Returns:
Type Description
string The unique name, with a new number at the end if needed.

staticDuAEProject.reduce(comps, keepExpressionOnly)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 24801
Reduces the project, the same way the native command does it, but being able to keep comps used only by expressions.
Name Type 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 true optional Set to false to ignore comps used only by expressions (same as the native command)

staticDuAEProject.reduceSelected(keepExpressionOnly)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 24787
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.
Name Type Default Description
keepExpressionOnly boolean true optional Set to false to ignore comps used only by expressions (same as the native command)

staticDuAEProject.replaceInExpressions(oldString, newString, caseSensitive)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 24966
Replaces text in Expressions
Name Type Default Description
oldString string The string to replace
newString string The new string
caseSensitive boolean true optional Whether the search has to be case sensitive

staticDuAEProject.setProgressMode(inProgress, showProgressBar)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 24552
Sets the project in "waiting mode" to speed up things.
Name Type Default Description
inProgress Boolean true optional True to set progress mode, false to stop it.
showProgressBar Boolean true optional Will show a nice progress bar if true

staticDuAEProject.setUniqueCompNames(comps)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 24771
Makes sure all compositions in the project have unique names, renaming them if needed.
Name Type Description
comps Array | ItemCollection optional A list of comps, all of them by default