ShapeLayer
Properties
true, the layer's video is active at the current time.true if the layer is an adjustment layer.true if the layer's audio is active at the current time.true, the layer's audio is enabled.true if it is legal to change the value of the collapseTransformation attribute.true, you can set the enabled attribute value.true if it is legal to change the value of the timeRemapEnabled attribute.true if collapse transformation is on for this layer.true if the layer's effects are active.true, this property is a group used to organize other properties. The property is not displayed in the user interface.true if this is an environment layer in a Ray-traced 3D composition.true if frame blending is enabled for the layer.true if the layer is a guide layer.true if the layer contains an audio component.true if this layer has track matte.true, the layer has a video switch (the eyeball icon) in the Timeline panel; otherwise false.true, this property is an effect PropertyGroup.true, this property is a mask PropertyGroup.true, this property has been changed since its creation.true if the layer has no expressly set name, but contains a named source.true, rather than automatically from the source.true if this layer is being used as a track matte.true, the layer is locked; otherwise false.true if motion blur is enabled for the layer.true, the layer was created as a null object; otherwise false.null.null if this PropertyBase is a layer.true if preserve transparency is enabled for the layer.true, this property is selected. Set to true to select the property, or to false to deselect it.true, the layer is 'shy', meaning that it is hidden in the Layer panel if the composition's 'Hide all shy layers' option is toggled on.true, the layer is soloed, otherwise false.true if this is a 3D layer.true if this layer has the Enable Per-character 3D switch set.true if time remapping is enabled for this layer.Instance Methods
activeAtTime
Returns: boolean
Since: 27.0
Returns true if this layer will be active at the specified time.
Parameters
addGuide
Returns: number | undefined
Since: 27.0
Adds a guide to the layer's view and returns its index. There are two forms: addGuide(orientationType, position) - adds a pixel guide using an orientation and a pixel position. addGuide(guideOptions) - adds a guide described by a GuideOptions object, allowing percentage positioning, per-guide color, and pinning (After Effects 26.5 and later; calling this form in an earlier version raises an error).
Parameters
addProperty
Returns: PropertyGroup
Since: 27.0
Creates and returns a PropertyBase object with the specified name, and adds it to this group.
Parameters
addToMotionGraphicsTemplate
Returns: boolean
Since: 27.0
Adds the layer to the Essential Graphics Panel for the specified composition.
Parameters
addToMotionGraphicsTemplateAs
Returns: boolean
Since: 27.0
Adds the layer to the Essential Graphics Panel for the specified composition, using a custom name.
Parameters
addVariableFontAxis
Returns: Property
Since: 27.0
Creates and returns a Property object for a variable font axis, and adds it to this property group.
Parameters
wght, wdth, slnt, ital).applyPreset
Returns: boolean
Since: 27.0
Applies the specified collection of animation settings to all currently selected layers.
Parameters
audioActiveAtTime
Returns: boolean
Since: 27.0
Returns true if this layer's audio will be active at the specified time.
Parameters
calculateTransformFromPoints
Returns: { anchorPoint: number[]; position: number[]; xRotation: number; yRotation: number; zRotation: number; scale: number[] }
Since: 27.0
Calculates a transformation from a set of points in this layer. Given the layer-space coordinates of three corners of a rectangle - as if pinning the layer's untransformed bounds onto those points, the way you would match a flat layer to three points picked in a photographed scene - returns the anchorPoint, position, rotation, and scale that would produce that mapping.
Parameters
[x, y, z] layer-space coordinates to map to the top-left corner.[x, y, z] layer-space coordinates to map to the top-right corner.[x, y, z] layer-space coordinates to map to the bottom-left corner.canAddProperty
Returns: boolean
Since: 27.0
Returns true if a property with the given name can be added to this property group.
Parameters
canAddToMotionGraphicsTemplate
Returns: boolean
Since: 27.0
Test whether or not the layer can be added to the Essential Graphics Panel.
Parameters
compPointToSource
Returns: number[]
Since: 27.0
Converts composition coordinates to layer coordinates.
Parameters
[x, y, z] point in composition coordinates to convert.copyToComp
Returns: boolean
Since: 27.0
Copies the layer into the specified composition.
Parameters
doSceneEditDetection
Returns: number[]
Since: 27.0
Runs Scene Edit Detection on the layer and returns an array containing times of detected scenes.
Parameters
duplicate
Returns: ShapeLayer
Since: 27.0
Duplicates the layer. Creates a new Layer object with the same values.
getGuideAsObject
Returns: GuideOptions
Since: 27.0
Returns the guide at the specified index as a GuideOptions object.
Parameters
guides array.getRenderGUID
Returns: DeferredCall
Since: 27.0
Returns a DeferredCall that, once resolved, provides a unique identifier string representing the rendered state of the layer at the given time.
Parameters
true, enables tracing/diagnostic output for the render GUID computation.moveAfter
Returns: boolean
Since: 27.0
Moves this layer to a position immediately after (below) the specified layer.
Parameters
moveBefore
Returns: boolean
Since: 27.0
Moves this layer to a position immediately before (above) the specified layer.
Parameters
moveTo
Returns: boolean
Since: 27.0
Moves this property to a new position in its parent property group. Works as documented for children of indexed groups (effects, masks, motion trackers).
Parameters
moveToBeginning
Returns: boolean
Since: 27.0
Moves this layer to the topmost position of the layer stack.
moveToEnd
Returns: boolean
Since: 27.0
Moves this layer to the bottom position of the layer stack.
openInViewer
Returns: Viewer
Since: 27.0
Opens the layer in a Layer panel, and moves the Layer panel to front.
property
Returns: Property | PropertyGroup
Since: 27.0
Finds and returns a child property of this group, as specified by either its index or name. A name specification can use the same syntax that is available with expressions. mylayer.position, mylayer("position"), mylayer.property("position"), mylayer(1), and mylayer.property(1) are all equivalent. Some properties of a layer, such as position and zoom, can be accessed only by name. When using the name to find a property that is multiple levels down, you must make more than one call to this method - for example, myLayer.property("ADBE Masks").property(1) searches two levels down.
Parameters
propertyGroup
Returns: PropertyGroup
Since: 27.0
Gets the PropertyGroup object for an ancestor group of this property at a specified level of the parent-child hierarchy.
Parameters
remove
Returns: boolean
Since: 27.0
Deletes the specified layer from the composition.
removeGuide
Returns: boolean
Since: 27.0
Removes an existing guide by its index in the guides array.
Parameters
guides array.removeTrackMatte
Returns: boolean
Since: 27.0
Removes the track matte for this layer while preserving the TrackMatteType.
replaceSource
Returns: boolean
Since: 27.0
Replaces the source for this layer.
Parameters
true, updates expressions that reference the old source to reference the new one.savePreset
Returns: boolean
Since: 27.0
Saves the currently selected keyframes/properties of the layer as an animation preset (.ffx) file at the specified path. Returns false if nothing is selected to save.
Parameters
setGuide
Returns: void
Since: 27.0
Updates an existing guide. Two forms, distinguished by the type of the second argument: setGuide(position, guideIndex) moves the guide at guideIndex to a new pixel position (position first, index second); a guide's orientationType may not be changed after creation. setGuide(guideIndex, guideOptions) applies the properties set on a GuideOptions object to the guide at guideIndex as a partial update (After Effects 26.5 and later).
Parameters
setParentWithJump
Returns: boolean
Since: 27.0
Sets the parent without changing the transform values of the child layer.
Parameters
null to remove the parent.setTrackMatte
Returns: boolean
Since: 27.0
Sets the track matte layer and type for this layer.
Parameters
sourcePointToComp
Returns: number[]
Since: 27.0
Converts layer coordinates to composition coordinates.
Parameters
[x, y, z] point in layer coordinates to convert.sourceRectAtTime
Returns: { height: number; left: number; top: number; width: number }
Since: 27.0
Retrieves the rectangle bounds of the layer at the specified time index.
Parameters
true, includes extra render-time extents (e.g. blur/shadow bleed) in the returned rectangle.