Skip to content

ParametricMeshLayer object

app.project.item(index).layer(index)

Note

This functionality was added in After Effects 26.3.

Description

The ParametricMeshLayer object represents a Parametric Mesh layer within a composition.

Info

ParametricMeshLayer is a subclass of AVLayer object. It inherits the following properties and property groups from AVLayer object:

  • Marker
  • Time Remap
  • Transform
    • Anchor Point
    • Position
    • Scale
    • Orientation
    • X Rotation
    • Y Rotation
    • Rotation
    • Opacity
  • Layer Styles
  • Audio
    • AudioLevels

Example

If the first item in the project is a CompItem, and the first layer of that CompItem is a ParametricMeshLayer, the following checks its type.

var layer = app.project.item(1).layer(1);
if (layer instanceof ParametricMeshLayer)
{
    // do something
}

Attributes

ParametricMeshLayer.canAddOrRemoveMaterialOverride

app.project.item(index).layer(index).canAddOrRemoveMaterialOverride

Warning

This functionality is in After Effects (Beta) 27.1 and is subject to change while it remains in Beta.

Description

This value is false for parametric mesh layers because their material override is always present and cannot be removed. The material source can still be changed with MaterialPropertyGroup.setMaterialOverride().

Type

Boolean; read-only.


ParametricMeshLayer.materialAssignment

app.project.item(index).layer(index).materialAssignment

Warning

This functionality is in After Effects (Beta) 27.1 and is subject to change while it remains in Beta.

Description

The layer's material assignment group. A ParametricMeshLayer has one material assignment, accessible with MaterialAssignment.DEFAULT.

The assignment's material properties depend on its source. The default material exposes properties such as Base Color and Roughness. Substance and layer sources expose texture transform properties. Uniform Tiling and Randomize Offset are not available on parametric mesh layers.

Type

MaterialAssignmentPropertyGroup object; read-only.


ParametricMeshLayer.materialAssignmentCount

app.project.item(index).layer(index).materialAssignmentCount

Warning

This functionality is in After Effects (Beta) 27.1 and is subject to change while it remains in Beta.

Description

The total number of material assignments on the layer, including assignments whose material override has not been added. A ParametricMeshLayer has one material assignment. This value is the same as materialAssignment.numProperties.

Type

Integer; read-only.


ParametricMeshLayer.parametricMeshType

app.project.item(index).layer(index).parametricMeshType

Note

This functionality was added in After Effects 26.3.

Description

For a parametric mesh layer, its mesh type. Trying to set this attribute for a non-parametric mesh layer produces an error.

Type

A ParametricMeshType enumerated value; read/write. One of:

  • ParametricMeshType.SPHERE
  • ParametricMeshType.PLANE
  • ParametricMeshType.CYLINDER
  • ParametricMeshType.CONE
  • ParametricMeshType.TORUS
  • ParametricMeshType.CUBE

ParametricMeshLayer.parametricMeshOptions

app.project.item(index).layer(index).parametricMeshOptions

Note

This functionality was added in After Effects 26.3.

Description

Gets/sets details about the structure of the parametric mesh.

Type

ParametricMeshOptions based on the ParametricMeshType of the layer, as follows.

For ParametricMeshType.CUBE

  • parametricMeshOptions.width
  • parametricMeshOptions.height
  • parametricMeshOptions.depth
  • parametricMeshOptions.smoothingAngle

For ParametricMeshType.SPHERE

  • parametricMeshOptions.radius
  • parametricMeshOptions.sides
  • parametricMeshOptions.sliceCaps
  • parametricMeshOptions.sliceStart
  • parametricMeshOptions.sliceEnd
  • parametricMeshOptions.smoothingAngle

For ParametricMeshType.PLANE

  • parametricMeshOptions.width
  • parametricMeshOptions.length
  • parametricMeshOptions.cornerRadius
  • parametricMeshOptions.cornerSides

For ParametricMeshType.TORUS

  • parametricMeshOptions.ringRadius
  • parametricMeshOptions.pipeRadius
  • parametricMeshOptions.ringSides
  • parametricMeshOptions.pipeSides
  • parametricMeshOptions.caps
  • parametricMeshOptions.sliceStart
  • parametricMeshOptions.sliceEnd
  • parametricMeshOptions.smoothingAngle

For ParametricMeshType.CONE

  • parametricMeshOptions.topRadius
  • parametricMeshOptions.bottomRadius
  • parametricMeshOptions.height
  • parametricMeshOptions.sides
  • parametricMeshOptions.topCap
  • parametricMeshOptions.bottomCap
  • parametricMeshOptions.sliceCaps
  • parametricMeshOptions.sliceStart
  • parametricMeshOptions.sliceEnd
  • parametricMeshOptions.smoothingAngle

For ParametricMeshType.CYLINDER

  • parametricMeshOptions.radius
  • parametricMeshOptions.height
  • parametricMeshOptions.sides
  • parametricMeshOptions.topCap
  • parametricMeshOptions.bottomCap
  • parametricMeshOptions.sliceCaps
  • parametricMeshOptions.sliceStart
  • parametricMeshOptions.sliceEnd
  • parametricMeshOptions.smoothingAngle

ParametricMeshLayer.parametricBevelOptions

app.project.item(index).layer(index).parametricBevelOptions

Note

This functionality was added in After Effects 26.3.

Description

Gets/sets details about the beveling of the parametric mesh.

Info

Only Parametric Mesh Layers with ParametricMeshType.CUBE, ParametricMeshType.CONE, and ParametricMeshType.CYLINDER have parametricBevelOptions.

Type

ParametricBevelOptions based on the ParametricMeshType of the layer, as follows.

For ParametricMeshType.CUBE

  • parametricBevelOptions.radius
  • parametricBevelOptions.sides

For ParametricMeshType.CONE

  • parametricBevelOptions.topRadius
  • parametricBevelOptions.topSides
  • parametricBevelOptions.bottomRadius
  • parametricBevelOptions.bottomSides

For ParametricMeshType.CYLINDER

  • parametricBevelOptions.radius
  • parametricBevelOptions.sides