86
JavaScript Reference
Layer object
86
Layer copyToComp() method
a p p . p r o j e c t . i t e m
( i n d e x )
. l a y e r
( i n d e x )
. c o p y T o C o m p (
i n t o C o m p
)
Description
Copies the layer into the specified composition. The original layer remains unchanged. Creates a new Layer
object with the same values as this one, and prepends the new object to the
l a y e r s
collection in the target
CompItem. Retrieve the copy using
i n t o C o m p
. l a y e r ( 1 )
.
Copying in a layer changes the index positions of previously existing layers in the target composition. This is
the same as copying and pasting a layer through the user interface.
Parameters
Returns
Nothing.
Layer duplicate() method
a p p . p r o j e c t . i t e m
( i n d e x )
. l a y e r
( i n d e x )
. d u p l i c a t e ( )
Description
Duplicates the layer. Creates a new Layer object in which all values are the same as in this one. This has the
same effect as selecting a layer in the user interface and choosing Edit > Duplicate, except the selection in the
user interface does not change when you call this method.
Parameters
None.
Returns
Layer object.
Layer enabled attribute
a p p . p r o j e c t . i t e m
( i n d e x )
. l a y e r
( i n d e x )
. e n a b l e d
Description
When true, the layer is enabled; otherwise false. This corresponds to the video switch state of the layer in the
Timeline panel.
Type
Boolean; read/write.
Layer hasVideo attribute
a p p . p r o j e c t . i t e m
( i n d e x )
. l a y e r
( i n d e x )
. h a s V i d e o
Description
When true, the layer has a video switch (the eyeball icon) in the Timeline panel; otherwise false.
i n t o C o m p
The target composition, and CompItem object.
Summary of Contents for 65009963 - After Effects CS4
Page 1: ...SCRIPTING GUIDE...