-
Notifications
You must be signed in to change notification settings - Fork 7
/
select.js.html
350 lines (294 loc) · 30.8 KB
/
select.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>select.js</title>
<link type="text/css" rel="stylesheet" href="github.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
<link type="text/css" rel="stylesheet" href="custom.css">
<script src="scripts/highlight.js"></script>
<script src="scripts/linenumber.js"></script>
<script>hljs && hljs.initHighlightingOnLoad();</script>
</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>
<div class="page">
<header class="page-header">
<h1 class="project-name">
<a href="/">aequery</a>
</h1>
<h2 class="project-tagline">
General purpose after effects scripting library
</h2>
<h2 class="project-version">
0.2.0
</h2>
</header>
<div class="page-contents">
<nav class="sidebar">
<h2 class="home"><a href="index.html">Home</a></h2><h3 data-name="Classes">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 data-name="Namespaces">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>global</h3><ul><li><a href="global.html#aeq1">aeq</a></li></ul>
</nav>
<div id="main">
<h1 class="page-title">select.js</h1>
<section>
<article>
<pre class="source linenums"><code class="hljs js">/*jslint browser: true*/
aeq = (function(aeq) {
/**
* @typedef {String} aeq.SelectorString
* @description The selectorString has 3 expression types:
*
* - type
* - props
* - pseudo
*
* #### Type
*
* The type of object to find, one of:
*
* - `item`: Finds items in the project panel
* - `activecomp`: Finds the active composition
* - `comp`/`composition`: Finds CompItems
* - `layer`: Finds Layers
* - `propertygroup`/`propgrp`/`propgroup`: Finds property groups
* - `prop`/`property`: Finds properties`
* - `effect`: Finds effects property groups
* - `key`: Finds keyframes on properties. Returns aeq.Key objects
*
* The types can be chained after each other, but must be in the order above,
* but all of them are optional. Only the objects of the last specified `type`
* will be returned.
*
* Type is the only expression type that is required. All other expression
* types are optional.
*
* #### Props
* written right after the type, without a space, and inside square brackes
* (`[ ]`). The props are a list attribute names and values, separated by `=`.
* The objects must have an attribute with the specified value to qualify as
* a match. Attributes are separated by a space.
*
* #### Pseudo
* Psoudo are a bit like `props` but start with a colon, `:`, followed by a
* keyword specifying how the attributes should match. The attributes are
* placed inside parenthesis `()`.
*
* The keywords that are currently supported are:
*
* - `:is()`: all attributes must match.
* - `:has()`: same as `:is()`
* - `:not()`: objects should not have any attributes matching the props.
* - `:isnot()`: same as `:not()`
*
* Psoudo selectors can be chained.
*
* @example <caption>Get all comps with width and height of 1920x1080</caption>
* aeq("comp[width=1920 heigth=1080]")
*
* @example <caption>Get all properties of layers that are selected and
* does not have audio:</caption>
* aeq("layer[selected hasAudio=false] prop")
*
* @example <caption>Get properties that have `PropertyValueType.OneD` and are
* not selected.</caption>
* aeq("prop[propertyValueType=" + PropertyValueType.OneD + "]:not(selected)");
*
* @example <caption>Get layers that do not have audio inside comps
* that are selected:</caption>
* aeq("comp:is(selected) layer:not(hasAudio)")
*/
/**
* Gets objects by looking at a string and finding objects in After Effects
* matching the description. The context is used to determine a starting point
* for where the function starts looking for elements.
* @memberof aeq
* @method
* @param {aeq.SelectorString} selector A string containing a
* selector expression
* @param {CompItem|FolderItem|Layer|PropertyGroup|Array} [context] The object
* to start looking from
* @return {ArrayEx} The found After Effects objects
*/
aeq.select = function (selector, context) {
var results = [];
var parsedSelector = cssselector.parse(selector);
var parts = parsedSelector;
if (context !== undefined) {
if (aeq.isString(context)) {
results = aeq.select(context);
} else if (aeq.isArray(context)) {
results = context;
} else {
results = [context];
}
}
while (parts.length > 0) {
var part = parts[0];
var unshifted = false;
switch (part.type) {
case 'activecomp':
results = filterResults(aeq.arrayEx([aeq.getActiveComposition()]));
results.type = "comp";
break;
case 'composition':
case 'comp':
results = filterResults(aeq.getCompositions());
results.type = "comp";
break;
case 'layer':
if (results.type === "comp" || aeq.isComp(results[0])) {
results = filterResults(aeq.getLayers(results));
results.type = "layer";
} else if (results.type !== "comp") {
parts.unshift({ type : 'comp' });
unshifted = true;
}
break;
case 'propertygroup':
case 'propgrp':
case 'propgroup':
if ( results.type === "layer" || results.type === "propertygroup" ||
aeq.isLayer(results[0]) || aeq.isPropertyGroup(results[0])) {
results = filterResults(aeq.getProperties(results,
{ separate : false, groups: true, props: false }));
results.type = "propertygroup";
} else if (results.type !== "layer") {
parts.unshift({ type : 'layer' });
unshifted = true;
}
break;
case 'property':
case 'prop':
if (results.type === "layer" || results.type === "propertygroup" ||
aeq.isLayer(results[0]) || aeq.isPropertyGroup(results[0])) {
results = filterResults(aeq.getProperties(results, { separate : false }));
results.type = "property";
} else if (results.type !== "layer") {
parts.unshift({ type : 'layer' });
unshifted = true;
}
break;
case 'effect':
if (results.type === "layer" || aeq.isLayer(results[0]) ) {
results = filterResults(aeq.getEffects(results));
results.type = "effect";
} else if (results.type !== "layer") {
parts.unshift({ type : 'layer' });
unshifted = true;
}
break;
case 'key':
case 'keys':
if (results.type === "property" || aeq.isProperty(results[0]) ) {
results = filterResults(aeq.getKeys(results));
results.type = "key";
} else if (results.type !== "property") {
parts.unshift({ type : 'property' });
unshifted = true;
}
break;
case 'item':
results = filterResults(aeq.getItems());
results.type = "item";
break;
default:
throw new Error("Unrecognized token " + part.type);
}
if (!unshifted) {
parts.shift();
}
}
function filterResults(arr) {
// Only filter if there is something to filter
if (part.props || part.pseudo) {
return arr.filter(filter);
}
return arr;
}
function filter(obj) {
var ret = true, len, pseudo;
if (part.props !== null) {
if (!hasAllAttributes(obj, part.props, false)) {
return false;
}
}
if (!part.pseudo) {
return true;
}
len = part.pseudo.length;
for (var i = 0; i < len; i++) {
pseudo = part.pseudo[i];
if (pseudo.type === "not" || pseudo.type === "isnot") {
ret = hasAllAttributes(obj, pseudo.props, true);
} else if (pseudo.type === "is" || pseudo.type === "has") {
ret = hasAllAttributes(obj, pseudo.props, false);
}
if (ret === false) {
return false;
}
}
return true;
}
return aeq.arrayEx(results);
};
function hasAllAttributes(obj, attributes, not) {
var attributeValue;
for (var attribute in attributes) {
if (!attributes.hasOwnProperty(attribute)) {
continue;
}
attributeValue = attributes[attribute];
if (!obj.hasOwnProperty(attribute)) {
throw new Error('The attribute ' + attribute + ' does not exist on a ' + typeof(obj));
}
var isSame = compare(attributeValue, obj[attribute]);
// Return false if it is the same and it should not be,
// or if it isn't the same and it should be
if ((isSame && not) || (!isSame && not === false)) {
return false;
}
}
return true;
}
function compare(value, attribute) {
if (value.type === "Array") {
return valueInArray(value, attribute);
} else if (value.type === "RegExp") {
return value.value.test(attribute);
// For numbers, strings, booleans etc.
} else {
return value.value.toString() === attribute.toString();
}
}
function valueInArray(value, attribute) {
// Check if value is in array
for (var i = 0, il = value.value.length; i < il; i++) {
if (compare(value.value[i], attribute)) {
return true;
}
}
return false;
}
return aeq;
}(aeq || {}));
</code></pre>
</article>
</section>
<script type="text/javascript">
hljs.lineNumbersBlock(d3.select('.source .hljs').node())
</script>
</div>
</div>
</div>
<br class="clear">
<footer>
<span>AEQuery</span> docs generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Fri Jun 16 2017 using the <a href="https://github.com/mere/kitsune">Kitsune</a> theme.
</footer>
<script src="scripts/linenumber.js"></script>
</body>
</html>