100% encontró este documento útil (1 voto)
2K vistas194 páginas

Manual Adobe After Effects CS3 Scripting

manual de after effects CS3
Derechos de autor
© Attribution Non-Commercial (BY-NC)
Nos tomamos en serio los derechos de los contenidos. Si sospechas que se trata de tu contenido, reclámalo aquí.
Formatos disponibles
Descarga como PDF, TXT o lee en línea desde Scribd
100% encontró este documento útil (1 voto)
2K vistas194 páginas

Manual Adobe After Effects CS3 Scripting

manual de after effects CS3
Derechos de autor
© Attribution Non-Commercial (BY-NC)
Nos tomamos en serio los derechos de los contenidos. Si sospechas que se trata de tu contenido, reclámalo aquí.
Formatos disponibles
Descarga como PDF, TXT o lee en línea desde Scribd

GUÍA DE SECUENCIAS DE

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.

Si no está familiarizado con las secuencias de comandos


After Effects es una herramienta visual con una interfaz de usuario gráfica; usted está acostumbrado a
interactuar con ella mediante elementos de la interfaz, como menús, paneles e iconos. Para la mayor parte, ésta
es la manera más fácil de trabajar. Las secuencias de comandos están diseñadas para situaciones en las que esta
metodología conlleva numerosas repeticiones o laboriosas búsquedas y ordenaciones que se pueden
automatizar. Las secuencias de comandos pueden aliviar tareas tediosas que, de otra manera, implicarían
seleccionar y hacer clic muchas veces. También resultan útiles para aprovechar la eficacia del procesamiento en
red en situaciones en las que la Carpeta de inspección es menos eficaz (y más difícil de configurar). Consulte
“Examples” en la página 174 para ver ejemplos de lo que pueden hacer las secuencias de comandos.
Si acaba de iniciarse en la creación de secuencias de comandos, consulte Adobe: Introducción a las secuencias de
comandos, donde se presentan los conceptos básicos de las secuencias de comandos y se describen distintos
lenguajes de secuencias de comandos disponibles, incluido JavaScript. JavaScript y otros lenguajes de
secuencias de comandos funcionan en torno a los objetos y este manual también describe los conceptos básicos
de la programación basada en objetos y modelos de objetos de documento.
Aunque no tenga intención de aprender el lenguaje JavaScript, puede aprovechar de todos modos la eficacia de
las secuencias de comandos mediante soluciones de terceros como Rush Network Render Queue, una interfaz
de usuario gráfica que permite configurar procesos distribuidos desde cualquier equipo de la red sin tener que
configurarlos en equipos individuales.
También puede aprovechar la contribución de usuarios que comparten secuencias de comandos con otros
usuarios. Los grandes estudios pueden tener a estos usuarios en plantilla, mientras que otros usuarios pueden
visitar foros como los que encontrará en
w w w.a dobefor u ms .com .

Acerca de esta guía


Esta guía está destinada a usuarios que administren canalizaciones de gráficos (que pueden incluir también
otras aplicaciones de secuencias de comandos) y que deseen escribir secuencias de comandos para agregar
funcionalidades personalizadas a After Effects.
Esta funcionalidad también la ofrecen soluciones de administración de procesos en red de terceros. Estos
productos incluyen software diseñado para facilitar la administración de este proceso, por lo que es posible
aprovechar la funcionalidad sin necesidad de editar manualmente las secuencias de comandos.

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.

Matemática del movimiento


La matemática del movimiento ya no se incluye en After Effects; su funcionalidad ha sido reemplazada por las
secuencias de comandos y las expresiones. Todos los operadores matemáticos y lógicos comunes para
ECMAScript están disponibles en las secuencias de comandos.
Por ejemplo, con expresiones se puede simular la física de una pelota que bota mediante la aplicación de reglas
matemáticas a una capa “pelota”. Pero con secuencias de comandos, se puede crear una interfaz de usuario
completa que permita la animación de una capa de una pelota que bota y su sombra utilizando los criterios
que especifica el usuario.

Edición de secuencias de comandos


After Effects incluye un editor de JavaScript. Para iniciarlo, elija Archivo > Scripts > Abrir el Editor de
secuencias de comandos. Este depurador y editor de secuencias de comandos, llamado Kit de herramientas de
ExtendScript, proporciona una cómoda interfaz para crear y probar sus propias secuencias de comandos.
Puede utilizar cualquier editor de texto para crear, editar y guardar secuencias de comandos, pero se
recomienda que elija una aplicación que no agregue automáticamente información de encabezado al guardar
los archivos y que guarde con la codificación Unicode (UTF-8).

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).

Formato JSX de ExtendScript


After Effects admite ExtendScript, la implementación extendida de JavaScript de Adobe. Todas las
aplicaciones de Adobe que proporcionan una interfaz de secuencias de comandos utilizan ExtendScript.
Además de implementar el lenguaje JavaScript según las especificaciones ECMA 262 y E4X ECMA 357,
ExtendScript ofrece algunas funciones y utilidades adicionales:
Kit de herramientas de ExtendScript: Como ayuda para crear, depurar y probar secuencias de comandos,
ExtendScript proporciona un entorno de desarrollo y de prueba interactivo, el Kit de herramientas de
ExtendScript. También define un objeto de depuración global, el objeto de dólar ($) y una utilidad de
generación de informes para elementos de ExtendScript, la interfaz ExtendScript Reflection.
Objetos File y Folder: Puesto que la sintaxis de los nombres de rutas es muy diferente en los distintos sistemas
operativos, Adobe ExtendScript define los objetos Archivo y Ca r p et a para proporcionar un acceso
independiente de la plataforma al sistema de archivos subyacente.
Módulo de interfaz de usuario ScriptUI: El módulo ScriptUI de ExtendScript permite crear e interactuar con
elementos de la interfaz de usuario. ScriptUI proporciona un modelo de objetos para ventanas y elementos de
control de UI que se pueden emplear para crear una interfaz de usuario para las secuencias de comandos.
Herramientas y utilidades: Además, ExtendScript ofrece herramientas y funciones, como una utilidad de
traducción que proporciona valores de cadenas de la interfaz de usuario en distintos idiomas y funciones
globales para mostrar mensajes cortos en cuadros de diálogo (aler t , con f i r m y promp t ).
Comunicación entre aplicaciones: ExtendScript proporciona un entorno de secuencias de comandos común
para todas las aplicaciones de Adobe y permite la comunicación entre aplicaciones mediante secuencias de
comandos.
Comunicación externa: ExtendScript ofrece un objeto S o c ke t que permite la comunicación con equipos
remotos desde las secuencias de comandos de After Effects.
Éstas y otras funciones se describen en detalle en Guía de herramientas de JavaScript, disponible con After
Effects y en [Link]
Los archivos de secuencias de comandos de ExtendScript se diferencian por la extensión . js x , una variación de
la extensión estándar . js utilizada con los archivos de JavaScript. Las secuencias de comandos de After Effects
deben incluir la extensión de archivo .j sx para que la aplicación las reconozca correctamente. Cualquier
archivo de texto codificado con UTF-8 que tenga la extensión .j sx se reconocerá como un archivo de
ExtendScript.
Se puede utilizar el kit de herramientas de ExtendScript Toolkit para exportar una versión binaria de un
archivo de ExtendScript, cuya extensión es .js x bin . Es probable que los archivos binarios no puedan utilizarse
con todas las funciones de integración de secuencias de comandos en After Effects.

Activación de funciones de secuencias de comandos completas


Por motivos de seguridad, las funciones de secuencias de comandos que se ejecutan fuera de la aplicación After
Effects (como agregar y eliminar archivos y carpetas en volúmenes, o el acceso a la red) están deshabilitadas
de forma predeterminada.
Para habilitar estas funciones, elija Preferencias > General y seleccione “Permitir que los scripts puedan
escribir archivos y acceder a la red”. Lo cual le permite:

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.

Acceso y escritura de secuencias de comandos


Para crear y editar secuencias de comandos para After Effects, puede utilizar el kit de herramientas de
ExtendScript o una aplicación de edición de texto externa que permita crear archivos con la codificación de
texto Unicode UTF-8. Tenga cuidado con aplicaciones como Microsoft Word, que de forma predeterminada
agregan información de encabezado a los archivos; estas aplicaciones crean errores de línea 0 en las secuencias
de comandos y provocan un fallo de ejecución.
Una secuencia de comandos puede residir en cualquier lugar pero, para que se muestre en el menú Scripts, es
necesario que se guarde en la carpeta Scripts, dentro de la carpeta de la aplicación After Effects.
No hay un método integrado para grabar una serie de acciones en una secuencia de comandos en After Effects
del modo en que se puede realizar en Adobe Photoshop®. Las secuencias de comandos se crean fuera de After
Effects y se ejecutan dentro, o externamente mediante una línea de comandos, el kit de herramientas de
ExtendScript o el software de administración de procesos de terceros.

Menú y carpeta Scripts


Las secuencias de comandos de After Effects residen en la carpeta Scripts, dentro de la misma carpeta que el
archivo de la aplicación After Effects. Cuando se inicia la aplicación, sólo las secuencias de comandos
guardadas en esta carpeta Scripts se enumeran automáticamente en el menú Scripts, aunque los archivos de
secuencias de comandos pueden residir en cualquier lugar.
Para ejecutar una secuencia de comandos que no aparece en el menú Scripts, elija Archivo > Scripts > Ejecutar
guión y seleccione la secuencia de comandos en el cuadro de diálogo Abrir. También puede enviar a After
Effects una secuencia de comandos desde el Kit de herramientas de ExtendScript, la línea de comandos (en
Windows) o AppleScript (en Mac OS).
Para que se muestre en el cuadro de diálogo Abrir, la secuencia de comandos debe incluir la extensión de
archivo .js x adecuada.

Carpetas Shutdown y Startup


La carpeta Scripts contiene dos carpetas llamadas Startup y Shutdown. After Effects ejecuta automáticamente
las secuencias de comandos guardadas en estas carpetas, en orden alfabético, al iniciar y cerrar la aplicación,
respectivamente.
En la carpeta Startup puede colocar las secuencias de comandos que desea que se ejecuten al iniciar la
aplicación. Se ejecutarán después de que se inicialice la aplicación y todos los plugins estén cargados.

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.

El menú Ventana y la carpeta Paneles ScriptUI


Desde la carpeta Scripts, puede crear otra carpeta con el nombre Paneles ScriptUI. Utilice esta carpeta para las
secuencias de comandos cuya interfaz de usuario aparezca en un panel nativo (en lugar de aparecer en una
paleta flotante, un cuadro de diálogo o una ventana). La ventaja de un panel es que se puede acoplar a otros
paneles, como en un Proyecto, una Composición o Controles de tiempo, y dar la sensación de una mayor
integración en la aplicación. Al igual que en el caso de los paneles nativos, se accede a los paneles ScriptUI
desde el menú Ventana.
En lugar de crear un objeto de ventana y añadirle controles, una secuencia de comandos Paneles ScriptUI
utiliza el objeto “this” que representa al panel. Por ejemplo, el código siguiente añade un botón a un panel:
v ar my Pan e l = t hi s ;
my Pan e l . a dd ( " b u t ton " , [ 1 0 , 1 0 , 1 0 0 , 3 0 ] , " To o l # 1" ) ;
my Pan e l .s how ( );

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

Envío de secuencias de comandos a After Effects desde el sistema


Si está familiarizado con la ejecución de secuencias de comandos desde la línea de comandos en Windows o
mediante AppleScript, puede enviar una secuencia directamente a la aplicación After Effects abierta para que
la aplicación ejecute automáticamente la secuencia de comandos.

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 "

Cómo incluir secuencias de comandos de After Effects en AppleScript (Mac OS)


A continuación se indican tres ejemplos de secuencias de comandos AppleScript que envían un archivo JSX
existente que contiene una secuencia de comandos de After Effects a la aplicación sin utilizar la interfaz de
usuario de After Effects para ejecutar dicha secuencia.
En el primer ejemplo, se copia la secuencia de comandos de After Effects directamente en el Editor de
secuencias de comandos y, a continuación, se ejecuta. El texto de la secuencia aparecerá entre comillas después
del comando DoScript, de manera que deben omitirse las comillas internas de la secuencia con el carácter de
escape de barra invertida, como se muestra a continuación:
te l l app l icat ion "Adobe Af ter Ef fe ct s CS 3 "
D oS c r ip t " al er t( \ " Ac ab a de env i a r un a al er t a a Af ter E f fe c t s \ ") "
e n d te l l

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

te l l app l icat ion “ TextEd i t”


s e t t h e _ s c r i p t to s e l e c t i o n as text
e n d te l l

te l l app l icat ion "Adobe Af ter Ef fe ct s CS 3 "


a c t iva te
D o S c r ip t th e _ s c r i p t
e n d te l l

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).

Prueba y solución de problemas


Cualquier secuencia de comandos de After Effects que contenga un error que impida que se complete genera
un mensaje de error en la aplicación. Este mensaje de error contiene información sobre la naturaleza del error
y la línea de la secuencia de comandos en la que se ha producido.
Además, After Effects incluye un depurador de JavaScript. Para obtener información adicional sobre cómo
activar y utilizar el depurador, consulte la documentación del Kit de herramientas de ExtendScript en la Guía
de herramientas de JavaScript.

Más recursos para aprender a utilizar secuencias de comandos


Existen muchos recursos para aprender más sobre las secuencias de comandos que utilizan la norma ECMA.
El motor de secuencias de comandos de After Effects admite la tercera edición de la norma ECMA-262,
incluidos las convenciones léxicas y de anotación, tipos, objetos, expresiones e instrucciones.
Para obtener una lista completa de las palabras clave y los operadores que se incluyen con ECMAScript,
consulte el archivo [Link], disponible en [Link]/publications/standards/
[Link].
Los libros relativos a JavaScript 1.2 también resultan útiles para entender cómo funcionan las secuencias de
comandos en After Effects. Un libro que los usuarios de JavaScript reconocen como norma es JavaScript:
The Definitive Guide, de David Flanagan (O’Reilly). Otra fuente de consulta considerable es JavaScript:
A Beginner’s Guide de John Pollock (Osborne). Ambos contienen información relativa únicamente a las
extensiones de JavaScript para exploradores de Internet; no obstante, también describen de forma detallada
los conceptos básicos de las secuencias de comandos.
También hay libros sobre cómo usar AppleScript y cómo crear secuencias de comandos desde la línea de
comandos de Windows, y ambas se pueden utilizar para enviar secuencias a After Effects.

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

Sintaxis de instrucciones y palabras clave de JavaScript


Aunque no se puede proporcionar un recurso que describa de forma exhaustiva el uso de JavaScript, las
siguientes tablas ofrecen una descripción general de las palabras clave, instrucciones, operadores, prioridad y
asociatividad.
En la siguiente tabla se enumeran y se describen todas las palabras clave e instrucciones que reconoce el motor
de secuencias de comandos de After Effects.

Tabla 1 Sintaxis de instrucciones y palabras clave


Palabra clave/ Descripción
instrucción

b re a k JavaScript estándar; cierra el bucle que se está ejecutando actualmente.

con t i nue JavaScript estándar; interrumpe la ejecución de la repetición del bucle actual.

case Etiqueta que se utiliza en una instrucción s w i tch .

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.

f al s e Literal que representa el valor falso Booleano.

for Construcción de bucle estándar de JavaScript.

for.. .i n Construcción estándar de JavaScript. Proporciona una manera de desplazarse fácilmente por las
propiedades de un objeto.

f u n c t io n Se utiliza para definir una función.

i f / if . . . e ls e Construcciones condicionales estándar de JavaScript.

new Instrucción de constructor estándar de JavaScript.

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 .

t hi s Método estándar de JavaScript para indicar el objeto actual.

t r ue Literal que representa el valor verdadero Booleano.

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

Tabla 2 Descripción de los operadores


Operadores Descripción

new Asigna un objeto.

de l e te Anula la asignación de un objeto.

t y p e of Devuelve un tipo de datos.

voi d Devuelve un valor sin definir.

. Miembro de una estructura.

[] Elemento de una matriz.

() Llamada a una función.

++ Aumento anterior o posterior.

–– Reducción anterior o posterior.

– Resta o negación unaria.

~ NOT bit a bit.

! NOT lógico.

* Multiplicar.

/ Dividir.

% División modular.

+ Sumar.

<< Desplazamiento a la izquierda bit a bit.

>> Desplazamiento a la derecha bit a bit.

> >> Desplazamiento a la derecha bit a bit sin signo.

< Menor que.

<= Menor o igual que.

> Mayor que.

>= Mayor o igual que.

== Igual.

!= Distinto.

& AND bit a bit.

^ XOR bit a bit.

| OR bit a bit.

&& AND lógico.

|| OR lógico.

?: Condicional (ternario).

= Asignación.

+= Asignación con operación de suma.

11
Introducción Más recursos para aprender a utilizar secuencias de comandos

12

Operadores Descripción

–= Asignación con operación de resta.

*= Asignación con operación de multiplicación.

/= Asignación con operación de división.

%= Asignación con operación de división modular.

< <= Asignación con operación de desplazamiento a la izquierda bit a bit.

> >= Asignación con operación de desplazamiento a la derecha bit a bit.

> >> = Asignación con operación de desplazamiento a la derecha bit a bit sin signo.

&= Asignación con operación AND bit a bit.

^= Asignación con operación XOR bit a bit.

|= Asignación con operación OR bit a bit.

, Evaluación múltiple.

Tabla 3 Prioridad de los operadores


Operadores (de mayor a menor prioridad) Asociatividad

[ ], () , . izquierda a derecha

new, dele te , – ( n eg a c i ón un a r i a ), !, t y p e of, void , + +, – – derecha a izquierda

*, /, % izquierda a derecha

+ , – ( re st a) izquierda a derecha

< <, >> , > >> izquierda a derecha

< , < =, > , > = izquierda a derecha

