DuAEF.DuAE.Comp

After Effects composition methods

Methods

static addAdjustmentLayer(comp) → {AVLayer}

Creates a new Adjustment layer
Parameters:
Name Type Description
comp CompItem The comp
Returns:
AVLayer - The layer.

static getAnimatedProps(filteropt, strictopt, caseSensitiveopt, selectedLayersOnlyopt, compopt) → {Array.<PropertyInfo>}

Gets the After Effects animated (with keyframes) properties in the current comp
Parameters:
Name Type Attributes Default Description
filter PropertyType | PropertyValueType | string | function <optional>
A filter to get only a certain type, or value type, or property name or matchName.
A function which take one PropertyBase as argument can be used to filter the properties: the Property will be returned if the function returns true.
strict boolean <optional>
false If a string filter is provided, wether to search for the exact name/matchName or if it contains the filter.
caseSensitive boolean <optional>
true If a string filter is provided, and not strict is false, does the search have to be case sensitive?
selectedLayersOnly boolean <optional>
false True to get the properties on the selected layers only
comp CompItem <optional>
DuAEF.DuAE.Project.getActiveComp The composition
Returns:
Array.<PropertyInfo> - The selected properties, an empty Array if nothing active or selected

static getAudioLayers(comp, audioActiveOnlyopt) → {Array.<AVLayer>}

Gets all the layers with audio in the composition
Parameters:
Name Type Attributes Default Description
comp CompItem The composition where the audio will be searched
audioActiveOnly bool <optional>
false If true, does not get muted layers.
Returns:
Array.<AVLayer> - An array of AVLayer containing the audio layers

static getParentComps(item) → {Array.<CompItem>}

Recursively gets all compositions where this item is used
Parameters:
Name Type Description
item AVItem The item
Returns:
Array.<CompItem> - The compositions

static getPrecomps(comp, recursiveopt) → {Array.<CompItem>}

Gets all the precomposition found in the comp.
Parameters:
Name Type Attributes Default Description
comp CompItem The composition
recursive bool <optional>
false True to get nested compositions
Returns:
Array.<CompItem> - The precompositions

static getRelatives(compopt, recursiveopt) → {Array.<CompItem>}

Gets all precomps and parent comps of the composition
Parameters:
Name Type Attributes Default Description
comp CompItem <optional>
DuAEF.DuAE.Project.getActiveComp() The composition
recursive bool <optional>
false True to search to more than one level of precomposition
Returns:
Array.<CompItem> - The related compositons

static getSelectedLayers() → {Array.<Layer>}

Gets the selected layers in the current comp
Returns:
Array.<Layer> - The selected layers

static getSelectedProps(filteropt, strictopt, caseSensitiveopt) → {Array.<PropertyInfo>}

Gets the After Effects selected properties in the current comp
Parameters:
Name Type Attributes Default Description
filter PropertyType | PropertyValueType | string | function <optional>
A filter to get only a certain type, or value type, or property name or matchName.
A function which take one PropertyBase as argument can be used to filter the properties: the Property will be returned if the function returns true.
strict boolean <optional>
false If a string filter is provided, wether to search for the exact name/matchName or if it contains the filter.
caseSensitive boolean <optional>
true If a string filter is provided, and not strict is false, does the search have to be case sensitive?
Returns:
Array.<PropertyInfo> - The selected properties, an empty Array if nothing active or selected

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

Generates a new unique name for a layer
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 newUniqueMarkerName(newName, comp, incrementopt) → {string}

Generates a new unique name for a marker for this comp
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 parentAllOrphans(layer, includeLockedLayersopt)

Links all orphan layers in the comp to a layer
Parameters:
Name Type Attributes Default Description
layer Layer The parent layer
includeLockedLayers bool <optional>
false True to parent layers even if they are locked

static selectLayers(layers)

Selects the layers
Parameters:
Name Type Description
layers Array.<Layer> The layers

static unselectLayers(compopt) → {Array.<Layer>}

Deselects all layers in a composition
Parameters:
Name Type Attributes Default Description
comp CompItem <optional>
app.project.activeItem The composition
Returns:
Array.<Layer> - The previously selected layers.
A custom attribute, Layer.props is added on each layer object which is an array of all previously selected properties as PropertyInfo objects

static unselectProperties()

Deselects all properties in the current composition