|
| 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 | + |
0 commit comments