= =, != izquierda a derecha

& izquierda a derecha

^ izquierda a derecha

| izquierda a derecha

&& izquierda a derecha

|| izquierda a derecha

?: derecha a izquierda

= , /= , % =, << =, > > =, > > >= , &=, ^= , |= , += , –= , *= 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.

The After Effects Object Model


As you look through this reference section, which is organized alphabetically by object, you can refer to the
following diagrams for an overview of where the various objects fall within the hierarchy, and their correspon-
dence to the user interface.

APPLICATION SYSTEM FILE FOLDER SOCKET

SETTINGS PROJECT ITEMS MAYBEANYOFTHEFOLLOWINGTYPESOFITEM

COMP)TEM /2 FOOTAGE)TEM /2 FOLDER)TEM

RENDER1UEUE ITEMS
LAYERS ITEMS
PROXY3OURCE MAIN3OURCE PROXY3OURCE
RENDER1UEUE)TEMS
PROPERTIES MAIN3OURCEPROXY3OURCE
MAYBEANYOFTHEFOLLOWINGTYPESOFITEM
OUTPUT-ODULES
SOLID3OURCE /2 PLACEHOLDER3OURCE /2 FILE3OURCE

COLOR FILE

Hierarchy diagram of the main After Effects scripting objects

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).

“CameraLayer object” on page 51 Represents a camera layer within a composition.

“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

“FileSource object” on page 61 Describes footage that comes from a file.

“FolderItem object” on page 63 Represents a folder in the Project panel.

“FootageItem object” on page 65 Represents a footage item imported into a project, which appears in the Project panel.

“FootageSource object” on page 68 Describes the file source of some footage.

“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.

“ItemCollection object” on page 80 Collects items in a project.

“KeyframeEase object” on page 82 Encapsulates keyframe ease values in an After Effects property.

“Layer object” on page 84 A base class for layer classes.

“LayerCollection object” on page 93 Collects layers in a project.

“LightLayer object” on page 98 Represents a light layer within a composition.

“MarkerValue object” on page 99 Encapsulates marker values in an After Effects property.

“MaskPropertyGroup object” on Encapsulates mask attributes in a layer.


page 103

“OMCollection object” on page 105 Collects output modules in a render queue.

“OutputModule object” on page 106 Represents an output module for a render queue.

“PlaceholderSource object” on page 109 Describes a placeholder for footage.

“Project object” on page 110 Represents an After Effects project.

“Property object” on page 119 Represents an After Effects property.

“PropertyBase object” on page 141 A base class for After Effects property and property group classes.

“PropertyGroup object” on page 148 Represents an After Effects property group.

“RenderQueue object” on page 153 Represents the After Effects render queue.

“RenderQueueItem object” on page 156 Represents a renderable item in a render queue.

“RenderQueueItem object” on page 156 Collects render-queue items in a 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.

“ShapeLayer object” on page 168 Represents a shape layer within a composition.

“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.

“TextDocument object” on page 172 Encapsulates the text in a text layer.

“TextLayer object” on page 173 Represents a text layer within a composition.

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.

Global function Description

cl e arO ut put () Clears text from the Info panel.

c u r re n t Fo r m a t To Ti m e ( ) Converts string time value to a numeric time value.

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.

clearOutput() global function


cl e arO ut put ()

Description

Clears the output in the Info panel.

Parameters

None.

Returns

Nothing.

currentFormatToTime() global function


c u r re n t Fo r m a t To Ti m e ( fo r m at te d Ti m e, f ps , is D ura t io n )

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

fps The frames-per-second, a floating-point value.

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

Floating-point value, the number of seconds.

timeToCurrentFormat() global function


t i m eToCur ren t For m at (t im e , f p s , is D ura t i on )

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

time The number of seconds, a floating-point value.

fps The frames-per-second, a floating-point value.

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

String in the project’s current time display format.

write() global function


w r ite( te x t )

Description

Writes output to the Info panel, with no line break added.

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

writeLn() global function


w r ite L n ( t e x t)

Description

Writes output to the Info panel and adds a line break at the end.

Parameters

tex t The string to display.

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

Attribute Reference Description

proj ec t “Application project attribute” on The current After Effects project.


page 28 and “Project object” on
page 110

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.

m e m o r y In Us e “Application memoryInUse attribute” on Memory in use by this application.


page 25

19
JavaScript Reference Application object

20

Methods

Method Reference Description

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.

qui t () “Application quit() method” on page 28 Quits the application.

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.

p au se Wa tchFol de r () “Application pauseWatchFolder() method” Pauses a current watch-folder process.


on page 27

endWatch Folder() “Application endWatchFolder() method” on Ends a current watch-folder process.


page 23

p u r g e () “Application purge() method” on page 28 Purges a targeted type of cached information


(replicates Purge options in the Edit menu).

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.

e n d Su p p re s s D i a l o g s( ) “Application endSuppressDialogs() Ends suppression of dialogs in the user inter-


method” on page 22 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.

c a n ce l Tas k( ) “Application cancelTask() method” on Cancels a scheduled task.


page 22

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.

Application activate() method


a pp. ac t iv ate ()

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.

Application beginSuppressDialogs() method


a pp. b e g i n Su pp re s s D ia l o g s ()

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.

Application beginUndoGroup() method


a p p. b e g i n Un d o Grou p( u n d oSt r in g )

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.

Application buildName attribute


a pp. bu il d Nam e

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

Application buildNumber attribute


a pp. bu il d Num b er

Description

The number of the build of After Effects being run, used internally by Adobe for testing and troubleshooting.

Type

Integer; read-only.

Application cancelTask() method


a pp. c an cel Ta sk ( t a s k I D)

Description

Removes the specified task from the queue of tasks scheduled for delayed execution.

Parameters

t as kI D An integer that identifies the task, as returned by ap p.s ch e du l e Tas k () .

Returns

Nothing.

Application endSuppressDialogs() method


a pp. e n dSu pp re ss D ia l o g s ( ale r t )

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.

Application endUndoGroup() method


a pp. en dUn doGrou p( )

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.

Application endWatchFolder() method


a pp. en dWa tchFol der( )

Description

Ends Watch Folder mode.

Parameters

None

Returns

Nothing.

See also

“Application watchFolder() method” on page 30


“Application parseSwatchFile() method” on page 27
“Application isWatchFolder attribute” on page 24

Application exitAfterLaunchAndEval attribute


a pp. exitAfter L aun chAnd Ev al

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

Application exitCode attribute


a pp. ex i tCo de

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

Application isRenderEngine attribute


a p p. is Ren d er E n g in e

Description

True if After Effects is running as a render engine.

Type

Boolean; read-only.

Application isWatchFolder attribute


a pp. is WatchFol der

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.

Application language attribute


a pp. l an g u ag e

Description

The language After Effects is running.

24
JavaScript Reference Application object

25

Type

A L a n gu ag e enumerated value; read-only. One of:


L a n g u a ge . E N G L I S H
L a n g u a ge . F R E N C H
L a n g u a ge . G E R M AN
L a n g u a ge . I TAL I A N
L a n g u a ge . JA PA N E S E
L a n g u a ge . S PAN I S H

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 . " ) ;

Application memoryInUse attribute


a p p. m e m o r yIn Use

Description

The number of bytes of memory currently used by this application.

Type

Number; read-only.

Application newProject() method


a pp. n ew Proje c t( )

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

A new Project object, or null if no new project is created.

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

Application onError attribute


a pp. on E r ror

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

A function name string, or null if no function is assigned; read/write.

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 ;

Application open() method


a pp. op en ()
a pp. op en (f i l e)

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

Application parseSwatchFile() method


a pp. pa rse Sw atchF i l e( file )

Description

Loads color swatch data from an Adobe Swatch Exchange (ASE) file.

Parameters

file The file specification, an ExtendScript F il e object.

Returns

The swatch data, in this format:

d at a. m ajo r Ver si o n The ASE version number.


d at a. m in or Vers ion

d at a. v al u e s An array of Swa tchVa lue .

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 .L When t y p e = " L AB" , the color values.


Swa tchVa lue .a L is in the range [0.0..1.0]. a and b are in the range [-128.0..+128.0]
Swa tchVa lue .b
0, 0, 0 is Black.

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.

Application pauseWatchFolder() method


a pp. pa useWatchFo lder( p au s e)

Description

Pauses or resumes the search of the target watch folder for items to render.

Parameters

p au se True to pause, false to resume.

Returns

Nothing.

27
JavaScript Reference Application object

28

See also

“Application isWatchFolder attribute” on page 24


“Application watchFolder() method” on page 30
“Application endWatchFolder() method” on page 23

Application project attribute


a pp. pro je c t

Description

The project that is currently loaded. See “Project object” on page 110.

Type

Project object; read-only.

Application purge() method


a pp. pu rg e( tar ge t )

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.

Application quit() method


a pp. qui t( )

Description

Quits the After Effects application.

Parameters

None.

Returns

Nothing.

Application saveProjectOnCrash attribute


a pp. saveProj ec tO nCr a sh

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.

Application scheduleTask() method


a pp. sch ed ul eTa sk ( st r in g To Ex e cut e, de lay, re p e at )

Description

Schedules the specified JavaScript for delayed execution.

Parameters

s t r i n g ToE xe c ute A string containing JavaScript to be executed.

de l ay A number of milliseconds to wait before executing the JavaScript. A floating-point value.

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 () .

Application setMemoryUsageLimits() method


a pp. se t Mem o r y Us ag eL im i t s( im a geC a c he Pe rc e n t a ge, m ax imu m Me m o r y Pe rce n t age )

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

i m a ge Ca chePercen ta g e Floating-point value, the percentage of memory assigned to image cache.

m a x im u m Me m o r y Pe rcen t a ge Floating-point value, the maximum usable percentage of memory.

Returns

Nothing.

Application setSavePreferencesOnQuit() method


a pp. se t S avePref eren ces On Q ui t (d oS av e)

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.

Application settings attribute


a pp. se t ti n g s

Description

The currently loaded settings. See “Settings object” on page 163.

Type

Settings object; read-only.

Application version attribute


a pp. versi on

Description

An alphanumeric string indicating which version of After Effects is running.

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 . " ) ;

Application watchFolder() method


a pp. wa tchFol der( f o l d e r_ o b j e c t _t o _ w a t c h)

Description

Starts a Watch Folder (network rendering) process pointed at a specified folder.

Parameters

fo l de r _ o b j e c t _ to _ wa tch The ExtendScript Folder object for the folder to watch.

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

“Application endWatchFolder() method” on page 23


“Application parseSwatchFile() method” on page 27
“Application isWatchFolder attribute” on page 24

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

Attribute Reference Description

name “AVItem name attribute” on page 35 The name of the object as shown in the Project panel.

w i dt h “AVItem width attribute” on page 38 The width of the item.

h eig h t “AVItem height attribute” on page 34 The height of the item.

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.

du r at i on “AVItem duration attribute” on page 33 The total duration of 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.

time “AVItem time attribute” on page 38 Current time of 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

Method Reference Description

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

AVItem duration attribute


a pp. pro je c t .i tem ( in d e x) .d u r a ti o n

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.

AVItem footageMissing attribute


a pp. pro je c t .i tem ( in d e x) .fo o t ag e M is s i n g

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.

AVItem frameDuration attribute


a pp. pro je c t .i tem ( in d e x) .f r a m e D u r at i on

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

AVItem frameRate attribute


a pp. pro je c t .i tem ( in d e x) .f r a m eRa te

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.

AVItem hasAudio attribute


a pp. pro je c t .i tem ( in d e x) .h as Au di o

Description

When true, the AVItem has an audio component.


• In a CompItem, the value is linked to the composition.
• In a FootageItem, the value is linked to the m a i n S o u rce object.

Type

Boolean; read-only.

AVItem hasVideo attribute


a pp. pro je c t .i tem ( in d e x) .h as Vi de o

Description

When true, the AVItem has an video component.


• In a CompItem, the value is linked to the composition.
• In a FootageItem, the value is linked to the m a i n S o u rce object.

Type

Boolean; read-only.

AVItem height attribute


a pp. pro je c t .i tem ( in d e x) .h ei g h t

Description

The height of the item in pixels.


• In a CompItem, the value is linked to the composition, and is read/write.

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

Integer in the range [1...30000]; read/write, except as noted.

AVItem name attribute


a pp. pro je c t .i tem ( in d e x) .n a m e

Description

The name of the item, as shown in the Project panel.


• In a FootageItem, the value is linked to the m a i n S o u rce object. If the m ai n S ource object is a FileSource, this
value controls the display name in the Project panel, but does not affect the file name.

Type

String; read/write.

AVItem pixelAspect attribute


a pp. pro je c t .i tem ( in d e x) .p i xel As p e c t

Description

The pixel aspect ratio of the item.


• In a CompItem, the value is linked to the composition.
• In a FootageItem, the value is linked to the m a i n S o u rce object.
Certain p ixel As p e c t values are specially known to After Effects, and are stored and retrieved with perfect
accuracy. These are the set {1 , 0.9 , 1.2 , 1.0 7, 1. 42, 2 , 0.9 5, 1. 9} . Other values may show slight rounding errors
when you set or get them; that is, the value you retrieve after setting may be slightly different from the value
you supplied.

Type

Floating-point value, in the range [0.01..100.0]; read/write.

AVItem proxySource attribute


a pp. pro je c t .i tem ( in d e x) .p roxy S o u rce

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

FootageSource object; read-only.

35
JavaScript Reference AVItem object

36

AVItem setProxy() method


a pp. pro je c t .i tem ( in d e x) . s e tProxy ( file )

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

file An ExtendScript File object for the file to be used as a proxy.

Returns

None.

AVItem setProxyToNone() method


a pp. pro je c t .i tem ( in d e x) . s e tProxy To No n e ()

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.

AVItem setProxyWithPlaceholder() method


a pp. pro je c t .i tem ( in d e x) .s e tProxy Wi th Pl a ceh ol der( n am e , w id t h , he ig h t , f ram e R at e, durat ion )

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

name A string containing the name of the new object.

w i dt h, heig ht The pixel dimensions of the placeholder, an integer in the range [4..30000].

f r a m eRa te The frames-per-second, an integer in the range [1..99].

36
JavaScript Reference AVItem object

37

du r at i on The total length in seconds, up to 3 hours. An integer in the range [0.0..10800.0].

Returns

Nothing.

AVItem setProxyWithSequence() method


a pp. pro je c t .i tem ( in d e x) .se tProxyWith S equence( file, forc eAlphabe t ical )

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.

AVItem setProxyWithSolid() method


a pp. pro je c t .i tem ( in d e x) .s e tProxyWith S olid ( c ol or, n am e , w id t h, he i g h t , p ix e lAsp ec t)

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].

name A string containing the name of the new object.

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

AVItem time attribute


a pp. pro je c t .i tem ( in d e x) .t i m e

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

Floating-point value; read/write.

AVItem usedIn attribute


a pp. pro je c t .i tem ( in d e x) .u se dIn

Description

All the compositions that use this AVItem.


Note that upon retrieval, the array value is copied, so it is not automatically updated. If you get this value, then
add this item into another composition, you must retrieve the value again to get an array that includes the new
item.

Type

Array of CompItem objects; read-only.

AVItem useProxy attribute


a pp. pro je c t .i tem ( in d e x) .u seProx y

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.

AVItem width attribute


a pp. pro je c t .i tem ( in d e x) .w i d th

Description

The width of the item, in pixels.


• In a CompItem, the value is linked to the composition, and is read/write.
• 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.

38
JavaScript Reference AVItem object

39

Type

Integer in the range [1...30000]; read/write, except as noted.

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

Attribute Reference Description

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.

h eig h t “AVLayer height attribute” on page 47 The height of the layer.

w i dt h “AVLayer width attribute” on page 50 The width of the layer.

a ud io E n ab l ed “AVLayer audioEnabled attribute” on When true, the layer's audio is enabled.


page 43

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

g u id e L ayer “AVLayer guideLayer attribute” on When true, this is a guide layer.


page 46

t hree DL ayer “AVLayer threeDLayer attribute” on When true, this is a 3D layer.


page 49

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 .

co l l ap s e Tr an s fo r m at i on “AVLayer collapseTransformation When true, collapse transformation is on.


attribute” on page 45

f r a m e Bl e n di n g “AVLayer frameBlending attribute” on When true, frame blending is enabled.


page 46

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

c a n S e t Ti m e Rem a p E n a bl e d “AVLayer canSetTimeRemapEnabled When true, it is legal to change the value of


attribute” on page 45 t i m e Rem a p E n a bl e d .

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

Attribute Reference Description

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.

qu a l i t y “AVLayer quality attribute” on page 48 The layer quality setting.

a utoO r i en t “AVLayer autoOrient attribute” on The type of automatic orientation for the layer.
page 43

Methods

Method Reference Description

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

AVLayer adjustmentLayer attribute


a pp. pro je c t .i tem ( in d e x) .l ayer (i n de x ) . a d j u s t m e n t L ayer

Description

True if the layer is an adjustment layer.

Type

Boolean; read/write.

AVLayer audioActive attribute


a pp. pro je c t .i tem ( in d e x) .l ayer (i n de x ). aud i oAc t ive

Description

True if the layer's audio is active at the current time.


For this value to be true, aud i oEna ble d must be true, no other layer with audio 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 of this layer.

Type

Boolean; read-only.

42
JavaScript Reference AVLayer object

43

AVLayer audioActiveAtTime() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). aud i oAc t iveAt Ti m e (t im e )

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

time The time, in seconds. A floating-point value.

Returns

Boolean.

AVLayer audioEnabled attribute


a pp. pro je c t .i tem ( in d e x) .l ayer (i n de x ). aud i oEna bl e d

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.

AVLayer autoOrient attribute


a pp. pro je c t .i tem ( in d e x) .l ayer (i n de x ). autoO r i en t

Description

The type of automatic orientation to perform for the layer.

