Adobe 12040118 Using Help - Page 173

Shape closed attribute, Shape inTangents attribute

Page 173 highlights

Help Using Help Reference Back 173 Shape closed attribute app.project.item(index).layer(index).property(1).property(index).property("maskShape").value.closed Description This attribute specifies whether the shape is a closed curve. If true, the first and last vertices will be connected to form a closed curve. If false, the closing segment will not be drawn. Type Boolean; read/write. Shape inTangents attribute app.projec t . i te m (i n d ex ). l ay er(i n d e x ) . p rop e r t y ( 1 ) . p rop e r t y ( i n d e x ) . p rop e r t y( " m a s k S h a p e " ) . v a lu e . i n Ta n gents Description This attribute describes an array of float pairs specifying the tangent vectors (direction handles) associated with the vertices of the shape. Each float pair specifies one inTangent. There is one inTangent and one outTangent associated with each vertex in the vertices array. However, when creating a shape to set as a keyframe value, you may leave inTangent and/or outTangent null, or you may leave entries unfilled; they will be automatically padded with zeroes. This will result in straight line segments in the non-RotoBezier case; in the RotoBezier case the zeros will be ignored and the inTangents/outTangents will be automatically calculated. Each vertex on the shape has two direction handles. The inTangent is the direction handle associated with the line segment 'coming into' the vertex from the preceding vertex in the shape. The inTangents are x,y coordinates specified relative to the associated vertex. For example, an inTangent of [1,-1] is located above and to the left of the vertex and has a 45 degree slope, regardless of the actual location of the vertex. The longer a handle is, the greater an influence it has, so an incoming shape segment will hug the tangent vector closer for an inTangent of [-2,-2] than it will for an inTangent of [-1,-1], even though both of these come toward the vertex from the same direction. If a shape is not closed, the inTangent for the first vertex and the outTangent for the final vertex will be ignored. These two vectors would otherwise specify the dirction handles of the final connecting segment out of the final vertex and back into the first vertex. Note that if a shape is used in a mask with Rotobeziers, then the tangent values will be ignored on write (i.e., ignored when you set the new shape), because RotoBezier masks calculate their tangents automatically. This means that, for RotoBezier masks, you can construct a shape by setting only the vertices attribute and setting inTangents and outTangents both to null. If you set the shape without tangents, then follow this by getting the shape once again; the new shape's tangent values will be filled with the automatically-calculated tangent values. Type Array of floating-point pairs; read/write. Shape outTangents attribute app.projec t . i te m (i n d ex ). l ay er(i n d e x ) . p rop e r t y ( 1 ) . p rop e r t y ( i n d e x ) .proper t y("maskShape").value.outTangents Using Help Back 173

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204
  • 205
  • 206
  • 207
  • 208
  • 209
  • 210
  • 211
  • 212
  • 213
  • 214
  • 215
  • 216
  • 217
  • 218
  • 219
  • 220
  • 221
  • 222
  • 223
  • 224
  • 225
  • 226
  • 227
  • 228
  • 229
  • 230
  • 231
  • 232
  • 233
  • 234
  • 235
  • 236
  • 237
  • 238
  • 239
  • 240
  • 241
  • 242
  • 243
  • 244
  • 245
  • 246
  • 247
  • 248
  • 249
  • 250
  • 251
  • 252
  • 253

U
sing H
elp
B
ack
173
Help
Reference
U
sing H
elp
B
ack
173
Shape closed attribute
app.project.item(index).layer(index).property(1).property(index)
.property("maskShape").value.closed
Description
This attribute specifies whether the shape is a closed curve. If true, the first and last vertices will be connected
to form a closed curve. If false, the closing segment will not be drawn.
Type
Boolean; read/write.
Shape inTangents attribute
app.project.item(index).layer(index).property(1).property(index)
.property("maskShape").value.inTan-
gents
Description
This attribute describes an array of float pairs specifying the tangent vectors (direction handles) associated
with the vertices of the shape.
Each float pair specifies one inTangent. There is one inTangent and one outTangent associated with each
vertex in the vertices array. However, when creating a shape to set as a keyframe value, you may leave inTangent
and/or outTangent null, or you may leave entries unfilled; they will be automatically padded with zeroes. This
will result in straight line segments in the non-RotoBezier case; in the RotoBezier case the zeros will be ignored
and the inTangents/outTangents will be automatically calculated.
Each vertex on the shape has two direction handles. The inTangent is the direction handle associated with the
line segment 'coming into' the vertex from the preceding vertex in the shape.
The inTangents are
x,y
coordinates specified relative to the associated vertex. For example, an inTangent of [-
1,-1] is located above and to the left of the vertex and has a 45 degree slope, regardless of the actual location
of the vertex. The longer a handle is, the greater an influence it has, so an incoming shape segment will hug
the tangent vector closer for an inTangent of [-2,-2] than it will for an inTangent of [-1,-1], even though both
of these come toward the vertex from the same direction.
If a shape is not closed, the inTangent for the first vertex and the outTangent for the final vertex will be ignored.
These two vectors would otherwise specify the dirction handles of the final connecting segment out of the final
vertex and back into the first vertex.
Note that if a shape is used in a mask with Rotobeziers, then the tangent values will be ignored on write (i.e.,
ignored when you set the new shape), because RotoBezier masks calculate their tangents automatically. This
means that, for RotoBezier masks, you can construct a shape by setting only the vertices attribute and setting
inTangents and outTangents both to null. If you set the shape without tangents, then follow this by getting the
shape once again; the new shape's tangent values will be filled with the automatically-calculated tangent
values.
Type
Array of floating-point pairs; read/write.
Shape outTangents attribute
app.project.item(index).layer(index).property(1).property(index)
.property("maskShape").value.outTan-
gents