File tree Expand file tree Collapse file tree 1 file changed +6
-14
lines changed Expand file tree Collapse file tree 1 file changed +6
-14
lines changed Original file line number Diff line number Diff line change @@ -78,24 +78,16 @@ aeq.extend({
7878 } ,
7979
8080 /**
81- * Gets all the CompItems in the project
81+ * Gets all the CompItems in the project. Or all CompItems in the given folder.
8282 * @method
8383 * @memberof aeq
84+ * @param {FolderItem } [folder=app.project] The folder to get comps from.
85+ * @param {boolean } [deep=true] Go through subfolders looking for comps.
8486 * @return {aeq.arrayEx } Array of CompItems
8587 */
86- getCompositions : function ( ) {
87- var arr = [ ] ;
88- var len = app . project . items . length ;
89-
90- for ( var i = 1 ; i <= len ; i ++ )
91- {
92- var item = app . project . item ( i ) ;
93-
94- if ( aeq . isComp ( item ) )
95- arr . push ( item ) ;
96- }
97-
98- return aeq . arrayEx ( arr ) ;
88+ getCompositions : function ( folder , deep ) {
89+ var items = aeq . getItems ( folder , deep )
90+ return items . filter ( aeq . isComp )
9991 } ,
10092
10193 /**
You can’t perform that action at this time.
0 commit comments