Type

An AutoO r i en t Ty p e enumerated value; read/write. One of:


AutoO r ien t Ty p e.A LO N G _ PAT H
AutoO r ien t Ty p e. C A M E R A _ O R _ P O I N T _ O F _ I N T E RE S T
AutoO r ien t Ty p e.N O _ AUTO _ O R I E N T

AVLayer blendingMode attribute


a pp. pro je c t .i tem ( in d e x) .l ayer (i n de x ). bl end i ngMo de

Description

The blending mode of the layer.

Type

A Bl en d i n g Mo de enumerated value; read/write. One of:

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

AVLayer calculateTransformFromPoints() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). c al c ul ateTr an s for m From Poi n ts ( p o i n t To p L e f t , p o i n t To p Rig h t , p o i n t -
B ot to m Ri g ht )

Description

Calculates a transformation from a set of points in this layer.

Parameters

p o i n tTop Lef t The top left point coordinates in the form of an array, [ x , y, z ] .

p o i n tTop R i g ht The top right point coordinates in the form of an array, [x , y, z] .

p o i n tB o ttom R i g h t The bottom right point coordinates in the form of an array, [x , y, z ] .

44
JavaScript Reference AVLayer object

45

Returns

An Object with the transformation properties set.

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 ] ) ;
}

AVLayer canSetCollapseTransformation attribute


a pp. pro je c t .i tem ( in d e x) .l ayer (i n de x ). c an S e tCo l l a ps eTr an sfor m at i on

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.

AVLayer canSetTimeRemapEnabled attribute


a pp. pro je c t .i tem ( in d e x) .l ayer (i n de x ). canSe tTi meRemapE nabled

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.

AVLayer collapseTransformation attribute


a pp. pro je c t .i tem ( in d e x) .l ayer (i n de x ). col l apse Tr a n sfor mation

Description

True if collapse transformation is on for this layer.

Type

Boolean; read/write.

AVLayer effectsActive attribute


a pp. pro je c t .i tem ( in d e x) .l ayer (i n de x ). eff ec ts Ac t ive

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.

AVLayer frameBlending attribute


a pp. pro je c t .i tem ( in d e x) .l ayer (i n de x ). fr ame Bl end i n g

Description

True if frame blending is enabled for the layer.

Type

Boolean; read-only.

AVLayer frameBlendingType attribute


a pp. pro je c t .i tem ( in d e x) .l ayer (i n de x ). fr ame Bl end i n gTy p e

Description

The type of frame blending to perform when frame blending is enabled for the layer.

Type

A Fr a m eBl en di n g Ty p e enumerated value; read/write. One of:


Fr am e Bl en d i n g Ty p e. FRAM E _ MI X
Fr a m e Bl e n d i n g Ty p e . N O _ F R A M E _ B L E N D
Fr a m e Bl e n d i n g Ty p e . PI X E L _ M OT I O N

AVLayer guideLayer attribute


a pp. pro je c t .i tem ( in d e x) .l ayer (i n de x ). guideL ayer

Description

True if the layer is a guide layer.

Type

Boolean; read/write.

AVLayer hasAudio attribute


a pp. pro je c t .i tem ( in d e x) .l ayer (i n de x ). has Aud i o

Description

True if the layer contains an audio component, regardless of whether it is audio-enabled or soloed.

Type

Boolean; read-only.

AVLayer hasTrackMatte attribute


a pp. pro je c t .i tem ( in d e x) .l ayer (i n de x ). has Tr a ckMat te

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.

AVLayer height attribute


a pp. pro je c t .i tem ( in d e x) .l ayer (i n de x ). heig ht

Description

The height of the layer in pixels.

Type

Floating-point; read-only.

AVLayer isNameFromSource attribute


a pp. pro je c t .i tem ( in d e x) .l ayer (i n de x ). is Name FromS o urce

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.

AVLayer isTrackMatte attribute


a pp. pro je c t .i tem ( in d e x) l ayer ( i n d e x) .i s Tr ackMa tte

Description

True if this layer is being used as a track matte for the layer behind it.

Type

Boolean; read-only.

AVLayer motionBlur attribute


a pp. pro je c t .i tem ( in d e x) .l ayer (i n de x ). mot i onBlur

Description

True if motion blur is enabled for the layer.

Type

Boolean; read/write.

47
JavaScript Reference AVLayer object

48

AVLayer preserveTransparency attribute


a pp. pro je c t .i tem ( in d e x) .l ayer (i n de x ). pre s er veTr an s p aren c y

Description

True if preserve transparency is enabled for the layer.

Type

Boolean; read/write.

AVLayer quality attribute


a pp. pro je c t .i tem ( in d e x) .l ayer (i n de x ). qual i t y

Description

The quality with which this layer is displayed.

Type

A L ayer Q u a l it y enumerated value; read/write. One of:


LayerQu alit y.B EST
L ayer Q u al i t y. D RA F T
L ayer Q u al i t y. W I R E F RA M E

AVLayer replaceSource() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). rep l a ce S ource ( n e w S ource , f i xE x pre ss i on s )

Description

Replaces the source for this layer.

Parameters

n e w S o u rce The new source AVItem object.

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.

AVLayer source attribute


a pp. pro je c t .i tem ( in d e x) .l ayer (i n de x ). so urce

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

AVItem object; read-only.

48
JavaScript Reference AVLayer object

49

AVLayer sourceRectAtTime() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). so urceRe c tAt Ti me (t im e T, e x te n t s )

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

t i m eT The time index, in seconds. A floating-point value.

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

A JavaScript object with four attributes, [ top, lef t , w id t h, h eig h t] .

AVLayer threeDLayer attribute


a pp. pro je c t .i tem ( in d e x) .l ayer (i n de x ). th re eD Layer

Description

True if this is a 3D layer.

Type

Boolean; read/write.

AVLayer threeDPerChar attribute


a pp. pro je c t .i tem ( in d e x) .l ayer (i n de x ). th re eD PerChar

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.

AVLayer timeRemapEnabled attribute


a pp. pro je c t .i tem ( in d e x) .l ayer (i n de x ). t im eRemap E na b le d

Description

True if time remapping is enabled for this layer.

Type

Boolean; read/write.

49
JavaScript Reference AVLayer object

50

AVLayer trackMatteType attribute


a pp. pro je c t .i tem ( in d e x) .l ayer (i n de x ). t r a ck Ma tte Ty p e

Description

If this layer has a track matte, specifies the way the track matte is applied.

Type

A Tr a ck Ma tte Ty p e enumerated value; read/write. One of:


Tr a ck Mat teTy p e. AL PH A
Tr a ck Mat teTy p e. AL PH A_ I N VE RT E D
Tr a ck Mat teTy p e. LUM A
Tr a ck Ma t teTy p e . LU M A _ I N V E RT E D
Tr a ck Mat teTy p e. N O_ T RAC K _ MAT T E

AVLayer width attribute


a pp. pro je c t .i tem ( in d e x) .l ayer (i n de x ). w i d th

Description

The width of the layer in pixels.

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

Object Reference Description

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.

L ayer Co l l e c t i on “LayerCollection object” on All of the layers in a composition.


page 93

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

length The number of objects in the collection.

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

Attribute Reference Description

f r a m eD ur a t i on “CompItem frameDuration attribute” on The duration of a single frame.


page 56

wor k Area St ar t “CompItem workAreaStart attribute” on The work area start time.
page 60

wor k Area D ur a ti on “CompItem workAreaDuration The work area duration.


attribute” on page 59

nu m L ayers “CompItem numLayers attribute” on The number of layers in the composition.


page 57

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.

b g Co lor “CompItem bgColor attribute” on The background color of the composition.


page 54

a c t iveC am er a “CompItem activeCamera attribute” on The current active camera layer.


page 54

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

Attribute Reference Description

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.

s hu t ter A n g l e “CompItem shutterAngle attribute” on The camera shutter angle.


page 59

s hu t ter P h a se “CompItem shutterPhase attribute” on The camera shutter phase.


page 59

l ayer s “CompItem layers attribute” on page 57 The layers of the composition.


“LayerCollection object” on page 93

s e l e c te d L ayer s “CompItem selectedLayers attribute” on The selected layers of the composition.


page 59

s e l e c t e d Pro p e r t i e s “CompItem selectedProperties The selected properties of the composition.


attribute” on page 59

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

Method Reference Description

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.

CompItem activeCamera attribute


a pp. pro je c t .i tem ( in d e x) .a c t iveC am er a

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

CameraLayer object; read-only.

CompItem bgColor attribute


a pp. pro je c t .i tem ( in d e x) .b g Co l or

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

CompItem displayStartTime attribute


a pp. pro je c t .i tem ( in d e x) .d i sp l ay S ta r t Ti m e

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.

CompItem draft3d attribute


a pp. pro je c t .i tem ( in d e x) .d r a ft 3 d

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.

CompItem duplicate() method


a pp. pro je c t .i tem ( in d e x) .d u p li c a te ( )

Description

Creates and returns a duplicate of this composition, which contains the same layers as the original.

Parameters

None.

Returns

CompItem object.

CompItem frameBlending attribute


a pp. pro je c t .i tem ( in d e x) .f r a m e Bl e n d in g

Description

When true, frame blending is enabled for this Composition. Corresponds to the value of the Frame Blending
button in the Composition panel.

Type

Boolean; if true, frame blending is enabled; read/write.

55
JavaScript Reference CompItem object

56

CompItem frameDuration attribute


a pp. pro je c t .i tem ( in d e x) .f r a meD ur at i on

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.

CompItem hideShyLayers attribute


a pp. pro je c t .i tem ( in d e x) .h id eS hy L ayers

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.

CompItem layer() method


a pp. pro je c t .i tem ( in d e x) .l ayer (i n de x )
a pp. pro je c t .i tem ( in d e x) .l ayer (o t he rLaye r, re l In de x )
a pp. pro je c t .i tem ( in d e x) .l ayer (n a m e)

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—

name The string containing the name of the desired layer.

56
JavaScript Reference CompItem object

57

Returns

Layer object.

CompItem layers attribute


a pp. pro je c t .i tem ( in d e x) .l ayers

Description

A LayerCollection object that contains all the Layer objects for layers in this composition. See “LayerCollection
object” on page 93.

Type

LayerCollection object; read-only.

CompItem motionBlur attribute


a pp. pro je c t .i tem ( in d e x) .m o t io n B lu r

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.

CompItem numLayers attribute


a pp. pro je c t .i tem ( in d e x) .nu m L ayers

Description

The number of layers in the composition.

Type

Integer; read-only.

CompItem preserveNestedFrameRate attribute


a pp. pro je c t .i tem ( in d e x) .preser veNe ste d Fr a m eR ate

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

CompItem preserveNestedResolution attribute


a pp. pro je c t .i tem ( in d e x) .preser veNe ste d Resolut i on

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.

CompItem renderer attribute


a pp. pro je c t .i tem ( in d e x) .renderer

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.

CompItem renderers attribute


a pp. pro je c t .i tem ( in d e x) .renderers

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

Array of strings; read-only.

CompItem resolutionFactor attribute


a pp. pro je c t .i tem ( in d e x) .res o lut i o n Fa c to r

Description

The x and y downsample resolution factors for rendering the composition.


The two values in the array specify how many pixels to skip when sampling; the first number controls
horizontal sampling, the second controls vertical sampling. Full resolution is [1,1], half resolution is [2,2], and
quarter resolution is [4,4]. The default is [1,1].

Type

Array of two integers in the range [1..99]; read/write.

58
JavaScript Reference CompItem object

59

CompItem selectedLayers attribute


a pp. pro je c t .i tem ( in d e x) .s e l e c te d L ayer s

Description

All of the selected layers in this composition. This is a 0-based array (the first object is at index 0).

Type

Array of Layer objects; read-only.

CompItem selectedProperties attribute


a pp. pro je c t .i tem ( in d e x) .s e l e c t e d Pro p e r t i e s

Description

All of the selected properties (Property and PropertyGroup objects) in this composition. The first property is
at index position 0.

Type

Array of Property and PropertyGroup objects; read-only.

CompItem shutterAngle attribute


a pp. pro je c t .i tem ( in d e x) .s hu t ter A n g l e

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

Integer in the range [0...720]; read/write.

CompItem shutterPhase attribute


a pp. pro je c t .i tem ( in d e x) .s hu t ter P h a se

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

Integer in the range [–360...360]; read/write.

CompItem workAreaDuration attribute


a pp. pro je c t .i tem ( in d e x) .wor k Area D ur a t ion

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.

CompItem workAreaStart attribute


a pp. pro je c t .i tem ( in d e x) .wor k Area St ar t

Description

The time when the Composition work area begins, in seconds.

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

The FileSource object describes footage that comes from a file.


• FileSource is a subclass of FootageSource. All methods and attributes of FootageSource, in addition to those
listed below, are available when working with FileSource. See “FootageSource object” on page 68.

Attributes

Attribute Reference Description

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

Method Reference Description

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.

FileSource file attribute


a pp. pro je c t .i tem ( i n d e x) .m a i n S o u rce .f il e
a pp. pro je c t .i tem ( i n d e x) .p roxy S o u rce . fi l e

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

File object; read-only.

FileSource missingFootagePath attribute


a pp. pro je c t .i tem ( i n d e x) . m a i n S o u rce . f il e .m i s s i n g Fo o t a g e Pat h
a pp. pro je c t .i tem ( i n d e x) .p roxy S o u rce . fi l e .m is s in g Fo o t ag e Pa th

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

FileSource reload() method


a pp. pro je c t .i tem ( i n d e x) . m a i n S o u rce . f il e .m a i n S o u rce. re l o ad ( )

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

Attribute Reference Description

i te m s “FolderItem items attribute” on page 64 The contents of this folder.

nu m Item s “FolderItem numItems attribute” on page 64 The number of items contained in the folder.

Methods

Method Reference Description

i te m ( ) “FolderItem item() method” on page 63 Gets an item from the folder.

FolderItem item() method


a pp. pro je c t .i tem ( i n d e x) .i te m

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

FolderItem items attribute


a pp. pro je c t .i tem ( i n d e x) .i te m s

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

ItemCollection object; read only.

FolderItem numItems attribute


a pp. pro je c t .i tem ( i n d e x) . nu m It e m s

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

Integer; read only.

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

Attribute Reference Description

f i le “FootageItem file attribute” on page 65 The footage source file.

m a i n S o u rce “FootageItem mainSource attribute” on page 66 All settings related to the footage item.

Methods

Method Reference Description

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

rep l a ce Wi t h S o l i d () “FootageItem replaceWithSolid() Replaces a footage file with a solid.


method” on page 67

FootageItem file attribute


a pp. pro je c t .i tem ( i n d e x) .f i l e

Description

The ExtendScript File object for the footage's source file.


If the FootageItem's m a i n S o u rce is a FileSource, this is the same as Fo ot a geIte m . m a i n S o u rce .f il e . Otherwise
it is null.

Type

File object; read only.

65
JavaScript Reference FootageItem object

66

FootageItem mainSource attribute


a pp. pro je c t .i tem ( in d e x) .m a i n S o u rce

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

FootageSource object; read-only.

FootageItem replace() method


a pp. pro je c t .i tem ( in d e x) .rep lace( file )

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.

FootageItem replaceWithPlaceholder() method


a pp. pro je c t .i tem ( in d e x) .replaceWit hPla ceho l der( n am e , w id t h, he i g ht, fra m eR a te , d ura t i on )

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

name A string containing the name of the placeholder.

w i dt h The width of the placeholder in pixels, an integer in the range [4..30000].

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].

FootageItem replaceWithSequence() method


a pp. pro je c t .i tem ( in d e x) .replaceWit hSe quence( f i l e , fo rce Al p h a b e t i c a l )

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.

FootageItem replaceWithSolid() method


a pp. pro je c t .i tem ( in d e x) . re p l a ceWit h S o l i d ( colo r, n am e , w idt h, h e ig ht, pi xe l As p e c t)

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].

name A string containing the name of the solid.

w i dt h The width of the solid in pixels, an integer in the range [4..30000].

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

Attribute Reference Description

h as Al p ha “FootageSource hasAlpha attribute” on When true, a footage clip or proxy includes an


page 71 alpha channel.

a l pha Mod e “FootageSource alphaMode attribute” The mode of an alpha channel.


on page 69

premu l Col or “FootageSource premulColor attribute” The color to be premultiplied.


on page 72

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.

i s St i l l “FootageSource isStill attribute” on When true, footage is a still image.


page 71

f i e l d S e p a r a t i on Ty p e “FootageSource fieldSeparationType The field separation type.


attribute” on page 70

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

n a t iveFr a m e R a te “FootageSource nativeFrameRate The native frame rate of the footage.


attribute” on 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.

con f or m Fr a m e R a te “FootageSource conformFrameRate The rate to which footage should conform.


attribute” on page 69

Methods

Method Reference Description

gu essAlph aMo de() “FootageSource guessAlphaMode() Estimates the alp haMo de setting.
method” on page 70

g u e ss Pu l l dow n () “FootageSource guessPulldown() Estimates the p u l ldow n Ty p e setting.


method” on page 70

68
JavaScript Reference FootageSource object

69

FootageSource alphaMode attribute


a pp. pro je c t .i tem ( in d e x) . m a i n S o u rce .alp haMo de
a pp. pro je c t .i tem ( in d e x) .p roxySo urce. alph aMo de

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

An Alpha Mode enumerated value; (read/write). One of:


Alph aMo de. IGNOR E
Alph aMo de. STRAI GH T
Alph aMo de. PR EMU LTIPLIED

FootageSource conformFrameRate attribute


a pp. pro je c t .i tem ( in d e x) . m a i n S o u rce .con for m Fr am eRa te
a pp. pro je c t .i tem ( in d e x) .p roxySo urce. confor mFr ameR ate

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

Floating-point value in the range [0.0.. 99.0]; read/write.

