Manual Adobe After Effects CS3 Scripting
Manual Adobe After Effects CS3 Scripting
COMANDOS
© Copyright 2007 Adobe Systems Incorporated. Reservados todos los derechos.
Guía de secuencias de comandos Adobe®Creative Suite 3 After Effects® de Adobe®
AVISO: Toda la información contenida en este documento es propiedad de Adobe Systems Incorporated. Queda prohibida la reproducción y
transmisión de cualquier parte de esta publicación (ya sea en formato impreso o electrónico) en cualquier forma o por cualquier medio
(electrónico, mecánico, fotocopiado, grabación o de otro tipo) sin el consentimiento previo y por escrito de Adobe Systems Incorporated. El
software descrito en este documento se proporciona bajo licencia y sólo puede utilizarse o copiarse de acuerdo con los términos de dicha
licencia.
Esta publicación y la información que contiene se proporciona TAL CUAL, está sujeta a cambios sin previo aviso y no debe interpretarse como
un compromiso por parte de Adobe Systems Incorporated. Adobe Systems Incorporated no asume ninguna responsabilidad ni compromiso
por errores o inexactitudes, no ofrece garantía de ningún tipo (ya sean expresas, implícitas o legales) respecto a esta publicación y niega
expresamente todas las garantías de comerciabilidad, adaptación para un propósito particular y no-infracción de derechos de terceros.
Cualquier referencia a nombres de empresas en las plantillas de ejemplo tiene sólo fines informativos y no pretende referirse a ninguna
organización real.
Adobe, el logotipo de Adobe, After Effects, Photoshop y Bridge son marcas comerciales o marcas registradas de Adobe Systems Incorporated
en Estados Unidos y en otros países.
Apple, Mac, Macintosh y Mac OS son marcas comerciales de Apple Computer, Inc. registradas en Estados unidos y otros países. Microsoft y
Windows son marcas comerciales registradas o marcas comerciales de Microsoft Corporation en Estados Unidos y otros países. JavaScript y
todas las marcas relativas a Java son marcas comerciales o marcas comerciales registradas de Sun Microsystems, Inc. en Estados Unidos y en
otros países. UNIX es una marca comercial registrada de The Open Group.
Cualquier otra marca comercial pertenece a sus propietarios respectivos.
Si esta guía se distribuye con software que incluye un contrato de licencia de usuario final, la guía, así como el software que en ella se
describe, se proporcionan bajo licencia y pueden utilizarse o copiarse sólo de acuerdo con los términos de dicha licencia. Exceptuando lo
permitido por tal licencia, se prohíbe reproducir, almacenar en un sistema de recuperación o transmitir cualquier parte de esta guía, en
cualquier forma o por cualquier medio, ya sea electrónico, mecánico, en grabación o de otra forma, sin el previo consentimiento por escrito
por parte de Adobe Systems Incorporated. Tenga en cuenta que el contenido de esta guía está protegido por leyes de derechos de autor
(copyright), aunque no se distribuya con software que incluya un contrato de licencia de usuario final.
El contenido de esta guía se proporciona sólo con fines informativos, está sujeto a cambios sin previo aviso y no debe interpretarse como un
compromiso por parte de Adobe Systems Incorporated. Adobe Systems Incorporated no asume ninguna responsabilidad o compromiso por
errores o inexactitudes que puedan aparecer en el contenido informativo de esta guía.
Adobe Systems Incorporated, 345 Park Avenue, San José, California 95110, [Link].
Introducción
La Guía de secuencias de comandos de After Effects muestra cómo obtener un control de los procedimientos de
los proyectos de After Effects mediante secuencias de comandos. Este conjunto de funciones está disponible en
Adobe® After Effects® CS3 Professional.
Mediante las secuencias de comandos del sistema, puede simplificar la canalización de procesos y evitar tener
que seleccionar y hacer clic repetidamente. Si ha utilizado expresiones u otras técnicas similares a JavaScript
para la animación o ha trabajado con secuencias de comandos del sistema en AppleScript o Visual Basic,
reconocerá la eficacia de las secuencias de comandos en After Effects. Con práctica y experiencia suficiente en
el lenguaje JavaScript, podrá controlar la canalización de los gráficos.
3
Introducción Edición de secuencias de comandos
El núcleo de una aplicación de secuencias de comandos es el modelo de objetos. Cuando utiliza Adobe After
Effects, crea proyectos, composiciones y elementos de la cola de procesamiento junto con todos los elementos
que contienen: material de archivo, imágenes, sólidos, capas, máscaras, efectos y propiedades. En términos de
secuencias de comandos, cada uno de estos elementos es un objeto. Esta guía describe los objetos JavaScript
definidos para los proyectos de After Effects.
Las secuencias de comandos reproducen gran parte de lo que se puede hacer mediante la interfaz de usuario
de After Effects, por lo que es fundamental tener un sólido conocimiento de la aplicación para saber cómo
utilizar esta funcionalidad.
El modelo de objetos de After Effects está formado por un proyecto, elementos, composiciones, capas y
elementos de la cola de procesamiento. Cada objeto tiene sus atributos especiales y cada objeto de un proyecto
de After Effects tiene una identidad propia (aunque no todos se pueden utilizar con secuencias de comandos).
Debería estar familiarizado con el modelo de objetos de After Effects para poder crear secuencias de
comandos.
Las secuencias de comandos de After Effects están basadas en ECMAScript (o más concretamente, en la tercera
edición de la norma ECMA-262). Encontrará más documentación sobre esta norma en [Link]-
[Link]. Para aprovechar al máximo las posibilidades de las secuencias de comandos, necesitará
además conocimientos sobre cómo se escriben en el nivel de sistema (para la integración con AppleScript o la
línea de comandos Terminal en Mac OS y las secuencias de comandos de la línea de comandos en los equipos
Windows), así como tener nociones básicas sobre cómo trabajar con JavaScript.
NOTA: Los objetos de JavaScript llamados normalmente “propiedades” reciben el nombre de “atributos” en esta
guía para evitar la confusión con la propia definición de una propiedad en After Effects (un valor que se puede
animar de un efecto, máscara o transformación en una capa individual).
Expresiones
Aunque las expresiones de After Effects y la interfaz de secuencias de comandos de After Effects emplean
JavaScript y tienen acceso a propiedades de capas individuales, son entidades absolutamente distintas. Las
expresiones no pueden acceder a información de las secuencias de comandos (como variables y funciones), a
pesar de que se puede escribir una secuencia de comandos para crear o editar una expresión.
Dado que tanto las expresiones como las secuencias de comandos emplean JavaScript, estar familiarizado con
uno de estos conceptos puede ayudar a comprender el otro.
4
Introducción Activación de funciones de secuencias de comandos completas
• Algunas aplicaciones de Windows útiles para editar secuencias de comandos son EM Editor o el Bloc de
notas integrado (asegúrese de definir la codificación como UTF-8 en las opciones de guardar).
• Entre las aplicaciones de Mac OS útiles para editar secuencias de comandos se incluyen BBEdit o la
aplicación integrada OS X TextEdit (asegúrese de definir el tipo de almacenamiento como Unicode [UTF-8]
en las preferencias).
5
Introducción Acceso y escritura de secuencias de comandos
• Escribir archivos
• Crear carpetas y definir la carpeta actual
• Crear una conexión socket (si desea información sobre esta utilidad de JavaScript, consulte Guía de
herramientas de JavaScript)
Adobe proporciona un completo depurador de JavaScript, denominado Kit de herramientas de ExtendScript.
El Kit de herramientas está deshabilitado de manera predeterminada con el fin de que los usuarios ocasionales
no lo encuentren. Al editar o escribir secuencias de comandos, el Kit de herramientas ayuda a diagnosticar
más rápidamente problemas relativos a secuencias de comandos. Para activar el kit de herramientas en el
equipo local cuando se produzca un error de una secuencia de comandos, elija Preferencias > General y
seleccione Activar el depurador de JavaScript. Si desea obtener información detallada sobre el Kit de
herramientas de ExtendScript, consulte Guía de herramientas de JavaScript.
Tenga en cuenta que el kit de herramientas se inicia sólo cuando se ejecuta una secuencia de comandos, no
con expresiones, aunque éstas también utilicen JavaScript.
6
Introducción Acceso y escritura de secuencias de comandos
Las secuencias de comandos comparten un entorno global, de manera que cualquier secuencia que se ejecute
al inicio puede definir variables y funciones disponibles para todas las secuencias de comandos. En todos los
casos, las variables y las funciones, una vez definidas mediante la ejecución de la secuencia de comandos que
las contiene, continúan en las siguientes secuencias de comandos durante una sesión de After Effects
específica. Cuando se cierra la aplicación, todas estas variables y funciones definidas globalmente se eliminan.
Asegúrese de que asigna nombres únicos a las variables incluidas en secuencias, de manera que una secuencia
de comandos no vuelva a asignar por equivocación variables globales destinadas a continuar durante toda una
sesión.
También se pueden agregar atributos a objetos existentes, como el objeto Application (consulte “Application
object” en la página 19), para extender la aplicación a otras secuencias de comandos.
Las secuencias de comandos guardadas en la carpeta Shutdown se ejecutan cuando se cierra la aplicación. Esto
se produce después de cerrar el proyecto pero antes de que se cierre otra aplicación.
Si la secuencia de comandos crea su propia interfaz de usuario en una función, no puede utilizar “this”, ya que
se referirá a la función en sí, no al panel. En este caso, debería pasar el objeto “this” como un argumento de la
función. Por ejemplo:
f u n c t io n c re a teU I ( th i s O b j) {
v ar my Pan e l = t hi s O b j ;
my Pan e l . a dd ( " b u t ton " , [ 1 0 , 1 0 , 1 0 0 , 3 0 ] , " To o l # 1" ) ;
re tur n my Pan el ;
}
v ar my To ol sPane l = c reateUI (t hi s) ;
my To ol sPa n e l .sh ow () ;
No se puede utilizar el comando del menú Archivo > Scripts > Ejecutar guión para ejecutar una secuencia de
comandos que haga referencia a “this”. Para que la secuencia de comandos funcione con un objeto de ventana
(accesible desde el menú Archivo > Scripts) o desde un panel nativo (accesible desde el menú Ventanas),
compruebe si “this” es un objeto panel. Por ejemplo:
f u n c t io n c re a teU I ( th i s O b j) {
v ar my Pan e l = ( t h i s O b j i n s t a n ce o f Pa n e l ) ? t h is O b j : n ew Wi n d ow ( " p a l e t te " , " My To o l s " ,
[100 , 10 0, 3 00, 3 00]);
my Pan e l . a dd ( " b u t ton " , [ 1 0 , 1 0 , 1 0 0 , 3 0 ] , " To o l # 1" ) ;
re tur n my Pan el ;
}
v ar my To ol sPane l = c reateUI (t hi s) ;
my To ol sPa n e l .sh ow () ;
7
Introducción Envío de secuencias de comandos a After Effects desde el sistema
Cómo incluir secuencias de comandos de After Effects en una línea de comandos (Windows)
A continuación se indican algunos ejemplos de entradas de la línea de comandos de Windows que envían una
secuencia de comandos de After Effects a la aplicación sin utilizar la interfaz de usuario de After Effects para
ejecutarla.
En el primer ejemplo, se copia y pega la secuencia de comandos de After Effects directamente en la línea de
comandos y después se ejecuta. El texto de la secuencia aparecerá entre comillas después del comando
a fter f [Link] -s :
a fter f [Link] -s "aler t ("Ac aba de env i ar una a l er t a a Af ter Effe ct s")"
También puede especificar la ubicación del archivo JSX que se va a ejecutar. Por ejemplo:
a ft er f x . e xe – r c : \ m is D o cu m e n to s \ S c r i p t s \ s u AE S c r ip t He re .j s x
a fter f x .e xe - r " c :\ m is D o cu m e n tos \ S c r i p t s\ Nom b re de Sc r i p t con S p ace s .js x "
También puede mostrar un cuadro de diálogo que pida la ubicación del archivo JSX que se va a ejecutar, de la
siguiente manera:
s et t heF i l e to ch o o se fi l e
te l l app l icat ion "Adobe Af ter Ef fe ct s CS 3 "
D oS c r ip t th eF i l e
e n d te l l
Por último, esta secuencia de comandos es quizá la más útil cuando se trabaja directamente en la edición de
una secuencia de comandos JSX y se desea enviarla a After Effects para probarla o ejecutarla. Para utilizarla de
manera eficaz, debe especificar la aplicación que contiene el archivo JSX abierto (en este ejemplo, TextEdit);
si no sabe el nombre exacto de la aplicación, escriba lo más parecido a “TextEdit” y AppleScript le pedirá que
la busque.
Basta con que resalte el texto de la secuencia que desea ejecutar y, a continuación, active este AppleScript:
(*
E s t a s e c u e n c i a d e com a n d o s env í a l a s el e cc i ón a c t ua l a Af ter E f fe c t s com o un a se c uen c i a d e com an dos.
*)
8
Introducción Prueba y solución de problemas
Si desea obtener más información sobre el uso de AppleScript, consulte los manuales AppleScript: the
Definitive Guide de Matt Neuberg (O’Reilly & Associates) o AppleScript 1-2-3 de Sal Soghoian (Peachpit
Press).
Variables de JavaScript
Las secuencias de comandos comparten un entorno global, de manera que cualquier secuencia que se ejecute
al inicio puede definir variables y funciones disponibles para todas las secuencias de comandos. En todos los
casos, las variables y las funciones, una vez definidas mediante la ejecución de la secuencia de comandos que
las contiene, continúan en las siguientes secuencias de comandos durante una sesión de After Effects
específica. Cuando se cierra la aplicación, todas estas variables y funciones definidas globalmente se eliminan.
Los creadores de secuencias de comandos deben tener precaución a la hora de asignar nombres únicos a las
variables incluidas en secuencias, de manera que una secuencia de comandos no vuelva a asignar por
equivocación variables globales destinadas a continuar durante toda una sesión.
9
Introducción Más recursos para aprender a utilizar secuencias de comandos
10
con t i nue JavaScript estándar; interrumpe la ejecución de la repetición del bucle actual.
def a ul t Etiqueta que se utiliza en una instrucción s w i tch cuando no se encuentra una etiqueta c a s e .
do. ..w hile Construcción estándar de JavaScript. Similar al bucle w hi l e , salvo que la evaluación de la
condición del bucle se produce al final del mismo.
for.. .i n Construcción estándar de JavaScript. Proporciona una manera de desplazarse fácilmente por las
propiedades de un objeto.
nu l l Se asigna a una variable, elemento de conjunto o propiedad de objeto para indicar que no contiene
un valor válido.
re tur n Forma estándar de JavaScript de devolver un valor de una función o salir de una función.
s w itch Forma estándar de JavaScript de evaluar una expresión de JavaScript e intentar corresponder el
valor de la expresión con una etiqueta ca s e .
un define d Indica que todavía no se ha asignado un valor a la variable, elemento de conjunto o propiedad de
objeto.
v ar Sintaxis estándar de JavaScript que se utiliza para declarar una variable local.
w hi l e Construcción estándar de JavaScript. Similar al bucle do... w hile , salvo que la evaluación de la
condición del bucle se produce al principio del mismo.
w i th Construcción estándar de JavaScript que se utiliza para especificar un objeto que se va a utilizar en
instrucciones posteriores.
Operadores de JavaScript
En las siguientes tablas se enumeran y se describen todos los operadores que reconoce el motor de secuencias
de comandos de After Effects, y se indica la prioridad y la asociatividad de todos ellos.
10
Introducción Más recursos para aprender a utilizar secuencias de comandos
11
! NOT lógico.
* Multiplicar.
/ Dividir.
% División modular.
+ Sumar.
== Igual.
!= Distinto.
| OR bit a bit.
|| OR lógico.
?: Condicional (ternario).
= Asignación.
11
Introducción Más recursos para aprender a utilizar secuencias de comandos
12
Operadores Descripción
> >> = Asignación con operación de desplazamiento a la derecha bit a bit sin signo.
, Evaluación múltiple.
[ ], () , . izquierda a derecha
*, /, % izquierda a derecha
+ , – ( re st a) izquierda a derecha
= =, != izquierda a derecha
^ izquierda a derecha
| izquierda a derecha
|| izquierda a derecha
?: derecha a izquierda
, izquierda a derecha
12
JavaScript Reference
This chapter lists and describes JavaScript classes, objects, methods, attributes, and global functions defined by
After Effects.
The After Effects scripting engine supports ExtendScript, Adobe’s extended version of JavaScript, which imple-
ments the 3rd Edition of the ECMA-262 Standard, including its notational and lexical conventions, types,
objects, expressions and statements. For a complete listing of the keywords and operators included with
ECMAScript, refer to E C M A- 2 6 2 .p d f , available at [Link]/publications/standards/Ecma-
[Link]. For an overview of the most common keywords and statements available from ECMA-262, see
“JavaScript keywords and statement syntax” on page 10.
RENDER1UEUE ITEMS
LAYERS ITEMS
PROXY3OURCE MAIN3OURCE PROXY3OURCE
RENDER1UEUE)TEMS
PROPERTIES MAIN3OURCE PROXY3OURCE
MAY BE ANY OF THE FOLLOWING TYPES OF ITEM
OUTPUT-ODULES
SOLID3OURCE /2 PLACEHOLDER3OURCE /2 FILE3OURCE
COLOR FILE
Note that the File, Folder, and Socket objects are defined by ExtendScript, and are documented in the JavaScript
Tools Guide. ExtendScript also defines the ScriptUI module, a set of window and user-interface control objects,
which are available to After Effects scripts. These are also documented in the JavaScript Tools Guide.
The hierarchy of objects in scripting corresponds to the hierarchy in the user interface.
13
JavaScript Reference The After Effects Object Model
14
The application contains a Project panel, which displays a project. The project contains compositions, which
contain layers. The source for a layer can be a footage file, placeholder, or solid, also listed in the Project panel.
Each layer contains settings known as properties, and these can contain markers and keyframes. The render
queue contains render-queue items as well as render settings and output modules. All of these entities are repre-
sented by objects in scripting.
NOTE: To avoid ambiguity, this manual uses the term “attribute” to refer to JavaScript object properties, and the
term “property” or “AE property” to refer to After-Effects layer properties.
Object summary
The following table lists all objects alphabetically, with links to the documentation page for each.
Object Description
“Global functions” on page 16 Globally available functions that allow you to display text for script debugging purposes,
and help convert time values between seconds and frames.
“Application object” on page 19 A single global object, available by its name (a pp ), that provides access to objects and
application settings within the After Effects application.
“AVItem object” on page 32 Represents audio/visual files imported into After Effects.
“AVLayer object” on page 40 Represents those layers that contain AVItem objects (Comp layers, footage layers, solid
layers, text layers, and sound layers).
“Collection object” on page 52 Associates a set of objects or values as a logical group and provides access to them by
index.
“CompItem object” on page 53 Represents a composition, and allows you to manipulate it and get information about it.
14
JavaScript Reference The After Effects Object Model
15
Object Description
“FootageItem object” on page 65 Represents a footage item imported into a project, which appears in the Project panel.
“ImportOptions object” on page 74 Encapsulates options for importing files into After Effects.
“Item object” on page 77 Represents an item in a project that appears in the Project panel.
“KeyframeEase object” on page 82 Encapsulates keyframe ease values in an After Effects property.
“OutputModule object” on page 106 Represents an output module for a render queue.
“PropertyBase object” on page 141 A base class for After Effects property and property group classes.
“RenderQueue object” on page 153 Represents the After Effects render queue.
“RQItemCollection object” on page 162 Provides access to application settings and preferences.
“Shape object” on page 165 Encapsulates the outline shape information for a mask.
“SolidSource object” on page 169 Describes a solid color that is the source of some footage.
“System object” on page 170 Provides access to the operating system from the application.
15
JavaScript Reference Global functions
16
Global functions
These globally available functions that are specific to After Effects. Any JavaScript object or function can call
these functions, which allow you to display text in a small (3-line) area of the Info panel, and to convert
numeric time values to and from string values.
t i m eToCur ren t For m at () Converts a numeric time value to a string time value.
w r ite( ) Writes text to the Info panel, with no line break added.
w r ite L n ( ) Writes text to the Info panel, adding a line break at the end.
Additional global functions for standard user I/O (aler t , con fi r m , and prom pt ) and static functions for file
I/O, are defined by ExtendScript; for detailed reference information, see the Adobe Bridge® JavaScript
Reference.
NOTE: The After Effects global functions for standard dialogs and file I/O are still supported in this release, but
are deprecated and will not be supported in future releases. For details, see the After Effects 6.5 documentation.
Description
Parameters
None.
Returns
Nothing.
Description
Converts a formatted string for a frame time value to a number of seconds, given a specified frame rate. For
example, if the formatted frame time value is [Link] (the exact string format is determined by a project
setting), and the frame rate is 24 fps, the time would be 0.5 seconds (12/24). If the frame rate is 30 fps, the time
would be 0.4 seconds (12/30).
If the time is a duration, the frames are counted from 0. Otherwise, the frames are counted from the project’s
starting frame (see “Project displayStartFrame attribute” on page 112).
Parameters
for m at ted Tim e The frame time value, a string specifying a number of frames in the project’s current time display format.
16
JavaScript Reference Global functions
17
i s D u r a ti o n Optional. When true, the time is a duration (measured from frame 0). When false (the default), the time is
measured from the project’s starting frame.
Returns
Description
Converts a numeric time value (a number of seconds) to a frame time value; that is, a formatted string that
shows which frame corresponds to that time, at the specified rate. For example, if the time is 0.5 seconds, and
the frame rate is 24 fps, the frame would be [Link] (when the project is set to Display Timecode). If the frame
rate is 30 fps, the frame would be [Link]. The format of the timecode string is determined by a project setting.
If the time is a duration, the frames are counted from 0. Otherwise, the frames are counted from the project’s
starting frame (see “Project displayStartFrame attribute” on page 112).
Parameters
i s D u r a ti o n Optional. When true, the time is a duration (measured from frame 0). When false (the default), the time is
measured from the project’s starting frame.
Returns
Description
Parameters
tex t The string to display. Truncated if too long for the Info panel.
Returns
Nothing.
Example
w r ite ( " T h i s text ap p e a r s i n In fo p a n e l " ) ;
w r ite ( " w it h m o re o n s a m e l i n e . " ) ;
17
JavaScript Reference Global functions
18
Description
Writes output to the Info panel and adds a line break at the end.
Parameters
Returns
Nothing.
Example
w r ite l n ( " T h is tex t a pp e ars on f i r s t l i n e " ) ;
w r ite l n ( " T h is tex t a pp e ars on s e con d l i n e " );
18
JavaScript Reference Application object
19
Application object
a pp
Description
Provides access to objects and application settings within the After Effects application. The single global object
is always available by its name, a pp .
Attributes of the Application object provide access to specific objects within After Effects. Methods of the
Application object can create a project, open an existing project, control Watch Folder mode, purge memory,
and quit the After Effects application. When the After Effects application quits, it closes the open project,
prompting the user to save or discard changes as necessary, and creates a project file as necessary.
Attributes
language “Application language attribute” on The language in which the application is running.
page 24
vers i on “Application version attribute” on The version number of the After Effects application.
page 30
b u i l dNa m e “Application buildName attribute” on The name of this build of the application.
page 21
b u i l dNu m b e r “Application buildNumber attribute” on The number of this build of the application.
page 22
i s Wa tch Fo l der “Application isWatchFolder attribute” When true, the local application is running in Watch
on page 24 Folder mode.
i s Ren d e r E n g i n e “Application isRenderEngine attribute” When true, the local After Effects application is running
on page 24 as a render engine.
s e tt i n g s “Application settings attribute” on Application settings that can be set via scripting.
page 30 and “RQItemCollection object”
on page 162
o n E r ror “Application onError attribute” on A callback function that is called when an error occurs
page 26 in the application.
e x i t Cod e “Application exitCode attribute” on A numeric status code used when executing a script
page 24 externally (that is, from a command line or AppleScript).
0 if no error occurred. A positive number indicates an
error that occurred while running the script.
e xi t Af ter L a u n ch A n d Eva l “Application exitAfterLaunchAndEval When true, the application remains open after running
attribute” on page 23 a script from the command line on Windows.
s avePro je c t On Cr as h “Application saveProjectOnCrash When true, the project is saved if the application closes
attribute” on page 28 unexpectedly.
19
JavaScript Reference Application object
20
Methods
newPro jec t () “Application newProject() method” on Creates a new project in After Effects.
page 25
open() “Application open() method” on page 26 Opens a project or an Open Project dialog box.
w atch Fo l der ( ) “Application watchFolder() method” on Starts Watch Folder mode; does not return
page 30 until Watch Folder mode is turned off.
b eg i nUndoGroup() “Application beginUndoGroup() method” Groups the actions that follow it into a single
on page 21 undoable step.
endUndoGroup() “Application endUndoGroup() method” on Ends an undo group; needed only when a
page 22 script contains more than one undo group.
b eg i nSup pres sD i al o g s( ) “Application beginSuppressDialogs() Begins suppression of dialogs in the user inter-
method” on page 21 face.
s e tMemor yUsa geLi mi ts () “Application setMemoryUsageLimits() Sets memory usage limits as in the Memory &
method” on page 29 Cache preferences area.
s e tS ave Preferen ces O n Qu it ( ) “Application setSavePreferencesOnQuit() Sets whether preferences are saved when the
method” on page 29 application is quit.
a c t iva te( ) “Application activate() method” on page 20 Brings the After Effects main window to the
front of the screen.
s ch e dul e Tas k( ) “Application scheduleTask() method” on Schedules a JavaScript script for delayed exe-
page 29 cution.
p a r s e Sw a tch F i l e ( ) “Application parseSwatchFile() method” on Loads a color swatch from an Adobe Swatch
page 27 Exchange (ASE) file.
Description
Opens the application main window if it is minimized or iconified, and brings it to the front of the desktop.
Parameters
None.
20
JavaScript Reference Application object
21
Returns
Nothing.
Description
Begins suppression of script error dialog boxes in the user interface. Use en dSuppres s D ia l og s () to resume the
display of error dialogs. See “Application endSuppressDialogs() method” on page 22.
Parameters
None.
Returns
Nothing.
Description
Marks the beginning of an undo group, which allows a script to logically group all of its actions as a single
undoable action (for use with the Edit > Undo/Redo menu items). Use the endUndoGrou p() method to mark
the end of the group. (See “Application endUndoGroup() method” on page 22.)
b eg i nUndoGroup() and endUn doGrou p() pairs can be nested. Groups within groups become part of the
larger group, and will undo correctly. In this case, the names of inner groups are ignored.
Parameters
u n d o S t r in g The text that will appear for the Undo command in the Edit menu (that is, “Undo < un do St r i n g > ”)
Returns
Nothing.
Description
The name of the build of After Effects being run, used internally by Adobe for testing and troubleshooting.
Type
String; read-only.
21
JavaScript Reference Application object
22
Description
The number of the build of After Effects being run, used internally by Adobe for testing and troubleshooting.
Type
Integer; read-only.
Description
Removes the specified task from the queue of tasks scheduled for delayed execution.
Parameters
Returns
Nothing.
Description
Ends the suppression of script error dialog boxes in the user interface. Error dialogs are displayed by default;
call this method only if b eg i nSu ppres sD i al o g s( ) has previously been called. See “Application beginSuppress-
Dialogs() method” on page 21.
Parameters
a l er t Boolean; when true, errors that have occurred following the call to b e g i nSup pres sD i al o g s( ) are displayed in a
dialog box.
Returns
Nothing.
Description
Marks the end of an undo group begun with the [Link] g i nUndoGro up() method. You can use this method
to place an end to an undo group in the middle of a script, should you wish to use more than one undo group
for a single script.
If you are using only a single undo group for a given script, you do not need to use this method; in its absence
at the end of a script, the system will close the undo group automatically.
22
JavaScript Reference Application object
23
Calling this method without having set a b e g i n Un d o Grou p ( ) method yields an error.
Parameters
None.
Returns
Nothing.
Description
Parameters
None
Returns
Nothing.
See also
Description
This attribute is used only when executing a script from a command line on Windows. When the application
is launched from the command line, the – r or – s command line flag causes the application to run a script
(from a file or from a string, respectively).
If this attribute is set to true, After Effects will exit after the script is run; if it is false, the application will remain
open.
This attribute only has an effect when After Effects is run from the Windows command line. It has no effect
in Mac OS.
Type
Boolean; read/write.
23
JavaScript Reference Application object
24
Description
A numeric status code used when executing a script externally (that is, from a command line or AppleScript).
• In Windows, the value is returned on the command line when After Effects was launched on the commands
line (using the af ter f x or a f ter fx – m command), and a script was specified with the – r or – s option.
• in Mac OS, the value is returned as the AppleScript D oS c r i p t result for each script.
In both Mac OS and Windows, the value is set to 0 (E X I T _ S U C C E S S ) at the beginning of each script evalu-
ation. In the event of an error while the script is running, the script can set this to a positive integer that
indicates what error occurred.
Type
Integer; read/write.
Example
a pp. ex i tCo de = 2 ; / / on qui t, i f v a lue is 2, a n er ror ha s o ccu r re d
Description
Type
Boolean; read-only.
Description
True if the Watch Folder dialog box is currently displayed and the application is currently watching a folder
for rendering.
Type
Boolean; read-only.
Description
24
JavaScript Reference Application object
25
Type
Example
v ar l a n g = a pp. l a n g u ag e ;
if (lang == [Link])
a l er t( " Af te r E ff e c ts i s r u n n i n g i n E n g l i sh . " ) ;
e l s e if ( l a n g = = L a n g u a g e . F R E N C H )
a l er t ( " Af te r E ff e c ts i s r u n n i n g i n Fren ch. " ) ;
e l se
a l er t ( " Af te r E ff e c ts i s n o t r u n n in g in E n g l is h o r Fre n ch . " ) ;
Description
Type
Number; read-only.
Description
Creates a new project in After Effects, replicating the File > New > New Project menu command.
If the current project has been edited, the user is prompted to save it. If the user cancels out of the Save dialog
box, the new project is not created and the method returns null. Use a [Link] je c t .c lo se (C l os eO p -
t i o n s. D O_ N OT _ S AVE _ C H A N G E S ) to close the current project before opening a new one. See “Project
close() method” on page 112.
Parameters
None.
Returns
Example
a pp. pro je c t .cl o se( C l os eO p t i on s. D O _ N OT _ S AV E _ C H AN G E S );
a pp. n ew Proje c t( );
25
JavaScript Reference Application object
26
Description
The name of a callback function that is called when an error occurs. By creating a function and assigning it to
this attribute, you can respond to errors systematically; for example, you can close and restart the application,
noting the error in a log file if it occurred during rendering. See “RenderQueue render() method” on page 154.
The callback function is passed the error string and a severity string. It should not return any value.
Type
Example
f u n c t io n e r r ( e r r St r i n g ) {
a l er t( er rS t r in g );
}
a pp. on E r ror = er r ;
Description
Opens a project.
Parameters
file Optional. An ExtendScript File object for the project file to open. If not supplied, the method prompts the
user to select a project file.
Returns
A new Project object for the specified project, or null if the user cancels the Open dialog box.
Example
v ar my _file = new File (". ./my_folder/my_test .a ep");
i f (my _ fi l e . ex i st s) {
n e w _ p ro j e c t = a p p.o p e n ( my _ f i l e ) ;
i f (n e w _ proj e c t) {
a l er t( new _ proje c t.f i le.n ame) ;
}
}
26
JavaScript Reference Application object
27
Description
Loads color swatch data from an Adobe Swatch Exchange (ASE) file.
Parameters
Returns
Swa tchVa lue .t y p e One of " RG B " , " C M Y K" , " LA B" , " Gr ay "
Swa tchVa lue .r When t y p e = " RG B" , the color values in the range [0.0..1.0].
Swa tchVa lue .g 0, 0, 0 is Black.
Swa tchVa lue .b
Swa tchVa lue .c When t y p e = " C MY K " , the color values in the range [0.0..1.0].
Swa tchVa lue .m 0, 0, 0, 0 is White.
Swa tchVa lue .y
Swa tchVa lue .k
Swa tchVa lue .va lue When t y p e = " Gr ay " , the va lue range is [0.0..1.0].
0.0 is Black.
Description
Pauses or resumes the search of the target watch folder for items to render.
Parameters
Returns
Nothing.
27
JavaScript Reference Application object
28
See also
Description
The project that is currently loaded. See “Project object” on page 110.
Type
Description
Purges unused data of the specified types from memory. Replicates the Purge options in the Edit menu.
Parameters
t arg e t The type of elements to purge from memory; a Pur g eTa rg et enumerated value, one of:
• Pur g e Ta r ge t . A L L _ C AC HE S : Purges all data that After Effects has cached to physical memory.
• Purg e Tar ge t .UN D O _ C AC H E S : Purges all data saved in the undo cache.
• Pur g e Tar ge t . S NA P S HOT _ C AC H E S : Purges all data cached as comp/layer snapshots.
• Pur g e Ta r ge t . I M AG E _ C AC H E S : Purges all saved image data.
Returns
Nothing.
Description
Parameters
None.
Returns
Nothing.
28
JavaScript Reference Application object
29
Description
When true (the default), After Effects attempts to display a dialog box that allows you to save the current
project if an error causes the application to quit unexpectedly. Set to false to suppress this dialog box and quit
without saving.
Type
Boolean; read/write.
Description
Parameters
rep e at When true, execute the script repeatedly, with the specified delay between each execution. When false
the script is executed only once.
Returns
Integer, a unique identifier for this task, which can be used to cancel it with ap [Link] nce l Ta sk () .
Description
Sets memory usage limits as in the Memory & Cache preferences area. For both values, if installed RAM is less
than a given amount (n gigabytes), the value is a percentage of the installed RAM, and is otherwise a
percentage of n. The value of n is: 2 GB for 32-bit Windows, 4 GB for 64-bit Windows, 3.5 GB for Mac OS.
Parameters
Returns
Nothing.
Description
Set or clears the flag that determines whether preferences are saved when the application is closed.
29
JavaScript Reference Application object
30
Parameters
doS ave When true, preferences saved on quit, when false they are not.
Returns
Nothing.
Description
Type
Description
Type
String; read-only.
Example
v ar ver = a p p. vers i o n ;
a l er t( " T h i s m a chi n e is r un n in g versi o n " + ver + " o f Af ter E f fe c t s . " ) ;
Description
Parameters
Returns
Nothing.
Example
v ar t heFolder = new Folder(“c: /too l”);
a pp. wa tchFolder(theFolder);
30
JavaScript Reference Application object
31
See also
31
JavaScript Reference AVItem object
32
AVItem object
a pp. pro je c t .i tem ( i n d e x)
Description
The AVItem object provides access to attributes and methods of audio/visual files imported into After Effects.
• AVItem is a subclass of Item. All methods and attributes of Item, in addition to those listed below, are
available when working with AVItem. See “Item object” on page 77.
• AVItem is the base class for both CompItem and FootageItem, so AVItem attributes and methods are also
available when working with CompItem and FootageItem objects. See “CompItem object” on page 53 and
“FootageItem object” on page 65.
Attributes
name “AVItem name attribute” on page 35 The name of the object as shown in the Project panel.
p i xel As p e c t “AVItem pixelAspect attribute” on page 35 The pixel aspect ratio of the item.
f r a m eRa te “AVItem frameRate attribute” on page 34 The frame rate of the item.
f r a m eD ur a t i on “AVItem frameDuration attribute” on page 33 The frame duration for the item.
u s e Prox y “AVItem useProxy attribute” on page 38 When true, a proxy source is used for this item.
prox y S ou rce “AVItem proxySource attribute” on page 35 The FootageItem object used as proxy for the item.
u s e dIn “AVItem usedIn attribute” on page 38 The CompItem objects that use this item.
h as Vi de o “AVItem hasVideo attribute” on page 34 When true, the item has a video component.
h as Au di o “AVItem hasAudio attribute” on page 34 When true, the item has an audio component.
fo o t ag e M is s in g “AVItem footageMissing attribute” on When true, the item cannot be found or is a placeholder.
page 33
Methods
s e tProxy ( ) “AVItem setProxy() method” on page 36 Sets a proxy for the item.
s e tProxyWi thS e quence( ) “AVItem setProxyWithSequence() method” on Sets a sequence as a proxy for the item.
page 37
s e tProxyWi thS o lid ( ) “AVItem setProxyWithSolid() method” on Sets a solid as a proxy for the item.
page 37
s e tProxyWi thP l a ceh older( ) “AVItem setProxyWithPlaceholder() method” on Sets a placeholder as a proxy for the item.
page 36
s e tProxy ToNon e ( ) “AVItem setProxyToNone() method” on page 36 Removes the proxy for the item.
32
JavaScript Reference AVItem object
33
Description
Returns the duration, in seconds, of the item. Still footage items have a duration of 0.
• In a CompItem, the value is linked to the d u r a ti o n of the composition, and is read/write.
• In a FootageItem, the value is linked to the dur at i on of the m a i n S o u rce object, and is read-only.
Type
Floating-point value in the range [0.0..10800.0]; read/write for a CompItem; otherwise, read-only.
Description
When true, the AVItem is a placeholder, or represents footage with a source file that cannot be found. In this
case, the path of the missing source file is in the m i s s in g Fo o ta g e Pat h attribute of the footage item’s source-file
object. See “FootageItem mainSource attribute” on page 66 and “FileSource missingFootagePath attribute” on
page 61.
Type
Boolean; read-only.
Description
Returns the length of a frame for this AVItem, in seconds. This is the reciprocal of f r a m eRa te . When set, the
reciprocal is automatically set as a new f r am e R a te value.
This attribute returns the reciprocal of the f r am e R a te , which may not be identical to a value you set, if that
value is not evenly divisible into 1.0 (for example, 0.3). Due to numerical limitations, (1 / (1 / 0.3)) is close to,
but not exactly, 0.3.
If the AVItem is a FootageItem, this value is linked to the m a in S o u rce , and is read-only. To change it, set the
con f o r m Fr a m e R a te of the m a i n S o u rce object. This sets both the f r a m e R ate and f r a m e D u r at i o n of the
FootageItem.
Type
Floating-point value in the range [1/99.. 1.0]; read-only for a FootageItem, otherwise read/write.
33
JavaScript Reference AVItem object
34
Description
The frame rate of the AVItem, in frames-per-second. This is the reciprocal of the f r am e D u r a t ion . When set,
the reciprocal is automatically set as a new f r am e D u r a t ion value.
• In a CompItem, the value is linked to the f r a m eRa te of the composition, and is read/write.
• In a FootageItem, the value is linked to the f r a m e R ate of the m a i n S o u rce object, and is read-only. To change
it, set the confor mFr ame Rate of the m a i n S o u rce object. This sets both the fr ameR ate and fr ame D ur a ti on
of the FootageItem.
Type
Floating-point value in the range [1.0..99.0]; read-only for a FootageItem, otherwise read/write.
Description
Type
Boolean; read-only.
Description
Type
Boolean; read-only.
Description
34
JavaScript Reference AVItem object
35
• In a FootageItem, the value is linked to the m a i n S o u rce object, and is read/write only if the m a i n S o u rce
object is a SolidSource. Otherwise, it is read-only.
Type
Description
Type
String; read/write.
Description
Type
Description
The FootageSource being used as a proxy. The attribute is read-only; to change it, call any of the AVItem
methods that change the proxy source: se t Prox y ( ) , s e tProxyWi thS e quence( ) , se t Prox y Wi t hS o l i d () , or
s e t Proxy Wi thP l a ce h o l der ( ) .
Type
35
JavaScript Reference AVItem object
36
Description
Sets a file as the proxy of this AVItem. Loads the specified file into a new FileSource object, sets this as the value
of the prox y S ource attribute, and sets u se Prox y to true. It does not preserve the interpretation parameters,
instead using the user preferences. If the file has an unlabeled alpha channel, and the user preference says to
ask the user what to do, the method estimates the alpha interpretation, rather than asking the user.
This differs from setting a FootageItem's main source, but both actions are performed as in the user interface.
Parameters
Returns
None.
Description
Removes the proxy from this AVItem, sets the value of p roxy S o u rce to null, and sets the value of u se Prox y to
f al s e .
Parameters
None.
Returns
Nothing.
Description
Creates a PlaceholderSource object with specified values, sets this as the value of the prox y S ource attribute,
and sets u s e Prox y to true. It does not preserve the interpretation parameters, instead using the user prefer-
ences.
NOTE: There is no direct way to set a placeholder as a proxy in the user interface; this behavior occurs when a proxy
has been set and then moved or deleted.
Parameters
w i dt h, heig ht The pixel dimensions of the placeholder, an integer in the range [4..30000].
36
JavaScript Reference AVItem object
37
Returns
Nothing.
Description
Sets a sequence of files as the proxy of this AVItem, with the option of forcing alphabetical order. Loads the
specified file sequence into a new FileSource object, sets this as the value of the prox y S ource attribute, and sets
u s e Prox y to true. It does not preserve the interpretation parameters, instead using the user preferences. If any
file has an unlabeled alpha channel, and the user preference says to ask the user what to do, the method
estimates the alpha interpretation, rather than asking the user.
Parameters
file An ExtendScript File object for the first file in the sequence.
force Alp ha b e t ic a l When true, use the “Force alphabetical order” option.
Returns
Nothing.
Description
Creates a SolidSource object with specified values, sets this as the value of the prox y S ource attribute, and sets
u s e Prox y to true. It does not preserve the interpretation parameters, instead using the user preferences.
NOTE: There is no way, using the user interface, to set a solid as a proxy; this feature is available only through
scripting.
Parameters
co lor The color of the solid, an array of 3 floating-point values, [R, G, B], in the range [0.0..1.0].
w i dt h, heig ht The pixel dimensions of the placeholder, an integer in the range [1...30000].
p i xel As p e c t The pixel aspect of the solid, a floating-point value in the range [0.01... 100.0].
Returns
Nothing.
37
JavaScript Reference AVItem object
38
Description
The current time of the item when it is being previewed directly from the Project panel. This value is a number
of seconds. Use the global method t i m eTo Cur ren t Fo r m at to convert it to a string value that expresses the time
in terms of frames; see “timeToCurrentFormat() global function” on page 17.
It is an error to set this value for a FootageItem whose m a i n S o u rce is still (ite m .m ai n S ource .i s St i l l is true).
Type
Description
Type
Description
When true, a proxy is used for the item. It is set to true by all the S e t Prox y methods, and to false by the
S e tProx y ToNon e( ) method.
Type
Boolean; read/write.
Description
38
JavaScript Reference AVItem object
39
Type
39
JavaScript Reference AVLayer object
40
AVLayer object
a pp. pro je c t .i tem ( in d e x) .l ayer (i n de x )
Description
The AVLayer object provides an interface to those layers that contain AVItem objects (Comp layers, footage
layers, solid layers, text layers, and sound layers).
• AVLayer is a subclass of Layer. All methods and attributes of Layer, in addition to those listed below, are
available when working with AVLayer. See “Layer object” on page 84.
• AVLayer is a base class for TextLayer, so AVLayer attributes and methods are available when working with
TextLayer objects. See “TextLayer object” on page 173.
AE Properties
Different types of layers have different AE properties. AVLayer has the following properties and property
groups:
Ma r ker
Tim e Remap
Mot i on Tr a ckers
Ma sk s
Effects
Tr an s for m
Anchor Point
Pos i t i on
S c al e
Orientation
X Rot at i on
Y Rot at i o n
Rot at i o n
O p a ci t y
L ayer S t y l e s
Ma ter i al O p t i on s
C as ts S h a dow s
L i g ht Tr a n s m i ss i on
Acce p ts S h a dows
Acce p ts L i g h ts
Ambi ent
D i ff us e
S p e c u l ar
Shininess
Met al
Aud i o
Aud i o Le ve l s
Example
If the first item in the project is a CompItem, and the first layer of that CompItem is an AVLayer, the following
sets the layer qua l it y, s ta r t Ti m e , and i n Poi n t .
v ar f i r s t L aye r = a p p. p ro je c t .i te m ( 1 ) . l ayer (1 ) ;
first L [Link] alit y = L ayerQ ualit y.B EST;
f i r s t L aye r. s t a r t Ti m e = 1 ;
40
JavaScript Reference AVLayer object
41
f i r s t L aye r. i n Po i n t = 2 ;
Attributes
s o u rce “AVLayer source attribute” on page 48 The source item for this layer.
i s Na m e Fro m S o u rce “AVLayer isNameFromSource attribute” When true, the layer has no expressly set name,
on page 47 but contains a named source.
mo tionBlu r “AVLayer motionBlur attribute” on When true, the layer's motion blur is enabled.
page 47
e f fe c t sAc t ive “AVLayer effectsActive attribute” on When true, the layer's effects are active.
page 45
adju st mentLayer “AVLayer adjustmentLayer attribute” on When true, this is an adjustment layer.
page 42
t hree DPer Cha r “AVLayer threeDPerChar attribute” on When true, 3D is set on a per-character basis in
page 49 this text layer.
can S et Col l ap se Tr ans for ma tion “AVLayer canSetCollapseTransformation When true, it is legal to change the value of
attribute” on page 45 col l a ps e Tr a n sf or m a t i o n .
f r a m e Bl e n di n g Ty p e “AVLayer frameBlendingType attribute” The type of frame blending for the layer.
on page 46
t i m eRem ap E n ab l e d “AVLayer timeRemapEnabled attribute” When true, time remapping is enabled on this
on page 49 layer.
h as Au di o “AVLayer hasAudio attribute” on When true, the layer contains an audio compo-
page 46 nent.
a ud io Ac t ive “AVLayer audioActive attribute” on When true, the layer's audio is active at the cur-
page 42 rent time.
b l endi ngMo de “AVLayer blendingMode attribute” on The blending mode of the layer.
page 43
preser veTr a n spa rency “AVLayer preserveTransparency When true, preserve transparency is enabled.
attribute” on page 48
t r ackMat teTy p e “AVLayer trackMatteType attribute” on if layer has a track matte, specifies the way it is
page 50 applied.
41
JavaScript Reference AVLayer object
42
i s Tr a ck Ma tte “AVLayer isTrackMatte attribute” on When true, this layer is being used as a track
page 47 matte for the layer below it.
h as Tr a ck Ma tte “AVLayer hasTrackMatte attribute” on When true, the layer above is being used as a
page 46 track matte on this layer.
a utoO r i en t “AVLayer autoOrient attribute” on The type of automatic orientation for the layer.
page 43
Methods
a udio Ac t iveAtTime() “AVLayer audioActiveAtTime() method” Reports whether this layer's audio is
on page 43 active at a given time.
c al c u l ate Tr a n s for m From Poi n t s( ) “AVLayer calculateTransformFrom- Calculates a transformation from a set of
Points() method” on page 44 points in this layer.
rep l a c e S o u rce ( ) “AVLayer replaceSource() method” on Changes the source item for this layer.
page 48
s o u rce Rec t AtTi m e ( ) “AVLayer sourceRectAtTime() method” Retrieves the source rectangle of a layer.
on page 49
Description
Type
Boolean; read/write.
Description
Type
Boolean; read-only.
42
JavaScript Reference AVLayer object
43
Description
Returns true if this layer's audio will be active at the specified time.
For this method to return true, a ud io E n ab l ed must be true, no other layer with audio may be soloing unless
this layer is soloed too, and the time must be between the i n Poin t and outPoint of this layer.
Parameters
Returns
Boolean.
Description
When true, the layer's audio is enabled. This value corresponds to the audio toggle switch in the Timeline
panel.
Type
Boolean; read/write.
Description
Type
Description
Type
43
JavaScript Reference AVLayer object
44
Bl e n d in g Mod e .AD D
Bl e n d in g Mod e .AL PH A _ A DD
Bl e n d in g Mod e .C L A S S I C _ C O LOR _ BUR N
Bl e n d in g Mod e .C L A S S I C _ C O LOR _ D O D G E
Bl e n d in g Mod e .C L A S S I C _ D I F F E R E N C E
Bl e n d in g Mod e .C O LOR
Bl e n d in g Mod e .C O LOR _ BUR N
Bl e n d in g Mod e .C O LOR _ D O D G E
Bl e n d in g Mod e .DA N C I N G _ DI S S OLV E
Bl e n d in g Mod e .DA R K E N
Bl e n d in g Mod e .DA R K E R _ C OLO R
Bl e n d in g Mod e .D I F F E R E N C E
Bl e n d in g Mod e .D I S SO LVE
Bl e n d in g Mod e .E XC LUS I ON
Bl e n d in g Mod e .H A R D _ L I G HT
Bl e n d in g Mod e .H A R D _ M I X
Bl e n d in g Mod e .H UE
Bl e n d in g Mod e .L I G H T E N
Bl e n d in g Mod e .L I G H T E R _ C O LOR
Bl e n d in g Mod e .L I N E A R _ BU R N
Bl e n d in g Mod e .L I N E A R _ D O D G E
Bl e n d in g Mod e .L I N E A R _ L I G H T
Bl e n d in g Mod e .LU M I N E S C E N T _ PR E M U L
Bl e n d in g Mod e .LU M I N O S I T Y
Bl e n d in g Mod e .M ULT I PLY
Bl e n d in g Mod e .N O R M A L
Bl e n d in g Mod e .OV E R L AY
Bl e n d in g Mod e .PI N _ L I G H T
Bl e n d in g Mod e .S AT U RAT I O N
Bl e n d in g Mod e .S C R E E N
Bl e n d in g Mod e .S I L H OU E T E _ AL PH A
Bl e n d in g Mod e .S I L H OU E T T E _ LUM A
Bl e n d in g Mod e .S O F T _ L I G HT
Bl e n d in g Mod e .S T E N C I L _ A L PHA
Bl e n d in g Mod e .S T E N C I L _ LUM A
B l e n d in g Mod e . V I V I D _ L I G H T
Description
Parameters
p o i n tTop Lef t The top left point coordinates in the form of an array, [ x , y, z ] .
44
JavaScript Reference AVLayer object
45
Returns
Example
v ar n ew L ayer = com p.l ayers. ad d (n e wFoo ta ge );
n ew L ayer. th re eD L ayer = t r u e;
n e w L aye r. bl e n d i n g Mo de = B l en d i n g Mo d e . AL P H A _ A D D ;
v ar t r an s for m = n ew L ayer.c a l c ul ateTr a n s f o r m From Po i n t s ( t l , t r, bl ) ;
for(var sel in transform) {
n ew L ayer. t r a n sf or m [ se l ]. se tVa lue (t r an sfor m [s el ] ) ;
}
Description
True if it is legal to change the value of the co l l a ps eTr an sfor m at i on attribute on this layer.
Type
Boolean; read-only.
Description
True if it is legal to change the value of the t i m eRem ap E n ab l e d attribute on this layer.
Type
Boolean; read-only.
Description
Type
Boolean; read/write.
Description
True if the layer's effects are active, as indicated by the <f> icon next to it in the user interface.
45
JavaScript Reference AVLayer object
46
Type
Boolean; read/write.
Description
Type
Boolean; read-only.
Description
The type of frame blending to perform when frame blending is enabled for the layer.
Type
Description
Type
Boolean; read/write.
Description
True if the layer contains an audio component, regardless of whether it is audio-enabled or soloed.
Type
Boolean; read-only.
46
JavaScript Reference AVLayer object
47
Description
True if the layer in front of this layer is being used as a track matte on this layer. When true, this layer's t r a ck -
Ma tteTy p e value controls how the matte is applied.
Type
Boolean; read-only.
Description
Type
Floating-point; read-only.
Description
True if the layer has no expressly set name, but contains a named source. In this case, laye r. n am e has the same
value as l ay e r.s ource .nam e .
False if the layer has an expressly set name, or if the layer does not have a source.
Type
Boolean; read-only.
Description
True if this layer is being used as a track matte for the layer behind it.
Type
Boolean; read-only.
Description
Type
Boolean; read/write.
47
JavaScript Reference AVLayer object
48
Description
Type
Boolean; read/write.
Description
Type
Description
Parameters
f i xE x pres si o n s Tr ue to adjust expressions for the new source, fa l se otherwise. Note that this feature can be
resource-intensive; if replacing a large amount of footage, do this only at the end of the operation.
See also “Project autoFixExpressions() method” on page 111.
Returns
Nothing.
Description
The source AVItem for this layer. The value is null in a Text layer. Use AV L [Link] l a c e S o u rce ( ) to change the
value.
Type
48
JavaScript Reference AVLayer object
49
Description
Retrieves the rectangle bounds of the layer at the specified time index, corrected for text or shape layer content.
Use, for example, to write text that is properly aligned to the baseline.
Parameters
extents Tr ue to include the extents, fa l se otherwise. Extents apply to shape layers, increasing the size of
the layer bounds as necessary.
Returns
Description
Type
Boolean; read/write.
Description
True if this layer has the Enable Per-character 3D switch set, allowing its characters to be animated off the
plane of the text layer. Applies only to text layers.
Type
Boolean; read/write.
Description
Type
Boolean; read/write.
49
JavaScript Reference AVLayer object
50
Description
If this layer has a track matte, specifies the way the track matte is applied.
Type
Description
Type
Floating-point; read-only.
50
JavaScript Reference CameraLayer object
51
CameraLayer object
a pp. pro je c t .i tem ( in d e x) .l ayer(i n de x )
Description
The CameraLayer object represents a camera layer within a composition. Create it using the LayerCollection
object’s a d dC am er a method; see “LayerCollection addCamera() method” on page 94. It can be accessed in an
item’s layer collection either by index number or by a name string.
• CameraLayer is a subclass of Layer. All methods and attributes of Layer are available when working with
CameraLayer. See “Layer object” on page 84.
AE Properties
CameraLayer defines no additional attributes, but has different AE properties than other layer types. It has the
following properties and property groups:
Ma r ker
Tr an s for m
Poi n t of In teres t
Pos i t i on
S c al e
Orientation
X Rot at i on
Y Rot at i o n
Rot at i o n
O p a ci t y
C a m e r a O p t i on s
Zoom
D ep th of F i e ld
Foc u s D i st an ce
Blu r Le ve l
51
JavaScript Reference Collection object
52
Collection object
Like an array, a collection associates a set of objects or values as a logical group and provides access to them
by index. However, most collection objects are read-only. You do not assign objects to them yourself—their
contents update automatically as objects are created or deleted.
The index numbering of a collection starts with 1, not 0.
Objects
ItemCol l ec t i on “ItemCollection object” on page 80 All of the items (imported files, folders, solids, and so on) found in
the Project panel.
O MCol l ec t i on “OMCollection object” on page 105 All of the Output Module items in the project.
RQ Item Col le c t ion “RenderQueueItem object” on All of the render-queue items in the project.
page 156
Attributes
Methods
[] Retrieves an object in the collection by its index number. The first object is at index 1.
52
JavaScript Reference CompItem object
53
CompItem object
a pp. pro je c t .i tem ( i n d e x)
a pp. pro je c t .i tem s [ inde x ]
Description
The CompItem object represents a composition, and allows you to manipulate and get information about it.
Access the objects by position index number in a project’s i te m collection.
• CompItem is a subclass of AVItem, which is a subclass of Item. All methods and attributes of AVItem and
Item, in addition to those listed below, are available when working with CompItem. See “AVItem object” on
page 32 and “Item object” on page 77.
Example
Given that the first item in the project is a CompItem, the following code displays two alerts. The first shows
the number of layers in the CompItem, and the second shows the name of the last layer in the CompItem.
v ar f i r s t Co m p = a p p. p ro je c t .i te m ( 1 ) ;
a l er t ( " nu m b e r o f l ayer s i s " + f i r s t Co m [Link] L aye r s ) ;
a l er t( " n a m e of l a st l ayer i s " + f i rs t Co m p.l ayer ( f i r s t Com p.n u m L aye rs ) . n a m e ) ;
Attributes
wor k Area St ar t “CompItem workAreaStart attribute” on The work area start time.
page 60
h id eS hy L ayers “CompItem hideShyLayers attribute” on When true, shy layers are visible in the Timeline panel.
page 56
mo tionBlu r “CompItem motionBlur attribute” on When true, motion blur is enabled for this composi-
page 57 tion.
d r a ft 3 d “CompItem draft3d attribute” on When true, Draft 3D mode is enabled for the Compo-
page 55 sition panel.
f r a m e Bl e n di n g “CompItem frameBlending attribute” on When true, time filtering is enabled for this composi-
page 55 tion.
preser veNeste d Fr a m eRa te “CompItem preserveNestedFrameRate When true, the frame rate of nested compositions is
attribute” on page 57 preserved.
preser veNeste d Resolut i on “CompItem preserveNestedResolution When true, the resolution of nested compositions is
attribute” on page 58 preserved.
d i sp l ay S ta r t Ti m e “CompItem displayStartTime attribute” Changes the display of the start time in the Timeline
on page 55 panel.
53
JavaScript Reference CompItem object
54
res o lut i o n Fa c to r “CompItem resolutionFactor attribute” The factor by which the x and y resolution of the Com-
on page 58 position panel is downsampled.
renderer “CompItem renderer attribute” on The rendering plug-in module to be used to render
page 58 this composition.
renderers “CompItem renderers attribute” on The set of available rendering plug-in modules.
page 58
Methods
du pl i c ate( ) “CompItem duplicate() method” on page 55 Creates and returns a duplicate of this composition.
l ayer () “CompItem layer() method” on page 56 Gets a layer from this composition.
Description
The active camera, which is the front-most camera layer that is enabled. The value is null if the composition
contains no enabled camera layers.
Type
Description
The background color of the composition. The three array values specify the red, green, and blue components
of the color.
Type
An array containing three floating-point values, [R, G, B], in the range [0.0..1.0]; read/write.
54
JavaScript Reference CompItem object
55
Description
The time set as the beginning of the composition, in seconds. This is the equivalent of the Start Timecode or
Start Frame setting in the Composition Settings dialog box.
Type
Floating-point value in the range [0.0...86339.0] (1 second less than 25 hours); read/write.
Description
When true, Draft 3D mode is enabled for the Composition panel. This corresponds to the value of the Draft
3D button in the Composition panel.
Type
Boolean; read/write.
Description
Creates and returns a duplicate of this composition, which contains the same layers as the original.
Parameters
None.
Returns
CompItem object.
Description
When true, frame blending is enabled for this Composition. Corresponds to the value of the Frame Blending
button in the Composition panel.
Type
55
JavaScript Reference CompItem object
56
Description
The duration of a frame, in seconds. This is the inverse of the f r am e R a te value (frames-per-second).
Type
Floating-point; read/write.
Description
When true, only layers with s hy set to false are shown in the Timeline panel. When false, all layers are visible,
including those whose shy value is true. Corresponds to the value of the Hide All Shy Layers button in the
Composition panel.
Type
Boolean; read/write.
Description
Returns a Layer object, which can be specified by name, an index position in this layer, or an index position
relative to another layer.
Parameters
i n dex The index number of the desired layer in this composition. An integer in the range [1...num-
Layers], where n u m Laye r s is the number of layers in the composition.
—or—
otherL ayer A Layer object in this composition. The re lIn d ex value is added to the index value of this
layer to find the position of the desired layer.
rel In dex The position of the desired layer, relative to o ther L ayer . An integer in the range [1–oth er-
L ayer. in d ex . . . numLayers–o ther L [Link] ], where n u m Laye r s is the number of
layers in the composition.
This value is added to the otherL ayer value to derive the absolute index of the layer to
return.
—or—
56
JavaScript Reference CompItem object
57
Returns
Layer object.
Description
A LayerCollection object that contains all the Layer objects for layers in this composition. See “LayerCollection
object” on page 93.
Type
Description
When true, motion blur is enabled for the composition. Corresponds to the value of the Motion Blur button
in the Composition panel.
Type
Boolean; read/write.
Description
Type
Integer; read-only.
Description
When true, the frame rate of nested compositions is preserved in the current composition. Corresponds to the
value of the “Preserve frame rate when nested or in render queue” option in the Advanced tab of the Compo-
sition Settings dialog box.
Type
Boolean; read/write.
57
JavaScript Reference CompItem object
58
Description
When true, the resolution of nested compositions is preserved in the current composition. Corresponds to the
value of the “Preserve Resolution When Nested” option in the Advanced tab of the Composition Settings
dialog box.
Type
Boolean; read/write.
Description
The current rendering plug-in module to be used to render this composition, as set in the Advanced tab of the
Composition Settings dialog box. Allowed values are the members of c o m p Ite m .renderers .
Type
String; read/write.
Description
The available rendering plug-in modules. Member strings reflect installed modules, as seen in the Advanced
tab of the Composition Settings dialog box.
Type
Description
Type
58
JavaScript Reference CompItem object
59
Description
All of the selected layers in this composition. This is a 0-based array (the first object is at index 0).
Type
Description
All of the selected properties (Property and PropertyGroup objects) in this composition. The first property is
at index position 0.
Type
Description
The shutter angle setting for the composition. This corresponds to the Shutter Angle setting in the Advanced
tab of the Composition Settings dialog box.
Type
Description
The shutter phase setting for the composition. This corresponds to the Shutter Phase setting in the Advanced
tab of the Composition Settings dialog box.
Type
Description
The duration of the work area in seconds. This is the difference of the start-point and end-point times of the
Composition work area.
59
JavaScript Reference CompItem object
60
Type
Floating-point; read/write.
Description
Type
Floating-point; read/write.
60
JavaScript Reference FileSource object
61
FileSource object
a pp. pro je c t .i tem ( in d e x) . m a i n S o u rce
a pp. pro je c t .i tem ( in d e x) .p roxySo urce
Description
Attributes
f i le “FileSource file attribute” on page 61 The file that defines this asset.
m i s s i n g Fo ot a g e Pat h “FileSource missingFootagePath attribute” The file that contains footage missing from this asset.
on page 61
Methods
rel o a d () “FileSource reload() method” on page 62 Reloads the asset from the file, if it is a m a in S o u rce of
a FootageItem.
Description
The ExtendScript File object for the file that defines this asset. To change the value:
• If this FileSource is a prox y S ource of an AVItem, call s e t Prox y ( ) or se tProx y Wi th S equ ence( ) .
• If this FileSource is a m a i n S o u rce of a FootageItem, call rep l ace( ) or repla ceWith S equence() .
Type
Description
The path and filename of footage that is missing from this asset. See also “AVItem footageMissing attribute”
on page 33.
Type
String; read-only.
61
JavaScript Reference FileSource object
62
Description
Reloads the asset from the file. This method can be called only on a m a i n S o u rce , not a p roxy S o u rce .
Parameters
None.
Returns
Nothing.
62
JavaScript Reference FolderItem object
63
FolderItem object
a pp. pro je c t .FolderItem
Description
The FolderItem object corresponds to a folder in your Project panel. It can contain various types of items
(footage, compositions, solids) as well as other folders.
Example
Given that the second item in the project is a FolderItem, the following code puts up an alert for each top-level
item in the folder, showing that item’s name.
v ar secondItem = [Link] ec t. item(2 );
if ( !(secondItem inst anceof Fo lderItem) ) {
a l er t("problem: se cond item is no t a folder");
} else {
for ( i = 1 ; i <= s econd [Link] m Item s; i + +) {
a l er t ( " i tem nu m b e r " + i + " w i t h in t h e f o l d e r i s n a m e d "
+ se cond Item .item( i) .n ame) ;
}
}
Attributes
nu m Item s “FolderItem numItems attribute” on page 64 The number of items contained in the folder.
Methods
Description
Returns the top-level item in this folder at the specified index position. Note that “top-level” here means top-
level within the folder, not necessarily within the project.
Parameters
i n dex An integer, the position index of the item to retrieve. The first item is at index 1.
Returns
Item object.
63
JavaScript Reference FolderItem object
64
Description
An ItemCollection object containing Item object that represent the top-level contents of this folder.
Unlike the ItemCollection in the Project object, this collection contains only the top-level items in the folder.
Top-level within the folder is not the same as top-level within the project. Only those items that are top-level
in the root folder are also top-level in the Project.
Type
Description
The number of items contained in the i te m s collection (fold e r Ite m .item s. l en gth ).
If the folder contains another folder, only the FolderItem for that folder is counted, not any subitems
contained in it.
Type
64
JavaScript Reference FootageItem object
65
FootageItem object
a pp. pro je c t .i tem ( i n d e x)
a pp. pro je c t .i tem s [ inde x ]
Description
The FootageItem object represents a footage item imported into a project, which appears in the Project panel.
These are accessed by position index number in a project’s i tem collection.
• FootageItem is a subclass of AVItem, which is a subclass of Item. All methods and attributes of AVItem and
Item, in addition to those listed below, are available when working with FootageItem. See “AVItem object”
on page 32 and “Item object” on page 77.
Attributes
m a i n S o u rce “FootageItem mainSource attribute” on page 66 All settings related to the footage item.
Methods
rep l ace( ) “FootageItem replace() method” on Replaces a footage file with another footage file.
page 66
replaceWit hP laceho lder( ) “FootageItem replaceWithPlaceholder() Replaces a footage file with a placeholder object.
method” on page 66
replaceWit hSe quence() “FootageItem replaceWithSequence() Replaces a footage file with an image sequence.
method” on page 67
Description
Type
65
JavaScript Reference FootageItem object
66
Description
The footage source, an object that contains all of the settings related to that footage item, including those that
are normally accessed through the Interpret Footage dialog box. The attribute is read-only. To change its value,
call one of the FootageItem “replace” methods.
See the “FootageSource object” on page 68, and its three types:
• “SolidSource object” on page 169
• “FileSource object” on page 61
• “PlaceholderSource object” on page 109
If this is a FileSource object, and the f o o t a g e M i s s i n g value is true, the path to the missing footage file is in the
F i l e S o u rce.m is s in g Fo o t ag e Pa th attribute. See “AVItem footageMissing attribute” on page 33 and “FileSource
missingFootagePath attribute” on page 61.
Type
Description
Changes the source of this FootageItem to the specified file. In addition to loading the file, the method creates
a new FileSource object for the file and sets m a i n S o u rce to that object. In the new source object, it sets the
n a m e , w i d th , heig ht , f r a m eD ur a t i on , and du r at i on attributes (see “AVItem object” on page 32) based on the
contents of the file.
The method preserves interpretation parameters from the previous m a in S o u rce object. If the specified file has
an unlabeled alpha channel, the method estimates the alpha interpretation.
Parameters
file An ExtendScript File object for the file to be used as the footage main source.
Description
Changes the source of this FootageItem to the specified placeholder. Creates a new PlaceholderSource object,
sets its values from the parameters, and sets m a in S o u rce to that object.
Parameters
h eig h t The height of the placeholder in pixels, an integer in the range [4..30000].
66
JavaScript Reference FootageItem object
67
f r a m eRa te The frame rate of the placeholder, a floating-point value in the range [1.0..99.0]
du r at i on The duration of the placeholder in seconds, a floating-point value in the range [0.0..10800.0].
Description
Changes the source of this FootageItem to the specified image sequence. In addition to loading the file, the
method creates a new FileSource object for the file and sets m a i n S o u rce to that object. In the new source
object, it sets the n am e , w id t h , h ei g h t , fr ameD u r at ion , and dur a t i on attributes (see “AVItem object” on
page 32) based on the contents of the file.
The method preserves interpretation parameters from the previous m a in S o u rce object. If the specified file has
an unlabeled alpha channel, the method estimates the alpha interpretation.
Parameters
file An ExtendScript File object for the first file in the sequence to be used as the footage main source.
force Alp ha b e t ic a l When true, use the “Force alphabetical order” option.
Description
Changes the source of this FootageItem to the specified solid. Creates a new SolidSource object, sets its values
from the parameters, and sets m a i n S o u rce to that object.
Parameters
co lor The color of the solid, an array of three floating-point values, [R, G, B], in the range [0.0..1.0].
h eig h t The height of the solid in pixels, an integer in the range [4..30000].
p i xel As p e c t The pixel aspect ratio of the solid, a floating-point value in the range [0.01..100.0].
67
JavaScript Reference FootageSource object
68
FootageSource object
a pp. pro je c t .i tem ( in d e x) .m a i n S o u rce
a pp. pro je c t .i tem ( in d e x) .p roxySo urce
Description
The FootageSource object holds information describing the source of some footage. It is used as the
m a i n S o u rce of a FootageItem, or the prox y S ou rce of a CompItem or FootageItem. See “FootageItem object”
on page 65 and “CompItem object” on page 53.
• FootageSource is the base class for SolidSource, so FootageSource attributes and methods are available
when working with SolidSource objects. See “SolidSource object” on page 169.
Attributes
i nver t A l pha “FootageSource invertAlpha attribute” When true, an alpha channel in a footage clip or
on page 71 proxy should be inverted.
h ig hQ ua l it y F ie l dS epa r a ti on “FootageSource highQualityFieldSepa- How the fields are to be separated in non-still foot-
ration attribute” on page 71 age.
rem ovePu l l dow n “FootageSource removePulldown The pulldown type for the footage.
attribute” on page 72
l o op “FootageSource loop attribute” on How many times an image sequence is set to loop.
page 72
d i sp l ay Fr am e R ate “FootageSource displayFrameRate The effective frame rate as displayed and rendered
attribute” on page 69 in compositions by After Effects.
Methods
gu essAlph aMo de() “FootageSource guessAlphaMode() Estimates the alp haMo de setting.
method” on page 70
68
JavaScript Reference FootageSource object
69
Description
The alphaMode attribute of footageSource defines how the alpha information in the footage is to be inter-
preted. If hasAlpha is false, this attribute has no relevant meaning.
Type
Description
A frame rate to use instead of the n a t ive Fr a m e R a te value. If set to 0, the n a t iveFr a m e R a te is used instead.
It is an error to set this value if Fo o t a g e S o urce . i s S t i l l is true. It is an error to set this value to 0 if rem ove -
Pul l dow n is not set to Pu l l dow n P h a se . O F F. If this is 0 when you set rem ovePul ld ow n to a value other than
Pul l dow n Ph a s e . O F F, then this is automatically set to the value of n a t iveFr a m e Ra te .
Type
Description
The effective frame rate as displayed and rendered in compositions by After Effects.
If rem ove Pul l dow n is Pu l l dow n P h a s e . O F F, then this is the same as the con fo r m Fr a m e R ate (if non-zero) or
the n a t iveFr a m e R a te (if con f o r m Fr a m e R ate is 0). If rem ovePu l l dow n is not Pu l l dow n P h a se . O F F, this is
con f o r m Fr a m e R a te * 0.8, the effective frame rate after removing 1 of every 5 frames.
Type
69
JavaScript Reference FootageSource object
70
Description
Type
Description
Sets a lp ha Mode , premu l Col or, and inver tAl ph a to the best estimates for this footage source. If h as Al p ha is
false, no change is made.
Parameters
None.
Returns
Nothing.
Description
Sets f i e l d S e p a r a t i o n Ty p e and rem ove Pul l dow n to the best estimates for this footage source. If i s S t il l is true,
no change is made.
Parameters
method The method to use for estimation. A Pul l dow n Met ho d enumerated value, one of:
Pul l d ow n Met h o d. PU L L D OW N _ 3 _ 2
Pul l dow n Met ho d. ADVANCE _24P
Returns
Nothing.
70
JavaScript Reference FootageSource object
71
Description
When true, the footage has an alpha component. In this case, the attributes a lp ha Mode , i nver t A lp h a , and
premu l Col or have valid values. When false, those attributes have no relevant meaning for the footage.
Type
Boolean; read-only.
Description
When true, After Effects uses special algorithms to determine how to perform high-quality field separation.
It is an error to set this attribute if i sS t i l l is true, or if f i e l d S e p a r a t i o n Ty p e is F i e l d S e p a r a t i o n Ty p e .O F F.
Type
Boolean; read/write.
Description
Type
Boolean; read/write.
Description
When true the footage is still; when false, it has a time-based component.
Examples of still footage are JPEG files, solids, and placeholders with duration of 0. Examples of non-still
footage are movie files, sound files, sequences, and placeholders of non-zero duration.
Type
Boolean; read-only.
71
JavaScript Reference FootageSource object
72
Description
The number of times that the footage is to be played consecutively when used in a composition.
It is an error to set this attribute if i sS t i l l is true.
Type
Description
Type
Floating-point; read/write.
Description
The color to be premultiplied. This attribute is valid only if the a l pha Mod e is a l pha Mo de.P RE MULT I P L I E D.
Type
Description
Type
72
JavaScript Reference FootageSource object
73
73
JavaScript Reference ImportOptions object
74
ImportOptions object
n e w Im p o r t O p t i on s ( ) ;
n e w Im p o r t O p t i on s ( file ) ;
Description
The ImportOptions object encapsulates the options used to import a file with the Proj ec t. i m p or t F il e
methods. See “Project importFile() method” on page 113.
The constructor takes an optional parameter, an ExtendScript File object for the file. If it is not supplied, you
must explicitly set the value of the f i l e attribute before using the object with the i m p o r tF i l e method. For
example:
n e w Im p o r t O p t i on s ( ) . f i l e = n e w F i l e ( "my f i le . p s d " ) ;
Attributes
s e qu e n ce “ImportOptions sequence attribute” on When true, import a sequence of files, rather than an individ-
page 76 ual file.
force Alp ha b e ti c a l “ImportOptions forceAlphabetical When true, the “Force alphabetical order” option is set.
attribute” on page 75
f i le “ImportOptions file attribute” on The file to import, or the first file of the sequence to import.
page 75
Methods
Description
Reports whether the file can be imported as the source of a particular object type. If this method returns true,
you can set the given type as the value of the i m p o r tAs attribute. See “ImportOptions importAs attribute” on
page 75.
Parameters
type The type of file that can be imported. An Im p or tAs Ty p e enumerated value; one of:
Im p o r t AsTy p e . C OM P
Im p o r t AsTy p e . F O OTAG E
Im p o r t AsTy p e . C OM P_ C ROP PE D_ L AY E R S
Im p o r t AsTy p e . PRO J E C T
74
JavaScript Reference ImportOptions object
75
Returns
Boolean.
Example
v ar i o = n e w Im p o r t O p ti o n s (F i l e ( “c :\ \ myF i l e . ps d ” )) ;
i f io. c an Im p o r t As (Im p o r tAs Ty p e .C O M P ) ;
i o.i m p o r tAs = Im p o r tAs Ty p e.C O M P;
Description
The file to be imported. If a file is set in the constructor, you can access it through this attribute.
Type
Description
When true, has the same effect as setting the “Force alphabetical order” option in the File > Import > File
dialog box.
Type
Boolean; read/write.
Description
The type of object for which the imported file is to be the source. Before setting, use can Im p or tAs to check
that a given file can be imported as the source of the given object type. See “ImportOptions canImportAs()
method” on page 74.
Type
75
JavaScript Reference ImportOptions object
76
Description
Type
Boolean; read/write.
76
JavaScript Reference Item object
77
Item object
a pp. pro je c t .i tem ( i n dex )
a pp. pro je c t .i te m s [ in d ex ]
Description
The Item object represents an item that can appear in the Project panel.
The first item is at index 1.
• Item is the base class for AVItem and for FolderItem, which are in turn the base classes for various other
item types, so Item attributes and methods are available when working with all of these item types. See
“AVItem object” on page 32 and “FolderItem object” on page 63.
Attributes
name “Item name attribute” on page 78 The name of the object as shown in the Project panel.
p aren tFol de r “Item parentFolder attribute” on page 78 The parent folder of this item.
s e l e c te d “Item selected attribute” on page 79 When true, this item is currently selected.
Methods
rem ove( ) “Item remove() method” on page 79 Deletes the item from the project.
Example
This example gets the second item from the project and checks that it is a folder. It then removes from the
folder any top-level item that is not currently selected. It also checks to make sure that, for each item in the
folder, the parent is properly set to the correct folder.
v ar my Folder = a [Link] c [Link] (2);
i f (my Fo ld e r. t y p e Nam e ! = " Fo l d e r " ) {
a l er t( " e r ro r : s e con d i te m i s n o t a fo ld e r " );
}
e l se {
v ar nu mInFolder = my Fo [Link];
/ / A lw ay s r u n l o o p s b a ck wa rds w h en del e t i n g th i n g s:
f o r ( i = n u m In Fo l d e r ; i > = 1 ; i- - ) {
v ar c ur Item = my Fol d er. item (i ) ;
i f ( c ur Item .p aren tFol der != myFol der ) {
a l er t( "er ror w i th in A E : t he p arent Fold er i s no t s et cor re c t ly") ;
}
e l se {
i f ( ! c u rIte m . s e l e c t e d & & c u r Item . t y p eNam e = = " Fo ot a g e " ) {
/ / fo un d a n u n se l e c te d s o l i d .
c u r Item . rem ove ( ) ;
77
JavaScript Reference Item object
78
}
}
}
}
Description
A string that holds a comment, up to 15,999 bytes in length after any encoding conversion. The comment is
for the user's purpose only; it has no effect on the item's appearance or behavior.
Type
String; read/write.
Item id attribute
a pp. pro je c t .i tem ( in d e x) .i d
Description
A unique and persistent identification number used internally to identify an item between sessions. The value
of the ID remains the same when the project is saved to a file and later reloaded. However, when you import
this project into another project, new IDs are assigned to all items in the imported project. The ID is not
displayed anywhere in the user interface.
Type
Integer; read-only.
Description
Type
String; read/write.
Description
The FolderItem object for the folder that contains this item. If this item is at the top level of the project, this
is the project's root folder (a p p.p ro je c t .ro o t Fol d e r ). You can use the ItemCollection’s ad d Fo l d e r method to
add a new folder, and set this value to put items in the new folder. See “ItemCollection addFolder() method”
on page 80.
78
JavaScript Reference Item object
79
Type
Example
This script creates a new FolderItem in the Project panel and moves compositions into it.
/ / c re a t e a n e w Fol d e r Ite m i n p ro j e c t , w i t h n a m e “co m p s”
v ar compFolder = [Link] ec t. items. a ddFo l der(“com ps” );
/ / m ove a l l com p o s i t i o n s i n t o n e w f o l d e r by s e t t in g
/ / com p Ite m’s p a ren t Fol d e r to “com p s” f o l d e r
for ( v a r i = 1 ; i <= a p p.p ro j e c t . num Item s ; i + +) {
i f (a pp. pro j e c t . i tem ( i ) i n s ta n ce o f C om pIte m )
a pp. pro je c t .i tem( i ). pa rent Fol der = compFol d er ;
}
Description
Deletes this item from the project and from the Project panel. If the item is a FolderItem, all the items
contained in the folder are also removed from the project. No files or folders are removed from disk.
Parameters
None.
Returns
Nothing.
Description
When true, this item is selected. Multiple items can be selected at the same time. Set to true to select the item
programmatically, or to false to deselect it.
Type
Boolean; read/write.
Description
A user-readable name for the item type; for example, “Folder”, “Footage”, or “Composition”.
Type
String; read-only.
79
JavaScript Reference ItemCollection object
80
ItemCollection object
a pp. pro je c t .i tem s
Description
The ItemCollection object represents a collection of items. The ItemCollection belonging to a Project object
contains all the Item objects for items in the project. The ItemCollection belonging to a FolderItem object
contains all the Item objects for items in that folder.
• ItemCollection is a subclass of Collection. All methods and attributes of Collection, in addition to those
listed below, are available when working with ItemCollection. See “Collection object” on page 52.
Methods
a d dCom p ( ) “ItemCollection addComp() method” on Creates a new CompItem object and adds it to the collection.
page 80
a d dFol der( ) “ItemCollection addFolder() method” on Creates a new FolderItemobject and adds it to the collection.
page 80
Description
Creates a new composition. Creates and returns a new CompItem object and adds it to this collection.
If the ItemCollection belongs to the project or the root folder, then the new item’s p aren tFol de r is the root
folder. If the ItemCollection belongs to any other folder, the new item’s pa ren tFol der is that Fol d erItem .
Parameters
h eig h t The height of the composition in pixels, an integer in the range [4..30000].
p i xel As p e c t The pixel aspect ratio of the composition, a floating-point value in the range [0.01..100.0].
du r at i on The duration of the composition in seconds, a floating-point value in the range [0.0..10800.0].
f r a m eRa te The frame rate of the composition, a floating-point value in the range [1.0..99.0]
Returns
CompItem object.
Description
Creates a new folder. Creates and returns a new FolderItem object and adds it to this collection.
80
JavaScript Reference ItemCollection object
81
If the ItemCollection belongs to the project or the root folder, then the new folder’s pa ren tFol der is the root
folder. If the ItemCollection belongs to any other folder, the new folder’s p a ren t Fol d e r is that FolderItem .
To put items in the folder, set the item object’s p aren tFol de r attribute; see “Item parentFolder attribute” on
page 78.
Parameters
Returns
FolderItem object.
Example
This script creates a new FolderItem in the Project panel and moves compositions into it.
/ / c re a t e a n e w Fol d e r Ite m i n p ro j e c t , w i t h n a m e “co m p s”
v ar compFolder = [Link] ec t. items. a ddFo l der(“com ps” );
/ / m ove a l l com p o s i t i o n s i n t o n e w f o l d e r by s e t t in g
/ / com p Ite m’s p a ren t Fol d e r to “com p s” f o l d e r
for ( v a r i = 1 ; i <= a p p.p ro j e c t . num Item s ; i + +) {
i f (a pp. pro j e c t . i tem ( i ) i n s ta n ce o f C om pIte m )
a pp. pro je c t .i tem( i ). pa rent Fol der = compFol d er ;
}
81
JavaScript Reference KeyframeEase object
82
KeyframeEase object
my Ke y = n ew Ke y f r am e E as e( s p e e d, i n f l u e n c e );
Description
The KeyframeEase object encapsulates the keyframe ease settings of a layer’s AE property. Keyframe ease is
determined by the speed and influence values that you set using the property’s s e tTem p or al E a se At Ke y
method. See “Property setTemporalEaseAtKey() method” on page 137.
The constructor creates a KeyframeEase object. Both parameters are required.
• s p e e d : A floating-point value. Sets the sp ee d attribute.
• i n f lu en ce : A floating-point value in the range [0.1..100.0]. Sets the in f lu en ce attribute.
Example
This example assumes that the Position, a spatial property, has more than two keyframes.
v ar e a s e In = n e w Ke y fr am e E as e ( 0 .5 , 5 0 ) ;
v ar e a s e Out = n e w Ke y fr am e E as e ( 0 .7 5 , 8 5 ) ;
v ar my Pos i t i o n Pro p e r t y = a p p. p ro je c t . i te m ( 1) .l ayer (1 ).p rop er t y (" Po si t i on " )
my Pos i t i o n Pro p e r t y. se tTem p o r a l E as e At Ke y ( 2 , [ e a se In ], [ e a se Ou t ] ) ;
This example sets the Scale, a temporal property with either two or three dimensions. For 2D and 3D
properties you must set an e as eIn and easeO ut value for each dimension:
v ar e a s e In = n e w Ke y fr am e E as e ( 0 .5 , 5 0 ) ;
v ar e a s e Out = n e w Ke y fr am e E as e ( 0 .7 5 , 8 5 ) ;
v ar my S c a l e Prop e r t y = a p p. p ro je c t .i te m ( 1 ) . l ayer (1 ) . p rop e r t y ( " S c a l e " )
my Sca l eProp er t [Link] tTempor alEa s eAt Ke y (2, [ea se In, ea seIn , easeIn ], [ea seO ut, ea seO ut , ea seO ut ]);
Attributes
speed “KeyframeEase speed attribute” on page 83 The speed setting for a keyframe.
Description
The influence value of the keyframe, as shown in the Keyframe Velocity dialog box.
Type
82
JavaScript Reference KeyframeEase object
83
Description
The speed value of the keyframe. The units depend on the type of keyframe, and are displayed in the Keyframe
Velocity dialog box.
Type
83
JavaScript Reference Layer object
84
Layer object
a pp. pro je c t .i tem ( in d e x) .l ayer(i n de x )
Description
The Layer object provides access to layers within compositions. It can be accessed from an item’s layer
collection either by index number or by a name string.
• Layer is the base class for CameraLayer, TextLayer, LightLayer, and AVLayer, so Layer attributes and
methods are available when working with all layer types. See “AVLayer object” on page 40,
“CameraLayer object” on page 51, “LightLayer object” on page 98, and “TextLayer object” on page 173.
Layers contain AE properties, in addition to their JavaScript attributes and methods. For examples of how to
access properties in layers, see “PropertyBase object” on page 141.
Example
If the first item in the project is a CompItem, this example disables the first layer in that composition and
renames it. This might, for example, turn an icon off in the composition.
v ar f i r s t L aye r = a p p. p ro je c t .i te m ( 1 ) . l ayer (1 ) ;
f i r st L aye [Link] a bl e d = f al s e ;
first L [Link] m e = "D isa ble d Layer";
Attributes
i n dex “Layer index attribute” on page 88 The index position of the layer.
time “Layer time attribute” on page 92 The current time of the layer.
s t retch “Layer stretch attribute” on page 92 The time stretch percentage of the layer.
i n Poi n t “Layer inPoint attribute” on page 88 The “in” point of the layer.
solo “Layer solo attribute” on page 92 When true, the layer is soloed.
l o cke d “Layer locked attribute” on page 88 When true, the layer is locked.
h as Vi de o “Layer hasVideo attribute” on page 87 When true, the layer contains a video component.
a c t ive “Layer active attribute” on page 85 When true, the layer is active at the current time.
nu l l L aye r “Layer nullLayer attribute” on page 90 When true, this is a null layer.
s e l e c t e d Pro p e r t i e s “Layer selectedProperties attribute” on page 91 All selected AE properties in the layer.
com m e n t “Layer comment attribute” on page 86 A descriptive comment for the layer.
con t a i n i n g Com p “Layer containingComp attribute” on page 86 The composition that contains this layer.
84
JavaScript Reference Layer object
85
i s Na m e S e t “Layer isNameSet attribute” on page 88 When true, the layer’s name has been explicitly set.
Methods
rem ove( ) “Layer remove() method” on page 91 Deletes the layer from the composition.
m oveToB e g i n n i n g ( ) “Layer moveToBeginning() method” on Moves the layer to the top of the composition (makes it the
page 89 first layer).
m oveToE n d ( ) “Layer moveToEnd() method” on Moves the layer to the bottom of the composition (makes it
page 89 the last layer).
moveAfter() “Layer moveAfter() method” on page 88 Moves the layer below another layer.
m oveB e f ore( ) “Layer moveBefore() method” on Moves the layer above another layer.
page 89
copy ToCom p ( ) “Layer copyToComp() method” on Copies the layer to the top (beginning) of another compo-
page 87 sition.
a c t iveAtTim e() “Layer activeAtTime() method” on Reports whether this layer will be active at a specified time.
page 85
s e tPare n t Wi th Ju m p ( ) “Layer setParentWithJump() method” Sets a new parent for this layer.
on page 91
a pp ly Pre se t( ) “Layer applyPreset() method” on Applies a named collection of animation settings to the
page 86 layer.
Description
Type
Boolean; read-only.
Description
Returns true if this layer will be active at the specified time. To return true, the layer must be enabled, no other
layer may be soloing unless this layer is soloed too, and the time must be between the in Poi n t and o utPoi n t
values of this layer.
85
JavaScript Reference Layer object
86
Parameters
Returns
Boolean.
Description
Applies the specified collection of animation settings (an animation preset) to the layer. Predefined animation
preset files are installed in the Presets folder, and users can create new animation presets through the user
interface.
Parameters
pres e tNam e An ExtendScript File object for the file containing the animation preset.
Returns
Nothing.
Description
Type
String; read/write.
Description
Type
86
JavaScript Reference Layer object
87
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 ayer s collection in the target
CompItem. Retrieve the copy using i n t o Com [Link]( 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.
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.
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.
Description
When true, the layer has a video switch (the eyeball icon) in the Timeline panel; otherwise false.
87
JavaScript Reference Layer object
88
Type
Boolean; read-only.
Description
Type
Description
Type
Floating-point value in the range [-10800.0..10800.0] (minus or plus three hours); read/write.
Description
True if the value of the n a m e attribute has been set explicitly, rather than automatically from the source.
Type
Boolean; read-only.
Description
When true, the layer is locked; otherwise false. This croplands to the lock toggle in the Layer panel.
Type
Boolean; read/write.
Description
Moves this layer to a position immediately after (below) the specified layer.
88
JavaScript Reference Layer object
89
Parameters
Returns
Nothing.
Description
Moves this layer to a position immediately before (above) the specified layer.
Parameters
Returns
Nothing.
Description
Moves this layer to the topmost position of the layer stack (the first layer).
Parameters
None.
Returns
Nothing.
Description
Moves this layer to the bottom position of the layer stack (the last layer).
Parameters
None.
Returns
Nothing.
89
JavaScript Reference Layer object
90
Description
The name of the layer. By default, this is the same as the Source name (which cannot be changed in the Layer
panel), but you can set it to be different.
Type
String; read/write.
Description
When true, the layer was created as a null object; otherwise false.
Type
Boolean; read-only.
Description
Type
Floating-point value in the range [-10800.0..10800.0] (minus or plus three hours); read/write.
Description
Type
90
JavaScript Reference Layer object
91
Description
Parameters
None.
Returns
Nothing.
Description
An array containing all of the currently selected Property and PropertyGroup objects in the layer.
Type
Description
Sets the parent of this layer to the specified layer, without changing the transform values of the child layer.
There may be an apparent jump in the rotation, translation, or scale of the child layer, as this layer’s transform
values are combined with those of its ancestors.
If you do not want the child layer to jump, set the p aren t attribute directly. In this case, an offset is calculated
and set in the child layer's transform fields, to prevent the jump from occurring.
Parameters
Returns
Nothing.
Description
When true, the layer is “shy,” meaning that it is hidden in the Layer panel if the composition’s “Hide all shy
layers” option is toggled on.
91
JavaScript Reference Layer object
92
Type
Boolean; read/write.
Description
Type
Boolean; read/write.
Description
Type
Floating-point value in the range [-10800.0..10800.0] (minus or plus three hours); read/write.
Description
The layer’s time stretch, expressed as a percentage. A value of 100 means no stretch. Values between 0 and 1
are set to 1, and values between -1 and 0 (not including 0) are set to -1.
Type
Description
Type
92
JavaScript Reference LayerCollection object
93
LayerCollection object
a pp. pro je c t .i tem ( i n d e x) .l ayers
Description
The LayerCollection object represents a set of layers. The LayerCollection belonging to a CompItem object
contains all the layer objects for layers in the composition. The methods of the collection object allow you to
manipulate the layer list.
• LayerCollection is a subclass of Collection. All methods and attributes of Collection, in addition to those
listed below, are available when working with LayerCollection. See “Collection object” on page 52.
Example
Given that the first item in the project is a CompItem and the second item is an AVItem, this example shows
the number of layers in the CompItem's layer collection, adds a new layer based on an AVItem in the project,
then displays the new number of layers.
v ar f i r s t Co m p = a p p. p ro je c t .i te m ( 1 ) ;
v ar l ayer Co l l e c t ion = fi r s t Co m p.l ayer s;
a l er t ( " nu m b e r o f l ayer s b efore i s " + l ayer Co l l e c t i o n . l e n g t h ) ;
v ar a n AVItem = a [Link] c t.i tem (2 );
l ayer Co l l e c t ion . a d d (a n AVIte m ) ;
a l er t ( " nu m b e r o f l ayer s a f ter i s " + l ayer C o l l e c t i o n . l e n g t h ) ;
Methods
a d d( ) “LayerCollection add() method” on Creates a new AVLayer and adds it to this collection.
page 94
a d dNul l ( ) “LayerCollection addNull() method” on Creates a new, null layer and adds it to this collection.
page 95
a d dS o li d ( ) “LayerCollection addSolid() method” on Creates a new layer, a FootageItem with a SolidSource, and adds it
page 95 to this collection.
a d dTex t( ) “LayerCollection addText() method” on Creates a new text layer and adds it to this collection.
page 96
a d dCamer a( ) “LayerCollection addCamera() method” Creates a new camera layer and adds it to this collection.
on page 94
a d dL i g ht () “LayerCollection addLight() method” on Creates a new light layer and adds it to this collection.
page 94
a d dS ha p e( ) “LayerCollection addShape() method” Creates a new shape layer and adds it to this collection.
on page 95
by Na m e( ) “LayerCollection byName() method” on Retrieves the layer object with a specified name.
page 96
93
JavaScript Reference LayerCollection object
94
Description
Creates a new AVLayer object containing the specified item, and adds it to this collection.
This method generates an exception if the item cannot be added as a layer to this CompItem.
Parameters
du r at i on Optional, the length of a still layer in seconds, a floating-point value. Used only if the item contains a piece of
still footage. Has no effect on movies, sequences or audio.
If supplied, sets the du r a ti on value of the new layer. Otherwise, the d u r a t io n value is set according to user
preferences. By default, this is the same as the duration of the containing CompItem. To set another preferred
value, choose Edit > Preferences > Import (Windows) or After Effects > Preferences > Import (Mac OS), and spec-
ify options under Still Footage.
Returns
AVLayer object.
Description
Creates a new camera layer and adds the CameraLayer object to this collection.
Parameters
cen terPoi n t The center of the new camera, a floating-point array [x, y]. This is used to set the initial x and y values of the
new camera’s Point of Interest property. The z value is set to 0.
Returns
CameraLayer object.
Description
Creates a new light layer and adds the LightLayer object to this collection.
Parameters
cen terPoi n t The center of the new light, a floating-point array [x, y].
94
JavaScript Reference LayerCollection object
95
Returns
LightLayer object.
Description
Creates a new null layer and adds the AVLayer object to this collection. This is the same as choosing
Layer > New > Null Object.
Parameters
If supplied, sets the d u r a ti o n value of the new layer. Otherwise, the dur a t i on value is set according to user
preferences. By default, this is the same as the duration of the containing CompItem. To set another preferred
value, choose Edit > Preferences > Import (Windows) or After Effects > Preferences > Import (Mac OS), and specify
options under Still Footage.
Returns
AVLayer object.
Description
Creates a new ShapeLayer object for a new, empty Shape layer. Use the ShapeLayer object to add properties,
such as shape, fill, stroke, and path filters.
This is the same as using a shape tool in "Tool Creates Shape" mode. Tools automatically add a vector group
that includes Fill and Stroke as specified in the tool options.
Parameters
None
Returns
ShapeLayer object.
Description
Creates a new SolidSource object, with values set as specified; sets the new SolidSource as the m a i n S o u rce
value of a new FootageItem object, and adds the FootageItem to the project. Creates a new AVLayer object,
sets the new FootageItem as its s o u rce , and adds the layer to this collection.
Parameters
co lor The color of the solid, an array of four floating-point values, [R, G, B, A], in the range [0.0..1.0].
95
JavaScript Reference LayerCollection object
96
h eig h t The height of the solid in pixels, an integer in the range [4..30000].
p i xel As p e c t The pixel aspect ratio of the solid, a floating-point value in the range [0.01..100.0].
If supplied, sets the dur at i on value of the new layer. Otherwise, the dur at i on value is set according to
user preferences. By default, this is the same as the duration of the containing CompItem. To set another
preferred value, choose Edit > Preferences > Import (Windows) or After Effects > Preferences > Import (Mac
OS), and specify options under Still Footage.
Returns
AVLayer object.
Description
Creates a new text layer and adds the new TextLayer object to this collection.
Parameters
s o u rce Tex t Optional; a string containing the source text of the new layer, or a TextDocument object contain-
ing the source text of the new layer. See “TextDocument object” on page 172.
Returns
TextLayer object.
Description
Returns the first (topmost) layer found in this collection with the specified name, or null if no layer with the
given name is found.
Parameters
Returns
96
JavaScript Reference LayerCollection object
97
Description
Creates a new CompItem object and moves the specified layers into its layer collection. It removes the
individual layers from this collection, and adds the new CompItem to this collection.
Parameters
m oveAl l At t r i bute s Optional. When true (the default), retains all attributes in the new composition.
This is the same as selecting the “Move all attributes into the new composition”
option in the Pre-compose dialog box.
You can only set this to false if there is just one index in the l ayer In d i ce s array.
This is the same as selecting the “Leave all attributes in” option in the Pre-com-
pose dialog box.
Returns
CompItem object.
97
JavaScript Reference LightLayer object
98
LightLayer object
a pp. pro je c t .i tem ( in d e x) .l ayer(i n de x )
Description
The LightLayer object represents a light layer within a composition. Create it using the LayerCollection
object’s ad d L ig h t method; see “LayerCollection addLight() method” on page 94. It can be accessed in an
item’s layer collection either by index number or by a name string.
• LightLayer is a subclass of Layer. All methods and attributes of Layer are available when working with Light-
Layer. See “Layer object” on page 84.
AE Properties
LightLayer defines no additional attributes, but has different AE properties than other layer types. It has the
following properties and property groups:
Ma r ker
Tr an s for m
Poi n t of In teres t
Pos i t i on
S c al e
Orientation
X Rot at i on
Y Rot at i o n
Rot at i o n
O p a ci t y
L i g ht O p t i o n s
In ten s i t y
Col or
Con e An g l e
Con e Fea th er
C as ts S h a dow s
S h a dow D a r k n e s s
S h a dow D i ff u s i on
98
JavaScript Reference MarkerValue object
99
MarkerValue object
new Ma r kerVa lue( c om m e n t , c h ap te r, u r l, f ra m eTar ge t, cue Po intName , p arams )
Description
The MarkerValue object represents a layer marker, which associates a comment, and optionally a chapter
reference point, Web-page link, or Flash Video cue point with a particular point in a layer. Create it with the
constructor; all arguments except com m en t are optional. All arguments are strings that set in the corre-
sponding attributes of the returned MarkerValue object, except p a r am s . This is an array containing key-value
pairs., which can then be accessed with the get Par ame ters () and se t Par a m e ters () methods. A script can set
any number of parameter pairs; the order does not reflect the order displayed in the application.
To associate a marker with a layer, set the MarkerValue object in the Mar ker AE property of the layer:
laye rO bj ec t . prop e r t y (" Mar ker " ) .s e tVa lu e AtTi m e (t im e, m a r ke r Val u eO b j e ct );
For information on the usage of markers see “Using markers” in After Effects Help.
Attributes
cha p ter “MarkerValue chapter attribute” on A chapter link reference point for the associated layer.
page 100
c u e Po in t Nam e “MarkerValue cuePointName attribute” The Flash Video cue point name.
on page 100
e ven t Cue Poi n t “MarkerValue eventCuePoint attribute” Whether the Flash Video cue point is for an event or navigation.
on page 100
ur l “MarkerValue url attribute” on page 102 A URL for Web page to be associated with the layer.
f r a m eTa rg et “MarkerValue frameTarget attribute” on A specific frame target within the Web page specified by ur l .
page 101
Methods
g e t Pa r a m e t ers ( ) “MarkerValue getParameters() method” Retrieves the key-value pairs associated with the marker value.
on page 101
s e tPar ame ters ( ) “MarkerValue setParameters() method” Sets the key-value pairs associated with the marker value.
on page 101
Examples
99
JavaScript Reference MarkerValue object
100
v ar ma r kerVa lueAtTimeClosestToTi me 4 =
m a r ke r Pro p e r t y. ke y Va l u e ( m a r ke r Pro p e r t y. n e a res t Ke y In d ex ( 4 .0 ) ) ;
v ar comment O fMa r kerClosestToTim e4 = ma r ker Valu e At Ti m e C lo s e s t ToTi m e 4 . com m e n t ;
Description
A text chapter link for this marker. Chapter links initiate a jump to a chapter in a QuickTime movie or in other
formats that support chapter marks.
Type
String; read/write.
Description
A text comment for this marker. This comment appears in the Timeline panel next to the layer marker.
Type
String; read/write.
Description
The Flash Video cue point name, as shown in the Marker dialog.
Type
String; read/write.
Description
When t r ue , the FlashVideo cue point is for an event; otherwise, it is for navigation.
Type
Boolean; read/write.
100
JavaScript Reference MarkerValue object
101
Description
A text frame target for this marker. Together with the URL value, this targets a specific frame within a Web
page.
Type
String; read/write.
Description
Returns the key-value pairs for Flash Video cue-point parameters, for a cue point associated with this marker
value.
Parameters
None.
Returns
An object with an attribute matching each parameter name, containing that parameter’s value.
Description
Associates a set of key-value pairs for Flash Video cue-point parameters, for a cue point associated with this
marker value. A cue point can have any number of parameters, but you can add only three through the user
interface; use this method to add more than three parameters.
Parameters
ke y Valu ePai rs An object containing the key-value pairs as attributes and values. The object’s toS t r ing ()
method is called to assign the string value of each attribute to the named key.
Returns
Nothing.
Example
v ar mv = new Mar kerValu e("My Mar ker");
v ar p ar m s = n ew O b j ec t;
p ar m s. ti m e ToBl i n k = 1 ;
p ar m s. as si g n Me = "A s t r i ng"
101
JavaScript Reference MarkerValue object
102
Description
A URL for this marker. This URL is an automatic link to a Web page.
Type
String; read/write.
102
JavaScript Reference MaskPropertyGroup object
103
MaskPropertyGroup object
a pp. pro je c t .i tem ( i n d e x) .l ayer (i n de x ). mas k
Description
Attributes
rotoB ez i er “MaskPropertyGroup rotoBezier attribute” When true, the shape of the mask is RotoBezier.
on page 104
co lor “MaskPropertyGroup color attribute” on The color used to draw the mask outline in the user
page 103 interface.
Description
The color used to draw the mask outline as it appears in the user interface (Composition panel, Layer panel,
and Timeline panel).
Type
Array of three floating-point values, [R, G, B], in the range [0.0..1.0]; read/write.
Description
Type
Boolean; read/write.
103
JavaScript Reference MaskPropertyGroup object
104
Description
When true, the mask is locked and cannot be edited in the user interface; otherwise, false.
Type
Boolean; read/write.
Description
Type
Description
Type
Description
Type
Boolean; read/write.
104
JavaScript Reference OMCollection object
105
OMCollection object
a pp. pro je c t .renderQ ueue. items. out p ut Mo dules
Description
The OMCollection contains all of the output modules in a render queue. The collection provides access to the
OutputModule objects, but does not provide any additional functionality. The first OutputModule object in
the collection is at index position 1. See “OutputModule object” on page 106
• OMCollection is a subclass of Collection. All methods and attributes of Collection are available when
working with OMCollection. See “Collection object” on page 52.
105
JavaScript Reference OutputModule object
106
OutputModule object
a pp. pro je c t .renderQ ueue. item (i n de x ). o u t p ut Mo d u l e s ( inde x )
Description
An OutputModule object of a RenderQueueItem generates a single file or sequence via a render operation,
and contains attributes and methods relating to the file to be rendered.
Attributes
f i le “OutputModule file attribute” on The path and name of the file to be rendered.
page 106
name “OutputModule name attribute” on The user-interface name of the output module.
page 107
tem pl a tes “OutputModule templates attribute” on All templates for the output module.
page 108
Methods
rem ove( ) “OutputModule remove() method” on Removes this output module from the render-queue item’s list.
page 107
Description
Parameters
Returns
Nothing.
Description
The ExtendScript File object for the file this output module is set to render.
106
JavaScript Reference OutputModule object
107
Type
Description
Type
String; read-only.
Description
Type
Description
Parameters
None.
Returns
Nothing.
Description
Saves this output module as a template and adds it to the templa tes array.
107
JavaScript Reference OutputModule object
108
Parameters
Returns
Nothing.
Description
The names of all output-module templates available in the local installation of After Effects.
Type
108
JavaScript Reference PlaceholderSource object
109
PlaceholderSource object
a pp. pro je c t .i tem ( i n d e x) .m a i n S o u rce
a pp. pro je c t .i tem ( i n d e x) .p roxy S o u rce
Description
109
JavaScript Reference Project object
110
Project object
a pp. pro je c t
Description
The project object represents an After Effects project. Attributes provide access to specific objects within the
project, such as imported files or footage and compositions, and also to project settings such as the timecode
base. Methods can import footage, create solids, compositions and folders, and save changes.
Attributes
f i le “Project file attribute” on page 113 The file for the currently open project.
rootFo lder “Project rootFolder attribute” on The folder containing all the contents of the
page 116 project; the equivalent of the Project panel
bitsPerChan n el “Project bitsPerChannel attribute” on The color depth of the current project.
page 112
t r an s p aren c y Gr i d T hu m bn ai l s “Project transparencyGridThumbnails When true, thumbnail views use the transpar-
attribute” on page 118 ency checkerboard pattern.
t i m e cod eF i l m Ty p e “Project timecodeFilmType attribute” The film type for the “Feet + Frames” project set-
on page 118 ting.
nu m Item s “Project numItems attribute” on The total number of items contained in the
page 115 project.
selection “Project selection attribute” on All items selected in the Project panel.
page 117
d i sp l ay S ta r t Fr a m e “Project displayStartFrame attribute” on The frame at which to start numbering when dis-
page 112 playing the project.
linearBlending “Project linearBlending attribute” on When true, linear blending is used for the project.
page 114
Methods
i te m ( ) “Project item() method” on page 114 Retrieves an item from the project.
con s ol i d ate Fo ot ag e( ) “Project consolidateFootage() method” Consolidates all footage in the project.
on page 112
110
JavaScript Reference Project object
111
rem oveUnu se d Fo ota g e( ) “Project removeUnusedFootage() Removes unused footage from the project.
method” on page 115
red uce Proje c t( ) “Project reduceProject() method” on Reduces the project to a specified set of items.
page 115
cl o se( ) “Project close() method” on page 112 Closes the project with normal save options.
s h ow Win dow( ) “Project showWindow() method” on Shows or hides the Project panel.
page 117
a utoF i xE x pres si o n s () “Project autoFixExpressions() method” Automatically replaces text in all expressions.
on page 111
Description
The item that is currently active and is to be acted upon, or a null if no item is currently selected or if multiple
items are selected.
Type
Description
Automatically replaces text found in broken expressions in the project, if the new text causes the expression to
evaluate without errors.
Parameters
Returns
Nothing.
111
JavaScript Reference Project object
112
Description
Type
Description
Closes the project with the option of saving changes automatically, prompting the user to save changes or
closing without saving changes.
Parameters
Returns
Boolean. True on success. False if the file has not been previously saved, the user is prompted, and the user
cancels the save.
Description
Consolidates all footage in the project. Same as the File > Consolidate All Footage command.
Parameters
None.
Returns
112
JavaScript Reference Project object
113
Description
The frame at which to start numbering when displaying the project with a t i me co deD i sp l ay Ty p e value of
Tim e co de Di s p l ay Ty p e .F R A M E S . (See “Project timecodeDisplayType attribute” on page 117.) This is the
same as setting “Start numbering frames at:” in the Project Settings > Display Style tab.
Type
Integer; read/write.
Description
The ExtendScript File object for the file containing the project that is currently open.
Type
Description
Imports the file specified in the specified ImportOptions object, using the specified options. Same as the
File > Import File command. Creates and returns a new FootageItem object from the file, and adds it to the
project’s i te m s array.
Parameters
i m p o r tO p t i o n s An ImportOptions object specifying the file to import and the options for the operation. See
“ImportOptions object” on page 74.
Returns
FootageItem object.
Example
a pp. pro je c t . i m p o r tF i l e ( n e w Im p or tO p t i o n s (F i l e ( “sa m pl e . p sd ” ) )
Description
Shows an Import File dialog box. Same as the File > Import > File command.
Returns
Array of Item objects created during import; or null if the user cancels the dialog.
113
JavaScript Reference Project object
114
Description
Creates and returns a new PlaceholderItem object and adds it to the project’s i te m s array. Same as the
File > Import > Placeholder command.
Parameters
h eig h t The height of the placeholder in pixels, an integer in the range [4..30000].
f r a m eRa te The frame rate of the placeholder, a floating-point value in the range [1.0..99.0]
du r at i on The duration of the placeholder in seconds, a floating-point value in the range [0.0..10800.0].
Returns
PlaceholderItem object.
Description
Parameters
i n dex The index position of the item, an integer. The first item is at index 1.
Returns
Item object.
Description
Type
Description
True if linear blending should be used for this project; otherwise false.
114
JavaScript Reference Project object
115
Type
Boolean; read/write.
Description
The total number of items contained in the project, including folders and all types of footage.
Type
Integer; read-only.
Example
n = a p p.p ro j e c t . num Item s ;
a l er t ( " T h e re a re " + n + " i te m s i n t h is p ro j e c t . " )
Description
Removes all items from the project except those specified. Same as the File > Reduce Project command.
Parameters
Returns
Example
v ar theItems = ne w Ar r ay();
t heItems[t he Item [Link] th] = [Link] ec t. item(1 );
t heItems[t he Item [Link] th] = [Link] ec t. item(3 );
a pp. pro je c t .red uce Proje c t( th eItems) ;
Description
Removes unused footage from the project. Same as the File > Remove Unused Footage command.
Parameters
None.
Returns
115
JavaScript Reference Project object
116
Description
Type
Description
The root folder containing the contents of the project; this is a virtual folder that contains all items in the
Project panel, but not items contained inside other folders in the Project panel.
Type
Description
Saves the project. The same as the File > Save or File > Save As command. If the project has never previously
been saved and no file is specified, prompts the user for a location and file name. Pass a File object to save a
project to a new file without prompting.
Parameters
Returns
None.
Description
Shows the Save dialog box. The user can name a file with a location and save the project, or click Cancel to exit
the dialog.
Parameters
None.
116
JavaScript Reference Project object
117
Returns
Description
All items selected in the Project panel, in the sort order shown in the Project panel.
Type
Description
Parameters
doS h ow When true, show the Project panel. When false, hide the Project panel.
Returns
Nothing.
Description
The Timecode Base option, as set in the Project Settings dialog box.
Type
117
JavaScript Reference Project object
118
Description
The way in which timecode is set to display, as set in the Project Settings dialog box.
Type
Description
The film type, as set in the Feet + Frames option in the Project Settings dialog box.
Type
Description
How timecode for 29.97 fps footage is displayed, as set in the Project Settings dialog box under NTSC.
Type
Boolean, true for the Drop Frame option, false for the Non-Drop Frame option; read/write.
Description
Type
Boolean; read/write.
118
JavaScript Reference Property object
119
Property object
a pp. pro je c t .i tem ( i n d e x) .l ayer (i n de x ). prop e r t y Sp ec
Description
The Property object contains value, keyframe, and expression information about a particular AE property of
a layer. An AE property is an value, often animatable, of an effect, mask, or transform within an individual
layer. For examples of how to access properties, see “PropertyBase object” on page 141 and “PropertyGroup
property() method” on page 150.
• PropertyGroup is a subclass of PropertyBase. All methods and attributes of PropertyBase, in addition to
those listed below, are available when working with PropertyGroup. See “PropertyBase object” on page 141.
NOTE: JavaScript objects commonly referred to as “properties” are called “attributes” in this guide, to avoid
confusion with the After Effects definition of property.
Attributes
prop er t y Va lue Ty p e “Property propertyValueType attribute” Type of value stored in this property.
on page 132
v alu e “Property value attribute” on page 139 Current value of the property.
h as Max “Property hasMax attribute” on When true, there is a maximum permitted value.
page 124
i s Sp a t i a l “Property isSpatial attribute” on When true, the property defines a spatial value.
page 125
can Var yOverTime “Property canVaryOverTime attribute” When true, the property can be keyframed.
on page 123
un it sTex t “Property unitsText attribute” on A text description of the units in which the value is
page 139 expressed.
can S et Ex pression “Property canSetExpression attribute” When true, the expression can be set by a script.
on page 123
e xp re ss i o n E n ab l e d “Property expressionEnabled attribute” When true, the expression is used to generate val-
on page 124 ues for the property.
e xp re ss i o n E r ror “Property expressionError attribute” on The error, if any, that occurred when the last expres-
page 124 sion was evaluated.
119
JavaScript Reference Property object
120
prop er t y Index “Property propertyIndex attribute” on The position index of this property.
page 132
Methods
v alu eAt Time() “Property valueAtTime() method” on Gets the value of the property evalu-
page 139 ated at given time.
s e tVal u e ( ) “Property setValue() method” on page 137 Sets the static value of the property.
s e tVal u e AtTi m e ( ) “Property setValueAtTime() method” on Creates a keyframe for the property.
page 138
s e tVal u e s At Ti m e s( ) “Property setValuesAtTimes() method” on Creates a set of keyframes for the prop-
page 138 erty.
s e tVal u e AtKe y( ) “Property setValueAtKey() method” on Finds a keyframe and sets the value of
page 138 the property at that keyframe.
ne arestKe y In dex() “Property nearestKeyIndex() method” on Gets the keyframe nearest to a specified
page 131 time.
ke y Ti m e( ) “Property keyTime() method” on page 130 Gets the time at which a condition
occurs.
ke y Valu e( ) “Property keyValue() method” on page 130 Gets the value of a keyframe at the time
at which a condition occurs.
a d dKe y () “Property addKey() method” on page 123 Adds a new keyframe to the property at
a given time.
rem oveKe y ( ) “Property removeKey() method” on Removes a keyframe from the property.
page 133
s e tIn te r p o l at i o n Ty p e AtKe y( ) “Property setInterpolationTypeAtKey() Sets the interpolation type for a key.
method” on page 133
ke y In In te r p o l at i o n Ty p e () “Property keyInInterpolationType() method” Gets the 'in' interpolation type for a key.
on page 126
ke y Out In ter p ol at i on Ty p e( ) “Property keyOutInterpolationType() Gets the 'out' interpolation type for a
method” on page 127 key.
s e tS pa t i alTa ngen ts At Ke y( ) “Property setSpatialTangentsAtKey() Sets the “in” and “out” tangent vectors
method” on page 136 for a key.
ke y In Sp at i a lTan g en t () “Property keyInSpatialTangent() method” on Gets the “in” spatial tangent for a key.
page 126
ke y Out Sp a ti a l Tan g en t () “Property keyOutSpatialTangent() method” Gets the “out” spatial tangent for a key.
on page 127
s e tTemp or alEa se AtKe y () “Property setTemporalEaseAtKey() method” Sets the “in” and “out” temporal ease for
on page 137 a key.
ke y In Te m p o r a l E a s e ( ) “Property keyInTemporalEase() method” on Gets the “in” temporal ease for a key.
page 126
120
JavaScript Reference Property object
121
ke y Out Tem p or a l E as e( ) “Property keyOutTemporalEase() method” Gets the “out” temporal ease for a key.
on page 128
se tTemp or alContinuou sAtKe y () “Property setTemporalContinuousAtKey() Sets whether a keyframe has temporal
method” on page 136 continuity.
ke y Sp a ti a l Con t inu ous ( ) “Property keySpatialContinuous() method” Reports whether a keyframe has spatial
on page 129 continuity.
ke ySp a ti a l AutoB ezi er( ) “Property keySpatialAutoBezier() method” Reports whether a keyframe has spatial
on page 129 auto-Bezier.
ke y Rov i n g () “Property keyRoving() method” on page 128 Reports whether a keyframe is roving.
121
JavaScript Reference Property object
122
A color is stored as an array of four floats, [r,g,b,opacity]. This sets the value of the red component of a light's
color at time 4 to be half of that at time 2:
v ar my Prop er t y = my L i g ht .col or ;
v ar co lor Valu e = my Prop er t y.v alu eAt Ti me (2 ,t r u e) ;
co lor Valu e[0 ] = 0. 5 * col orVa lue[ 0] ;
my Prop er t [Link] ValueAtTime(4,co lor Valu e);
Example: Check that a scale calculated by an expression at time 3.5 is the expected value of [10,50]
v ar my Prop er t y = my L ayer. sc a l e;
// false va lue of preExpression mea n s e va lua te t he expre ssion
v ar s c aleVa lue = my Prop er t y.v alu eAt Ti me (3. 5,f als e) ;
i f ( s c a l e Va lue [0 ] = = 1 0 & & s c a l e Va l u e [ 1 ] = = 5 0 ) {
a l er t( " hur r ay " ) ;
}
e l se {
a l er t( " o op s " );
}
The animation is 10 seconds, and the middle keyframe is at the 5 second mark. Rotation properties are stored
as a OneD value.
my Prop er t y = my L ayer. rot at i o n ;
my Prop er t [Link] ValueAtTime(0, 0 );
my Prop er t [Link] ValueAtTime(5, 9 0);
my Prop er t [Link] ValueAtTime(10, 0);
Example: Change the keyframe values for the first three keyframes of some source text
my Prop er t y = my Tex tL ayer. so u rceTex t;
i f ( my Prop er t [Link] m Ke y s < 3 ) {
a l er t("er ror, I thoug h t there were 3 ke y f r a mes");
}
e l se {
my Prop er t y. s e t Val u e At Ke y( 1 , n e w Tex t D oc u m en t ( " ke y nu m b e r 1 " ) ) ;
my Prop er t y. s e t Val u e At Ke y( 2 , n e w Tex t D oc u m en t ( " ke y nu m b e r 2 " ) ) ;
my Prop er t y. s e t Val u e At Ke y( 3 , n e w Tex t D oc u m en t ( " ke y nu m b e r 3 " ) ) ;
}
Example: Set values using the convenience syntax for position, scale, color, or source text
// Th ese t wo are e quiva lent . T he secon d fills in a defau l t of 0.
my [Link] sit i [Link] Valu e([2 0, 3 0, 0]);
my [Link] sit i [Link] Valu e([2 0, 3 0]);
// Th ese t wo are e quiva lent . T he secon d fills in a defau l t of 100 .
my [Link]. se t Valu e([5 0, 50 , 10 0]);
my Layer.s c ale. se t Valu e( [5 0, 50 ]) ;
// Th ese t wo are e quiva lent . T he secon d fills in a defau l t of 1.0
my Lig h [Link]. se t Valu e([ .8 , .3 , .1 , 1. 0]) ;
my Lig h [Link]. se t Valu e([ .8 , .3 , .1 ]) ;
// Th ese t wo are e quiva lent . T he secon d crea tes a TextD o cument
122
JavaScript Reference Property object
123
Description
Adds a new keyframe or marker to the named property at the specified time and returns the index of the new
keyframe.
Parameters
time The time, in seconds, at which to add the keyframe. A floating-point value. The beginning of the composition is 0.
Returns
Description
When true, the named property is of a type whose expression can be set by a script. See also “Property
expression attribute” on page 123.
Type
Boolean; read-only.
Description
When true, the named property can vary over time—that is, keyframe values or expressions can be written to
this property.
Type
Boolean; read-only.
Description
The expression for the named property. Writeable only when c a n S e t Ex p re ss i on for the named property is
true. When you specify a value for this attribute, the string is evaluated.
• If the string contains a valid expression, ex pres si onEna bl e d becomes true.
123
JavaScript Reference Property object
124
• If the string does not contain a valid expression, an error is generated, and e xp re ss i o n E n ab l e d becomes
false.
• If you set the attribute to the empty string, e xp re ss i on E n ab l e d becomes false, but no error is generated.
Type
Description
When true, the named property uses its associated expression to generate a value. When false, the keyframe
information or static value of the property is used. This attribute can be set to true only if c anS e tEx pres si on
for the named property is true and ex pres si on contains a valid expression string.
Type
Boolean; read/write.
Description
Contains the error, if any, generated by evaluation of the string most recently set in e xp re ss i o n . If no
expression string has been specified, or if the last expression string evaluated without error, contains the
empty string ("").
Type
String; read-only.
Description
When true, there is a maximum permitted value for the named property; otherwise false.
Type
Boolean; read-only.
Description
When true, there is a minimum permitted value for the named property; otherwise false.
124
JavaScript Reference Property object
125
Type
Boolean; read-only.
Description
Returns true if the named property can be interpolated using the specified keyframe interpolation type.
Parameters
Ke y fr am eIn ter p o l at i on Ty p e .L I N E A R
Ke y fr am e In t e r p o l a t i on Ty p e .B E Z I E R
Ke y fr am eIn ter p o l at i on Ty p e .H OL D
Returns
Boolean.
Description
When true, the named property defines a spatial value. Examples are position and effect point controls.
Type
Boolean; read-only.
Description
When true, the named property is time varying—that is, it has keyframes or an enabled expression. When this
attribute is true, the attribute ca n Var y O verTi m e must also be true.
Type
Boolean; read-only.
125
JavaScript Reference Property object
126
Description
Parameters
ke y In dex The index for the keyframe. An integer in the range [1..numKeys], as returned by the a d dKe y or n ea re st Ke y -
In dex method.
Returns
Description
Returns the incoming spatial tangent for the specified keyframe, if the named property is spatial (that is, the
value type is TwoD _ S PAT I AL or T hree D_ S PAT I AL ).
Parameters
ke y In dex The index for the keyframe. An integer in the range [1..numKeys], as returned by the a d dKe y or n ea re st Ke y -
In dex method.
Returns
Description
Parameters
ke y In dex The index for the keyframe. An integer in the range [1..numKeys], as returned by the ad d Ke y or ne arest-
Ke y In dex method.
126
JavaScript Reference Property object
127
Returns
Description
Parameters
ke y In dex The index for the keyframe. An integer in the range [1..numKeys], as returned by the ad d Ke y or ne arest-
Ke y In dex method.
Returns
Description
Parameters
ke y In dex The index for the keyframe. An integer in the range [1..numKeys], as returned by the ad d Ke y or ne arest-
Ke y In dex method.
Returns
127
JavaScript Reference Property object
128
Description
Parameters
ke y In dex The index for the keyframe. An integer in the range [1..numKeys], as returned by the ad d Ke y or ne arest-
Ke y In dex method.
Returns
Description
Returns true if the specified keyframe is roving. The first and last keyframe in a property cannot rove; if you
try to set roving for one of these, the operation is ignored, and ke y Rov i n g ( ) continues to return false.
If the property value type is neither TwoD _ S PAT I AL nor T h re e D_ S PAT I A L , an exception is generated.
Parameters
ke y In dex The index for the keyframe. An integer in the range [1..numKeys], as returned by the ad d Ke y or ne arest-
Ke y In dex method.
Returns
Boolean.
Description
Parameters
ke y In dex The index for the keyframe. An integer in the range [1..numKeys], as returned by the ad d Ke y or ne arest-
Ke y In dex method.
Returns
Boolean.
128
JavaScript Reference Property object
129
Description
Returns true if the specified keyframe has spatial auto-Bezier interpolation. (This type of interpolation affects
this keyframe only if ke y Sp at i a lC on t i nu ous (k e y In d e x ) is also true.)
If the property value type is neither TwoD _ S PAT I AL nor T h re e D_ S PAT I A L , an exception is generated.
Parameters
ke y In dex The index for the keyframe. An integer in the range [1..numKeys], as returned by the ad d Ke y or ne arest-
Ke y In dex method.
Returns
Boolean.
Description
Parameters
ke y In dex The index for the keyframe. An integer in the range [1..numKeys], as returned by the ad d Ke y or ne arest-
Ke y In dex method.
Returns
Boolean.
Description
Parameters
ke y In dex The index for the keyframe. An integer in the range [1..numKeys], as returned by the ad d Ke y or ne arest-
Ke y In dex method.
Returns
Boolean.
129
JavaScript Reference Property object
130
Description
Parameters
ke y In dex The index for the keyframe. An integer in the range [1..numKeys], as returned by the ad d Ke y or ne arest-
Ke y In dex method.
Returns
Boolean.
Description
Finds the specified keyframe or marker and returns the time at which it occurs.
If no keyframe or marker can be found that matches the argument, this method generates an exception, and
an error is displayed.
Parameters
ke y In dex The index for the keyframe. An integer in the range [1..numKeys], as returned by the ad d Ke y or near -
e st Ke y In dex method.
m a r ke r Com m e n t The comment string attached to a marker (see “MarkerValue comment attribute” on page 100).
Returns
Floating-point value.
Description
Finds the specified keyframe or marker and returns its current value.
If no keyframe or marker can be found that matches the argument, this method generates an exception, and
an error is displayed.
130
JavaScript Reference Property object
131
Parameters
ke y In dex The index for the keyframe. An integer in the range [1..numKeys], as returned by the ad d Ke y or near -
e st Ke y In dex method.
m a r ke r Com m e n t The comment string attached to a marker (see “MarkerValue comment attribute” on page 100).
Returns
Floating-point value.
Description
The maximum permitted value of the named property. If the h a s Ma x attribute is false, an exception occurs,
and an error is generated.
Type
Description
The minimum permitted value of the named property. If the ha sMin attribute is false, an exception occurs,
and an error is generated.
Type
Description
Parameters
time The time in seconds; a floating-point value. The beginning of the composition is 0.
Returns
Integer.
131
JavaScript Reference Property object
132
Description
The number of keyframes in the named property. If the value is 0, the property is not being keyframed.
Type
Integer; read-only.
Description
The position index of the named property. The first property is at index position 1.
Type
Integer; read-only.
Description
The type of value stored in the named property. The Proper t y ValueTy p e enumeration has one value for each
type of data that can be stored in or retrieved from a property. Each type of data is stored and retrieved in a
different kind of structure. All property objects store data according to one of these categories.
For example, a 3D spatial property (such as a layer's position) is stored as an array of three floating point
values. When setting a value for position, pass in such an array, as follows:
my l ayer. pro p e r t y (" p o si t i o n " ). se t Valu e ([ 1 0 ,2 0 ,0] ) ;
In contrast, a shape property (such as a layer's mask shape) is stored as a Shape object. When setting a value
for a shape, pass a Shape object, as follows:
v ar my Sh ap e = n ew S h ap e () ;
my Sh ap [Link] t ices = [[0,0 ],[0, 100 ], [1 00,1 00],[10 0,0]];
v ar my Mas k = my l ayer. pro p e r t y (" A DB E Mas k Par a de " ). prop e r t y (1 );
my Mas k .prop er t y ( " A DB E Ma sk S h ap e " ) .s e t Val u e ( myS h ap e );
Type
Proper t y Valu eTy p e.T hree D_SPATIAL Array of three floating-point positional values. For example, an Anchor
Point value might be [10.0, 20.2, 0.0]
Proper t y Valu eTy p e.T hree D Array of three floating-point quantitative values. For example, a Scale
value might be [100.0, 20.2, 0.0]
Proper t y Valu eTy p [Link] _SPATI AL Array of 2 floating-point positional values For example, an Anchor Point
value might be [5.1, 10.0]
Proper t y Valu eTy p [Link] Array of 2 floating-point quantitative values. For example, a Scale value
might be [5.1, 100.0]
132
JavaScript Reference Property object
133
Proper t y Valu eTy p [Link] LO R Array of 4 floating-point values in the range [0.0..1.0]. For example, [0.8,
0.3, 0.1, 1.0]
Proper t y Valu eTy p [Link] STOM _VALU E Unimplemented type; you cannot get or set values for properties with this
type.
Proper t y Valu eTy p e.M ARKER MarkerValue object; see “MarkerValue object” on page 99.
Proper t y Valu eTy p [Link] APE Shape object; see “Shape object” on page 165.
Proper t y Valu eTy p [Link] XT _D O C UM ENT TextDocument object; see “TextDocument object” on page 172.
Description
Removes the specified keyframe from the named property. If no keyframe with the specified index exists,
generates an exception and displays an error.
When a keyframe is removed, the remaining index numbers change. To remove more than one keyframe, you
must start with the highest index number and work down to the lowest to ensure that the remaining indices
reference the same keyframe after each removal.
Parameters
ke y In dex The index for the keyframe. An integer in the range [1..numKeys], as returned by the ad d Ke y or ne arest-
Ke y In dex method.
Returns
Nothing.
Description
The indices of all the selected keyframes in the named property. If no keyframes are selected, or if the property
has no keyframes, returns an empty array.
Type
133
JavaScript Reference Property object
134
Description
Sets the ‘in’ and ‘out’ interpolation types for the specified keyframe.
Parameters
ke y In dex The index for the keyframe. An integer in the range [1..numKeys], as returned by the a d dKe y
or n e a re s t Ke y In d e x method.
Ke y fr am eIn ter p o l at i on Ty p e .L I N E A R
Ke y fr am e In t e r p o l a t i on Ty p e .B E Z I E R
Ke y fr am eIn ter p o l at i on Ty p e .H OL D
o u t Ty p e (Optional) The outgoing interpolation type. If not supplied, the ‘out’ type is set to the i n Ty p e
value. A Ke y f r a m eIn ter p ol a t ion Ty p e enumerated value; one of:
Ke y fr am eIn ter p o l at i on Ty p e .L I N E A R
Ke y fr am e In t e r p o l a t i on Ty p e .B E Z I E R
Ke y fr am eIn ter p o l at i on Ty p e .H OL D
Returns
Nothing.
Description
Turns roving on or off for the specified keyframe. The first and last keyframe in a property cannot rove; if you
try to set roving for one of these, the operation is ignored, and ke y Rov i n g ( ) continues to return false.
If the property value type is neither TwoD _ S PAT I AL nor T h re e D_ S PAT I A L , an exception is generated.
Parameters
ke y In dex The index for the keyframe. An integer in the range [1..numKeys], as returned by the a d dKe y or ne arestKe y -
In dex method.
Returns
Nothing.
134
JavaScript Reference Property object
135
Description
Parameters
ke y In dex The index for the keyframe. An integer in the range [1..numKeys], as returned by the ad d Ke y or ne arest-
Ke y In dex method.
Returns
Nothing.
Description
Parameters
ke y In dex The index for the keyframe. An integer in the range [1..numKeys], as returned by the ad d Ke y or ne arest-
Ke y In dex method.
Returns
Nothing.
Description
Parameters
ke y In dex The index for the keyframe. An integer in the range [1..numKeys], as returned by the ad d Ke y or ne arest-
Ke y In dex method.
Returns
Nothing.
135
JavaScript Reference Property object
136
Description
Sets the incoming and outgoing tangent vectors for the specified keyframe.
If the property value type is neither TwoD _ S PAT I AL nor T h re e D_ S PAT I A L , an exception is generated.
Parameters
ke y In dex The index for the keyframe. An integer in the range [1..numKeys], as returned by the ad d Ke y or ne arest-
Ke y In dex method.
• If the property value type is Prop er t y Va lue Ty p e.TwoD_SPATIA L , the array contains 2 values.
• If the property value type is Prop er t y Va lue Ty p e.T hreeD _SPATIAL , the array contains 3 values.
o u t Ta n gen t (Optional) The outgoing tangent vector. If not supplied, the ‘out’ tangent is set to the i n Ta n g e n t value. An
array of 2 or 3 floating-point values.
• If the property value type is Prop er t y Va lue Ty p e.TwoD_SPATIA L , the array contains 2 values.
• If the property value type is Prop er t y Va lue Ty p e.T hreeD _SPATIAL , the array contains 3 values.
Returns
Nothing.
Description
Turns temporal auto-Bezier interpolation on or off for the specified keyframe. When this is turned on, it
affects this keyframe only if ke y S p a t i a l Con t i nu o u s (ke yInd ex) is also true.
Parameters
ke y In dex The index for the keyframe. An integer in the range [1..numKeys], as returned by the ad d Ke y or ne arest-
Ke y In dex method.
Returns
Nothing.
Description
136
JavaScript Reference Property object
137
When temporal continuity is turned on, it affects this keyframe only if the keyframe interpolation type is
Ke y fr ameIn ter p o la t ion Ty p e .BE ZIER for both ke y In In te r p o l a t io n Ty p e ( ke y In d e x) and ke y O utIn ter p ol a -
t i o n Ty p e( ke y In de x ) .
Parameters
ke y In dex The index for the keyframe. An integer in the range [1..numKeys], as returned by the ad d Ke y or ne arest-
Ke y In dex method.
Returns
Nothing.
Description
Sets the incoming and outgoing temporal ease for the specified keyframe. See “KeyframeEase object” on
page 82.
Parameters
ke y In dex The index for the keyframe. An integer in the range [1..numKeys], as returned by the a dd Ke y or ne ar-
estKe y In dex method.
• If the property value type is Proper t y Valu eTy p [Link] , the array contains 2 objects.
• If the property value type is Proper t y Valu eTy p e.T hree D , the array contains 3 objects.
• For all other value types, the array contains 1 object.
o u t Te m p o r a l E a s e (Optional) The outgoing temporal ease. If not supplied, the outgoing ease is set to the i n Tem p o -
r a l E as e value. An array of 1, 2, or 3 KeyframeEase objects.
• If the property value type is Proper t y Valu eTy p [Link] , the array contains 2 objects.
• If the property value type is Proper t y Valu eTy p e.T hree D , the array contains 3 objects.
• For all other value types, the array contains 1 object.
Returns
Nothing.
Description
137
JavaScript Reference Property object
138
Parameters
n e w Va lu e A value appropriate for the type of property being set; see “Property propertyValueType attribute” on page 132.
Returns
Nothing.
Description
Parameters
ke y In dex The index for the keyframe. An integer in the range [1..numKeys], as returned by the ad d Ke y or ne arest-
Ke y In dex method.
n e w Va lu e A value appropriate for the type of property being set; see “Property propertyValueType attribute” on
page 132.
Returns
Nothing.
Description
Sets the value of a keyframe at the specified time. Creates a new keyframe for the named property, if one does
not currently exist for the specified time, and sets its value.
Parameters
time The time in seconds, a floating-point value. The beginning of the composition is 0.
n e w Va lu e A value appropriate for the type of property being set; see “Property propertyValueType
attribute” on page 132.
Returns
Nothing.
Description
Sets values for a set of keyframes at specified of times. Creates a new keyframe for the named property, if one
does not currently exist for a specified time, and sets its value.
138
JavaScript Reference Property object
139
Times and values are expressed as arrays; the arrays must be of the same length.
Parameters
t i m es An array of times, in seconds. Each time is a floating-point value. The beginning of the compo-
sition is 0.
n e w Va lu e s A array of values appropriate for the type of property being set; see “Property propertyValue-
Type attribute” on page 132.
Returns
Nothing.
Description
Type
String; read-only.
Description
Type
A value appropriate for the type of the property (see “Property propertyValueType attribute” on page 132);
read-only.
Description
139
JavaScript Reference Property object
140
Parameters
time The time in seconds; a floating-point value. The beginning of the composition is 0.
pre E x pres si o n If the property has an expression and this is true, return the value for the specified time without
applying the expression to it. When false, return the result of evaluating the expression for the
specified time.
Returns
A value appropriate for the type of the property (see “Property propertyValueType attribute” on page 132).
140
JavaScript Reference PropertyBase object
141
PropertyBase object
a pp. pro je c t .i tem ( i n d e x) .l ayer (i n de x ). prop e r t y Sp ec
Description
Properties are accessed by name through layers, using various kinds of expression syntax, as controlled by
application preferences. For example, the following are all ways of access properties in the Effects group:
v ar effe ct 1 = [Link] ec t. item(1 ). layer( 1 ) . e f fe c t ( " Ad d Gr a i n " ) ( " Vi e w i n g Mo d e " ) ;
v ar effe ct 1a ga in = a pp. pro je c t .item(1).layer (1 ). effec t.a ddGr ain.v ie w i ngMo de ;
v ar ef fe c t 1a g a in too = a pp. pro je c t .i tem ( 1) .l ayer (1 )( " Ef fe c t s") .a d dGr a i n .v i ew i ngMo de;
v ar ef fe c t 1a ga in too 2 = a [Link] c t.i tem (1 ).l ayer( 1) ("Ef fe c t s " )( "Ad d Gr ai n")( "Vie w i ng Mo de ");
Reference invalidation
When something occurs that changes an object sufficiently for the reference to become invalid, script refer-
ences to that object can generate errors. In simple cases this is straightforward. For example, if you delete an
object, a reference to the deleted object generates the warning "Object is Invalid":
v ar layer 1 = [Link] ec t. item(1 ). layer(1);
layer [Link]();
a l er t ( l ayer 1. n a m e ) ; / / i nv a l i d ref e ren ce to d e l e te d o b j e c t
A less straightforward case is when a property is removed from a property group. In this case, After Effects
generates the "Object is Invalid" error when you subsequently reference that item or other items in the group,
because their index positions have changed. For example:
v ar effe ct 1 = [Link] ec t. item(1 ). layer(1).effe c t (1 );
v ar effe ct 2 = [Link] ec t. item(1 ). layer(1).effe c t (2 );
v ar ef fe ct 2p ar am = [Link] ec t. item(1 ). layer( 1) .ef fe c t (2 ). blend Wi t hO r ig in al;
effe ct [Link]();
a l er t( e f fe c t 2 .n a m e ) ; / / i nv al i d re feren ce b e c au se g ro u p in dex p o s i t i on s h ave cha n g e d
Attributes
matchNam e “PropertyBase matchName attribute” A special name for the property used to build unique naming paths.
on page 144
141
JavaScript Reference PropertyBase object
142
prop er t y Index “PropertyBase propertyIndex attribute” Index of this property within its parent group.
on page 146
prop er t y D ep t h “PropertyBase propertyDepth attribute” The number of levels of parent groups between this property and
on page 145 the containing layer.
p aren tPro p e r t y “PropertyBase parentProperty The immediate parent group of this property.
attribute” on page 145
i s Mod i fi e d “PropertyBase isModified attribute” on When true, the property has been changed since its creation.
page 144
c a n S e t E n a bl e d “PropertyBase canSetEnabled attribute” When true, the user interface displays an eyeball icon for this prop-
on page 143 erty.
e l id ed “PropertyBase elided attribute” on When true, this property is not displayed in the user interface.
page 143
Methods
prop er t y Group () “PropertyBase propertyGroup() Gets the parent group for this property.
method” on page 146
rem ove( ) “PropertyBase remove() method” on Removes this from the project.
page 147
m oveTo( ) “PropertyBase moveTo() method” on Moves this property to a new position in its parent group.
page 145
Description
When true, this property is active. For a layer, this corresponds to the setting of the eyeball icon. For an effect
and all properties, it is the same as the ena b le d attribute.
Type
142
JavaScript Reference PropertyBase object
143
Description
When true, you can set the e n a bl e d attribute value. Generally, this is true if the user interface displays an
eyeball icon for this property; it is true for all layers.
Type
Boolean; read-only.
Description
If this property is a child of an indexed group, creates and returns a new PropertyBase object with the same
attribute values as this one.
If this property is not a child of an indexed group, the method generates an exception and displays an error.
An indexed group has the type Prop er t y Ty p e .I N D E XE D_ G RO UP ; see “PropertyBase propertyType attribute”
on page 146.
Parameters
None.
Returns
PropertyBase object.
Description
When true, this property is a group used to organize other properties. The property is not displayed in the
user interface and its child properties are not indented in the Timeline panel.
For example, for a text layer with two animators and no properties twirled down, you might see:
Tex t
Pa th O p t i on s
More O p t i on s
Anim ator 1
Anim ator 2
In this example, “Animator 1” and “Animator 2” are contained in a PropertyBase called “Text Animators.”
This parent group is not displayed in the user interface, and so the two child properties are not indented in
the Timeline panel.
Type
Boolean; read-only.
143
JavaScript Reference PropertyBase object
144
Description
When true, this property is enabled. It corresponds to the setting of the eyeball icon, if there is one; otherwise,
the default is true.
Type
Description
Type
Boolean; read-only.
Description
Type
Boolean; read-only.
Description
When true, this property has been changed since its creation.
Type
Boolean; read-only.
Description
A special name for the property used to build unique naming paths. The match name is not displayed, but you
can refer to it in scripts. Every property has a unique match-name identifier. Match names are stable from
version to version regardless of the display name (the n am e attribute value) or any changes to the application.
Unlike the display name, it is not localized.
144
JavaScript Reference PropertyBase object
145
An indexed group may not have a nam e value, but always has a m a tch Na m e value. (An indexed group has the
type Pro p e r t y Ty p e. I N D E X E D _ G RO U P ; see “PropertyBase propertyType attribute” on page 146.)
Type
String; read-only.
Description
Parameters
n e w In d e x The new index position at which to place this property in its group. An integer.
Returns
Nothing.
Description
The display name of the property. (Compare “PropertyBase matchName attribute” on page 144.)
It is an error to set the n a m e value if the property is not a child of an indexed group (that is, a property group
that has the type Pro p e r t y Ty p e. I N D E X E D _ G RO U P ; see “PropertyBase propertyType attribute” on page 146).
Type
Description
The property group that is the immediate parent of this property, or null if this PropertyBase is a layer.
Type
145
JavaScript Reference PropertyBase object
146
Description
The number of levels of parent groups between this property and the containing layer. The value 0 for a layer.
Type
Integer; read-only.
Description
Gets the PropertyGroup object for an ancestor group of this property at a specified level of the parent-child
hierarchy.
Parameters
co un tUp Optional. The number of levels to ascend within the parent-child hierarchy. An integer in the
range [1..prop er t y D ep th ]. Default is 1, which gets the immediate parent.
Returns
Description
The position index of this property within its parent group, if it is a child of an indexed group (a property
group that has the type Pro p e r t y Ty p e. I N D E X E D _ G RO U P ; see “PropertyBase propertyType attribute” on
page 146).
Type
Integer; read-only.
Description
Type
Prop er t y Ty p e .I N D E XE D_ G RO UP A property group whose members have an editable name and an index. Effects
and masks are indexed groups. For example, the m a s k s property of a layer
refers to a variable number of individual masks by index number.
146
JavaScript Reference PropertyBase object
147
Prop er t y Ty p e .NA ME D _ G ROU P A property group in which the member names are not editable. Layers are
named groups.
Description
Removes this property from its parent group. If this is a property group, it removes the child properties as well.
This method is valid only for children of indexed groups; if it is not, or if the index value is not valid, the
method generates an exception and displays an error. (An indexed group has the type Prop er-
t y Ty p e. I N DE XE D _ G ROU P ; see “PropertyBase propertyType attribute” on page 146.)
This method can be called on a text animation property (that is, any animator that has been set to a text layer).
Parameters
None.
Returns
Nothing.
Description
When true, this property is selected. Set to true to select the property, or to false to deselect it.
Sampling this attribute repeatedly for a large number of properties can slow down system performance. To
read the full set of selected properties of a composition or layer, use the se l e c te d Prop er t i es attribute of a
Comp or Layer object.
Type
147
JavaScript Reference PropertyGroup object
148
PropertyGroup object
a pp. pro je c t .i tem ( i n d e x) .l ayer (i n de x ). prop e r t y Grou p Sp e c
Description
The PropertyGroup object represents a group of properties. It can contain Property objects and other
PropertyGroup objects. Property groups can be nested to provide a parent-child hierarchy, with a Layer object
at the top (root) down to a single Property object, such as the mask feather of the third mask. To traverse the
group hierarchy, use PropertyBase methods and attributes; see “PropertyBase propertyGroup() method” on
page 146.
For examples of how to access properties and property groups, see “PropertyBase object” on page 141.
• PropertyGroup is a subclass of PropertyBase. All methods and attributes of PropertyBase, in addition to
those listed below, are available when working with PropertyGroup. See “PropertyBase object” on page 141.
• PropertyGroup is a base class for MaskPropertyGroup. PropertyGroup attributes and methods are available
when working with mask groups. See “MaskPropertyGroup object” on page 103.
Attributes
nu m Prop er t i es “PropertyGroup numProperties attribute” on page 149 The number of indexed properties in the group.
Methods
c a n Ad dPro p e r t y () “PropertyGroup canAddProperty() method” Reports whether a property can be added to the group.
on page 149
Description
Creates and returns a PropertyBase object with the specified name, and adds it to this group.
In general, you can only add properties to an indexed group (a property group that has the type
Prop er t y Ty p e .I N D E XE D_ G RO UP ; see “PropertyBase propertyType attribute” on page 146) The only
exception is a text animator property, which can be added to a named group (a property group that has the
type Prop er t y Ty p [Link] ME D _ G ROU P) .
If this method cannot create a property with the specified name, it generates an exception. To check that you
can add a particular property to this group, call c a n Ad dPro p e r t y before calling this method. (See “Property-
Group canAddProperty() method” on page 149.)
148
JavaScript Reference PropertyGroup object
149
Parameters
name The display name or match name of the property to add. (See “PropertyBase matchName attribute” on page 144).
• Any match name for a property that can be added through the user interface. For example, “ADBE Mask Atom”,
“ADBE Paint Atom”, “ADBE Text Position”, “ADBE Text Anchor Point”.
Returns
PropertyBase object.
Description
Returns true if a property with the given name can be added to this property group. For example, you can only
add mask to a mask group. The only legal input arguments are “mask” or “ADBE Mask Atom”.
m a sk Gro u p. ca n Ad d Prop e r t y ( " m as k" ) ; / / re tu r n s t r u e
m a sk Gro u p. ca n Ad d Prop e r t y ( " A DB E Ma s k Ato m " ) ; / / re tu r n s t r u e
m a s k Gro u p. ca n Ad d Prop e r t y ( " bl e n d " ) ; / / re t u r n s fa l s e
Parameters
name The display name or match name of the property to be checked. (See “PropertyGroup addProp-
erty() method” on page 148).
Returns
Boolean.
Description
Type
Integer; read-only.
149
JavaScript Reference PropertyGroup object
150
Description
Finds and returns a child property of this group, as specified by either its index or name.
A name specification can use the same syntax that is available with expressions. The following are all allowed
and are equivalent:
my l ayer. p o s it i o n
my l ayer (" p o si t i o n " )
my l ayer. prop er t y ("p o si t i on")
my l ayer (1 )
my l ayer. prop er t y (1 )
Some properties of a layer, such as position and zoom, can be accessed only by name.
When using the name to find a property that is multiple levels down, you must make more than one call to
this method. For example, the following call searches two levels down, and returns the first mask in the mask
group:
my L ayer.p rop e r t y ( " A D BE Mas ks " ) .prop e r t y ( 1 )
Parameters
i n dex The index for the child property, in this is an indexed group. An integer in the range [0..nu m Prop er -
t i es ].
Returns
PropertyBase object or null if no child property with the specified string name is found.
150
JavaScript Reference PropertyGroup object
151
• "Position" or "position"
• "Scale" or "scale"
• "Rotation" or "rotation"
• "Opacity" or "opacity"
• "Marker" or "marker"
• "Aperture" or "aperture"
• "Color" or "color"
• "Ambient" or "ambient"
• "Diffuse" or "diffuse"
• "Specular" or "specular"
• "Shininess" or "shininess"
• "Metal" or "metal"
From a camera, light or 3D layer • "X Rotation" or "xRotation" or "Rotation X" or "rotationX"
• "Orientation" or "orientation"
From a PropertyGroup "ADBE Mask Atom" • "ADBE Mask Shape", or “maskShape”, or “maskPath”
151
JavaScript Reference PropertyGroup object
152
Examples
1 If a layer named “myLayer” has a Box Blur effect, you can retrieve the effect in any of the following ways:
my L ayer.p rop e r t y ( “ E f fe c t s” ) .prop e r t y ( “ B ox Blu r ” );
my L ayer.p rop e r t y ( “ E f fe c t s” ) .prop e r t y ( “ b ox Blur ” ) ;
my L ayer.p rop e r t y ( “ E f fe c t s” ) .prop e r t y ( “A D BE B ox Bl u r ” ) ;
2 If a layer named “myLayer” has a mask named “Mask 1” you can retrieve it as follows:
my L ayer.p rop e r t y ( “ Ma sk s” ) .p rop e r t y ( “ Ma sk 1 ” ) ;
3 To get a Bulge Center value from a Bulge effect, you can use either of the following:
my L ayer.p rop e r t y ( “ E f fe c t s” ) .prop e r t y ( “ Bu l g e” ) .prop e r t y ( “ Bul g e Cen te r ” ) ;
my L ayer.p rop e r t y ( “ E f fe c t s” ) .prop e r t y ( “ Bu l g e” ) .prop e r t y ( “ b u l g e Ce n ter ” ) ;
152
JavaScript Reference RenderQueue object
153
RenderQueue object
a pp. pro je c t .renderQ ueue
Description
The RenderQueue object represents the render automation process, the data and functionality that is available
through the Render Queue panel of a particular After Effects project. Attributes provide access to items in the
render queue and their render status. Methods can start, pause, and stop the rendering process.
The RenderQueueItem object provides access to the specific settings for an item to be rendered. See “Render-
QueueItem object” on page 156.
Attributes
ren der in g “RenderQueue rendering attribute” on page 155 When true, a render is in progress.
nu m Item s “RenderQueue numItems attribute” on page 154 The total number of items in the render queue.
i te m s “RenderQueue items attribute” on page 154 The collection of items in the render queue.
Methods
s h ow Win dow( ) “RenderQueue showWindow() method” Show or hides the Render Queue panel.
on page 155
ren der( ) “RenderQueue render() method” on Starts the rendering process; does not return until render is
page 154 complete.
Description
Parameters
i n dex The position index of the item. An integer in the range [0..num Item s ].
Returns
RenderQueueItem object.
153
JavaScript Reference RenderQueue object
154
Description
A collection of all items in the render queue. See “RenderQueueItem object” on page 156.
Type
Description
Type
Integer; read-only.
Description
Pauses the current rendering process, or continues a paused rendering process. This is the same as clicking
Pause in the Render Queue panel during a render. You can call this method from an o n S t a t u sC h a n ge d or
o n E r ror callback. See “RenderQueueItem onStatusChanged attribute” on page 158 and “Application onError
attribute” on page 26.
Parameters
Returns
Nothing.
Description
Starts the rendering process. This is the same as clicking Render in the Render Queue panel. The method does
not return until the render process is complete. To pause or stop the rendering process, call pa useRender i ng()
or s top Ren de r i n g ( ) from an o n E r ror or o n S t a t u sC h a n g e d callback.
• To respond to errors during the rendering process, define a callback function in a pp. on E r ror ; see “Appli-
cation onError attribute” on page 26.
• To respond to changes in the status of a particular item while the render is progressing, define a callback
function in RenderQu eu [Link] tusChange d in the associated RenderQueueItem object; see “Render-
QueueItem onStatusChanged attribute” on page 158.
154
JavaScript Reference RenderQueue object
155
Parameters
None.
Returns
Nothing.
Description
When true, the rendering process is in progress or paused. When false, it is stopped.
Type
Boolean; read-only.
Description
Parameters
doS h ow When true, show the Render Queue panel. When false, hide it.
Returns
Nothing.
Description
Stops the rendering process. This is the same as clicking Stop in the Render Queue panel during a render. You
can call this method from an o n S t a t u sC h a n g e d or o n E r ror callback. See “RenderQueueItem onStatus-
Changed attribute” on page 158 and “Application onError attribute” on page 26.
Parameters
None.
Returns
Nothing.
155
JavaScript Reference RenderQueueItem object
156
RenderQueueItem object
a pp. pro je c t .renderQ ueue. items( i n d e x)
Description
The RenderQueueItem object represents an individual item in the render queue. It provides access to the
specific settings for an item to be rendered. Create the object by adding a composition to the Render Queue
with the RQItemCollection object; see “RQItemCollection add() method” on page 162.
Attributes
nu m Out p utMo du le s “RenderQueueItem numOutputModules The total number of Output Modules assigned to the
attribute” on page 158 item.
ren der “RenderQueueItem render attribute” on When true, this item is rendered when the queue is
page 159 started.
s ta r t Ti m e “RenderQueueItem startTime attribute” on The time when rendering began for the item.
page 160
e l ap se d S e co n d s “RenderQueueItem elapsedSeconds The time elapsed in the current rendering of this item.
attribute” on page 157
s ki p Fr a m e s “RenderQueueItem skipFrames attribute” The number of frames to skip when rendering this item.
on page 160
outputMo du le s “RenderQueueItem outputModules The collection of Output Modules for this item.
attribute” on page 159
onStatusChanged “RenderQueueItem onStatusChanged A callback function that is called during the rendering
attribute” on page 158 process when the status of the item changes.
Methods
outputMo du le () “RenderQueueItem outputModule() method” on Gets an Output Module for the item.
page 159
rem ove( ) “RenderQueueItem remove() method” on page 159 Removes the item from the render queue.
s aveAs Tem p l ate( ) “RenderQueueItem saveAsTemplate() method” on Saves a new Render Settings template.
page 160
156
JavaScript Reference RenderQueueItem object
157
Description
Applies a Render Settings template to the item. See also “RenderQueueItem saveAsTemplate() method” on
page 160 and “RenderQueueItem templates attribute” on page 161.
Parameters
Returns
Nothing.
Description
The composition that will be rendered by this render-queue item. To change the composition, you must delete
this render-queue item and create a new one.
Type
Description
Parameters
None.
Returns
RenderQueueItem object.
157
JavaScript Reference RenderQueueItem object
158
Description
Type
Description
A log type for this item, indicating which events should be logged while this item is being rendered.
Type
Description
Type
Integer; read-only.
Description
The name of a callback function that is called whenever the value of the Ren derQ [Link] tu s attribute
changes. See “RenderQueueItem status attribute” on page 160.
You cannot make changes to render queue items or to the application while rendering is in progress or paused;
you can, however, use this callback to pause or stop the rendering process. See “RenderQueue pauseRen-
dering() method” on page 154 and “RenderQueue stopRendering() method” on page 155.
See also “Application onError attribute” on page 26.
Type
Example
f u n c t io n my S ta tu s Ch an g e d( ) {
a l er t(a pp. pro je c t .renderQ ueue. item(1 ). st at us)
}
158
JavaScript Reference RenderQueueItem object
159
a pp. pro je c t .renderQ ueue. item(1 ). onSt at usCh anged = my St atu sCha n ge d();
a pp. pro je c t .renderQ ueue. item(1 ). render = false; //change s sta tus a n d shows dia l og
Description
Type
Description
Parameters
i n dex The position index of the output module. An integer in the range [1..num Out putMo dule s ].
Returns
OutputModule object.
Description
Parameters
None.
Returns
Nothing.
Description
When true, the item will be rendered when the render queue is started. When set to true, the Ren der-
Q [Link] atu s is set to RQ Item St at us .QU E UE D . When set to false, st at us is set to RQ Item -
S ta tu s. U N QU E U E D .
159
JavaScript Reference RenderQueueItem object
160
Type
Boolean; read/write.
Description
Saves the item’s current render settings as a new template with the specified name.
Parameters
Returns
Nothing.
Description
The number of frames to skip when rendering this item. Use this to do rendering tests that are faster than a
full render.
A value of 0 skip no frames, and results in regular rendering of all frames. A value of 1 skips every other frame.
This is equivalent to "rendering on twos." Higher values skip a larger number of frames.
The total length of time remains unchanged. For example, if skip has a value of 1, a sequence output would
have half the number of frames and in movie output, each frame would be double the duration.
Type
Description
Type
Date object, or null if the item has not started rendering; read-only.
Description
160
JavaScript Reference RenderQueueItem object
161
Type
RQ Item St at us .U N QUE U E D Item is listed in the Render Queue panel but composition is not ready to render.
RQ Item St at us .U SER _ STO P PED Rendering process was stopped by user or script.
Description
The names of all Render Settings templates available for the item. See also “RenderQueueItem saveAsTemplate()
method” on page 160.
Type
Description
The duration in seconds of the composition to be rendered. The duration is determined by subtracting the
start time from the end time. Setting this value is the same as setting a custom end time in the Render Settings
dialog box.
Type
Description
The time in the composition, in seconds, at which rendering will begin. Setting this value is the same as setting
a custom start time in the Render Settings dialog box.
Type
161
JavaScript Reference RQItemCollection object
162
RQItemCollection object
a pp. pro je c t .renderQ ueue. items
Description
The RQItemCollection contains all of the render-queue items in a project, as shown in the Render Queue
panel of the project. The collection provides access to the RenderQueueItem objects, and allows you to create
them from compositions. The first RenderQueueItem object in the collection is at index position 1. See
“RenderQueueItem object” on page 156
• RQItemCollection is a subclass of Collection. All methods and attributes of Collection are available when
working with RQItemCollection. See “Collection object” on page 52.
Methods
a d d( ) “RQItemCollection add() method” on page 162 Adds a composition to the Render Queue.
Description
Parameters
Returns
RenderQueueItem object.
162
JavaScript Reference Settings object
163
Settings object
Description
The Settings object provides an easy way to manage settings for scripts. The settings are saved in the After
Effects preferences file and are persistent between application sessions. Settings are identified by section and
key within the file, and each key name is associated with a value. In the preferences file, section names are
enclosed in brackets and quotation marks, and key names are listing in quotation marks below the section
name. All values are strings.
You can create new settings with this object, as well as accessing existing settings.
Methods
s aveS e t t in g () “Settings saveSetting() method” on page 164 Saves a default value for a setting.
h aveS e tt i n g ( ) “Settings haveSetting() method” on page 163 Reports whether a specified setting is assigned.
Description
Parameters
Returns
String.
Example
If you have saved a setting named with the key name “Aligned Clone” in the “Eraser - Paint Settings” section,
you can retrieve the value with this script:
v ar n = ap p.s e tt i n g s .get S e tt i n g( "Er a ser - Pa i n t S e tt i n g s ", "Ali g n e d Clone ") ;
a l er t ( " T h e s e t t i n g i s " + n ) ;
Description
Returns true if the specified scripting preferences item exists and has a value.
163
JavaScript Reference Settings object
164
Parameters
Returns
Boolean.
Description
Parameters
Returns
Nothing.
164
JavaScript Reference Shape object
165
Shape object
a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop er t y (i n de x ). prop e r t y ( " m as kS h a p e " ). v al u e
Description
The Shape object encapsulates information describing a shape in a shape layer, or the outline shape of a Mask.
It is the value of the “Mask Path” AE properties, and of the "Path" AE property of a shape layer. Use the
constructor, new Sh ap e () , to create a new, empty Shape object, then set the attributes individually to define
the shape.
A shape has a set of anchor points, or vertices, and a pair of direction handles, or tangent vectors, for each
anchor point. A tangent vector (in a non-RotoBezier mask) determines the direction of the line that is drawn
to or from an anchor point. There is one incoming tangent vector and one outgoing tangent vector associated
with each vertex in the shape.
A tangent value is a pair of x,y coordinates specified relative to the associated vertex. For example, a tangent
of [-1,-1] is located above and to the left of the vertex and has a 45 degree slope, regardless of the actual
location of the vertex. The longer a handle is, the greater its influence; for example, an incoming shape
segment stays closer to the vector for an i n Ta n g e n t of [-2,-2] than it does for an in Tan g en t of
[-1,-1], even though both of these come toward the vertex from the same direction.
If a shape is not closed, the i n Ta n g e n t for the first vertex and the o ut Ta n g en t for the final vertex are ignored.
If the shape is closed, these two vectors specify the direction handles of the final connecting segment out of
the final vertex and back into the first vertex.
RotoBezier masks calculate their tangents automatically. (See “MaskPropertyGroup rotoBezier attribute” on
page 104.) If a shape is used in a RotoBezier mask, the tangent values are ignored. This means that, for
RotoBezier masks, you can construct a shape by setting only the ver t ices attribute and setting both i n Tan ge n t s
and o ut Ta n g en ts to null. When you access the new shape, its tangent values are filled with the automatically
calculated tangent values.
A square is a closed shape with 4 vertices. The i n Tan g e n t s and o u t Ta n g e n t s for connected straight-line
segments are 0, the default, and do not need to be explicitly set.
v ar my Sh ap e = n ew S h ap e () ;
my Sh ap e .ver t ice s = [ [ 0 ,0 ], [ 0 , 1 0 0 ], [1 0 0 ,1 0 0 ] , [ 1 0 0 ,0] ] ;
my Sh ap [Link] o se d = t r ue;
A "U" is an open shape with the same 4 vertices used in the square:
v ar my Sh ap e = n ew S h ap e () ;
my Sh ap e .ver t ice s = [ [ 0 ,0 ], [ 0 , 1 0 0 ], [1 0 0 ,1 0 0 ] , [ 1 0 0 ,0] ] ;
my Sh ap [Link] se d = false;
165
JavaScript Reference Shape object
166
Attributes
cl o se d “Shape closed attribute” on page 166 When true, the shape is a closed curve.
ver t ices “Shape vertices attribute” on page 167 The anchor points of the shape.
i n Ta n g e n ts “Shape inTangents attribute” on page 166 The tangent vectors coming into the shape vertices.
o u t Ta n gen t s “Shape outTangents attribute” on page 166 The tangent vectors coming out of the shape vertices.
Description
When true, the first and last vertices are connected to form a closed curve. When false, the closing segment is
not drawn.
Type
Boolean; read/write.
Description
The incoming tangent vectors, or direction handles, associated with the vertices of the shape. Specify each
vector as an array of two floating-point values, and collect the vectors into an array the same length as the
ver t ices array.
Each tangent value defaults to [0,0]. When the mask shape is not RotoBezier, this results in a straight line
segment.
If the shape is in a RotoBezier mask, all tangent values are ignored and the tangents are automatically calcu-
lated.
Type
Description
The outgoing tangent vectors, or direction handles, associated with the vertices of the shape. Specify each
vector as an array of two floating-point values, and collect the vectors into an array the same length as the
ver t ices array.
Each tangent value defaults to [0,0]. When the mask shape is not RotoBezier, this results in a straight line
segment.
If the shape is in a RotoBezier mask, all tangent values are ignored and the tangents are automatically calcu-
lated.
166
JavaScript Reference Shape object
167
Type
Description
The anchor points of the shape. Specify each point as an array of two floating-point values, and collect the
point pairs into an array for the complete set of points. For example:
my Sh ap e .ver t ice s = [ [ 0 ,0 ], [ 0 , 1 ] , [ 1 ,1 ], [ 1 , 0 ] ];
Type
167
JavaScript Reference ShapeLayer object
168
ShapeLayer object
a pp. pro je c t .i tem ( in d e x) .l ayer(i n de x )
Description
The ShapeLayer object represents a shape layer within a composition. Create it using the LayerCollection
object’s ad d Sh ap e() method; see “LayerCollection addShape() method” on page 95. It can be accessed in an
item’s layer collection either by index number or by a name string.
• ShapeLayer is a subclass of AVLayer, which is a subclass of Layer. All methods and attributes of AVLayer and
Layer are available when working with ShapeLayer. See “Layer object” on page 84 and “AVLayer object” on
page 40.
168
JavaScript Reference SolidSource object
169
SolidSource object
a pp. pro je c t .i tem ( in d e x) . m a i n S o u rce
a pp. pro je c t .i tem ( in d e x) .p roxySo urce
Description
Attributes
co lor “SolidSource color attribute” on page 169 The color of the solid.
Description
The color of the solid, expressed as red, green, and blue values.
Type
Array of three floating-point values, [R, G, B], in the range [0.0..1.0]; read/write.
169
JavaScript Reference System object
170
System object
s ys te m
Description
The System object provides access to attributes found on the user’s system, such as the user name and the
name and version of the operating system. It is available through the s ys te m global variable.
Example
a l er t ( " Your O S i s " + sy [Link] Name + " r u nni ng versi on " + sy [Link] Vers i on );
con f i r m ( " Yo u a re : " + s ys te m . u s e r Na m e + " r un n i n g o n " + s y s t e m . m a ch i n e Na m e + " . " ) ;
Attributes
u s e r Nam e “System userName attribute” on page 171 The current user name.
m a chi n e Na m e “System machineName attribute” on page 170 The name of the host computer.
o s Nam e “System osName attribute” on page 171 The name of the operating system.
o s Ver s i o n “System osVersion attribute” on page 171 The version of the operating system.
Methods
c a l l Sy s te m ( ) “System callSystem() method” on page 170 Execute’s a command on the system’s command line.
Description
Executes a system command, as if you had typed it on the operating system’s command line. Returns whatever
the system outputs in response to the command, if anything.
In Windows, you can invoke commands using the / c switch for the c m d. exe command, passing the command
to run in escaped quotes (\". ..\" ). For example, the following retrieves the current time and displays it to the
user:
v ar t i m e S t r = s ys te m . c a l lSys tem ( " c m d . e xe / c \ " t i m e / t \ " " ) ;
a l er t ( " Cu r ren t t i m e i s " + t i m e S t r );
Parameters
Returns
170
JavaScript Reference System object
171
Description
Type
String; read-only.
Description
Type
String; read-only.
Description
Type
String; read-only.
Description
Type
String; read-only.
171
JavaScript Reference TextDocument object
172
TextDocument object
n e w Tex t D o c u m e n t (d oc Te x t )
a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop er t y ( "So urce Text").v alu e
Description
The TextDocument object stores a value for a TextLayer's Source Text property. Create it with the constructor,
passing the string to be encapsulated.
Examples
This sets a value of some source text and displays an alert showing the new value:
v ar my Tex t D o c u m en t = n e w Tex t D o c u m en t( " Ha p p y C a ke" ) ;
my Tex t L ayer.p ro p e r t y( " S o u rc e Tex t " ) . s e t Val u e ( my Tex t D o c u m e n t ) ;
a l er t( my Tex t L ayer.p rop er t y ( " S ou rce Tex t" ) .va lue );
This sets keyframe values for text that show different words over time:
v a r tex tPro p = myTex t L [Link] e r t y ( " S o u rce Text " ) ;
tex tPro p. se tVa lue At Ti m e ( 0 , n e w Tex t D o c u m e n t ( " Hap py " ) ) ;
tex tPro p. se tVa lue At Ti m e ( . 3 3 , n e w Tex tD o c u m e n t (" c a ke" ) );
tex tPro p. se tVa lue At Ti m e ( . 6 6 , n e w Tex tD o c u m e n t (" i s " )) ;
tex tPro p. se tVa lue At Ti m e ( 1 , n e w Tex t D o c u m e n t ( " yu m my! " )) ;
Attributes
tex t “TextDocument text attribute” on page 172 The text layer’s Source Text value.
Description
The text value for the text layer’s Source Text property.
Type
String; read/write.
172
JavaScript Reference TextLayer object
173
TextLayer object
a pp. pro je c t .i tem ( in d e x) .l ayer(i n de x )
Description
The TextLayer object represents a text layer within a composition. Create it using the LayerCollection object’s
a d dTex t method; see “LayerCollection addText() method” on page 96. It can be accessed in an item’s layer
collection either by index number or by a name string.
• TextLayer is a subclass of AVLayer, which is a subclass of Layer. All methods and attributes of AVLayer and
Layer are available when working with TextLayer. See “Layer object” on page 84 and “AVLayer object” on
page 40.
AE Properties
TextLayer defines no additional attributes, but has the following AE properties and property groups, in
addition to those inherited from AVLayer:
Tex t
S o u rce Tex t
Pa th O pt i on s
Pa th
Re verse Path
Per p en di c ul a r To Pa th
Force A l i g n m e n t
F i r s t Ma r g i n
L a s t Mar g i n
More O p t i on s
Anchor Point Grouping
Gro up in g Al i g n m e n t
F i l l & S t roke
In ter- C ha r a c ter Bl en d i n g
Anim ators
The Ti m e Rem a p and Mot i on Tr ac kers properties, inherited from AVLayer, are not applicable to text layers,
and their related AVLayer attributes are not used:
c a n S e t Ti m e Rem a p E n a bl e d
t i m eRem ap E n ab l e d
t r ackMat teTy p e
i s Tr a ck Ma tte
h as Tr a ck Ma tte
173
Examples
This section describes sample scripts that are included on your DVD, giving an overview of what they do and
a description of how they work.
This set of examples is by no means exhaustive, but it does demonstrate some of scripting’s more complex
features in action. It also shows some typical programming constructions from JavaScript that apply to
scripting.
For more examples from Adobe and from other After Effects users, visit Adobe Studio Exchange at
[Link] and choose Script in the Adobe After Effects section.
174
Examples Render named items
175
Smart import
This script, sm a r t Im p o r t .js x , allows the user to import the full, nested contents of a folder just by selecting it.
It attempts to detect whether each item is a still, moving footage, or an image sequence. The user still has to
make other choices in dialog boxes, such as which layer of a multi-layer image (such as a PSD file) to import.
This script does the following:
• Prompts the user for a folder whose contents are to be imported, and checks that the user chooses a folder
rather than cancelling.
• Defines a function, p ro ce s s Fo l d er () , to import each of the files in the chosen folder, which uses several
helper functions.
• Defines a helper function, tes t ForS e quen ce( ) , to test whether a given file is part of a sequence. This uses
regular expressions, which are a special type of JavaScript designed to reduce the number of steps required
to evaluate a string.
The first one tests for the presence of sequential numbers anywhere in the file name, followed by another
making certain that the sequential files aren’t of a type that can’t be imported as a sequence (moving image
files). The function then checks adjacent files to see if a sequence exists, stopping after we’ve evaluated ten
175
Examples Render and e-mail
176
If no match is found for a number string, assumes there is no image sequence and checks for an array
consisting of the matched string and its location within the file name.
If all files are part of a numbered sequence, assumes a sequence and returns the first file of that sequence.
• Defines a helper function to pop up error dialog boxes if there is a problem with any file we are attempting
to import.
• Defines a helper function to actually import any image sequence discovered using te st For S equence() .
There is an option for forcing alphabetical order in sequences, which is commented out in the script as
written. If you want to force alphabetical order, uncomment the line i m p o r tO p t i o n s .force A l ph ab et i c al =
t r ue .
176
Examples Convert selected properties to markers
177
This script adds a layer-time marker on the layer at the same time as each keyframe for each selected property.
Each marker is associated with an event-type Flash Video cue point, and the cue point is given a parameter
whose name is the name of the property and whose value is the property’s value at that time. If the selected
property has an expression, a marker is created for each frame, with the values sampled at each frame.
Note: This script does not convert properties that have complex value types, such as the Path property for a paint
stroke, the Curves property of a Curve effect, or a gradient property.
When you render the composition as Flash video, all markers that contain cue-point data are converted to
Flash Video cue points.
177
After Effects Object Summary
This code dump summarizes all public JavaScript objects (instantiable classes) and enumerated types defined
for After Effects CS3.
= == == === == == === == === == == === == === == == === == === == == === == == === == === == == === ==
AlphaMo de enum
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
A l p h a Mo de .I G N O R E
A l p h a Mo de .P R E M U LT I P L I E D
A l p h a Mo de .S T RA I G H T
= == == === == == === == === == == === == === == == === == === == == === == == === == === == == === ==
App li c a ti o n o b j e c t
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
a c t iva te () n o ret ur n
b e g i n Su ppres s Di a l og s () n o re tur n
b e g i nUndo Group(st r ing u n doName ) no re tur n
b ui l d Na m e : st r i n g : rea d On ly
b u i l d Nu m b e r : i n te g e r : rea d O n l y
c a n ce l Tas k ( i n t e g e r t a s k I D ) n o re t u r n
e n d Su ppre s s Di a l o g s (b o o le an s h ow A l e r t ) n o re t u r n
e n d Un d o Grou p ( ) n o re t u r n
endWatchFolder() n o re tu r n
e x it Af ter L a u n ch An d Eva l : b o o l e a n : rea d / w r i te
ex it Co de : in te ger : rea d/ w r ite
f i n d Menu Com m a n d Id( ) re t u r n s i n t e g e r
i s Pro f e s s i o n a l Ver s i o n : b oo l e a n : re a d O n ly
i s Ren d e r E n g i n e : b o o l e a n : rea d O n l y
i s UISupp re ss ed : b oo l ean : re ad O n ly
i s Watch Fo ld er : b o o l e an : rea d O n l y
l a n g u a g e : L a n g u a ge : rea d O n l y
m em or y In Use : num b e r : rea d O n l y
n ewPro je ct() no re tur n
o p e n ( [ F il e fi l e ] ) re tu r n s Pro je c t
o p e n Tem p la te( F i l e f il e ToO p e n Wi t h Tem p l a t e S e m a n ti c s ) n o re t u r n
p a r se Sw atch F il e (F i l e s w atch F il e ) ret u r n s Swa tchO b je c t
pa useWatch Folder(b oo lean do Pause) no re tur n
p ro je c t : Pro j e c t : re ad O n ly
p ur g e(Purg e Targ e t tar g et ) n o re tu r n
qu i t( ) no re tu r n
s ave Pro je c tO n Cr as h : b o o l e a n : rea d/ w r i te
s ch e du l e Tas k (s t r i n g To Exe c u te, fl o a t de l ay, b o ol ea n rep ea t) ret ur n s ta sk I D
s e tMem or y Us ag eL i m i t s( fl o a t i m a ge Ca che Percent , f l o a t m a xi m u m Me m o r y Pe rcen t ) n o ret u r n
s e tS avePreferen ce sO n Q ui t( b o ol ea n doS ave ) n o re tu r n
s e tt i n g s : S e tt i n g s : re ad O n ly
178
After Effects Object Summary
179
ver s i on : s t r i n g : re a d O n ly
w a tch Fo ld e r ( F il e fi l e ) n o ret u r n
on E r ror( s t r in g er ror St r i n g , s t r i n g s e ver it y ) n o re tur n
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == ==
AVL ayer ob j ec t
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
(inte g er proper t y In dex) ret ur n s Prop er t y B a se
( st r i n g p ro p e r t y Na m e ) re tu r n s Prop er t y B as e
a c t ive : b oo l ean : re ad O n ly
a c t iveAtTim e(f lo at at Ti me ) re tur n s b oole an
a d dProp er t y (s t r i ng prop er t y Name ) re tur n s Prop er t y Ba s e
a d ju s t m e n t L ayer : b o o l e an : rea d / w r i te
a pp ly Pres e t( s t r in g pre s e t Na m e ) n o re tur n
a udio Ac tive : bo olea n : rea dO n ly
a ud io Ac tiveAtTi m e( flo a t at Time ) re tur n s b oo le an
a ud io E n ab l ed : b oo l ean : re ad / w r ite
a utoOr i e n t : AutoO r i e n t Ty p e : rea d/ w r i te
b l endi ngMo de : Bl endi ngMo de : rea d/w r i te
c al c u l ate Tr a n s for m From Poi n t s( Ar r ay [top, l eft ], Ar r ay [ top,r i g ht] , Ar r ay [b ot tom ,r i g h t] )
re tu r n s O b je c t w i th t r a n sf or m prop er t ie s s e t
c an Add Prop er t y (s t r i n g prop er t y Name ) re tur n s b ool e an
can S et Col l ap se Tr ans for ma tion : b oo l ean : re ad O n ly
can S et Ena ble d : bo olea n : rea dO n ly
c a n S e t Ti m e Rem a p E n a bl e d : b o o l e a n : rea d O n l y
co l l ap s e Tr an s fo r m a t i on : b o o l e a n : rea d/ w r i te
com m e n t : s t r i n g : rea d / w r i te
con t a i n i n g Com p : Com p Ite m : rea d O n l y
cop y ToCom p ( Com p Item i n toC om p) n o ret u r n
du pl i c ate( ) re tur n s AV Layer
effe ct sAct ive : b oo l ean : re ad/w r ite
e l id ed : b ool e an : rea d On ly
ena ble d : bo olea n : rea d/w r i te
f r a m e B l e n d i n g : b o o l e a n : rea dO n l y
f r a m e B l e n d i n g Ty p e : Fr a m e B l e n d i n g Ty p e : rea d / w r i te
gu ideLayer : bo olea n : rea d /w r i te
h as Au di o : b o ol ea n : rea dO n l y
h as Tr a ck Ma tte : bo olea n : rea d Only
h as Vi de o : b oo l ean : re ad O n ly
h eig h t : f l o at : rea dO n l y
i n Poi n t : fl o a t : rea d / w r i te
i n dex : i n te g e r : rea dO n l y
i s E ff e c t : b o o l e a n : re a d O n ly
i s Mas k : b o o l e a n : rea dO n l y
i s Mod i fi e d : b o o l e a n : rea dO n ly
i s Na m e Fro m S o u rce : b o o l e a n : rea d O n l y
i s Na m e S e t : b o o l e a n : rea d O n ly
i s Tr a ck Ma tte : b o ol ea n : rea d On l y
l o cke d : b o o l e a n : rea d/ w r i te
m a tch Na m e : s t r i n g : rea d O n l y
m o t i o n B lu r : b o o l e an : rea d / w r i te
moveAfter(Layer ot her L ayer) no re tur n
179
After Effects Object Summary
180
180
After Effects Object Summary
181
Bl e n d in g Mod e .E XC LU S I ON
Bl e n d in g Mod e .H A R D _ L I G HT
Bl e n d in g Mod e .H A R D _ M I X
Bl e n d in g Mod e .H UE
Bl e n d in g Mod e .L I G H T E N
Bl e n d in g Mod e .L I G H T E R _ C O LOR
Bl e n d in g Mod e .L I N E A R _ BU R N
Bl e n d in g Mod e .L I N E A R _ D O D G E
Bl e n d in g Mod e .L I N E A R _ L I G H T
Bl e n d in g Mod e .LU M I N E S C E N T _ PR E M U L
Bl e n d in g Mod e .LU M I N O S I T Y
Bl e n d in g Mod e .M ULT I PLY
Bl e n d in g Mod e .N O R M A L
Bl e n d in g Mod e .OV E R L AY
Bl e n d in g Mod e .PI N _ L I G H T
Bl e n d in g Mod e .S AT U RAT I O N
Bl e n d in g Mod e .S C R E E N
Bl e n d in g Mod e .S I L H OU E T E _ A L PH A
Bl e n d in g Mod e .S I L H OU E T T E _ LUM A
Bl e n d in g Mod e .S O F T _ L I G HT
Bl e n d in g Mod e .S T E N C I L _ A L PHA
Bl e n d in g Mod e .S T E N C I L _ LUM A
B l e n d in g Mod e . V I V I D _ L I G H T
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == ==
C l o s e O p t i o n s e nu m
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
C l o s e O p t i o n s . D O _ N OT _ S AV E _ C H A N G E S
C l o s e O p t i o n s . PRO M P T _ TO _ S AVE _ C H A N G E S
C l o s e O p t i o n s . SAV E _ C H A N G E S
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == ==
Com p Ite m o b j e c t
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
a c t iveC a m e r a : L ayer : rea d O n l y
a pp ly Pres e t( s t r in g pre s e t Na m e ) n o re tur n
b g Co lor : Ar r ay of fl o a t : rea d / w r i te
com m e n t : s t r i n g : rea d / w r i te
d i s p l ay S t a r t Ti m e : f l o a t : rea d / w r i te
d r a ft 3 d : b o o l e a n : rea d / w r i te
du pl i c ate( ) re tur n s Comp Item
du r at i o n : f l o at : rea d/ w r i te
fo otageMissin g : bo olea n : rea d Only
f r a m e B l e n d i n g : b o o l e a n : rea d/ w r i te
f r a m eD ur a t i on : fl o a t : rea d / w r i te
f r a m eRa te : fl o a t : rea d / w r i te
h as Au di o : b o ol ea n : rea dO n l y
h as Vi de o : b oo l ean : re ad O n ly
h eig h t : i n teg er : re ad / w r i te
h id e S hy L aye r s : b o o l e an : rea d / w r i te
i d : i n te g e r : rea d On l y
l ayer (i n t e g e r l ayer In dex ) re t u r n s L ayer
l ayer (s t r i n g l ayer Na m e ) re t u r n s L ayer
181
After Effects Object Summary
182
layer (Layer ot herLayer, inte ger re lat iveIn dex) ret ur n s Layer
layers : LayerCol lec t ion: rea dO n ly
m o t i o n B lu r : b o o l e an : rea d / w r i te
n a m e : s t r i n g : rea d / w r i te
nu mLayers : inte ger : rea d Only
parentFolder : Fo lderItem : rea d /w r i te
p i xel As p e c t : f l o at : rea d/ w r i te
preser veNeste d Fr a m eRa te : bo olea n : rea d/w r i te
preser veNeste d Resolut i on : bo olea n : rea d /w r i te
prox ySou rce : Fo ota g eSource : rea dO n ly
remove() no re tu r n
renderer : st r in g : rea d/w r i te
renderers : Ar r ay of st r i ng: rea d Only
res o lut i o n Fa c to r : A r r ay of i n te g e r : rea d / w r i te
s e l e c t e d : b o o l e an : rea d / w r i te
s e l e c t e d L ayer s : A r r ay o f L ayer : rea d O n l y
s e l e c t e d Prop e r t i e s : A r r ay of Pro p e r t yB a s e : rea dO n l y
s e t Proxy ( F i l e prox y F i l e ) n o re t u r n
s e t Proxy ToNon e ( ) n o ret u r n
s e t Proxy Wi thP l a ce h o l der ( s t r in g n am e , i n te g e r w id t h , i n te g e r h e i g h t, f l o at f r am e R a te , f l o at dur at i o n )
n o re t u r n
s et Proxy Wi thS e quen ce( F il e prox y F il e , b o ol ea n forceAl p hab et i c al ) n o re tur n
s e t Proxy Wi thS o l id ( Ar r ay O fF l o a t co lor, s t r i n g n a m e , i n te g e r w i d th , i n te g e r h e i g h t ,
fl o at p ixel As p e c R at i o ) n o re tur n
s hut terAn g l e : i n te g er : rea d / w r i te
s hut terP ha se : i n te g er : rea d / w r i te
t i m e : f l o at : rea d / w r i te
t y p e Na m e : s t r i n g : rea d O n ly
u s e Prox y : b o o l e a n : rea d / w r i te
u s e dIn : A r r ay o f Com p Ite m : rea d O n l y
w i dt h : in te ger : rea d/ w r i te
wor k Area Du r a ti on : f l o at : rea d/ w r i te
wor k Area St ar t : flo a t : rea d /w r i te
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == ==
F i e l d S e p a r a t i o n Ty p e e nu m
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
F i e l d S e p a r a t i o n Ty p e . LOW E R _ F I E L D _ F I R S T
F i e l d S e p a r a t i o n Ty p e . O F F
F i e l d S e p a r a t i o n Ty p e . U PPE R _ F I E L D _ F I R ST
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == ==
F i l e S o u rce o b j e c t
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
a lp ha Mod e : Al ph aMo de : rea d / w r i te
con f o r m Fr a m e R a te : f l o a t : rea d / w r i te
d i s p l ay Fr a m e R ate : f l o at : re a d O n ly
f i e l d S e p a r a t i on Ty p e : F i e l d S e p a r a t i on Ty p e : rea dO n l y
f i le : File : rea d Only
g u e ss A l ph aMo de( ) n o re t u r n
g u e ss Pu l l dow n (Pul l dow n Me t h o d p u l l dow n Me t h o d) n o re t u r n
h a s Al p h a : b o o l e a n : rea dO n l y
h ig hQ ua l it y F ie l dS e pa r a ti on : b oo l ean : re ad / w r ite
182
After Effects Object Summary
183
183
After Effects Object Summary
184
184
After Effects Object Summary
185
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == =
C am er a L ayer ob je c t
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
(inte g er proper t y In dex) ret ur n s Prop er t y B a se
( st r i n g p ro p e r t y Na m e ) re tu r n s Prop er t y B as e
a c t ive : b oo l ean : re ad O n ly
a c t iveAtTim e(f lo at at Ti me ) re tur n s b oole an
a d dProp er t y (s t r i ng prop er t y Name ) re tur n s Prop er t y Ba s e
a d ju s t m e n t L ayer : b o o l e an : rea d O n ly
a pp ly Pres e t( s t r in g pre s e t Na m e ) n o re tur n
a utoOr i e n t : AutoO r i e n t Ty p e : rea d/ w r i te
c an Add Prop er t y (s t r i n g prop er t y Name ) re tur n s b ool e an
can S et Ena ble d : bo olea n : rea dO n ly
com m e n t : s t r i n g : rea d / w r i te
con t a i n i n g Com p : Com p Ite m : rea d O n l y
cop y ToCom p ( Com p Item i n toC om p) n o ret u r n
du pl i c ate( ) re tur n s Camer aLayer
e l id ed : b ool e an : rea d On ly
ena ble d : bo olea n : rea d/w r i te
h as Vi de o : b oo l ean : re ad O n ly
i n Poi n t : fl o a t : rea d / w r i te
i n dex : i n te g e r : rea dO n l y
i s E ff e c t : b o o l e a n : re a d O n ly
i s Mas k : b o o l e a n : rea dO n l y
i s Mod i fi e d : b o o l e a n : rea dO n ly
i s Na m e S e t : b o o l e a n : rea d O n ly
l o cke d : b o o l e a n : rea d/ w r i te
m a tch Na m e : s t r i n g : rea d O n l y
moveAfter(Layer ot her L ayer) no re tur n
m oveB e f ore( L ayer o t h er L ayer ) n o re t u r n
m oveTo( in te g er in d ex ) n o ret u r n
m oveToB e g i n n i n g ( ) n o re t u r n
moveToEnd() no re tu r n
n a m e : s t r i n g : rea d / w r i te
nu l l L aye r : b o o l e a n : rea d O n l y
nu m Prop er t i e s : i n te g e r : rea d On l y
o u t Po i n t : f l o at : rea d/ w r i te
parent : Layer : re ad/w r ite
p a ren t Pro p e r t y : Pro p e r t y Gro u p : rea d O n l y
prop er t y ( i nte g er prop er t y Index) ret ur n s Prop er t yB a se
prop er t y (st r ing proper t y Na me) ret ur n s Prop er t y B a se
prop er t y D ep t h : i n te ger : rea d On ly
prop e r t y Gro u p ([ i n te g e r cou n tUp ]) ret u r n s Prop e r t y Gro u p
prop er t y Ty p e : Prop er t y Ty p e : rea d O n ly
remove() no re tu r n
s e l e c t e d : b o o l e an : rea d / w r i te
s e l e c t e d Prop e r t i e s : A r r ay of Pro p e r t yB a s e : rea dO n l y
s et Paren t Wi th Jum p ( L ayer n e wPa ren t ) n o re tu r n
s hy : b o o l e an : rea d / w r i te
s o l o : b oo l e an : re ad / w r ite
s ta r t Ti m e : fl o a t : rea d / w r i te
185
After Effects Object Summary
186
186
After Effects Object Summary
187
Ma sk Mo de. I NTERS E CT
Ma sk Mo de. L IG HTE N
Ma sk Mo de. N ONE
Ma sk Mo de. SU BTRAC T
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = ==
Ma skMot i onBlur en um
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
Ma sk Mot i on Blur.O F F
Ma sk Mot i on Blur.O N
Ma sk Mot i on Blur.S A ME _ AS _ L AYE R
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = ==
Ma skProper t yGroup obj ec t
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
(inte g er proper t y In dex) ret ur n s Prop er t y B a se
( st r i n g p ro p e r t y Na m e ) re tu r n s Prop er t y B as e
a c t ive : b oo l ean : re ad O n ly
a d dProp er t y (s t r i ng prop er t y Name ) re tur n s Prop er t y Ba s e
c an Add Prop er t y (s t r i n g prop er t y Name ) re tur n s b ool e an
can S et Ena ble d : bo olea n : rea dO n ly
co lor : Ar r ay of fl o a t : rea d / w r i te
du pl i c ate( ) re tur n s Ma s kProp er t y Group
e l id ed : b ool e an : rea d On ly
ena ble d : bo olea n : rea dO n ly
i nver te d : b o o l e an : rea d / w r i te
i s E ff e c t : b o o l e a n : re a d O n ly
i s Mas k : b o o l e a n : rea dO n l y
i s Mod i fi e d : b o o l e a n : rea dO n ly
l o cke d : b o o l e a n : rea d/ w r i te
ma sk Mo de : Mas kMo de : rea d/w r i te
m a s k Mot i o n B lu r : Mas k Mot i on Bl u r : rea d / w r i te
m a tch Na m e : s t r i n g : rea d O n l y
m oveTo( in te g er in d ex ) n o ret u r n
n a m e : s t r i n g : rea d / w r i te
nu m Prop er t i e s : i n te g e r : rea d On l y
p a ren t Pro p e r t y : Pro p e r t y Gro u p : rea d O n l y
prop er t y ( i nte g er prop er t y Index) ret ur n s Prop er t yB a se
prop er t y (st r ing proper t y Na me) ret ur n s Prop er t y B a se
prop er t y D ep t h : i n te ger : rea d On ly
prop e r t y Gro u p ([ i n te g e r cou n tUp ]) ret u r n s Prop e r t y Gro u p
prop er t y Index : i n te ger : rea d Onl y
prop er t y Ty p e : Prop er t y Ty p e : rea d O n ly
remove() no re tu r n
rotoB ezier : bo olean : rea d/w r ite
s e l e c t e d : b o o l e an : rea d / w r i te
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == =
O MCol l e c t i o n o b j e c t
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
a d d( ) re tu r n s O ut p ut Mo dul e
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = ==
O ut put Mod ul e ob j ec t
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
187
After Effects Object Summary
188
a p p ly Te m p l a t e ( s t r i n g t e m p l a teNam e) n o re t u r n
f i le : File : rea d /w r i te
n a m e : s t r i n g : rea d O n l y
p o s t Ren de r Ac t i o n : Pos t Ren de r Ac t i o n : rea d/ w r i te
remove() no re tu r n
s aveAs Tem p l a t e ( s t r i n g t e m p l a teNam e) n o re t u r n
tem p l a tes : Ar r ay of s t r in g : rea dO n ly
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = ==
Placeho l derSou rce obj ec t
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
a lp ha Mod e : Al ph aMo de : rea d / w r i te
con f o r m Fr a m e R a te : f l o a t : rea d / w r i te
d i s p l ay Fr a m e R ate : f l o at : re a d O n ly
f i e l d S e p a r a t i on Ty p e : F i e l d S e p a r a t i on Ty p e : rea d/ w r i te
g u e ss A l ph aMo de( ) n o re t u r n
g u e ss Pu l l dow n (Pul l dow n Me t h o d p u l l dow n Me t h o d) n o re t u r n
h a s Al p h a : b o o l e a n : rea dO n l y
h ig hQ ua l it y F ie l dS e pa r a ti on : b oo l ean : re ad / w r ite
inver t Alpha : bo olea n : rea d /w r i te
i s St i l l : b o o l e a n : rea dO n l y
l o op : i n te g er : rea d / w r i te
na t iveFr am eRa te : flo at : rea d Only
premu l Color : Ar r ay of f l oa t : re ad /w r ite
rem ovePu l l dow n : Pul l dow n P ha se : re ad / w r ite
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = =
Post RenderAc t i on enum
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
Pos t Ren derAc t i on .I M PO RT
Pos t Ren derAc t i on .I M PO RT _ AN D _ RE P L AC E _ US AG E
Pos t Ren derAc t i on .N O N E
Pos t Ren derAc t i on .S E T _ P ROXY
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = ==
Pro jec t ob je c t
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
a c t iveItem : Item : rea d On ly
a utoF i xE x pres si o n s (o ld Tex t,
n e w Te x t ) n o ret u r n
bit s PerChan n el : integer : re ad/w r ite
cl o se( C l os eO p t i on s c lo se O p t ion s ) re tu r n s b oo l ean
cons oli d ate Fo ota ge( ) re tur n s i n te ger
d i sp layS ta r t Fr a m e : i n teger : re ad /w r ite
f i le : File : rea d Only
i m p o r t F i l e ( Im p or tO p t i o n s im p o r t O p ti o n s ) re tur n s Ite m
i m p o r t F i l eWi t hD i al o g () ret ur n s Ar r ay O f Item
i m p o r t P l a ce h o ld e r ( st r i n g i te m Nam e, i n te g e r i te m Wi dt h , i n teg e r i te m He ig h t , f l o a t fr a m e R a te ,
f l o at dur at i o n ) re t ur n s Fo o t ag eItem
i te m ( i n te g e r i te m In d e x ) ret ur n s Ite m
i te m s : Ite m Col l e c t i o n : rea dO n l y
l i n e a r B l e n d i n g : b o o l e a n : rea d / w r i te
nu mItem s : in te ger : re adOnly
red u ce Pro je c t( Ar r ay O fItem i te m s To Pres e r ve ) re t u r n s in te g er
188
After Effects Object Summary
189
189
After Effects Object Summary
190
m oveTo( in te g er in d ex ) n o ret u r n
n a m e : s t r i n g : rea d O n l y
ne ares tKe y In d ex(f l o at at Ti me ) ret ur n s inte ger
nu mKe y s : in te ger : re adOnly
p a ren t Pro p e r t y : Pro p e r t y Gro u p : rea d O n l y
prop er t y D ep t h : i n te ger : rea d On ly
prop e r t y Gro u p ([ i n te g e r cou n tUp ]) ret u r n s Prop e r t y Gro u p
prop er t y Index : i n te ger : rea d Onl y
prop er t y Ty p e : Prop er t y Ty p e : rea d O n ly
prop er t y Va lue Ty p e : Prop er t yVa lue Ty p e : rea d On l y
remove() no re tu r n
rem oveKe y ( i n te g e r ke yIn d ex ) n o re t u r n
s e l e c t e d : b o o l e an : rea d / w r i te
s e l e c t e d Ke y s : Ar r ay o f in te g er : rea dO n l y
s e t In te r p o l at i o n Ty p e AtKe y ( i n te g e r ke y Ind ex , Ke y fr ameIn ter p o l at ion Ty p e in Ty p e ,
[Ke y fr am e In ter p o la t i on Ty p e o u tTy p e ] ) n o ret u r n
s e t Rov i n g At Ke y ( i n te g e r ke y In d ex , b o o l e a n i s Rov in g ) n o re t u r n
s et S e l ec te dAtKe y ( i n te g er ke y In d ex , b ool e an i s S el e c ted ) n o re t ur n
s et S pa t i al AutoB ez i erAtKe y ( i n te g er ke y In d ex , b ool e an i s Auto B ez i er) n o re t ur n
s et S pa t i al Con t i nuou sAtKe y( i n te g er ke y In d ex , b o o l e an i s Con t in u o u s ) n o ret u r n
s et S pa t i alTa ngen ts At Ke y(i n te ger ke yIndex, Ar r ayO fFlo a t i n Ta ngen t, [ Ar r ayO f Floa t o utTa n gent] )
n o re t u r n
s e t Te m p or al Au to B e z i e r At Ke y( i n te g e r ke y In d ex , b o o l e an i s Aut o B ez i e r ) n o ret ur n
s e t Te m p or al Co n t i nuo u s At Ke y( i n te g e r ke y In dex , b oo le an i s Con t in u o u s ) n o ret u r n
set Temp or alEa se AtKe y (integer ke yIndex , Ar r ayO fKe y fr ameE ase inEase,
[Ar r ay Of Ke y f r a m eE a se outE a s e]) n o re tur n
s e t Va l u e ( t y p e - s to re d - i n - p rop er t y n e w Va l u e ) n o re t u r n
s e t Va l u e AtKe y( i n te g e r ke y In d ex , t y p e- s tore d - i n - p rop er t y n e w Va lu e ) n o re t u r n
s e t Va l u e AtTi m e ( f l o a t a t Tim e , t y p e - stored - i n - prop er t y n ew Va lue) n o re tur n
s e t Val u e s At Ti m e s( Ar r ay O f F lo a t a tTi m e s , Ar r ayOf - t y p e - s tored - i n - prop e r t y n e w Valu e s ) n o re tu r n
un it sTex t : st r i ng : re ad O n ly
v alue : t y p e - store d- i n - prop er t y : re a d O n ly
v alue At Ti m e ( f l o at a t Ti m e , b o o l p re Ex p res s i on ) ret u r n s t y p e - stored - i n - prop er t y
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = ==
Pro p e r t y Gro u p o b j ec t
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
(inte g er proper t y In dex) ret ur n s Prop er t y B a se
( st r i n g p ro p e r t y Na m e ) re tu r n s Prop er t y B as e
a c t ive : b oo l ean : re ad O n ly
a d dProp er t y (s t r i ng prop er t y Name ) re tur n s Prop er t y Ba s e
c an Add Prop er t y (s t r i n g prop er t y Name ) re tur n s b ool e an
can S et Ena ble d : bo olea n : rea dO n ly
du pl i c ate( ) re tur n s Prop er t y Group
e l id ed : b ool e an : rea d On ly
ena ble d : bo olea n : rea dO n ly
i s E ff e c t : b o o l e a n : re a d O n ly
i s Mas k : b o o l e a n : rea dO n l y
i s Mod i fi e d : b o o l e a n : rea dO n ly
m a tch Na m e : s t r i n g : rea d O n l y
m oveTo( in te g er in d ex ) n o ret u r n
n a m e : s t r i n g : rea d O n l y
190
After Effects Object Summary
191
nu m Prop er t i e s : i n te g e r : rea d On l y
p a ren t Pro p e r t y : Pro p e r t y Gro u p : rea d O n l y
prop er t y ( i nte g er prop er t y Index) ret ur n s Prop er t yB a se
prop er t y (st r ing proper t y Na me) ret ur n s Prop er t y B a se
prop er t y D ep t h : i n te ger : rea d On ly
prop e r t y Gro u p ([ i n te g e r cou n tUp ]) ret u r n s Prop e r t y Gro u p
prop er t y Index : i n te ger : rea d Onl y
prop er t y Ty p e : Prop er t y Ty p e : rea d O n ly
remove() no re tu r n
s e l e c t e d : b o o l e an : rea d / w r i te
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == =
Pro p e r t y Ty p e e nu m
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
Prop er t y Ty p e .I N D E XE D_ G RO UP
Prop er t y Ty p e .NA ME D _ GROU P
Prop er t y Ty p e .P ROPE RT Y
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = =
Proper t y Valu eTy p e enum
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
Proper t y Valu eTy p [Link] LO R
Proper t y Valu eTy p [Link] STOM _VALU E
Proper t y Valu eTy p [Link] E R_IND E X
Proper t y Valu eTy p e.M ARKER
Proper t y Valu eTy p e.M ASK_INDEX
Proper t y Valu eTy p [Link] _VA LUE
Proper t y Valu eTy p e.O n eD
Proper t y Valu eTy p [Link] APE
Proper t y Valu eTy p [Link] XT _D O C UM ENT
Proper t y Valu eTy p e.T hree D
Proper t y Valu eTy p e.T hree D_SPATIAL
Proper t y Valu eTy p [Link]
Proper t y Valu eTy p [Link] _SPATIA L
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = ==
Pul l dow n Ph a s e e nu m
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
Pul l dow n Ph a s e . O F F
Pul l dow n Ph a s e . S S W W W
Pul l dow n Ph a s e . S W W WS
Pul l d ow n Ph a s e . S W W W W _ 2 4 P _ A DVA N C E
Pul l dow n Ph a s e . WS S W W
Pul l d ow n Ph a s e . WS W W W _ 2 4P _ A DVAN C E
Pul l dow n Ph a s e . W WS S W
Pul l d ow n Ph a s e . W WS W W _ 2 4P _ A DVAN C E
Pul l dow n Ph a s e . W W WS S
Pul l dow n Ph a s e . W W WS W _ 2 4 P _ A DVA N C E
Pul l dow n Ph a s e . W W W WS_ 2 4 P _ A DVA N C E
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = ==
Pul l dow n Me t h o d e nu m
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
Pul l dow n Me t h o d . A DVAN C E _ 2 4 P
Pul l dow n Me t h o d . P U L L D OW N _ 3 _ 2
191
After Effects Object Summary
192
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == =
PurgeTa rge t enu m
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
Pur g e Ta r g e t . A L L _ C AC H E S
Pur g e Ta r g e t . I M AG E _ C AC H E S
PurgeTa rge t. SNAP SH OT _ C AC HES
Purg eTa rg e t. UN D O _C AC HE S
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == =
RenderQu eu e obj ec t
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
i te m ( i n te g e r i te m In d e x ) ret ur n s Ren d e r Q u e u e It em
items : RQ ItemCol l ec t ion : re adO n ly
nu mItem s : in te ger : re adOnly
pau se Render ing (b oole an doPa use) no retur n
ren de r ( ) n o re t u r n
render in g : bo olea n : rea d Only
s how Win dow( b o ol ea n doS how) n o re tur n
s to p Ren d e r i n g ( ) n o re t u r n
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = =
RenderQu eu eItem obje c t
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
a p p ly Te m p l a t e ( s t r i n g t e m p l a teNam e) n o re t u r n
com p : Com p Ite m : rea d O n l y
du pl i c ate( ) re tur n s Rend erQu eu eItem
e l ap se d S e co n d s : f l o a t : re ad O n ly
l o g Ty p e : Lo g Ty p e : rea d / w r i te
nu mOut putMo dule s : in te ger : rea dO n ly
o ut p utMo du le (i n teg er o ut p ut Modu l eIn dex ) ret ur n s Out p utMo du l e
out p utMo du le s : OM Col le c ti on : rea d On ly
remove() no re tu r n
render : bo olean : re ad/w r ite
s aveAs Tem p l a t e ( s t r i n g t e m p l a teNam e) n o re t u r n
s ki p Fr a m e s : i n te g e r : rea d / w r i te
s ta r t Ti m e : fl o a t : rea d On ly
s ta tus : RQ Item S ta tus : rea d On l y
tem p l a tes : Ar r ay of s t r in g : rea dO n ly
t i m eS p an D ur at i o n : f l o at : re ad / w r ite
t i m eS p an S t ar t : f l o at : rea d/ w r i te
o n S t a t u s C h a n g e d ( ) n o re t u r n
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = ==
RQ ItemCol le c tion ob jec t
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
a d d( Com p Ite m com pToAd d ) re tur n s Ren d er Qu eu e Item
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = ==
RQ ItemSt at us enum
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
RQ Item St at us .D ON E
RQ Item St at us .E RR _ STO P PE D
RQ Ite m S t a t u s . N E E D S _ O U T P U T
RQ Item St at us .QU E UE D
RQ Item St at us .RE N D E RI N G
192
After Effects Object Summary
193
193
After Effects Object Summary
194
194