Skip to content

Commit 5db964f

Browse files
Merge pull request #60 from yaoz48804/master
Add new script APIs for Parametric Mesh Layer
2 parents 36f25ae + f366c73 commit 5db964f

5 files changed

Lines changed: 209 additions & 4 deletions

File tree

‎docs/introduction/changelog.md‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,16 @@ What's new and changed for scripting?
1010

1111
## After Effects 26
1212

13-
### [After Effects 26.0](https://helpx.adobe.com/after-effects/using/whats-new.html) (January 2026)
13+
### [After Effects 26.3 Beta Build 58](https://community.adobe.com/announcements-532/new-in-beta-parametric-mesh-scripting-apis-1559505) (April 2026)
14+
15+
- Scripting methods and attributes added:
16+
- Added: [LayerCollection.addParametricMesh()](../layer/layercollection.md#layercollectionaddparametricmesh)
17+
- Added: [ParametricMeshLayer object](../layer/parametricmeshlayer.md)
18+
- Added: [ParametricMeshLayer.ParametricMeshType](../layer/parametricmeshlayer.md/#parametricmeshlayerparametricmeshtype)
19+
- Added: [ParametricMeshLayer.ParametricMeshOptions](../layer/parametricmeshlayer.md/#parametricmeshlayerparametricmeshoptions)
20+
- Added: [ParametricMeshLayer.ParametricBevelOptions](../layer/parametricmeshlayer.md#parametricmeshlayerparametricbeveloptions)
21+
22+
### [After Effects 26.0](https://helpx.adobe.com/after-effects/using/2026.html) (January 2026)
1423

1524
- Scripting methods and attributes added:
1625
- Added: [PropertyGroup.addVariableFontAxis()](../property/propertygroup.md#propertygroupaddvariablefontaxis)

‎docs/layer/layercollection.md‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,30 @@ Creates a new point text layer with [TextDocument.lineOrientation](../text/textd
259259

260260
---
261261

262+
### LayerCollection.addParametricMesh()
263+
264+
`app.project.item(index).layers.addParametricMesh(name, meshType)`
265+
266+
!!! note
267+
This functionality was added in After Effects (Beta) 26.3 and is subject to change while it remains in Beta.
268+
269+
#### Description
270+
271+
Creates a new parametric 3D mesh layer.
272+
273+
#### Parameters
274+
275+
| Parameter | Type | Description |
276+
| ------------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
277+
| `name` | String | The name of the new layer. |
278+
| `meshType` | [MeshType](parametricmeshlayer.md#parametricmeshlayerparametricmeshtype) | The mesh type of the new layer. |
279+
280+
#### Returns
281+
282+
[ParametricMeshLayer object](parametricmeshlayer.md).
283+
284+
---
285+
262286
### LayerCollection.byName()
263287

264288
`app.project.item(index).layers.byName(name)`

‎docs/layer/parametricmeshlayer.md‎

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
# ParametricMeshLayer object
2+
3+
`app.project.item(index).layer(index)`
4+
5+
!!! note
6+
This functionality was added in After Effects (Beta) 26.3 and is subject to change while it remains in Beta.
7+
8+
#### Description
9+
10+
The ParametricMeshLayer object represents a Parametric Mesh layer within a composition.
11+
12+
!!! info
13+
ParametricMeshLayer is a subclass of [AVLayer object](avlayer.md). It inherits the following properties and property groups from [AVLayer object](avlayer.md):
14+
15+
- Marker
16+
- Time Remap
17+
- Transform
18+
- Anchor Point
19+
- Position
20+
- Scale
21+
- Orientation
22+
- X Rotation
23+
- Y Rotation
24+
- Rotation
25+
- Opacity
26+
- Layer Styles
27+
- Audio
28+
- AudioLevels
29+
30+
#### Example
31+
32+
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.
33+
34+
```javascript
35+
var layer = app.project.item(1).layer(1);
36+
if (layer instanceof ParametricMeshLayer)
37+
{
38+
// do something
39+
}
40+
```
41+
42+
## Attributes
43+
44+
### ParametricMeshLayer.parametricMeshType
45+
46+
`app.project.item(index).layer(index).parametricMeshType`
47+
48+
!!! note
49+
This functionality was added in After Effects (Beta) 26.3 and is subject to change while it remains in Beta.
50+
51+
#### Description
52+
53+
For a parametric mesh layer, its mesh type. Trying to set this attribute for a non-parametric mesh layer produces an error.
54+
55+
#### Type
56+
57+
A `ParametricMeshType` enumerated value; read/write. One of:
58+
59+
- `ParametricMeshType.SPHERE`
60+
- `ParametricMeshType.PLANE`
61+
- `ParametricMeshType.CYLINDER`
62+
- `ParametricMeshType.CONE`
63+
- `ParametricMeshType.TORUS`
64+
- `ParametricMeshType.CUBE`
65+
66+
---
67+
68+
### ParametricMeshLayer.parametricMeshOptions
69+
70+
`app.project.item(index).layer(index).parametricMeshOptions`
71+
72+
!!! note
73+
This functionality was added in After Effects (Beta) 26.3 and is subject to change while it remains in Beta.
74+
75+
#### Description
76+
77+
Gets/sets details about the structure of the parametric mesh.
78+
79+
#### Type
80+
81+
`ParametricMeshOptions` based on the ParametricMeshType of the layer, as follows.
82+
83+
#### For ParametricMeshType.CUBE
84+
- `parametricMeshOptions.width`
85+
- `parametricMeshOptions.height`
86+
- `parametricMeshOptions.depth`
87+
- `parametricMeshOptions.smoothingAngle`
88+
89+
#### For ParametricMeshType.SPHERE
90+
- `parametricMeshOptions.radius`
91+
- `parametricMeshOptions.sides`
92+
- `parametricMeshOptions.sliceCaps`
93+
- `parametricMeshOptions.sliceStart`
94+
- `parametricMeshOptions.sliceEnd`
95+
- `parametricMeshOptions.smoothingAngle`
96+
97+
#### For ParametricMeshType.PLANE
98+
- `parametricMeshOptions.width`
99+
- `parametricMeshOptions.length`
100+
- `parametricMeshOptions.cornerRadius`
101+
- `parametricMeshOptions.cornerSides`
102+
103+
#### For ParametricMeshType.TORUS
104+
- `parametricMeshOptions.ringRadius`
105+
- `parametricMeshOptions.pipeRadius`
106+
- `parametricMeshOptions.ringSides`
107+
- `parametricMeshOptions.pipeSides`
108+
- `parametricMeshOptions.caps`
109+
- `parametricMeshOptions.sliceStart`
110+
- `parametricMeshOptions.sliceEnd`
111+
- `parametricMeshOptions.smoothingAngle`
112+
113+
#### For ParametricMeshType.CONE
114+
- `parametricMeshOptions.topRadius`
115+
- `parametricMeshOptions.bottomRadius`
116+
- `parametricMeshOptions.height`
117+
- `parametricMeshOptions.sides`
118+
- `parametricMeshOptions.topCap`
119+
- `parametricMeshOptions.bottomCap`
120+
- `parametricMeshOptions.sliceCaps`
121+
- `parametricMeshOptions.sliceStart`
122+
- `parametricMeshOptions.sliceEnd`
123+
- `parametricMeshOptions.smoothingAngle`
124+
125+
#### For ParametricMeshType.CYLINDER
126+
- `parametricMeshOptions.radius`
127+
- `parametricMeshOptions.height`
128+
- `parametricMeshOptions.sides`
129+
- `parametricMeshOptions.topCap`
130+
- `parametricMeshOptions.bottomCap`
131+
- `parametricMeshOptions.sliceCaps`
132+
- `parametricMeshOptions.sliceStart`
133+
- `parametricMeshOptions.sliceEnd`
134+
- `parametricMeshOptions.smoothingAngle`
135+
136+
---
137+
138+
### ParametricMeshLayer.parametricBevelOptions
139+
140+
`app.project.item(index).layer(index).parametricBevelOptions`
141+
142+
!!! note
143+
This functionality was added in After Effects (Beta) 26.3 and is subject to change while it remains in Beta.
144+
145+
#### Description
146+
147+
Gets/sets details about the beveling of the parametric mesh.
148+
149+
!!! info
150+
Only Parametric Mesh Layers with `ParametricMeshType.CUBE`, `ParametricMeshType.CONE`, and `ParametricMeshType.CYLINDER` have `parametricBevelOptions`.
151+
152+
#### Type
153+
154+
`ParametricBevelOptions` based on the ParametricMeshType of the layer, as follows.
155+
156+
#### For ParametricMeshType.CUBE
157+
- `parametricBevelOptions.radius`
158+
- `parametricBevelOptions.sides`
159+
160+
#### For ParametricMeshType.CONE
161+
- `parametricBevelOptions.topRadius`
162+
- `parametricBevelOptions.topSides`
163+
- `parametricBevelOptions.bottomRadius`
164+
- `parametricBevelOptions.bottomSides`
165+
166+
#### For ParametricMeshType.CYLINDER
167+
- `parametricBevelOptions.radius`
168+
- `parametricBevelOptions.sides`
169+
170+
---
171+

‎docs/renderqueue/renderqueue.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Gets a specified item from the ite ms collection.
117117

118118
#### Description
119119

120-
Pauses the current rendering process, or continues a paused rendering process. This is the same as clicking Pause in the Render Queue panel during a render. You can call this method from an [RenderQueueItem.onstatus](renderqueueitem.md#renderqueueitemonstatus) or [app.onError](../general/application.md#apponerror) callback.
120+
Pauses the current rendering process, or continues a paused rendering process. This is the same as clicking Pause in the Render Queue panel during a render. You can call this method from an [RenderQueueItem.onStatusChanged](renderqueueitem.md#renderqueueitemonstatuschanged) or [app.onError](../general/application.md#apponerror) callback.
121121

122122
#### Parameters
123123

@@ -140,7 +140,7 @@ Nothing.
140140
Starts the rendering process. This is the same as clicking Render in the Render Queue panel. The method does not return until the render process is complete. To pause or stop the rendering process, call [RenderQueue.pauseRendering()](#renderqueuepauserendering) or [RenderQueue.stopRendering()](#renderqueuestoprendering) from an `onError` or `onstatus` callback.
141141

142142
- To respond to errors during the rendering process, define a callback function in [app.onError](../general/application.md#apponerror).
143-
- To respond to changes in the status of a particular item while the render is progressing, define a callback function in [RenderQueueItem.onstatus](renderqueueitem.md#renderqueueitemonstatus) in the associated RenderQueueItem object.
143+
- To respond to changes in the status of a particular item while the render is progressing, define a callback function in [RenderQueueItem.onStatusChanged](renderqueueitem.md#renderqueueitemonstatuschanged) in the associated RenderQueueItem object.
144144

145145
#### Parameters
146146

@@ -178,7 +178,7 @@ Nothing.
178178

179179
#### Description
180180

181-
Stops the rendering process. This is the same as clicking Stop in the Render Queue panel during a render. You can call this method from an [RenderQueueItem.onstatus](renderqueueitem.md#renderqueueitemonstatus) or [app.onError](../general/application.md#apponerror) callback.
181+
Stops the rendering process. This is the same as clicking Stop in the Render Queue panel during a render. You can call this method from an [RenderQueueItem.onStatusChanged](renderqueueitem.md#renderqueueitemonstatuschanged) or [app.onError](../general/application.md#apponerror) callback.
182182

183183
#### Parameters
184184

‎mkdocs.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ nav:
3737
- ShapeLayer: layer/shapelayer.md
3838
- TextLayer: layer/textlayer.md
3939
- ThreeDModelLayer: layer/threedmodellayer.md
40+
- ParametricMeshLayer: layer/parametricmeshlayer.md
4041
- Property:
4142
- Property object: property/property.md
4243
- PropertyBase: property/propertybase.md

0 commit comments

Comments
 (0)