FootageSource displayFrameRate attribute


a pp. pro je c t .i tem ( in d e x) . m a i n S o u rce .d is p l ay Fr a m e R ate
a pp. pro je c t .i tem ( in d e x) .p roxySo urce. di s pl ay Fr ame Ra te

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

Floating-point value in the range [0.0.. 99.0]; read-only.

69
JavaScript Reference FootageSource object

70

FootageSource fieldSeparationType attribute


a pp. pro je c t .i tem ( in d e x) . m a i n S o u rce .f ie l d S epa r a t ion Ty p e
a pp. pro je c t .i tem ( in d e x) .p roxySo urce. fie ld S ep ar at ionTy p e

Description

How the fields are to be separated in non-still footage.


It is an error to set this attribute if i s S t il l is true. It is an error to set this value to F i e l d S e p a r a t i on Ty p e .O FF if
rem ovePu l l dow n is not Pu l l dow n P h a se . O F F.

Type

A F ie l dS epa r a ti on Ty p e enumerated value; read/write. One of:


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 S T
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

FootageSource guessAlphaMode() method


a pp. pro je c t .i tem ( in d e x) .m a i n S ource .g ue ss Al pha Mod e( )
a pp. pro je c t .i tem ( in d e x) .proxySo urce. g uessAlphaMo de ()

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.

FootageSource guessPulldown() method


a pp. pro je c t .i tem ( in d e x) .m a i n S ource .g ue ss Pu l l dow n ( m e t ho d )
a pp. pro je c t .i tem ( in d e x) . p rox y S o u rc e . g u e s s Pu l l d ow n (m e t h o d )

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

FootageSource hasAlpha attribute


a pp. pro je c t .i tem ( in d e x) . m a i n S o u rce .ha sAlph a
a pp. pro je c t .i tem ( in d e x) .p roxySo urce. hasAlpha

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.

FootageSource highQualityFieldSeparation attribute


a pp. pro je c t .i tem ( in d e x) . m a i n S o u rce .h i g hQ u a l i t y F i e l dS e p a r a t i o n
a pp. pro je c t .i tem ( in d e x) .p roxySo urce. h i g h Qu a l i t y F i e l d S e p a r a t i on

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.

FootageSource invertAlpha attribute


a pp. pro je c t .i tem ( in d e x) . m a i n S o u rce .i nver t Al p h a
a pp. pro je c t .i tem ( in d e x) .p roxySo urce. inver tAl ph a

Description

When true, an alpha channel in a footage clip or proxy should be inverted.


This attribute is valid only if an alpha is present. If ha sAlpha is false, or if alp haMo de is A l p h a Mo de .I G N O R E ,
this attribute is ignored.

Type

Boolean; read/write.

FootageSource isStill attribute


a pp. pro je c t .i tem ( in d e x) . m a i n S o u rce .i sS t i l l
a pp. pro je c t .i tem ( in d e x) .p roxySo urce. is S t il l

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

FootageSource loop attribute


a pp. pro je c t .i tem ( in d e x) . m a i n S o u rce .l o o p
a pp. pro je c t .i tem ( in d e x) .p roxySo urce. lo op

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

Integer in the range [1.. 9999]; default is 1; read/write.

FootageSource nativeFrameRate attribute


a pp. pro je c t .i tem ( in d e x) . m a i n S o u rce .nat iveFr ame Rate
a pp. pro je c t .i tem ( in d e x) .p roxySo urce. n a t iveFr a m e R a te

Description

The native frame rate of the footage.

Type

Floating-point; read/write.

FootageSource premulColor attribute


a pp. pro je c t .i tem ( in d e x) . m a i n S o u rce .premul Co l or
a pp. pro je c t .i tem ( in d e x) .p roxySo urce. premul Col or

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

Array of three floating-point values [ R , G , B ] , in the range [0.0..1.0]; read/write.

FootageSource removePulldown attribute


a pp. pro je c t .i tem ( in d e x) . m a i n S o u rce .rem ove Pu l l dow n
a pp. pro je c t .i tem ( in d e x) .p roxySo urce. rem ovePul l dow n

Description

How the pulldowns are to be removed when field separation is used.


It is an error to set this attribute if i sS t i l l is true. It is an error to attempt to set this to a value other than
Pul l dow n Ph a s e . O F F in the case where 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

A Pul l dow n P has e enumerated value; read/write. One of:


Pul l dow n Ph a s e . Re m ove Pu l l dow n . O F F
Pul l dow n Ph a s e . Re m ove Pu l l dow n . WS S W W
Pul l dow n Ph a s e . Re m ove Pu l l dow n . S S W W W

72
JavaScript Reference FootageSource object

73

Pul l dow n Ph a s e . Re m ove Pu l l dow n . S W W WS


Pul l dow n Ph a s e . Re m ove Pu l l dow n . W W WSS
Pul l dow n Ph a s e . Re m ove Pu l l dow n . W WS S W
Pul l dow n Ph a s e . Re m ove Pu l l dow n . WS S W W _ 2 4 P_ A DVA N C E
Pul l d ow n Ph a s e . Re m ove Pu l l d ow n . S S W W W _ 2 4P _ A DVAN C E
Pul l dow n Ph a s e . Re m ove Pu l l dow n . S W W WS _ 2 4 P_ A DVA N C E
Pul l dow n Ph a s e . Re m ove Pu l l dow n . W W WSS _ 2 4 P_ A DVA N C E
Pul l dow n Ph a s e . Re m ove Pu l l dow n . W WS S W _ 2 4 P_ A DVA N C E

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

Attributes Reference Description

i m p o r tAs “ImportOptions importAs attribute” on The type of file to be imported.


page 75

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

Method Reference Description

c a n Im p or t As ( ) “ImportOptions canImportAs() method” Restricts input to a particular file type.


on page 74

ImportOptions canImportAs() method


imp or t O p t i ons . c a n Im p or t As( t y p e)

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;

ImportOptions file attribute


imp or t O p t i ons . f i l e

Description

The file to be imported. If a file is set in the constructor, you can access it through this attribute.

Type

ExtendScript File object; read/write.

ImportOptions forceAlphabetical attribute


imp or t O p t i ons .f orce Al pha b e t ic a l

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.

ImportOptions importAs attribute


imp or t O p t i ons .imp or tAs

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

An Im p o r t AsTy p e enumerated value; read/write. One of:


Im p o r tAs Ty p e .C O M P _ C RO PPE D _ L AYE R S
Im p o r tAs Ty p e .F O OTAG E
Im p o r tAs Ty p e .C O M P
Im p o r tAs Ty p e .P ROJ E C T

75
JavaScript Reference ImportOptions object

76

ImportOptions sequence attribute


imp or t O p t i ons .s e quence

Description

When true, a sequence is imported; otherwise, an individual file is imported.

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

Attributes Reference Description

name “Item name attribute” on page 78 The name of the object as shown in the Project panel.

com m e n t “Item comment attribute” on page 78 A descriptive string.

id “Item id attribute” on page 78 A unique identifier for this item.

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.

t y p e Na m e “Item typeName attribute” on page 79 The type of item.

Methods

Method Reference Description

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

}
}
}
}

Item comment attribute


a pp. pro je c t .i tem ( in d e x) .com m en t

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.

Item name attribute


a pp. pro je c t .i te m ( i n dex ) .n a m e

Description

The name of the item as displayed in the Project panel.

Type

String; read/write.

Item parentFolder attribute


a pp. pro je c t .i tem ( in d e x) .p aren t Fol d er

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

FolderItem object; read/write.

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 ;
}

Item remove() method


a pp. pro je c t .i tem ( in d e x) .remove()

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.

Item selected attribute


a pp. pro je c t .i tem ( in d e x) .s e l e c te d

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.

Item typeName attribute


a pp. pro je c t .i tem ( in d e x) .t y p eNam e

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

Method Reference Description

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

ItemCollection addComp() method


a pp. pro j e c t . i te m Co l l e c t i o n.a d dCom p ( n am e , w id t h, he i g ht, pi xe l As p e c t, du ra t io n , fram e R ate )

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

name A string containing the name of the composition.

w i dt h The width of the composition in pixels, an integer in the range [4..30000].

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.

ItemCollection addFolder() method


a pp. pro j e c t . i te m Co l l e c t i o n.a d dFol der( n a m e )

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

name A string containing the name of the folder.

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

Attribute Reference Description

speed “KeyframeEase speed attribute” on page 83 The speed setting for a keyframe.

i n f lu e n ce “KeyframeEase influence attribute” on page 82 The influence setting for a keyframe.

KeyframeEase influence attribute


my Ke y. in flu en ce

Description

The influence value of the keyframe, as shown in the Keyframe Velocity dialog box.

Type

Floating-point value in the range [0.1..100.0]; read/write.

82
JavaScript Reference KeyframeEase object

83

KeyframeEase speed attribute


my Ke y. sp ee d

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

Floating-point value; read/write.

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

Attribute Reference Description

i n dex “Layer index attribute” on page 88 The index position of the layer.

name “Layer name attribute” on page 90 The name of the layer.

p aren t “Layer parent attribute” on page 90 The parent of this layer.

time “Layer time attribute” on page 92 The current time of the layer.

s ta r t Ti m e “Layer startTime attribute” on page 92 The start 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.

o u t Po i n t “Layer outPoint attribute” on page 90 The “out” point of the layer.

e n a bl e d “Layer enabled attribute” on page 87 When true, the layer is enabled.

solo “Layer solo attribute” on page 92 When true, the layer is soloed.

s hy “Layer shy attribute” on page 91 When true, the layer is shy.

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

Attribute Reference Description

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

Method Reference Description

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

du pl i c ate( ) “Layer duplicate() method” on page 87 Duplicates the layer.

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.

Layer active attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). ac t ive

Description

When true, the layer's video is active at the current time.


For this to be 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 i n Poi n t and o u t Po i n t values of this layer.
This value is never true in an audio layer; there is a separate au dioAct ive attribute in the AVLayer object.

Type

Boolean; read-only.

Layer activeAtTime() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). ac t ive At Ti m e( t i m e)

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

time The time in seconds, a floating-point value.

Returns

Boolean.

Layer applyPreset() method


a pp [Link] ec t. item (i n de x ). l ayer( in d e x) .a pp lyPres e t( pre s e t Na m e );

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.

Layer comment attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). co m m e n t

Description

A descriptive comment for the layer.

Type

String; read/write.

Layer containingComp attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). con ta in in g Com p

Description

The composition that contains this layer.

Type

CompItem object; read-only.

86
JavaScript Reference Layer object

87

Layer copyToComp() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). copy To Com p( intoComp)

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

i n toC om p The target composition, and CompItem object.

Returns

Nothing.

Layer duplicate() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). dup l i c ate ()

Description

Duplicates the layer. Creates a new Layer object in which all values are the same as in this one. This has the
same effect as selecting a layer in the user interface and choosing Edit > Duplicate, except the selection in the
user interface does not change when you call this method.

Parameters

None.

Returns

Layer object.

Layer enabled attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). en ab l ed

Description

When true, the layer is enabled; otherwise false. This corresponds to the video switch state of the layer in the
Timeline panel.

Type

Boolean; read/write.

Layer hasVideo attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). has Vi deo

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.

Layer index attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). in dex

Description

The index position of the layer.

Type

Integer in the range [1..n u m L ayers ]; read-only.

Layer inPoint attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). in Poi n t

Description

The “in” point of the layer, expressed in composition time (seconds).

Type

Floating-point value in the range [-10800.0..10800.0] (minus or plus three hours); read/write.

Layer isNameSet attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). is Nam e S et

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.

Layer locked attribute


a pp. pro je c t .i tem ( i n d e x) .l ayer (i n de x ). l ocked

Description

When true, the layer is locked; otherwise false. This croplands to the lock toggle in the Layer panel.

Type

Boolean; read/write.

Layer moveAfter() method


a pp. pro je c t .i tem ( i n d e x) .l ayer (i n de x ). moveAf ter( laye r)

Description

Moves this layer to a position immediately after (below) the specified layer.

88
JavaScript Reference Layer object

89

Parameters

l ayer The target layer, a layer object in the same composition.

Returns

Nothing.

Layer moveBefore() method


a pp. pro je c t .i tem ( i n d e x) .l ayer (i n de x ). moveB efore( l ay e r)

Description

Moves this layer to a position immediately before (above) the specified layer.

Parameters

l ayer The target layer, a layer object in the same composition.

Returns

Nothing.

Layer moveToBeginning() method


a pp. pro je c t .i tem ( i n d e x) .l ayer (i n de x ). moveTo Be g i nning()

Description

Moves this layer to the topmost position of the layer stack (the first layer).

Parameters

None.

Returns

Nothing.

Layer moveToEnd() method


a pp. pro je c t .i tem ( i n d e x) .l ayer (i n de x ). moveTo End ()

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

Layer name attribute


a pp. pro je c t .i tem ( i n d e x) .l ayer (i n de x ). name

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.

Layer nullLayer attribute


a pp. pro je c t .i tem ( i n d e x) .l ayer (i n de x ). nul l Layer

Description

When true, the layer was created as a null object; otherwise false.

Type

Boolean; read-only.

Layer outPoint attribute


a pp. pro je c t .i tem ( i n d e x) .l ayer (i n de x ). outPoint

Description

The “out” point of the layer, expressed in composition time (seconds).

Type

Floating-point value in the range [-10800.0..10800.0] (minus or plus three hours); read/write.

Layer parent attribute


a pp. pro je c t .i tem ( i n d e x) .l ayer (i n de x ). pa rent

Description

The parent of this layer; can be null.


Offset values are calculated to counterbalance any transforms above this layer in the hierarchy, so that when
you set the parent there is no apparent jump in the layer's transform. For example, if the new parent has a
rotation of 30 degrees, the child layer is assigned a rotation of -30 degrees.
To set the parent without changing the child layer's transform values, use the s e tPa re n t Wi t h Ju m p method.

Type

Layer object or null; read/write.

90
JavaScript Reference Layer object

91

Layer remove() method


a pp. pro je c t .i tem ( i n d e x) .l ayer (i n de x ). remove ()

Description

Deletes the specified layer from the composition.

Parameters

None.

Returns

Nothing.

Layer selectedProperties attribute


a pp. pro je c t .i tem ( i n d e x) .l ayer (i n de x ). se l ec te d Prop er t ie s

Description

An array containing all of the currently selected Property and PropertyGroup objects in the layer.

Type

Array of PropertyBase objects; read-only.

Layer setParentWithJump() method


a pp. pro je c t .i tem ( i n d e x) .l ayer (i n de x ). se t ParentWit hJu m p( n e w Pa re nt )

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

n e w Pa re n t A layer object in the same composition.

Returns

Nothing.

Layer shy attribute


a pp. pro je c t .i tem ( i n d e x) .l ayer (i n de x ). shy

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.

Layer solo attribute


a pp. pro je c t .i tem ( i n d e x) .l ayer (i n de x ). so lo

Description

When true, the layer is soloed, otherwise false.

Type

Boolean; read/write.

Layer startTime attribute


a pp. pro je c t .i tem ( i n d e x) .l ayer (i n de x ). st ar tTi m e

Description

The start time of the layer, expressed in composition time (seconds).

Type

Floating-point value in the range [-10800.0..10800.0] (minus or plus three hours); read/write.

Layer stretch attribute


a pp. pro je c t .i tem ( i n d e x) .l ayer (i n de x ). st re tch

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

Floating-point value in the range [-9900.0..9900.0]; read/write.

Layer time attribute


a pp. pro je c t .i tem ( i n d e x) .l ayer (i n de x ). t im e

Description

The current time of the layer, expressed in composition time (seconds).

Type

Floating-point value; read-only.

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

Method Reference Description

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

pre co m p o s e ( ) “LayerCollection precompose() Collects specified layers into a new composition.


method” on page 97

93
JavaScript Reference LayerCollection object

94

LayerCollection add() method


a pp. pro je c t .i tem ( i n d e x) .l ayers .a d d (ite m , du ra t io n )

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

i te m The AVItem object for the item to be added.

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.

LayerCollection addCamera() method


a pp. pro je c t .i tem ( i n d e x) .layers .a d d Cam er a( n a m e , c e nt e r Po i n t)

Description

Creates a new camera layer and adds the CameraLayer object to this collection.

Parameters

name A string containing the name of the new layer.

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.

LayerCollection addLight() method


a pp. pro je c t .i tem ( i n d e x) .l ayers .a d d L ig h t ( n a m e , c e n t e r Po i n t )

Description

Creates a new light layer and adds the LightLayer object to this collection.

Parameters

name A string containing the name of the new layer.

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.

LayerCollection addNull() method


a pp. pro je c t .i tem ( i n d e x) . l ayers . a d d Nu l l ( durat io n )

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

du r at i on Optional, the length of a still layer in seconds, a floating-point value.

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.

LayerCollection addShape() method


a pp. pro je c t .i tem ( i n d e x) .l ayers .a d d Sh ap e ()

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.

LayerCollection addSolid() method


a pp. pro je c t .i tem ( i n d e x) .l ayers .a d d S o l id ( c ol or, n am e , w id t h, he ig h t , p ix e lAs p ec t, durat i on)

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

name A string containing the name of the solid.

w i dt h The width of the solid in pixels, an integer in the range [4..30000].

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].

du r at i on Optional, the length of a still layer in seconds, a floating-point value.

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.

LayerCollection addText() method


a pp. pro je c t .i tem ( i n d e x) .l ayers .a d d Tex t (s ou rc eTe x t )

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.

LayerCollection byName() method


a pp. pro je c t .i tem ( i n d e x) .l ayers .by Nam e ( n a m e )

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

name A string containing the name.

Returns

Layer object or null.

96
JavaScript Reference LayerCollection object

97

LayerCollection precompose() method


a pp. pro je c t .i tem ( i n d e x) .l ayers .p re com p o s e ( l ay e r In di c i es , n a m e , m ov e Al l At t r i bu te s )

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

