80
JavaScript Reference
ItemCollection object
80
If the ItemCollection belongs to the project or the root folder, then the new folder’s
p a r e n t F o l d e r
is the root
folder. If the ItemCollection belongs to any other folder, the new folder’s
p a r e n t F o l d e r
is that
F o ld e r I t e m
.
To put items in the folder, set the item object’s
p a r e n t F o l d e r
attribute; see “Item parentFolder attribute” on
page 77.
Parameters
Returns
FolderItem object.
Example
This script creates a new FolderItem in the Project panel and moves compositions into it.
/ / c r e a t e a n e w F o l d e r I t e m i n p r o j e c t , w i t h n a m e “ c o m p s ”
v a r c o m p F o l d e r = a p p . p r o j e c t . i t e m s . a d d F o l d e r ( “ c o m p s ” ) ;
/ / m o v e a l l c o m p o s i t i o n s i n t o n e w f o l d e r b y s e t t i n g
/ / c o m p I t e m ’ s p a r e n t F o l d e r t o “ c o m p s ” f o l d e r
f o r ( v a r i = 1 ; i < = a p p . p r o j e ct . n u m I t e m s ; i + + ) {
i f ( a p p . p r o j e c t . i t e m ( i ) i n s t a n c e o f C o m p I t e m )
a p p . p r o j e c t . i t e m ( i ) . p a r e n t F o l d e r = c o m p F o l d e r ;
}
n a m e
A string containing the name of the folder.
Summary of Contents for 65009963 - After Effects CS4
Page 1: ...SCRIPTING GUIDE...