-
Notifications
You must be signed in to change notification settings - Fork 7
/
objects_layer.js.html
372 lines (315 loc) · 30 KB
/
objects_layer.js.html
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
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>objects/layer.js - Documentation</title>
<script src="scripts/prettify/prettify.js"></script>
<script src="scripts/prettify/lang-css.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
</head>
<body>
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
<div class="navicon"></div>
</label>
<label for="nav-trigger" class="overlay"></label>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="aeq.arrayEx.html">arrayEx</a><ul class='methods'><li data-type='method'><a href="aeq.arrayEx.html#.attr">attr</a></li><li data-type='method'><a href="aeq.arrayEx.html#.exists">exists</a></li><li data-type='method'><a href="aeq.arrayEx.html#.filter">filter</a></li><li data-type='method'><a href="aeq.arrayEx.html#.find">find</a></li><li data-type='method'><a href="aeq.arrayEx.html#.first">first</a></li><li data-type='method'><a href="aeq.arrayEx.html#.forEach">forEach</a></li><li data-type='method'><a href="aeq.arrayEx.html#.indexOf">indexOf</a></li><li data-type='method'><a href="aeq.arrayEx.html#.insertAt">insertAt</a></li><li data-type='method'><a href="aeq.arrayEx.html#.isTrueForAll">isTrueForAll</a></li><li data-type='method'><a href="aeq.arrayEx.html#.map">map</a></li><li data-type='method'><a href="aeq.arrayEx.html#.select">select</a></li></ul></li><li><a href="aeq.Comp_.html">Comp</a><ul class='methods'><li data-type='method'><a href="aeq.Comp_.html#forEachLayer">forEachLayer</a></li><li data-type='method'><a href="aeq.Comp_.html#get">get</a></li></ul></li><li><a href="aeq.Key.html">Key</a><ul class='methods'><li data-type='method'><a href="aeq.Key.html#copyTo">copyTo</a></li><li data-type='method'><a href="aeq.Key.html#getKeyinfo">getKeyinfo</a></li><li data-type='method'><a href="aeq.Key.html#getTime">getTime</a></li><li data-type='method'><a href="aeq.Key.html#interpolationType">interpolationType</a></li><li data-type='method'><a href="aeq.Key.html#moveTo">moveTo</a></li><li data-type='method'><a href="aeq.Key.html#remove">remove</a></li><li data-type='method'><a href="aeq.Key.html#spatialTangent">spatialTangent</a></li><li data-type='method'><a href="aeq.Key.html#temporalEase">temporalEase</a></li><li data-type='method'><a href="aeq.Key.html#time">time</a></li><li data-type='method'><a href="aeq.Key.html#valueTypeIs">valueTypeIs</a></li></ul></li><li><a href="aeq.Layer_.html">Layer</a><ul class='methods'><li data-type='method'><a href="aeq.Layer_.html#addEffect">addEffect</a></li><li data-type='method'><a href="aeq.Layer_.html#allChildren">allChildren</a></li><li data-type='method'><a href="aeq.Layer_.html#children">children</a></li><li data-type='method'><a href="aeq.Layer_.html#copyToComp">copyToComp</a></li><li data-type='method'><a href="aeq.Layer_.html#forEachEffect">forEachEffect</a></li><li data-type='method'><a href="aeq.Layer_.html#get">get</a></li><li data-type='method'><a href="aeq.Layer_.html#parent">parent</a></li><li data-type='method'><a href="aeq.Layer_.html#parents">parents</a></li><li data-type='method'><a href="aeq.Layer_.html#relatedLayers">relatedLayers</a></li><li data-type='method'><a href="aeq.Layer_.html#removeParent">removeParent</a></li></ul></li><li><a href="aeq.Property_.html">Property</a><ul class='methods'><li data-type='method'><a href="aeq.Property_.html#addKey">addKey</a></li><li data-type='method'><a href="aeq.Property_.html#expression">expression</a></li><li data-type='method'><a href="aeq.Property_.html#forEachKey">forEachKey</a></li><li data-type='method'><a href="aeq.Property_.html#get">get</a></li><li data-type='method'><a href="aeq.Property_.html#key">key</a></li><li data-type='method'><a href="aeq.Property_.html#maxValue">maxValue</a></li><li data-type='method'><a href="aeq.Property_.html#minValue">minValue</a></li><li data-type='method'><a href="aeq.Property_.html#nearestKeyIndex">nearestKeyIndex</a></li><li data-type='method'><a href="aeq.Property_.html#removeKey">removeKey</a></li><li data-type='method'><a href="aeq.Property_.html#selectedKeys">selectedKeys</a></li><li data-type='method'><a href="aeq.Property_.html#separationDimension">separationDimension</a></li><li data-type='method'><a href="aeq.Property_.html#separationFollower">separationFollower</a></li><li data-type='method'><a href="aeq.Property_.html#separationLeader">separationLeader</a></li><li data-type='method'><a href="aeq.Property_.html#value">value</a></li><li data-type='method'><a href="aeq.Property_.html#valueAtTime">valueAtTime</a></li><li data-type='method'><a href="aeq.Property_.html#valuesAtTimes">valuesAtTimes</a></li></ul></li><li><a href="aeq.ui.Container.html">ui.Container</a><ul class='methods'><li data-type='method'><a href="aeq.ui.Container.html#.addButton">addButton</a></li><li data-type='method'><a href="aeq.ui.Container.html#.addCheckbox">addCheckbox</a></li><li data-type='method'><a href="aeq.ui.Container.html#.addDropdownList">addDropdownList</a></li><li data-type='method'><a href="aeq.ui.Container.html#.addEditText">addEditText</a></li><li data-type='method'><a href="aeq.ui.Container.html#.addGroup">addGroup</a></li><li data-type='method'><a href="aeq.ui.Container.html#.addIconButton">addIconButton</a></li><li data-type='method'><a href="aeq.ui.Container.html#.addImage">addImage</a></li><li data-type='method'><a href="aeq.ui.Container.html#.addListBox">addListBox</a></li><li data-type='method'><a href="aeq.ui.Container.html#.addPanel">addPanel</a></li><li data-type='method'><a href="aeq.ui.Container.html#.addProgressbar">addProgressbar</a></li><li data-type='method'><a href="aeq.ui.Container.html#.addRadioButton">addRadioButton</a></li><li data-type='method'><a href="aeq.ui.Container.html#.addScrollbar">addScrollbar</a></li><li data-type='method'><a href="aeq.ui.Container.html#.addSlider">addSlider</a></li><li data-type='method'><a href="aeq.ui.Container.html#.addStaticText">addStaticText</a></li><li data-type='method'><a href="aeq.ui.Container.html#.addTab">addTab</a></li><li data-type='method'><a href="aeq.ui.Container.html#.addTabbedPanel">addTabbedPanel</a></li><li data-type='method'><a href="aeq.ui.Container.html#.addTreeView">addTreeView</a></li><li data-type='method'><a href="aeq.ui.Container.html#.get">get</a></li><li data-type='method'><a href="aeq.ui.Container.html#.remove">remove</a></li><li data-type='method'><a href="aeq.ui.Container.html#.removeAll">removeAll</a></li><li data-type='method'><a href="aeq.ui.Container.html#.removeChildren">removeChildren</a></li><li data-type='method'><a href="aeq.ui.Container.html#.set">set</a></li><li data-type='method'><a href="aeq.ui.Container.html#.update">update</a></li></ul></li><li><a href="aeq.ui.Window.html">ui.Window</a><ul class='methods'><li data-type='method'><a href="aeq.ui.Window.html#.ui.Window#close">ui.Window#close</a></li><li data-type='method'><a href="aeq.ui.Window.html#.ui.Window#hide">ui.Window#hide</a></li><li data-type='method'><a href="aeq.ui.Window.html#.ui.Window#layout">ui.Window#layout</a></li><li data-type='method'><a href="aeq.ui.Window.html#.ui.Window#show">ui.Window#show</a></li></ul></li></ul><h3>Namespaces</h3><ul><li><a href="aeq.html">aeq</a><ul class='methods'><li data-type='method'><a href="aeq.html#.assertIsEmpty">assertIsEmpty</a></li><li data-type='method'><a href="aeq.html#.assertIsFalse">assertIsFalse</a></li><li data-type='method'><a href="aeq.html#.assertIsNotEmpty">assertIsNotEmpty</a></li><li data-type='method'><a href="aeq.html#.assertIsNotNull">assertIsNotNull</a></li><li data-type='method'><a href="aeq.html#.assertIsNull">assertIsNull</a></li><li data-type='method'><a href="aeq.html#.assertIsTrue">assertIsTrue</a></li><li data-type='method'><a href="aeq.html#.attr">attr</a></li><li data-type='method'><a href="aeq.html#.createResourceFiles">createResourceFiles</a></li><li data-type='method'><a href="aeq.html#.createUndoGroup">createUndoGroup</a></li><li data-type='method'><a href="aeq.html#.error">error</a></li><li data-type='method'><a href="aeq.html#.extend">extend</a></li><li data-type='method'><a href="aeq.html#.filter">filter</a></li><li data-type='method'><a href="aeq.html#.forEach">forEach</a></li><li data-type='method'><a href="aeq.html#.forEachComp">forEachComp</a></li><li data-type='method'><a href="aeq.html#.forEachComposition">forEachComposition</a></li><li data-type='method'><a href="aeq.html#.forEachEffect">forEachEffect</a></li><li data-type='method'><a href="aeq.html#.forEachItem">forEachItem</a></li><li data-type='method'><a href="aeq.html#.forEachLayer">forEachLayer</a></li><li data-type='method'><a href="aeq.html#.forEachOM">forEachOM</a></li><li data-type='method'><a href="aeq.html#.forEachOutputModule">forEachOutputModule</a></li><li data-type='method'><a href="aeq.html#.forEachProp">forEachProp</a></li><li data-type='method'><a href="aeq.html#.forEachProperty">forEachProperty</a></li><li data-type='method'><a href="aeq.html#.forEachRenderQueueItem">forEachRenderQueueItem</a></li><li data-type='method'><a href="aeq.html#.forEachRQItem">forEachRQItem</a></li><li data-type='method'><a href="aeq.html#.framesToTime">framesToTime</a></li><li data-type='method'><a href="aeq.html#.getActiveComp">getActiveComp</a></li><li data-type='method'><a href="aeq.html#.getActiveComposition">getActiveComposition</a></li><li data-type='method'><a href="aeq.html#.getBinaryString">getBinaryString</a></li><li data-type='method'><a href="aeq.html#.getComp">getComp</a></li><li data-type='method'><a href="aeq.html#.getComposition">getComposition</a></li><li data-type='method'><a href="aeq.html#.getCompositions">getCompositions</a></li><li data-type='method'><a href="aeq.html#.getComps">getComps</a></li><li data-type='method'><a href="aeq.html#.getEffects">getEffects</a></li><li data-type='method'><a href="aeq.html#.getFileObject">getFileObject</a></li><li data-type='method'><a href="aeq.html#.getFolderObject">getFolderObject</a></li><li data-type='method'><a href="aeq.html#.getItemInComps">getItemInComps</a></li><li data-type='method'><a href="aeq.html#.getItems">getItems</a></li><li data-type='method'><a href="aeq.html#.getKeys">getKeys</a></li><li data-type='method'><a href="aeq.html#.getLayers">getLayers</a></li><li data-type='method'><a href="aeq.html#.getMarkerGroup">getMarkerGroup</a></li><li data-type='method'><a href="aeq.html#.getModifiers">getModifiers</a></li><li data-type='method'><a href="aeq.html#.getProperties">getProperties</a></li><li data-type='method'><a href="aeq.html#.getPropertyChildren">getPropertyChildren</a></li><li data-type='method'><a href="aeq.html#.getSelectedLayers">getSelectedLayers</a></li><li data-type='method'><a href="aeq.html#.getSelectedLayersOrAll">getSelectedLayersOrAll</a></li><li data-type='method'><a href="aeq.html#.getSelectedOrAllLayers">getSelectedOrAllLayers</a></li><li data-type='method'><a href="aeq.html#.getSelectedProperties">getSelectedProperties</a></li><li data-type='method'><a href="aeq.html#.getSelectedProps">getSelectedProps</a></li><li data-type='method'><a href="aeq.html#.getSystemInfo">getSystemInfo</a></li><li data-type='method'><a href="aeq.html#.isAeq">isAeq</a></li><li data-type='method'><a href="aeq.html#.isApp">isApp</a></li><li data-type='method'><a href="aeq.html#.isArr">isArr</a></li><li data-type='method'><a href="aeq.html#.isArray">isArray</a></li><li data-type='method'><a href="aeq.html#.isAVLayer">isAVLayer</a></li><li data-type='method'><a href="aeq.html#.isBool">isBool</a></li><li data-type='method'><a href="aeq.html#.isBoolean">isBoolean</a></li><li data-type='method'><a href="aeq.html#.isCamera">isCamera</a></li><li data-type='method'><a href="aeq.html#.isCameraLayer">isCameraLayer</a></li><li data-type='method'><a href="aeq.html#.isComp">isComp</a></li><li data-type='method'><a href="aeq.html#.isComposition">isComposition</a></li><li data-type='method'><a href="aeq.html#.isDir">isDir</a></li><li data-type='method'><a href="aeq.html#.isEmpty">isEmpty</a></li><li data-type='method'><a href="aeq.html#.isFile">isFile</a></li><li data-type='method'><a href="aeq.html#.isFolder">isFolder</a></li><li data-type='method'><a href="aeq.html#.isFolderItem">isFolderItem</a></li><li data-type='method'><a href="aeq.html#.isFootageItem">isFootageItem</a></li><li data-type='method'><a href="aeq.html#.isFunc">isFunc</a></li><li data-type='method'><a href="aeq.html#.isFunction">isFunction</a></li><li data-type='method'><a href="aeq.html#.isLayer">isLayer</a></li><li data-type='method'><a href="aeq.html#.isLight">isLight</a></li><li data-type='method'><a href="aeq.html#.isLightLayer">isLightLayer</a></li><li data-type='method'><a href="aeq.html#.isNullOrUndefined">isNullOrUndefined</a></li><li data-type='method'><a href="aeq.html#.isNum">isNum</a></li><li data-type='method'><a href="aeq.html#.isNumber">isNumber</a></li><li data-type='method'><a href="aeq.html#.isObj">isObj</a></li><li data-type='method'><a href="aeq.html#.isObject">isObject</a></li><li data-type='method'><a href="aeq.html#.isPanel">isPanel</a></li><li data-type='method'><a href="aeq.html#.isPlainObject">isPlainObject</a></li><li data-type='method'><a href="aeq.html#.isPrecomp">isPrecomp</a></li><li data-type='method'><a href="aeq.html#.isProp">isProp</a></li><li data-type='method'><a href="aeq.html#.isProperty">isProperty</a></li><li data-type='method'><a href="aeq.html#.isPropertyGroup">isPropertyGroup</a></li><li data-type='method'><a href="aeq.html#.isShapeLayer">isShapeLayer</a></li><li data-type='method'><a href="aeq.html#.isStr">isStr</a></li><li data-type='method'><a href="aeq.html#.isString">isString</a></li><li data-type='method'><a href="aeq.html#.isTextLayer">isTextLayer</a></li><li data-type='method'><a href="aeq.html#.isWindow">isWindow</a></li><li data-type='method'><a href="aeq.html#.normalizeCollection">normalizeCollection</a></li><li data-type='method'><a href="aeq.html#.pasteKey">pasteKey</a></li><li data-type='method'><a href="aeq.html#.propertyType">propertyType</a></li><li data-type='method'><a href="aeq.html#.readFile">readFile</a></li><li data-type='method'><a href="aeq.html#.reflect">reflect</a></li><li data-type='method'><a href="aeq.html#.select">select</a></li><li data-type='method'><a href="aeq.html#.setDefault">setDefault</a></li><li data-type='method'><a href="aeq.html#.timeToFrames">timeToFrames</a></li><li data-type='method'><a href="aeq.html#.valueInObject">valueInObject</a></li><li data-type='method'><a href="aeq.html#.writeFile">writeFile</a></li></ul></li><li><a href="aeq.app.html">app</a><ul class='methods'><li data-type='method'><a href="aeq.app.html#.ensureSecurityPrefEnabled">ensureSecurityPrefEnabled</a></li><li data-type='method'><a href="aeq.app.html#.getAEP">getAEP</a></li><li data-type='method'><a href="aeq.app.html#.getAEPDir">getAEPDir</a></li><li data-type='method'><a href="aeq.app.html#.getAEPName">getAEPName</a></li><li data-type='method'><a href="aeq.app.html#.getPresetsPaths">getPresetsPaths</a></li><li data-type='method'><a href="aeq.app.html#.getScriptFile">getScriptFile</a></li><li data-type='method'><a href="aeq.app.html#.getUserDataFolder">getUserDataFolder</a></li><li data-type='method'><a href="aeq.app.html#.open">open</a></li><li data-type='method'><a href="aeq.app.html#.securityPrefEnabled">securityPrefEnabled</a></li></ul></li><li><a href="aeq.command.html">command</a><ul class='methods'><li data-type='method'><a href="aeq.command.html#.call">call</a></li><li data-type='method'><a href="aeq.command.html#.copyToClipboard">copyToClipboard</a></li><li data-type='method'><a href="aeq.command.html#.openURL">openURL</a></li><li data-type='method'><a href="aeq.command.html#.revealFile">revealFile</a></li></ul></li><li><a href="aeq.comp.html">comp</a><ul class='methods'><li data-type='method'><a href="aeq.comp.html#.create">create</a></li><li data-type='method'><a href="aeq.comp.html#.getCompInQueue">getCompInQueue</a></li><li data-type='method'><a href="aeq.comp.html#.isInQueue">isInQueue</a></li><li data-type='method'><a href="aeq.comp.html#.isQueued">isQueued</a></li></ul></li><li><a href="aeq.file.html">file</a><ul class='methods'><li data-type='method'><a href="aeq.file.html#.ensureFolderExists">ensureFolderExists</a></li><li data-type='method'><a href="aeq.file.html#.getExtension">getExtension</a></li><li data-type='method'><a href="aeq.file.html#.getFile">getFile</a></li><li data-type='method'><a href="aeq.file.html#.getFiles">getFiles</a></li><li data-type='method'><a href="aeq.file.html#.getFolder">getFolder</a></li><li data-type='method'><a href="aeq.file.html#.joinPath">joinPath</a></li><li data-type='method'><a href="aeq.file.html#.normalizePath">normalizePath</a></li><li data-type='method'><a href="aeq.file.html#.normalizePathArray">normalizePathArray</a></li><li data-type='method'><a href="aeq.file.html#.pathIsAbsolute">pathIsAbsolute</a></li><li data-type='method'><a href="aeq.file.html#.stripExtension">stripExtension</a></li></ul></li><li><a href="aeq.layer.html">layer</a><ul class='methods'><li data-type='method'><a href="aeq.layer.html#.allChildren">allChildren</a></li><li data-type='method'><a href="aeq.layer.html#.children">children</a></li><li data-type='method'><a href="aeq.layer.html#.parents">parents</a></li><li data-type='method'><a href="aeq.layer.html#.relatedLayers">relatedLayers</a></li><li data-type='method'><a href="aeq.layer.html#.setLayerToggles">setLayerToggles</a></li></ul></li><li><a href="aeq.project.html">project</a><ul class='methods'><li data-type='method'><a href="aeq.project.html#.findFolder">findFolder</a></li><li data-type='method'><a href="aeq.project.html#.getFolder">getFolder</a></li><li data-type='method'><a href="aeq.project.html#.getFolderOrRoot">getFolderOrRoot</a></li><li data-type='method'><a href="aeq.project.html#.getFolders">getFolders</a></li><li data-type='method'><a href="aeq.project.html#.getFootage">getFootage</a></li><li data-type='method'><a href="aeq.project.html#.getOrCreateFolder">getOrCreateFolder</a></li><li data-type='method'><a href="aeq.project.html#.getSelectedComps">getSelectedComps</a></li><li data-type='method'><a href="aeq.project.html#.getSelectedFolders">getSelectedFolders</a></li><li data-type='method'><a href="aeq.project.html#.getSelectedFootage">getSelectedFootage</a></li><li data-type='method'><a href="aeq.project.html#.importFile">importFile</a></li><li data-type='method'><a href="aeq.project.html#.importFiles">importFiles</a></li><li data-type='method'><a href="aeq.project.html#.importSequence">importSequence</a></li><li data-type='method'><a href="aeq.project.html#.moveToFolder">moveToFolder</a></li><li data-type='method'><a href="aeq.project.html#.quickSave">quickSave</a></li><li data-type='method'><a href="aeq.project.html#.reduceToQueuedComps">reduceToQueuedComps</a></li><li data-type='method'><a href="aeq.project.html#.save">save</a></li><li data-type='method'><a href="aeq.project.html#.simpleImportFile">simpleImportFile</a></li></ul></li><li><a href="aeq.property.html">property</a><ul class='methods'><li data-type='method'><a href="aeq.property.html#.getLayer">getLayer</a></li><li data-type='method'><a href="aeq.property.html#.type">type</a></li><li data-type='method'><a href="aeq.property.html#.valueType">valueType</a></li></ul></li><li><a href="aeq.renderqueue.html">renderqueue</a><ul class='methods'><li data-type='method'><a href="aeq.renderqueue.html#.clear">clear</a></li><li data-type='method'><a href="aeq.renderqueue.html#.ensureRenderPathExists">ensureRenderPathExists</a></li><li data-type='method'><a href="aeq.renderqueue.html#.getQueuedComps">getQueuedComps</a></li><li data-type='method'><a href="aeq.renderqueue.html#.getQueuedItems">getQueuedItems</a></li><li data-type='method'><a href="aeq.renderqueue.html#.getRQComps">getRQComps</a></li><li data-type='method'><a href="aeq.renderqueue.html#.getRQItems">getRQItems</a></li><li data-type='method'><a href="aeq.renderqueue.html#.getSettings">getSettings</a></li><li data-type='method'><a href="aeq.renderqueue.html#.isQueued">isQueued</a></li><li data-type='method'><a href="aeq.renderqueue.html#.omTemplateExists">omTemplateExists</a></li><li data-type='method'><a href="aeq.renderqueue.html#.queue">queue</a></li><li data-type='method'><a href="aeq.renderqueue.html#.rqTemplateExists">rqTemplateExists</a></li><li data-type='method'><a href="aeq.renderqueue.html#.unqueue_all">unqueue_all</a></li></ul></li><li><a href="aeq.settings.html">settings</a><ul class='methods'><li data-type='method'><a href="aeq.settings.html#.get">get</a></li><li data-type='method'><a href="aeq.settings.html#.getAsArray">getAsArray</a></li><li data-type='method'><a href="aeq.settings.html#.getAsBool">getAsBool</a></li><li data-type='method'><a href="aeq.settings.html#.getAsFloat">getAsFloat</a></li><li data-type='method'><a href="aeq.settings.html#.getAsInt">getAsInt</a></li><li data-type='method'><a href="aeq.settings.html#.have">have</a></li><li data-type='method'><a href="aeq.settings.html#.initSetting">initSetting</a></li><li data-type='method'><a href="aeq.settings.html#.save">save</a></li><li data-type='method'><a href="aeq.settings.html#.setting">setting</a></li><li data-type='method'><a href="aeq.settings.html#.unpack">unpack</a></li></ul></li><li><a href="aeq.snippet.html">snippet</a><ul class='methods'><li data-type='method'><a href="aeq.snippet.html#.activeComp">activeComp</a></li><li data-type='method'><a href="aeq.snippet.html#.forEachSelectedLayer">forEachSelectedLayer</a></li><li data-type='method'><a href="aeq.snippet.html#.forEachSelectedLayerOrAll">forEachSelectedLayerOrAll</a></li><li data-type='method'><a href="aeq.snippet.html#.forEachSelectedProperty">forEachSelectedProperty</a></li><li data-type='method'><a href="aeq.snippet.html#.selectedLayers">selectedLayers</a></li><li data-type='method'><a href="aeq.snippet.html#.selectedLayersOrAll">selectedLayersOrAll</a></li><li data-type='method'><a href="aeq.snippet.html#.selectedProperties">selectedProperties</a></li></ul></li><li><a href="aeq.ui.html">ui</a><ul class='methods'><li data-type='method'><a href="aeq.ui.html#.ui.createDialog">ui.createDialog</a></li><li data-type='method'><a href="aeq.ui.html#.ui.createMainWindow">ui.createMainWindow</a></li><li data-type='method'><a href="aeq.ui.html#.ui.createWindow">ui.createWindow</a></li><li data-type='method'><a href="aeq.ui.html#.ui.ready">ui.ready</a></li><li data-type='method'><a href="aeq.ui.html#.ui.set">ui.set</a></li></ul></li></ul><h3>Tutorials</h3><ul><li><a href="tutorial-Add motion blur to animated layers.html">Add motion blur to animated layers</a></li></ul><h3>Global</h3><ul><li><a href="global.html#aeq1">aeq</a></li><li><a href="global.html#getItemsDeep">getItemsDeep</a></li></ul>
</nav>
<div id="main">
<h1 class="page-title">objects/layer.js</h1>
<section>
<article>
<pre class="prettyprint source linenums"><code>var aeq = (function (aeq) {
/**
* Converts a Layer into an aeq.Layer object
* @memberof aeq
* @class
* @param {Layer} layer Layer to turn into aeq.Layer object
* @return {aeq.Layer} aeq.Layer object of Layer
*/
aeq.Layer = function (layer) {
if (layer instanceof aeq.Layer) {
return layer;
}
// Check if function called with "new" keyword
if (this instanceof aeq.Layer) {
this.layer = layer;
} else {
return new aeq.Layer(layer);
}
};
aeq.Layer.prototype = {
isAeq: true,
toString: function() {
return "[object aeq.Layer]";
},
// Function for extending the prototype using objects
extend: aeq.extend,
/**
* Get the original object
* @method
* @instance
* @return {Layer}
*/
get: function() {
return this.layer;
},
/**
* Gets or sets layer parent
* @method
* @instance
* @param {aeq.SelectorString|null} [selector] Selector for new parent, or null to remove parent
* @return {Layer|null} Parent layer, or null if none
*/
parent: function(selector) {
if (arguments.length === 0) {
return this.layer.parent;
}
// Pass in null to remove the parent
if (selector === null) {
this.layer.parent = null;
return null;
}
var layer = getLayer(this.layer, selector);
if (layer === null) {
return null;
}
this.layer.parent = layer;
return layer;
},
/**
* Copies current layer to comp
* @method
* @instance
* @param {CompItem|aeq.Comp} comp Comp to copy layer to
* @return {aeq.Layer} Newly copied layer
*/
copyToComp: function(comp) {
if (!aeq.isComp(comp)) {
if (comp instanceof aeq.Comp) {
comp = comp.comp;
} else if (aeq.isString(comp)) {
comp = aeq.getComp(comp);
}
}
this.layer.copyToComp(comp);
return this;
},
/**
* Removes this layer's parent
* @method
* @instance
* @return {aeq.Layer} This layer
*/
removeParent: function() {
this.layer.parent = null;
return this;
},
/**
* Executes a callback function on each effect on this layer
* @method
* @instance
* @param {Function} callback Function to run on each effect
* @return {aeq.Layer} This layer
*/
forEachEffect: function(callback) {
var effects = this.layer.property("ADBE Effect Parade"),
length = effects.numProperties, i = 1;
for ( ; i <= length; i++ ) {
callback(effects.property(i), i, effects);
}
return this;
},
/**
* Adds effect to layer by name or matchname
* @method
* @instance
* @param {string} effectName Effect name or matchname to add to layer
*/
addEffect: function(effectName) {
var effects = this.layer.property("ADBE Effect Parade");
if ( effects.canAddProperty( effectName ) ) {
effects.addProperty( effectName );
} else {
throw new Error( 'Can not add effect "' + effectName + '" to this layer' );
}
},
/**
* Gets all layers that has the given layer as its parent.
* @method
* @instance
* @return {Layer[]} Children of this layer
*/
children: function() {
return aeq.layer.children( this.layer );
},
/**
* Gets all layers that has the given layer as its parent, and all layers
* that has those layers, and so on.
* @method
* @instance
* @return {Layer[]} Children and decendants of this layer
*/
allChildren: function() {
return aeq.layer.allChildren( this.layer );
},
/**
* This layer's parent chain
* @method
* @instance
* @return {Layer[]} Parents of this layer
*/
parents: function() {
return aeq.layer.parents( this.layer );
},
/**
* All [parents]{@link aeq.layer.parents} and
* [all children]{@link aeq.layer.allChildren} of the this layer.
* @method
* @instance
* @return {Layer[]} The layer's parents and children.
*/
relatedLayers: function() {
return aeq.layer.relatedLayers( this.layer );
}
};
// Create methods that only returns the value for attributes that are read-
// only and can change over time;
aeq.forEach([
"active",
"index",
"isNameSet",
"selectedProperties",
"time",
"containingComp",
"hasVideo"
], function(attribute) {
aeq.Layer.prototype[attribute] = function() {
return this.layer[attribute];
};
});
// Create methods for attributes that are basic read/write
aeq.forEach([
"comment",
"enabled",
"inPoint",
"locked",
"name",
"outPoint",
"shy",
"solo",
"startTime",
"stretch"
], function(attribute) {
aeq.Layer.prototype[attribute] = function(newValue) {
if (arguments.length === 0) {
return this.layer[attribute];
}
this.layer[attribute] = newValue;
// Return the aeq.Layer object for chaining methods
return this;
};
});
// Create Methods that just call the layer object methods
aeq.forEach([
"activeAtTime",
"applyPreset",
"duplicate",
"remove",
"moveToBeginning",
"moveToEnd"
], function(method) {
aeq.Layer.prototype[method] = function(newValue) {
this.layer[method](newValue);
// Return the aeq.Layer object for chaining methods
return this;
};
});
// Create methods that can take a Layer, aeq.Layer, number or string as input
// and need to pass that to a method that takes a Layer object
aeq.forEach([
"setParentWithJump",
"moveAfter",
"moveBefore"
], function(method) {
aeq.Layer.prototype[method] = function(selector) {
var layer = getLayer(this.layer, selector);
if (layer === null) {
return null;
}
this.layer[method](layer);
return layer;
};
});
// Used in aeq.Layer.parent, setParentWithJump and move methods
var regexRelativeIndex = /^(\+|-)=/;
/* The selector argument can be one of the following:
* An aeq.Layer object
* A Layer object
* An index for a layer in the comp
* A string with a layer name
* A string starting with "+=" or "-=" then a number to indicate an index
* relative to the current layer
*/
function getLayer(baseLayer, selector) {
var index, offset;
// Set the value
if (selector instanceof aeq.Layer) {
return selector.layer;
}
if (aeq.isLayer(selector)) {
return selector;
}
// Set parent to layer with index
if (aeq.isNumber(selector)) {
return baseLayer.containingComp.layer(selector);
}
// Set parent to layer with name or with a relative index
if (aeq.isString(selector)) {
// Check if string starts with "+=" or "-="
if (regexRelativeIndex.test(selector)) {
offset = getRelativeIndex(selector);
if (offset) {
// Set parent to layer with index relative to this layer
index = baseLayer.index + offset;
// Return null if index is out of range
if (index === 0 || index > baseLayer.containingComp.numLayers) {
return null;
}
return baseLayer.containingComp.layer(index);
}
}
// Use the string as a name if it does not start with += or -= or if the
// rest of the string is not a valid number
return baseLayer.containingComp.layer(selector);
}
// If none of the above is true it should return null
return null;
}
function getRelativeIndex(str) {
var offset = str.charAt(0) + str.substr(2);
offset = parseInt(offset, 10);
if (isNaN(offset)) {
return false;
}
return offset;
}
return aeq;
}(aeq || {}));
</code></pre>
</article>
</section>
</div>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Thu Jul 27 2017 18:57:34 GMT+0200 (CEST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>
<script>prettyPrint();</script>
<script src="scripts/linenumber.js"></script>
</body>
</html>