l ayer In di ce s The position indexes of the layers to be collected. An array of integers.

name The name of the new CompItem object.

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

Attribute Reference Description

com m e n t “MarkerValue comment attribute” on A comment on the associated layer.


page 100

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

Method Reference Description

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

• To set a marker that says “Fade Up” at the 2 second mark:


v ar my Mar ker = ne w Ma r kerVa lue ("Fa de Up");
my [Link] er t y ("Ma r ker").set ValueAtTim e(2 , my Mar ker );

• To get comment values from a particular marker:


v ar comment O fFirstMa r ker = [Link] ec t. item(1 ). layer(1).prop er t y("Ma r ker").ke yVa lue (1 ). comment;
v ar com m e n t O f Ma r ke r AtTi m e 4 =
a pp. pro je c t .i te m ( 1 ) .l ayer (1 ). prop e r t y (" Mar ker " ) .v alu e At Ti m e (4 .0 , t r u e ). com m e n t
v ar ma r kerProper t y = a pp. pro je c t .item(1).layer (1 ). proper t y("Mar ker");

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 ;

MarkerValue chapter attribute


a pp. pro je c t .i tem ( i n d e x) .l ayer (i n de x ). proper t y ("Mar ker ") .ke y Value( i n d e x) .ch ap ter

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.

MarkerValue comment attribute


a pp. pro je c t .i tem ( i n d e x) .l ayer (i n de x ). proper t y ("Mar ker ") .ke y Value( i n d e x) . com m e n t

Description

A text comment for this marker. This comment appears in the Timeline panel next to the layer marker.

Type

String; read/write.

MarkerValue cuePointName attribute


a pp. pro je c t .i tem ( i n d e x) .l ayer (i n de x ). proper t y ("Mar ker ") .ke y Value( i n d e x) .c u e Po in t Nam e

Description

The Flash Video cue point name, as shown in the Marker dialog.

Type

String; read/write.

MarkerValue eventCuePoint attribute


a pp. pro je c t .i tem ( i n d e x) .l ayer (i n de x ). proper t y ("Mar ker ") .ke y Value( i n d e x) .e ven tCu e Poin t

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

MarkerValue frameTarget attribute


a pp. pro je c t .i tem ( i n d e x) .l ayer (i n de x ). proper t y ("Mar ker ") .ke y Value( i n d e x) .f r a m eTa rg et

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.

MarkerValue getParameters() method


a pp. pro je c t .i tem ( i n d e x) .l ayer (i n de x ). proper t y ("Mar ker ") .ke y Value( i n d e x) .g e tPa r am e ters ( )

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.

MarkerValue setParameters() method


a pp. pro je c t .i tem ( i n d e x) .l ayer (i n de x ). proper t y ("Mar ker ") .ke y Value( i n d e x) .s e tPar ame ters ( ke y Val ue Pa ir s )

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"

mv. se tPa r a m e ter s ( p a r m s ) ;

101
JavaScript Reference MarkerValue object

102

my [Link] er t y ("Ma r ker").set ValueAtTim e(2 , mv);

MarkerValue url attribute


a pp. pro je c t .i tem ( i n d e x) .l ayer (i n de x ). proper t y ("Mar ker ") .ke y Value( i n d e x) .u r l

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

The MaskPropertyGroup object encapsulates mask attributes in a layer.


• MaskPropertyGroup is a subclass of PropertyGroup. All methods and attributes of PropertyBase and
PropertyGroup, in addition to those listed below, are available when working with MaskPropertyGroup.
See “PropertyBase object” on page 141 and “PropertyGroup object” on page 148.

Attributes

Attribute Reference Description

ma sk Mo de “MaskPropertyGroup maskMode attribute” The mask mode.


on page 104

i nver te d “MaskPropertyGroup inverted attribute” on When true, the mask is inverted.


page 103

rotoB ez i er “MaskPropertyGroup rotoBezier attribute” When true, the shape of the mask is RotoBezier.
on page 104

m a s k Mot i o n B lu r “MaskPropertyGroup maskMotionBlur How motion blur is applied to this mask.


attribute” on page 104

l o cke d “MaskPropertyGroup locked attribute” on When true, the mask is locked.


page 104

co lor “MaskPropertyGroup color attribute” on The color used to draw the mask outline in the user
page 103 interface.

MaskPropertyGroup color attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). mas k (ind e x) .color

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.

MaskPropertyGroup inverted attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). mas k (ind e x) .inver ted

Description

When true, the mask is inverted; otherwise false.

Type

Boolean; read/write.

103
JavaScript Reference MaskPropertyGroup object

104

MaskPropertyGroup locked attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). mas k (i n d e x ) .l o cke d

Description

When true, the mask is locked and cannot be edited in the user interface; otherwise, false.

Type

Boolean; read/write.

MaskPropertyGroup maskMode attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). mas k (i n d e x ) .m as kMo de

Description

The masking mode for this mask.

Type

A Mas kMo de enumerated value; read/write. One of:


Ma sk Mo de. N ONE
Ma sk Mo de. ADD
Ma sk Mo de. SU BTRAC T
Ma sk Mo de. I NTERS E CT
Ma sk Mo de. L IG HTE N
Ma sk Mo de. DA RK E N
Ma sk Mo de. DIF F E R E NCE

MaskPropertyGroup maskMotionBlur attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). mas k (i n d e x ) .m as kMo ti o n Blu r

Description

How motion blur is applied to this mask.

Type

A Mak Mot i on Blur enumerated value; read/write. One of:


Ma sk Mot i on Blur.S A ME _ AS _ L AYE R
Ma sk Mot i on Blur.O N
Ma sk Mot i on Blur.O F F

MaskPropertyGroup rotoBezier attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). m a s k ( i n d e x ) .rotoB ezier

Description

When true, the mask is a RotoBezier shape; otherwise, false.

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

Attribute Reference Description

f i le “OutputModule file attribute” on The path and name of the file to be rendered.
page 106

p o s t Ren de r Ac t i o n “OutputModule postRenderAction An action to be taken after rendering.


attribute” on page 107

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

Method Reference Description

rem ove( ) “OutputModule remove() method” on Removes this output module from the render-queue item’s list.
page 107

s aveAs Tem p l ate( ) “OutputModule saveAsTemplate() Saves a new output-module template.


method” on page 107

a pp ly Te m p l ate ( ) “OutputModule applyTemplate() Applies an output-module template.


method” on page 106

OutputModule applyTemplate() method


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 ] .ap plyTemp l ate( t e m p l a te Na m e)

Description

Applies the specified existing output-module template.

Parameters

tem pl a teNam e A string containing the name of the template to be applied.

Returns

Nothing.

OutputModule file attribute


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 ] .f il e

Description

The ExtendScript File object for the file this output module is set to render.

106
JavaScript Reference OutputModule object

107

Type

ExtendScript File object; read/write.

OutputModule name attribute


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 ] .nam e

Description

The name of the output module, as shown in the user interface.

Type

String; read-only.

OutputModule postRenderAction attribute


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 ] .p o s tRen de r Ac t i o n

Description

An action to be performed when the render operation is completed.

Type

A Pos tRen d er Ac t ion enumerated value (read/write); one of:


p o s t Ren de r Ac t i o n .N O N E
p o s t Ren de r Ac t i o n .I M PO RT
p o s t Ren de r Ac t i o n .I M PO RT _ A N D _ R E P L AC E _ US AG E
p o s t Ren de r Ac t i o n .S E T _ P ROXY

OutputModule remove() method


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 ] .rem ove ()

Description

Removes this OutputModule object from the collection.

Parameters

None.

Returns

Nothing.

OutputModule saveAsTemplate() method


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 ] .s aveAs Tem p l ate( n a m e)

Description

Saves this output module as a template and adds it to the templa tes array.

107
JavaScript Reference OutputModule object

108

Parameters

name A string containing the name of the new template.

Returns

Nothing.

OutputModule templates attribute


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 ] .tem p l ates

Description

The names of all output-module templates available in the local installation of After Effects.

Type

Array of strings; read-only.

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

The PlaceholderSource object describes the footage source of a placeholder.


PlaceholderSource is a subclass of FootageSource. All methods and attributes of FootageSource are available
when working with PlaceholderSource. See “FootageSource object” on page 68. PlaceholderSource does not
define any additional methods or attributes.

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

Attribute Reference Description

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

i te m s “Project items attribute” on page 114 All items in the project.

a c t iveItem “Project activeItem attribute” on The currently active item.


page 111

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 eD i sp l ay Ty p e “Project timecodeDisplayType The way the timecode is displayed.


attribute” on page 117

t i m e cod e B as e Ty p e “Project timecodeBaseType attribute” The timecode base project setting.


on page 117

t i m e cod eN TS C D ro pFr am e “Project timecodeNTSCDropFrame The drop-frame project setting.


attribute” on page 118

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

renderQ ueue “Project renderQueue attribute” on The project’s render queue.


page 116

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

Method Reference Description

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

Method Reference Description

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 ave( ) “Project save() method” on page 116 Saves the project.

s aveWi th Di a l o g ( ) “Project saveWithDialog() method” on Displays a Save dialog box.


page 116

i m p o r tP l ace h o ld e r ( ) “Project importFileWithDialog() Imports a placeholder into the project.


method” on page 113

i m p o r tF i l e ( ) “Project importFile() method” on Imports a file into the project.


page 113

i m p o r tF i l e Wi t h D i a l o g () “Project importFileWithDialog() Displays an Import File dialog box.


method” on page 113

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

Project activeItem attribute


a pp. pro je c t .a c t iveItem

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

Item object or null; read-only.

Project autoFixExpressions() method


a pp. pro je c t .a utoF i xE x pres si on s (old Te x t, n e wTe x t)

Description

Automatically replaces text found in broken expressions in the project, if the new text causes the expression to
evaluate without errors.

Parameters

o l d Te x t The text to replace.

n e w Te x t The new text.

Returns

Nothing.

111
JavaScript Reference Project object

112

Project bitsPerChannel attribute


a pp. pro je c t .b i ts PerC han n el

Description

The color depth of the current project, either 8, 16, or 32 bits.

Type

Integer (8, 16, or 32 only); read/write.

Project close() method


a pp. pro je c t .cl o se( c lo s e O p t i on s )

Description

Closes the project with the option of saving changes automatically, prompting the user to save changes or
closing without saving changes.

Parameters

cl o seO pt i on s Action to be performed on close. A C l o s e O p t ion s enumerated value, one of:

C l o s e O p t i o n s . D O _ N OT _ SAV E _ C H A N G E S : Close without saving.


C l o s e O p t i o n s . PRO M P T _ TO _ S AV E _ C H A N G E S : Prompt for whether to save
changes before close.
C l o s e O p t i o n s . SAV E _ C H A N G E S : Save automatically on close.

Returns

Boolean. True on success. False if the file has not been previously saved, the user is prompted, and the user
cancels the save.

Project consolidateFootage() method


a pp. pro je c t .con s ol i d ate Fo ot ag e( )

Description

Consolidates all footage in the project. Same as the File > Consolidate All Footage command.

Parameters

None.

Returns

Integer; the total number of footage items removed.

Project displayStartFrame attribute


a pp. pro je c t .d i sp l ay S ta r t Fr a m e

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.

Project file attribute


a pp. pro je c t .f i le

Description

The ExtendScript File object for the file containing the project that is currently open.

Type

File object or null if project has not been saved; read-only.

Project importFile() method


a pp. pro je c t .i m p or tF i l e( i m p o r t O p t io n s )

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 ” ) )

Project importFileWithDialog() method


a pp. pro je c t .i m p o r tF i l eWi t hD i al o g ()

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

Project importPlaceholder() method


a pp. pro je c t .i m p or tP l aceho ld er( na m e , w idt h , h e ig ht , f ra m eR a te , du ra t io n )

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

name A string containing the name of the placeholder.

w i dt h The width of the placeholder in pixels, an integer in the range [4..30000].

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.

Project item() method


a pp. pro je c t .i tem ( i n d e x)

Description

Retrieves an item at a specified index position.

Parameters

i n dex The index position of the item, an integer. The first item is at index 1.

Returns

Item object.

Project items attribute


a pp. pro je c t .i tem s

Description

All of the items in the project.

Type

ItemCollection object; read-only.

Project linearBlending attribute


a pp. pro je c t .l i n ea rBl en di n g

Description

True if linear blending should be used for this project; otherwise false.

114
JavaScript Reference Project object

115

Type

Boolean; read/write.

Project numItems attribute


a pp. pro je c t .nu m Item s

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 . " )

Project reduceProject() method


a pp. pro je c t .red uce Proje c t( a r ray _ of _ i t e m s )

Description

Removes all items from the project except those specified. Same as the File > Reduce Project command.

Parameters

a r r ay _ of _ i tem s An array containing the Item objects that are to be kept.

Returns

Integer; the total number of items removed.

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) ;

Project removeUnusedFootage() method


a pp. pro je c t .rem oveUnu se d Fo ota g e( )

Description

Removes unused footage from the project. Same as the File > Remove Unused Footage command.

Parameters

None.

Returns

Integer; the total number of FootageItem objects removed.

115
JavaScript Reference Project object

116

Project renderQueue attribute


a pp. pro je c t .renderQ ueue

Description

The render queue of the project.

Type

RenderQueue object; read-only.

Project rootFolder attribute


a pp. pro je c [Link] lder

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

FolderItem object; read-only.

Project save() method


a pp. pro je c t .s ave( )
a pp. pro je c t .s ave( file )

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

file Optional. An ExtendScript File object for the file to save.

Returns

None.

Project saveWithDialog() method


a pp. pro je c t .s aveWi th Di a l og ( )

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

Boolean; true if the project was saved.

Project selection attribute


a pp. pro je c t .s el e c t i on

Description

All items selected in the Project panel, in the sort order shown in the Project panel.

Type

Array of Item objects; read-only.

Project showWindow() method


a pp. pro je c t .s how Win dow( d oSh ow )

Description

Shows or hides the Project panel.

Parameters

doS h ow When true, show the Project panel. When false, hide the Project panel.

Returns

Nothing.

Project timecodeBaseType attribute


a pp. pro je c t .t i m e cod e B as e Ty p e

Description

The Timecode Base option, as set in the Project Settings dialog box.

Type

A Ti m e cod e B as e Ty p e enumerated value; read/write. One of:


Tim eco de Ba s eTy p [Link] TO
Tim eco de Ba s eTy p e.F P S 24
Tim eco de Ba s eTy p e.F P S 25
Tim eco de Ba s eTy p e.F P S 30
Tim eco de Ba s eTy p e.F P S 48
Tim eco de Ba s eTy p e.F P S 50
Tim eco de Ba s eTy p e.F P S 60
Tim eco de Ba seTy p e.FPS100

Project timecodeDisplayType attribute


a pp. pro je c t .t i m e cod eD i sp l ay Ty p e

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

A Ti m e cod eD i sp l ay Ty p e enumerated value; read/write. One of:


Tim e co de Di s p l ay Ty p e .T I M E C O DE
Tim e co de Di s p l ay Ty p e .F R A M E S
Tim e co de Di s p l ay Ty p e .F E E T _ A N D_ F R A M E S

Project timecodeFilmType attribute


a pp. pro je c t .t i m e cod eF i l m Ty p e

Description

The film type, as set in the Feet + Frames option in the Project Settings dialog box.

Type

A Ti m e cod eF i l m Ty p e enumerated value; read/write. One of:


Tim eco de F il m Ty p e .MM 16
Tim eco de F il m Ty p e .MM 35

Project timecodeNTSCDropFrame attribute


a pp. pro je c t .t i m e cod eN TS C D ro pFr am e

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.

Project transparencyGridThumbnails attribute


a pp. pro je c t .t r an s p aren c y Gr i d T hu m bn ai l s

Description

When true, thumbnail views use the transparency checkerboard pattern.

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

Attribute Reference Description

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 Mi n “Property hasMin attribute” on When true, there is a minimum permitted value.


page 124

h as Max “Property hasMax attribute” on When true, there is a maximum permitted value.
page 124

m i n Va lu e “Property minValue attribute” on The minimum permitted value.


page 131

m a x Va lu e “Property maxValue attribute” on The maximum permitted value.


page 131

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

i s Ti m e Va r y i n g “Property isTimeVarying attribute” on When true, the property has keyframes or an


page 125 expression enabled that can vary its values.

nu m Ke y s “Property numKeys attribute” on The number of keyframes on this property.


page 131

un it sTex t “Property unitsText attribute” on A text description of the units in which the value is
page 139 expressed.

e xp re ss i o n “Property expression attribute” on The expression string for this property.


page 123

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

Attribute Reference Description

s e l e c te d Ke y s “Property selectedKeys attribute” on All selected keyframes of the property.


page 133

prop er t y Index “Property propertyIndex attribute” on The position index of this property.
page 132

Methods

Method Reference Description

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

i s In ter p o l a t i o n Ty p e Va l i d () “Property isInterpolationTypeValid() When true, this property can be inter-


method” on page 125 polated.

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

Method Reference Description

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 Te m p o r a l Co n t i n u o u s ( ) “Property keyTemporalContinuous() Reports whether a keyframe has tem-


method” on page 130 poral continuity.

s e t Te m p or al Au to B e z i e r At Ke y( ) “Property setTemporalAutoBezierAtKey() Sets whether a keyframe has temporal


method” on page 136 auto-Bezier.

ke y Te m p o r a l Au t o B e z i e r ( ) “Property keyTemporalAutoBezier() Reports whether a keyframe has tem-


method” on page 129 poral auto-Bezier.

s e tS pa t i al Con t i nu o u sAtKe y( ) “Property setSpatialContinuousAtKey() Sets whether a keyframe has spatial


method” on page 135 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.

s e tS pa t i al AutoB e z i e r AtKe y “Property setSpatialAutoBezierAtKey() Sets whether a keyframe has spatial


