After Effects composition methods
Members
-
staticDuAEComp.RendererNames
-
Associative array to get Comp Renderer names from their matchNames
Methods
-
staticDuAEComp.addAdjustmentLayer(comp){AVLayer}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 25799 -
Creates a new Adjustment layer
Name Type Description comp
CompItem The comp Returns:
Type Description AVLayer The layer. -
staticDuAEComp.addAdjustmentLayer(comp){ShapeLayer}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 26027 -
Creates a new "Shape Adjustment Layer" in the comp.
Name Type Default Description comp
CompItem DuAEProject.getActiveComp optional The comp where to create the layer Returns:
Type Description ShapeLayer The adjustment layer -
staticDuAEComp.addNull(comp, size, layer){ShapeLayer}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 25975 -
Creates a new "Shape Null" in the comp.
Name Type Default Description comp
CompItem DuAEProject.getActiveComp optional The comp where to create the layer size
float 100 optional The size of the null layer
Layer optional A layer for the location of the null Returns:
Type Description ShapeLayer The null layer -
staticDuAEComp.addShape(shape, color, comp){ShapeLayer}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 26082 -
Creates a new Shape Layer in the comp.
Name Type Default Description shape
DuAEShapeLayer.Primitive DuAEShapeLayer.Primitive.NONE optional The shape color
DuColor DuColor.Color.RAINBOX_RED optional The color of the shape comp
CompItem DuAEProject.getActiveComp optional The comp where to create the layer Returns:
Type Description ShapeLayer The adjustment layer -
staticDuAEComp.addSolid(color, comp){ShapeLayer}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 26053 -
Creates a new "Solid Adjustment Layer" in the comp.
Name Type Default Description color
DuColor DuColor.Color.RAINBOX_RED optional The color of the solid comp
CompItem DuAEProject.getActiveComp optional The comp where to create the layer Returns:
Type Description ShapeLayer The adjustment layer -
staticDuAEComp.bake(mode, frameStep, comp)
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 26238 -
Bakes the expressions to keyframes and removes all non-renderable layers.
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. comp
CompItem optional The composition. The active composition by default. -
staticDuAEComp.bakeExpressions(mode, frameStep, comp)
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 26225 -
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. comp
CompItem optional The composition. The active composition by default. -
staticDuAEComp.camera(layers){CameraLayer|null}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 26172 -
Gets the camera in the comp, in the given layers if possible.
Name Type Description layers
Array.<Layer> | DuList.<Layer> optional Some layers to find the camera first. Selected layers if omitted. Returns:
Type Description CameraLayer | null The camera if it was found. -
staticDuAEComp.checkLayerNames(comp){Object}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 25942 -
Checks if all layers have a different name.
Name Type Default Description comp
CompItem DuAEProject.getActiveComp optional The comp to check 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 layers with that name. Example
var dupes = DuAEComp.checkLayerNames(); if (dupes.length != 0) { for (name in dupes) { if (dupes.hasOwnProperty(name)) alert(dupes[name]); //dupes[name] is an array of Layer } }
-
staticDuAEComp.crop(bounds, comp)
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 26202 -
Crops a composition
Name Type Description bounds
Array.<float> The bounds [top, left, width, height] comp
CompItem optional The composition. The active composition by default. -
staticDuAEComp.doLayers(method, comp, reverse)
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 25641 -
Runs a function on all the layers
Name Type Default Description method
function The function to run on the layers, which takes a layer as its only argument. comp
CompItem optional The comp containing the layers. Will use the current comp if not provided. reverse
Bool false optional Set this to true to iterate from the end. -
staticDuAEComp.framesToTime(frames, comp){float}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 25417 -
Converts the number of frames to the time in seconds
Name Type Default Description frames
int The frames comp
CompItem DuAEProject.getActiveComp optional The comp Returns:
Type Description float The time, in seconds -
staticDuAEComp.getActiveLayer(){Layer|null}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 25630 -
Gets the first selected layer in the After Effects current composition
Returns:
Type Description Layer | null The layer or null if there's no current comp / no selected layer -
staticDuAEComp.getAnimatedProps(filter, strict, caseSensitive, selectedLayersOnly, comp){Array.<DuAEProperty>}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 25660 -
Gets the After Effects animated (with keyframes) properties in the current comp
Name Type 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 false optional If a string filter is provided, whether to search for the exact name/matchName or if it contains the filter. caseSensitive
boolean true optional If a string filter is provided, and not strict is false, does the search have to be case sensitive? selectedLayersOnly
boolean false optional True to get the properties on the selected layers only comp
CompItem DuAEProject.getActiveComp optional The composition Returns:
Type Description Array.<DuAEProperty> The selected properties, an empty Array if nothing active or selected -
staticDuAEComp.getAudioLayers(comp, audioActiveOnly){Array.<AVLayer>}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 25893 -
Gets all the layers with audio in the composition
Name Type Default Description comp
CompItem The composition where the audio will be searched audioActiveOnly
bool false optional If true, does not get muted layers. Returns:
Type Description Array.<AVLayer> An array of AVLayer containing the audio layers -
staticDuAEComp.getParentComps(item){Array.<CompItem>}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 25877 -
Recursively gets all compositions where this item is used
Name Type Description item
AVItem The item Returns:
Type Description Array.<CompItem> The compositions -
staticDuAEComp.getPrecomps(comp, recursive){DuList.<CompItem>}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 25854 -
Gets all the precomposition found in the comp.
Name Type Default Description comp
CompItem optional The composition. The active composition if ommitted. recursive
bool false optional True to get nested compositions Returns:
Type Description DuList.<CompItem> The precompositions -
staticDuAEComp.getRelatives(comp, recursive){Array.<CompItem>}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 25831 -
Gets all precomps and parent comps of the composition
Name Type Default Description comp
CompItem DuAEProject.getActiveComp() optional The composition recursive
bool false optional True to search to more than one level of precomposition Returns:
Type Description Array.<CompItem> The related compositons -
staticDuAEComp.getSelectedLayers(){Array.<Layer>}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 25620 -
Gets the selected layers in the current comp
Returns:
Type Description Array.<Layer> The selected layers -
staticDuAEComp.getSelectedProperty(comp){DuAEProperty|null}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 25599 -
Gets the first selected property (which is not a group)
Name Type Description comp
CompItem optional The comnposition. The active composition by default. Returns:
Type Description DuAEProperty | null The selected property. -
staticDuAEComp.getSelectedProps(filter, strict, caseSensitive){Array.<DuAEProperty>}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 25570 -
Gets the After Effects selected properties in the current comp
Name Type 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 false optional If a string filter is provided, whether to search for the exact name/matchName or if it contains the filter. caseSensitive
boolean true optional If a string filter is provided, and not strict is false, does the search have to be case sensitive? Returns:
Type Description Array.<DuAEProperty> The selected properties, an empty Array if nothing active or selected -
staticDuAEComp.newUniqueLayerName(newName, comp, increment){string}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 25739 -
Generates a new unique name for a layer
Name Type Default Description newName
string The wanted new name comp
CompItem optional 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. -
staticDuAEComp.newUniqueMarkerName(newName, comp, increment){string}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 25785 -
Generates a new unique name for a marker for this comp
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. -
staticDuAEComp.numMasterProperties(comp){int}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 25914 -
Gets the total number of master properties used on precompositions in the comp.
Name Type Default Description comp
CompItem DuAEProject.getActiveComp optional The composition to check Returns:
Type Description int The number of master properties -
staticDuAEComp.parentAllOrphans(layer, includeLockedLayers)
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 25811 -
Links all orphan layers in the comp to a layer
Name Type Default Description layer
Layer The parent layer includeLockedLayers
bool false optional True to parent layers even if they are locked -
staticDuAEComp.removeCompInExpressions(selectionMode)
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 25484 -
Replace all
comp("name")
occurences bythisComp
.Name Type Default Description selectionMode
DuAE.SelectionMode DuAE.ACTIVE_COMPOSITION optional The comp(s)/layers/properties to use. -
staticDuAEComp.removeLayerInExpressions(selectionMode)
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 25514 -
Replace all
comp("name")
occurences bythisComp
.Name Type Default Description selectionMode
DuAE.SelectionMode DuAE.ACTIVE_COMPOSITION optional The comp(s)/layers/properties to use. -
staticDuAEComp.removeThisCompInExpressions(selectionMode)
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 25469 -
Replace all
thisComp
occurences bycomp("name")
.Name Type Default Description selectionMode
DuAE.SelectionMode DuAE.ACTIVE_COMPOSITION optional The comp(s)/layers/properties to use. -
staticDuAEComp.removeThisLayerInExpressions(selectionMode)
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 25499 -
Replace all
thisLayer
occurences bylayer("name")
.Name Type Default Description selectionMode
DuAE.SelectionMode DuAE.ACTIVE_COMPOSITION optional The comp(s)/layers/properties to use. -
staticDuAEComp.replaceInExpressions(oldString, newString, caseSensitive, selectedLayers, comp)
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 25446 -
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 selectedLayers
boolean false optional Set to true to cache only selected layers. comp
CompItem DuAEProject.getActiveComp() optional The comp with expressions to cache. -
staticDuAEComp.selectLayers(layers)
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 25724 -
Selects the layers
Name Type Description layers
Array.<Layer> | DuList.<Layer> The layers -
staticDuAEComp.setUniqueCompName(comp){string}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 25530 -
Makes sure the composition has a unique name, renaming it if needed.
Name Type Description comp
CompItem The composition Returns:
Type Description string The new name. -
staticDuAEComp.setUniqueLayerNames(layers, comp)
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 25545 -
Makes sure all layers in the comp have unique names, renaming them if needed.
Name Type Default Description layers
Array | LayerCollection comp.layers optional The layers comp
CompItem DuAEProject.getActiveComp optional The composition -
staticDuAEComp.thumbnail(file, maxRes, time, comp){Boolean}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 26143 -
Saves a thumbnail of the comp to a PNG file
Name Type Default Description file
File The file to save the thumbnail maxRes
Array.<int> [500,500] optional The maximum resolution of the thumbnail, which will be smaller than that, but not exactly this size. time
float optional The time at which to grab the picture. If omitted, will use the current time. comp
CompItem DuAEProject.getActiveComp() optional The composition Returns:
Type Description Boolean True on success, false otherwise. -
staticDuAEComp.timeToFrames(time, comp){int}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 25430 -
Converts the time in seconds to the number of frames
Name Type Default Description time
float comp.time optional The time in seconds comp
CompItem DuAEProject.getActiveComp optional The comp Returns:
Type Description int The number of frames, rounded -
staticDuAEComp.unselectLayers(comp){Array.<Layer>}
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 25699 -
Deselects all layers in a composition
Name Type Default Description comp
CompItem app.project.activeItem optional The composition Returns:
Type Description 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 DuAEProperty objects -
staticDuAEComp.unselectProperties()
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 25684 -
Deselects all properties in the current composition
-
staticDuAEComp.updateSettings(settings, updatePrecomps, comps)
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 26261 -
Updates the composition settings
Name Type Default Description settings
Object The settings to update. updatePrecomps
bool true optional Set to false to update only the selected/current comp comps
Array.<CompItem> optional The compositions to update. If omitted, will update either the selected items in the project or the current composition