method” on page 135 auto-Bezier.

ke ySp a ti a l AutoB ezi er( ) “Property keySpatialAutoBezier() method” Reports whether a keyframe has spatial
on page 129 auto-Bezier.

s e tRov i n g At Ke y ( ) “Property setRovingAtKey() method” on Sets whether a keyframe is roving.


page 134

ke y Rov i n g () “Property keyRoving() method” on page 128 Reports whether a keyframe is roving.

s e tS e l ec te dAtKe y( ) “Property setSelectedAtKey() method” on Sets whether a keyframe is selected.


page 135

ke y S el e c ted ( ) “Property keySelected() method” on Reports whether a keyframe is selected.


page 128

Example: Get and set the value of opacity


v ar my Prop er t y = my L ayer. op a c it y ;
//opa cit y ha s proper t yVa lue Ty p e of O n eD, a n d is store d as a flo at
my Prop er t y. s e t Val u e ( 0 . 5 ) ;
// Va r i able my O p acit y is a f l oa t v alu e
v ar my O pa c i t y = my Prop er t y.v al ue;

Example: Get and set the value of a position


v ar my Prop er t y = my L ayer. p o s it i o n ;
/ / p o s i t i on h as p rop e r t y Va l u e Ty p e o f T h re e D _ S PAT I AL , a n d i s store d a s a n ar r ay of 3 f l o at s
my Prop er t y. s e t Val u e ( [ 1 0 . 0 , 3 0 . 0 , 0 . 0 ]) ;
/ / Va r i a b l e my Pos i t io n i s a n a r r ay o f 3 f l o at s
v ar my Pos i t i o n = my Pro p e r t y. va l u e ;

Example: Change the value of a mask shape to be open instead of closed


v ar my Mas k = my l ayer. m as k( 1) ;
v ar my Prop er t y = my Ma sk .m as kPa th ;
my Sh ap e = my Prop er t y.v alu e;
my Sh ap [Link] se d = false;
my Prop er t y. s e t Val u e ( myS h a p e );

121
JavaScript Reference Property object

122

Example: Get the value of a color at a particular time

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 " );
}

Example: Keyframe a rotation from 0 to 90 and back again

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

my Tex t L ayer.s ourceText .s e tVa lue( n ew Tex tD o c um en t( " fo o" ) );


my Tex t L ayer.s ourceText .s e tVa lue( " fo o" ) ;

Property addKey() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .a dd Ke y( t i m e)

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

Integer; the index of the new keyframe or marker.

Property canSetExpression attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec . c a n S e t Ex pres si o n

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.

Property canVaryOverTime attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .canVa r yO verTim e

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.

Property expression attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .ex pres s io n

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

String; read/write if can S et Ex pression for the named property is true.

Property expressionEnabled attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .ex pres s io n E n ab l e d

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.

Property expressionError attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .ex pres s ion E r ror

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.

Property hasMax attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .ha sMa x

Description

When true, there is a maximum permitted value for the named property; otherwise false.

Type

Boolean; read-only.

Property hasMin attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .ha sMin

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.

Property isInterpolationTypeValid() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .i sIn te r p o l a t io n Ty p e Val i d( t y p e )

Description

Returns true if the named property can be interpolated using the specified keyframe interpolation type.

Parameters

type A Ke y fr am eIn ter p o la t i on 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

Boolean.

Property isSpatial attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .isSp at i al

Description

When true, the named property defines a spatial value. Examples are position and effect point controls.

Type

Boolean; read-only.

Property isTimeVarying attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .isTimeVa r y i ng

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

Property keyInInterpolationType() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .ke y In In ter p ol a t ion Ty p e( ke y In d e x)

Description

Returns the 'in' interpolation type 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 ea re st Ke y -
In dex method.

Returns

A Ke y f r am eIn ter p ol at i on Ty p e enumerated value; one of:


Ke y fr am eIn ter p o la t i on Ty p e .L I N E A R
Ke y fr ameIn ter p o la t ion Ty p e .BE ZIER
Ke y fr am eIn ter p o la t i on Ty p e .H OL D

Property keyInSpatialTangent() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .ke y In Sp at ialTa n gent( ke y In d e x)

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

Array of floating-point values:


• If the property value type is Pro p e r t y Val u e Ty p e . Two D_ S PAT I A L , the array contains 2 floating-point
values.
• If the property value type is Proper t y ValueTy p e. Thre eD_SPATIA L , the array contains 3 floating-point
values.
• If the property value type is neither of these types, an exception is generated.

Property keyInTemporalEase() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .ke y In Tem p or alEa se (k e y In d e x )

Description

Returns the incoming temporal ease 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 ad d Ke y or ne arest-
Ke y In dex method.

126
JavaScript Reference Property object

127

Returns

Array of KeyframeEase objects:


• If the property value type is Proper t y ValueTy p e. Two D , the array contains 2 objects.
• If the property value type is Proper t y ValueTy p e. Thre eD , the array contains 3 objects.
• For any other value type, the array contains 1 object.

Property keyOutInterpolationType() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .ke y O u tIn ter p o l a t i on Ty p e (k e y In d e x )

Description

Returns the outgoing interpolation type 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 ad d Ke y or ne arest-
Ke y In dex method.

Returns

A Ke y f r am eIn ter p ol at i on Ty p e enumerated value; one of:


Ke y fr am eIn ter p o la t i on Ty p e .L I N E A R
Ke y fr ameIn ter p o la t ion Ty p e .BE ZIER
Ke y fr am eIn ter p o la t i on Ty p e .H OL D

Property keyOutSpatialTangent() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .ke y O utS p at i alTangent( ke y In d e x)

Description

Returns the outgoing spatial tangent 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 ad d Ke y or ne arest-
Ke y In dex method.

Returns

Array of floating-point values:


• If the property value type is Pro p e r t y Val u e Ty p e . Two D_ S PAT I A L , the array contains 2 floating-point
values.
• If the property value type is Proper t y ValueTy p e. Thre eD_SPATIA L , the array contains 3 floating-point
values.
• If the property value type is neither of these types, an exception is generated.

127
JavaScript Reference Property object

128

Property keyOutTemporalEase() method


a pp. pro je c t .i tem ( in d e x) .l ayer(i n de x ). prop e r t y Sp ec .ke y O utTempor alE ase( ke y In de x )

Description

Returns the outgoing temporal ease 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 ad d Ke y or ne arest-
Ke y In dex method.

Returns

Array of KeyframeEase objects:


• If the property value type is Proper t y ValueTy p e. Two D , the array contains 2 objects.
• If the property value type is Proper t y ValueTy p e. Thre eD , the array contains 3 objects.
• For any other value type, the array contains 1 object.

Property keyRoving() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .ke y Rov i ng( ke y In d e x)

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.

Property keySelected() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .ke y S e l ec te d (k e y In d e x )

Description

Returns true if the specified keyframe is selected.

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

Property keySpatialAutoBezier() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .ke y S p at i al AutoB e z ier (k e y In d e x)

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.

Property keySpatialContinuous() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec . ke y S p a t i a l Co n t i nuo us (k e y In d e x )

Description

Returns true if the specified keyframe has spatial continuity.


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.

Property keyTemporalAutoBezier() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .ke y Temp or alAutoB e zier (ke yInd ex )

Description

Returns true if the specified keyframe has temporal auto-Bezier interpolation.


Temporal auto-Bezier interpolation 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

Boolean.

129
JavaScript Reference Property object

130

Property keyTemporalContinuous() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .ke y Tem p o r a l Con t i nu ou s (ke yInd ex )

Description

Returns true if the specified keyframe has temporal continuity.


Temporal continuity affects this keyframe only if keyframe interpolation type is Ke y fr am eIn ter p o la -
t i o n Ty p e. B E Z I E R for both ke y In In t e r p o l a t i on Ty p e (ke yInd ex ) and ke y O utIn ter p ol a t i on Ty p e (k e y In d e 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

Boolean.

Property keyTime() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .ke y Ti me( ke y In de x )
a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .ke y Ti me( m a r ke rCo m m e nt)

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.

Property keyValue() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .ke y Va lue (ke yInd ex )
a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .ke y Va lue (m a r k e r Com m e n t )

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.

Property maxValue attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .maxVa lue

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

Floating-point value; read-only.

Property minValue attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec . m i n Val u e

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

Floating-point value; read-only.

Property nearestKeyIndex() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .nea re st Ke yIndex( t i m e)

Description

Returns the index of the keyframe nearest to the specified time.

Parameters

time The time in seconds; a floating-point value. The beginning of the composition is 0.

Returns

Integer.

Property numKeys attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .numKe ys

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.

Property propertyIndex attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .prop er t yIndex

Description

The position index of the named property. The first property is at index position 1.

Type

Integer; read-only.

Property propertyValueType attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .prop e r t y Val u e Ty p e

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

A Prop er t y ValueTy p e enumerated value; read/write. One of:


E

Proper t y Valu eTy p [Link] _VA LUE Stores no data.

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 e.O n eD A floating-point value.

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] E R_IND E X Integer; a value of 0 means no layer.

Proper t y Valu eTy p e.M ASK_INDEX Integer; a value of 0 means no mask.

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.

Property removeKey() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .rem ove Ke y ( ke y In de x )

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.

Property selectedKeys attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .se l e c te d Ke y s

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

Array of integers; read-only.

Property setInterpolationTypeAtKey() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .se t In ter p ol at i on Ty p eAt Ke y ( ke y In de x , i nTy p e ,
ou tTy p e )

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.

i n Ty p e The incoming interpolation type. A Ke y f r a m eIn ter p ol a ti on 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

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.

Property setRovingAtKey() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .se t Rov i ngAt Ke y( ke y In de x , n e w Va l )

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.

newVal True to turn roving on, false to turn roving off.

Returns

Nothing.

134
JavaScript Reference Property object

135

Property setSelectedAtKey() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .se t Sele cted At Ke y( ke y In de x , o n O f f )

Description

Selects or deselects the specified keyframe.

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.

o n O ff True to select the keyframe, false to deselect it.

Returns

Nothing.

Property setSpatialAutoBezierAtKey() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .se t Sp a t ia l AutoB ez i erAt Ke y ( ke y In dex , n ew Val )

Description

Turns spatial auto-Bezier interpolation on or off 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.

newVal True to turn spatial auto-Bezier on, false to turn it off.

Returns

Nothing.

Property setSpatialContinuousAtKey() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .s e t S p a t i a l Co n t i n u o u s At Ke y (ke y In de x, n e w Va l )

Description

Turns spatial continuity on or off 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.

newVal True to turn spatial continuity on, false to turn it off.

Returns

Nothing.

135
JavaScript Reference Property object

136

Property setSpatialTangentsAtKey() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .se t Sp a t ia lTangent sAtKe y (k e y In d e x , i n Tan g e n t ,
ou tTa n ge n t )

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.

i n Ta n g e n t The incoming tangent vector. 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.
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.

Property setTemporalAutoBezierAtKey() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .se t Temp or a l AutoB ezierAt Ke y( ke y In de x, n e w Va l )

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.

newVal True to turn temporal auto-Bezier on, false to turn it off.

Returns

Nothing.

Property setTemporalContinuousAtKey() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .s e t Tem p o r a l Con t i n u o u s At Ke y ( ke y In d e x , n e w Va l )

Description

Turns temporal continuity on or off for the specified keyframe.

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.

newVal True to turn temporal continuity on, false to turn it off.

Returns

Nothing.

Property setTemporalEaseAtKey() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .se t Temp or a l Eas eAtKe y( ke y In d e x , i n Te m p o ra l E a s e ,
ou tTe m p o ra lE as e )

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.

i n Tem p or a l E a se The incoming temporal ease. 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.
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.

Property setValue() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .se t Valu e( n e w Va l u e )

Description

Sets the static value of a property that has no keyframes.


If the named property has keyframes, this method generates an exception and displays an error. To set the
value of a property with keyframes, use “Property setValueAtTime() method” on page 138 or “Property
setValueAtKey() method” on page 138.

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.

Property setValueAtKey() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .se t Valu eAt Ke y ( ke y In d e x , n e w Va l u e )

Description

Finds the specified keyframe and sets its value.


If the named property has no keyframes, or no keyframe with the specified index, this method generates an
exception and displays an error.

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.

Property setValueAtTime() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .se t Valu eAt Ti m e (t im e , n e w Valu e)

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.

Property setValuesAtTimes() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .se t Valu es At Ti mes ( t im e s , n e w Va l u es)

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.

Property unitsText attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec . u n i t sTex t

Description

The text description of the units in which the value is expressed.

Type

String; read-only.

Property value attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .va lue

Description

The value of the named property at the current time.


• If ex p re ss i on E n ab l e d is true, returns the evaluated expression value.
• If there are keyframes, returns the keyframed value at the current time.
• Otherwise, returns the static value.
The type of value returned depends on the property value type. See examples for “Property object” on
page 119.

Type

A value appropriate for the type of the property (see “Property propertyValueType attribute” on page 132);
read-only.

Property valueAtTime() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .va lueAtTi me( t im e , p re E x pre s s i o n)

Description

The value of the named property as evaluated at the specified time.


Note that the type of value returned is not made explicit; it will be of a different type, depending on the
property evaluated.

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.

Ignored if the property does not have an associated expression.

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 ");

See also “PropertyGroup property() method” on page 150.


• PropertyBase is the base class for both Property and PropertyGroup, so PropertyBase attributes and
methods are available when working with properties and property groups. See “Property object” on
page 119 and “PropertyGroup object” on page 148.

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

Similarly, if you reference an AE property in a deleted object, the warning occurs:


v ar layer 1 = [Link] ec t. item(1 ). layer(1);
v ar l ayer 1 p o s i t io n = l ayer 1 .t r an s for m . p o s it i o n ;
layer [Link]();
a l er t( l ayer 1 p o s i t io n . v al u e ) ; / / i nv al i d re feren ce to p ro p e r t y in s e l e c te d o b jec 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

Attribute Reference Description

name “PropertyBase name attribute” on Name of the property.


page 145

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

Attribute Reference Description

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.

prop er t y Ty p e “PropertyBase propertyType attribute” The property type.


on page 146

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 n a bl e d “PropertyBase enabled attribute” on When true, this property is enabled.


page 144

a c t ive “PropertyBase active attribute” on When true, this property is active.


page 142

e l id ed “PropertyBase elided attribute” on When true, this property is not displayed in the user interface.
page 143

i s E ff e c t “PropertyBase isEffect attribute” on When true, this property is an effect.


page 144

i s Mas k “PropertyBase isMask attribute” on When true, this property is a mask.


page 144

s e l e c te d “PropertyBase selected attribute” on When true, this property is selected.


page 147

Methods

Method Reference Description

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

du pl i c ate( ) “PropertyBase duplicate() method” on Duplicates this property object.


page 143

PropertyBase active attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec . a c t ive

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

Boolean; read/write if c a n S e t E n a b le d is true, read-only if c a n S e t E n a bl e d is false.

142
JavaScript Reference PropertyBase object

143

PropertyBase canSetEnabled attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec . c a n S e t E n a b l e d

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.

PropertyBase duplicate() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .dup licate ()

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.

PropertyBase elided attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .elide d

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

PropertyBase enabled attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .enabled

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

Boolean; read/write if c a n S e t E n a b le d is true, read-only if c a n S e t E n a bl e d is false.

PropertyBase isEffect attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .isEf fe c t

Description

When true, this property is an effect PropertyGroup.

Type

Boolean; read-only.

PropertyBase isMask attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .isMa s k

Description

When true, this property is a mask PropertyGroup.

Type

Boolean; read-only.

PropertyBase isModified attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .isMo d if ied

Description

When true, this property has been changed since its creation.

Type

Boolean; read-only.

PropertyBase matchName attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .matchName

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.

PropertyBase moveTo() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .moveTo(n e w In de x )

Description

Moves this property to a new position in its parent property group.


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.)

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.

PropertyBase name attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .nam e

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

String; read/write for a child of an indexed group; otherwise read-only.

PropertyBase parentProperty attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .p arentProp er t y

Description

The property group that is the immediate parent of this property, or null if this PropertyBase is a layer.

Type

PropertyGroup object or null; read-only.

PropertyBase propertyDepth attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .prop er t yD ep th

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.

PropertyBase propertyGroup() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .prop er t yGrou p( )
a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .prop er t yGrou p( c oun t Up )

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

PropertyGroup object, or null if the count reaches the containing layer.

PropertyBase propertyIndex attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .prop er t yIndex

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.

PropertyBase propertyType attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .prop er t yTy p e

Description

The type of this property.

Type

A Prop er t y Ty p e enumerated value; read/write. One of:

Prop er t y Ty p e .P ROPE RT Y A single property such as position or zoom.

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.

PropertyBase remove() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .rem ove ()

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.

PropertyBase selected attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec .se l e c te d

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

Boolean; read/write for an effect or mask property group, otherwise read-only.

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

Attribute Reference Description

nu m Prop er t i es “PropertyGroup numProperties attribute” on page 149 The number of indexed properties in the group.

Methods

Method Reference Description

prop er t y ( ) “PropertyGroup property() method” on Gets a member property or group.


page 150

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

a d dProp er t y () “PropertyGroup addProperty() method” on Adds a property to the group.


page 148

PropertyGroup addProperty() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Grou p Sp e c.a d dProp er t y (n a m e )

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).

The following names are supported:

• 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”.

• When adding to an ADBE Mask Parade: “ADBE Mask Atom”, “Mask”.


• When adding to an ADBE Effect Parade, any effect by match name, such as “ADBE Bulge”, “ADBE Glo2”, “APC Vegas”.
• Any effect by display name, such as “Bulge”, “Glow”, “Vegas”.
• For text animators, “ADBE Text Animator”.
• For selectors, Range Selector has the name “ADBE Text Selector”, Wiggly Selector has the name “ADBE Text Wiggly
Selector”, and Expression Selector has the name “ADBE Text Expressible Selector”.

Returns

PropertyBase object.

PropertyGroup canAddProperty() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Grou p Sp e [Link] n Ad dProp er t y(n a m e)

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.

PropertyGroup numProperties attribute


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Grou p Sp e [Link] m Prop er t i es

Description

The number of indexed properties in this group.


For layers, this method returns a value of 3, corresponding to the mask, effect, and motion tracker groups,
which are the indexed groups within the layer. However, layers also have many other properties available only
by name; see the “PropertyGroup property() method” on page 150.

Type

Integer; read-only.

149
JavaScript Reference PropertyGroup object

150

PropertyGroup property() method


a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Grou p Sp e c.p ro p e r t y( in d e x)
a pp. pro je c t .i tem ( in d e x) .layer(i n de x ). prop e r t y Grou p Sp e c.p ro p e r t y( n am e )

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 ].

name The name of the child property. This can be:

• Any match name


• Any name in expression “parenthesis style” syntax, meaning the display name or the compact English
name

• Any name in expression “intercap style” syntax


For supported property names, see the table below.

Returns

PropertyBase object or null if no child property with the specified string name is found.

Properties accessible by name

From any Layer • "ADBE Mask Parade", or “Masks”

• "ADBE Effect Parade", or “Effects”

• "ADBE MTrackers", or “Motion Trackers”

150
JavaScript Reference PropertyGroup object

151

From an AVLayer • "Anchor Point" or "anchorPoint"

• "Position" or "position"

• "Scale" or "scale"

• "Rotation" or "rotation"

• "Z Rotation" or "zRotation" or "Rotation Z" or "rotationZ"

• "Opacity" or "opacity"

• "Marker" or "marker"

From an AVLayer with a non-still source • "Time Remap" or "timeRemapEnabled"

From an AVLayer with an audio component • "Audio Levels" or "audioLevels"

From a camera layer • "Zoom" or "zoom"

• "Depth of Field" or "depthOfField"

• "Focus Distance" or "focusDistance"

• "Aperture" or "aperture"

• "Blur Level" or "blurLevel"

From a light layer • "Intensity" or "intensity"

• "Color" or "color"

• "Cone Angle" or "coneAngle"

• "Cone Feather" or "coneFeather"

• "Shadow Darkness" or "shadowDarkness"

• "Shadow Diffusion" or "shadowDiffusion"

• "Casts Shadows" or "castsShadows"

From a 3D layer • "Accepts Shadows" or "acceptsShadows"

• "Accepts Lights" or "acceptsLights"

• "Ambient" or "ambient"

• "Diffuse" or "diffuse"

• "Specular" or "specular"

• "Shininess" or "shininess"

• "Casts Shadows" or "castsShadows"

• "Light Transmission" or "lightTransmission"

• "Metal" or "metal"

From a camera, light or 3D layer • "X Rotation" or "xRotation" or "Rotation X" or "rotationX"

• "Y Rotation" or "yRotation" or "Rotation Y" or "rotationY"

• "Orientation" or "orientation"

From a text layer • "Source Text" or "sourceText" or "Text" or "text"

From a PropertyGroup "ADBE Mask Parade" • "ADBE Mask Atom"

From a PropertyGroup "ADBE Mask Atom" • "ADBE Mask Shape", or “maskShape”, or “maskPath”

• "ADBE Mask Feather", or “maskFeather”

• "ADBE Mask Opacity", or “maskOpacity”

• "ADBE Mask Offset", or “maskOffset”

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

Attribute Reference Description

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

Method Reference Description

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.

p au se Re n der in g () “RenderQueue pauseRendering() Pauses or restarts the rendering process.


method” on page 154

s to pRen d e r i n g ( ) “RenderQueue stopRendering() Stops the rendering process.


method” on page 155

i te m ( ) “RenderQueue item() method” on Gets a render-queue item from the collection.


page 153

RenderQueue item() method


a pp. pro je c t .renderQ ueue. item( i n de x)

Description

Gets a specified item from the i te m s collection.

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

RenderQueue items attribute


a pp. pro je c t .renderQ ueue. items

Description

A collection of all items in the render queue. See “RenderQueueItem object” on page 156.

Type

RQItemCollection object; read-only.

RenderQueue numItems attribute


a pp. pro je c t .renderQ ueue. numItems

Description

The total number of items in the render queue.

Type

Integer; read-only.

RenderQueue pauseRendering() method


a pp. pro je c t .renderQ ueue. pa useRender i ng( p a u s e)

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

p au se True to pause a current render process, false to continue a paused render.

Returns

Nothing.

RenderQueue render() method


a pp. pro je c t .renderQ ueue. render()

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.

RenderQueue rendering attribute


a pp. pro je c t .renderQ ueue. render ing

Description

When true, the rendering process is in progress or paused. When false, it is stopped.

Type

Boolean; read-only.

RenderQueue showWindow() method


a pp. pro je c t .renderQ ueue. sh ow Wi ndow ( do Sh ow)

Description

Shows or hides the Render Queue panel.

Parameters

doS h ow When true, show the Render Queue panel. When false, hide it.

Returns

Nothing.

RenderQueue stopRendering() method


a pp. pro je c t .renderQ ueue. stop Render ing()

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

Attribute Reference Description

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

t i m e S p an S t ar t “RenderQueueItem timeSpanStart The start time in the composition to be rendered.


attribute” on page 161

t i m eS p an D ur at i o n “RenderQueueItem timeSpanDuration The duration of the composition to be rendered.


attribute” on page 161

s ki p Fr a m e s “RenderQueueItem skipFrames attribute” The number of frames to skip when rendering this item.
on page 160

com p “RenderQueueItem comp attribute” on The composition to be rendered by this item.


page 157

outputMo du le s “RenderQueueItem outputModules The collection of Output Modules for this item.
attribute” on page 159

tem pl a tes “RenderQueueItem templates attribute” on A set of Render Settings templates.


page 161

s ta tu s “RenderQueueItem status attribute” on The current rendering status of the item.


page 160

onStatusChanged “RenderQueueItem onStatusChanged A callback function that is called during the rendering
attribute” on page 158 process when the status of the item changes.

l o g Ty p e “RenderQueueItem logType attribute” on A log type for this item.


page 158

Methods

Method Reference Description

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

Method Reference Description

a pp ly Te m p l ate ( ) “RenderQueueItem applyTemplate() method” on Applies a Render Settings template.


page 157

du pl i c ate “RenderQueueItem duplicate() method” on page 157 Duplicates this item.

RenderQueueItem applyTemplate() method


a pp. pro je c t .renderQ ueue. item .a pp ly Te m p l ate ( te m p la te Nam e )

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

tem pl a teNam e A string containing the name of the template to apply.

Returns

Nothing.

RenderQueueItem comp attribute


a pp. pro je c t .renderQ ueue. item (i n de x ). com p

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

CompItem object; read-only.

RenderQueueItem duplicate() method


a pp. pro je c t .renderQ ueue. item (i n de x ). dup l i c ate ()

Description

Creates a duplicate of this item and adds it this render queue.

Parameters

None.

Returns

RenderQueueItem object.

RenderQueueItem elapsedSeconds attribute


a pp. pro je c t .renderQ ueue. item (i n de x ). e l a ps e dS e co n d s

157
JavaScript Reference RenderQueueItem object

158

Description

The number of seconds spent rendering this item.

Type

Integer, or null if item has not been rendered; read-only.

RenderQueueItem logType attribute


a pp. pro je c t .renderQ ueue. item (i n de x ). o u t p ut Mo d u l e. l o g Ty p e

Description

A log type for this item, indicating which events should be logged while this item is being rendered.

Type

A Log Ty p e enumerated value; (read/write). One of:


L o g Ty p e . E R RO R S _ O N LY
L o g Ty p e . E R RO R S _ A N D _ S E T T I N G S
L o g Ty p e . E R RO R S _ A N D _ PE R _ F RA ME _ I N F O

RenderQueueItem numOutputModules attribute


a pp. pro je c t .renderQ ueue. item (i n de x ). numO ut put Mo dules

Description

The total number of Output Modules assigned to this item.

Type

Integer; read-only.

RenderQueueItem onStatusChanged attribute


a pp. pro je c t .renderQ ueue. item (i n de x ). onSt at us Ch ange d

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

A function name string, or null if no function is assigned.

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

RenderQueueItem outputModules attribute


a pp. pro je c t .renderQ ueue. item (i n de x ). o u t p ut Mo d u l e s

Description

The collection of Output Modules for the item.

Type

OMCollection object; read-only.

RenderQueueItem outputModule() method


a pp. pro je c t .renderQ ueue. item (i n de x ). o u t p ut Mo d u l e ( i n d e x)

Description

Gets an output module with the specified index position.

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.

RenderQueueItem remove() method


a pp. pro je c t .renderQ ueue. item (i n de x ). rem ove ()

Description

Removes this item from the render queue.

Parameters

None.

Returns

Nothing.

RenderQueueItem render attribute


a pp. pro je c t .renderQ ueue. item (i n de x ). ren d er

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.

RenderQueueItem saveAsTemplate() method


a pp. pro je c t .renderQ ueue. item (i n de x ). saveAs Temp l ate (n a m e)

Description

Saves the item’s current render settings as a new template with the specified name.

Parameters

name A string containing the name of the new template.

Returns

Nothing.

RenderQueueItem skipFrames attribute


a pp. pro je c t .renderQ ueue. item (i n de x ). sk i p Fr am es

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

Integer in the range [0..99]. Read/write.

RenderQueueItem startTime attribute


a pp. pro je c t .renderQ ueue. item (i n de x ). st ar tTi m e

Description

The day and time that this item started rendering.

Type

Date object, or null if the item has not started rendering; read-only.

RenderQueueItem status attribute


a pp. pro je c t .renderQ ueue. item (i n de x ). st at us

Description

The current render status of the item.

160
JavaScript Reference RenderQueueItem object

161

Type

An RQItem S t atu s enumerated value; read-only. One of:

RQ Ite m St a t u s . W I L L _ C ON T I N U E Rendering process has been paused.

RQ Ite m S t a t u s . N E E D S _ O U T P U T Item lacks a valid output path.

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 .QU E UE D Composition is ready to render.

RQ Item St at us .RE N D E RI N G Composition is rendering

RQ Item St at us .U SER _ STO P PED Rendering process was stopped by user or script.

RQ Item St at us .E RR _ STO P PE D Rendering process was stopped due to an error.

RQ Item St at us .D ON E Rendering process for the item is complete.

RenderQueueItem templates attribute


a pp. pro je c t .renderQ ueue. item (i n de x ). tem p l ate s

Description

The names of all Render Settings templates available for the item. See also “RenderQueueItem saveAsTemplate()
method” on page 160.

Type

Array of strings; read-only.

RenderQueueItem timeSpanDuration attribute


a pp. pro je c t .renderQ ueue. item (i n de x ). t im eS pa n D ur a t i on

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

Floating-point value; read/write.

RenderQueueItem timeSpanStart attribute


a pp. pro je c t .renderQ ueue. item (i n de x ). t im eS pa n S ta r t

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

Floating-point value; read/write.

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

Method Reference Description

a d d( ) “RQItemCollection add() method” on page 162 Adds a composition to the Render Queue.

RQItemCollection add() method


a pp. pro je c t .renderQ ueue. items. a dd( c o m p )

Description

Adds a composition to the Render Queue, creating a RenderQueueItem.

Parameters

com p The CompItem object for the composition to be added.

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

Method Reference Description

s aveS e t t in g () “Settings saveSetting() method” on page 164 Saves a default value for a setting.

g e t S e tt i n g ( ) “Settings getSetting() method” on page 163 Retrieves a setting value.

h aveS e tt i n g ( ) “Settings haveSetting() method” on page 163 Reports whether a specified setting is assigned.

Settings getSetting() method


a pp.s e t t i ng s . g e t S e t t i n g ( s e c t i on Na m e , k e yNa m e)

Description

Retrieves a scripting preferences item value from the preferences file.

Parameters

s e c t i on Na m e A string containing the name of a settings section

ke y Na m e A string containing the key name of the setting item.

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 ) ;

Settings haveSetting() method


a pp.s e t t i ng s .have S e tt i n g ( s e c t i o n Na m e , ke y Na m e)

Description

Returns true if the specified scripting preferences item exists and has a value.

163
JavaScript Reference Settings object

164

Parameters

s e c t i on Na m e A string containing the name of a settings section

ke y Na m e A string containing the key name of the setting item.

Returns

Boolean.

Settings saveSetting() method


a pp.s e t t i ng s .saveSe tt i ng( s ec t i on Nam e , ke y Na m e, va lue )

Description

Saves a default value for a scripting preferences item.

Parameters

s e c t i on Na m e A string containing the name of a settings section

ke y Na m e A string containing the key name of the setting item.

v alu e A string containing the new value.

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.

Example: Create a square mask

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;

Example: Create a “U” shaped mask

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;

Example: Create an oval

An oval is a closed shape with 4 vertices and with i n Ta n g e n t and o u t Ta n g e n t values:


v ar my Sh ap e = n ew S h ap e () ;
my Sh ap [Link] t ices = [[300 ,50],[ 20 0,1 50],[300 ,25 0],[4 00, 150 ]];
my Sh ap [Link] ngents = [[55. 23,0 ], [0 ,-55 .23],[-55 .23 ,0],[0,5 5.2 3]];
my Sh ap [Link] Ta n gent s = [[-5 5.2 3,0 ],[0, 55. 23],[55. 23, 0],[0,-55 .23 ]];
my Sh ap [Link] o se d = t r ue;

165
JavaScript Reference Shape object

166

Attributes

Attribute Reference Description

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.

Shape closed attribute


s h a p e O b j ec t. val ue. cl os ed

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.

Shape inTangents attribute


s h a p e O b j ec t. val ue. in Tan g en t s

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

Array of floating-point pair arrays; read/write.

Shape outTangents attribute


s h a p e O b j ec t. val ue. outTa n g en ts

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

Array of floating-point pair arrays; read/write.

Shape vertices attribute


s h a p e O b j ec t. val ue. ver t i ce s

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

Array of floating-point pair arrays; read/write.

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

The SolidSource object represents a solid-color footage source.


• SolidSource is a subclass of FootageSource. All methods and attributes of FootageSource, in addition to
those listed below, are available when working with SolidSource. See “FootageSource object” on page 68.

Attributes

Attribute Reference Description

co lor “SolidSource color attribute” on page 169 The color of the solid.

SolidSource color attribute


s olid S ourc e. col or

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

Attribute Reference Description

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

Method Reference Description

c a l l Sy s te m ( ) “System callSystem() method” on page 170 Execute’s a command on the system’s command line.

System callSystem() method


s ys te m . c a l lSys te m ( c m d L i n e To Exe c u te ) ;

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

c m d L i n e To Exec u te A string containing the command and its parameters.

Returns

The output from the command.

System machineName attribute


s ys te m . mach ineName

170
JavaScript Reference System object

171

Description

The name of the computer on which After Effects is running.

Type

String; read-only.

System osName attribute


s ys te m . osNa me

Description

The name of the operating system on which After Effects is running.

Type

String; read-only.

System osVersion attribute


s ys te m . osVersion

Description

The version of the current local operating system.

Type

String; read-only.

System userName attribute


s ys te m . u s er Na m e

Description

The name of the user currently logged on to the system.

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

Attribute Reference Description

tex t “TextDocument text attribute” on page 172 The text layer’s Source Text value.

TextDocument text attribute


t e x t D o c u m e n [Link]

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

Unused Properties and Attributes

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.

Save and increment


This script, save_ a n d _ i n c rem en t. j sx , automatically saves a new copy of the open After Effects project and
increments a three-digit number in its name to distinguish it from previous versions of the project.
Note: Although much of the functionality of this script has been superseded by the incremental save feature that was
introduced in After Effects 6.5, it is still included here because it makes effective use of conditionals, functions, and
the ExtendScript File object.
This script does the following:
• Determines whether the currently open project has ever been saved. If the project has not been saved, pops
up an alert telling the user to save the project, and ends.
• If the project has been saved at least once before, defines variables for the name of the file and the numbering
and file extension that we plan to add to it.
• Checks to see if there is an underscore character four characters from the end of the current file name. If
there is, assume that the incrementer has run before and increment the current numerical string, then
extract the name without the numerical extension.
• An incrementer loop tests for whether the numbering has extended to two or three digits (for example, if the
numbering has reached “_010” or above, or “_100” or above), assigning a zero for each if not.
• Creates a new file using the updated name and extension, and displays an alert letting the user know the new
file name being saved.
• Saves the project with the new file name.

174
Examples Render named items

175

Render named items


This script, ren d e r Na m e d It e m s . js x , finds compositions in the open project with a particular text string in
their names and sends all such compositions to the render queue.
This script does the following:
• Checks to see if a default string for rendering has already been set in the user preferences. If so, set this as a
user prompt. This is handy if you’re always looking for the same string (for example, “FINAL” or
“CURRENT”). If not, we set a new se c t i onName and ke y Na m e in the preferences file, along with a place-
holder value for the string that will be entered by the user.
• Display a prompt to the user asking for a text string to use.
• Goes through the project looking for the text entered by the user, and checks if the item that contains that
text is a composition. Sends all matching compositions to the render queue.
• If the user cancels, the text is undefined. Otherwise, saves the new setting in preferences, converting it to all
lowercase letters for consistency (although the search is not case sensitive).
• Makes the Render Queue panel visible and bring it to the front, ready for the user to assign save locations
for the new render queue items.

New render locations


This script, n e w Re n d e r Lo c a t i o n s . js x , allows the user to select queued items in the render queue and assign a
new render destination for them.
This script does the following:
• Prompts the user for a new folder to use as a render destination.
• Checks that the user entered a new location (and didn’t cancel), then creates a loop for each selected render
queue item, and for each output module in it.
• If an item is queued, gives the current render location a new name and location, and displays an alert stating
the new file path.

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

files to save processing time.

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 .

• Calls the main function, pro ces sFol der( ) .

Render and e-mail


This script, ren d er _ a n d _ e m a i l . j s x , renders all queued items in an open project and sends an e-mail report to
indicate when the render has completed. It makes use of two other scripts that follow, e m ai l _ m e th o d s .js x (to
send the e-mail properly) and em ai l _ se tu p.j sx (which establishes the sender, recipient, and e-mail server).
This script does the following:
• Establishes conditions under which the script will run. An open project with at least one item queued is
required.
• Checks whether e-mail settings are already saved in the preferences. If not, run the email_se t up. jsx script,
which prompts the user for the mail gateway and sender and recipient addresses. (If there are saved settings
that you need to change, you can always run the script to make new settings that overwrite the existing
ones.)
• Render the items in the render queue.
• When rendering is complete, creates a text string for the e-mail message that contains the start time of the
render, the render time of each item in the queue, and the total render time.
• E-mails the message, using the settings (such as the server) from the e m ai l _ m e th o d s .js x script
• Displays an error if for any reason it is unable to send the mail.
A helper script, em ail_met ho d s. jsx , creates an e-mail object, using the ExtendScript Socket object. For details
of that utility, see the Creative Suite 3 JavaScript Tools Guide.
Another helper script, em ai l _ se tu p. jsx , prompts the user for the server name, e-mail sender, and e-mail
recipient that are saved as Settings. You can run this script as standalone any time you want to change the
settings. This script is a good example of how to create settings that are saved in preferences for the sole use of
scripting (as opposed to altering existing After Effects preferences settings).

Convert selected properties to markers


This script, Conve r t S e l e c te d Pro p e r t i e s to Mar ke r s .j sx , goes through the properties in each layer that are
currently selected in the Timeline panel, and converts the value of each property at each frame time to a Flash
Video event cue point in a marker.

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

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
preser veTr a n sparency : b oole an : rea d /w r i te
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
qua l it y : LayerQu alit y : rea d /w r i te
remove() no re tu r n
rep l a c e S o u rce ( Ite m n ew S o urce , b o o l e a n f i x Ex p res s i on s ) n o ret ur 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 ource : AVItem : rea d On ly
s o u rce Rec t AtTi m e ( f l o a t a t Tim e, b o o l e a n i n cl u de E x te n t s)
re tu r n s O b je c t w i th fl o at prop er t i es : top; l eft ; w i dt h; hei g ht
s ta r t Ti m e : fl o a t : rea d / w r i te
s t retch : f l o at : rea d/w r i te
t h ree DL ayer : b o o l e a n : rea d / w r i te
t hree DPer Cha r : b oo le an : re ad / w r i te
t i m e : f l o at : rea d O n l y
t i m e Rem a p E n a b l e d : b oo l e a n : re a d / w r it e
t r ac kMatteTy p e : Tr a ck Ma tte Ty p e : rea d/ w r i te
w i dt h : fl o at : rea d On l y
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == ==
Bl e n d in g Mod e e nu m
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
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 _D I 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

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

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
m i s s i n g Fo ot a g e Pat h : s t r i n g : rea d O n l y
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
rel o a d () n o ret ur n
rem ovePu l l dow n : Pul l dow n P ha se : re ad O n ly
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == =
FolderItem obj ec t
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
com m e n t : s t r i n g : rea d / w r i te
i d : i n te g e r : rea d On l y
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
n a m e : s t r i n g : rea d / w r i te
nu mItem s : in te ger : re adOnly
parentFolder : Fo lderItem : rea d /w r i te
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
t y p e Na m e : s t r i n g : rea d O n ly
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == ==
Foo ta ge Item ob je c t
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
com m e n t : s t r i n g : rea d / w r i te
du r at i o n : f l o at : rea dO n l y
f i le : File : rea d Only
fo otageMissin g : bo olea n : rea d Only
f r a m eD ur a t i on : fl o a t : rea d On ly
f r a m eRa te : fl o a t : rea d On l y
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
i d : i n te g e r : rea d On l y
m a in S o u rce : Fo o t a g e S o urce : re a d O n ly
n a m e : s t r i n g : rea d / w r i te
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
prox ySou rce : Fo ota g eSource : rea dO n ly
remove() no re tu r n
rep l a ce ( F il e p rox y F il e ) n o re t u r n
replaceWit hP laceho lder( st r ing na me, inte ger w i dth , inte ger he ig ht , flo at fr ameR ate, flo at dur a t i on )
n o re t u r n
repl a c e Wi t h S e qu e n c e ( F i l e p rox y F i l e , b o o l e a n f o rce A l p h ab e t i c a l ) n o ret ur n
rep l a ce Wi th S o l i d( Ar r ay O f F l o a t col o r, st r i n g n a m e , i n teg e r w i dt h , i n te g e r h e i g h t, f l o at p ixel As p e c R at i o )
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 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

183
After Effects Object Summary

184

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
t i m e : f l o at : rea d O n l y
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
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == ==
Im p o r tAs Ty p e e nu m
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
Im p o r t As Ty p e .C O M P
Im p o r t As Ty p e .C O M P _ C RO PPE D _ L AYE R S
Im p o r t As Ty p e .F O OTAG E
Im p o r t As Ty p e .P ROJ E C T
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == ==
Im por tO p tions ob jec t
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
n ew Im p or t O p t i on s( F i le fi l eToIm p or t ) re tu r n s Im p or tO p t i on s
c an Im p or tAs ( Im p o r t AsTy p e a sTy p e ) ret u r n s b o o l e a n
f i le : File : rea d /w r i te
force Al p h a b e t i c a l : b o o l e a n : rea d/ w r i te
i m p o r t As : Im p o r t AsTy p e : re ad / w r ite
sequ ence : bo olea n : rea d/w r i te
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == ==
Ite m Col l e c t i o n o b j e c t
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
a d dComp ( st r i ng na me, inte ger w i d th , i n te ger he ig ht , f l o at pi xe l Asp ec tR at i o, f l o at dur a t i on ,
f l o at f r am e R a te ) re tu r n s Com pIte m
a d dFol der( s t r in g name ) re tu r n s Fol d er Item
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == ==
Ke y fr am e E as e o b j ec t
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
n e w Ke y fr a m e E as e ( fl o at s p e e d , f l o at i n f lu en ce) ret ur n s Ke y f r a m eE a se
i n f lu e n ce : f l o at : rea d/ w r i te
s p e ed : f l o at : rea d/w r i te
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == ==
Ke y fr am eIn ter p o la t i on Ty p e enum
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
Ke y fr am eIn ter p o la t i on Ty p e .BE Z I E R
Ke y fr am eIn ter p o la t i on Ty p e .HO L D
Ke y fr am eIn ter p o la t i on Ty p e .L I N E A R
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == =
L a n g u a ge e nu m
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
L a n g u a ge . E N G L I S H
L a n g u a ge . F R E N C H
L a n g u a ge . G E R M AN
L a n g u a ge . I TAL I A N
L a n g u a ge . JA PA N E S E
L a n g u a ge . S PAN I S H

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

s t retch : f l o at : rea d/w r i te


t i m e : f l o at : rea d O n l y
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == =
L ayer Co l l e c t i on o b j e c t
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
a d d( AVIte m t he Item ,
[ fl o a t du r a ti o n ] ) re tur n s AV L ayer
a d dCamer a( st r i ng na me,
Ar r ay Of F l o at cen terPoi n t ) re tur n s L ayer
a d dL i g h t (s t r i n g n a m e,
Ar r ay Of F l o at cen terPoi n t ) re tur n s L ayer
a d dNu l l ( [f l o a t dur at i o n ]) ret u r n s AVL ayer
a d dS h a p e ( ) re tu r n s L ayer
a d d S o l i d ( Ar r ay O f F l o at col o r, s t r i n g n a m e , i n te ger w i dt h, inte ger heig ht, flo a t pixelAspe ct Ra t io,
[ f l o at dur a t i on ] ) re tu r n s AVL ayer
a d dTex t( [ Tex t D oc um en t tex tD o c] ) re tu r n s AVL ayer
a d dTex t( s t r ing tex t ) re tur n s AVL ayer
by Na m e ( s t r i n g n a m e ) ret u r n s L ayer
pre co m p o s e ( Ar r ay O fIn teg e r l ayer In d ice s , s t r in g n a m e , [ b o ol e a n m ove A l l At t r i but e s ])
re tu r n s C om p Item
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == =
LayerQu alit y enum
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
LayerQu alit y.B EST
L ayer Q u al i t y. D RA F T
L ayer Q u al i t y. W I R E F RA M E
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = =
LogTy p e enu m
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
L o g Ty p e . E R RO R S _ A N D _ PE R _ F RA ME _ I N F O
L o g Ty p e . E R RO R S _ A N D _ S E T T I N G S
L o g Ty p e . E R RO R S _ O N LY
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == =
Ma r kerVa lue ob je c t
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
n e w Ma r ke r Va lue ( s t r i n g com m e n t , [ s t r i n g cha p ter ] , [ st r in g u r l] , [ s t r in g fr am e Targ e t] )
re tu r n s Mar kerValue
cha p ter : st r i n g : rea d / w r i te
com m e n t : s t r i n g : rea d / w r i te
cue PointName : st r i ng : re ad/w r ite
e ven t Cue Poi n t : b o o l e an : rea d / w r i te
f r a m eTa rg et : s t r i n g : rea d/ w r i te
ge tPa r am eters() re tur n s ob jec t w i t h prop er t i es se t
s et Par ame ters ( O b j ec t ke yValu ePairs ) no re t ur n
ur l : s t r i ng : rea d /w r i te
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = ==
Ma sk Mo de enu m
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
Ma sk Mo de. ADD
Ma sk Mo de. DA RK E N
Ma sk Mo de. DIF F E R E NCE

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

rem oveUnu se d Fo ota g e( ) re tur n s i n te g er


renderQ ueue : RenderQ ueue : re adO n ly
root Fo lder : FolderItem : re adO n ly
s ave( F i l e toF i l e ) ret u r n s b o o l e a n
s aveWi thD i a l og( ) re tur n s b oo le an
s el e c t i o n : A r r ay o f Ite m : rea d O n l y
s how Win dow( b o ol ea n doS how) n o re tur n
t i m e cod e B as e Ty p e : Ti m e cod e B as e Ty p e : re ad / w r ite
t i m e cod e D i sp l ay Ty p e : Ti m e cod e D is p l ay Ty p e : rea d / w r i te
t i m e cod e F i l m Ty p e : Ti m e co d e F il m Ty p e : re a d / w r it e
t i m e cod e N TS C D ro p Fr a m e : b o o l e an : rea d / w r i te
t r an s p aren c y Gr i d T hu m bn ai l s : b o o l e an : re a d/ w r ite
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = ==
Pro p e r t y o b j e c t
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
a c t ive : b oo l ean : re ad O n ly
a d dKe y (f lo at at Ti me) ret ur n s inte ger
can S et Ena ble d : bo olea n : rea dO n ly
can S et Ex pression : bo olea n : rea dO n ly
can Var yOverTime : b oo l ean : re adO n ly
du pl i c ate( ) re tur n s Prop er t y
e l id ed : b ool e an : rea d On ly
ena ble d : bo olea n : rea dO n ly
e xp re ss i on : s t r in g : re ad / w r ite
e xp re ss i on E n ab l e d : b oo l e an : re ad / w r ite
e xp re ss i on E r ror : s t r i n g : rea dO n l y
h as Max : b oo le an : re ad O n ly
h as Mi n : b o o l e a n : rea d O 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 In ter p o l a t i o n Ty p e Va l i d (Ke y fr a m e In te r p o l at i o n Ty p e t y p e ) ret u r n s b o o l e a n
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 Sp a t i a l : b o o l e a n : rea dO n l y
i s Ti m e Va r y i n g : b o o l e a n : rea dO n l y
ke y In In t e r p o l a t i o n Ty p e ( i n t e g e r ke y In dex ) ret ur n s Ke y f r a m eIn ter p ol a ti on Ty p e
ke y In Sp a t i a lTan g e n t (i n te g e r ke y In dex ) re t u r n s Ar r ay O fF l o a t
ke y In Tem p or a l E as e( in te g er ke y In dex ) re tur n s Ar r ay Of Ke y f r a m eE a se
ke y Out In ter p ol at i on Ty p e( in te ger ke y In dex) ret ur n s Ke y f r a m eIn ter p ol a t ion Ty p e
ke y O u t Sp a t i a l Ta n g e n t ( i n t e g e r ke y In dex ) ret ur n s Ar r ay O fF l o a t
ke y O u t Tem p o r a l E a s e ( i n te g e r ke y In d ex ) re tur n s Ar r ay Of Ke y f r a m eE a se
ke y Rov i n g (i n teg e r ke y In dex ) re t u r n s b o o l e a n
ke y S e l e c t e d ( i n t e ger ke y In d e x ) ret ur n s b o o l e a n
ke y S p a t i a l Auto B ez i e r ( i n t e ge r ke y In d e x ) ret ur n s b o o l e a n
ke y Sp a t i a l Con t inu ou s ( in t e ge r ke y In d e x) ret u r n s b o o l e a n
ke y Te m p o r a l Au t o B e z i e r ( i n t e ger ke y In d e x ) ret ur n s b o o l e a n
ke y Tem p or a l Con t in uous ( in te ger ke y In dex) ret ur n s b o ol ea n
ke y Ti m e ( i n te g e r ke y In d ex ) re tu r n s f l o a t
ke y Ti m e ( s t r i n g m a r ker Na m e ) ret u r n s f l o a t
ke y Valu e ( in te ge r ke y In de x) ret u r n s t y p e - stored - i n - prop er t y
ke y Va lu e( s t r i n g m a r ke r Nam e ) re t u r n s t y p e- s tore d - i n - p rop e r t y
m a tch Na m e : s t r i n g : rea d O n l y

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

RQ Item St at us .UN QUE U E D


RQ Item St at us .US E R _ STO P PED
RQ Ite m St a t u s . W I L L _ C ON T I N U E
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == =
S e tt i n g s o b j e c t
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
g e t S e tt i n g ( s t r in g s e c t i o n Na m e , s t r in g s e c t i o n Ke y ) re t u r n s s t r i n g
h aveS e t t i n g ( s t r in g s e c t i o n Na m e , s t r i n g s e c t i o n Ke y ) re t u r n s b o o l e a n
s aveS e t t in g ( s t r i n g s e c ti o n Na m e , s t r in g s e c t i o n Ke y, s t r i n g n e w Va l u e ) n o re t u r n
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == =
Shape object
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
n e w S h a p e ( ) re tu r n s S h ap e
cl o se d : b o ol ea n : rea d/ w r i te
i n Ta n g e n t s : Ar r ay o f f l o a t [ 2 ] : rea d / w r i te
o u t Ta n gen t s : Ar r ay o f f l o a t [ 2 ] : rea d/ w r i te
ver t ice s : Ar r ay o f f lo a t [ 2 ] : rea d /w r i te
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == =
S o l i d 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
co lor : Ar r ay of fl o a t : 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 O n l y
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
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 O n ly
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 e r : rea d O n ly
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 O n ly
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == =
Sys tem ob j ec t
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
c al l Sy s te m ( st r i n g c m d L i n e To Exec tu te ) re tur n s o u t p u tO f Com m an d As St r i n g
ma chineNa m e : st r i ng : rea d Only
o s Nam e : s t r in g : re a d O n ly
o s Ver s i o n : s t r in g : rea d O n ly
u s e r Nam e : s t r i n g : rea d O n l y
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == =
Tex t D o c u m e n t o b j e c t
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
n e w Tex tD o c u m e n t (s t r i n g tex t ) re tur n s Tex tD o c u m e n t
text : s t r i ng : rea d /w r i te
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == =
Tim eco de Ba s eTy p e enum
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -

193
After Effects Object Summary

194

Tim eco de Ba s eTy p [Link] TO


Tim eco de Ba seTy p e.FPS100
Tim eco de Ba s eTy p e.F P S 24
Tim eco de Ba s eTy p e.F P S 25
Tim eco de Ba s eTy p e.F P S 30
Tim eco de Ba s eTy p e.F P S 48
Tim eco de Ba s eTy p e.F P S 50
Tim eco de Ba s eTy p e.F P S 60
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = ==
Tim e co de Di s p l ay Ty p e e nu m
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
Tim e co de Di s p l ay Ty p e .F E E T _ A N D_ F R A M E S
Tim e co de Di s p l ay Ty p e .F R A M E S
Tim e co de Di s p l ay Ty p e .T I M E C O DE
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == =
Tim eco de F il m Ty p e en um
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
Tim eco de F il m Ty p e .MM 16
Tim eco de F il m Ty p e .MM 35
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == =
Tr a ck Mat teTy p e enu m
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
Tr a ck Mat teTy p e. AL PH A
Tr a ck Ma t teTy p e . AL P H A _ I N V E RT E D
Tr a ck Mat teTy p e. LUM A
Tr a ck Ma t teTy p e . LU M A _ I N V E RT E D
Tr a ck Ma t teTy p e . N O _ T R AC K _ M AT T E
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == =
AutoO r ien t Ty p e enum
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
AutoO r ien t Ty p e.A LO N G _ PAT H
AutoO r ien t Ty p e. C A ME R A _ O R _ P O I N T _ O F _ I N T E RE S T
AutoO r ien t Ty p e.N O _ AUTO _ O R I E N T
= == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == =
Fr a m e Bl e n d i n g Ty p e e nu m
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
Fr am e Bl en d i n g Ty p e.F RAM E _ MI X
Fr a m e Bl e n d i n g Ty p e . N O_ F R A M E _ B L E N D
Fr a m e Bl e n d i n g Ty p e . P I X E L _ M OT I O N
- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -

194

También podría gustarte