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, EE.UU.
3
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
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
www. adobef orums. 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.
“Examples” en la página 174 para ver ejemplos de lo que pueden hacer las secuencias de comandos.
4
Introducción Edición de secuencias de comandos
4
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 www.ecma-
international.org. 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).
5
Introducción Activación de funciones de secuencias de comandos completas
5
• 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 Archi vo y Carpet 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 (al er t , conf i rm y prompt ).
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 Socket 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 http://www.adobe.com/es/devnet/.
Los archivos de secuencias de comandos de ExtendScript se diferencian por la extensión . j sx, una variación de
la extensión estándar . j s 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 . j sxbi n. 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:
6
Introducción Acceso y escritura de secuencias de comandos
6
• 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 . j sx 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.
7
Introducción Acceso y escritura de secuencias de comandos
7
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:
var myPanel = t hi s;
myPanel . add("but ton", [10, 10, 100, 30], "Tool #1");
myPanel . show();
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 unct i on createUI (t hi sObj ) {
var myPanel = t hi sObj ;
myPanel . add("but ton", [10, 10, 100, 30], "Tool #1");
ret urn myPanel ;
}
var myTool sPanel = creat eUI (t hi s);
myTool sPanel . show();
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 unct i on createUI (t hi sObj ) {
var myPanel = (t hi sObj i nst anceof Panel ) ? t hi sObj : new Wi ndow("pal et te", "My Tool s",
[100, 100, 300, 300]);
myPanel . add("but ton", [10, 10, 100, 30], "Tool #1");
ret urn myPanel ;
}
var myTool sPanel = creat eUI (t hi s);
myTool sPanel . show();
8
Introducción Envío de secuencias de comandos a After Effects desde el sistema
8
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
af t erf x. exe -s:
af t erf x. exe -s "al er t ("Acaba de envi ar una al er t a a Af ter Ef f ect s")"
También puede especificar la ubicación del archivo JSX que se va a ejecutar. Por ejemplo:
af t erf x. exe –r c: \ mi sDocumentos\ Scri pt s\ suAEScr i pt Here. j sx
af t erf x. exe -r "c: \ mi sDocumentos\ Scri pt s\ Nombre de Scr i pt con Spaces. j sx"
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:
tel l appl i cat i on "Adobe Af ter Ef f ect s CS3"
DoScr i pt "al er t (\ "Acaba de envi ar una al er t a a Af ter Ef f ect s\ ")"
end tel 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:
set t heFi l e to choose f i l e
tel l appl i cat i on "Adobe Af ter Ef f ect s CS3"
DoScr i pt t heFi l e
end tel 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:
(*
Est a secuenci a de comandos enví a l a sel ecci ón act ual a Af ter Ef f ect s como una secuenci a de comandos.
*)
9
Introducción Prueba y solución de problemas
9
tel l appl i cat i on “Text Edi t”
set t he_scri pt to sel ect i on as text
end tel l
tel l appl i cat i on "Adobe Af ter Ef f ect s CS3"
act i vate
DoScr i pt t he_scri pt
end tel 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 ECMA-262.pdf, disponible en www.ecma-international.org/publications/standards/
Ecma-262.htm.
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.
10
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
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.
Palabra clave/
instrucción
Descripción
break JavaScript estándar; cierra el bucle que se está ejecutando actualmente.
cont 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 swi tch.
def aul t Etiqueta que se utiliza en una instrucción swi tch cuando no se encuentra una etiqueta case.
do. . . whi l e Construcción estándar de JavaScript. Similar al bucle whi l e, salvo que la evaluación de la
condición del bucle se produce al final del mismo.
f al se Literal que representa el valor falso Booleano.
f or Construcción de bucle estándar de JavaScript.
f or. . . i n Construcción estándar de JavaScript. Proporciona una manera de desplazarse fácilmente por las
propiedades de un objeto.
f unct i on Se utiliza para definir una función.
i f / i f . . . el se Construcciones condicionales estándar de JavaScript.
new Instrucción de constructor estándar de JavaScript.
nul l Se asigna a una variable, elemento de conjunto o propiedad de objeto para indicar que no contiene
un valor válido.
ret urn Forma estándar de JavaScript de devolver un valor de una función o salir de una función.
swi t ch Forma estándar de JavaScript de evaluar una expresión de JavaScript e intentar corresponder el
valor de la expresión con una etiqueta case.
t hi s Método estándar de JavaScript para indicar el objeto actual.
t r ue Literal que representa el valor verdadero Booleano.
undef i ned Indica que todavía no se ha asignado un valor a la variable, elemento de conjunto o propiedad de
objeto.
var Sintaxis estándar de JavaScript que se utiliza para declarar una variable local.
whi l e Construcción estándar de JavaScript. Similar al bucle do. . . whi l e, salvo que la evaluación de la
condición del bucle se produce al principio del mismo.
wi t h Construcción estándar de JavaScript que se utiliza para especificar un objeto que se va a utilizar en
instrucciones posteriores.
11
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.
del ete Anula la asignación de un objeto.
t ypeof 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.
12
Introducción Más recursos para aprender a utilizar secuencias de comandos
12
Tabla 3 Prioridad de los operadores
–= 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.
Operadores (de mayor a menor prioridad) Asociatividad
[], (), . izquierda a derecha
new, del ete, – (negaci ón unari a), ! , t ypeof , voi d, ++, –– derecha a izquierda
*, / , % izquierda a derecha
+, – (rest 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
Operadores Descripción
13
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 ECMA-262. pdf , available at www.ecma-international.org/publications/standards/Ecma-
262.htm. For an overview of the most common keywords and statements available from ECMA-262, see
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.
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.
application
proìect settings
renderOueue ITEMS
ITEMSmay be any of the following 3 types of item:
item(s)
renderOueue|tem(s)
outputModule(s)
socket file folder system
folder|tem footage|tem
PROXY3OURCE PROXY3OURCE MAIN3OURCE
solidSource
color
fileSource
file
placeholderSource
layer(s)
properties
comp|tem
/2
/2
/2
/2
MAIN3OURCE& PROXY3OURCE
may be any of the following 3 types of item:
“JavaScript keywords and statement syntax” on page 10.
14
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 (app), 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.
15
JavaScript Reference The After Effects Object Model
15
“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
page 103
Encapsulates mask attributes in a layer.
“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.
Object Description
16
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.
Additional global functions for standard user I/O (al er t , conf i rm, and prompt ) 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 earOut put ()
Description
Clears the output in the Info panel.
Parameters
None.
Returns
Nothing.
currentFormatToTime() global function
cur rent Format ToTi me(f or mat t edTi me, f ps , i s Durat i on)
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 0:00:12 (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
Global function Description
cl earOut put () Clears text from the Info panel.
cur rent Format ToTi me() Converts string time value to a numeric time value.
t i meToCur rent For mat () Converts a numeric time value to a string time value.
wr i t e() Writes text to the Info panel, with no line break added.
wr i t eLn() Writes text to the Info panel, adding a line break at the end.
f ormat tedTi me The frame time value, a string specifying a number of frames in the project’s current time display format.
17
JavaScript Reference Global functions
17
Returns
Floating-point value, the number of seconds.
timeToCurrentFormat() global function
t i meToCur rent For mat (t i me, f ps , i s Durat 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 0:00:12 (when the project is set to Display Timecode). If the frame
rate is 30 fps, the frame would be 0:00:15. 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
Returns
String in the project’s current time display format.
write() global function
wr i t e(t ext )
Description
Writes output to the Info panel, with no line break added.
Parameters
Returns
Nothing.
Example
wr i t e("Thi s text appears i n Inf o panel ");
wr i t e("wi t h more on same l i ne. ");
f ps The frames-per-second, a floating-point value.
i sDurat i on 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.
t i me The number of seconds, a floating-point value.
f ps The frames-per-second, a floating-point value.
i sDurat i on 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.
text The string to display. Truncated if too long for the Info panel.
18
JavaScript Reference Global functions
18
writeLn() global function
wr i t eLn(t ext )
Description
Writes output to the Info panel and adds a line break at the end.
Parameters
Returns
Nothing.
Example
wr i t el n("Thi s text appears on f i rst l i ne");
wr i t el n("Thi s text appears on second l i ne");
text The string to display.
19
JavaScript Reference Application object
19
Application object
app
Description
Provides access to objects and application settings within the After Effects application. The single global object
is always available by its name, app.
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 ect “Application project attribute” on
page 28 and “Project object” on
page 110
The current After Effects project.
l anguage “Application language attribute” on
page 24
The language in which the application is running.
versi on “Application version attribute” on
page 30
The version number of the After Effects application.
bui l dName “Application buildName attribute” on
page 21
The name of this build of the application.
bui l dNumber “Application buildNumber attribute” on
page 22
The number of this build of the application.
i sWatchFol der “Application isWatchFolder attribute”
on page 24
When true, the local application is running in Watch
Folder mode.
i sRenderEngi ne “Application isRenderEngine attribute”
on page 24
When true, the local After Effects application is running
as a render engine.
set t i ngs “Application settings attribute” on
page 30 and “RQItemCollection object”
on page 162
Application settings that can be set via scripting.
onEr ror “Application onError attribute” on
page 26
A callback function that is called when an error occurs
in the application.
exi t Code “Application exitCode attribute” on
page 24
A numeric status code used when executing a script
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.
exi t Af terLaunchAndEval “Application exitAfterLaunchAndEval
attribute” on page 23
When true, the application remains open after running
a script from the command line on Windows.
saveProj ect OnCr ash “Application saveProjectOnCrash
attribute” on page 28
When true, the project is saved if the application closes
unexpectedly.
memor yInUse “Application memoryInUse attribute” on
page 25
Memory in use by this application.
20
JavaScript Reference Application object
20
Methods
Application activate() method
app. act i vate()
Description
Opens the application main window if it is minimized or iconified, and brings it to the front of the desktop.
Parameters
None.
Method Reference Description
newProj ect () “Application newProject() method” on
page 25
Creates a new project in After Effects.
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.
watchFol der() “Application watchFolder() method” on
page 30
Starts Watch Folder mode; does not return
until Watch Folder mode is turned off.
pauseWatchFol der() “Application pauseWatchFolder() method”
on page 27
Pauses a current watch-folder process.
endWatchFol der() “Application endWatchFolder() method” on
page 23
Ends a current watch-folder process.
purge() “Application purge() method” on page 28 Purges a targeted type of cached information
(replicates Purge options in the Edit menu).
begi nUndoGroup() “Application beginUndoGroup() method”
on page 21
Groups the actions that follow it into a single
undoable step.
endUndoGroup() “Application endUndoGroup() method” on
page 22
Ends an undo group; needed only when a
script contains more than one undo group.
begi nSuppressDi al ogs() “Application beginSuppressDialogs()
method” on page 21
Begins suppression of dialogs in the user inter-
face.
endSuppressDi al ogs() “Application endSuppressDialogs()
method” on page 22
Ends suppression of dialogs in the user inter-
face.
set Memor yUsageLi mi t s() “Application setMemoryUsageLimits()
method” on page 29
Sets memory usage limits as in the Memory &
Cache preferences area.
set SavePref erencesOnQui t () “Application setSavePreferencesOnQuit()
method” on page 29
Sets whether preferences are saved when the
application is quit.
act i vate() “Application activate() method” on page 20 Brings the After Effects main window to the
front of the screen.
schedul eTask() “Application scheduleTask() method” on
page 29
Schedules a JavaScript script for delayed exe-
cution.
cancel Task() “Application cancelTask() method” on
page 22
Cancels a scheduled task.
parseSwatchFi l e() “Application parseSwatchFile() method” on
page 27
Loads a color swatch from an Adobe Swatch
Exchange (ASE) file.
21
JavaScript Reference Application object
21
Returns
Nothing.
Application beginSuppressDialogs() method
app. begi nSuppressDi al ogs()
Description
Begins suppression of script error dialog boxes in the user interface. Use endSuppressDi al ogs() to resume the
display of error dialogs. See “Application endSuppressDialogs() method” on page 22.
Parameters
None.
Returns
Nothing.
Application beginUndoGroup() method
app. begi nUndoGroup(undoSt r i ng)
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 endUndoGroup() method to mark
the end of the group. (See “Application endUndoGroup() method” on page 22.)
begi nUndoGroup() and endUndoGroup() 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
Returns
Nothing.
Application buildName attribute
app. bui l dName
Description
The name of the build of After Effects being run, used internally by Adobe for testing and troubleshooting.
Type
String; read-only.
undoSt r i ng The text that will appear for the Undo command in the Edit menu (that is, “Undo <undoSt ri ng>”)
22
JavaScript Reference Application object
22
Application buildNumber attribute
app. bui l dNumber
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
app. cancel Task(t as kI D)
Description
Removes the specified task from the queue of tasks scheduled for delayed execution.
Parameters
Returns
Nothing.
Application endSuppressDialogs() method
app. endSuppressDi al ogs(al er 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 begi nSuppressDi al ogs() has previously been called. See “Application beginSuppress-
Dialogs() method” on page 21.
Parameters
Returns
Nothing.
Application endUndoGroup() method
app. endUndoGroup()
Description
Marks the end of an undo group begun with the app. begi nUndoGroup() 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.
t askI D An integer that identifies the task, as returned by app. schedul eTask().
al er t Boolean; when true, errors that have occurred following the call to begi nSuppressDi al ogs() are displayed in a
dialog box.
23
JavaScript Reference Application object
23
Calling this method without having set a begi nUndoGroup() method yields an error.
Parameters
None.
Returns
Nothing.
Application endWatchFolder() method
app. endWatchFol 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
app. exi t Af t erLaunchAndEval
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.
24
JavaScript Reference Application object
24
Application exitCode attribute
app. exi t Code
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 terf x or af terf x –m command), and a script was specified with the –r or –s option.
• in Mac OS, the value is returned as the AppleScript DoScri pt result for each script.
In both Mac OS and Windows, the value is set to 0 (EXIT_SUCCESS) 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
app. exi t Code = 2; / / on qui t , i f val ue i s 2, an er ror has occurred
Application isRenderEngine attribute
app. i sRenderEngi ne
Description
True if After Effects is running as a render engine.
Type
Boolean; read-only.
Application isWatchFolder attribute
app. i sWat chFol 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
app. l anguage
Description
The language After Effects is running.
25
JavaScript Reference Application object
25
Type
A Language enumerated value; read-only. One of:
Language. ENGLI SH
Language. FRENCH
Language. GERMAN
Language. I TALI AN
Language. JAPANESE
Language. SPANI SH
Example
var l ang = app. l anguage;
i f (l ang == Language. ENGLISH)
al er t ("Af ter Ef f ect s i s runni ng i n Engl i sh. ");
el se i f (l ang == Language. FRENCH)
al er t ("Af ter Ef f ect s i s runni ng i n French. ");
el se
al er t ("Af ter Ef f ect s i s not runni ng i n Engl i sh or French. ");
Application memoryInUse attribute
app. memor yInUse
Description
The number of bytes of memory currently used by this application.
Type
Number; read-only.
Application newProject() method
app. newProj ect ()
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 app. proj ect . cl ose(Cl oseOp-
t i ons. DO_NOT_SAVE_CHANGES) 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
app. proj ect . cl ose(Cl oseOpt i ons. DO_NOT_SAVE_CHANGES);
app. newProj ect ();
26
JavaScript Reference Application object
26
Application onError attribute
app. onError
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 unct i on er r(errSt ri ng) {
al er t (er rSt r i ng);
}
app. onError = er r ;
Application open() method
app. open()
app. open(f i l e)
Description
Opens a project.
Parameters
Returns
A new Project object for the specified project, or null if the user cancels the Open dialog box.
Example
var my_f i l e = new Fi l e(". . / my_f ol der/ my_test . aep");
i f (my_f i l e. exi st s){
new_proj ect = app. open(my_f i l e);
i f (new_proj ect ){
al er t (new_proj ect . f i l e. name);
}
}
f i l e Optional. An ExtendScript File object for the project file to open. If not supplied, the method prompts the
user to select a project file.
27
JavaScript Reference Application object
27
Application parseSwatchFile() method
app. parseSwat chFi l e(f i l e)
Description
Loads color swatch data from an Adobe Swatch Exchange (ASE) file.
Parameters
Returns
The swatch data, in this format:
Application pauseWatchFolder() method
app. pauseWat chFol der(paus e)
Description
Pauses or resumes the search of the target watch folder for items to render.
Parameters
Returns
Nothing.
f i l e The file specification, an ExtendScript Fi l e object.
dat a. maj orVersi on
dat a. mi norVersi on
The ASE version number.
dat a. val ues An array of SwatchVal ue.
SwatchVal ue. t ype One of "RGB", "CMYK", "LAB", "Gr ay"
SwatchVal ue. r
SwatchVal ue. g
SwatchVal ue. b
When t ype = "RGB", the color values in the range [0.0..1.0].
0, 0, 0 is Black.
SwatchVal ue. c
SwatchVal ue. m
SwatchVal ue. y
SwatchVal ue. k
When t ype = "CMYK", the color values in the range [0.0..1.0].
0, 0, 0, 0 is White.
SwatchVal ue. L
SwatchVal ue. a
SwatchVal ue. b
When t ype = "LAB", the color values.
L is in the range [0.0..1.0]. a and b are in the range [-128.0..+128.0]
0, 0, 0 is Black.
SwatchVal ue. val ue When t ype = "Gray", the val ue range is [0.0..1.0].
0.0 is Black.
pause True to pause, false to resume.
28
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
app. proj ect
Description
The project that is currently loaded. See “Project object” on page 110.
Type
Project object; read-only.
Application purge() method
app. purge(t arget )
Description
Purges unused data of the specified types from memory. Replicates the Purge options in the Edit menu.
Parameters
Returns
Nothing.
Application quit() method
app. qui t ()
Description
Quits the After Effects application.
Parameters
None.
Returns
Nothing.
Application saveProjectOnCrash attribute
app. saveProj ect OnCrash
t arget The type of elements to purge from memory; a PurgeTarget enumerated value, one of:
• PurgeTarget . ALL_CACHES: Purges all data that After Effects has cached to physical memory.
• PurgeTarget . UNDO_CACHES: Purges all data saved in the undo cache.
• PurgeTarget . SNAPSHOT_CACHES: Purges all data cached as comp/layer snapshots.
• PurgeTarget . IMAGE_CACHES: Purges all saved image data.
29
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
app. schedul eTask(s t r i ngToExecut e, del ay, repeat )
Description
Schedules the specified JavaScript for delayed execution.
Parameters
Returns
Integer, a unique identifier for this task, which can be used to cancel it with app. cancel Task().
Application setMemoryUsageLimits() method
app. set Memor yUsageLi mi t s(i mageCachePercent age, maxi mumMemor yPercent 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
Returns
Nothing.
Application setSavePreferencesOnQuit() method
app. set SavePref erencesOnQui t (doSave)
Description
Set or clears the flag that determines whether preferences are saved when the application is closed.
st r i ngToExecut e A string containing JavaScript to be executed.
del ay A number of milliseconds to wait before executing the JavaScript. A floating-point value.
repeat When true, execute the script repeatedly, with the specified delay between each execution. When false
the script is executed only once.
i mageCachePercent age Floating-point value, the percentage of memory assigned to image cache.
maxi mumMemor yPercent age Floating-point value, the maximum usable percentage of memory.
30
JavaScript Reference Application object
30
Parameters
Returns
Nothing.
Application settings attribute
app. set t i ngs
Description
The currently loaded settings. See “Settings object” on page 163.
Type
Settings object; read-only.
Application version attribute
app. versi on
Description
An alphanumeric string indicating which version of After Effects is running.
Type
String; read-only.
Example
var ver = app. versi on;
al er t ("Thi s machi ne i s runni ng versi on " + ver + " of Af ter Ef f ect s. ");
Application watchFolder() method
app. watchFol der(f ol der_obj ect _t o_wat ch)
Description
Starts a Watch Folder (network rendering) process pointed at a specified folder.
Parameters
Returns
Nothing.
Example
var t heFol der = new Fol der(“c: / tool ”);
app. watchFol der(t heFol der);
doSave When true, preferences saved on quit, when false they are not.
f ol der_obj ect _to_watch The ExtendScript Folder object for the folder to watch.
31
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
32
JavaScript Reference AVItem object
32
AVItem object
app. proj ect . i tem(i ndex)
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
Methods
Attribute Reference Description
name “AVItem name attribute” on page 35 The name of the object as shown in the Project panel.
wi dt h “AVItem width attribute” on page 38 The width of the item.
hei ght “AVItem height attribute” on page 34 The height of the item.
pi xel Aspect “AVItem pixelAspect attribute” on page 35 The pixel aspect ratio of the item.
f rameRate “AVItem frameRate attribute” on page 34 The frame rate of the item.
f rameDurat i on “AVItem frameDuration attribute” on page 33 The frame duration for the item.
durat i on “AVItem duration attribute” on page 33 The total duration of the item.
useProxy “AVItem useProxy attribute” on page 38 When true, a proxy source is used for this item.
proxySource “AVItem proxySource attribute” on page 35 The FootageItem object used as proxy for the item.
t i me “AVItem time attribute” on page 38 Current time of the item.
usedIn “AVItem usedIn attribute” on page 38 The CompItem objects that use this item.
hasVi deo “AVItem hasVideo attribute” on page 34 When true, the item has a video component.
hasAudi o “AVItem hasAudio attribute” on page 34 When true, the item has an audio component.
f oot ageMi ssi ng “AVItem footageMissing attribute” on
page 33
When true, the item cannot be found or is a placeholder.
Method Reference Description
set Proxy() “AVItem setProxy() method” on page 36 Sets a proxy for the item.
set ProxyWi t hSequence() “AVItem setProxyWithSequence() method” on
page 37
Sets a sequence as a proxy for the item.
set ProxyWi t hSol i d() “AVItem setProxyWithSolid() method” on
page 37
Sets a solid as a proxy for the item.
set ProxyWi t hPl acehol der() “AVItem setProxyWithPlaceholder() method” on
page 36
Sets a placeholder as a proxy for the item.
set ProxyToNone() “AVItem setProxyToNone() method” on page 36 Removes the proxy for the item.
33
JavaScript Reference AVItem object
33
AVItem duration attribute
app. proj ect . i tem(i ndex). durat i on
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 durat i on of the composition, and is read/write.
• In a FootageItem, the value is linked to the dur at i on of the mai nSource 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
app. proj ect . i tem(i ndex). f oot ageMi ssi ng
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 mi ssi ngFoot agePat 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
app. proj ect . i tem(i ndex). f rameDur at i on
Description
Returns the length of a frame for this AVItem, in seconds. This is the reciprocal of f rameRate. When set, the
reciprocal is automatically set as a new f rameRate value.
This attribute returns the reciprocal of the f rameRate, 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 mai nSource, and is read-only. To change it, set the
conf or mFrameRate of the mai nSource object. This sets both the f rameRate and f rameDur at i on of the
FootageItem.
Type
Floating-point value in the range [1/99.. 1.0]; read-only for a FootageItem, otherwise read/write.
34
JavaScript Reference AVItem object
34
AVItem frameRate attribute
app. proj ect . i tem(i ndex). f rameRate
Description
The frame rate of the AVItem, in frames-per-second. This is the reciprocal of the f rameDurat i on. When set,
the reciprocal is automatically set as a new f rameDurat i on value.
• In a CompItem, the value is linked to the f rameRate of the composition, and is read/write.
• In a FootageItem, the value is linked to the f rameRate of the mai nSource object, and is read-only. To change
it, set the conf ormFr ameRat e of the mai nSource object. This sets both the f r ameRat e and f r ameDurat i 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
app. proj ect . i tem(i ndex). hasAudi 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 mai nSource object.
Type
Boolean; read-only.
AVItem hasVideo attribute
app. proj ect . i tem(i ndex). hasVi deo
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 mai nSource object.
Type
Boolean; read-only.
AVItem height attribute
app. proj ect . i tem(i ndex). hei ght
Description
The height of the item in pixels.
• In a CompItem, the value is linked to the composition, and is read/write.
35
JavaScript Reference AVItem object
35
• In a FootageItem, the value is linked to the mai nSource object, and is read/write only if the mai nSource
object is a SolidSource. Otherwise, it is read-only.
Type
Integer in the range [1...30000]; read/write, except as noted.
AVItem name attribute
app. proj ect . i tem(i ndex). name
Description
The name of the item, as shown in the Project panel.
• In a FootageItem, the value is linked to the mai nSource object. If the mai nSource 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
app. proj ect . i tem(i ndex). pi xel Aspect
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 mai nSource object.
Certain pi xel Aspect 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. 07, 1. 42, 2, 0. 95, 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
app. proj ect . i tem(i ndex). proxySource
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: set Proxy(), set ProxyWi t hSequence(), set ProxyWi t hSol i d(), or
set ProxyWi t hPl acehol der().
Type
FootageSource object; read-only.
36
JavaScript Reference AVItem object
36
AVItem setProxy() method
app. proj ect . i tem(i ndex). set Proxy(f i l e)
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 proxySource attribute, and sets useProxy to true. It does not preserve the interpretation parameters,
instead using the user preferences. If the file has an unlabeled alpha channel, and the user preference says to
ask the user what to do, the method estimates the alpha interpretation, rather than asking the user.
This differs from setting a FootageItem's main source, but both actions are performed as in the user interface.
Parameters
Returns
None.
AVItem setProxyToNone() method
app. proj ect . i tem(i ndex). set ProxyToNone()
Description
Removes the proxy from this AVItem, sets the value of proxySource to null, and sets the value of useProxy to
f al se.
Parameters
None.
Returns
Nothing.
AVItem setProxyWithPlaceholder() method
app. proj ect . i tem(i ndex). set ProxyWi t hPl acehol der(name, wi dt h, he i ght , f rameRat e, durat i on)
Description
Creates a PlaceholderSource object with specified values, sets this as the value of the proxySource attribute,
and sets useProxy 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
f i l e An ExtendScript File object for the file to be used as a proxy.
name A string containing the name of the new object.
wi dt h, hei ght The pixel dimensions of the placeholder, an integer in the range [4..30000].
f rameRate The frames-per-second, an integer in the range [1..99].
37
JavaScript Reference AVItem object
37
Returns
Nothing.
AVItem setProxyWithSequence() method
app. proj ect . i tem(i ndex). set ProxyWi t hSequence(f i l e, f orceAl phabet i cal )
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 proxySource attribute, and sets
useProxy 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
Returns
Nothing.
AVItem setProxyWithSolid() method
app. proj ect . i tem(i ndex). set ProxyWi t hSol i d(col or, name, wi dt h, hei ght , pi xel As pect )
Description
Creates a SolidSource object with specified values, sets this as the value of the proxySource attribute, and sets
useProxy 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
Returns
Nothing.
durat i on The total length in seconds, up to 3 hours. An integer in the range [0.0..10800.0].
f i l e An ExtendScript File object for the first file in the sequence.
f orceAl phabet i cal When true, use the “Force alphabetical order” option.
col or 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.
wi dt h, hei ght The pixel dimensions of the placeholder, an integer in the range [1...30000].
pi xel Aspect The pixel aspect of the solid, a floating-point value in the range [0.01... 100.0].
38
JavaScript Reference AVItem object
38
AVItem time attribute
app. proj ect . i tem(i ndex). t i me
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 meToCur rent Format 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 mai nSource is still (i t em.mai nSource. i sSt i l l is true).
Type
Floating-point value; read/write.
AVItem usedIn attribute
app. proj ect . i tem(i ndex). usedIn
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
app. proj ect . i tem(i ndex). useProxy
Description
When true, a proxy is used for the item. It is set to true by all the Set Proxy methods, and to false by the
Set ProxyToNone() method.
Type
Boolean; read/write.
AVItem width attribute
app. proj ect . i tem(i ndex). wi dt h
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 mai nSource object, and is read/write only if the mai nSource
object is a SolidSource. Otherwise, it is read-only.
39
JavaScript Reference AVItem object
39
Type
Integer in the range [1...30000]; read/write, except as noted.
40
JavaScript Reference AVLayer object
40
AVLayer object
app. proj ect . i tem(i ndex). l ayer(i ndex)
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:
Marker
Ti me Remap
Mot i on Tr ackers
Masks
Ef f ect s
Transf orm
Anchor Poi nt
Posi t i on
Scal e
Ori ent at i on
X Rot at i on
Y Rot at i on
Rot at i on
Opaci t y
Layer St yl es
Mater i al Opt i ons
Cast s Shadows
Li ght Transmi ssi on
Accept s Shadows
Accept s Li ght s
Ambi ent
Di f f use
Specul ar
Shi ni ness
Met al
Audi o
Audi o Level 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 qual i t y, st ar t Ti me, and i nPoi nt .
var f i rst Layer = app. proj ect . i tem(1). l ayer(1);
f i rst Layer. qual i t y = LayerQual i t y. BEST;
f i rst Layer. st ar t Ti me = 1;
41
JavaScript Reference AVLayer object
41
f i rst Layer. i nPoi nt = 2;
Attributes
Attribute Reference Description
source “AVLayer source attribute” on page 48 The source item for this layer.
i sNameFromSource “AVLayer isNameFromSource attribute”
on page 47
When true, the layer has no expressly set name,
but contains a named source.
hei ght “AVLayer height attribute” on page 47 The height of the layer.
wi dt h “AVLayer width attribute” on page 50 The width of the layer.
audi oEnabl ed “AVLayer audioEnabled attribute” on
page 43
When true, the layer's audio is enabled.
mot i onBl ur “AVLayer motionBlur attribute” on
page 47
When true, the layer's motion blur is enabled.
ef f ect sAct i ve “AVLayer effectsActive attribute” on
page 45
When true, the layer's effects are active.
adj ust ment Layer “AVLayer adjustmentLayer attribute” on
page 42
When true, this is an adjustment layer.
gui deLayer “AVLayer guideLayer attribute” on
page 46
When true, this is a guide layer.
t hreeDLayer “AVLayer threeDLayer attribute” on
page 49
When true, this is a 3D layer.
t hreeDPerChar “AVLayer threeDPerChar attribute” on
page 49
When true, 3D is set on a per-character basis in
this text layer.
canSet Col l apseTr ansf ormat i on “AVLayer canSetCollapseTransformation
attribute” on page 45
When true, it is legal to change the value of
col l apseTransf or mat i on.
col l apseTransf ormat i on “AVLayer collapseTransformation
attribute” on page 45
When true, collapse transformation is on.
f rameBl endi ng “AVLayer frameBlending attribute” on
page 46
When true, frame blending is enabled.
f rameBl endi ngType “AVLayer frameBlendingType attribute”
on page 46
The type of frame blending for the layer.
canSet Ti meRemapEnabl ed “AVLayer canSetTimeRemapEnabled
attribute” on page 45
When true, it is legal to change the value of
t i meRemapEnabl ed.
t i meRemapEnabl ed “AVLayer timeRemapEnabled attribute”
on page 49
When true, time remapping is enabled on this
layer.
hasAudi o “AVLayer hasAudio attribute” on
page 46
When true, the layer contains an audio compo-
nent.
audi oAct i ve “AVLayer audioActive attribute” on
page 42
When true, the layer's audio is active at the cur-
rent time.
bl endi ngMode “AVLayer blendingMode attribute” on
page 43
The blending mode of the layer.
preser veTransparency “AVLayer preserveTransparency
attribute” on page 48
When true, preserve transparency is enabled.
t r ackMat teType “AVLayer trackMatteType attribute” on
page 50
if layer has a track matte, specifies the way it is
applied.
42
JavaScript Reference AVLayer object
42
Methods
AVLayer adjustmentLayer attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). adj ust ment Layer
Description
True if the layer is an adjustment layer.
Type
Boolean; read/write.
AVLayer audioActive attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). audi oAct i ve
Description
True if the layer's audio is active at the current time.
For this value to be true, audi oEnabl 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 nPoi nt and out Poi nt of this layer.
Type
Boolean; read-only.
i sTrackMat te “AVLayer isTrackMatte attribute” on
page 47
When true, this layer is being used as a track
matte for the layer below it.
hasTrackMat te “AVLayer hasTrackMatte attribute” on
page 46
When true, the layer above is being used as a
track matte on this layer.
qual i t y “AVLayer quality attribute” on page 48 The layer quality setting.
aut oOri ent “AVLayer autoOrient attribute” on
page 43
The type of automatic orientation for the layer.
Method Reference Description
audi oAct i veAt Ti me() “AVLayer audioActiveAtTime() method”
on page 43
Reports whether this layer's audio is
active at a given time.
cal cul ateTransf ormFromPoi nt s() “AVLayer calculateTransformFrom-
Points() method” on page 44
Calculates a transformation from a set of
points in this layer.
repl aceSource() “AVLayer replaceSource() method” on
page 48
Changes the source item for this layer.
sourceRect At Ti me() “AVLayer sourceRectAtTime() method”
on page 49
Retrieves the source rectangle of a layer.
Attribute Reference Description
43
JavaScript Reference AVLayer object
43
AVLayer audioActiveAtTime() method
app. proj ect . i tem(i ndex). l ayer(i ndex). audi oAct i veAt Ti me(t i me)
Description
Returns true if this layer's audio will be active at the specified time.
For this method to return true, audi oEnabl 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 nPoi nt and out Poi nt of this layer.
Parameters
Returns
Boolean.
AVLayer audioEnabled attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). audi oEnabl ed
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
app. proj ect . i tem(i ndex). l ayer(i ndex). autoOr i ent
Description
The type of automatic orientation to perform for the layer.
Type
An AutoOri ent Type enumerated value; read/write. One of:
AutoOr i ent Type. ALONG_PATH
AutoOr i ent Type. CAMERA_OR_POI NT_OF_I NTEREST
AutoOr i ent Type. NO_AUTO_ORI ENT
AVLayer blendingMode attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). bl endi ngMode
Description
The blending mode of the layer.
Type
A Bl endi ngMode enumerated value; read/write. One of:
t i me The time, in seconds. A floating-point value.
44
JavaScript Reference AVLayer object
44
Bl endi ngMode. ADD
Bl endi ngMode. ALPHA_ADD
Bl endi ngMode. CLASSI C_COLOR_BURN
Bl endi ngMode. CLASSI C_COLOR_DODGE
Bl endi ngMode. CLASSI C_DI FFERENCE
Bl endi ngMode. COLOR
Bl endi ngMode. COLOR_BURN
Bl endi ngMode. COLOR_DODGE
Bl endi ngMode. DANCI NG_DI SSOLVE
Bl endi ngMode. DARKEN
Bl endi ngMode. DARKER_COLOR
Bl endi ngMode. DI FFERENCE
Bl endi ngMode. DI SSOLVE
Bl endi ngMode. EXCLUSI ON
Bl endi ngMode. HARD_LI GHT
Bl endi ngMode. HARD_MI X
Bl endi ngMode. HUE
Bl endi ngMode. LI GHTEN
Bl endi ngMode. LI GHTER_COLOR
Bl endi ngMode. LI NEAR_BURN
Bl endi ngMode. LI NEAR_DODGE
Bl endi ngMode. LI NEAR_LI GHT
Bl endi ngMode. LUMI NESCENT_PREMUL
Bl endi ngMode. LUMI NOSI TY
Bl endi ngMode. MULTI PLY
Bl endi ngMode. NORMAL
Bl endi ngMode. OVERLAY
Bl endi ngMode. PI N_LI GHT
Bl endi ngMode. SATURATI ON
Bl endi ngMode. SCREEN
Bl endi ngMode. SI LHOUETE_ALPHA
Bl endi ngMode. SI LHOUETTE_LUMA
Bl endi ngMode. SOFT_LI GHT
Bl endi ngMode. STENCI L_ALPHA
Bl endi ngMode. STENCI L_LUMA
Bl endi ngMode. VIVID_LIGHT
AVLayer calculateTransformFromPoints() method
app. proj ect . i tem(i ndex). l ayer(i ndex). cal cul at eTransf ormFromPoi nt s(poi nt TopLef t , poi nt TopRi ght , poi nt -
Bot t omRi ght )
Description
Calculates a transformation from a set of points in this layer.
Parameters
poi nt TopLef t The top left point coordinates in the form of an array, [x, y, z].
poi nt TopRi ght The top right point coordinates in the form of an array, [x, y, z].
poi nt Bot tomRi ght The bottom right point coordinates in the form of an array, [x, y, z].
45
JavaScript Reference AVLayer object
45
Returns
An Object with the transformation properties set.
Example
var newLayer = comp. l ayers. add(newFoot age);
newLayer. t hreeDLayer = t rue;
newLayer. bl endi ngMode = Bl endi ngMode. ALPHA_ADD;
var t r ansf orm = newLayer. cal cul at eTr ansf ormFromPoi nt s(t l , t r, bl );
f or(var sel i n t r ansf orm) {
newLayer. t ransf orm[sel ]. set Val ue(t ransf orm[sel ]);
}
AVLayer canSetCollapseTransformation attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). canSet Col l apseTransf ormat i on
Description
True if it is legal to change the value of the col l apseTransf ormat i on attribute on this layer.
Type
Boolean; read-only.
AVLayer canSetTimeRemapEnabled attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). canSet Ti meRemapEnabl ed
Description
True if it is legal to change the value of the t i meRemapEnabl ed attribute on this layer.
Type
Boolean; read-only.
AVLayer collapseTransformation attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). col l apseTransf ormat i on
Description
True if collapse transformation is on for this layer.
Type
Boolean; read/write.
AVLayer effectsActive attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). ef f ect sAct i ve
Description
True if the layer's effects are active, as indicated by the <f> icon next to it in the user interface.
46
JavaScript Reference AVLayer object
46
Type
Boolean; read/write.
AVLayer frameBlending attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). f r ameBl endi ng
Description
True if frame blending is enabled for the layer.
Type
Boolean; read-only.
AVLayer frameBlendingType attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). f r ameBl endi ngType
Description
The type of frame blending to perform when frame blending is enabled for the layer.
Type
A FrameBl endi ngType enumerated value; read/write. One of:
Fr ameBl endi ngType. FRAME_MIX
Fr ameBl endi ngType. NO_FRAME_BLEND
Fr ameBl endi ngType. PI XEL_MOTION
AVLayer guideLayer attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). gui deLayer
Description
True if the layer is a guide layer.
Type
Boolean; read/write.
AVLayer hasAudio attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). hasAudi 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
app. proj ect . i tem(i ndex). l ayer(i ndex). hasTrackMat te
47
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 rack-
Mat t eType value controls how the matte is applied.
Type
Boolean; read-only.
AVLayer height attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). hei ght
Description
The height of the layer in pixels.
Type
Floating-point; read-only.
AVLayer isNameFromSource attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). i sNameFromSource
Description
True if the layer has no expressly set name, but contains a named source. In this case, l ayer. name has the same
value as l ayer. source. name.
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
app. proj ect . i tem(i ndex)l ayer(i ndex). i sTr ackMat t e
Description
True if this layer is being used as a track matte for the layer behind it.
Type
Boolean; read-only.
AVLayer motionBlur attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). mot i onBl ur
Description
True if motion blur is enabled for the layer.
Type
Boolean; read/write.
48
JavaScript Reference AVLayer object
48
AVLayer preserveTransparency attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). preser veTr ansparency
Description
True if preserve transparency is enabled for the layer.
Type
Boolean; read/write.
AVLayer quality attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). qual i t y
Description
The quality with which this layer is displayed.
Type
A LayerQual i t y enumerated value; read/write. One of:
LayerQual i t y. BEST
LayerQual i t y. DRAFT
LayerQual i t y. WIREFRAME
AVLayer replaceSource() method
app. proj ect . i tem(i ndex). l ayer(i ndex). repl aceSource (newSource, f i xExpress i ons )
Description
Replaces the source for this layer.
Parameters
Returns
Nothing.
AVLayer source attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). source
Description
The source AVItem for this layer. The value is null in a Text layer. Use AVLayer. repl aceSource() to change the
value.
Type
AVItem object; read-only.
newSource The new source AVItem object.
f i xExpressi ons True to adjust expressions for the new source, f al 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.
49
JavaScript Reference AVLayer object
49
AVLayer sourceRectAtTime() method
app. proj ect . i tem(i ndex). l ayer(i ndex). sourceRect At Ti me(t i meT, ext ent 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
Returns
A JavaScript object with four attributes, [top, l ef t , wi dt h, hei ght ].
AVLayer threeDLayer attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). t hreeDLayer
Description
True if this is a 3D layer.
Type
Boolean; read/write.
AVLayer threeDPerChar attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). t hreeDPerChar
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
app. proj ect . i tem(i ndex). l ayer(i ndex). t i meRemapEnabl ed
Description
True if time remapping is enabled for this layer.
Type
Boolean; read/write.
t i meT The time index, in seconds. A floating-point value.
ext ent s True to include the extents, f al se otherwise. Extents apply to shape layers, increasing the size of
the layer bounds as necessary.
50
JavaScript Reference AVLayer object
50
AVLayer trackMatteType attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). t rackMat teType
Description
If this layer has a track matte, specifies the way the track matte is applied.
Type
A TrackMat teType enumerated value; read/write. One of:
TrackMat teType. ALPHA
TrackMat teType. ALPHA_INVERTED
TrackMat teType. LUMA
TrackMat teType. LUMA_INVERTED
TrackMat teType. NO_TRACK_MATTE
AVLayer width attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). wi dt h
Description
The width of the layer in pixels.
Type
Floating-point; read-only.
51
JavaScript Reference CameraLayer object
51
CameraLayer object
app. proj ect . i tem(i ndex). l ayer(i ndex)
Description
The CameraLayer object represents a camera layer within a composition. Create it using the LayerCollection
object’s addCamer 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:
Marker
Transf orm
Poi nt of Interest
Posi t i on
Scal e
Ori ent at i on
X Rot at i on
Y Rot at i on
Rot at i on
Opaci t y
Camera Opt i ons
Zoom
Dept h of Fi el d
Focus Di st ance
Bl ur Level
52
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
Attributes
Methods
Object Reference Description
ItemCol l ect i on “ItemCollection object” on page 80 All of the items (imported files, folders, solids, and so on) found in
the Project panel.
LayerCol l ect i on “LayerCollection object” on
page 93
All of the layers in a composition.
OMCol l ect i on “OMCollection object” on page 105 All of the Output Module items in the project.
RQIt emCol l ect i on “RenderQueueItem object” on
page 156
All of the render-queue items in the project.
l engt h The number of objects in the collection.
[] Retrieves an object in the collection by its index number. The first object is at index 1.
53
JavaScript Reference CompItem object
53
CompItem object
app. proj ect . i tem(i ndex)
app. proj ect . i tems[i ndex]
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 tem 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.
var f i rst Comp = app. proj ect . i tem(1);
al er t ("number of l ayers i s " + f i rst Comp. numLayers);
al er t ("name of l ast l ayer i s " + f i rst Comp. l ayer(f i rst Comp. numLayers). name);
Attributes
Attribute Reference Description
f rameDurat i on “CompItem frameDuration attribute” on
page 56
The duration of a single frame.
workAreaSt ar t “CompItem workAreaStart attribute” on
page 60
The work area start time.
workAreaDurat i on “CompItem workAreaDuration
attribute” on page 59
The work area duration.
numLayers “CompItem numLayers attribute” on
page 57
The number of layers in the composition.
hi deShyLayers “CompItem hideShyLayers attribute” on
page 56
When true, shy layers are visible in the Timeline panel.
mot i onBl ur “CompItem motionBlur attribute” on
page 57
When true, motion blur is enabled for this composi-
tion.
draf t 3d “CompItem draft3d attribute” on
page 55
When true, Draft 3D mode is enabled for the Compo-
sition panel.
f rameBl endi ng “CompItem frameBlending attribute” on
page 55
When true, time filtering is enabled for this composi-
tion.
preser veNestedFrameRate “CompItem preserveNestedFrameRate
attribute” on page 57
When true, the frame rate of nested compositions is
preserved.
preser veNestedResol ut i on “CompItem preserveNestedResolution
attribute” on page 58
When true, the resolution of nested compositions is
preserved.
bgCol or “CompItem bgColor attribute” on
page 54
The background color of the composition.
act i veCamera “CompItem activeCamera attribute” on
page 54
The current active camera layer.
di spl aySt ar t Ti me “CompItem displayStartTime attribute”
on page 55
Changes the display of the start time in the Timeline
panel.
54
JavaScript Reference CompItem object
54
Methods
CompItem activeCamera attribute
app. proj ect . i tem(i ndex). act i veCamer 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
app. proj ect . i tem(i ndex). bgCol 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.
resol ut i onFactor “CompItem resolutionFactor attribute”
on page 58
The factor by which the x and y resolution of the Com-
position panel is downsampled.
shut terAngl e “CompItem shutterAngle attribute” on
page 59
The camera shutter angle.
shut terPhase “CompItem shutterPhase attribute” on
page 59
The camera shutter phase.
l ayers “CompItem layers attribute” on page 57
“LayerCollection object” on page 93
The layers of the composition.
sel ect edLayers “CompItem selectedLayers attribute” on
page 59
The selected layers of the composition.
sel ect edProper t i es “CompItem selectedProperties
attribute” on page 59
The selected properties of the composition.
renderer “CompItem renderer attribute” on
page 58
The rendering plug-in module to be used to render
this composition.
renderers “CompItem renderers attribute” on
page 58
The set of available rendering plug-in modules.
Method Reference Description
dupl i cat e() “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.
Attribute Reference Description
55
JavaScript Reference CompItem object
55
CompItem displayStartTime attribute
app. proj ect . i tem(i ndex). di spl aySt ar t Ti me
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
app. proj ect . i tem(i ndex). draf t 3d
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
app. proj ect . i tem(i ndex). dupl i cate()
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
app. proj ect . i tem(i ndex). f rameBl endi ng
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.
56
JavaScript Reference CompItem object
56
CompItem frameDuration attribute
app. proj ect . i tem(i ndex). f rameDur at i on
Description
The duration of a frame, in seconds. This is the inverse of the f rameRate value (frames-per-second).
Type
Floating-point; read/write.
CompItem hideShyLayers attribute
app. proj ect . i tem(i ndex). hi deShyLayers
Description
When true, only layers with shy 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
app. proj ect . i tem(i ndex). l ayer(i ndex)
app. proj ect . i tem(i ndex). l ayer(ot herLayer, rel Index)
app. proj ect . i tem(i ndex). l ayer(name)
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
—or—

—or—
i ndex The index number of the desired layer in this composition. An integer in the range [1...num-
Layers], where numLayers is the number of layers in the composition.
ot herLayer A Layer object in this composition. The rel Index value is added to the index value of this
layer to find the position of the desired layer.
rel Index The position of the desired layer, relative to ot herLayer. An integer in the range [1–ot her-
Layer. i ndex. . . numLayers–ot herLayer. i ndex], where numLayers is the number of
layers in the composition.
This value is added to the ot herLayer value to derive the absolute index of the layer to
return.
name The string containing the name of the desired layer.
57
JavaScript Reference CompItem object
57
Returns
Layer object.
CompItem layers attribute
app. proj ect . i tem(i ndex). 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
app. proj ect . i tem(i ndex). mot i onBl ur
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
app. proj ect . i tem(i ndex). numLayers
Description
The number of layers in the composition.
Type
Integer; read-only.
CompItem preserveNestedFrameRate attribute
app. proj ect . i tem(i ndex). preser veNestedFrameRate
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.
58
JavaScript Reference CompItem object
58
CompItem preserveNestedResolution attribute
app. proj ect . i tem(i ndex). preser veNestedResol ut 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
app. proj ect . i tem(i ndex). 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 compIt em. renderers.
Type
String; read/write.
CompItem renderers attribute
app. proj ect . i tem(i ndex). 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
app. proj ect . i tem(i ndex). resol ut i onFactor
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.
59
JavaScript Reference CompItem object
59
CompItem selectedLayers attribute
app. proj ect . i tem(i ndex). sel ect edLayers
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
app. proj ect . i tem(i ndex). sel ect edProper t i es
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
app. proj ect . i tem(i ndex). shut terAngl 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
app. proj ect . i tem(i ndex). shut terPhase
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
app. proj ect . i tem(i ndex). workAreaDurat i on
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.
60
JavaScript Reference CompItem object
60
Type
Floating-point; read/write.
CompItem workAreaStart attribute
app. proj ect . i tem(i ndex). workAreaSt ar t
Description
The time when the Composition work area begins, in seconds.
Type
Floating-point; read/write.
61
JavaScript Reference FileSource object
61
FileSource object
app. proj ect . i tem(i ndex). mai nSource
app. proj ect . i tem(i ndex). proxySource
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
Methods
FileSource file attribute
app. proj ect . i tem(i ndex). mai nSource. f i l e
app. proj ect . i tem(i ndex). proxySource. f i l e
Description
The ExtendScript File object for the file that defines this asset. To change the value:
• If this FileSource is a proxySource of an AVItem, call set Proxy() or set ProxyWi t hSequence().
• If this FileSource is a mai nSource of a FootageItem, call repl ace() or repl aceWi t hSequence().
Type
File object; read-only.
FileSource missingFootagePath attribute
app. proj ect . i tem(i ndex). mai nSource. f i l e. mi ssi ngFoot agePat h
app. proj ect . i tem(i ndex). proxySource. f i l e. mi ssi ngFoot agePat h
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.
Attribute Reference Description
f i l e “FileSource file attribute” on page 61 The file that defines this asset.
mi ssi ngFoot agePat h “FileSource missingFootagePath attribute”
on page 61
The file that contains footage missing from this asset.
Method Reference Description
rel oad() “FileSource reload() method” on page 62 Reloads the asset from the file, if it is a mai nSource of
a FootageItem.
62
JavaScript Reference FileSource object
62
FileSource reload() method
app. proj ect . i tem(i ndex). mai nSource. f i l e. mai nSource. rel oad()
Description
Reloads the asset from the file. This method can be called only on a mai nSource, not a proxySource.
Parameters
None.
Returns
Nothing.
63
JavaScript Reference FolderItem object
63
FolderItem object
app. proj ect . Fol derItem
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.
var secondItem = app. proj ect . i t em(2);
i f ( ! (secondItem i nst anceof Fol derItem) ) {
al er t ("probl em: second i tem i s not a f ol der");
} el se {
f or (i = 1; i <= secondIt em. numItems; i ++) {
al er t ("i tem number " + i + " wi t hi n t he f ol der i s named "
+ secondIt em. i tem(i ). name);
}
}
Attributes
Methods
FolderItem item() method
app. proj ect . i tem(i ndex). i tem
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
Returns
Item object.
Attribute Reference Description
i tems “FolderItem items attribute” on page 64 The contents of this folder.
numIt ems “FolderItem numItems attribute” on page 64 The number of items contained in the folder.
Method Reference Description
i tem() “FolderItem item() method” on page 63 Gets an item from the folder.
i ndex An integer, the position index of the item to retrieve. The first item is at index 1.
64
JavaScript Reference FolderItem object
64
FolderItem items attribute
app. proj ect . i tem(i ndex). i tems
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
app. proj ect . i tem(i ndex). numIt ems
Description
The number of items contained in the i tems collection (f ol derIt em. i t ems. l engt h).
If the folder contains another folder, only the FolderItem for that folder is counted, not any subitems
contained in it.
Type
Integer; read only.
65
JavaScript Reference FootageItem object
65
FootageItem object
app. proj ect . i tem(i ndex)
app. proj ect . i tems[i ndex]
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 t em 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
Methods
FootageItem file attribute
app. proj ect . i tem(i ndex). f i l e
Description
The ExtendScript File object for the footage's source file.
If the FootageItem's mai nSource is a FileSource, this is the same as Foot ageIt em. mai nSource. f i l e. Otherwise
it is null.
Type
File object; read only.
Attribute Reference Description
f i l e “FootageItem file attribute” on page 65 The footage source file.
mai nSource “FootageItem mainSource attribute” on page 66 All settings related to the footage item.
Method Reference Description
repl ace() “FootageItem replace() method” on
page 66
Replaces a footage file with another footage file.
repl aceWi t hPl acehol der() “FootageItem replaceWithPlaceholder()
method” on page 66
Replaces a footage file with a placeholder object.
repl aceWi t hSequence() “FootageItem replaceWithSequence()
method” on page 67
Replaces a footage file with an image sequence.
repl aceWi t hSol i d() “FootageItem replaceWithSolid()
method” on page 67
Replaces a footage file with a solid.
66
JavaScript Reference FootageItem object
66
FootageItem mainSource attribute
app. proj ect . i tem(i ndex). mai nSource
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 oot ageMi ssi ng value is true, the path to the missing footage file is in the
Fi l eSource. mi ssi ngFoot agePat h attribute. See “AVItem footageMissing attribute” on page 33 and “FileSource
missingFootagePath attribute” on page 61.
Type
FootageSource object; read-only.
FootageItem replace() method
app. proj ect . i tem(i ndex). repl ace(f i l e)
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 mai nSource to that object. In the new source object, it sets the
name, wi dt h, hei ght , f rameDurat i on, and durat i on attributes (see “AVItem object” on page 32) based on the
contents of the file.
The method preserves interpretation parameters from the previous mai nSource object. If the specified file has
an unlabeled alpha channel, the method estimates the alpha interpretation.
Parameters
FootageItem replaceWithPlaceholder() method
app. proj ect . i tem(i ndex). repl aceWi t hPl acehol der(name, wi dt h, hei ght , f rameRat e, durat 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 mai nSource to that object.
Parameters
f i l e An ExtendScript File object for the file to be used as the footage main source.
name A string containing the name of the placeholder.
wi dt h The width of the placeholder in pixels, an integer in the range [4..30000].
hei ght The height of the placeholder in pixels, an integer in the range [4..30000].
67
JavaScript Reference FootageItem object
67
FootageItem replaceWithSequence() method
app. proj ect . i tem(i ndex). repl aceWi t hSequence(f i l e, f orceAl phabet i cal )
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 mai nSource to that object. In the new source
object, it sets the name, wi dt h, hei ght , f r ameDurat i on, and durat i on attributes (see “AVItem object” on
page 32) based on the contents of the file.
The method preserves interpretation parameters from the previous mai nSource object. If the specified file has
an unlabeled alpha channel, the method estimates the alpha interpretation.
Parameters
FootageItem replaceWithSolid() method
app. proj ect . i tem(i ndex). repl aceWi t hSol i d(col or, name, wi dt h, hei ght , pi xel As pect )
Description
Changes the source of this FootageItem to the specified solid. Creates a new SolidSource object, sets its values
from the parameters, and sets mai nSource to that object.
Parameters
f rameRate The frame rate of the placeholder, a floating-point value in the range [1.0..99.0]
durat i on The duration of the placeholder in seconds, a floating-point value in the range [0.0..10800.0].
f i l e An ExtendScript File object for the first file in the sequence to be used as the footage main source.
f orceAl phabet i cal When true, use the “Force alphabetical order” option.
col or 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.
wi dt h The width of the solid in pixels, an integer in the range [4..30000].
hei ght The height of the solid in pixels, an integer in the range [4..30000].
pi xel Aspect The pixel aspect ratio of the solid, a floating-point value in the range [0.01..100.0].
68
JavaScript Reference FootageSource object
68
FootageSource object
app. proj ect . i tem(i ndex). mai nSource
app. proj ect . i tem(i ndex). proxySource
Description
The FootageSource object holds information describing the source of some footage. It is used as the
mai nSource of a FootageItem, or the proxySource 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
Methods
Attribute Reference Description
hasAl pha “FootageSource hasAlpha attribute” on
page 71
When true, a footage clip or proxy includes an
alpha channel.
al phaMode “FootageSource alphaMode attribute”
on page 69
The mode of an alpha channel.
premul Col or “FootageSource premulColor attribute”
on page 72
The color to be premultiplied.
i nver t Al pha “FootageSource invertAlpha attribute”
on page 71
When true, an alpha channel in a footage clip or
proxy should be inverted.
i sSt i l l “FootageSource isStill attribute” on
page 71
When true, footage is a still image.
f i el dSeparat i onType “FootageSource fieldSeparationType
attribute” on page 70
The field separation type.
hi ghQual i t yFi el dSeparat i on “FootageSource highQualityFieldSepa-
ration attribute” on page 71
How the fields are to be separated in non-still foot-
age.
removePul l down “FootageSource removePulldown
attribute” on page 72
The pulldown type for the footage.
l oop “FootageSource loop attribute” on
page 72
How many times an image sequence is set to loop.
nat i veFrameRate “FootageSource nativeFrameRate
attribute” on page 72
The native frame rate of the footage.
di spl ayFr ameRate “FootageSource displayFrameRate
attribute” on page 69
The effective frame rate as displayed and rendered
in compositions by After Effects.
conf or mFrameRate “FootageSource conformFrameRate
attribute” on page 69
The rate to which footage should conform.
Method Reference Description
guessAl phaMode() “FootageSource guessAlphaMode()
method” on page 70
Estimates the al phaMode setting.
guessPul l down() “FootageSource guessPulldown()
method” on page 70
Estimates the pul l downType setting.
69
JavaScript Reference FootageSource object
69
FootageSource alphaMode attribute
app. proj ect . i tem(i ndex). mai nSource. al phaMode
app. proj ect . i tem(i ndex). proxySource. al phaMode
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 Al phaMode enumerated value; (read/write). One of:
Al phaMode. IGNORE
Al phaMode. STRAI GHT
Al phaMode. PREMULTIPLIED
FootageSource conformFrameRate attribute
app. proj ect . i tem(i ndex). mai nSource. conf ormFrameRate
app. proj ect . i tem(i ndex). proxySource. conf ormFr ameRat e
Description
A frame rate to use instead of the nat i veFrameRate value. If set to 0, the nat i veFrameRate is used instead.
It is an error to set this value if Foot ageSource. i sSt i l l is true. It is an error to set this value to 0 if remove-
Pul l down is not set to Pul l downPhase. OFF. If this is 0 when you set removePul l down to a value other than
Pul l downPhase. OFF, then this is automatically set to the value of nat i veFrameRate.
Type
Floating-point value in the range [0.0.. 99.0]; read/write.
FootageSource displayFrameRate attribute
app. proj ect . i tem(i ndex). mai nSource. di spl ayFrameRate
app. proj ect . i tem(i ndex). proxySource. di spl ayFrameRate
Description
The effective frame rate as displayed and rendered in compositions by After Effects.
If removePul l down is Pul l downPhase. OFF, then this is the same as the conf ormFrameRate (if non-zero) or
the nat i veFrameRate (if conf ormFrameRate is 0). If removePul l down is not Pul l downPhase. OFF, this is
conf or mFrameRate * 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.
70
JavaScript Reference FootageSource object
70
FootageSource fieldSeparationType attribute
app. proj ect . i tem(i ndex). mai nSource. f i el dSeparat i onType
app. proj ect . i tem(i ndex). proxySource. f i el dSepar at i onType
Description
How the fields are to be separated in non-still footage.
It is an error to set this attribute if i sSt i l l is true. It is an error to set this value to Fi el dSeparat i onType. OFF if
removePul l down is not Pul l downPhase. OFF.
Type
A Fi el dSeparat i onType enumerated value; read/write. One of:
Fi el dSepar at i onType. OFF
Fi el dSepar at i onType. UPPER_FI ELD_FI RST
Fi el dSepar at i onType. LOWER_FIELD_FIRST
FootageSource guessAlphaMode() method
app. proj ect . i tem(i ndex). mai nSource. guessAl phaMode()
app. proj ect . i tem(i ndex). proxySource. guessAl phaMode()
Description
Sets al phaMode, premul Col or, and i nver t Al pha to the best estimates for this footage source. If hasAl pha is
false, no change is made.
Parameters
None.
Returns
Nothing.
FootageSource guessPulldown() method
app. proj ect . i tem(i ndex). mai nSource. guessPul l down(met hod)
app. proj ect . i tem(i ndex). proxySource. guessPul l down(met hod)
Description
Sets f i el dSepar at i onType and removePul l down to the best estimates for this footage source. If i sSt i l l is true,
no change is made.
Parameters
Returns
Nothing.
met hod The method to use for estimation. A Pul l downMet hod enumerated value, one of:
Pul l downMet hod. PULLDOWN_3_2
Pul l downMet hod. ADVANCE_24P
71
JavaScript Reference FootageSource object
71
FootageSource hasAlpha attribute
app. proj ect . i tem(i ndex). mai nSource. hasAl pha
app. proj ect . i tem(i ndex). proxySource. hasAl pha
Description
When true, the footage has an alpha component. In this case, the attributes al phaMode, i nver t Al pha, and
premul Col or have valid values. When false, those attributes have no relevant meaning for the footage.
Type
Boolean; read-only.
FootageSource highQualityFieldSeparation attribute
app. proj ect . i tem(i ndex). mai nSource. hi ghQual i t yFi el dSeparat i on
app. proj ect . i tem(i ndex). proxySource. hi ghQual i t yFi el dSeparat 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 sSt i l l is true, or if f i el dSepar at i onType is Fi el dSeparat i onType. OFF.
Type
Boolean; read/write.
FootageSource invertAlpha attribute
app. proj ect . i tem(i ndex). mai nSource. i nver t Al pha
app. proj ect . i tem(i ndex). proxySource. i nver t Al pha
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 hasAl pha is false, or if al phaMode is Al phaMode. IGNORE,
this attribute is ignored.
Type
Boolean; read/write.
FootageSource isStill attribute
app. proj ect . i tem(i ndex). mai nSource. i sSt i l l
app. proj ect . i tem(i ndex). proxySource. i sSt i l 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.
72
JavaScript Reference FootageSource object
72
FootageSource loop attribute
app. proj ect . i tem(i ndex). mai nSource. l oop
app. proj ect . i tem(i ndex). proxySource. l oop
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 sSt i l l is true.
Type
Integer in the range [1.. 9999]; default is 1; read/write.
FootageSource nativeFrameRate attribute
app. proj ect . i tem(i ndex). mai nSource. nat i veFr ameRat e
app. proj ect . i tem(i ndex). proxySource. nat i veFrameRate
Description
The native frame rate of the footage.
Type
Floating-point; read/write.
FootageSource premulColor attribute
app. proj ect . i tem(i ndex). mai nSource. premul Col or
app. proj ect . i tem(i ndex). proxySource. premul Col or
Description
The color to be premultiplied. This attribute is valid only if the al phaMode is al phaMode. PREMULTIPLIED.
Type
Array of three floating-point values [R, G, B], in the range [0.0..1.0]; read/write.
FootageSource removePulldown attribute
app. proj ect . i tem(i ndex). mai nSource. removePul l down
app. proj ect . i tem(i ndex). proxySource. removePul l down
Description
How the pulldowns are to be removed when field separation is used.
It is an error to set this attribute if i sSt i l l is true. It is an error to attempt to set this to a value other than
Pul l downPhase. OFF in the case where f i el dSepar at i onType is Fi el dSeparat i onType. OFF.
Type
A Pul l downPhase enumerated value; read/write. One of:
Pul l downPhase. RemovePul l down. OFF
Pul l downPhase. RemovePul l down. WSSWW
Pul l downPhase. RemovePul l down. SSWWW
73
JavaScript Reference FootageSource object
73
Pul l downPhase. RemovePul l down. SWWWS
Pul l downPhase. RemovePul l down. WWWSS
Pul l downPhase. RemovePul l down. WWSSW
Pul l downPhase. RemovePul l down. WSSWW_24P_ADVANCE
Pul l downPhase. RemovePul l down. SSWWW_24P_ADVANCE
Pul l downPhase. RemovePul l down. SWWWS_24P_ADVANCE
Pul l downPhase. RemovePul l down. WWWSS_24P_ADVANCE
Pul l downPhase. RemovePul l down. WWSSW_24P_ADVANCE
74
JavaScript Reference ImportOptions object
74
ImportOptions object
new Impor t Opt i ons();
new Impor t Opt i ons(f i l e);
Description
The ImportOptions object encapsulates the options used to import a file with the Proj ect . i mpor t Fi l 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 mpor t Fi l e method. For
example:
new Impor t Opt i ons(). f i l e = new Fi l e("myf i l e. psd");
Attributes
Methods
ImportOptions canImportAs() method
i mpor t Opt i ons . canImpor t As(t ype)
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 mpor t As attribute. See “ImportOptions importAs attribute” on
page 75.
Parameters
Attributes Reference Description
i mpor t As “ImportOptions importAs attribute” on
page 75
The type of file to be imported.
sequence “ImportOptions sequence attribute” on
page 76
When true, import a sequence of files, rather than an individ-
ual file.
f orceAl phabet i cal “ImportOptions forceAlphabetical
attribute” on page 75
When true, the “Force alphabetical order” option is set.
f i l e “ImportOptions file attribute” on
page 75
The file to import, or the first file of the sequence to import.
Method Reference Description
canImpor t As() “ImportOptions canImportAs() method”
on page 74
Restricts input to a particular file type.
t ype
The type of file that can be imported. An Impor t AsType enumerated value; one of:
Impor t AsType. COMP
Impor t AsType. FOOTAGE
Impor t AsType. COMP_CROPPED_LAYERS
Impor t AsType. PROJ ECT
75
JavaScript Reference ImportOptions object
75
Returns
Boolean.
Example
var i o = new Impor t Opt i ons(Fi l e(“c: \ \ myFi l e. psd”));
i f i o. canImpor t As(Impor t AsType. COMP);
i o. i mpor t As = Impor t AsType. COMP;
ImportOptions file attribute
i mpor t Opt 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
i mpor t Opt i ons . f orceAl phabet i cal
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
i mpor t Opt i ons . i mpor t As
Description
The type of object for which the imported file is to be the source. Before setting, use canImpor t As 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 Impor t AsType enumerated value; read/write. One of:
Impor t AsType. COMP_CROPPED_LAYERS
Impor t AsType. FOOTAGE
Impor t AsType. COMP
Impor t AsType. PROJ ECT
76
JavaScript Reference ImportOptions object
76
ImportOptions sequence attribute
i mpor t Opt i ons . sequence
Description
When true, a sequence is imported; otherwise, an individual file is imported.
Type
Boolean; read/write.
77
JavaScript Reference Item object
77
Item object
app. proj ect . i tem(i ndex)
app. proj ect . i tems[i ndex]
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
Methods
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.
var myFol der = app. proj ect . i tem(2);
i f (myFol der. t ypeName ! = "Fol der") {
al er t ("er ror : second i tem i s not a f ol der");
}
el se {
var numInFol der = myFol der. numItems;
/ / Al ways run l oops backwards when del et i ng t hi ngs:
f or(i = numInFol der ; i >= 1; i --) {
var curItem = myFol der. i t em(i );
i f ( curItem. parent Fol der ! = myFol der) {
al er t ("er ror wi t hi n AE: t he parent Fol der i s not set cor rect l y");
}
el se {
i f ( ! curIt em. sel ect ed && curItem. t ypeName == "Foot age") {
/ / f ound an unsel ected sol i d.
curItem. remove();
Attributes Reference Description
name “Item name attribute” on page 78 The name of the object as shown in the Project panel.
comment “Item comment attribute” on page 78 A descriptive string.
i d “Item id attribute” on page 78 A unique identifier for this item.
parent Fol der “Item parentFolder attribute” on page 78 The parent folder of this item.
sel ect ed “Item selected attribute” on page 79 When true, this item is currently selected.
t ypeName “Item typeName attribute” on page 79 The type of item.
Method Reference Description
remove() “Item remove() method” on page 79 Deletes the item from the project.
78
JavaScript Reference Item object
78
}
}
}
}
Item comment attribute
app. proj ect . i tem(i ndex). comment
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
app. proj ect . i tem(i ndex). 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
app. proj ect . i tem(i ndex). name
Description
The name of the item as displayed in the Project panel.
Type
String; read/write.
Item parentFolder attribute
app. proj ect . i tem(i ndex). parent Fol der
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 (app. proj ect . root Fol der). You can use the ItemCollection’s addFol der method to
add a new folder, and set this value to put items in the new folder. See “ItemCollection addFolder() method”
on page 80.
79
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.
/ / creat e a new Fol derItem i n proj ect , wi t h name “comps”
var compFol der = app. proj ect . i t ems. addFol der(“comps”);
/ / move al l composi t i ons i nt o new f ol der by set t i ng
/ / compIt em’s parent Fol der to “comps” f ol der
f or(var i = 1; i <= app. proj ect . numItems; i ++) {
i f (app. proj ect . i tem(i ) i nst anceof CompItem)
app. proj ect . i tem(i ). parent Fol der = compFol der ;
}
Item remove() method
app. proj ect . i tem(i ndex). 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
app. proj ect . i tem(i ndex). sel ect ed
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
app. proj ect . i tem(i ndex). t ypeName
Description
A user-readable name for the item type; for example, “Folder”, “Footage”, or “Composition”.
Type
String; read-only.
80
JavaScript Reference ItemCollection object
80
ItemCollection object
app. proj ect . i tems
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
ItemCollection addComp() method
app. proj ect . i temCol l ect i on. addComp(name, wi dt h, hei ght , pi xel As pect , durat i on, f rameRat e)
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 parent Fol der is the root
folder. If the ItemCollection belongs to any other folder, the new item’s parent Fol der is that Fol derIt em.
Parameters
Returns
CompItem object.
ItemCollection addFolder() method
app. proj ect . i temCol l ect i on. addFol der(name)
Description
Creates a new folder. Creates and returns a new FolderItem object and adds it to this collection.
Method Reference Description
addComp() “ItemCollection addComp() method” on
page 80
Creates a new CompItem object and adds it to the collection.
addFol der() “ItemCollection addFolder() method” on
page 80
Creates a new FolderItemobject and adds it to the collection.
name A string containing the name of the composition.
wi dt h The width of the composition in pixels, an integer in the range [4..30000].
hei ght The height of the composition in pixels, an integer in the range [4..30000].
pi xel Aspect The pixel aspect ratio of the composition, a floating-point value in the range [0.01..100.0].
durat i on The duration of the composition in seconds, a floating-point value in the range [0.0..10800.0].
f rameRate The frame rate of the composition, a floating-point value in the range [1.0..99.0]
81
JavaScript Reference ItemCollection object
81
If the ItemCollection belongs to the project or the root folder, then the new folder’s parent Fol der is the root
folder. If the ItemCollection belongs to any other folder, the new folder’s parent Fol der is that Fol derItem.
To put items in the folder, set the item object’s parent Fol der attribute; see “Item parentFolder attribute” on
page 78.
Parameters
Returns
FolderItem object.
Example
This script creates a new FolderItem in the Project panel and moves compositions into it.
/ / creat e a new Fol derItem i n proj ect , wi t h name “comps”
var compFol der = app. proj ect . i t ems. addFol der(“comps”);
/ / move al l composi t i ons i nt o new f ol der by set t i ng
/ / compIt em’s parent Fol der to “comps” f ol der
f or(var i = 1; i <= app. proj ect . numItems; i ++) {
i f (app. proj ect . i tem(i ) i nst anceof CompItem)
app. proj ect . i tem(i ). parent Fol der = compFol der ;
}
name A string containing the name of the folder.
82
JavaScript Reference KeyframeEase object
82
KeyframeEase object
myKey = new Keyf rameEase(s peed, i nf l uence);
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 set Tempor al EaseAt Key
method. See “Property setTemporalEaseAtKey() method” on page 137.
The constructor creates a KeyframeEase object. Both parameters are required.
• speed: A floating-point value. Sets the speed attribute.
• i nf l uence: A floating-point value in the range [0.1..100.0]. Sets the i nf l uence attribute.
Example
This example assumes that the Position, a spatial property, has more than two keyframes.
var easeIn = new Keyf r ameEase(0. 5, 50);
var easeOut = new Keyf r ameEase(0. 75, 85);
var myPosi t i onProper t y = app. proj ect . i tem(1). l ayer(1). proper t y("Posi t i on")
myPosi t i onProper t y. set Temporal EaseAt Key(2, [easeIn], [easeOut ]);
This example sets the Scale, a temporal property with either two or three dimensions. For 2D and 3D
properties you must set an easeIn and easeOut value for each dimension:
var easeIn = new Keyf r ameEase(0. 5, 50);
var easeOut = new Keyf r ameEase(0. 75, 85);
var myScal eProper t y = app. proj ect . i tem(1). l ayer(1). proper t y("Scal e")
myScal eProper t y. set Temporal EaseAt Key(2, [easeIn, easeIn, easeIn], [easeOut , easeOut , easeOut ]);
Attributes
KeyframeEase influence attribute
myKe y. i nf l uence
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.
Attribute Reference Description
speed “KeyframeEase speed attribute” on page 83 The speed setting for a keyframe.
i nf l uence “KeyframeEase influence attribute” on page 82 The influence setting for a keyframe.
83
JavaScript Reference KeyframeEase object
83
KeyframeEase speed attribute
myKe y. speed
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.
84
JavaScript Reference Layer object
84
Layer object
app. proj ect . i tem(i ndex). l ayer(i ndex)
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.
var f i rst Layer = app. proj ect . i tem(1). l ayer(1);
f i rst Layer. enabl ed = f al se;
f i rst Layer. name = "Di sabl ed Layer";
Attributes
Attribute Reference Description
i ndex “Layer index attribute” on page 88 The index position of the layer.
name “Layer name attribute” on page 90 The name of the layer.
parent “Layer parent attribute” on page 90 The parent of this layer.
t i me “Layer time attribute” on page 92 The current time of the layer.
st ar t Ti me “Layer startTime attribute” on page 92 The start time of the layer.
st ret ch “Layer stretch attribute” on page 92 The time stretch percentage of the layer.
i nPoi nt “Layer inPoint attribute” on page 88 The “in” point of the layer.
out Poi nt “Layer outPoint attribute” on page 90 The “out” point of the layer.
enabl ed “Layer enabled attribute” on page 87 When true, the layer is enabled.
sol o “Layer solo attribute” on page 92 When true, the layer is soloed.
shy “Layer shy attribute” on page 91 When true, the layer is shy.
l ocked “Layer locked attribute” on page 88 When true, the layer is locked.
hasVi deo “Layer hasVideo attribute” on page 87 When true, the layer contains a video component.
act i ve “Layer active attribute” on page 85 When true, the layer is active at the current time.
nul l Layer “Layer nullLayer attribute” on page 90 When true, this is a null layer.
sel ect edProper t i es “Layer selectedProperties attribute” on page 91 All selected AE properties in the layer.
comment “Layer comment attribute” on page 86 A descriptive comment for the layer.
cont ai ni ngComp “Layer containingComp attribute” on page 86 The composition that contains this layer.
85
JavaScript Reference Layer object
85
Methods
Layer active attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). act i ve
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 nPoi nt and out Poi nt values of this layer.
This value is never true in an audio layer; there is a separate audi oAct i ve attribute in the AVLayer object.
Type
Boolean; read-only.
Layer activeAtTime() method
app. proj ect . i tem(i ndex). l ayer(i ndex). act i veAt Ti me(t i me)
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 i nPoi nt and out Poi nt
values of this layer.
i sNameSet “Layer isNameSet attribute” on page 88 When true, the layer’s name has been explicitly set.
Method Reference Description
remove() “Layer remove() method” on page 91 Deletes the layer from the composition.
moveToBegi nni ng() “Layer moveToBeginning() method” on
page 89
Moves the layer to the top of the composition (makes it the
first layer).
moveToEnd() “Layer moveToEnd() method” on
page 89
Moves the layer to the bottom of the composition (makes it
the last layer).
moveAf t er() “Layer moveAfter() method” on page 88 Moves the layer below another layer.
moveBef ore() “Layer moveBefore() method” on
page 89
Moves the layer above another layer.
dupl i cat e() “Layer duplicate() method” on page 87 Duplicates the layer.
copyToComp() “Layer copyToComp() method” on
page 87
Copies the layer to the top (beginning) of another compo-
sition.
act i veAt Ti me() “Layer activeAtTime() method” on
page 85
Reports whether this layer will be active at a specified time.
set Parent Wi t hJump() “Layer setParentWithJump() method”
on page 91
Sets a new parent for this layer.
appl yPreset () “Layer applyPreset() method” on
page 86
Applies a named collection of animation settings to the
layer.
Attribute Reference Description
86
JavaScript Reference Layer object
86
Parameters
Returns
Boolean.
Layer applyPreset() method
appapp. proj ect . i t em(i ndex). l ayer(i ndex). appl yPreset (pres et Name);
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
Returns
Nothing.
Layer comment attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). comment
Description
A descriptive comment for the layer.
Type
String; read/write.
Layer containingComp attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). cont ai ni ngComp
Description
The composition that contains this layer.
Type
CompItem object; read-only.
t i me The time in seconds, a floating-point value.
preset Name An ExtendScript File object for the file containing the animation preset.
87
JavaScript Reference Layer object
87
Layer copyToComp() method
app. proj ect . i tem(i ndex). l ayer(i ndex). copyToComp(i nt oComp)
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 ayers collection in the target
CompItem. Retrieve the copy using i nt oComp. l ayer(1).
Copying in a layer changes the index positions of previously existing layers in the target composition. This is
the same as copying and pasting a layer through the user interface.
Parameters
Returns
Nothing.
Layer duplicate() method
app. proj ect . i tem(i ndex). l ayer(i ndex). dupl i cate()
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
app. proj ect . i tem(i ndex). l ayer(i ndex). enabl 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
app. proj ect . i tem(i ndex). l ayer(i ndex). hasVi deo
Description
When true, the layer has a video switch (the eyeball icon) in the Timeline panel; otherwise false.
i ntoComp The target composition, and CompItem object.
88
JavaScript Reference Layer object
88
Type
Boolean; read-only.
Layer index attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). i ndex
Description
The index position of the layer.
Type
Integer in the range [1..numLayers]; read-only.
Layer inPoint attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). i nPoi nt
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
app. proj ect . i tem(i ndex). l ayer(i ndex). i sNameSet
Description
True if the value of the name attribute has been set explicitly, rather than automatically from the source.
Type
Boolean; read-only.
Layer locked attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). 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
app. proj ect . i tem(i ndex). l ayer(i ndex). moveAf ter(l ayer)
Description
Moves this layer to a position immediately after (below) the specified layer.
89
JavaScript Reference Layer object
89
Parameters
Returns
Nothing.
Layer moveBefore() method
app. proj ect . i tem(i ndex). l ayer(i ndex). moveBef ore(l ayer)
Description
Moves this layer to a position immediately before (above) the specified layer.
Parameters
Returns
Nothing.
Layer moveToBeginning() method
app. proj ect . i tem(i ndex). l ayer(i ndex). moveToBegi nni ng()
Description
Moves this layer to the topmost position of the layer stack (the first layer).
Parameters
None.
Returns
Nothing.
Layer moveToEnd() method
app. proj ect . i tem(i ndex). l ayer(i ndex). moveToEnd()
Description
Moves this layer to the bottom position of the layer stack (the last layer).
Parameters
None.
Returns
Nothing.
l ayer The target layer, a layer object in the same composition.
l ayer The target layer, a layer object in the same composition.
90
JavaScript Reference Layer object
90
Layer name attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). 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
app. proj ect . i tem(i ndex). l ayer(i ndex). nul l Layer
Description
When true, the layer was created as a null object; otherwise false.
Type
Boolean; read-only.
Layer outPoint attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). out Poi nt
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
app. proj ect . i tem(i ndex). l ayer(i ndex). parent
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 set Parent Wi t hJump method.
Type
Layer object or null; read/write.
91
JavaScript Reference Layer object
91
Layer remove() method
app. proj ect . i tem(i ndex). l ayer(i ndex). remove()
Description
Deletes the specified layer from the composition.
Parameters
None.
Returns
Nothing.
Layer selectedProperties attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). sel ectedProper t i es
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
app. proj ect . i tem(i ndex). l ayer(i ndex). set Parent Wi t hJump(newParent )
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 parent attribute directly. In this case, an offset is calculated
and set in the child layer's transform fields, to prevent the jump from occurring.
Parameters
Returns
Nothing.
Layer shy attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). 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.
newParent A layer object in the same composition.
92
JavaScript Reference Layer object
92
Type
Boolean; read/write.
Layer solo attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). sol o
Description
When true, the layer is soloed, otherwise false.
Type
Boolean; read/write.
Layer startTime attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). st ar t Ti me
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
app. proj ect . i tem(i ndex). l ayer(i ndex). st retch
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
app. proj ect . i tem(i ndex). l ayer(i ndex). t i me
Description
The current time of the layer, expressed in composition time (seconds).
Type
Floating-point value; read-only.
93
JavaScript Reference LayerCollection object
93
LayerCollection object
app. proj ect . i tem(i ndex). 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.
var f i rst Comp = app. proj ect . i tem(1);
var l ayerCol l ect i on = f i rst Comp. l ayers;
al er t ("number of l ayers bef ore i s " + l ayerCol l ect i on. l engt h);
var anAVItem = app. proj ect . i t em(2);
l ayerCol l ect i on. add(anAVItem);
al er t ("number of l ayers af ter i s " + l ayerCol l ect i on. l engt h);
Methods
Method Reference Description
add() “LayerCollection add() method” on
page 94
Creates a new AVLayer and adds it to this collection.
addNul l () “LayerCollection addNull() method” on
page 95
Creates a new, null layer and adds it to this collection.
addSol i d() “LayerCollection addSolid() method” on
page 95
Creates a new layer, a FootageItem with a SolidSource, and adds it
to this collection.
addText () “LayerCollection addText() method” on
page 96
Creates a new text layer and adds it to this collection.
addCamer a() “LayerCollection addCamera() method”
on page 94
Creates a new camera layer and adds it to this collection.
addLi ght () “LayerCollection addLight() method” on
page 94
Creates a new light layer and adds it to this collection.
addShape() “LayerCollection addShape() method”
on page 95
Creates a new shape layer and adds it to this collection.
byName() “LayerCollection byName() method” on
page 96
Retrieves the layer object with a specified name.
precompose() “LayerCollection precompose()
method” on page 97
Collects specified layers into a new composition.
94
JavaScript Reference LayerCollection object
94
LayerCollection add() method
app. proj ect . i tem(i ndex). l ayers. add(i t em, durat i on)
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
Returns
AVLayer object.
LayerCollection addCamera() method
app. proj ect . i tem(i ndex). l ayers. addCamera(name, cent erPoi nt )
Description
Creates a new camera layer and adds the CameraLayer object to this collection.
Parameters
Returns
CameraLayer object.
LayerCollection addLight() method
app. proj ect . i tem(i ndex). l ayers. addLi ght (name, cent erPoi nt )
Description
Creates a new light layer and adds the LightLayer object to this collection.
Parameters
i tem The AVItem object for the item to be added.
durat 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 durat i on value of the new layer. Otherwise, the durat 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 spec-
ify options under Still Footage.
name A string containing the name of the new layer.
centerPoi nt 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.
name A string containing the name of the new layer.
centerPoi nt The center of the new light, a floating-point array [x, y].
95
JavaScript Reference LayerCollection object
95
Returns
LightLayer object.
LayerCollection addNull() method
app. proj ect . i tem(i ndex). l ayers. addNul l (durat i on)
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
Returns
AVLayer object.
LayerCollection addShape() method
app. proj ect . i tem(i ndex). l ayers. addShape()
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
app. proj ect . i tem(i ndex). l ayers. addSol i d(col or, name, wi dt h, he i ght , pi xel As pect , durat i on)
Description
Creates a new SolidSource object, with values set as specified; sets the new SolidSource as the mai nSource
value of a new FootageItem object, and adds the FootageItem to the project. Creates a new AVLayer object,
sets the new FootageItem as its source, and adds the layer to this collection.
Parameters
durat i on Optional, the length of a still layer in seconds, a floating-point value.
If supplied, sets the durat i on value of the new layer. Otherwise, the durat 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.
col or The color of the solid, an array of four floating-point values, [R, G, B, A], in the range [0.0..1.0].
96
JavaScript Reference LayerCollection object
96
Returns
AVLayer object.
LayerCollection addText() method
app. proj ect . i tem(i ndex). l ayers. addText (s ourc eText )
Description
Creates a new text layer and adds the new TextLayer object to this collection.
Parameters
Returns
TextLayer object.
LayerCollection byName() method
app. proj ect . i tem(i ndex). l ayers. byName(name)
Description
Returns the first (topmost) layer found in this collection with the specified name, or null if no layer with the
given name is found.
Parameters
Returns
Layer object or null.
name A string containing the name of the solid.
wi dt h The width of the solid in pixels, an integer in the range [4..30000].
hei ght The height of the solid in pixels, an integer in the range [4..30000].
pi xel Aspect The pixel aspect ratio of the solid, a floating-point value in the range [0.01..100.0].
durat 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.
sourceText 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.
name A string containing the name.
97
JavaScript Reference LayerCollection object
97
LayerCollection precompose() method
app. proj ect . i tem(i ndex). l ayers. precompose(l ayerIndi c i es , name, moveAl l At t r i but es )
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
Returns
CompItem object.
l ayerIndi ces The position indexes of the layers to be collected. An array of integers.
name The name of the new CompItem object.
moveAl l At t r i butes 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 ayerIndi ces array.
This is the same as selecting the “Leave all attributes in” option in the Pre-com-
pose dialog box.
98
JavaScript Reference LightLayer object
98
LightLayer object
app. proj ect . i tem(i ndex). l ayer(i ndex)
Description
The LightLayer object represents a light layer within a composition. Create it using the LayerCollection
object’s addLi ght 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:
Marker
Transf orm
Poi nt of Interest
Posi t i on
Scal e
Ori ent at i on
X Rot at i on
Y Rot at i on
Rot at i on
Opaci t y
Li ght Opt i ons
Intensi t y
Col or
Cone Angl e
Cone Feat her
Cast s Shadows
Shadow Darkness
Shadow Di f f usi on
99
JavaScript Reference MarkerValue object
99
MarkerValue object
new MarkerVal ue(comment , chapt er, url , f rameTarget , cuePoi nt Name, params )
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 comment are optional. All arguments are strings that set in the corre-
sponding attributes of the returned MarkerValue object, except params. This is an array containing key-value
pairs., which can then be accessed with the get Par ameters() and set Parameters() 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 Marker AE property of the layer:
l ayerObj ect . proper t y("Marker"). set Val ueAt Ti me(t i me, mar kerVal ueObj ect );
For information on the usage of markers see “Using markers” in After Effects Help.
Attributes
Methods
Examples
• To set a marker that says “Fade Up” at the 2 second mark:
var myMarker = new MarkerVal ue("Fade Up");
myLayer. proper t y("Marker"). set Val ueAt Ti me(2, myMarker);
• To get comment values from a particular marker:
var comment Of Fi rst Marker = app. proj ect . i t em(1). l ayer(1). proper t y("Marker"). keyVal ue(1). comment ;
var comment Of MarkerAt Ti me4 =
app. proj ect . i tem(1). l ayer(1). proper t y("Marker"). val ueAt Ti me(4. 0, t rue). comment
var markerProper t y = app. proj ect . i tem(1). l ayer(1). proper t y("Marker");
Attribute Reference Description
comment “MarkerValue comment attribute” on
page 100
A comment on the associated layer.
chapt er “MarkerValue chapter attribute” on
page 100
A chapter link reference point for the associated layer.
cuePoi nt Name “MarkerValue cuePointName attribute”
on page 100
The Flash Video cue point name.
event CuePoi nt “MarkerValue eventCuePoint attribute”
on page 100
Whether the Flash Video cue point is for an event or navigation.
url “MarkerValue url attribute” on page 102 A URL for Web page to be associated with the layer.
f rameTarget “MarkerValue frameTarget attribute” on
page 101
A specific frame target within the Web page specified by url .
Method Reference Description
get Paramet ers() “MarkerValue getParameters() method”
on page 101
Retrieves the key-value pairs associated with the marker value.
set Par ameters() “MarkerValue setParameters() method”
on page 101
Sets the key-value pairs associated with the marker value.
100
JavaScript Reference MarkerValue object
100
var markerVal ueAt Ti meCl osest ToTi me4 =
markerProper t y. keyVal ue(markerProper t y. nearest KeyIndex(4. 0));
var comment Of MarkerCl osest ToTi me4 = markerVal ueAt Ti meCl osest ToTi me4. comment ;
MarkerValue chapter attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t y("Marker"). keyVal ue(i ndex). chapter
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
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t y("Marker"). keyVal ue(i ndex). comment
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
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t y("Marker"). keyVal ue(i ndex). cuePoi nt Name
Description
The Flash Video cue point name, as shown in the Marker dialog.
Type
String; read/write.
MarkerValue eventCuePoint attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t y("Marker"). keyVal ue(i ndex). event CuePoi nt
Description
When t rue, the FlashVideo cue point is for an event; otherwise, it is for navigation.
Type
Boolean; read/write.
101
JavaScript Reference MarkerValue object
101
MarkerValue frameTarget attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t y("Marker"). keyVal ue(i ndex). f rameTarget
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
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t y("Marker"). keyVal ue(i ndex). get Paramet ers()
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
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t y("Marker"). keyVal ue(i ndex). set Par ameters(ke yVal uePai rs )
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
Returns
Nothing.
Example
var mv = new MarkerVal ue("My Marker");
var parms = new Obj ect ;
parms. t i meToBl i nk = 1;
parms. assi gnMe = "A st r i ng"
mv. set Parameters(parms);
keyVal uePai rs An object containing the key-value pairs as attributes and values. The object’s t oSt r i ng()
method is called to assign the string value of each attribute to the named key.
102
JavaScript Reference MarkerValue object
102
myLayer. proper t y("Marker"). set Val ueAt Ti me(2, mv);
MarkerValue url attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t y("Marker"). keyVal ue(i ndex). url
Description
A URL for this marker. This URL is an automatic link to a Web page.
Type
String; read/write.
103
JavaScript Reference MaskPropertyGroup object
103
MaskPropertyGroup object
app. proj ect . i tem(i ndex). l ayer(i ndex). mask
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
MaskPropertyGroup color attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). mask(i ndex). col or
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
app. proj ect . i tem(i ndex). l ayer(i ndex). mask(i ndex). i nver t ed
Description
When true, the mask is inverted; otherwise false.
Type
Boolean; read/write.
Attribute Reference Description
maskMode “MaskPropertyGroup maskMode attribute”
on page 104
The mask mode.
i nver t ed “MaskPropertyGroup inverted attribute” on
page 103
When true, the mask is inverted.
rotoBezi er “MaskPropertyGroup rotoBezier attribute”
on page 104
When true, the shape of the mask is RotoBezier.
maskMot i onBl ur “MaskPropertyGroup maskMotionBlur
attribute” on page 104
How motion blur is applied to this mask.
l ocked “MaskPropertyGroup locked attribute” on
page 104
When true, the mask is locked.
col or “MaskPropertyGroup color attribute” on
page 103
The color used to draw the mask outline in the user
interface.
104
JavaScript Reference MaskPropertyGroup object
104
MaskPropertyGroup locked attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). mask(i ndex). l ocked
Description
When true, the mask is locked and cannot be edited in the user interface; otherwise, false.
Type
Boolean; read/write.
MaskPropertyGroup maskMode attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). mask(i ndex). maskMode
Description
The masking mode for this mask.
Type
A MaskMode enumerated value; read/write. One of:
MaskMode. NONE
MaskMode. ADD
MaskMode. SUBTRACT
MaskMode. INTERSECT
MaskMode. LIGHTEN
MaskMode. DARKEN
MaskMode. DIFFERENCE
MaskPropertyGroup maskMotionBlur attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). mask(i ndex). maskMot i onBl ur
Description
How motion blur is applied to this mask.
Type
A MakMot i onBl ur enumerated value; read/write. One of:
MaskMot i onBl ur. SAME_AS_LAYER
MaskMot i onBl ur. ON
MaskMot i onBl ur. OFF
MaskPropertyGroup rotoBezier attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). mas k(i ndex). rotoBezi er
Description
When true, the mask is a RotoBezier shape; otherwise, false.
Type
Boolean; read/write.
105
JavaScript Reference OMCollection object
105
OMCollection object
app. proj ect . renderQueue. i t ems. out put Modul es
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.
106
JavaScript Reference OutputModule object
106
OutputModule object
app. proj ect . renderQueue. i t em(i ndex). out put Modul es(i ndex)
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
Methods
OutputModule applyTemplate() method
app. proj ect . renderQueue. i t em(i ndex). out put Modul es[i ndex]. appl yTempl at e(t empl at eName)
Description
Applies the specified existing output-module template.
Parameters
Returns
Nothing.
OutputModule file attribute
app. proj ect . renderQueue. i t em(i ndex). out put Modul es[i ndex]. f i l e
Description
The ExtendScript File object for the file this output module is set to render.
Attribute Reference Description
f i l e “OutputModule file attribute” on
page 106
The path and name of the file to be rendered.
post RenderAct i on “OutputModule postRenderAction
attribute” on page 107
An action to be taken after rendering.
name “OutputModule name attribute” on
page 107
The user-interface name of the output module.
templ ates “OutputModule templates attribute” on
page 108
All templates for the output module.
Method Reference Description
remove() “OutputModule remove() method” on
page 107
Removes this output module from the render-queue item’s list.
saveAsTempl at e() “OutputModule saveAsTemplate()
method” on page 107
Saves a new output-module template.
appl yTempl at e() “OutputModule applyTemplate()
method” on page 106
Applies an output-module template.
templ ateName A string containing the name of the template to be applied.
107
JavaScript Reference OutputModule object
107
Type
ExtendScript File object; read/write.
OutputModule name attribute
app. proj ect . renderQueue. i t em(i ndex). out put Modul es[i ndex]. name
Description
The name of the output module, as shown in the user interface.
Type
String; read-only.
OutputModule postRenderAction attribute
app. proj ect . renderQueue. i t em(i ndex). out put Modul es[i ndex]. post RenderAct i on
Description
An action to be performed when the render operation is completed.
Type
A Post RenderAct i on enumerated value (read/write); one of:
post RenderAct i on. NONE
post RenderAct i on. IMPORT
post RenderAct i on. IMPORT_AND_REPLACE_USAGE
post RenderAct i on. SET_PROXY
OutputModule remove() method
app. proj ect . renderQueue. i t em(i ndex). out put Modul es[i ndex]. remove()
Description
Removes this OutputModule object from the collection.
Parameters
None.
Returns
Nothing.
OutputModule saveAsTemplate() method
app. proj ect . renderQueue. i t em(i ndex). out put Modul es[i ndex]. saveAsTempl at e(name)
Description
Saves this output module as a template and adds it to the t empl ates array.
108
JavaScript Reference OutputModule object
108
Parameters
Returns
Nothing.
OutputModule templates attribute
app. proj ect . renderQueue. i t em(i ndex). out put Modul es[i ndex]. templ at es
Description
The names of all output-module templates available in the local installation of After Effects.
Type
Array of strings; read-only.
name A string containing the name of the new template.
109
JavaScript Reference PlaceholderSource object
109
PlaceholderSource object
app. proj ect . i tem(i ndex). mai nSource
app. proj ect . i tem(i ndex). proxySource
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.
110
JavaScript Reference Project object
110
Project object
app. proj ect
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
Methods
Attribute Reference Description
f i l e “Project file attribute” on page 113 The file for the currently open project.
root Fol der “Project rootFolder attribute” on
page 116
The folder containing all the contents of the
project; the equivalent of the Project panel
i tems “Project items attribute” on page 114 All items in the project.
act i veItem “Project activeItem attribute” on
page 111
The currently active item.
bi t sPerChannel “Project bitsPerChannel attribute” on
page 112
The color depth of the current project.
t r ansparencyGr i dThumbnai l s “Project transparencyGridThumbnails
attribute” on page 118
When true, thumbnail views use the transpar-
ency checkerboard pattern.
t i mecodeDi spl ayType “Project timecodeDisplayType
attribute” on page 117
The way the timecode is displayed.
t i mecodeBaseType “Project timecodeBaseType attribute”
on page 117
The timecode base project setting.
t i mecodeNTSCDropFrame “Project timecodeNTSCDropFrame
attribute” on page 118
The drop-frame project setting.
t i mecodeFi l mType “Project timecodeFilmType attribute”
on page 118
The film type for the “Feet + Frames” project set-
ting.
numIt ems “Project numItems attribute” on
page 115
The total number of items contained in the
project.
sel ect i on “Project selection attribute” on
page 117
All items selected in the Project panel.
renderQueue “Project renderQueue attribute” on
page 116
The project’s render queue.
di spl aySt ar t Frame “Project displayStartFrame attribute” on
page 112
The frame at which to start numbering when dis-
playing the project.
l i nearBl endi ng “Project linearBlending attribute” on
page 114
When true, linear blending is used for the project.
Method Reference Description
i tem() “Project item() method” on page 114 Retrieves an item from the project.
consol i dateFoot age() “Project consolidateFootage() method”
on page 112
Consolidates all footage in the project.
111
JavaScript Reference Project object
111
Project activeItem attribute
app. proj ect . act i veItem
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
app. proj ect . aut oFi xExpressi ons(ol dText , newText )
Description
Automatically replaces text found in broken expressions in the project, if the new text causes the expression to
evaluate without errors.
Parameters
Returns
Nothing.
removeUnusedFoot age() “Project removeUnusedFootage()
method” on page 115
Removes unused footage from the project.
reduceProj ect () “Project reduceProject() method” on
page 115
Reduces the project to a specified set of items.
cl ose() “Project close() method” on page 112 Closes the project with normal save options.
save() “Project save() method” on page 116 Saves the project.
saveWi t hDi al og() “Project saveWithDialog() method” on
page 116
Displays a Save dialog box.
i mpor t Pl acehol der() “Project importFileWithDialog()
method” on page 113
Imports a placeholder into the project.
i mpor t Fi l e() “Project importFile() method” on
page 113
Imports a file into the project.
i mpor t Fi l eWi t hDi al og() “Project importFileWithDialog()
method” on page 113
Displays an Import File dialog box.
showWi ndow() “Project showWindow() method” on
page 117
Shows or hides the Project panel.
aut oFi xExpressi ons() “Project autoFixExpressions() method”
on page 111
Automatically replaces text in all expressions.
ol dText The text to replace.
newText The new text.
Method Reference Description
112
JavaScript Reference Project object
112
Project bitsPerChannel attribute
app. proj ect . bi t sPerChannel
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
app. proj ect . cl ose(cl os eOpt i ons )
Description
Closes the project with the option of saving changes automatically, prompting the user to save changes or
closing without saving changes.
Parameters
Returns
Boolean. True on success. False if the file has not been previously saved, the user is prompted, and the user
cancels the save.
Project consolidateFootage() method
app. proj ect . consol i dateFoot age()
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
app. proj ect . di spl aySt ar t Frame
cl oseOpt i ons Action to be performed on close. A Cl oseOpt i ons enumerated value, one of:
Cl oseOpt i ons. DO_NOT_SAVE_CHANGES: Close without saving.
Cl oseOpt i ons. PROMPT_TO_SAVE_CHANGES: Prompt for whether to save
changes before close.
Cl oseOpt i ons. SAVE_CHANGES: Save automatically on close.
113
JavaScript Reference Project object
113
Description
The frame at which to start numbering when displaying the project with a t i mecodeDi spl ayType value of
Ti mecodeDi spl ayType. FRAMES. (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
app. proj ect . f i l e
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
app. proj ect . i mpor t Fi l e(i mpor t Opt i ons )
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 tems array.
Parameters
Returns
FootageItem object.
Example
app. proj ect . i mpor t Fi l e(new Impor t Opt i ons(Fi l e(“sampl e. psd”))
Project importFileWithDialog() method
app. proj ect . i mpor t Fi l eWi t hDi al og()
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.
i mpor t Opt i ons An ImportOptions object specifying the file to import and the options for the operation. See
“ImportOptions object” on page 74.
114
JavaScript Reference Project object
114
Project importPlaceholder() method
app. proj ect . i mpor t Pl acehol der(name, wi dt h, hei ght , f rameRat e, durat i on)
Description
Creates and returns a new PlaceholderItem object and adds it to the project’s i tems array. Same as the
File > Import > Placeholder command.
Parameters
Returns
PlaceholderItem object.
Project item() method
app. proj ect . i tem(i ndex)
Description
Retrieves an item at a specified index position.
Parameters
Returns
Item object.
Project items attribute
app. proj ect . i tems
Description
All of the items in the project.
Type
ItemCollection object; read-only.
Project linearBlending attribute
app. proj ect . l i nearBl endi ng
Description
True if linear blending should be used for this project; otherwise false.
name A string containing the name of the placeholder.
wi dt h The width of the placeholder in pixels, an integer in the range [4..30000].
hei ght The height of the placeholder in pixels, an integer in the range [4..30000].
f rameRate The frame rate of the placeholder, a floating-point value in the range [1.0..99.0]
durat i on The duration of the placeholder in seconds, a floating-point value in the range [0.0..10800.0].
i ndex The index position of the item, an integer. The first item is at index 1.
115
JavaScript Reference Project object
115
Type
Boolean; read/write.
Project numItems attribute
app. proj ect . numIt ems
Description
The total number of items contained in the project, including folders and all types of footage.
Type
Integer; read-only.
Example
n = app. proj ect . numItems;
al er t ("There are " + n + " i tems i n t hi s proj ect . ")
Project reduceProject() method
app. proj ect . reduceProj ect (ar ray_of _i t ems )
Description
Removes all items from the project except those specified. Same as the File > Reduce Project command.
Parameters
Returns
Integer; the total number of items removed.
Example
var t heItems = new Arr ay();
t heItems[t heItems. l engt h] = app. proj ect . i t em(1);
t heItems[t heItems. l engt h] = app. proj ect . i t em(3);
app. proj ect . reduceProj ect (t heIt ems);
Project removeUnusedFootage() method
app. proj ect . removeUnusedFoot age()
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.
arr ay_of _i tems An array containing the Item objects that are to be kept.
116
JavaScript Reference Project object
116
Project renderQueue attribute
app. proj ect . renderQueue
Description
The render queue of the project.
Type
RenderQueue object; read-only.
Project rootFolder attribute
app. proj ect . root Fol der
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
app. proj ect . save()
app. proj ect . save(f i l e)
Description
Saves the project. The same as the File > Save or File > Save As command. If the project has never previously
been saved and no file is specified, prompts the user for a location and file name. Pass a File object to save a
project to a new file without prompting.
Parameters
Returns
None.
Project saveWithDialog() method
app. proj ect . saveWi t hDi al 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.
f i l e Optional. An ExtendScript File object for the file to save.
117
JavaScript Reference Project object
117
Returns
Boolean; true if the project was saved.
Project selection attribute
app. proj ect . sel ect 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
app. proj ect . showWi ndow(doShow)
Description
Shows or hides the Project panel.
Parameters
Returns
Nothing.
Project timecodeBaseType attribute
app. proj ect . t i mecodeBaseType
Description
The Timecode Base option, as set in the Project Settings dialog box.
Type
A Ti mecodeBaseType enumerated value; read/write. One of:
Ti mecodeBaseType. AUTO
Ti mecodeBaseType. FPS24
Ti mecodeBaseType. FPS25
Ti mecodeBaseType. FPS30
Ti mecodeBaseType. FPS48
Ti mecodeBaseType. FPS50
Ti mecodeBaseType. FPS60
Ti mecodeBaseType. FPS100
Project timecodeDisplayType attribute
app. proj ect . t i mecodeDi spl ayType
doShow When true, show the Project panel. When false, hide the Project panel.
118
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 mecodeDi spl ayType enumerated value; read/write. One of:
Ti mecodeDi spl ayType. TI MECODE
Ti mecodeDi spl ayType. FRAMES
Ti mecodeDi spl ayType. FEET_AND_FRAMES
Project timecodeFilmType attribute
app. proj ect . t i mecodeFi l mType
Description
The film type, as set in the Feet + Frames option in the Project Settings dialog box.
Type
A Ti mecodeFi l mType enumerated value; read/write. One of:
Ti mecodeFi l mType. MM16
Ti mecodeFi l mType. MM35
Project timecodeNTSCDropFrame attribute
app. proj ect . t i mecodeNTSCDropFrame
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
app. proj ect . t r ansparencyGr i dThumbnai l s
Description
When true, thumbnail views use the transparency checkerboard pattern.
Type
Boolean; read/write.
119
JavaScript Reference Property object
119
Property object
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec
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
proper t yVal ueType “Property propertyValueType attribute”
on page 132
Type of value stored in this property.
val ue “Property value attribute” on page 139 Current value of the property.
hasMi n “Property hasMin attribute” on
page 124
When true, there is a minimum permitted value.
hasMax “Property hasMax attribute” on
page 124
When true, there is a maximum permitted value.
mi nVal ue “Property minValue attribute” on
page 131
The minimum permitted value.
maxVal ue “Property maxValue attribute” on
page 131
The maximum permitted value.
i sSpat i al “Property isSpatial attribute” on
page 125
When true, the property defines a spatial value.
canVar yOverTi me “Property canVaryOverTime attribute”
on page 123
When true, the property can be keyframed.
i sTi meVar yi ng “Property isTimeVarying attribute” on
page 125
When true, the property has keyframes or an
expression enabled that can vary its values.
numKeys “Property numKeys attribute” on
page 131
The number of keyframes on this property.
uni t sText “Property unitsText attribute” on
page 139
A text description of the units in which the value is
expressed.
expressi on “Property expression attribute” on
page 123
The expression string for this property.
canSet Expressi on “Property canSetExpression attribute”
on page 123
When true, the expression can be set by a script.
expressi onEnabl ed “Property expressionEnabled attribute”
on page 124
When true, the expression is used to generate val-
ues for the property.
expressi onError “Property expressionError attribute” on
page 124
The error, if any, that occurred when the last expres-
sion was evaluated.
120
JavaScript Reference Property object
120
Methods
sel ect edKeys “Property selectedKeys attribute” on
page 133
All selected keyframes of the property.
proper t yIndex “Property propertyIndex attribute” on
page 132
The position index of this property.
Method Reference Description
val ueAt Ti me() “Property valueAtTime() method” on
page 139
Gets the value of the property evalu-
ated at given time.
set Val ue() “Property setValue() method” on page 137 Sets the static value of the property.
set Val ueAt Ti me() “Property setValueAtTime() method” on
page 138
Creates a keyframe for the property.
set Val uesAt Ti mes() “Property setValuesAtTimes() method” on
page 138
Creates a set of keyframes for the prop-
erty.
set Val ueAt Key() “Property setValueAtKey() method” on
page 138
Finds a keyframe and sets the value of
the property at that keyframe.
nearest KeyIndex() “Property nearestKeyIndex() method” on
page 131
Gets the keyframe nearest to a specified
time.
keyTi me() “Property keyTime() method” on page 130 Gets the time at which a condition
occurs.
keyVal ue() “Property keyValue() method” on page 130 Gets the value of a keyframe at the time
at which a condition occurs.
addKey() “Property addKey() method” on page 123 Adds a new keyframe to the property at
a given time.
removeKey() “Property removeKey() method” on
page 133
Removes a keyframe from the property.
i sInt erpol at i onTypeVal i d() “Property isInterpolationTypeValid()
method” on page 125
When true, this property can be inter-
polated.
set Inter pol at i onTypeAt Key() “Property setInterpolationTypeAtKey()
method” on page 133
Sets the interpolation type for a key.
keyInInt erpol at i onType() “Property keyInInterpolationType() method”
on page 126
Gets the 'in' interpolation type for a key.
keyOut Interpol at i onType() “Property keyOutInterpolationType()
method” on page 127
Gets the 'out' interpolation type for a
key.
set Spat i al Tangent sAt Key() “Property setSpatialTangentsAtKey()
method” on page 136
Sets the “in” and “out” tangent vectors
for a key.
keyInSpat i al Tangent () “Property keyInSpatialTangent() method” on
page 126
Gets the “in” spatial tangent for a key.
keyOut Spat i al Tangent () “Property keyOutSpatialTangent() method”
on page 127
Gets the “out” spatial tangent for a key.
set Tempor al EaseAt Key() “Property setTemporalEaseAtKey() method”
on page 137
Sets the “in” and “out” temporal ease for
a key.
keyInTemporal Ease() “Property keyInTemporalEase() method” on
page 126
Gets the “in” temporal ease for a key.
Attribute Reference Description
121
JavaScript Reference Property object
121
Example: Get and set the value of opacity
var myProper t y = myLayer. opaci t y;
/ / opaci t y has proper t yVal ueType of OneD, and i s stored as a f l oat
myProper t y. set Val ue(0. 5);
/ / Vari abl e myOpaci t y i s a f l oat val ue
var myOpaci t y = myProper t y. val ue;
Example: Get and set the value of a position
var myProper t y = myLayer. posi t i on;
/ / posi t i on has proper t yVal ueType of ThreeD_SPATI AL, and i s st ored as an ar ray of 3 f l oat s
myProper t y. set Val ue([10. 0, 30. 0, 0. 0]);
/ / Vari abl e myPosi t i on i s an arr ay of 3 f l oat s
var myPosi t i on = myProper t y. val ue;
Example: Change the value of a mask shape to be open instead of closed
var myMask = myl ayer. mask(1);
var myProper t y = myMask. maskPat h;
myShape = myProper t y. val ue;
myShape. cl osed = f al se;
myProper t y. set Val ue(myShape);
keyOut Temporal Ease() “Property keyOutTemporalEase() method”
on page 128
Gets the “out” temporal ease for a key.
set Tempor al Cont i nuousAt Key() “Property setTemporalContinuousAtKey()
method” on page 136
Sets whether a keyframe has temporal
continuity.
keyTemporal Cont i nuous() “Property keyTemporalContinuous()
method” on page 130
Reports whether a keyframe has tem-
poral continuity.
set Tempor al AutoBezi erAt Key() “Property setTemporalAutoBezierAtKey()
method” on page 136
Sets whether a keyframe has temporal
auto-Bezier.
keyTemporal Aut oBezi er() “Property keyTemporalAutoBezier()
method” on page 129
Reports whether a keyframe has tem-
poral auto-Bezier.
set Spat i al Cont i nuousAt Key() “Property setSpatialContinuousAtKey()
method” on page 135
Sets whether a keyframe has spatial
continuity.
keySpat i al Cont i nuous() “Property keySpatialContinuous() method”
on page 129
Reports whether a keyframe has spatial
continuity.
set Spat i al AutoBezi erAt Key “Property setSpatialAutoBezierAtKey()
method” on page 135
Sets whether a keyframe has spatial
auto-Bezier.
keySpat i al Aut oBezi er() “Property keySpatialAutoBezier() method”
on page 129
Reports whether a keyframe has spatial
auto-Bezier.
set Rovi ngAt Key() “Property setRovingAtKey() method” on
page 134
Sets whether a keyframe is roving.
keyRovi ng() “Property keyRoving() method” on page 128 Reports whether a keyframe is roving.
set Sel ectedAt Key() “Property setSelectedAtKey() method” on
page 135
Sets whether a keyframe is selected.
keySel ect ed() “Property keySelected() method” on
page 128
Reports whether a keyframe is selected.
Method Reference Description
122
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:
var myProper t y = myLi ght . col or ;
var col orVal ue = myProper t y. val ueAt Ti me(2, t rue);
col orVal ue[0] = 0. 5 * col orVal ue[0];
myProper t y. set Val ueAt Ti me(4, col orVal ue);
Example: Check that a scale calculated by an expression at time 3.5 is the expected value of [10,50]
var myProper t y = myLayer. scal e;
/ / f al se val ue of preExpressi on means eval uate t he expressi on
var scal eVal ue = myProper t y. val ueAt Ti me(3. 5, f al se);
i f (scal eVal ue[0] == 10 && scal eVal ue[1] == 50) {
al er t ("hur ray");
}
el se {
al er t ("oops");
}
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.
myProper t y = myLayer. rot at i on;
myProper t y. set Val ueAt Ti me(0, 0);
myProper t y. set Val ueAt Ti me(5, 90);
myProper t y. set Val ueAt Ti me(10, 0);
Example: Change the keyframe values for the first three keyframes of some source text
myProper t y = myText Layer. sourceText ;
i f (myProper t y. numKeys < 3) {
al er t ("er ror, I t hought t here were 3 keyf rames");
}
el se {
myProper t y. set Val ueAt Key(1, new Text Document ("key number 1"));
myProper t y. set Val ueAt Key(2, new Text Document ("key number 2"));
myProper t y. set Val ueAt Key(3, new Text Document ("key number 3"));
}
Example: Set values using the convenience syntax for position, scale, color, or source text
/ / These t wo are equi val ent . The second f i l l s i n a def aul t of 0.
myLayer. posi t i on. set Val ue([20, 30, 0]);
myLayer. posi t i on. set Val ue([20, 30]);
/ / These t wo are equi val ent . The second f i l l s i n a def aul t of 100.
myLayer. scal e. set Val ue([50, 50, 100]);
myLayer. scal e. set Val ue([50, 50]);
/ / These t wo are equi val ent . The second f i l l s i n a def aul t of 1. 0
myLi ght . col or. set Val ue([. 8, . 3, . 1, 1. 0]);
myLi ght . col or. set Val ue([. 8, . 3, . 1]);
/ / These t wo are equi val ent . The second creates a Text Document
123
JavaScript Reference Property object
123
myText Layer. sourceText . set Val ue(new Text Document ("f oo"));
myText Layer. sourceText . set Val ue("f oo");
Property addKey() method
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. addKey(t i me)
Description
Adds a new keyframe or marker to the named property at the specified time and returns the index of the new
keyframe.
Parameters
Returns
Integer; the index of the new keyframe or marker.
Property canSetExpression attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. canSet Expressi on
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
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. canVar yOverTi me
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
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. expressi on
Description
The expression for the named property. Writeable only when canSet Expressi 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, expressi onEnabl ed becomes true.
t i me The time, in seconds, at which to add the keyframe. A floating-point value. The beginning of the composition is 0.
124
JavaScript Reference Property object
124
• If the string does not contain a valid expression, an error is generated, and expressi onEnabl ed becomes
false.
• If you set the attribute to the empty string, expressi onEnabl ed becomes false, but no error is generated.
Type
String; read/write if canSet Expressi on for the named property is true.
Property expressionEnabled attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. expressi onEnabl ed
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 canSet Expressi on
for the named property is true and expressi on contains a valid expression string.
Type
Boolean; read/write.
Property expressionError attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. expressi onEr ror
Description
Contains the error, if any, generated by evaluation of the string most recently set in expressi on. 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
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. hasMax
Description
When true, there is a maximum permitted value for the named property; otherwise false.
Type
Boolean; read-only.
Property hasMin attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. hasMi n
Description
When true, there is a minimum permitted value for the named property; otherwise false.
125
JavaScript Reference Property object
125
Type
Boolean; read-only.
Property isInterpolationTypeValid() method
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. i sInter pol at i onTypeVal i d(t ype)
Description
Returns true if the named property can be interpolated using the specified keyframe interpolation type.
Parameters
Returns
Boolean.
Property isSpatial attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. i sSpat 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
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. i sTi meVar yi 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 canVar yOverTi me must also be true.
Type
Boolean; read-only.
t ype A Keyf r ameInt er pol at i onType enumerated value; one of:
Keyf r ameInt erpol at i onType. LINEAR
Keyf r ameInt erpol at i onType. BEZIER
Keyf r ameInt erpol at i onType. HOLD
126
JavaScript Reference Property object
126
Property keyInInterpolationType() method
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. keyInInter pol at i onType(ke yIndex)
Description
Returns the 'in' interpolation type for the specified keyframe.
Parameters
Returns
A Keyf rameInter pol at i onType enumerated value; one of:
Keyf r ameInt erpol at i onType. LINEAR
Keyf r ameInt erpol at i onType. BEZIER
Keyf r ameInt erpol at i onType. HOLD
Property keyInSpatialTangent() method
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. keyInSpat i al Tangent (ke yIndex)
Description
Returns the incoming spatial tangent for the specified keyframe, if the named property is spatial (that is, the
value type is TwoD_SPATIAL or ThreeD_SPATIAL).
Parameters
Returns
Array of floating-point values:
• If the property value type is Proper t yVal ueType. TwoD_SPATIAL, the array contains 2 floating-point
values.
• If the property value type is Proper t yVal ueType. ThreeD_SPATIAL, the array contains 3 floating-point
values.
• If the property value type is neither of these types, an exception is generated.
Property keyInTemporalEase() method
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. keyInTemporal Ease(ke yIndex)
Description
Returns the incoming temporal ease for the specified keyframe.
Parameters
keyIndex The index for the keyframe. An integer in the range [1..numKeys], as returned by the addKey or nearest Key-
Index method.
keyIndex The index for the keyframe. An integer in the range [1..numKeys], as returned by the addKey or nearest Key-
Index method.
keyIndex The index for the keyframe. An integer in the range [1..numKeys], as returned by the addKey or nearest -
KeyIndex method.
127
JavaScript Reference Property object
127
Returns
Array of KeyframeEase objects:
• If the property value type is Proper t yVal ueType. TwoD, the array contains 2 objects.
• If the property value type is Proper t yVal ueType. ThreeD, the array contains 3 objects.
• For any other value type, the array contains 1 object.
Property keyOutInterpolationType() method
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. keyOut Int er pol at i onType(ke yIndex)
Description
Returns the outgoing interpolation type for the specified keyframe.
Parameters
Returns
A Keyf rameInter pol at i onType enumerated value; one of:
Keyf r ameInt erpol at i onType. LINEAR
Keyf r ameInt erpol at i onType. BEZIER
Keyf r ameInt erpol at i onType. HOLD
Property keyOutSpatialTangent() method
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. keyOut Spat i al Tangent (ke yIndex)
Description
Returns the outgoing spatial tangent for the specified keyframe.
Parameters
Returns
Array of floating-point values:
• If the property value type is Proper t yVal ueType. TwoD_SPATIAL, the array contains 2 floating-point
values.
• If the property value type is Proper t yVal ueType. ThreeD_SPATIAL, the array contains 3 floating-point
values.
• If the property value type is neither of these types, an exception is generated.
keyIndex The index for the keyframe. An integer in the range [1..numKeys], as returned by the addKey or nearest -
KeyIndex method.
keyIndex The index for the keyframe. An integer in the range [1..numKeys], as returned by the addKey or nearest -
KeyIndex method.
128
JavaScript Reference Property object
128
Property keyOutTemporalEase() method
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. keyOut Temporal Ease(ke yIndex)
Description
Returns the outgoing temporal ease for the specified keyframe.
Parameters
Returns
Array of KeyframeEase objects:
• If the property value type is Proper t yVal ueType. TwoD, the array contains 2 objects.
• If the property value type is Proper t yVal ueType. ThreeD, the array contains 3 objects.
• For any other value type, the array contains 1 object.
Property keyRoving() method
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. keyRovi ng(ke yIndex)
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 keyRovi ng() continues to return false.
If the property value type is neither TwoD_SPATIAL nor ThreeD_SPATIAL, an exception is generated.
Parameters
Returns
Boolean.
Property keySelected() method
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. keySel ected(ke yIndex)
Description
Returns true if the specified keyframe is selected.
Parameters
Returns
Boolean.
keyIndex The index for the keyframe. An integer in the range [1..numKeys], as returned by the addKey or nearest -
KeyIndex method.
keyIndex The index for the keyframe. An integer in the range [1..numKeys], as returned by the addKey or nearest -
KeyIndex method.
keyIndex The index for the keyframe. An integer in the range [1..numKeys], as returned by the addKey or nearest -
KeyIndex method.
129
JavaScript Reference Property object
129
Property keySpatialAutoBezier() method
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. keySpat i al AutoBezi er(ke yIndex)
Description
Returns true if the specified keyframe has spatial auto-Bezier interpolation. (This type of interpolation affects
this keyframe only if keySpat i al Cont i nuous(ke yIndex) is also true.)
If the property value type is neither TwoD_SPATIAL nor ThreeD_SPATIAL, an exception is generated.
Parameters
Returns
Boolean.
Property keySpatialContinuous() method
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. keySpat i al Cont i nuous(ke yIndex)
Description
Returns true if the specified keyframe has spatial continuity.
If the property value type is neither TwoD_SPATIAL nor ThreeD_SPATIAL, an exception is generated.
Parameters
Returns
Boolean.
Property keyTemporalAutoBezier() method
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. keyTemporal AutoBezi er(ke yIndex)
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
Keyf r ameInt erpol at i onType. BEZIER for both keyInInter pol at i onType(ke yIndex) and keyOut Inter pol a-
t i onType(ke yIndex).
Parameters
Returns
Boolean.
keyIndex The index for the keyframe. An integer in the range [1..numKeys], as returned by the addKey or nearest -
KeyIndex method.
keyIndex The index for the keyframe. An integer in the range [1..numKeys], as returned by the addKey or nearest -
KeyIndex method.
keyIndex The index for the keyframe. An integer in the range [1..numKeys], as returned by the addKey or nearest -
KeyIndex method.
130
JavaScript Reference Property object
130
Property keyTemporalContinuous() method
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. keyTemporal Cont i nuous(ke yIndex)
Description
Returns true if the specified keyframe has temporal continuity.
Temporal continuity affects this keyframe only if keyframe interpolation type is Keyf r ameInt erpol a-
t i onType. BEZIER for both keyInInt erpol at i onType(ke yIndex) and keyOut Int er pol at i onType(ke yIndex).
Parameters
Returns
Boolean.
Property keyTime() method
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. keyTi me(ke yIndex)
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. keyTi me(mar kerComment )
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

Returns
Floating-point value.
Property keyValue() method
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. keyVal ue(ke yIndex)
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. keyVal ue(markerComment )
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.
keyIndex The index for the keyframe. An integer in the range [1..numKeys], as returned by the addKey or nearest -
KeyIndex method.
keyIndex The index for the keyframe. An integer in the range [1..numKeys], as returned by the addKey or near-
est KeyIndex method.
markerComment The comment string attached to a marker (see “MarkerValue comment attribute” on page 100).
131
JavaScript Reference Property object
131
Parameters

Returns
Floating-point value.
Property maxValue attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. maxVal ue
Description
The maximum permitted value of the named property. If the hasMax attribute is false, an exception occurs,
and an error is generated.
Type
Floating-point value; read-only.
Property minValue attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. mi nVal ue
Description
The minimum permitted value of the named property. If the hasMi n attribute is false, an exception occurs,
and an error is generated.
Type
Floating-point value; read-only.
Property nearestKeyIndex() method
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. nearest KeyIndex(t i me)
Description
Returns the index of the keyframe nearest to the specified time.
Parameters
Returns
Integer.
Property numKeys attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. numKeys
keyIndex The index for the keyframe. An integer in the range [1..numKeys], as returned by the addKey or near-
est KeyIndex method.
markerComment The comment string attached to a marker (see “MarkerValue comment attribute” on page 100).
t i me The time in seconds; a floating-point value. The beginning of the composition is 0.
132
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
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. proper 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
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. proper t yVal ueType
Description
The type of value stored in the named property. The Proper t yVal ueType 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:
myl ayer. proper t y("posi t i on"). set Val ue([10, 20, 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:
var myShape = new Shape();
myShape. ver t i ces = [[0, 0], [0, 100], [100, 100], [100, 0]];
var myMask = myl ayer. proper t y("ADBE Mask Parade"). proper t y(1);
myMask. proper t y("ADBE Mask Shape"). set Val ue(myShape);
Type
A Proper t yVal ueType enumerated value; read/write. One of:
E
Proper t yVal ueType. NO_VALUE Stores no data.
Proper t yVal ueType. ThreeD_SPATIAL Array of three floating-point positional values. For example, an Anchor
Point value might be [10.0, 20.2, 0.0]
Proper t yVal ueType. ThreeD Array of three floating-point quantitative values. For example, a Scale
value might be [100.0, 20.2, 0.0]
Proper t yVal ueType. TwoD_SPATI AL Array of 2 floating-point positional values For example, an Anchor Point
value might be [5.1, 10.0]
Proper t yVal ueType. TwoD Array of 2 floating-point quantitative values. For example, a Scale value
might be [5.1, 100.0]
133
JavaScript Reference Property object
133
Property removeKey() method
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. removeKey(ke yIndex)
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
Returns
Nothing.
Property selectedKeys attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. sel ectedKeys
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
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. set Interpol at i onTypeAt Key(ke yIndex, i nType,
out Type)
Proper t yVal ueType. OneD A floating-point value.
Proper t yVal ueType. COLOR 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 yVal ueType. CUSTOM_VALUE Unimplemented type; you cannot get or set values for properties with this
type.
Proper t yVal ueType. MARKER MarkerValue object; see “MarkerValue object” on page 99.
Proper t yVal ueType. LAYER_INDEX Integer; a value of 0 means no layer.
Proper t yVal ueType. MASK_INDEX Integer; a value of 0 means no mask.
Proper t yVal ueType. SHAPE Shape object; see “Shape object” on page 165.
Proper t yVal ueType. TEXT_DOCUMENT TextDocument object; see “TextDocument object” on page 172.
keyIndex The index for the keyframe. An integer in the range [1..numKeys], as returned by the addKey or nearest -
KeyIndex method.
134
JavaScript Reference Property object
134
Description
Sets the ‘in’ and ‘out’ interpolation types for the specified keyframe.
Parameters
Returns
Nothing.
Property setRovingAtKey() method
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. set Rovi ngAt Key(ke yIndex, newVal )
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 keyRovi ng() continues to return false.
If the property value type is neither TwoD_SPATIAL nor ThreeD_SPATIAL, an exception is generated.
Parameters
Returns
Nothing.
keyIndex The index for the keyframe. An integer in the range [1..numKeys], as returned by the addKey
or nearest KeyIndex method.
i nType The incoming interpolation type. A Keyf rameInter pol at i onType enumerated value; one
of:
Keyf r ameInt erpol at i onType. LINEAR
Keyf r ameInt erpol at i onType. BEZIER
Keyf r ameInt erpol at i onType. HOLD
out Type (Optional) The outgoing interpolation type. If not supplied, the ‘out’ type is set to the i nType
value. A Keyf rameInter pol at i onType enumerated value; one of:
Keyf r ameInt erpol at i onType. LINEAR
Keyf r ameInt erpol at i onType. BEZIER
Keyf r ameInt erpol at i onType. HOLD
keyIndex The index for the keyframe. An integer in the range [1..numKeys], as returned by the addKey or nearest Key-
Index method.
newVal True to turn roving on, false to turn roving off.
135
JavaScript Reference Property object
135
Property setSelectedAtKey() method
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. set Sel ect edAt Key(ke yIndex, onOf f )
Description
Selects or deselects the specified keyframe.
Parameters
Returns
Nothing.
Property setSpatialAutoBezierAtKey() method
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. set Spat i al Aut oBezi erAt Key(keyIndex, newVal )
Description
Turns spatial auto-Bezier interpolation on or off for the specified keyframe.
If the property value type is neither TwoD_SPATIAL nor ThreeD_SPATIAL, an exception is generated.
Parameters
Returns
Nothing.
Property setSpatialContinuousAtKey() method
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. set Spat i al Cont i nuousAt Key(ke yIndex, newVal )
Description
Turns spatial continuity on or off for the specified keyframe.
If the property value type is neither TwoD_SPATIAL nor ThreeD_SPATIAL, an exception is generated.
Parameters
Returns
Nothing.
keyIndex The index for the keyframe. An integer in the range [1..numKeys], as returned by the addKey or nearest -
KeyIndex method.
onOf f True to select the keyframe, false to deselect it.
keyIndex The index for the keyframe. An integer in the range [1..numKeys], as returned by the addKey or nearest -
KeyIndex method.
newVal True to turn spatial auto-Bezier on, false to turn it off.
keyIndex The index for the keyframe. An integer in the range [1..numKeys], as returned by the addKey or nearest -
KeyIndex method.
newVal True to turn spatial continuity on, false to turn it off.
136
JavaScript Reference Property object
136
Property setSpatialTangentsAtKey() method
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. set Spat i al Tangent sAt Key(ke yIndex, i nTangent ,
out Tangent )
Description
Sets the incoming and outgoing tangent vectors for the specified keyframe.
If the property value type is neither TwoD_SPATIAL nor ThreeD_SPATIAL, an exception is generated.
Parameters
Returns
Nothing.
Property setTemporalAutoBezierAtKey() method
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. set Temporal Aut oBezi erAt Key(ke yIndex, newVal )
Description
Turns temporal auto-Bezier interpolation on or off for the specified keyframe. When this is turned on, it
affects this keyframe only if keySpat i al Cont i nuous(ke yIndex) is also true.
Parameters
Returns
Nothing.
Property setTemporalContinuousAtKey() method
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. set Temporal Cont i nuousAt Key(ke yIndex, newVal )
Description
Turns temporal continuity on or off for the specified keyframe.
keyIndex The index for the keyframe. An integer in the range [1..numKeys], as returned by the addKey or nearest -
KeyIndex method.
i nTangent The incoming tangent vector. An array of 2 or 3 floating-point values.
• If the property value type is Proper t yVal ueType. TwoD_SPATIAL, the array contains 2 values.
• If the property value type is Proper t yVal ueType. ThreeD_SPATIAL, the array contains 3 values.
out Tangent (Optional) The outgoing tangent vector. If not supplied, the ‘out’ tangent is set to the i nTangent value. An
array of 2 or 3 floating-point values.
• If the property value type is Proper t yVal ueType. TwoD_SPATIAL, the array contains 2 values.
• If the property value type is Proper t yVal ueType. ThreeD_SPATIAL, the array contains 3 values.
keyIndex The index for the keyframe. An integer in the range [1..numKeys], as returned by the addKey or nearest -
KeyIndex method.
newVal True to turn temporal auto-Bezier on, false to turn it off.
137
JavaScript Reference Property object
137
When temporal continuity is turned on, it affects this keyframe only if the keyframe interpolation type is
Keyf r ameInt erpol at i onType. BEZIER for both keyInInter pol at i onType(ke yIndex) and keyOut Inter pol a-
t i onType(ke yIndex).
Parameters
Returns
Nothing.
Property setTemporalEaseAtKey() method
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. set Temporal EaseAt Key(ke yIndex, i nTemporal Eas e,
out Temporal Eas e)
Description
Sets the incoming and outgoing temporal ease for the specified keyframe. See “KeyframeEase object” on
page 82.
Parameters
Returns
Nothing.
Property setValue() method
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. set Val ue(newVal ue)
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.
keyIndex The index for the keyframe. An integer in the range [1..numKeys], as returned by the addKey or nearest -
KeyIndex method.
newVal True to turn temporal continuity on, false to turn it off.
keyIndex The index for the keyframe. An integer in the range [1..numKeys], as returned by the addKey or near-
est KeyIndex method.
i nTempor al Ease The incoming temporal ease. An array of 1, 2, or 3 KeyframeEase objects.
• If the property value type is Proper t yVal ueType. TwoD, the array contains 2 objects.
• If the property value type is Proper t yVal ueType. ThreeD, the array contains 3 objects.
• For all other value types, the array contains 1 object.
out Temporal Ease (Optional) The outgoing temporal ease. If not supplied, the outgoing ease is set to the i nTempo-
ral Ease value. An array of 1, 2, or 3 KeyframeEase objects.
• If the property value type is Proper t yVal ueType. TwoD, the array contains 2 objects.
• If the property value type is Proper t yVal ueType. ThreeD, the array contains 3 objects.
• For all other value types, the array contains 1 object.
138
JavaScript Reference Property object
138
Parameters
Returns
Nothing.
Property setValueAtKey() method
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. set Val ueAt Key(ke yIndex, newVal ue)
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
Returns
Nothing.
Property setValueAtTime() method
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. set Val ueAt Ti me(t i me, newVal ue)
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
Returns
Nothing.
Property setValuesAtTimes() method
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. set Val uesAt Ti mes(t i mes , newVal ues )
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.
newVal ue A value appropriate for the type of property being set; see “Property propertyValueType attribute” on page 132.
keyIndex The index for the keyframe. An integer in the range [1..numKeys], as returned by the addKey or nearest -
KeyIndex method.
newVal ue A value appropriate for the type of property being set; see “Property propertyValueType attribute” on
page 132.
t i me The time in seconds, a floating-point value. The beginning of the composition is 0.
newVal ue A value appropriate for the type of property being set; see “Property propertyValueType
attribute” on page 132.
139
JavaScript Reference Property object
139
Times and values are expressed as arrays; the arrays must be of the same length.
Parameters
Returns
Nothing.
Property unitsText attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. uni t sText
Description
The text description of the units in which the value is expressed.
Type
String; read-only.
Property value attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. val ue
Description
The value of the named property at the current time.
• If expressi onEnabl ed 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
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. val ueAt Ti me(t i me, preExpres s i on)
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.
t i mes An array of times, in seconds. Each time is a floating-point value. The beginning of the compo-
sition is 0.
newVal ues A array of values appropriate for the type of property being set; see “Property propertyValue-
Type attribute” on page 132.
140
JavaScript Reference Property object
140
Parameters
Returns
A value appropriate for the type of the property (see “Property propertyValueType attribute” on page 132).
t i me The time in seconds; a floating-point value. The beginning of the composition is 0.
preExpressi on 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.
141
JavaScript Reference PropertyBase object
141
PropertyBase object
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec
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:
var ef f ect 1 = app. proj ect . i t em(1). l ayer(1). ef f ect ("Add Grai n")("Vi ewi ng Mode");
var ef f ect 1agai n = app. proj ect . i tem(1). l ayer(1). ef f ect . addGr ai n. vi ewi ngMode;
var ef f ect 1agai ntoo = app. proj ect . i tem(1). l ayer(1)("Ef f ect s"). addGrai n. vi ewi ngMode;
var ef f ect 1agai ntoo2 = app. proj ect . i t em(1). l ayer(1)("Ef f ect s")("Add Gr ai n")("Vi ewi ng Mode");
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":
var l ayer1 = app. proj ect . i t em(1). l ayer(1);
l ayer1. remove();
al er t (l ayer1. name); / / i nval i d ref erence to del eted obj ect
Similarly, if you reference an AE property in a deleted object, the warning occurs:
var l ayer1 = app. proj ect . i t em(1). l ayer(1);
var l ayer1posi t i on = l ayer1. t r ansf orm. posi t i on;
l ayer1. remove();
al er t (l ayer1posi t i on. val ue); / / i nval i d ref erence to proper t y i n sel ected obj ect
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:
var ef f ect 1 = app. proj ect . i t em(1). l ayer(1). ef f ect (1);
var ef f ect 2 = app. proj ect . i t em(1). l ayer(1). ef f ect (2);
var ef f ect 2par am = app. proj ect . i t em(1). l ayer(1). ef f ect (2). bl endWi t hOri gi nal ;
ef f ect 1. remove();
al er t (ef f ect 2. name); / / i nval i d ref erence because group i ndex posi t i ons have changed
Attributes
Attribute Reference Description
name “PropertyBase name attribute” on
page 145
Name of the property.
matchName “PropertyBase matchName attribute”
on page 144
A special name for the property used to build unique naming paths.
142
JavaScript Reference PropertyBase object
142
Methods
PropertyBase active attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. act i ve
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 enabl ed attribute.
Type
Boolean; read/write if canSet Enabl ed is true, read-only if canSet Enabl ed is false.
proper t yIndex “PropertyBase propertyIndex attribute”
on page 146
Index of this property within its parent group.
proper t yDept h “PropertyBase propertyDepth attribute”
on page 145
The number of levels of parent groups between this property and
the containing layer.
proper t yType “PropertyBase propertyType attribute”
on page 146
The property type.
parent Proper t y “PropertyBase parentProperty
attribute” on page 145
The immediate parent group of this property.
i sModi f i ed “PropertyBase isModified attribute” on
page 144
When true, the property has been changed since its creation.
canSet Enabl ed “PropertyBase canSetEnabled attribute”
on page 143
When true, the user interface displays an eyeball icon for this prop-
erty.
enabl ed “PropertyBase enabled attribute” on
page 144
When true, this property is enabled.
act i ve “PropertyBase active attribute” on
page 142
When true, this property is active.
el i ded “PropertyBase elided attribute” on
page 143
When true, this property is not displayed in the user interface.
i sEf f ect “PropertyBase isEffect attribute” on
page 144
When true, this property is an effect.
i sMask “PropertyBase isMask attribute” on
page 144
When true, this property is a mask.
sel ect ed “PropertyBase selected attribute” on
page 147
When true, this property is selected.
Method Reference Description
proper t yGroup() “PropertyBase propertyGroup()
method” on page 146
Gets the parent group for this property.
remove() “PropertyBase remove() method” on
page 147
Removes this from the project.
moveTo() “PropertyBase moveTo() method” on
page 145
Moves this property to a new position in its parent group.
dupl i cat e() “PropertyBase duplicate() method” on
page 143
Duplicates this property object.
Attribute Reference Description
143
JavaScript Reference PropertyBase object
143
PropertyBase canSetEnabled attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. canSet Enabl ed
Description
When true, you can set the enabl ed 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
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. dupl i cate()
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 Proper t yType. INDEXED_GROUP; see “PropertyBase propertyType attribute”
on page 146.
Parameters
None.
Returns
PropertyBase object.
PropertyBase elided attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. el i ded
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:
Text
Pat h Opt i ons
More Opt i ons
Ani mator 1
Ani mator 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.
144
JavaScript Reference PropertyBase object
144
PropertyBase enabled attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. enabl ed
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 canSet Enabl ed is true, read-only if canSet Enabl ed is false.
PropertyBase isEffect attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. i sEf f ect
Description
When true, this property is an effect PropertyGroup.
Type
Boolean; read-only.
PropertyBase isMask attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. i sMask
Description
When true, this property is a mask PropertyGroup.
Type
Boolean; read-only.
PropertyBase isModified attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. i sModi f i ed
Description
When true, this property has been changed since its creation.
Type
Boolean; read-only.
PropertyBase matchName attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. mat chName
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 name attribute value) or any changes to the application.
Unlike the display name, it is not localized.
145
JavaScript Reference PropertyBase object
145
An indexed group may not have a name value, but always has a matchName value. (An indexed group has the
type Proper t yType. INDEXED_GROUP; see “PropertyBase propertyType attribute” on page 146.)
Type
String; read-only.
PropertyBase moveTo() method
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. moveTo(newIndex)
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 Proper-
t yType. INDEXED_GROUP; see “PropertyBase propertyType attribute” on page 146.)
Parameters
Returns
Nothing.
PropertyBase name attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. name
Description
The display name of the property. (Compare “PropertyBase matchName attribute” on page 144.)
It is an error to set the name value if the property is not a child of an indexed group (that is, a property group
that has the type Proper t yType. INDEXED_GROUP; see “PropertyBase propertyType attribute” on page 146).
Type
String; read/write for a child of an indexed group; otherwise read-only.
PropertyBase parentProperty attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. parent Proper 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
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. proper t yDept h
newIndex The new index position at which to place this property in its group. An integer.
146
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
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. proper t yGroup()
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. proper t yGroup(count Up)
Description
Gets the PropertyGroup object for an ancestor group of this property at a specified level of the parent-child
hierarchy.
Parameters
Returns
PropertyGroup object, or null if the count reaches the containing layer.
PropertyBase propertyIndex attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. proper 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 Proper t yType. INDEXED_GROUP; see “PropertyBase propertyType attribute” on
page 146).
Type
Integer; read-only.
PropertyBase propertyType attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. proper t yType
Description
The type of this property.
Type
A Proper t yType enumerated value; read/write. One of:
count Up Optional. The number of levels to ascend within the parent-child hierarchy. An integer in the
range [1..proper t yDept h]. Default is 1, which gets the immediate parent.
Proper t yType. PROPERTY A single property such as position or zoom.
Proper t yType. INDEXED_GROUP A property group whose members have an editable name and an index. Effects
and masks are indexed groups. For example, the masks property of a layer
refers to a variable number of individual masks by index number.
147
JavaScript Reference PropertyBase object
147
PropertyBase remove() method
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. remove()
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 Proper-
t yType. INDEXED_GROUP; 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
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t ySpec. sel ected
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 sel ectedProper t i es attribute of a
Comp or Layer object.
Type
Boolean; read/write for an effect or mask property group, otherwise read-only.
Proper t yType. NAMED_GROUP A property group in which the member names are not editable. Layers are
named groups.
148
JavaScript Reference PropertyGroup object
148
PropertyGroup object
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t yGroupSpec
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
Methods
PropertyGroup addProperty() method
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t yGroupSpec. addProper t y(name)
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
Proper t yType. INDEXED_GROUP; 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 Proper t yType. NAMED_GROUP).
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 canAddProper t y before calling this method. (See “Property-
Group canAddProperty() method” on page 149.)
Attribute Reference Description
numProper t i es “PropertyGroup numProperties attribute” on page 149 The number of indexed properties in the group.
Method Reference Description
proper t y() “PropertyGroup property() method” on
page 150
Gets a member property or group.
canAddProper t y() “PropertyGroup canAddProperty() method”
on page 149
Reports whether a property can be added to the group.
addProper t y() “PropertyGroup addProperty() method” on
page 148
Adds a property to the group.
149
JavaScript Reference PropertyGroup object
149
Parameters
Returns
PropertyBase object.
PropertyGroup canAddProperty() method
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t yGroupSpec. canAddProper t y(name)
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”.
maskGroup. canAddProper t y("mask"); / / ret ur ns t rue
maskGroup. canAddProper t y("ADBE Mask Atom"); / / ret urns t r ue
maskGroup. canAddProper t y("bl end"); / / ret urns f al se
Parameters
Returns
Boolean.
PropertyGroup numProperties attribute
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t yGroupSpec. numProper 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.
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”.
name The display name or match name of the property to be checked. (See “PropertyGroup addProp-
erty() method” on page 148).
150
JavaScript Reference PropertyGroup object
150
PropertyGroup property() method
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t yGroupSpec. proper t y(i ndex)
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t yGroupSpec. proper t y(name)
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:
myl ayer. posi t i on
myl ayer("posi t i on")
myl ayer. proper t y("posi t i on")
myl ayer(1)
myl ayer. proper 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:
myLayer. proper t y("ADBE Masks"). proper t y(1)
Parameters

Returns
PropertyBase object or null if no child property with the specified string name is found.
Properties accessible by name
i ndex The index for the child property, in this is an indexed group. An integer in the range [0..numProper-
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.
From any Layer • "ADBE Mask Parade", or “Masks”
• "ADBE Effect Parade", or “Effects”
• "ADBE MTrackers", or “Motion Trackers”
151
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”
152
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:
myLayer. proper t y(“Ef f ect s”). proper t y(“Box Bl ur”);
myLayer. proper t y(“Ef f ect s”). proper t y(“boxBl ur”);
myLayer. proper t y(“Ef f ect s”). proper t y(“ADBE Box Bl ur”);
2 If a layer named “myLayer” has a mask named “Mask 1” you can retrieve it as follows:
myLayer. proper t y(“Masks”). proper t y(“Mask 1”);
3 To get a Bulge Center value from a Bulge effect, you can use either of the following:
myLayer. proper t y(“Ef f ect s”). proper t y(“Bul ge”). proper t y(“Bul ge Cent er”);
myLayer. proper t y(“Ef f ect s”). proper t y(“Bul ge”). proper t y(“bul geCent er”);
153
JavaScript Reference RenderQueue object
153
RenderQueue object
app. proj ect . renderQueue
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
Methods
RenderQueue item() method
app. proj ect . renderQueue. i t em(i ndex)
Description
Gets a specified item from the i tems collection.
Parameters
Returns
RenderQueueItem object.
Attribute Reference Description
render i ng “RenderQueue rendering attribute” on page 155 When true, a render is in progress.
numIt ems “RenderQueue numItems attribute” on page 154 The total number of items in the render queue.
i tems “RenderQueue items attribute” on page 154 The collection of items in the render queue.
Method Reference Description
showWi ndow() “RenderQueue showWindow() method”
on page 155
Show or hides the Render Queue panel.
render() “RenderQueue render() method” on
page 154
Starts the rendering process; does not return until render is
complete.
pauseRender i ng() “RenderQueue pauseRendering()
method” on page 154
Pauses or restarts the rendering process.
stopRenderi ng() “RenderQueue stopRendering()
method” on page 155
Stops the rendering process.
i tem() “RenderQueue item() method” on
page 153
Gets a render-queue item from the collection.
i ndex The position index of the item. An integer in the range [0..numItems].
154
JavaScript Reference RenderQueue object
154
RenderQueue items attribute
app. proj ect . renderQueue. i t ems
Description
A collection of all items in the render queue. See “RenderQueueItem object” on page 156.
Type
RQItemCollection object; read-only.
RenderQueue numItems attribute
app. proj ect . renderQueue. numItems
Description
The total number of items in the render queue.
Type
Integer; read-only.
RenderQueue pauseRendering() method
app. proj ect . renderQueue. pauseRender i ng(paus 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 onSt at usChanged or
onEr ror callback. See “RenderQueueItem onStatusChanged attribute” on page 158 and “Application onError
attribute” on page 26.
Parameters
Returns
Nothing.
RenderQueue render() method
app. proj ect . renderQueue. 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 pauseRender i ng()
or stopRender i ng() from an onEr ror or onSt at usChanged callback.
• To respond to errors during the rendering process, define a callback function in app. onError ; 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 RenderQueueIt em. onSt at usChanged in the associated RenderQueueItem object; see “Render-
QueueItem onStatusChanged attribute” on page 158.
pause True to pause a current render process, false to continue a paused render.
155
JavaScript Reference RenderQueue object
155
Parameters
None.
Returns
Nothing.
RenderQueue rendering attribute
app. proj ect . renderQueue. renderi ng
Description
When true, the rendering process is in progress or paused. When false, it is stopped.
Type
Boolean; read-only.
RenderQueue showWindow() method
app. proj ect . renderQueue. showWi ndow(doShow)
Description
Shows or hides the Render Queue panel.
Parameters
Returns
Nothing.
RenderQueue stopRendering() method
app. proj ect . renderQueue. st opRender i ng()
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 onSt at usChanged or onEr ror callback. See “RenderQueueItem onStatus-
Changed attribute” on page 158 and “Application onError attribute” on page 26.
Parameters
None.
Returns
Nothing.
doShow When true, show the Render Queue panel. When false, hide it.
156
JavaScript Reference RenderQueueItem object
156
RenderQueueItem object
app. proj ect . renderQueue. i t ems(i ndex)
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
Methods
Attribute Reference Description
numOut put Modul es “RenderQueueItem numOutputModules
attribute” on page 158
The total number of Output Modules assigned to the
item.
render “RenderQueueItem render attribute” on
page 159
When true, this item is rendered when the queue is
started.
st ar t Ti me “RenderQueueItem startTime attribute” on
page 160
The time when rendering began for the item.
el apsedSeconds “RenderQueueItem elapsedSeconds
attribute” on page 157
The time elapsed in the current rendering of this item.
t i meSpanSt ar t “RenderQueueItem timeSpanStart
attribute” on page 161
The start time in the composition to be rendered.
t i meSpanDur at i on “RenderQueueItem timeSpanDuration
attribute” on page 161
The duration of the composition to be rendered.
ski pFrames “RenderQueueItem skipFrames attribute”
on page 160
The number of frames to skip when rendering this item.
comp “RenderQueueItem comp attribute” on
page 157
The composition to be rendered by this item.
out put Modul es “RenderQueueItem outputModules
attribute” on page 159
The collection of Output Modules for this item.
templ ates “RenderQueueItem templates attribute” on
page 161
A set of Render Settings templates.
st at us “RenderQueueItem status attribute” on
page 160
The current rendering status of the item.
onSt at usChanged “RenderQueueItem onStatusChanged
attribute” on page 158
A callback function that is called during the rendering
process when the status of the item changes.
l ogType “RenderQueueItem logType attribute” on
page 158
A log type for this item.
Method Reference Description
out put Modul e() “RenderQueueItem outputModule() method” on
page 159
Gets an Output Module for the item.
remove() “RenderQueueItem remove() method” on page 159 Removes the item from the render queue.
saveAsTempl at e() “RenderQueueItem saveAsTemplate() method” on
page 160
Saves a new Render Settings template.
157
JavaScript Reference RenderQueueItem object
157
RenderQueueItem applyTemplate() method
app. proj ect . renderQueue. i t em. appl yTempl at e(t empl at eName)
Description
Applies a Render Settings template to the item. See also “RenderQueueItem saveAsTemplate() method” on
page 160 and “RenderQueueItem templates attribute” on page 161.
Parameters
Returns
Nothing.
RenderQueueItem comp attribute
app. proj ect . renderQueue. i t em(i ndex). comp
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
app. proj ect . renderQueue. i t em(i ndex). dupl i cate()
Description
Creates a duplicate of this item and adds it this render queue.
Parameters
None.
Returns
RenderQueueItem object.
RenderQueueItem elapsedSeconds attribute
app. proj ect . renderQueue. i t em(i ndex). el apsedSeconds
appl yTempl at e() “RenderQueueItem applyTemplate() method” on
page 157
Applies a Render Settings template.
dupl i cat e “RenderQueueItem duplicate() method” on page 157 Duplicates this item.
templ ateName A string containing the name of the template to apply.
Method Reference Description
158
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
app. proj ect . renderQueue. i t em(i ndex). out put Modul e. l ogType
Description
A log type for this item, indicating which events should be logged while this item is being rendered.
Type
A LogType enumerated value; (read/write). One of:
LogType. ERRORS_ONLY
LogType. ERRORS_AND_SETTI NGS
LogType. ERRORS_AND_PER_FRAME_I NFO
RenderQueueItem numOutputModules attribute
app. proj ect . renderQueue. i t em(i ndex). numOut put Modul es
Description
The total number of Output Modules assigned to this item.
Type
Integer; read-only.
RenderQueueItem onStatusChanged attribute
app. proj ect . renderQueue. i t em(i ndex). onSt at usChanged
Description
The name of a callback function that is called whenever the value of the RenderQueueItem. st at us 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 unct i on mySt at usChanged() {
al er t (app. proj ect . renderQueue. i t em(1). st at us)
}
159
JavaScript Reference RenderQueueItem object
159
app. proj ect . renderQueue. i t em(1). onSt at usChanged = mySt at usChanged();
app. proj ect . renderQueue. i t em(1). render = f al se; / / changes st at us and shows di al og
RenderQueueItem outputModules attribute
app. proj ect . renderQueue. i t em(i ndex). out put Modul es
Description
The collection of Output Modules for the item.
Type
OMCollection object; read-only.
RenderQueueItem outputModule() method
app. proj ect . renderQueue. i t em(i ndex). out put Modul e(i ndex)
Description
Gets an output module with the specified index position.
Parameters
Returns
OutputModule object.
RenderQueueItem remove() method
app. proj ect . renderQueue. i t em(i ndex). remove()
Description
Removes this item from the render queue.
Parameters
None.
Returns
Nothing.
RenderQueueItem render attribute
app. proj ect . renderQueue. i t em(i ndex). render
Description
When true, the item will be rendered when the render queue is started. When set to true, the Render-
QueueItem. st at us is set to RQIt emSt at us. QUEUED. When set to false, st at us is set to RQItem-
St at us. UNQUEUED.
i ndex The position index of the output module. An integer in the range [1..numOut put Modul es].
160
JavaScript Reference RenderQueueItem object
160
Type
Boolean; read/write.
RenderQueueItem saveAsTemplate() method
app. proj ect . renderQueue. i t em(i ndex). saveAsTempl ate(name)
Description
Saves the item’s current render settings as a new template with the specified name.
Parameters
Returns
Nothing.
RenderQueueItem skipFrames attribute
app. proj ect . renderQueue. i t em(i ndex). ski pFrames
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
app. proj ect . renderQueue. i t em(i ndex). st ar t Ti me
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
app. proj ect . renderQueue. i t em(i ndex). st at us
Description
The current render status of the item.
name A string containing the name of the new template.
161
JavaScript Reference RenderQueueItem object
161
Type
An RQItemSt at us enumerated value; read-only. One of:
RenderQueueItem templates attribute
app. proj ect . renderQueue. i t em(i ndex). templ ates
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
app. proj ect . renderQueue. i t em(i ndex). t i meSpanDurat 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
app. proj ect . renderQueue. i t em(i ndex). t i meSpanSt ar 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.
RQIt emSt at us. WILL_CONTINUE Rendering process has been paused.
RQIt emSt at us. NEEDS_OUTPUT Item lacks a valid output path.
RQIt emSt at us. UNQUEUED Item is listed in the Render Queue panel but composition is not ready to render.
RQIt emSt at us. QUEUED Composition is ready to render.
RQIt emSt at us. RENDERING Composition is rendering
RQIt emSt at us. USER_STOPPED Rendering process was stopped by user or script.
RQIt emSt at us. ERR_STOPPED Rendering process was stopped due to an error.
RQIt emSt at us. DONE Rendering process for the item is complete.
162
JavaScript Reference RQItemCollection object
162
RQItemCollection object
app. proj ect . renderQueue. i t ems
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
RQItemCollection add() method
app. proj ect . renderQueue. i t ems. add(comp)
Description
Adds a composition to the Render Queue, creating a RenderQueueItem.
Parameters
Returns
RenderQueueItem object.
Method Reference Description
add() “RQItemCollection add() method” on page 162 Adds a composition to the Render Queue.
comp The CompItem object for the composition to be added.
163
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
Settings getSetting() method
app. s et t i ngs . get Set t i ng(s ect i onName, ke yName)
Description
Retrieves a scripting preferences item value from the preferences file.
Parameters
Returns
String.
Example
If you have saved a setting named with the key name “Aligned Clone” in the “Eraser - Paint Settings” section,
you can retrieve the value with this script:
var n = app. set t i ngs. get Set t i ng("Eraser - Pai nt Set t i ngs", "Al i gned Cl one");
al er t ("The set t i ng i s " + n);
Settings haveSetting() method
app. s et t i ngs . haveSet t i ng(s ect i onName, ke yName)
Description
Returns true if the specified scripting preferences item exists and has a value.
Method Reference Description
saveSet t i ng() “Settings saveSetting() method” on page 164 Saves a default value for a setting.
get Set t i ng() “Settings getSetting() method” on page 163 Retrieves a setting value.
haveSet t i ng() “Settings haveSetting() method” on page 163 Reports whether a specified setting is assigned.
sect i onName A string containing the name of a settings section
keyName A string containing the key name of the setting item.
164
JavaScript Reference Settings object
164
Parameters
Returns
Boolean.
Settings saveSetting() method
app. s et t i ngs . saveSet t i ng(s ect i onName, ke yName, val ue)
Description
Saves a default value for a scripting preferences item.
Parameters
Returns
Nothing.
sect i onName A string containing the name of a settings section
keyName A string containing the key name of the setting item.
sect i onName A string containing the name of a settings section
keyName A string containing the key name of the setting item.
val ue A string containing the new value.
165
JavaScript Reference Shape object
165
Shape object
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t y(i ndex). proper t y("maskShape"). val ue
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 Shape(), 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 nTangent of [-2,-2] than it does for an i nTangent of
[-1,-1], even though both of these come toward the vertex from the same direction.
If a shape is not closed, the i nTangent for the first vertex and the out Tangent 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 i ces attribute and setting both i nTangent s
and out Tangent s 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 nTangent s and out Tangent s for connected straight-line
segments are 0, the default, and do not need to be explicitly set.
var myShape = new Shape();
myShape. ver t i ces = [[0, 0], [0, 100], [100, 100], [100, 0]];
myShape. cl osed = t r ue;
Example: Create a “U” shaped mask
A "U" is an open shape with the same 4 vertices used in the square:
var myShape = new Shape();
myShape. ver t i ces = [[0, 0], [0, 100], [100, 100], [100, 0]];
myShape. cl osed = f al se;
Example: Create an oval
An oval is a closed shape with 4 vertices and with i nTangent and out Tangent values:
var myShape = new Shape();
myShape. ver t i ces = [[300, 50], [200, 150], [300, 250], [400, 150]];
myShape. i nTangent s = [[55. 23, 0], [0, -55. 23], [-55. 23, 0], [0, 55. 23]];
myShape. out Tangent s = [[-55. 23, 0], [0, 55. 23], [55. 23, 0], [0, -55. 23]];
myShape. cl osed = t r ue;
166
JavaScript Reference Shape object
166
Attributes
Shape closed attribute
s hapeObj ect . val ue. cl osed
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 hapeObj ect . val ue. i nTangent 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 i ces 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 hapeObj ect . val ue. out Tangent s
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 i ces 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.
Attribute Reference Description
cl osed “Shape closed attribute” on page 166 When true, the shape is a closed curve.
ver t i ces “Shape vertices attribute” on page 167 The anchor points of the shape.
i nTangent s “Shape inTangents attribute” on page 166 The tangent vectors coming into the shape vertices.
out Tangent s “Shape outTangents attribute” on page 166 The tangent vectors coming out of the shape vertices.
167
JavaScript Reference Shape object
167
Type
Array of floating-point pair arrays; read/write.
Shape vertices attribute
s hapeObj ect . val ue. ver t i ces
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:
myShape. ver t i ces = [[0, 0], [0, 1], [1, 1], [1, 0]];
Type
Array of floating-point pair arrays; read/write.
168
JavaScript Reference ShapeLayer object
168
ShapeLayer object
app. proj ect . i tem(i ndex). l ayer(i ndex)
Description
The ShapeLayer object represents a shape layer within a composition. Create it using the LayerCollection
object’s addShape() 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.
169
JavaScript Reference SolidSource object
169
SolidSource object
app. proj ect . i tem(i ndex). mai nSource
app. proj ect . i tem(i ndex). proxySource
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
SolidSource color attribute
s ol i dSource. 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.
Attribute Reference Description
col or “SolidSource color attribute” on page 169 The color of the solid.
170
JavaScript Reference System object
170
System object
system
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 system global variable.
Example
al er t ("Your OS i s " + syst em. osName + " runni ng versi on " + syst em. osVersi on);
conf i rm("You are: " + system. userName + " runni ng on " + syst em. machi neName + ". ");
Attributes
Methods
System callSystem() method
system. cal l System (cmdLi neToExecute);
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 cmd. exe command, passing the command
to run in escaped quotes (\ ". . . \ "). For example, the following retrieves the current time and displays it to the
user:
var t i meSt r = system. cal l System("cmd. exe / c \ "t i me / t \ "");
al er t ("Cur rent t i me i s " + t i meSt r);
Parameters
Returns
The output from the command.
System machineName attribute
system. machi neName
Attribute Reference Description
userName “System userName attribute” on page 171 The current user name.
machi neName “System machineName attribute” on page 170 The name of the host computer.
osName “System osName attribute” on page 171 The name of the operating system.
osVersi on “System osVersion attribute” on page 171 The version of the operating system.
Method Reference Description
cal l System() “System callSystem() method” on page 170 Execute’s a command on the system’s command line.
cmdLi neToExecute A string containing the command and its parameters.
171
JavaScript Reference System object
171
Description
The name of the computer on which After Effects is running.
Type
String; read-only.
System osName attribute
system. osName
Description
The name of the operating system on which After Effects is running.
Type
String; read-only.
System osVersion attribute
system. osVersi on
Description
The version of the current local operating system.
Type
String; read-only.
System userName attribute
system. userName
Description
The name of the user currently logged on to the system.
Type
String; read-only.
172
JavaScript Reference TextDocument object
172
TextDocument object
new Text Document (docText )
app. proj ect . i tem(i ndex). l ayer(i ndex). proper t y("Source Text "). val ue
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:
var myText Document = new Text Document ("Happy Cake");
myText Layer. proper t y("Source Text "). set Val ue(myText Document );
al er t (myText Layer. proper t y("Source Text "). val ue);
This sets keyframe values for text that show different words over time:
var text Prop = myText Layer. proper t y("Source Text ");
text Prop. set Val ueAt Ti me(0, new Text Document ("Happy"));
text Prop. set Val ueAt Ti me(. 33, new Text Document ("cake"));
text Prop. set Val ueAt Ti me(. 66, new Text Document ("i s"));
text Prop. set Val ueAt Ti me(1, new Text Document ("yummy! "));
Attributes
TextDocument text attribute
t ext Document . text
Description
The text value for the text layer’s Source Text property.
Type
String; read/write.
Attribute Reference Description
text “TextDocument text attribute” on page 172 The text layer’s Source Text value.
173
JavaScript Reference TextLayer object
173
TextLayer object
app. proj ect . i tem(i ndex). l ayer(i ndex)
Description
The TextLayer object represents a text layer within a composition. Create it using the LayerCollection object’s
addText 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:
Text
Source Text
Pat h Opt i ons
Pat h
Reverse Pat h
Per pendi cul ar To Pat h
Force Al i gnment
Fi rst Margi n
Last Margi n
More Opt i ons
Anchor Poi nt Groupi ng
Groupi ng Al i gnment
Fi l l & St roke
Inter-Character Bl endi ng
Ani mators
Unused Properties and Attributes
The Ti me Remap and Mot i on Tr ackers properties, inherited from AVLayer, are not applicable to text layers,
and their related AVLayer attributes are not used:
canSet Ti meRemapEnabl ed
t i meRemapEnabl ed
t r ackMat teType
i sTrackMat te
hasTrackMat te
174
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
http://share.studio.adobe.com, and choose Script in the Adobe After Effects section.
Save and increment
This script, save_and_i ncrement . 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.
175
Examples Render named items
175
Render named items
This script, renderNamedIt ems. j sx, 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 sect i onName and keyName 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, newRenderLocat i ons. j sx, 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, smar t Impor t . j sx, 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, processFol der(), to import each of the files in the chosen folder, which uses several
helper functions.
• Defines a helper function, test ForSequence(), 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
176
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 test ForSequence().
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 mpor t Opt i ons. f orceAl phabet i cal =
t rue.
• Calls the main function, processFol der().
Render and e-mail
This script, render_and_emai l . j sx, 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, emai l _met hods. j sx (to
send the e-mail properly) and emai l _set up. 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 emai l _set up. j sx 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 emai l _met hods. j sx script
• Displays an error if for any reason it is unable to send the mail.
A helper script, emai l _met hods. j sx, 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, emai l _set up. j sx, 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, Conver t Sel ected Proper t i es to Markers. 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.
177
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.
178
After Effects Object Summary
This code dump summarizes all public JavaScript objects (instantiable classes) and enumerated types defined
for After Effects CS3.
========================================================================
Al phaMode enum
---------------------------------------------------------------------------
Al phaMode. IGNORE
Al phaMode. PREMULTI PLI ED
Al phaMode. STRAIGHT
========================================================================
Appl i cat i on obj ect
---------------------------------------------------------------------------
act i vate() no ret urn
begi nSuppressDi al ogs() no ret urn
begi nUndoGroup(st ri ng undoName) no ret ur n
bui l dName : st ri ng : readOnl y
bui l dNumber : i nteger : readOnl y
cancel Task(i nt eger t askI D) no ret urn
endSuppressDi al ogs(bool ean showAl er t ) no ret urn
endUndoGroup() no ret urn
endWat chFol der() no ret urn
exi t Af terLaunchAndEval : bool ean : read/ wr i te
exi t Code : i nt eger : read/ wr i t e
f i ndMenuCommandId() ret urns i nt eger
i sProf essi onal Versi on : bool ean : readOnl y
i sRenderEngi ne : bool ean : readOnl y
i sUISuppressed : bool ean : readOnl y
i sWatchFol der : bool ean : readOnl y
l anguage : Language : readOnl y
memor yInUse : number : readOnl y
newProj ect () no ret ur n
open([Fi l e f i l e]) ret urns Proj ect
openTempl ate(Fi l e f i l eToOpenWi t hTempl at eSemant i cs) no ret urn
parseSwatchFi l e(Fi l e swatchFi l e) ret urns SwatchObj ect
pauseWatchFol der(bool ean doPause) no ret ur n
proj ect : Proj ect : readOnl y
purge(PurgeTarget t arget ) no ret urn
qui t () no ret urn
saveProj ect OnCrash : bool ean : read/ wr i te
schedul eTask(st r i ngToExecute, f l oat del ay, bool ean repeat ) ret urns t askID
set Memor yUsageLi mi t s(f l oat i mageCachePercent , f l oat maxi mumMemor yPercent ) no ret urn
set SavePref erencesOnQui t (bool ean doSave) no ret urn
set t i ngs : Set t i ngs : readOnl y
179
After Effects Object Summary
179
versi on : st ri ng : readOnl y
watchFol der(Fi l e f i l e) no ret urn
onEr ror(st r i ng errorSt ri ng, st r i ng sever i t y) no ret ur n
=======================================================================
AVLayer obj ect
---------------------------------------------------------------------------
(i nteger proper t yIndex) ret urns Proper t yBase
(st ri ng proper t yName) ret urns Proper t yBase
act i ve : bool ean : readOnl y
act i veAt Ti me(f l oat at Ti me) ret urns bool ean
addProper t y(st r i ng proper t yName) ret urns Proper t yBase
adj ust ment Layer : bool ean : read/ wri te
appl yPreset (st r i ng preset Name) no ret urn
audi oAct i ve : bool ean : readOnl y
audi oAct i veAt Ti me(f l oat at Ti me) ret ur ns bool ean
audi oEnabl ed : bool ean : read/ wr i t e
aut oOr i ent : AutoOri ent Type : read/ wr i te
bl endi ngMode : Bl endi ngMode : read/ wr i te
cal cul ateTransf ormFromPoi nt s(Ar ray [top, l ef t ], Ar ray [top, r i ght ], Arr ay [bot tom, r i ght ])
ret urns Obj ect wi t h t ransf or m proper t i es set
canAddProper t y(st r i ng proper t yName) ret urns bool ean
canSet Col l apseTr ansf ormat i on : bool ean : readOnl y
canSet Enabl ed : bool ean : readOnl y
canSet Ti meRemapEnabl ed : bool ean : readOnl y
col l apseTransf ormat i on : bool ean : read/ wr i te
comment : st r i ng : read/ wr i te
cont ai ni ngComp : CompIt em : readOnl y
copyToComp(CompItem i ntoComp) no ret urn
dupl i cat e() ret ur ns AVLayer
ef f ect sAct i ve : bool ean : read/ wr i t e
el i ded : bool ean : readOnl y
enabl ed : bool ean : read/ wr i te
f rameBl endi ng : bool ean : readOnl y
f rameBl endi ngType : FrameBl endi ngType : read/ wr i te
gui deLayer : bool ean : read/ wr i te
hasAudi o : bool ean : readOnl y
hasTrackMat te : bool ean : readOnl y
hasVi deo : bool ean : readOnl y
hei ght : f l oat : readOnl y
i nPoi nt : f l oat : read/ wr i te
i ndex : i nteger : readOnl y
i sEf f ect : bool ean : readOnl y
i sMask : bool ean : readOnl y
i sModi f i ed : bool ean : readOnl y
i sNameFromSource : bool ean : readOnl y
i sNameSet : bool ean : readOnl y
i sTrackMat te : bool ean : readOnl y
l ocked : bool ean : read/ wr i te
matchName : st r i ng : readOnl y
mot i onBl ur : bool ean : read/ wr i te
moveAf t er(Layer ot herLayer) no ret urn
180
After Effects Object Summary
180
moveBef ore(Layer ot herLayer) no ret urn
moveTo(i nteger i ndex) no ret urn
moveToBegi nni ng() no ret urn
moveToEnd() no ret urn
name : st r i ng : read/ wr i te
nul l Layer : bool ean : readOnl y
numProper t i es : i nteger : readOnl y
out Poi nt : f l oat : read/ wr i te
parent : Layer : read/ wr i t e
parent Proper t y : Proper t yGroup : readOnl y
preser veTransparency : bool ean : read/ wri te
proper t y(i nteger proper t yIndex) ret urns Proper t yBase
proper t y(st r i ng proper t yName) ret urns Proper t yBase
proper t yDept h : i nteger : readOnl y
proper t yGroup([i nteger count Up]) ret urns Proper t yGroup
proper t yType : Proper t yType : readOnl y
qual i t y : LayerQual i t y : read/ wr i te
remove() no ret urn
repl aceSource(Item newSource, bool ean f i xExpressi ons) no ret urn
sel ect ed : bool ean : read/ wri te
sel ect edProper t i es : Arr ay of Proper t yBase: readOnl y
set Parent Wi t hJump(Layer newParent ) no ret urn
shy : bool ean : read/ wri te
sol o : bool ean : read/ wr i t e
source : AVItem : readOnl y
sourceRect At Ti me(f l oat at Ti me, bool ean i ncl udeExtent s)
ret urns Obj ect wi t h f l oat proper t i es: top; l ef t ; wi dt h; hei ght
st ar t Ti me : f l oat : read/ wri te
st ret ch : f l oat : read/ wr i te
t hreeDLayer : bool ean : read/ wr i te
t hreeDPerChar : bool ean : read/ wri t e
t i me : f l oat : readOnl y
t i meRemapEnabl ed : bool ean : read/ wr i t e
t r ackMat t eType : TrackMat teType : read/ wr i te
wi dt h : f l oat : readOnl y
=======================================================================
Bl endi ngMode enum
---------------------------------------------------------------------------
Bl endi ngMode. ADD
Bl endi ngMode. ALPHA_ADD
Bl endi ngMode. CLASSI C_COLOR_BURN
Bl endi ngMode. CLASSI C_COLOR_DODGE
Bl endi ngMode. CLASSI C_DI FFERENCE
Bl endi ngMode. COLOR
Bl endi ngMode. COLOR_BURN
Bl endi ngMode. COLOR_DODGE
Bl endi ngMode. DANCI NG_DI SSOLVE
Bl endi ngMode. DARKEN
Bl endi ngMode. DARKER_COLOR
Bl endi ngMode. DI FFERENCE
Bl endi ngMode. DI SSOLVE
181
After Effects Object Summary
181
Bl endi ngMode. EXCLUSI ON
Bl endi ngMode. HARD_LI GHT
Bl endi ngMode. HARD_MI X
Bl endi ngMode. HUE
Bl endi ngMode. LI GHTEN
Bl endi ngMode. LI GHTER_COLOR
Bl endi ngMode. LI NEAR_BURN
Bl endi ngMode. LI NEAR_DODGE
Bl endi ngMode. LI NEAR_LI GHT
Bl endi ngMode. LUMI NESCENT_PREMUL
Bl endi ngMode. LUMI NOSI TY
Bl endi ngMode. MULTI PLY
Bl endi ngMode. NORMAL
Bl endi ngMode. OVERLAY
Bl endi ngMode. PI N_LI GHT
Bl endi ngMode. SATURATI ON
Bl endi ngMode. SCREEN
Bl endi ngMode. SI LHOUETE_ALPHA
Bl endi ngMode. SI LHOUETTE_LUMA
Bl endi ngMode. SOFT_LI GHT
Bl endi ngMode. STENCI L_ALPHA
Bl endi ngMode. STENCI L_LUMA
Bl endi ngMode. VIVID_LIGHT
=======================================================================
Cl oseOpt i ons enum
---------------------------------------------------------------------------
Cl oseOpt i ons. DO_NOT_SAVE_CHANGES
Cl oseOpt i ons. PROMPT_TO_SAVE_CHANGES
Cl oseOpt i ons. SAVE_CHANGES
=======================================================================
CompIt em obj ect
---------------------------------------------------------------------------
act i veCamera : Layer : readOnl y
appl yPreset (st r i ng preset Name) no ret urn
bgCol or : Ar ray of f l oat : read/ wri te
comment : st r i ng : read/ wr i te
di spl aySt ar t Ti me : f l oat : read/ wri te
draf t 3d : bool ean : read/ wr i te
dupl i cat e() ret ur ns CompItem
durat i on : f l oat : read/ wr i te
f oot ageMi ssi ng : bool ean : readOnl y
f rameBl endi ng : bool ean : read/ wr i te
f rameDurat i on : f l oat : read/ wri te
f rameRate : f l oat : read/ wri te
hasAudi o : bool ean : readOnl y
hasVi deo : bool ean : readOnl y
hei ght : i nt eger : read/ wri t e
hi deShyLayers : bool ean : read/ wri te
i d : i nteger : readOnl y
l ayer(i nt eger l ayerIndex) ret urns Layer
l ayer(st r i ng l ayerName) ret urns Layer
182
After Effects Object Summary
182
l ayer(Layer ot herLayer, i nteger rel at i veIndex) ret urns Layer
l ayers : LayerCol l ect i on: readOnl y
mot i onBl ur : bool ean : read/ wr i te
name : st r i ng : read/ wr i te
numLayers : i nteger : readOnl y
parent Fol der : Fol derItem : read/wr i te
pi xel Aspect : f l oat : read/ wr i te
preser veNestedFrameRate : bool ean : read/ wr i te
preser veNestedResol ut i on : bool ean : read/ wr i te
proxySource : Foot ageSource : readOnl y
remove() no ret urn
renderer : st r i ng : read/ wr i te
renderers : Arr ay of st r i ng: readOnl y
resol ut i onFactor : Arr ay of i nteger : read/ wr i te
sel ect ed : bool ean : read/ wri te
sel ect edLayers : Arr ay of Layer : readOnl y
sel ect edProper t i es : Arr ay of Proper t yBase: readOnl y
set Proxy(Fi l e proxyFi l e) no ret urn
set ProxyToNone() no ret urn
set ProxyWi t hPl acehol der(st r i ng name, i nteger wi dt h, i nteger hei ght , f l oat f rameRate, f l oat dur at i on)
no ret urn
set ProxyWi t hSequence(Fi l e proxyFi l e, bool ean f orceAl phabet i cal ) no ret urn
set ProxyWi t hSol i d(Ar rayOf Fl oat col or, st r i ng name, i nteger wi dt h, i nteger hei ght ,
f l oat pi xel AspecRat i o) no ret urn
shut terAngl e : i nteger : read/ wri te
shut terPhase : i nteger : read/ wr i te
t i me : f l oat : read/ wr i te
t ypeName : st ri ng : readOnl y
useProxy : bool ean : read/ wr i te
usedIn : Ar ray of CompItem : readOnl y
wi dt h : i nt eger : read/ wr i te
workAreaDurat i on : f l oat : read/ wr i te
workAreaSt ar t : f l oat : read/ wr i te
=======================================================================
Fi el dSepar at i onType enum
---------------------------------------------------------------------------
Fi el dSepar at i onType. LOWER_FIELD_FIRST
Fi el dSepar at i onType. OFF
Fi el dSepar at i onType. UPPER_FI ELD_FI RST
=======================================================================
Fi l eSource obj ect
---------------------------------------------------------------------------
al phaMode : Al phaMode : read/ wri te
conf ormFrameRate : f l oat : read/ wri te
di spl ayFrameRate : f l oat : readOnl y
f i el dSeparat i onType : Fi el dSeparat i onType : readOnl y
f i l e : Fi l e : readOnl y
guessAl phaMode() no ret urn
guessPul l down(Pul l downMet hod pul l downMet hod) no ret urn
hasAl pha : bool ean : readOnl y
hi ghQual i t yFi el dSeparat i on : bool ean : read/ wr i t e
183
After Effects Object Summary
183
i nver t Al pha : bool ean : read/ wr i te
i sSt i l l : bool ean : readOnl y
l oop : i nteger : read/ wri te
mi ssi ngFoot agePat h : st r i ng : readOnl y
nat i veFrameRate : f l oat : readOnl y
premul Col or : Ar ray of f l oat : read/ wr i t e
rel oad() no ret urn
removePul l down : Pul l downPhase : readOnl y
======================================================================
Fol derItem obj ect
---------------------------------------------------------------------------
comment : st r i ng : read/ wr i te
i d : i nteger : readOnl y
i tem(i nteger i temIndex) ret urns It em
i tems : ItemCol l ect i on : readOnl y
name : st r i ng : read/ wr i te
numIt ems : i nt eger : readOnl y
parent Fol der : Fol derItem : read/wr i te
remove() no ret urn
sel ect ed : bool ean : read/ wri te
t ypeName : st ri ng : readOnl y
=======================================================================
Foot ageItem obj ect
---------------------------------------------------------------------------
comment : st r i ng : read/ wr i te
durat i on : f l oat : readOnl y
f i l e : Fi l e : readOnl y
f oot ageMi ssi ng : bool ean : readOnl y
f rameDurat i on : f l oat : readOnl y
f rameRate : f l oat : readOnl y
hasAudi o : bool ean : readOnl y
hasVi deo : bool ean : readOnl y
hei ght : i nt eger : read/ wri t e
i d : i nteger : readOnl y
mai nSource : Foot ageSource : readOnl y
name : st r i ng : read/ wr i te
parent Fol der : Fol derItem : read/wr i te
pi xel Aspect : f l oat : read/ wr i te
proxySource : Foot ageSource : readOnl y
remove() no ret urn
repl ace(Fi l e proxyFi l e) no ret urn
repl aceWi t hPl acehol der(st ri ng name, i nt eger wi dt h, i nteger hei ght , f l oat f r ameRat e, f l oat durat i on)
no ret urn
repl aceWi t hSequence(Fi l e proxyFi l e, bool ean f orceAl phabet i cal ) no ret urn
repl aceWi t hSol i d(Ar rayOf Fl oat col or, st ri ng name, i nt eger wi dt h, i nteger hei ght , f l oat pi xel AspecRat i o)
no ret urn
sel ect ed : bool ean : read/ wri te
set Proxy(Fi l e proxyFi l e) no ret urn
set ProxyToNone() no ret urn
set ProxyWi t hPl acehol der(st r i ng name, i nteger wi dt h, i nteger hei ght , f l oat f rameRate, f l oat dur at i on)
no ret urn
184
After Effects Object Summary
184
set ProxyWi t hSequence(Fi l e proxyFi l e, bool ean f orceAl phabet i cal ) no ret urn
set ProxyWi t hSol i d(Ar rayOf Fl oat col or, st r i ng name, i nteger wi dt h, i nteger hei ght ,
f l oat pi xel AspecRat i o) no ret urn
t i me : f l oat : readOnl y
t ypeName : st ri ng : readOnl y
useProxy : bool ean : read/ wr i te
usedIn : Ar ray of CompItem : readOnl y
wi dt h : i nt eger : read/ wr i te
=======================================================================
Impor t AsType enum
---------------------------------------------------------------------------
Impor t AsType. COMP
Impor t AsType. COMP_CROPPED_LAYERS
Impor t AsType. FOOTAGE
Impor t AsType. PROJ ECT
=======================================================================
Impor t Opt i ons obj ect
---------------------------------------------------------------------------
new Impor t Opt i ons(Fi l e f i l eToImpor t ) ret urns Impor t Opt i ons
canImpor t As(Impor t AsType asType) ret urns bool ean
f i l e : Fi l e : read/ wr i te
f orceAl phabet i cal : bool ean : read/ wr i te
i mpor t As : Impor t AsType : read/ wr i t e
sequence : bool ean : read/ wr i te
=======================================================================
ItemCol l ect i on obj ect
---------------------------------------------------------------------------
addComp(st ri ng name, i nt eger wi dt h, i nteger hei ght , f l oat pi xel Aspect Rat i o, f l oat durat i on,
f l oat f rameRate) ret urns CompItem
addFol der(st r i ng name) ret urns Fol derItem
=======================================================================
Keyf r ameEase obj ect
---------------------------------------------------------------------------
new Keyf rameEase(f l oat speed, f l oat i nf l uence) ret urns Keyf rameEase
i nf l uence : f l oat : read/ wr i te
speed : f l oat : read/ wr i te
=======================================================================
Keyf r ameInt erpol at i onType enum
---------------------------------------------------------------------------
Keyf r ameInt er pol at i onType. BEZIER
Keyf r ameInt er pol at i onType. HOLD
Keyf r ameInt er pol at i onType. LINEAR
======================================================================
Language enum
---------------------------------------------------------------------------
Language. ENGLI SH
Language. FRENCH
Language. GERMAN
Language. I TALI AN
Language. JAPANESE
Language. SPANI SH
185
After Effects Object Summary
185
======================================================================
CameraLayer obj ect
---------------------------------------------------------------------------
(i nteger proper t yIndex) ret urns Proper t yBase
(st ri ng proper t yName) ret urns Proper t yBase
act i ve : bool ean : readOnl y
act i veAt Ti me(f l oat at Ti me) ret urns bool ean
addProper t y(st r i ng proper t yName) ret urns Proper t yBase
adj ust ment Layer : bool ean : readOnl y
appl yPreset (st r i ng preset Name) no ret urn
aut oOr i ent : AutoOri ent Type : read/ wr i te
canAddProper t y(st r i ng proper t yName) ret urns bool ean
canSet Enabl ed : bool ean : readOnl y
comment : st r i ng : read/ wr i te
cont ai ni ngComp : CompIt em : readOnl y
copyToComp(CompItem i ntoComp) no ret urn
dupl i cat e() ret ur ns Camer aLayer
el i ded : bool ean : readOnl y
enabl ed : bool ean : read/ wr i te
hasVi deo : bool ean : readOnl y
i nPoi nt : f l oat : read/ wr i te
i ndex : i nteger : readOnl y
i sEf f ect : bool ean : readOnl y
i sMask : bool ean : readOnl y
i sModi f i ed : bool ean : readOnl y
i sNameSet : bool ean : readOnl y
l ocked : bool ean : read/ wr i te
matchName : st r i ng : readOnl y
moveAf t er(Layer ot herLayer) no ret urn
moveBef ore(Layer ot herLayer) no ret urn
moveTo(i nteger i ndex) no ret urn
moveToBegi nni ng() no ret urn
moveToEnd() no ret urn
name : st r i ng : read/ wr i te
nul l Layer : bool ean : readOnl y
numProper t i es : i nteger : readOnl y
out Poi nt : f l oat : read/ wr i te
parent : Layer : read/ wr i t e
parent Proper t y : Proper t yGroup : readOnl y
proper t y(i nteger proper t yIndex) ret urns Proper t yBase
proper t y(st r i ng proper t yName) ret urns Proper t yBase
proper t yDept h : i nteger : readOnl y
proper t yGroup([i nteger count Up]) ret urns Proper t yGroup
proper t yType : Proper t yType : readOnl y
remove() no ret urn
sel ect ed : bool ean : read/ wri te
sel ect edProper t i es : Arr ay of Proper t yBase: readOnl y
set Parent Wi t hJump(Layer newParent ) no ret urn
shy : bool ean : read/ wri te
sol o : bool ean : read/ wr i t e
st ar t Ti me : f l oat : read/ wri te
186
After Effects Object Summary
186
st ret ch : f l oat : read/ wr i te
t i me : f l oat : readOnl y
======================================================================
LayerCol l ect i on obj ect
---------------------------------------------------------------------------
add(AVItem t heItem,
[f l oat durat i on]) ret ur ns AVLayer
addCamer a(st ri ng name,
Ar r ayOf Fl oat centerPoi nt ) ret ur ns Layer
addLi ght (st r i ng name,
Ar r ayOf Fl oat centerPoi nt ) ret ur ns Layer
addNul l ([f l oat dur at i on]) ret urns AVLayer
addShape() ret urns Layer
addSol i d(Ar rayOf Fl oat col or, st r i ng name, i nteger wi dt h, i nt eger hei ght , f l oat pi xel Aspect Rat i o,
[f l oat durat i on]) ret urns AVLayer
addText ([Text Document text Doc]) ret urns AVLayer
addText (st r i ng text ) ret urns AVLayer
byName(st ri ng name) ret urns Layer
precompose(Ar rayOf Int eger l ayerIndi ces, st r i ng name, [bool ean moveAl l At t r i but es])
ret urns CompItem
======================================================================
LayerQual i t y enum
---------------------------------------------------------------------------
LayerQual i t y. BEST
LayerQual i t y. DRAFT
LayerQual i t y. WIREFRAME
====================================================================
LogType enum
---------------------------------------------------------------------------
LogType. ERRORS_AND_PER_FRAME_I NFO
LogType. ERRORS_AND_SETTI NGS
LogType. ERRORS_ONLY
======================================================================
MarkerVal ue obj ect
---------------------------------------------------------------------------
new MarkerVal ue(st r i ng comment , [st r i ng chapter], [st r i ng url ], [st r i ng f r ameTarget ])
ret urns MarkerVal ue
chapter : st ri ng : read/ wri te
comment : st r i ng : read/ wr i te
cuePoi nt Name : st ri ng : read/ wr i t e
event CuePoi nt : bool ean : read/ wri te
f rameTarget : st r i ng : read/ wr i te
get Paramet ers() ret ur ns obj ect wi t h proper t i es set
set Par ameters(Obj ect keyVal uePai rs) no ret urn
url : st r i ng : read/ wr i te
=====================================================================
MaskMode enum
---------------------------------------------------------------------------
MaskMode. ADD
MaskMode. DARKEN
MaskMode. DIFFERENCE
187
After Effects Object Summary
187
MaskMode. INTERSECT
MaskMode. LIGHTEN
MaskMode. NONE
MaskMode. SUBTRACT
=====================================================================
MaskMot i onBl ur enum
---------------------------------------------------------------------------
MaskMot i onBl ur. OFF
MaskMot i onBl ur. ON
MaskMot i onBl ur. SAME_AS_LAYER
=====================================================================
MaskProper t yGroup obj ect
---------------------------------------------------------------------------
(i nteger proper t yIndex) ret urns Proper t yBase
(st ri ng proper t yName) ret urns Proper t yBase
act i ve : bool ean : readOnl y
addProper t y(st r i ng proper t yName) ret urns Proper t yBase
canAddProper t y(st r i ng proper t yName) ret urns bool ean
canSet Enabl ed : bool ean : readOnl y
col or : Ar ray of f l oat : read/ wri te
dupl i cat e() ret ur ns MaskProper t yGroup
el i ded : bool ean : readOnl y
enabl ed : bool ean : readOnl y
i nver t ed : bool ean : read/ wr i te
i sEf f ect : bool ean : readOnl y
i sMask : bool ean : readOnl y
i sModi f i ed : bool ean : readOnl y
l ocked : bool ean : read/ wr i te
maskMode : MaskMode : read/ wr i te
maskMot i onBl ur : MaskMot i onBl ur : read/ wri te
matchName : st r i ng : readOnl y
moveTo(i nteger i ndex) no ret urn
name : st r i ng : read/ wr i te
numProper t i es : i nteger : readOnl y
parent Proper t y : Proper t yGroup : readOnl y
proper t y(i nteger proper t yIndex) ret urns Proper t yBase
proper t y(st r i ng proper t yName) ret urns Proper t yBase
proper t yDept h : i nteger : readOnl y
proper t yGroup([i nteger count Up]) ret urns Proper t yGroup
proper t yIndex : i nteger : readOnl y
proper t yType : Proper t yType : readOnl y
remove() no ret urn
rotoBezi er : bool ean : read/ wr i t e
sel ect ed : bool ean : read/ wri te
=================================================================
OMCol l ect i on obj ect
---------------------------------------------------------------------------
add() ret urns Out put Modul e
=====================================================================
Out put Modul e obj ect
---------------------------------------------------------------------------
188
After Effects Object Summary
188
appl yTempl at e(st ri ng t empl ateName) no ret urn
f i l e : Fi l e : read/ wr i te
name : st r i ng : readOnl y
post RenderAct i on : Post RenderAct i on : read/ wr i te
remove() no ret urn
saveAsTempl at e(st ri ng t empl ateName) no ret urn
templ ates : Ar ray of st r i ng: readOnl y
=====================================================================
Pl acehol derSource obj ect
---------------------------------------------------------------------------
al phaMode : Al phaMode : read/ wri te
conf ormFrameRate : f l oat : read/ wri te
di spl ayFrameRate : f l oat : readOnl y
f i el dSeparat i onType : Fi el dSeparat i onType : read/ wr i te
guessAl phaMode() no ret urn
guessPul l down(Pul l downMet hod pul l downMet hod) no ret urn
hasAl pha : bool ean : readOnl y
hi ghQual i t yFi el dSeparat i on : bool ean : read/ wr i t e
i nver t Al pha : bool ean : read/ wr i te
i sSt i l l : bool ean : readOnl y
l oop : i nteger : read/ wri te
nat i veFrameRate : f l oat : readOnl y
premul Col or : Ar ray of f l oat : read/ wr i t e
removePul l down : Pul l downPhase : read/ wr i t e
====================================================================
Post RenderAct i on enum
---------------------------------------------------------------------------
Post RenderAct i on. IMPORT
Post RenderAct i on. IMPORT_AND_REPLACE_USAGE
Post RenderAct i on. NONE
Post RenderAct i on. SET_PROXY
=====================================================================
Proj ect obj ect
---------------------------------------------------------------------------
act i veIt em : It em : readOnl y
aut oFi xExpressi ons(ol dText ,
newText ) no ret urn
bi t sPerChannel : i nt eger : read/ wr i t e
cl ose(Cl oseOpt i ons cl oseOpt i ons) ret urns bool ean
consol i dateFoot age() ret ur ns i nteger
di spl aySt ar t Frame : i nt eger : read/ wr i t e
f i l e : Fi l e : readOnl y
i mpor t Fi l e(Impor t Opt i ons i mpor t Opt i ons) ret ur ns Item
i mpor t Fi l eWi t hDi al og() ret urns Ar rayOf Item
i mpor t Pl acehol der(st r i ng i temName, i nteger i temWi dt h, i nt eger i temHei ght , f l oat f r ameRat e,
f l oat dur at i on) ret urns Foot ageItem
i tem(i nteger i temIndex) ret urns It em
i tems : ItemCol l ect i on : readOnl y
l i nearBl endi ng : bool ean : read/ wr i te
numIt ems : i nt eger : readOnl y
reduceProj ect (Ar rayOf Item i temsToPreser ve) ret urns i nteger
189
After Effects Object Summary
189
removeUnusedFoot age() ret urns i nt eger
renderQueue : RenderQueue : readOnl y
root Fol der : Fol derItem : readOnl y
save(Fi l e toFi l e) ret urns bool ean
saveWi t hDi al og() ret ur ns bool ean
sel ect i on : Arr ay of Item : readOnl y
showWi ndow(bool ean doShow) no ret urn
t i mecodeBaseType : Ti mecodeBaseType : read/ wr i t e
t i mecodeDi spl ayType : Ti mecodeDi spl ayType : read/ wr i te
t i mecodeFi l mType : Ti mecodeFi l mType : read/ wr i t e
t i mecodeNTSCDropFrame : bool ean : read/ wr i te
t r ansparencyGr i dThumbnai l s : bool ean : read/ wr i t e
=====================================================================
Proper t y obj ect
---------------------------------------------------------------------------
act i ve : bool ean : readOnl y
addKey(f l oat at Ti me) ret urns i nteger
canSet Enabl ed : bool ean : readOnl y
canSet Expressi on : bool ean : readOnl y
canVar yOverTi me : bool ean : readOnl y
dupl i cat e() ret ur ns Proper t y
el i ded : bool ean : readOnl y
enabl ed : bool ean : readOnl y
expressi on : st r i ng : read/ wr i t e
expressi onEnabl ed : bool ean : read/ wr i t e
expressi onError : st r i ng : readOnl y
hasMax : bool ean : readOnl y
hasMi n : bool ean : readOnl y
i sEf f ect : bool ean : readOnl y
i sInt erpol at i onTypeVal i d(Keyf r ameInt erpol at i onType t ype) ret urns bool ean
i sMask : bool ean : readOnl y
i sModi f i ed : bool ean : readOnl y
i sSpat i al : bool ean : readOnl y
i sTi meVar yi ng : bool ean : readOnl y
keyInInt erpol at i onType(i nt eger keyIndex) ret urns Keyf rameInter pol at i onType
keyInSpat i al Tangent (i nteger keyIndex) ret urns Ar rayOf Fl oat
keyInTemporal Ease(i nteger keyIndex) ret urns Ar rayOf Keyf rameEase
keyOut Interpol at i onType(i nt eger keyIndex) ret urns Keyf rameInter pol at i onType
keyOut Spat i al Tangent (i nt eger keyIndex) ret urns Ar rayOf Fl oat
keyOut Temporal Ease(i nteger keyIndex) ret ur ns Arr ayOf Keyf rameEase
keyRovi ng(i nt eger keyIndex) ret urns bool ean
keySel ect ed(i nt eger keyIndex) ret urns bool ean
keySpat i al AutoBezi er(i nt eger keyIndex) ret urns bool ean
keySpat i al Cont i nuous(i nt eger keyIndex) ret urns bool ean
keyTemporal Aut oBezi er(i nt eger keyIndex) ret urns bool ean
keyTemporal Cont i nuous(i nt eger keyIndex) ret urns bool ean
keyTi me(i nteger keyIndex) ret urns f l oat
keyTi me(st r i ng markerName) ret urns f l oat
keyVal ue(i nt eger keyIndex) ret urns t ype-stored-i n-proper t y
keyVal ue(st ri ng markerName) ret ur ns t ype-stored-i n-proper t y
matchName : st r i ng : readOnl y
190
After Effects Object Summary
190
moveTo(i nteger i ndex) no ret urn
name : st r i ng : readOnl y
nearest KeyIndex(f l oat at Ti me) ret urns i nteger
numKeys : i nt eger : readOnl y
parent Proper t y : Proper t yGroup : readOnl y
proper t yDept h : i nteger : readOnl y
proper t yGroup([i nteger count Up]) ret urns Proper t yGroup
proper t yIndex : i nteger : readOnl y
proper t yType : Proper t yType : readOnl y
proper t yVal ueType : Proper t yVal ueType : readOnl y
remove() no ret urn
removeKey(i nteger keyIndex) no ret urn
sel ect ed : bool ean : read/ wri te
sel ect edKeys : Ar ray of i nteger : readOnl y
set Inter pol at i onTypeAt Key(i nteger keyIndex, Keyf r ameInt erpol at i onType i nType,
[Keyf r ameInt er pol at i onType out Type]) no ret urn
set Rovi ngAt Key(i nteger keyIndex, bool ean i sRovi ng) no ret ur n
set Sel ectedAt Key(i nteger keyIndex, bool ean i sSel ect ed) no ret urn
set Spat i al AutoBezi erAt Key(i nteger keyIndex, bool ean i sAutoBezi er) no ret urn
set Spat i al Cont i nuousAt Key(i nteger keyIndex, bool ean i sCont i nuous) no ret urn
set Spat i al Tangent sAt Key(i nt eger keyIndex, Ar rayOf Fl oat i nTangent , [Ar rayOf Fl oat out Tangent ])
no ret urn
set Tempor al AutoBezi erAt Key(i nteger keyIndex, bool ean i sAut oBezi er) no ret urn
set Tempor al Cont i nuousAt Key(i nteger keyIndex, bool ean i sCont i nuous) no ret urn
set Tempor al EaseAt Key(i nt eger keyIndex, Ar rayOf Keyf r ameEase i nEase,
[Ar r ayOf Keyf rameEase out Ease]) no ret ur n
set Val ue(t ype-stored-i n-proper t y newVal ue) no ret urn
set Val ueAt Key(i nteger keyIndex, t ype-stored-i n-proper t y newVal ue) no ret urn
set Val ueAt Ti me(f l oat at Ti me, t ype-stored-i n-proper t y newVal ue) no ret ur n
set Val uesAt Ti mes(Ar rayOf Fl oat at Ti mes, Ar rayOf -t ype-stored-i n-proper t y newVal ues) no ret urn
uni t sText : st ri ng : readOnl y
val ue : t ype-stored-i n-proper t y: readOnl y
val ueAt Ti me(f l oat at Ti me, bool preExpressi on) ret urns t ype-stored-i n-proper t y
=====================================================================
Proper t yGroup obj ect
---------------------------------------------------------------------------
(i nteger proper t yIndex) ret urns Proper t yBase
(st ri ng proper t yName) ret urns Proper t yBase
act i ve : bool ean : readOnl y
addProper t y(st r i ng proper t yName) ret urns Proper t yBase
canAddProper t y(st r i ng proper t yName) ret urns bool ean
canSet Enabl ed : bool ean : readOnl y
dupl i cat e() ret ur ns Proper t yGroup
el i ded : bool ean : readOnl y
enabl ed : bool ean : readOnl y
i sEf f ect : bool ean : readOnl y
i sMask : bool ean : readOnl y
i sModi f i ed : bool ean : readOnl y
matchName : st r i ng : readOnl y
moveTo(i nteger i ndex) no ret urn
name : st r i ng : readOnl y
191
After Effects Object Summary
191
numProper t i es : i nteger : readOnl y
parent Proper t y : Proper t yGroup : readOnl y
proper t y(i nteger proper t yIndex) ret urns Proper t yBase
proper t y(st r i ng proper t yName) ret urns Proper t yBase
proper t yDept h : i nteger : readOnl y
proper t yGroup([i nteger count Up]) ret urns Proper t yGroup
proper t yIndex : i nteger : readOnl y
proper t yType : Proper t yType : readOnl y
remove() no ret urn
sel ect ed : bool ean : read/ wri te
======================================================================
Proper t yType enum
---------------------------------------------------------------------------
Proper t yType. INDEXED_GROUP
Proper t yType. NAMED_GROUP
Proper t yType. PROPERTY
====================================================================
Proper t yVal ueType enum
---------------------------------------------------------------------------
Proper t yVal ueType. COLOR
Proper t yVal ueType. CUSTOM_VALUE
Proper t yVal ueType. LAYER_INDEX
Proper t yVal ueType. MARKER
Proper t yVal ueType. MASK_INDEX
Proper t yVal ueType. NO_VALUE
Proper t yVal ueType. OneD
Proper t yVal ueType. SHAPE
Proper t yVal ueType. TEXT_DOCUMENT
Proper t yVal ueType. ThreeD
Proper t yVal ueType. ThreeD_SPATIAL
Proper t yVal ueType. TwoD
Proper t yVal ueType. TwoD_SPATIAL
=====================================================================
Pul l downPhase enum
---------------------------------------------------------------------------
Pul l downPhase. OFF
Pul l downPhase. SSWWW
Pul l downPhase. SWWWS
Pul l downPhase. SWWWW_24P_ADVANCE
Pul l downPhase. WSSWW
Pul l downPhase. WSWWW_24P_ADVANCE
Pul l downPhase. WWSSW
Pul l downPhase. WWSWW_24P_ADVANCE
Pul l downPhase. WWWSS
Pul l downPhase. WWWSW_24P_ADVANCE
Pul l downPhase. WWWWS_24P_ADVANCE
=====================================================================
Pul l downMet hod enum
---------------------------------------------------------------------------
Pul l downMet hod. ADVANCE_24P
Pul l downMet hod. PULLDOWN_3_2
192
After Effects Object Summary
192
===================================================================
PurgeTarget enum
---------------------------------------------------------------------------
PurgeTarget . ALL_CACHES
PurgeTarget . IMAGE_CACHES
PurgeTarget . SNAPSHOT_CACHES
PurgeTarget . UNDO_CACHES
======================================================================
RenderQueue obj ect
---------------------------------------------------------------------------
i tem(i nteger i temIndex) ret urns RenderQueueIt em
i tems : RQIt emCol l ect i on : readOnl y
numIt ems : i nt eger : readOnl y
pauseRender i ng(bool ean doPause) no ret urn
render() no ret urn
render i ng : bool ean : readOnl y
showWi ndow(bool ean doShow) no ret urn
stopRenderi ng() no ret urn
====================================================================
RenderQueueIt em obj ect
---------------------------------------------------------------------------
appl yTempl at e(st ri ng t empl ateName) no ret urn
comp : CompItem : readOnl y
dupl i cat e() ret ur ns RenderQueueItem
el apsedSeconds : f l oat : readOnl y
l ogType : LogType : read/ wri te
numOut put Modul es : i nteger : readOnl y
out put Modul e(i nt eger out put Modul eIndex) ret urns Out put Modul e
out put Modul es : OMCol l ect i on : readOnl y
remove() no ret urn
render : bool ean : read/ wr i t e
saveAsTempl at e(st ri ng t empl ateName) no ret urn
ski pFrames : i nteger : read/ wri te
st ar t Ti me : f l oat : readOnl y
st at us : RQIt emSt at us : readOnl y
templ ates : Ar ray of st r i ng: readOnl y
t i meSpanDur at i on : f l oat : read/ wr i t e
t i meSpanSt ar t : f l oat : read/ wr i te
onSt at usChanged() no ret urn
=====================================================================
RQIt emCol l ect i on obj ect
---------------------------------------------------------------------------
add(CompItem compToAdd) ret urns RenderQueueIt em
=====================================================================
RQIt emSt at us enum
---------------------------------------------------------------------------
RQIt emSt at us. DONE
RQIt emSt at us. ERR_STOPPED
RQIt emSt at us. NEEDS_OUTPUT
RQIt emSt at us. QUEUED
RQIt emSt at us. RENDERING
193
After Effects Object Summary
193
RQIt emSt at us. UNQUEUED
RQIt emSt at us. USER_STOPPED
RQIt emSt at us. WILL_CONTINUE
======================================================================
Set t i ngs obj ect
---------------------------------------------------------------------------
get Set t i ng(st r i ng sect i onName, st r i ng sect i onKey) ret urns st ri ng
haveSet t i ng(st r i ng sect i onName, st ri ng sect i onKey) ret urns bool ean
saveSet t i ng(st r i ng sect i onName, st r i ng sect i onKey, st r i ng newVal ue) no ret urn
======================================================================
Shape obj ect
---------------------------------------------------------------------------
new Shape() ret urns Shape
cl osed : bool ean : read/ wr i t e
i nTangent s : Ar ray of f l oat [2] : read/ wr i te
out Tangent s : Ar ray of f l oat [2] : read/ wr i te
ver t i ces : Ar ray of f l oat [2] : read/wr i te
======================================================================
Sol i dSource obj ect
---------------------------------------------------------------------------
al phaMode : Al phaMode : read/ wri te
col or : Ar ray of f l oat : read/ wri te
conf ormFrameRate : f l oat : readOnl y
di spl ayFrameRate : f l oat : readOnl y
f i el dSeparat i onType : Fi el dSeparat i onType : readOnl y
guessAl phaMode() no ret urn
guessPul l down(Pul l downMet hod pul l downMet hod) no ret urn
hasAl pha : bool ean : readOnl y
hi ghQual i t yFi el dSeparat i on : bool ean : readOnl y
i nver t Al pha : bool ean : read/ wr i te
i sSt i l l : bool ean : readOnl y
l oop : i nteger : readOnl y
nat i veFrameRate : f l oat : readOnl y
premul Col or : Ar ray of f l oat : read/ wr i t e
removePul l down : Pul l downPhase : readOnl y
======================================================================
System obj ect
---------------------------------------------------------------------------
cal l System(st ri ng cmdLi neToExect ute) ret urns out put Of CommandAsSt ri ng
machi neName : st r i ng : readOnl y
osName : st r i ng : readOnl y
osVersi on : st r i ng : readOnl y
userName : st r i ng : readOnl y
======================================================================
Text Document obj ect
---------------------------------------------------------------------------
new Text Document (st r i ng text ) ret ur ns Text Document
text : st r i ng : read/ wri te
======================================================================
Ti mecodeBaseType enum
---------------------------------------------------------------------------
194
After Effects Object Summary
194
Ti mecodeBaseType. AUTO
Ti mecodeBaseType. FPS100
Ti mecodeBaseType. FPS24
Ti mecodeBaseType. FPS25
Ti mecodeBaseType. FPS30
Ti mecodeBaseType. FPS48
Ti mecodeBaseType. FPS50
Ti mecodeBaseType. FPS60
=====================================================================
Ti mecodeDi spl ayType enum
---------------------------------------------------------------------------
Ti mecodeDi spl ayType. FEET_AND_FRAMES
Ti mecodeDi spl ayType. FRAMES
Ti mecodeDi spl ayType. TI MECODE
======================================================================
Ti mecodeFi l mType enum
---------------------------------------------------------------------------
Ti mecodeFi l mType. MM16
Ti mecodeFi l mType. MM35
======================================================================
TrackMat teType enum
---------------------------------------------------------------------------
TrackMat teType. ALPHA
TrackMat teType. ALPHA_I NVERTED
TrackMat teType. LUMA
TrackMat teType. LUMA_INVERTED
TrackMat teType. NO_TRACK_MATTE
======================================================================
AutoOr i ent Type enum
---------------------------------------------------------------------------
AutoOr i ent Type. ALONG_PATH
AutoOr i ent Type. CAMERA_OR_POI NT_OF_I NTEREST
AutoOr i ent Type. NO_AUTO_ORI ENT
======================================================================
Fr ameBl endi ngType enum
---------------------------------------------------------------------------
Fr ameBl endi ngType. FRAME_MIX
Fr ameBl endi ngType. NO_FRAME_BLEND
Fr ameBl endi ngType. PI XEL_MOTI ON
---------------------------------------------------------------------------

© 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, EE.UU.

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

Encontrará más documentación sobre esta norma en www. Todos los operadores matemáticos y lógicos comunes para ECMAScript están disponibles en las secuencias de comandos. crea proyectos. proporciona una cómoda interfaz para crear y probar sus propias secuencias de comandos. máscara o transformación en una capa individual).ecmainternational. capas y elementos de la cola de procesamiento. sólidos. editar y guardar secuencias de comandos. Para iniciarlo.Introducción Edición de secuencias de comandos 4 El núcleo de una aplicación de secuencias de comandos es el modelo de objetos. 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). en la tercera edición de la norma ECMA-262). 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. Pero con secuencias de comandos. máscaras. 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”. elementos. llamado Kit de herramientas de ExtendScript. composiciones. Este depurador y editor de secuencias de comandos. son entidades absolutamente distintas.org. por lo que es fundamental tener un sólido conocimiento de la aplicación para saber cómo utilizar esta funcionalidad. efectos y propiedades. Por ejemplo. a pesar de que se puede escribir una secuencia de comandos para crear o editar una expresión. 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. El modelo de objetos de After Effects está formado por un proyecto. así como tener nociones básicas sobre cómo trabajar con JavaScript. composiciones y elementos de la cola de procesamiento junto con todos los elementos que contienen: material de archivo. 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). 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. Matemática del movimiento La matemática del movimiento ya no se incluye en After Effects. 4 . Debería estar familiarizado con el modelo de objetos de After Effects para poder crear secuencias de comandos. Esta guía describe los objetos JavaScript definidos para los proyectos de After Effects. imágenes. capas. cada uno de estos elementos es un objeto. Las expresiones no pueden acceder a información de las secuencias de comandos (como variables y funciones). Las secuencias de comandos reproducen gran parte de lo que se puede hacer mediante la interfaz de usuario de After Effects. su funcionalidad ha sido reemplazada por las secuencias de comandos y las expresiones. elija Archivo > Scripts > Abrir el Editor de secuencias de comandos. Para aprovechar al máximo las posibilidades de las secuencias de comandos. Edición de secuencias de comandos After Effects incluye un editor de JavaScript. Puede utilizar cualquier editor de texto para crear. estar familiarizado con uno de estos conceptos puede ayudar a comprender el otro. Dado que tanto las expresiones como las secuencias de comandos emplean JavaScript. 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). En términos de secuencias de comandos. Cuando utiliza Adobe After Effects. Las secuencias de comandos de After Effects están basadas en ECMAScript (o más concretamente.

js utilizada con los archivos de JavaScript. Objetos File y Folder: Puesto que la sintaxis de los nombres de rutas es muy diferente en los distintos sistemas operativos. elija Preferencias > General y seleccione “Permitir que los scripts puedan escribir archivos y acceder a la red”. 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 . 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. ExtendScript proporciona un entorno de desarrollo y de prueba interactivo. Formato JSX de ExtendScript After Effects admite ExtendScript. la interfaz ExtendScript Reflection.js x bin . ExtendScript ofrece algunas funciones y utilidades adicionales: Kit de herramientas de ExtendScript: Como ayuda para crear. el Kit de herramientas de ExtendScript. Éstas y otras funciones se describen en detalle en Guía de herramientas de JavaScript. el objeto de dólar ($) y una utilidad de generación de informes para elementos de ExtendScript. Las secuencias de comandos de After Effects deben incluir la extensión de archivo . depurar y probar secuencias de comandos.Introducción Activación de funciones de secuencias de comandos completas 5 • 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). 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. Además de implementar el lenguaje JavaScript según las especificaciones ECMA 262 y E4X ECMA 357. js x . 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. Herramientas y utilidades: Además.j sx para que la aplicación las reconozca correctamente. una variación de la extensión estándar . También define un objeto de depuración global. cuya extensión es . Para habilitar estas funciones. ExtendScript ofrece herramientas y funciones.adobe. la implementación extendida de JavaScript de Adobe. 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. 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.com/es/devnet/. Módulo de interfaz de usuario ScriptUI: El módulo ScriptUI de ExtendScript permite crear e interactuar con elementos de la interfaz de usuario. Se puede utilizar el kit de herramientas de ExtendScript Toolkit para exportar una versión binaria de un archivo de ExtendScript. disponible con After Effects y en http://www. Todas las aplicaciones de Adobe que proporcionan una interfaz de secuencias de comandos utilizan ExtendScript. 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. o el acceso a la red) están deshabilitadas de forma predeterminada. Cualquier archivo de texto codificado con UTF-8 que tenga la extensión . con f i r m y promp t ). • 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). Los archivos de secuencias de comandos de ExtendScript se diferencian por la extensión . Lo cual le permite: 5 .j sx se reconocerá como un archivo de ExtendScript.

estas aplicaciones crean errores de línea 0 en las secuencias de comandos y provocan un fallo de ejecución. al iniciar y cerrar la aplicación. Carpetas Shutdown y Startup La carpeta Scripts contiene dos carpetas llamadas Startup y Shutdown. dentro de la carpeta de la aplicación After Effects. en orden alfabético. 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. Cuando se inicia la aplicación.Introducción Acceso y escritura de secuencias de comandos 6 • Escribir archivos • Crear carpetas y definir la carpeta actual • Crear una conexión socket (si desea información sobre esta utilidad de JavaScript. Menú y carpeta Scripts Las secuencias de comandos de After Effects residen en la carpeta Scripts. Para ejecutar una secuencia de comandos que no aparece en el menú Scripts. En la carpeta Startup puede colocar las secuencias de comandos que desea que se ejecuten al iniciar la aplicación. es necesario que se guarde en la carpeta Scripts. Tenga en cuenta que el kit de herramientas se inicia sólo cuando se ejecuta una secuencia de comandos. para que se muestre en el menú Scripts. el kit de herramientas de ExtendScript o el software de administración de procesos de terceros. Al editar o escribir secuencias de comandos. dentro de la misma carpeta que el archivo de la aplicación After Effects. denominado Kit de herramientas de ExtendScript. que de forma predeterminada agregan información de encabezado a los archivos. Se ejecutarán después de que se inicialice la aplicación y todos los plugins estén cargados. Tenga cuidado con aplicaciones como Microsoft Word. 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. El Kit de herramientas está deshabilitado de manera predeterminada con el fin de que los usuarios ocasionales no lo encuentren. Las secuencias de comandos se crean fuera de After Effects y se ejecutan dentro. 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®. aunque los archivos de secuencias de comandos pueden residir en cualquier lugar. aunque éstas también utilicen JavaScript. el Kit de herramientas ayuda a diagnosticar más rápidamente problemas relativos a secuencias de comandos. 6 . sólo las secuencias de comandos guardadas en esta carpeta Scripts se enumeran automáticamente en el menú Scripts. elija Archivo > Scripts > Ejecutar guión y seleccione la secuencia de comandos en el cuadro de diálogo Abrir. Para que se muestre en el cuadro de diálogo Abrir.js x adecuada. After Effects ejecuta automáticamente las secuencias de comandos guardadas en estas carpetas. 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). Una secuencia de comandos puede residir en cualquier lugar pero. Acceso y escritura de secuencias de comandos Para crear y editar secuencias de comandos para After Effects. consulte Guía de herramientas de JavaScript. Si desea obtener información detallada sobre el Kit de herramientas de ExtendScript. consulte Guía de herramientas de JavaScript) Adobe proporciona un completo depurador de JavaScript. la secuencia de comandos debe incluir la extensión de archivo . o externamente mediante una línea de comandos. respectivamente. no con expresiones.

" To o l # 1" ) . una Composición o Controles de tiempo. 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. [100 . En este caso. No se puede utilizar el comando del menú Archivo > Scripts > Ejecutar guión para ejecutar una secuencia de comandos que haga referencia a “this”. my Pan e l . 1 0 0 . my Pan e l . 3 0 ] .s how ( ). compruebe si “this” es un objeto panel.sh ow () . para extender la aplicación a otras secuencias de comandos. 1 0 . 7 . my Pan e l . También se pueden agregar atributos a objetos existentes. En lugar de crear un objeto de ventana y añadirle controles. re tur n my Pan el . Al igual que en el caso de los paneles nativos. 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). el código siguiente añade un botón a un panel: v ar my Pan e l = t hi s . puede crear otra carpeta con el nombre Paneles ScriptUI. como el objeto Application (consulte “Application object” en la página 19). continúan en las siguientes secuencias de comandos durante una sesión de After Effects específica. una secuencia de comandos Paneles ScriptUI utiliza el objeto “this” que representa al panel. La ventaja de un panel es que se puede acoplar a otros paneles. 3 0 ] . Asegúrese de que asigna nombres únicos a las variables incluidas en secuencias. " To o l # 1" ) . my To ol sPa n e l . my To ol sPa n e l . una vez definidas mediante la ejecución de la secuencia de comandos que las contiene. de manera que cualquier secuencia que se ejecute al inicio puede definir variables y funciones disponibles para todas las secuencias de comandos. 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 . Las secuencias de comandos guardadas en la carpeta Shutdown se ejecutan cuando se cierra la aplicación.Introducción Acceso y escritura de secuencias de comandos 7 Las secuencias de comandos comparten un entorno global. " To o l # 1" ) . no al panel. " My To o l s " . un cuadro de diálogo o una ventana). [ 1 0 . debería pasar el objeto “this” como un argumento de la función. [ 1 0 . a dd ( " b u t ton " . 1 0 0 . no puede utilizar “this”. Esto se produce después de cerrar el proyecto pero antes de que se cierre otra aplicación. En todos los casos. my Pan e l . a dd ( " b u t ton " . 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 " . 1 0 . [ 1 0 . 1 0 . El menú Ventana y la carpeta Paneles ScriptUI Desde la carpeta Scripts. 3 00. Por ejemplo. 3 00]). todas estas variables y funciones definidas globalmente se eliminan. re tur n my Pan el . Cuando se cierra la aplicación.sh ow () . a dd ( " b u t ton " . 1 0 0 . y dar la sensación de una mayor integración en la aplicación. 3 0 ] . } v ar my To ol sPane l = c reateUI (t hi s) . de manera que una secuencia de comandos no vuelva a asignar por equivocación variables globales destinadas a continuar durante toda una sesión. las variables y las funciones. } v ar my To ol sPane l = c reateUI (t hi s) . como en un Proyecto. Si la secuencia de comandos crea su propia interfaz de usuario en una función. ya que se referirá a la función en sí. se accede a los paneles ScriptUI desde el menú Ventana. 10 0.

si no sabe el nombre exacto de la aplicación.j s x a fter f x . puede enviar una secuencia directamente a la aplicación After Effects abierta para que la aplicación ejecute automáticamente la secuencia de comandos. 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 . a continuación. 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. 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. En el primer ejemplo. En el primer ejemplo. Para utilizarla de manera eficaz.Introducción Envío de secuencias de comandos a After Effects desde el sistema 8 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. El texto de la secuencia aparecerá entre comillas después del comando DoScript. a continuación. *) 8 . 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. 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.e xe . de manera que deben omitirse las comillas internas de la secuencia con el carácter de escape de barra invertida. se copia y pega la secuencia de comandos de After Effects directamente en la línea de comandos y después se ejecuta. se copia la secuencia de comandos de After Effects directamente en el Editor de secuencias de comandos y. debe especificar la aplicación que contiene el archivo JSX abierto (en este ejemplo. El texto de la secuencia aparecerá entre comillas después del comando a fter f x. escriba lo más parecido a “TextEdit” y AppleScript le pedirá que la busque. se ejecuta.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 . TextEdit).exe -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. 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.exe -s : a fter f x. Basta con que resalte el texto de la secuencia que desea ejecutar y.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. Por ejemplo: a ft er f x .

Introducción

Prueba y solución de problemas

9

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 ECMA-262.pdf, disponible en www.ecma-international.org/publications/standards/ Ecma-262.htm. 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
Palabra clave/ instrucción

Sintaxis de instrucciones y palabras clave
Descripción

b re a k con t i nue case def a ul t do. ..w hile f al s e for for.. .i n f u n c t io n i f / if . . . e ls e new nu l l re tur n s w itch t hi s t r ue un define d v ar w hi l e w i th

JavaScript estándar; cierra el bucle que se está ejecutando actualmente. JavaScript estándar; interrumpe la ejecución de la repetición del bucle actual. Etiqueta que se utiliza en una instrucción s w i tch . Etiqueta que se utiliza en una instrucción s w i tch cuando no se encuentra una etiqueta c a s e . 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. Literal que representa el valor falso Booleano. Construcción de bucle estándar de JavaScript. Construcción estándar de JavaScript. Proporciona una manera de desplazarse fácilmente por las propiedades de un objeto. Se utiliza para definir una función. Construcciones condicionales estándar de JavaScript. Instrucción de constructor estándar de JavaScript. Se asigna a una variable, elemento de conjunto o propiedad de objeto para indicar que no contiene un valor válido. Forma estándar de JavaScript de devolver un valor de una función o salir de una función. 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 . Método estándar de JavaScript para indicar el objeto actual. Literal que representa el valor verdadero Booleano. Indica que todavía no se ha asignado un valor a la variable, elemento de conjunto o propiedad de objeto. Sintaxis estándar de JavaScript que se utiliza para declarar una variable local. 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. 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
Operadores

Descripción de los operadores
Descripción Asigna un objeto. Anula la asignación de un objeto. Devuelve un tipo de datos. 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.

new de l e te t y p e of voi d . [] () ++ –– – ~ ! * / % + << >> > >> < <= > >= == != & ^ | && || ?: = +=

11

Asignación con operación de división modular. % =. % + . Evaluación múltiple. << =. () . Asignación con operación de desplazamiento a la izquierda bit a bit. t y p e of. > . –= *= /= %= < <= > >= > >> = &= ^= |= . += . > = = =. Tabla 3 Prioridad de los operadores Asociatividad izquierda a derecha derecha a izquierda 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 izquierda a derecha derecha a izquierda derecha a izquierda izquierda a derecha Operadores (de mayor a menor prioridad) [ ]. Asignación con operación XOR bit a bit. /. Asignación con operación de desplazamiento a la derecha bit a bit sin signo. ^= . Asignación con operación de multiplicación. – – *. > > =. &=.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 OR bit a bit. > >> < . > > >= . new. Asignación con operación de división. Asignación con operación de desplazamiento a la derecha bit a bit. *= . + +. dele te . /= . . !. Asignación con operación AND bit a bit. – ( re st a) < <. >> . < =. – ( n eg a c i ón un a r i a ). != & ^ | && || ?: = . void . 12 .

and global functions defined by After Effects. The After Effects scripting engine supports ExtendScript. expressions and statements.JavaScript Reference This chapter lists and describes JavaScript classes.2 6 2 . available at www. including its notational and lexical conventions. For a complete listing of the keywords and operators included with ECMAScript. and their correspondence to the user interface. and Socket objects are defined by ExtendScript.htm. and are documented in the JavaScript Tools Guide. a set of window and user-interface control objects. which is organized alphabetically by object. ExtendScript also defines the ScriptUI module. see “JavaScript keywords and statement syntax” on page 10. which are available to After Effects scripts. which implements the 3rd Edition of the ECMA-262 Standard. 13 . Adobe’s extended version of JavaScript. attributes. These are also documented in the JavaScript Tools Guide. refer to E C M A. types. objects. Hierarchy diagram of the main After Effects scripting objects Note that the File. objects.ecma-international. Folder. methods. you can refer to the following diagrams for an overview of where the various objects fall within the hierarchy.org/publications/standards/Ecma262. For an overview of the most common keywords and statements available from ECMA-262. The After Effects Object Model As you look through this reference section.p d f . The hierarchy of objects in scripting corresponds to the hierarchy in the user interface.

Represents a camera layer within a composition. which contain layers. or solid. text layers. and the term “property” or “AE property” to refer to After-Effects layer properties. Object summary The following table lists all objects alphabetically. All of these entities are represented by objects in scripting.JavaScript Reference The After Effects Object Model 14 The application contains a Project panel. which displays a project. and sound layers). Associates a set of objects or values as a logical group and provides access to them by index. also listed in the Project panel. Object “Global functions” on page 16 Description Globally available functions that allow you to display text for script debugging purposes. and allows you to manipulate it and get information about it. NOTE: To avoid ambiguity. placeholder. A single global object. The render queue contains render-queue items as well as render settings and output modules. with links to the documentation page for each. and these can contain markers and keyframes. Represents audio/visual files imported into After Effects. available by its name (a pp ). this manual uses the term “attribute” to refer to JavaScript object properties. footage layers. that provides access to objects and application settings within the After Effects application. The source for a layer can be a footage file. “Application object” on page 19 “AVItem object” on page 32 “AVLayer object” on page 40 “CameraLayer object” on page 51 “Collection object” on page 52 “CompItem object” on page 53 14 . solid layers. Represents those layers that contain AVItem objects (Comp layers. and help convert time values between seconds and frames. The project contains compositions. Represents a composition. Each layer contains settings known as properties.

Encapsulates marker values in an After Effects property. A base class for layer classes. Encapsulates the outline shape information for a mask. Encapsulates the text in a text layer. Represents the After Effects render queue. Describes the file source of some footage. Encapsulates keyframe ease values in an After Effects property. Collects render-queue items in a render queue. Collects layers in a project. Represents an After Effects property group. Provides access to application settings and preferences. Represents a text layer within a composition. Represents a footage item imported into a project.JavaScript Reference The After Effects Object Model 15 Object “FileSource object” on page 61 “FolderItem object” on page 63 “FootageItem object” on page 65 “FootageSource object” on page 68 “ImportOptions object” on page 74 “Item object” on page 77 “ItemCollection object” on page 80 “KeyframeEase object” on page 82 “Layer object” on page 84 “LayerCollection object” on page 93 “LightLayer object” on page 98 “MarkerValue object” on page 99 “MaskPropertyGroup object” on page 103 “OMCollection object” on page 105 “OutputModule object” on page 106 Description Describes footage that comes from a file. “Project object” on page 110 “Property object” on page 119 “PropertyBase object” on page 141 “PropertyGroup object” on page 148 “RenderQueue object” on page 153 “RenderQueueItem object” on page 156 “RenderQueueItem object” on page 156 “RQItemCollection object” on page 162 “Shape object” on page 165 “ShapeLayer object” on page 168 “SolidSource object” on page 169 “System object” on page 170 “TextDocument object” on page 172 “TextLayer object” on page 173 Represents an After Effects project. Represents a folder in the Project panel. Collects output modules in a render queue. Represents a renderable item in a render queue. A base class for After Effects property and property group classes. Encapsulates mask attributes in a layer. 15 . Encapsulates options for importing files into After Effects. Describes a solid color that is the source of some footage. which appears in the Project panel. Provides access to the operating system from the application. Represents an After Effects property. Represents an output module for a render queue. “PlaceholderSource object” on page 109 Describes a placeholder for footage. Collects items in a project. Represents a shape layer within a composition. Represents a light layer within a composition. Represents an item in a project that appears in the Project panel.

Parameters None.JavaScript Reference Global functions 16 Global functions These globally available functions that are specific to After Effects. Global function Description Clears text from the Info panel. NOTE: The After Effects global functions for standard dialogs and file I/O are still supported in this release. a string specifying a number of frames in the project’s current time display format. Parameters for m at ted Tim e The frame time value. but are deprecated and will not be supported in future releases. and the frame rate is 24 fps. 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. For details. and to convert numeric time values to and from string values. which allow you to display text in a small (3-line) area of the Info panel. with no line break added. see the Adobe Bridge® JavaScript Reference. are defined by ExtendScript.5 documentation. Writes text to the Info panel.4 seconds (12/30). if the formatted frame time value is 0:00:12 (the exact string format is determined by a project setting). con fi r m . If the frame rate is 30 fps. Any JavaScript object or function can call these functions. Writes text to the Info panel. clearOutput() global function cl e arO ut put () Description Clears the output in the Info panel. the time would be 0. Otherwise. for detailed reference information. given a specified frame rate. Converts string time value to a numeric time value. f ps . see the After Effects 6. For example. adding a line break at the end. the time would be 0. the frames are counted from the project’s starting frame (see “Project displayStartFrame attribute” on page 112). cl e arO ut put () c u r re n t Fo r m a t To Ti m e ( ) t i m eToCur ren t For m at () w r ite( ) w r ite L n ( ) Additional global functions for standard user I/O (aler t .5 seconds (12/24). is D ura t io n ) Description Converts a formatted string for a frame time value to a number of seconds. If the time is a duration. 16 . the frames are counted from 0. Returns Nothing. Converts a numeric time value to a string time value. and prom pt ) and static functions for file I/O.

Optional. is D ura t i on ) Description Converts a numeric time value (a number of seconds) to a frame time value. Returns Floating-point value. the number of seconds. a floating-point value. a floating-point value. Returns String in the project’s current time display format. Truncated if too long for the Info panel. timeToCurrentFormat() global function t i m eToCur ren t For m at (t im e . at the specified rate.5 seconds. When false (the default). the frame would be 0:00:15. Otherwise. w r ite ( " w it h m o re o n s a m e l i n e . with no line break added. 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 " ) . When false (the default). f p s . The frames-per-second. When true. a floating-point value. the time is a duration (measured from frame 0). the time is measured from the project’s starting frame. the frames are counted from the project’s starting frame (see “Project displayStartFrame attribute” on page 112). Parameters tex t Returns The string to display. the frames are counted from 0. 17 . For example. a formatted string that shows which frame corresponds to that time. Parameters time fps i s D u r a ti o n The number of seconds. If the frame rate is 30 fps. the time is measured from the project’s starting frame. if the time is 0. the time is a duration (measured from frame 0). The format of the timecode string is determined by a project setting. and the frame rate is 24 fps. If the time is a duration. write() global function w r ite( te x t ) Description Writes output to the Info panel. Optional. that is. the frame would be 0:00:12 (when the project is set to Display Timecode). When true.JavaScript Reference Global functions 17 fps i s D u r a ti o n The frames-per-second.

Parameters tex t Returns The string to display. 18 . Nothing. w r ite l n ( " T h is tex t a pp e ars on s e con d l i n e " ). 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 " ) .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.

When true. When true. purge memory. The name of this build of the application. Attributes of the Application object provide access to specific objects within After Effects. The version number of the After Effects application. A positive number indicates an error that occurred while running the script. proj ec t language vers i on b u i l dNa m e b u i l dNu m b e r i s Wa tch Fo l der i s Ren d e r E n g i n e s e tt i n g s The language in which the application is running. page 25 19 . The single global object is always available by its name. and quit the After Effects application.JavaScript Reference Application object 19 Application object a pp Description Provides access to objects and application settings within the After Effects application. the project is saved if the application closes unexpectedly. When true. and creates a project file as necessary. A numeric status code used when executing a script externally (that is. a pp . Attributes Attribute Reference “Application project attribute” on page 28 and “Project object” on page 110 “Application language attribute” on page 24 “Application version attribute” on page 30 “Application buildName attribute” on page 21 Description The current After Effects project. Methods of the Application object can create a project. open an existing project. e xi t Af ter L a u n ch A n d Eva l s avePro je c t On Cr as h m e m o r y In Us e “Application exitAfterLaunchAndEval attribute” on page 23 “Application saveProjectOnCrash attribute” on page 28 “Application memoryInUse attribute” on Memory in use by this application. 0 if no error occurred. the local application is running in Watch Folder mode. prompting the user to save or discard changes as necessary. the local After Effects application is running as a render engine. When the After Effects application quits. o n E r ror e x i t Cod e A callback function that is called when an error occurs in the application. control Watch Folder mode. Application settings that can be set via scripting. it closes the open project. page 22 “Application isWatchFolder attribute” on page 24 “Application isRenderEngine attribute” on page 24 “Application settings attribute” on page 30 and “RQItemCollection object” on page 162 “Application onError attribute” on page 26 “Application exitCode attribute” on page 24 When true. from a command line or AppleScript). “Application buildNumber attribute” on The number of this build of the application. the application remains open after running a script from the command line on Windows.

Quits the application. Ends suppression of dialogs in the user interface. “Application beginUndoGroup() method” on page 21 “Application endUndoGroup() method” on page 22 “Application beginSuppressDialogs() method” on page 21 “Application endSuppressDialogs() method” on page 22 “Application setMemoryUsageLimits() method” on page 29 “Application setSavePreferencesOnQuit() method” on page 29 “Application activate() method” on page 20 Brings the After Effects main window to the front of the screen. newPro jec t () open() qui t () w atch Fo l der ( ) p au se Wa tchFol de r () endWatch Folder() p u r g e () b eg i nUndoGroup() endUndoGroup() b eg i nSup pres sD i al o g s( ) e n d Su p p re s s D i a l o g s( ) s e tMemor yUsa geLi mi ts () s e tS ave Preferen ces O n Qu it ( ) a c t iva te( ) s ch e dul e Tas k( ) c a n ce l Tas k( ) p a r s e Sw a tch F i l e ( ) Opens a project or an Open Project dialog box. “Application parseSwatchFile() method” on Loads a color swatch from an Adobe Swatch page 27 Exchange (ASE) file. Pauses a current watch-folder process. Sets memory usage limits as in the Memory & Cache preferences area. Begins suppression of dialogs in the user interface. 20 . page 23 “Application purge() method” on page 28 Purges a targeted type of cached information (replicates Purge options in the Edit menu). Groups the actions that follow it into a single undoable step. “Application scheduleTask() method” on page 29 “Application cancelTask() method” on page 22 Schedules a JavaScript script for delayed execution. Ends an undo group. does not return until Watch Folder mode is turned off. Sets whether preferences are saved when the application is quit. “Application endWatchFolder() method” on Ends a current watch-folder process. Parameters None. Cancels a scheduled task. ac t iv ate () Description Opens the application main window if it is minimized or iconified.JavaScript Reference Application object 20 Methods Method Reference “Application newProject() method” on page 25 “Application open() method” on page 26 “Application quit() method” on page 28 “Application watchFolder() method” on page 30 “Application pauseWatchFolder() method” on page 27 Description Creates a new project in After Effects. Application activate() method a pp. and brings it to the front of the desktop. Starts Watch Folder mode. needed only when a script contains more than one undo group.

Use the endUndoGrou p() method to mark the end of the group. Application beginUndoGroup() method a p p. Returns Nothing. (See “Application endUndoGroup() method” on page 22. Use en dSuppres s D ia l og s () to resume the display of error dialogs. Groups within groups become part of the larger group. read-only. Application beginSuppressDialogs() method a pp. In this case.JavaScript Reference Application object 21 Returns Nothing. Parameters u n d o S t r in g Returns The text that will appear for the Undo command in the Edit menu (that is. 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. Application buildName attribute a pp. See “Application endSuppressDialogs() method” on page 22. bu il d Nam e Description The name of the build of After Effects being run. and will undo correctly. Parameters None. Type String. used internally by Adobe for testing and troubleshooting. 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).) b eg i nUndoGroup() and endUn doGrou p() pairs can be nested. 21 . the names of inner groups are ignored. 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. “Undo < un do St r i n g > ”) Nothing.

See “Application beginSuppressDialogs() method” on page 21. as returned by ap p. Application cancelTask() method a pp. in its absence at the end of a script. You can use this method to place an end to an undo group in the middle of a script. used internally by Adobe for testing and troubleshooting.be g i nUndoGro up() method. Parameters t as kI D Returns An integer that identifies the task. the system will close the undo group automatically. en dUn doGrou p( ) Description Marks the end of an undo group begun with the app.JavaScript Reference Application object 22 Application buildNumber attribute a pp.s ch e du l e Tas k () . Parameters a l er t Boolean. 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. 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. Returns Nothing. when true. should you wish to use more than one undo group for a single script. you do not need to use this method. Error dialogs are displayed by default. 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. call this method only if b eg i nSu ppres sD i al o g s( ) has previously been called. 22 . Application endUndoGroup() method a pp. Application endSuppressDialogs() method a pp. If you are using only a single undo group for a given script. Nothing. read-only. bu il d Num b er Description The number of the build of After Effects being run. Type Integer.

the – r or – s command line flag causes the application to run a script (from a file or from a string. the application will remain open. If this attribute is set to true. if it is false. Returns Nothing. When the application is launched from the command line. 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.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. Application endWatchFolder() method a pp. en dWa tchFol der( ) Description Ends Watch Folder mode. Parameters None. respectively). 23 . It has no effect in Mac OS. After Effects will exit after the script is run. Type Boolean. Parameters None Returns Nothing. exitAfter L aun chAnd Ev al Description This attribute is used only when executing a script from a command line on Windows. read/write. This attribute only has an effect when After Effects is run from the Windows command line.

Example a pp. In the event of an error while the script is running. the value is returned as the AppleScript D oS c r i p t result for each script. and a script was specified with the – r or – s option. Application language attribute a pp. read/write. Type Boolean. l an g u ag e Description The language After Effects is running. 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). • In Windows. • in Mac OS. In both Mac OS and Windows. read-only. / / on qui t. is Ren d er E n g in e Description True if After Effects is running as a render engine. a n er ror ha s o ccu r re d Application isRenderEngine attribute a p p. from a command line or AppleScript). Type Boolean. Type Integer.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. is WatchFol der Description True if the Watch Folder dialog box is currently displayed and the application is currently watching a folder for rendering. i f v a lue is 2. read-only. ex i tCo de = 2 . Application isWatchFolder attribute a pp. 24 . the script can set this to a positive integer that indicates what error occurred. the value is set to 0 (E X I T _ S U C C E S S ) at the beginning of each script evaluation.

25 . I TAL I A N L a n g u a ge . Type Number. pro je c t . If the current project has been edited. n ew Proje c t( ) Description Creates a new project in After Effects. " ) . JA PA N E S E L a n g u a ge . read-only. S PAN I S H Example v ar l a n g = a pp. " ) . G E R M AN L a n g u a ge . 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.cl o se( C l os eO p t i on s. E N G L I S H L a n g u a ge . Application newProject() method a pp. See “Project close() method” on page 112.c lo se (C l os eO p t i o n s. the new project is not created and the method returns null. m e m o r yIn Use Description The number of bytes of memory currently used by this application. Application memoryInUse attribute a p p. " ) . l a n g u ag e . replicating the File > New > New Project menu command. the user is prompted to save it. read-only.JavaScript Reference Application object 25 Type A L a n gu ag e enumerated value. if (lang == Language. 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 . One of: L a n g u a ge . Returns A new Project object. If the user cancels out of the Save dialog box.ENGLISH) 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 .pro je c t . D O _ N OT _ S AV E _ C H AN G E S ). D O_ N OT _ S AVE _ C H A N G E S ) to close the current project before opening a new one. F R E N C H L a n g u a ge . Example a pp. Parameters None. a pp. or null if no new project is created. e l s e if ( l a n g = = L a n g u a g e . Use a pp. n ew Proje c t( ).

the method prompts the user to select a project file. } a pp. for example. See “RenderQueue render() method” on page 154.n ame) . op en () a pp. An ExtendScript File object for the project file to open. i f (n e w _ proj e c t) { a l er t( new _ proje c t. Application open() method a pp. 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 ).JavaScript Reference Application object 26 Application onError attribute a pp. The callback function is passed the error string and a severity string.a ep")./my_folder/my_test . you can close and restart the application. or null if the user cancels the Open dialog box. } } 26 . noting the error in a log file if it occurred during rendering. Parameters file Optional. op en (f i l e) Description Opens a project. you can respond to errors systematically. ex i st s) { n e w _ p ro j e c t = a p p. read/write. on E r ror = er r . Example v ar my _file = new File (". Type A function name string.f i le. on E r ror Description The name of a callback function that is called when an error occurs.o p e n ( my _ f i l e ) . . or null if no function is assigned. It should not return any value. i f (my _ fi l e . By creating a function and assigning it to this attribute. If not supplied. Returns A new Project object for the specified project.

0... an ExtendScript F il e object.0.1.1. 0 is Black.1. 27 . m in or Vers ion d at a.0]. 0.. " LA B" . Application pauseWatchFolder() method a pp. Parameters file Returns The file specification. Parameters p au se Returns True to pause.0..y Swa tchVa lue .r Swa tchVa lue . Nothing. An array of Swa tchVa lue .b Swa tchVa lue . in this format: d at a. false to resume. 0 is Black.0] 0. The ASE version number. One of " RG B " .L Swa tchVa lue ..0 is Black.0.+128.JavaScript Reference Application object 27 Application parseSwatchFile() method a pp. When t y p e = " Gr ay " . 0.1.0. The swatch data.0. 0. pa useWatchFo lder( p au s e) Description Pauses or resumes the search of the target watch folder for items to render. the va lue range is [0.va lue When t y p e = " L AB" .c Swa tchVa lue . 0. When t y p e = " C MY K " . 0. the color values.t y p e Swa tchVa lue . " C M Y K" . m ajo r Ver si o n d at a. the color values in the range [0.0]. the color values in the range [0. 0 is White.b Swa tchVa lue .a Swa tchVa lue . L is in the range [0. pa rse Sw atchF i l e( file ) Description Loads color swatch data from an Adobe Swatch Exchange (ASE) file.m Swa tchVa lue .0]. a and b are in the range [-128. 0.k Swa tchVa lue .0]. " Gr ay " When t y p e = " RG B" .g Swa tchVa lue . v al u e s Swa tchVa lue .

S NA P S HOT _ C AC H E S : Purges all data cached as comp/layer snapshots.UN D O _ C AC H E S : Purges all data saved in the undo cache. Parameters t arg e t The type of elements to purge from memory. qui t( ) Description Quits the After Effects application. pu rg e( tar ge t ) Description Purges unused data of the specified types from memory. Application purge() method a pp. Parameters None. Type Project object. a Pur g eTa rg et enumerated value. saveProj ec tO nCr a sh 28 . Replicates the Purge options in the Edit menu. read-only. • Purg e Tar ge t . Application quit() method a pp. Application saveProjectOnCrash attribute a pp.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. Returns Nothing. A L L _ C AC HE S : Purges all data that After Effects has cached to physical memory. • Pur g e Tar ge t . Returns Nothing. • Pur g e Ta r ge t . See “Project object” on page 110. one of: • Pur g e Ta r ge t . I M AG E _ C AC H E S : Purges all saved image data. pro je c t Description The project that is currently loaded.

For both values. When false the script is executed only once. The value of n is: 2 GB for 32-bit Windows. read/write.ca nce l Ta sk () . the maximum usable percentage of memory.5 GB for Mac OS. a unique identifier for this task. Returns Integer. and is otherwise a percentage of n. the percentage of memory assigned to image cache. execute the script repeatedly. 4 GB for 64-bit Windows. A number of milliseconds to wait before executing the JavaScript. Set to false to suppress this dialog box and quit without saving. A floating-point value. with the specified delay between each execution. 3. Type Boolean. 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. Application scheduleTask() method a pp.JavaScript Reference Application object 29 Description When true (the default). if installed RAM is less than a given amount (n gigabytes). Application setMemoryUsageLimits() method a pp. de lay. Floating-point value. sch ed ul eTa sk ( st r in g To Ex e cut e. Parameters s t r i n g ToE xe c ute de l ay rep e at A string containing JavaScript to be executed. the value is a percentage of the installed RAM. When true. which can be used to cancel it with ap p. Parameters i m a ge Ca chePercen ta g e m a x im u m Me m o r y Pe rcen t a ge Returns Floating-point value. Application setSavePreferencesOnQuit() method a pp. 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. 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. 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. re p e at ) Description Schedules the specified JavaScript for delayed execution. Nothing. 29 .

when false they are not. read-only. preferences saved on quit. Nothing. Nothing. See “Settings object” on page 163. Type Settings object. 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. 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 settings attribute a pp. versi on Description An alphanumeric string indicating which version of After Effects is running. 30 . wa tchFolder(theFolder). vers i o n . Example v ar ver = a p p.JavaScript Reference Application object 30 Parameters doS ave Returns When true. read-only. Example v ar t heFolder = new Folder(“c: /too l”). Parameters fo l de r _ o b j e c t _ to _ wa tch Returns The ExtendScript Folder object for the folder to watch. " ) . a pp. Application version attribute a pp. Application watchFolder() method a pp. Type String. se t ti n g s Description The currently loaded settings.

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 .

The FootageItem object used as proxy for the item. page 36 “AVItem setProxyToNone() method” on page 36 Removes the proxy for the item. The width of the item. 32 . so AVItem attributes and methods are also available when working with CompItem and FootageItem objects.JavaScript Reference AVItem object 32 AVItem object a pp. pro je c t . The CompItem objects that use this item.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. All methods and attributes of Item. in addition to those listed below. When true. The pixel aspect ratio of the item. a proxy source is used for this item. s e tProxy ( ) s e tProxyWi thS e quence( ) s e tProxyWi thS o lid ( ) s e tProxyWi thP l a ceh older( ) s e tProxy ToNon e ( ) Sets a solid as a proxy for the item. When true. Sets a sequence as a proxy for the item. When true. • AVItem is a subclass of Item. Methods Method Reference “AVItem setProxy() method” on page 36 “AVItem setProxyWithSequence() method” on page 37 “AVItem setProxyWithSolid() method” on page 37 Description Sets a proxy for the item. “AVItem setProxyWithPlaceholder() method” on Sets a placeholder as a proxy for the item. the item has an audio component. the item cannot be found or is a placeholder. are available when working with AVItem. • AVItem is the base class for both CompItem and FootageItem. name w i dt h h eig h t p i xel As p e c t f r a m eRa te f r a m eD ur a t i on du r at i on u s e Prox y prox y S ou rce time u s e dIn h as Vi de o h as Au di o fo o t ag e M is s in g “AVItem frameDuration attribute” on page 33 The frame duration for the item. See “CompItem object” on page 53 and “FootageItem object” on page 65. the item has a video component. “AVItem duration attribute” on page 33 “AVItem useProxy attribute” on page 38 “AVItem proxySource attribute” on page 35 “AVItem time attribute” on page 38 “AVItem usedIn attribute” on page 38 “AVItem hasVideo attribute” on page 34 “AVItem hasAudio attribute” on page 34 “AVItem footageMissing attribute” on page 33 The total duration of the item. Attributes Attribute Reference “AVItem name attribute” on page 35 “AVItem width attribute” on page 38 “AVItem height attribute” on page 34 “AVItem pixelAspect attribute” on page 35 “AVItem frameRate attribute” on page 34 Description The name of the object as shown in the Project panel. See “Item object” on page 77. When true. The frame rate of the item. Current time of the item. The height of the item.

fo o t ag e M is s i n g Description When true. AVItem footageMissing attribute a pp.i tem ( in d e x) . To change it.d u r a ti o n Description Returns the duration. Still footage items have a duration of 0. and is read-only.0]. read-only for a FootageItem. but not exactly. and is read-only. 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.. pro je c t . otherwise.3. and is read/write. in seconds.0. In this case.. 33 . Type Floating-point value in the range [1/99. Type Boolean. read-only. if that value is not evenly divisible into 1. See “FootageItem mainSource attribute” on page 66 and “FileSource missingFootagePath attribute” on page 61. 1. This attribute returns the reciprocal of the f r am e R a te .f r a m e D u r at i on Description Returns the length of a frame for this AVItem. • In a FootageItem. 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. AVItem frameDuration attribute a pp. 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. this value is linked to the m a in S o u rce . of the item. Type Floating-point value in the range [0. Due to numerical limitations. read-only. which may not be identical to a value you set. pro je c t . 0. If the AVItem is a FootageItem.JavaScript Reference AVItem object 33 AVItem duration attribute a pp.0]. read/write for a CompItem. or represents footage with a source file that cannot be found. the value is linked to the dur at i on of the m a i n S o u rce object. • In a CompItem.3)) is close to. otherwise read/write.10800. the value is linked to the d u r a ti o n of the composition. pro je c t . the reciprocal is automatically set as a new f r am e R a te value. When set. in seconds.0 (for example.3). (1 / (1 / 0. 0. This is the reciprocal of f r a m eRa te .i tem ( in d e x) .i tem ( in d e x) . the AVItem is a placeholder.

0. pro je c t . AVItem height attribute a pp. • In a FootageItem. the value is linked to the composition. the value is linked to the f r a m e R ate of the m a i n S o u rce object. pro je c t . Type Boolean.i tem ( in d e x) .f r a m eRa te Description The frame rate of the AVItem.h as Au di o Description When true. the value is linked to the m a i n S o u rce object. AVItem hasAudio attribute a pp. • In a CompItem.h as Vi de o Description When true. Type Floating-point value in the range [1.0]. To change it. • In a CompItem. 34 . in frames-per-second. and is read/write. read-only.h ei g h t Description The height of the item in pixels. set the confor mFr ame Rate of the m a i n S o u rce object. This is the reciprocal of the f r am e D u r a t ion . the value is linked to the f r a m eRa te of the composition. otherwise read/write. read-only.i tem ( in d e x) . AVItem hasVideo attribute a pp.JavaScript Reference AVItem object 34 AVItem frameRate attribute a pp. the value is linked to the composition. the value is linked to the composition. the value is linked to the m a i n S o u rce object. Type Boolean. • In a FootageItem. the AVItem has an video component. and is read/write. read-only for a FootageItem. pro je c t .. When set.99. pro je c t . • In a FootageItem. This sets both the fr ameR ate and fr ame D ur a ti on of the FootageItem. and is read-only. • In a CompItem. the reciprocal is automatically set as a new f r am e D u r a t ion value. • In a CompItem.i tem ( in d e x) .i tem ( in d e x) . the AVItem has an audio component.

AVItem name attribute a pp.. 42. 1. If the m ai n S ource object is a FileSource.100. Otherwise. 1. call any of the AVItem methods that change the proxy source: se t Prox y ( ) . pro je c t . Type FootageSource object.JavaScript Reference AVItem object 35 • In a FootageItem.p roxy S o u rce Description The FootageSource being used as a proxy. pro je c t . AVItem proxySource attribute a pp. it is read-only. the value is linked to the m a i n S o u rce object. Type String.9 5.n a m e Description The name of the item. AVItem pixelAspect attribute a pp. the value is linked to the m a i n S o u rce object. 9} . 0. 0. 35 . Certain p ixel As p e c t values are specially known to After Effects. or s e t Proxy Wi thP l a ce h o l der ( ) . read/write.i tem ( in d e x) .i tem ( in d e x) . 1.i tem ( in d e x) . The attribute is read-only. as shown in the Project panel. • In a CompItem.2 . These are the set {1 . 1.9 . Type Integer in the range [1. the value you retrieve after setting may be slightly different from the value you supplied. read-only. and is read/write only if the m a i n S o u rce object is a SolidSource. s e tProxyWi thS e quence( ) . the value is linked to the composition. this value controls the display name in the Project panel. • In a FootageItem. in the range [0. Type Floating-point value. • In a FootageItem. read/write. and are stored and retrieved with perfect accuracy. that is.30000].p i xel As p e c t Description The pixel aspect ratio of the item. Other values may show slight rounding errors when you set or get them.. the value is linked to the m a i n S o u rce object..01. except as noted. but does not affect the file name. 2 . read/write. se t Prox y Wi t hS o l i d () . to change it. pro je c t .0 7.0].

JavaScript Reference AVItem object 36 AVItem setProxy() method a pp..i tem ( in d e x) . The frames-per-second. but both actions are performed as in the user interface. pro je c t . pro je c t .. an integer in the range [4. Loads the specified file into a new FileSource object. he ig h t . sets this as the value of the prox y S ource attribute. an integer in the range [1.s e tProxy Wi th Pl a ceh ol der( n am e . It does not preserve the interpretation parameters. durat ion ) Description Creates a PlaceholderSource object with specified values. s e tProxy To No n e () Description Removes the proxy from this AVItem.i tem ( in d e x) . Parameters name w i dt h.99]. sets the value of p roxy S o u rce to null. f ram e R at e.i tem ( in d e x) . and the user preference says to ask the user what to do. and sets u s e Prox y to true. Returns Nothing. AVItem setProxyToNone() method a pp. sets this as the value of the prox y S ource attribute. s e tProxy ( file ) Description Sets a file as the proxy of this AVItem. the method estimates the alpha interpretation. None. this behavior occurs when a proxy has been set and then moved or deleted. heig ht f r a m eRa te A string containing the name of the new object. instead using the user preferences. w id t h .30000]. and sets u se Prox y to true. NOTE: There is no direct way to set a placeholder as a proxy in the user interface. 36 . pro je c t . instead using the user preferences. Parameters file Returns An ExtendScript File object for the file to be used as a proxy. The pixel dimensions of the placeholder. Parameters None. It does not preserve the interpretation parameters. This differs from setting a FootageItem's main source. AVItem setProxyWithPlaceholder() method a pp. and sets the value of u se Prox y to f al s e . rather than asking the user. If the file has an unlabeled alpha channel.

he i g h t .s e tProxyWith S olid ( c ol or. use the “Force alphabetical order” option.. and sets u s e Prox y to true. an array of 3 floating-point values.. this feature is available only through scripting. n am e . Nothing. pro je c t . A string containing the name of the new object. a floating-point value in the range [0. and sets u s e Prox y to true. pro je c t . in the range [0.30000].0.01. and the user preference says to ask the user what to do. B]. AVItem setProxyWithSequence() method a pp. G. sets this as the value of the prox y S ource attribute. with the option of forcing alphabetical order. It does not preserve the interpretation parameters.. p ix e lAsp ec t) Description Creates a SolidSource object with specified values. w id t h.0]. Nothing. It does not preserve the interpretation parameters. NOTE: There is no way. to set a solid as a proxy... Parameters co lor name w i dt h. heig ht p i xel As p e c t Returns The color of the solid.i tem ( in d e x) . using the user interface. rather than asking the user..0. The pixel dimensions of the placeholder.1. sets this as the value of the prox y S ource attribute. Loads the specified file sequence into a new FileSource object. 100. If any file has an unlabeled alpha channel. [R. the method estimates the alpha interpretation. Parameters file force Alp ha b e t ic a l Returns An ExtendScript File object for the first file in the sequence. AVItem setProxyWithSolid() method a pp. An integer in the range [0. Nothing.10800. up to 3 hours. 37 .0]. instead using the user preferences. instead using the user preferences. an integer in the range [1. forc eAlphabe t ical ) Description Sets a sequence of files as the proxy of this AVItem.0].se tProxyWith S equence( file. When true.i tem ( in d e x) .JavaScript Reference AVItem object 37 du r at i on Returns The total length in seconds. The pixel aspect of the solid.

in pixels. • In a CompItem. pro je c t .i tem ( in d e x) .m ai n S ource . and is read/write only if the m a i n S o u rce object is a SolidSource. • In a FootageItem. It is an error to set this value for a FootageItem whose m a i n S o u rce is still (ite m . pro je c t .i tem ( in d e x) . pro je c t . This value is a number of seconds.i tem ( in d e x) . and to false by the S e tProx y ToNon e( ) method.JavaScript Reference AVItem object 38 AVItem time attribute a pp. then add this item into another composition.w i d th Description The width of the item. and is read/write. If you get this value. Type Floating-point value. Note that upon retrieval. AVItem width attribute a pp. 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. read-only. It is set to true by all the S e t Prox y methods. see “timeToCurrentFormat() global function” on page 17. so it is not automatically updated. 38 .u seProx y Description When true. Otherwise. AVItem usedIn attribute a pp. you must retrieve the value again to get an array that includes the new item.i tem ( in d e x) . AVItem useProxy attribute a pp. the array value is copied.t i m e Description The current time of the item when it is being previewed directly from the Project panel.i s St i l l is true). Type Boolean. Type Array of CompItem objects. it is read-only. a proxy is used for the item.u se dIn Description All the compositions that use this AVItem. read/write. the value is linked to the m a i n S o u rce object. read/write. the value is linked to the composition. pro je c t .

read/write. except as noted.JavaScript Reference AVItem object 39 Type Integer in the range [1... 39 .30000].

qu alit y = L ayerQ ualit y. first L ayer. s ta r t Ti m e . 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. p ro je c t . See “Layer object” on page 84. f i r s t L aye r.i tem ( in d e x) . so AVLayer attributes and methods are available when working with TextLayer objects.l ayer (i n de x ) Description The AVLayer object provides an interface to those layers that contain AVItem objects (Comp layers. • AVLayer is a subclass of Layer. pro je c t . and sound layers). solid layers. in addition to those listed below. the following sets the layer qua l it y. s t a r t Ti m e = 1 . text layers. • AVLayer is a base class for TextLayer.B EST. AE Properties Different types of layers have different AE properties. and i n Poi n t . and the first layer of that CompItem is an AVLayer. v ar f i r s t L aye r = a p p. See “TextLayer object” on page 173. 40 .i te m ( 1 ) . l ayer (1 ) . are available when working with AVLayer.JavaScript Reference AVLayer object 40 AVLayer object a pp. footage layers. All methods and attributes of Layer.

s o u rce i s Na m e Fro m S o u rce h eig h t w i dt h a ud io E n ab l ed mo tionBlu r e f fe c t sAc t ive adju st mentLayer g u id e L ayer t hree DL ayer t hree DPer Cha r can S et Col l ap se Tr ans for ma tion co l l ap s e Tr an s fo r m at i on f r a m e Bl e n di n g f r a m e Bl e n di n g Ty p e 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 h as Au di o a ud io Ac t ive b l endi ngMo de preser veTr a n spa rency t r ackMat teTy p e When true. the layer contains an audio component. 41 . collapse transformation is on. When true. The height of the layer. the layer's audio is enabled. When true. if layer has a track matte. When true.JavaScript Reference AVLayer object 41 f i r s t L aye r. frame blending is enabled. this is a 3D layer. the layer's motion blur is enabled. the layer's audio is active at the current time. this is an adjustment layer. When true. preserve transparency is enabled. Attributes Attribute Reference “AVLayer source attribute” on page 48 “AVLayer isNameFromSource attribute” on page 47 “AVLayer height attribute” on page 47 “AVLayer width attribute” on page 50 “AVLayer audioEnabled attribute” on page 43 “AVLayer motionBlur attribute” on page 47 “AVLayer effectsActive attribute” on page 45 “AVLayer adjustmentLayer attribute” on page 42 “AVLayer guideLayer attribute” on page 46 “AVLayer threeDLayer attribute” on page 49 “AVLayer threeDPerChar attribute” on page 49 Description The source item for this layer. but contains a named source. specifies the way it is applied. When true. 3D is set on a per-character basis in this text layer. this is a guide layer. the layer's effects are active. When true. 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 . “AVLayer collapseTransformation attribute” on page 45 “AVLayer frameBlending attribute” on page 46 “AVLayer frameBlendingType attribute” on page 46 “AVLayer canSetTimeRemapEnabled attribute” on page 45 “AVLayer timeRemapEnabled attribute” on page 49 “AVLayer hasAudio attribute” on page 46 “AVLayer audioActive attribute” on page 42 “AVLayer blendingMode attribute” on page 43 “AVLayer preserveTransparency attribute” on page 48 “AVLayer trackMatteType attribute” on page 50 When true. time remapping is enabled on this layer. The type of frame blending for the layer. i n Po i n t = 2 . When true. The width of the layer. the layer has no expressly set name. When true. When true. “AVLayer canSetCollapseTransformation When true. When true. it is legal to change the value of t i m e Rem a p E n a bl e d . When true. The blending mode of the layer. When true.

i tem ( in d e x) . Type Boolean. AVLayer adjustmentLayer attribute a pp.l ayer (i n de x ). Type Boolean. a d j u s t m e n t L ayer Description True if the layer is an adjustment layer. For this value to be true. When true. Changes the source item for this layer. a udio Ac t iveAtTime() c al c u l ate Tr a n s for m From Poi n t s( ) rep l a c e S o u rce ( ) s o u rce Rec t AtTi m e ( ) Retrieves the source rectangle of a layer. read/write. and the time must be between the in Poi n t and o utPoi n t of this layer. The layer quality setting. no other layer with audio may be soloing unless this layer is soloed too.l ayer (i n de x ) .JavaScript Reference AVLayer object 42 Attribute Reference “AVLayer isTrackMatte attribute” on page 47 “AVLayer hasTrackMatte attribute” on page 46 “AVLayer quality attribute” on page 48 “AVLayer autoOrient attribute” on page 43 Description When true. pro je c t . AVLayer audioActive attribute a pp. aud i oAc t ive Description True if the layer's audio is active at the current time. The type of automatic orientation for the layer. Calculates a transformation from a set of points in this layer.i tem ( in d e x) . this layer is being used as a track matte for the layer below it. pro je c t . 42 . the layer above is being used as a track matte on this layer. aud i oEna ble d must be true. i s Tr a ck Ma tte h as Tr a ck Ma tte qu a l i t y a utoO r i en t Methods Method Reference “AVLayer audioActiveAtTime() method” on page 43 “AVLayer calculateTransformFromPoints() method” on page 44 “AVLayer replaceSource() method” on page 48 “AVLayer sourceRectAtTime() method” on page 49 Description Reports whether this layer's audio is active at a given time. read-only.

no other layer with audio may be soloing unless this layer is soloed too. bl end i ngMo de Description The blending mode of the layer. pro je c t . in seconds. Parameters time Returns The time. read/write.i tem ( in d e x) .JavaScript Reference AVLayer object 43 AVLayer audioActiveAtTime() method a pp. One of: AutoO r ien t Ty p e. Type An AutoO r i en t Ty p e enumerated value. This value corresponds to the audio toggle switch in the Timeline panel. pro je c t . AVLayer autoOrient attribute a pp. aud i oEna bl e d Description When true. read/write. pro je c t .i tem ( in d e x) . pro je c t .l ayer (i n de x ).l ayer (i n de x ). the layer's audio is enabled. 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.N O _ AUTO _ O R I E N T AVLayer blendingMode attribute a pp. Boolean. A floating-point value.l ayer (i n de x ). One of: 43 .i tem ( in d e x) . autoO r i en t Description The type of automatic orientation to perform for the layer.A LO N G _ PAT H AutoO r ien t Ty p e.i tem ( in d e x) .layer(i n de x ). Type A Bl en d i n g Mo de enumerated value. Type Boolean. and the time must be between the i n Poin t and outPoint of this layer. For this method to return true. read/write. a ud io E n ab l ed must be true. 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. AVLayer audioEnabled attribute a pp.

S T E N C I L _ A L PHA Bl e n d in g Mod e .PI N _ L I G H T Bl e n d in g Mod e .S C R E E N Bl e n d in g Mod e .JavaScript Reference AVLayer object 44 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 .S O F T _ L I G HT Bl e n d in g Mod e . z ] .OV E R L AY Bl e n d in g Mod e .H A R D _ L I G HT Bl e n d in g Mod e . p o i n t B ot to m Ri g ht ) Description Calculates a transformation from a set of points in this layer. [x .C L A S S I C _ C O LOR _ BUR N 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 . y.L I N E A R _ D O D G E Bl e n d in g Mod e . [ x .D I S SO LVE 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 .N O R M A L Bl e n d in g Mod e .i tem ( in d e x) . 44 .S I L H OU E T E _ AL PH A Bl e n d in g Mod e . Parameters p o i n tTop Lef t p o i n tTop R i g ht p o i n tB o ttom R i g h t The top left point coordinates in the form of an array.C O LOR Bl e n d in g Mod e .AL PH A _ A DD 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 . 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 .AD D Bl e n d in g Mod e .C O LOR _ BUR N Bl e n d in g Mod e . V I V I D _ L I G H T AVLayer calculateTransformFromPoints() method a pp.LU M I N O S I T Y 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 .H UE Bl e n d in g Mod e . The top right point coordinates in the form of an array.M ULT I PLY 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 . pro je c t . y.S AT U RAT I O N 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 . [x . The bottom right point coordinates in the form of an array.S I L H OU E T T E _ LUM A Bl e n d in g Mod e .H A R D _ M I X Bl e n d in g Mod e .E XC LUS I ON 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 .DA N C I N G _ DI S S OLV E Bl e n d in g Mod e .L I G H T E N Bl e n d in g Mod e . z] . y. z ] .LU M I N E S C E N T _ PR E M U L Bl e n d in g Mod e .layer(i n de x ).C O LOR _ D O D G E Bl e n d in g Mod e .

t r. bl ) . read/write. 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.l ayer (i n de x ). AVLayer effectsActive attribute a pp. col l apse Tr a n sfor mation Description True if collapse transformation is on for this layer. n e w L aye r.i tem ( in d e x) . t r a n sf or m [ se l ]. AVLayer collapseTransformation attribute a pp. AVLayer canSetTimeRemapEnabled attribute a pp.l ayers. as indicated by the <f> icon next to it in the user interface.c a l c ul ateTr a n s f o r m From Po i n t s ( t l . Type Boolean. 45 . pro je c t . bl e n d i n g Mo de = B l en d i n g Mo d e .i tem ( in d e x) . n ew L ayer. v ar t r an s for m = n ew L ayer.i tem ( in d e x) . Type Boolean. Example v ar n ew L ayer = com p. read-only.l ayer (i n de x ). eff ec ts Ac t ive Description True if the layer's effects are active.l ayer (i n de x ). pro je c t . } AVLayer canSetCollapseTransformation attribute a pp.i tem ( in d e x) . pro je c t .JavaScript Reference AVLayer object 45 Returns An Object with the transformation properties set. ad d (n e wFoo ta ge ).l ayer (i n de x ). read-only. th re eD L ayer = t r u e. AL P H A _ A D D . Type Boolean. for(var sel in transform) { n ew L ayer. 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. pro je c t . se tVa lue (t r an sfor m [s el ] ) .

i tem ( in d e x) . read-only.l ayer (i n de x ).l ayer (i n de x ). read-only.i tem ( in d e x) .l ayer (i n de x ). One of: Fr am e Bl en d i n g Ty p e. pro je c t . Type Boolean.l ayer (i n de x ). AVLayer frameBlendingType attribute a pp. has Aud i o Description True if the layer contains an audio component. FRAM E _ MI X Fr a m e Bl e n d i n g Ty p e . read/write. pro je c t . AVLayer hasTrackMatte attribute a pp. pro je c t . pro je c t .i tem ( in d e x) . pro je c t . Type Boolean. Type Boolean.i tem ( in d e x) . Type A Fr a m eBl en di n g Ty p e enumerated value.JavaScript Reference AVLayer object 46 Type Boolean.i tem ( in d e x) . PI X E L _ M OT I O N AVLayer guideLayer attribute a pp. 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 . read/write. regardless of whether it is audio-enabled or soloed. read/write. guideL ayer Description True if the layer is a guide layer. fr ame Bl end i n g Description True if frame blending is enabled for the layer.l ayer (i n de x ). AVLayer frameBlending attribute a pp. 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. has Tr a ckMat te 46 . AVLayer hasAudio attribute a pp.

read/write.i tem ( in d e x) . Type Boolean. read-only. Type Boolean.l ayer (i n de x ). AVLayer height attribute a pp. pro je c t . Type Boolean. pro je c t .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. read-only. n am e has the same value as l ay e r.l ayer (i n de x ). AVLayer isTrackMatte attribute a pp.i tem ( in d e x) . this layer's t r a ck Ma tteTy p e value controls how the matte is applied. laye r. read-only. Type Boolean.s ource . is Name FromS o urce Description True if the layer has no expressly set name. heig ht Description The height of the layer in pixels. read-only. Type Floating-point. AVLayer motionBlur attribute a pp. In this case. pro je c t . When true. 47 .i tem ( in d e x) .i tem ( in d e x) l ayer ( i n d e x) . pro je c t . or if the layer does not have a source. mot i onBlur Description True if motion blur is enabled for the layer. False if the layer has an expressly set name.nam e . but contains a named source. AVLayer isNameFromSource attribute a pp.i s Tr ackMa tte Description True if this layer is being used as a track matte for the layer behind it.l ayer (i n de x ).

read-only. See also “Project autoFixExpressions() method” on page 111.B EST L ayer Q u al i t y. qual i t y Description The quality with which this layer is displayed. Returns Nothing. AVLayer source attribute a pp. read/write. The value is null in a Text layer. Type A L ayer Q u a l it y enumerated value. pre s er veTr an s p aren c y Description True if preserve transparency is enabled for the layer. do this only at the end of the operation. read/write. rep l a ce S ource ( n e w S ource .rep l a c e S o u rce ( ) to change the value. fa l se otherwise.layer(i n de x ). if replacing a large amount of footage.l ayer (i n de x ).i tem ( in d e x) . Tr ue to adjust expressions for the new source.i tem ( in d e x) . Note that this feature can be resource-intensive.JavaScript Reference AVLayer object 48 AVLayer preserveTransparency attribute a pp. One of: LayerQu alit y. Type AVItem object. Use AV L ayer.l ayer (i n de x ).l ayer (i n de x ). Type Boolean. f i xE x pre ss i on s ) Description Replaces the source for this layer. pro je c t .i tem ( in d e x) . Parameters n e w S o u rce f i xE x pres si o n s The new source AVItem object.i tem ( in d e x) . pro je c t . AVLayer quality attribute a pp. pro je c t . 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. 48 . so urce Description The source AVItem for this layer. pro je c t .

Type Boolean. Applies only to text layers.JavaScript Reference AVLayer object 49 AVLayer sourceRectAtTime() method a pp. Extents apply to shape layers. read/write.i tem ( in d e x) . for example. t im eRemap E na b le d Description True if time remapping is enabled for this layer. allowing its characters to be animated off the plane of the text layer. Parameters t i m eT extents The time index. e x te n t s ) Description Retrieves the rectangle bounds of the layer at the specified time index. Tr ue to include the extents. fa l se otherwise. in seconds.i tem ( in d e x) .l ayer (i n de x ). pro je c t . Type Boolean. pro je c t . read/write. AVLayer threeDPerChar attribute a pp. corrected for text or shape layer content. pro je c t . AVLayer timeRemapEnabled attribute a pp. read/write. h eig h t] . to write text that is properly aligned to the baseline. so urceRe c tAt Ti me (t im e T. increasing the size of the layer bounds as necessary. w id t h.l ayer (i n de x ). AVLayer threeDLayer attribute a pp. Use. lef t .i tem ( in d e x) .i tem ( in d e x) . Type Boolean. th re eD PerChar Description True if this layer has the Enable Per-character 3D switch set.layer(i n de x ).l ayer (i n de x ). 49 . pro je c t . Returns A JavaScript object with four attributes. [ top. th re eD Layer Description True if this is a 3D layer. A floating-point value.

Type Floating-point. Type A Tr a ck Ma tte Ty p e enumerated value. w i d th Description The width of the layer in pixels. pro je c t . AL PH A_ I N VE RT E D Tr a ck Mat teTy p e. AL PH A Tr a ck Mat teTy p e. N O_ T RAC K _ MAT T E AVLayer width attribute a pp. 50 . read/write. One of: Tr a ck Mat teTy p e.i tem ( in d e x) .l ayer (i n de x ).l ayer (i n de x ). read-only.JavaScript Reference AVLayer object 50 AVLayer trackMatteType attribute a pp. LUM A Tr a ck Ma t teTy p e . pro je c t .i tem ( in d e x) . t r a ck Ma tte Ty p e Description If this layer has a track matte. LU M A _ I N V E RT E D Tr a ck Mat teTy p e. specifies the way the track matte is applied.

JavaScript Reference CameraLayer object 51 CameraLayer object a pp. AE Properties CameraLayer defines no additional attributes. It can be accessed in an item’s layer collection either by index number or by a name string. See “Layer object” on page 84. see “LayerCollection addCamera() method” on page 94. • CameraLayer is a subclass of Layer.l ayer(i n de x ) Description The CameraLayer object represents a camera layer within a composition. 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 . pro je c t . Create it using the LayerCollection object’s a d dC am er a method.i tem ( in d e x) . All methods and attributes of Layer are available when working with CameraLayer. but has different AE properties than other layer types.

folders. Objects Object Reference Description ItemCol l ec t i on L ayer Co l l e c t i on O MCol l ec t i on RQ Item Col le c t ion “ItemCollection object” on page 80 All of the items (imported files. 52 . You do not assign objects to them yourself—their contents update automatically as objects are created or deleted. solids. and so on) found in the Project panel. The index numbering of a collection starts with 1. Attributes length Methods [] Retrieves an object in the collection by its index number. “LayerCollection object” on page 93 All of the layers in a composition. The number of objects in the collection. “RenderQueueItem object” on page 156 All of the render-queue items in the project. not 0. However. a collection associates a set of objects or values as a logical group and provides access to them by index.JavaScript Reference Collection object 52 Collection object Like an array. “OMCollection object” on page 105 All of the Output Module items in the project. most collection objects are read-only. The first object is at index 1.

i tem ( i n d e x) a pp. The first shows the number of layers in the CompItem. time filtering is enabled for this composipage 55 tion. and allows you to manipulate and get information about it. When true. Draft 3D mode is enabled for the Composition panel. shy layers are visible in the Timeline panel. Access the objects by position index number in a project’s i te m collection. a l er t ( " nu m b e r o f l ayer s i s " + f i r s t Co m p. preser veNeste d Resolut i on “CompItem preserveNestedResolution attribute” on page 58 b g Co lor a c t iveC am er a d i sp l ay S ta r t Ti m e “CompItem bgColor attribute” on page 54 “CompItem activeCamera attribute” on page 54 “CompItem displayStartTime attribute” on page 55 The current active camera layer. the frame rate of nested compositions is preserved. Example Given that the first item in the project is a CompItem. and the second shows the name of the last layer in the CompItem. which is a subclass of Item. a l er t( " n a m e of l a st l ayer i s " + f i rs t Co m p.i te m ( 1 ) . page 60 “CompItem workAreaDuration attribute” on page 59 “CompItem numLayers attribute” on page 57 The work area duration. page 56 “CompItem workAreaStart attribute” on The work area start time. “CompItem hideShyLayers attribute” on When true.n u m L aye rs ) . in addition to those listed below. When true.i tem s [ inde x ] Description The CompItem object represents a composition. See “AVItem object” on page 32 and “Item object” on page 77. • CompItem is a subclass of AVItem. are available when working with CompItem. “CompItem preserveNestedFrameRate attribute” on page 57 When true. 53 . Attributes Attribute Reference Description f r a m eD ur a t i on wor k Area St ar t wor k Area D ur a ti on nu m L ayers h id eS hy L ayers mo tionBlu r d r a ft 3 d f r a m e Bl e n di n g preser veNeste d Fr a m eRa te “CompItem frameDuration attribute” on The duration of a single frame.num L aye r s ) . n a m e ) . All methods and attributes of AVItem and Item. p ro je c t .JavaScript Reference CompItem object 53 CompItem object a pp. The background color of the composition. pro je c t . The number of layers in the composition.l ayer ( f i r s t Com p. motion blur is enabled for this composition. page 56 “CompItem motionBlur attribute” on page 57 “CompItem draft3d attribute” on page 55 When true. “CompItem frameBlending attribute” on When true. the following code displays two alerts. pro je c t . Changes the display of the start time in the Timeline panel. v ar f i r s t Co m p = a p p. the resolution of nested compositions is preserved.

pro je c t . The rendering plug-in module to be used to render this composition. pro je c t .0]. G. page 59 “CompItem selectedProperties attribute” on page 59 “CompItem renderer attribute” on page 58 “CompItem renderers attribute” on page 58 The selected properties of the composition.i tem ( in d e x) . read-only. and blue components of the color. Methods Method Reference “CompItem duplicate() method” on page 55 “CompItem layer() method” on page 56 Description Creates and returns a duplicate of this composition. Gets a layer from this composition.a c t iveC am er a Description The active camera. in the range [0. res o lut i o n Fa c to r s hu t ter A n g l e s hu t ter P h a se l ayer s s e l e c te d L ayer s s e l e c t e d Pro p e r t i e s renderer renderers The camera shutter phase. 54 . green.i tem ( in d e x) . Type CameraLayer object.JavaScript Reference CompItem object 54 Attribute Reference “CompItem resolutionFactor attribute” on page 58 “CompItem shutterAngle attribute” on page 59 “CompItem shutterPhase attribute” on page 59 Description The factor by which the x and y resolution of the Composition panel is downsampled. read/write. The value is null if the composition contains no enabled camera layers. which is the front-most camera layer that is enabled. B].0. “LayerCollection object” on page 93 “CompItem selectedLayers attribute” on The selected layers of the composition. [R. “CompItem layers attribute” on page 57 The layers of the composition. CompItem bgColor attribute a pp.. du pl i c ate( ) l ayer () CompItem activeCamera attribute a pp. The three array values specify the red. The set of available rendering plug-in modules.1.b g Co l or Description The background color of the composition. The camera shutter angle. Type An array containing three floating-point values.

which contains the same layers as the original.i tem ( in d e x) . Parameters None. This is the equivalent of the Start Timecode or Start Frame setting in the Composition Settings dialog box. Corresponds to the value of the Frame Blending button in the Composition panel. Type Floating-point value in the range [0. CompItem duplicate() method a pp. This corresponds to the value of the Draft 3D button in the Composition panel. frame blending is enabled for this Composition. read/write. pro je c t . CompItem draft3d attribute a pp.0] (1 second less than 25 hours).d u p li c a te ( ) Description Creates and returns a duplicate of this composition. if true. Type Boolean. 55 .JavaScript Reference CompItem object 55 CompItem displayStartTime attribute a pp. Draft 3D mode is enabled for the Composition panel.86339. in seconds.i tem ( in d e x) .f r a m e Bl e n d in g Description When true. frame blending is enabled. CompItem frameBlending attribute a pp. Returns CompItem object.. Type Boolean. pro je c t . read/write. read/write.i tem ( in d e x) . pro je c t .d i sp l ay S ta r t Ti m e Description The time set as the beginning of the composition.i tem ( in d e x) . pro je c t .d r a ft 3 d Description When true..0.

pro je c t . read/write. Parameters i n dex The index number of the desired layer in this composition..numLayers]. An integer in the range [1–oth erL ayer.h id eS hy L ayers Description When true.i tem ( in d e x) . relative to o ther L ayer . CompItem layer() method a pp.JavaScript Reference CompItem object 56 CompItem frameDuration attribute a pp.l ayer (n a m e) Description Returns a Layer object.f r a meD ur at i on Description The duration of a frame. re l In de x ) a pp. —or— otherL ayer rel In dex A Layer object in this composition. CompItem hideShyLayers attribute a pp. An integer in the range [1. pro je c t . . 56 .i tem ( in d e x) . pro je c t . Corresponds to the value of the Hide All Shy Layers button in the Composition panel. —or— name The string containing the name of the desired layer.l ayer (o t he rLaye r. The position of the desired layer. where n u m Laye r s is the number of layers in the composition. in seconds. read/write. where n u m Laye r s is the number of layers in the composition. .i tem ( in d e x) . The re lIn d ex value is added to the index value of this layer to find the position of the desired layer. pro je c t . This is the inverse of the f r am e R a te value (frames-per-second). Type Floating-point.i tem ( in d e x) . pro je c t . which can be specified by name. including those whose shy value is true. When false. or an index position relative to another layer. This value is added to the otherL ayer value to derive the absolute index of the layer to return. in d ex .i tem ( in d e x) . all layers are visible. an index position in this layer.index ].l ayer (i n de x ) a pp. only layers with s hy set to false are shown in the Timeline panel. Type Boolean. numLayers–o ther L ayer..

CompItem layers attribute a pp.m o t io n B lu r Description When true. See “LayerCollection object” on page 93. the frame rate of nested compositions is preserved in the current composition. CompItem numLayers attribute a pp. Corresponds to the value of the Motion Blur button in the Composition panel.l ayers Description A LayerCollection object that contains all the Layer objects for layers in this composition. read/write. read-only. CompItem preserveNestedFrameRate attribute a pp. pro je c t .preser veNe ste d Fr a m eR ate Description When true. pro je c t .nu m L ayers Description The number of layers in the composition.i tem ( in d e x) . CompItem motionBlur attribute a pp. motion blur is enabled for the composition. 57 .JavaScript Reference CompItem object 57 Returns Layer object. pro je c t . Corresponds to the value of the “Preserve frame rate when nested or in render queue” option in the Advanced tab of the Composition Settings dialog box. pro je c t .i tem ( in d e x) .i tem ( in d e x) . Type Boolean.i tem ( in d e x) . read-only. Type Integer. Type Boolean. Type LayerCollection object. read/write.

Corresponds to the value of the “Preserve Resolution When Nested” option in the Advanced tab of the Composition Settings dialog box. half resolution is [2. Type Array of strings. CompItem renderers attribute a pp. pro je c t . Member strings reflect installed modules.4]. CompItem resolutionFactor attribute a pp. The two values in the array specify how many pixels to skip when sampling. the second controls vertical sampling. pro je c t .i tem ( in d e x) .renderers .preser veNe ste d Resolut i on Description When true. Allowed values are the members of c o m p Ite m . as set in the Advanced tab of the Composition Settings dialog box. the first number controls horizontal sampling. read/write.res o lut i o n Fa c to r Description The x and y downsample resolution factors for rendering the composition.2].renderers Description The available rendering plug-in modules. Type Boolean. and quarter resolution is [4. 58 .i tem ( in d e x) . read/write. pro je c t .i tem ( in d e x) . CompItem renderer attribute a pp. The default is [1.renderer Description The current rendering plug-in module to be used to render this composition. Type Array of two integers in the range [1. read/write. the resolution of nested compositions is preserved in the current composition.i tem ( in d e x) . as seen in the Advanced tab of the Composition Settings dialog box.. pro je c t . Full resolution is [1.1]. read-only.JavaScript Reference CompItem object 58 CompItem preserveNestedResolution attribute a pp. Type String.99].1].

Type Array of Layer objects. pro je c t ...i tem ( in d e x) . pro je c t .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. Type Integer in the range [0.720]..JavaScript Reference CompItem object 59 CompItem selectedLayers attribute a pp. Type Integer in the range [–360. This corresponds to the Shutter Angle setting in the Advanced tab of the Composition Settings dialog box.i tem ( in d e x) .360].. This corresponds to the Shutter Phase setting in the Advanced tab of the Composition Settings dialog box. CompItem shutterPhase attribute a pp.s hu t ter P h a se Description The shutter phase setting for the composition.s e l e c te d L ayer s Description All of the selected layers in this composition. read/write.s hu t ter A n g l e Description The shutter angle setting for the composition. pro je c t . read-only. This is the difference of the start-point and end-point times of the Composition work area. pro je c t . CompItem selectedProperties attribute a pp.i tem ( in d e x) . CompItem shutterAngle attribute a pp. read-only. This is a 0-based array (the first object is at index 0).wor k Area D ur a t ion Description The duration of the work area in seconds. CompItem workAreaDuration attribute a pp.i tem ( in d e x) . Type Array of Property and PropertyGroup objects. read/write.i tem ( in d e x) . The first property is at index position 0. pro je c t . 59 .

read/write. Type Floating-point. in seconds. pro je c t . read/write.i tem ( in d e x) .JavaScript Reference CompItem object 60 Type Floating-point. CompItem workAreaStart attribute a pp. 60 .wor k Area St ar t Description The time when the Composition work area begins.

• If this FileSource is a m a i n S o u rce of a FootageItem.f il e a pp. read-only.p roxy S o u rce . pro je c t .i tem ( i n d e x) . pro je c t . rel o a d () FileSource file attribute a pp. m a i n S o u rce .i tem ( i n d e x) . read-only. are available when working with FileSource.m i s s i n g Fo o t a g e Pat h a pp. call s e t Prox y ( ) or se tProx y Wi th S equ ence( ) . All methods and attributes of FootageSource.i tem ( i n d e x) . pro je c t . fi l e . m a i n S o u rce a pp. f i le 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. To change the value: • If this FileSource is a prox y S ource of an AVItem.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.JavaScript Reference FileSource object 61 FileSource object a pp. pro je c t . pro je c t .i tem ( in d e x) .m a i n S o u rce . f il e . if it is a m a in S o u rce of a FootageItem. See also “AVItem footageMissing attribute” on page 33.i tem ( i n d e x) . 61 . call rep l ace( ) or repla ceWith S equence() . See “FootageSource object” on page 68.i tem ( in d e x) . Attributes Attribute Reference “FileSource file attribute” on page 61 Description The file that defines this asset. FileSource missingFootagePath attribute a pp. • FileSource is a subclass of FootageSource. fi l e Description The ExtendScript File object for the file that defines this asset. on page 61 Methods Method Reference “FileSource reload() method” on page 62 Description Reloads the asset from the file. Type File object. Type String. in addition to those listed below. pro je c t .p roxy S o u rce .p roxySo urce Description The FileSource object describes footage that comes from a file.

i tem ( i n d e x) . Returns Nothing.m a i n S o u rce. m a i n S o u rce . f il e . 62 . pro je c t . not a p roxy S o u rce . This method can be called only on a m a i n S o u rce . Parameters None.JavaScript Reference FileSource object 62 FileSource reload() method a pp. re l o ad ( ) Description Reloads the asset from the file.

Example Given that the second item in the project is a FolderItem.JavaScript Reference FolderItem object 63 FolderItem object a pp. } else { for ( i = 1 . the following code puts up an alert for each top-level item in the folder.i tem ( i n d e x) . The first item is at index 1. i te m s nu m Item s Methods Method Reference “FolderItem item() method” on page 63 Description Gets an item from the folder. item(2 ). pro je c t .nu m Item s.n ame) . It can contain various types of items (footage. solids) as well as other folders. Item object. The number of items contained in the folder. v ar secondItem = app. } } Attributes Attribute Reference “FolderItem items attribute” on page 64 “FolderItem numItems attribute” on page 64 Description The contents of this folder.item( i) .i te m Description Returns the top-level item in this folder at the specified index position. Note that “top-level” here means toplevel within the folder. compositions.FolderItem Description The FolderItem object corresponds to a folder in your Project panel. not necessarily within the project. the position index of the item to retrieve. showing that item’s name. Parameters i n dex Returns An integer. 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 . 63 . i <= s econd Item.proj ec t. i te m ( ) FolderItem item() method a pp. pro je c t . if ( !(secondItem inst anceof Fo lderItem) ) { a l er t("problem: se cond item is no t a folder").

pro je c t .JavaScript Reference FolderItem object 64 FolderItem items attribute a pp. read only. only the FolderItem for that folder is counted. nu m It e m s Description The number of items contained in the i te m s collection (fold e r Ite m . Type ItemCollection object. 64 . Type Integer. 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.i te m s Description An ItemCollection object containing Item object that represent the top-level contents of this folder. FolderItem numItems attribute a pp. If the folder contains another folder. read only.item s.i tem ( i n d e x) .i tem ( i n d e x) . this collection contains only the top-level items in the folder. Unlike the ItemCollection in the Project object. not any subitems contained in it. l en gth ). pro je c t .

in addition to those listed below.i tem ( i n d e x) a pp. 65 . All methods and attributes of AVItem and Item. rep l ace( ) replaceWit hP laceho lder( ) replaceWit hSe quence() rep l a ce Wi t h S o l i d () “FootageItem replaceWithPlaceholder() Replaces a footage file with a placeholder object. Type File object. • FootageItem is a subclass of AVItem.JavaScript Reference FootageItem object 65 FootageItem object a pp.f il e . are available when working with FootageItem. which appears in the Project panel.i tem ( i n d e x) . m a i n S o u rce . Attributes Attribute Reference “FootageItem file attribute” on page 65 “FootageItem mainSource attribute” on page 66 Description The footage source file. See “AVItem object” on page 32 and “Item object” on page 77. method” on page 66 “FootageItem replaceWithSequence() method” on page 67 “FootageItem replaceWithSolid() method” on page 67 Replaces a footage file with an image sequence. Otherwise it is null.f i l e Description The ExtendScript File object for the footage's source file. f i le m a i n S o u rce Methods Method Reference “FootageItem replace() method” on page 66 Description Replaces a footage file with another footage file. These are accessed by position index number in a project’s i tem collection. Replaces a footage file with a solid. If the FootageItem's m a i n S o u rce is a FileSource. pro je c t .i tem s [ inde x ] Description The FootageItem object represents a footage item imported into a project. read only. All settings related to the footage item. pro je c t . pro je c t . FootageItem file attribute a pp. this is the same as Fo ot a geIte m . which is a subclass of Item.

an integer in the range [4. Creates a new PlaceholderSource object. Type FootageSource object.i tem ( in d e x) . In the new source object. 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.rep lace( file ) Description Changes the source of this FootageItem to the specified file. heig ht . The width of the placeholder in pixels. The method preserves interpretation parameters from the previous m a in S o u rce object.m a i n S o u rce Description The footage source. See “AVItem footageMissing attribute” on page 33 and “FileSource missingFootagePath attribute” on page 61.30000].m is s in g Fo o t ag e Pa th attribute. FootageItem replaceWithPlaceholder() method a pp.JavaScript Reference FootageItem object 66 FootageItem mainSource attribute a pp.replaceWit hPla ceho l der( n am e . Parameters name w i dt h h eig h t A string containing the name of the placeholder. it sets the n a m e . fra m eR a te . read-only.i tem ( in d e x) . sets its values from the parameters. the method estimates the alpha interpretation. an object that contains all of the settings related to that footage item. the path to the missing footage file is in the F i l e S o u rce.. call one of the FootageItem “replace” methods. f r a m eD ur a t i on . and sets m a in S o u rce to that object. pro je c t . pro je c t . and du r at i on attributes (see “AVItem object” on page 32) based on the contents of the file. pro je c t . The attribute is read-only.. To change its value. the method creates a new FileSource object for the file and sets m a i n S o u rce to that object. 66 .30000]. If the specified file has an unlabeled alpha channel. he i g ht. d ura t i on ) Description Changes the source of this FootageItem to the specified placeholder. See the “FootageSource object” on page 68. In addition to loading the file. FootageItem replace() method a pp. Parameters file An ExtendScript File object for the file to be used as the footage main source. and the f o o t a g e M i s s i n g value is true. w id t h. an integer in the range [4. w i d th . including those that are normally accessed through the Interpret Footage dialog box.i tem ( in d e x) . The height of the placeholder in pixels.

h ei g h t .0.0. in the range [0.0]. an array of three floating-point values. If the specified file has an unlabeled alpha channel..100.JavaScript Reference FootageItem object 67 f r a m eRa te du r at i on The frame rate of the placeholder.99. Parameters file force Alp ha b e t ic a l An ExtendScript File object for the first file in the sequence to be used as the footage main source. sets its values from the parameters. and sets m a i n S o u rce to that object. fr ameD u r at ion . The method preserves interpretation parameters from the previous m a in S o u rce object. the method creates a new FileSource object for the file and sets m a i n S o u rce to that object. h e ig ht. In the new source object.. The pixel aspect ratio of the solid. pi xe l As p e c t) Description Changes the source of this FootageItem to the specified solid. FootageItem replaceWithSolid() method a pp. the method estimates the alpha interpretation.. 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. B]. In addition to loading the file.. When true. it sets the n am e .0] The duration of the placeholder in seconds..1. w idt h.replaceWit hSe quence( f i l e .i tem ( in d e x) . Creates a new SolidSource object. use the “Force alphabetical order” option. w id t h .30000]. 67 ..i tem ( in d e x) . The height of the solid in pixels.30000]. FootageItem replaceWithSequence() method a pp.01. n am e . a floating-point value in the range [0. G. and dur a t i on attributes (see “AVItem object” on page 32) based on the contents of the file.0. Parameters co lor name w i dt h h eig h t p i xel As p e c t The color of the solid.0].10800. [R. A string containing the name of the solid. The width of the solid in pixels.0]. pro je c t . re p l a ceWit h S o l i d ( colo r. a floating-point value in the range [1. an integer in the range [4. an integer in the range [4. a floating-point value in the range [0. pro je c t .

The effective frame rate as displayed and rendered in compositions by After Effects.m a i n S o u rce a pp. a footage clip or proxy includes an page 71 alpha channel. How many times an image sequence is set to loop. Methods Method Reference “FootageSource guessAlphaMode() method” on page 70 “FootageSource guessPulldown() method” on page 70 Description Estimates the alp haMo de setting. Attributes Attribute Reference Description h as Al p ha a l pha Mod e premu l Col or i nver t A l pha i s St i l l f i e l d S e p a r a t i on Ty p e h ig hQ ua l it y F ie l dS epa r a ti on rem ovePu l l dow n l o op n a t iveFr a m e R a te d i sp l ay Fr am e R ate con f or m Fr a m e R a te “FootageSource hasAlpha attribute” on When true. See “FootageItem object” on page 65 and “CompItem object” on page 53. The pulldown type for the footage. See “SolidSource object” on page 169. The native frame rate of the footage. The rate to which footage should conform. 68 .p roxySo urce Description The FootageSource object holds information describing the source of some footage. When true. It is used as the m a i n S o u rce of a FootageItem. “FootageSource premulColor attribute” The color to be premultiplied. footage is a still image. How the fields are to be separated in non-still footage. “FootageSource alphaMode attribute” on page 69 The mode of an alpha channel. or the prox y S ou rce of a CompItem or FootageItem. pro je c t . on page 72 “FootageSource invertAlpha attribute” on page 71 “FootageSource isStill attribute” on page 71 “FootageSource fieldSeparationType attribute” on page 70 “FootageSource highQualityFieldSeparation attribute” on page 71 “FootageSource removePulldown attribute” on page 72 “FootageSource loop attribute” on page 72 “FootageSource nativeFrameRate attribute” on page 72 “FootageSource displayFrameRate attribute” on page 69 “FootageSource conformFrameRate attribute” on page 69 When true.i tem ( in d e x) .i tem ( in d e x) . gu essAlph aMo de() g u e ss Pu l l dow n () Estimates the p u l ldow n Ty p e setting. The field separation type. so FootageSource attributes and methods are available when working with SolidSource objects. • FootageSource is the base class for SolidSource. pro je c t .JavaScript Reference FootageSource object 68 FootageSource object a pp. an alpha channel in a footage clip or proxy should be inverted.

this is con f o r m Fr a m e R a te * 0.i tem ( in d e x) . 99.i tem ( in d e x) . PR EMU LTIPLIED FootageSource conformFrameRate attribute a pp. 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). Type Floating-point value in the range [0. 99. If set to 0. the effective frame rate after removing 1 of every 5 frames. 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 .8. One of: Alph aMo de.i tem ( in d e x) . 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.con for m Fr am eRa te a pp. i s S t i l l is true. 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 .0.p roxySo urce. O F F. read/write.0. If hasAlpha is false.alp haMo de a pp.i tem ( in d e x) . m a i n S o u rce . IGNOR E Alph aMo de. STRAI GH T Alph aMo de. pro je c t . 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. alph aMo de Description The alphaMode attribute of footageSource defines how the alpha information in the footage is to be interpreted. (read/write). FootageSource displayFrameRate attribute a pp. O F F. this attribute has no relevant meaning.JavaScript Reference FootageSource object 69 FootageSource alphaMode attribute a pp. pro je c t . 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 . di s pl ay Fr ame Ra te Description The effective frame rate as displayed and rendered in compositions by After Effects.p roxySo urce. O F F.i tem ( in d e x) . read-only.i tem ( in d e x) . If rem ove Pul l dow n is Pu l l dow n P h a s e .0]. If rem ovePu l l dow n is not Pu l l dow n P h a se . pro je c t . m a i n S o u rce .0]. m a i n S o u rce . pro je c t .. pro je c t . pro je c t .p roxySo urce. O F F.d is p l ay Fr a m e R ate a pp. 69 . Type An Alpha Mode enumerated value..

If h as Al p ha is false. A Pul l dow n Met ho d enumerated value. LOW E R _ F I E L D _ F I R S T FootageSource guessAlphaMode() method a pp. one of: Pul l d ow n Met h o d. ADVANCE _24P Returns Nothing.i tem ( in d e x) . Type A F ie l dS epa r a ti on Ty p e enumerated value. pro je c t . It is an error to set this attribute if i s S t il l is true. pro je c t . g uessAlphaMo de () Description Sets a lp ha Mode . 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. read/write.p roxySo urce. pro je c t .i tem ( in d e x) . If i s S t il l is true.i tem ( in d e x) . O F F F i e l d S e p a r a t i o n Ty p e .i tem ( in d e x) .g ue ss Pu l l dow n ( m e t ho d ) a pp. Parameters method The method to use for estimation.f ie l d S epa r a t ion Ty p e a pp.O FF if rem ovePu l l dow n is not Pu l l dow n P h a se .JavaScript Reference FootageSource object 70 FootageSource fieldSeparationType attribute a pp.m a i n S ource . pro je c t .m a i n S ource . p rox y S o u rc e . and inver tAl ph a to the best estimates for this footage source. fie ld S ep ar at ionTy p e Description How the fields are to be separated in non-still footage. no change is made. pro je c t . FootageSource guessPulldown() method a pp.proxySo urce. PU L L D OW N _ 3 _ 2 Pul l dow n Met ho d. One of: F i e l d S e p a r a t i o n Ty p e .g ue ss Al pha Mod e( ) a pp. Parameters None. O F F. pro je c t .i tem ( in d e x) . 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 . 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 . premu l Col or. no change is made. Returns Nothing. 70 . m a i n S o u rce .i tem ( in d e x) .

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. and placeholders with duration of 0. Type Boolean. pro je c t . the attributes a lp ha Mode . In this case. an alpha channel in a footage clip or proxy should be inverted. pro je c t . 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 . It is an error to set this attribute if i sS t i l l is true.p roxySo urce.i tem ( in d e x) .i tem ( in d e x) .i tem ( in d e x) . This attribute is valid only if an alpha is present. Type Boolean. pro je c t .i tem ( in d e x) . m a i n S o u rce . read-only. pro je c t . Examples of non-still footage are movie files. sound files. FootageSource invertAlpha attribute a pp.JavaScript Reference FootageSource object 71 FootageSource hasAlpha attribute a pp. m a i n S o u rce . Type Boolean. is S t il l Description When true the footage is still. the footage has an alpha component. it has a time-based component. i nver t A lp h a .p roxySo urce. or if alp haMo de is A l p h a Mo de . hasAlpha Description When true. read/write. pro je c t . When false.i tem ( in d e x) . pro je c t . inver tAl ph a Description When true.p roxySo urce.p roxySo urce. read/write.O F F. FootageSource isStill attribute a pp. when false. 71 . sequences. and premu l Col or have valid values.i nver t Al p h a a pp. pro je c t . read-only. m a i n S o u rce .i tem ( in d e x) . pro je c t . those attributes have no relevant meaning for the footage. 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.I G N O R E . If ha sAlpha is false.i tem ( in d e x) .i sS t i l l a pp. Examples of still footage are JPEG files. m a i n S o u rce . this attribute is ignored. solids. FootageSource highQualityFieldSeparation attribute a pp. Type Boolean. and placeholders of non-zero duration.i tem ( in d e x) .ha sAlph a a pp.

pro je c t .1..nat iveFr ame Rate a pp. pro je c t . It is an error to set this attribute if i sS t i l l is true. G .p roxySo urce. read/write.O F F.p roxySo urce.i tem ( in d e x) .i tem ( in d e x) .i tem ( in d e x) . read/write.p roxySo urce. pro je c t . pro je c t . Re m ove Pu l l dow n . This attribute is valid only if the a l pha Mod e is a l pha Mo de. S S W W W 72 .i tem ( in d e x) . premul Col or Description The color to be premultiplied. 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 . FootageSource premulColor attribute a pp. FootageSource removePulldown attribute a pp. in the range [0.P RE MULT I P L I E D.0]. m a i n S o u rce . m a i n S o u rce . pro je c t ..i tem ( in d e x) . O F F Pul l dow n Ph a s e . Type Integer in the range [1. read/write. Re m ove Pu l l dow n . Type Floating-point. WS S W W Pul l dow n Ph a s e .i tem ( in d e x) . n a t iveFr a m e R a te Description The native frame rate of the footage. pro je c t . m a i n S o u rce . It is an error to set this attribute if i sS t i l l is true.i tem ( in d e x) . FootageSource nativeFrameRate attribute a pp. default is 1. Re m ove Pu l l dow n . pro je c t .rem ove Pu l l dow n a pp. Type Array of three floating-point values [ R . 9999].l o o p a pp.0. One of: Pul l dow n Ph a s e .p roxySo urce. lo op Description The number of times that the footage is to be played consecutively when used in a composition.i tem ( in d e x) . pro je c t . Type A Pul l dow n P has e enumerated value. rem ovePul l dow n Description How the pulldowns are to be removed when field separation is used. m a i n S o u rce . It is an error to attempt to set this to a value other than Pul l dow n Ph a s e .premul Co l or a pp. read/write.JavaScript Reference FootageSource object 72 FootageSource loop attribute a pp. B ] .

JavaScript Reference FootageSource object 73 Pul l dow n Ph a s e . Re m ove Pu l l dow n . 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 . Re m ove Pu l l dow n . 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 . W WS S W _ 2 4 P_ A DVA N C E 73 . 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 . Re m ove Pu l l d ow n . W W WSS _ 2 4 P_ A DVA N C E Pul l dow n Ph a s e . WS S W W _ 2 4 P_ A DVA N C E Pul l d ow n Ph a s e . W WS S W 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 .

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. PRO J E C T 74 . 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. Methods Method Reference Description c a n Im p or t As ( ) “ImportOptions canImportAs() method” Restricts input to a particular file type. See “Project importFile() method” on page 113. Parameters type The type of file that can be imported. F O OTAG E Im p o r t AsTy p e . or the first file of the sequence to import. 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. on page 74 ImportOptions canImportAs() method imp or t O p t i ons . the “Force alphabetical order” option is set.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 ) . An Im p or tAs Ty p e enumerated value. See “ImportOptions importAs attribute” on page 75. When true. f i l e = n e w F i l e ( "my f i le . one of: Im p o r t AsTy p e . C OM P Im p o r t AsTy p e . For example: n e w Im p o r t O p t i on s ( ) . C OM P_ C ROP PE D_ L AY E R S Im p o r t AsTy p e . The constructor takes an optional parameter. you can set the given type as the value of the i m p o r tAs attribute. If this method returns true. The file to import. p s d " ) . an ExtendScript File object for the file. rather than an individual file. Attributes Attributes Reference “ImportOptions importAs attribute” on page 75 “ImportOptions sequence attribute” on page 76 “ImportOptions forceAlphabetical attribute” on page 75 “ImportOptions file attribute” on page 75 Description The type of file to be imported. import a sequence of files. If it is not supplied. i m p o r tAs s e qu e n ce force Alp ha b e ti c a l f i le When true.

has the same effect as setting the “Force alphabetical order” option in the File > Import > File dialog box. See “ImportOptions canImportAs() method” on page 74. One of: Im p o r tAs Ty p e .C O M P. ps d ” )) . ImportOptions file attribute imp or t O p t i ons . i o. If a file is set in the constructor. 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 . ImportOptions forceAlphabetical attribute imp or t O p t i ons .C O M P _ C RO PPE D _ L AYE R S Im p o r tAs Ty p e .C O M P Im p o r tAs Ty p e . Type An Im p o r t AsTy p e enumerated value.F O OTAG E Im p o r tAs Ty p e . Type Boolean. f i l e Description The file to be imported. i f io. use can Im p or tAs to check that a given file can be imported as the source of the given object type. read/write.P ROJ E C T 75 .imp or tAs Description The type of object for which the imported file is to be the source. ImportOptions importAs attribute imp or t O p t i ons .i m p o r tAs = Im p o r tAs Ty p e. you can access it through this attribute. Before setting.JavaScript Reference ImportOptions object 75 Returns Boolean. Type ExtendScript File object.f orce Al pha b e t ic a l Description When true. read/write.C O M P ) . c an Im p o r t As (Im p o r tAs Ty p e . read/write.

read/write. 76 . a sequence is imported.s e quence Description When true. an individual file is imported.JavaScript Reference ImportOptions object 76 ImportOptions sequence attribute imp or t O p t i ons . Type Boolean. otherwise.

A descriptive string.proje c t. which are in turn the base classes for various other item types. See “AVItem object” on page 32 and “FolderItem object” on page 63. i f ( c ur Item . Attributes Attributes Reference “Item name attribute” on page 78 “Item comment attribute” on page 78 “Item id attribute” on page 78 “Item parentFolder attribute” on page 78 “Item selected attribute” on page 79 “Item typeName attribute” on page 79 Description The name of the object as shown in the Project panel.. rem ove( ) Example This example gets the second item from the project and checks that it is a folder. • Item is the base class for AVItem and for FolderItem. v ar my Folder = a pp. It also checks to make sure that. item (i ) . for each item in the folder. this item is currently selected. } e l se { v ar nu mInFolder = my Fo lder. rem ove ( ) . so Item attributes and methods are available when working with all of these item types. pro je c t . i > = 1 . A unique identifier for this item. } e l se { i f ( ! c u rIte m . The parent folder of this item. pro je c t . s e l e c t e d & & c u r Item . name com m e n t id p aren tFol de r s e l e c te d t y p e Na m e Methods Method Reference “Item remove() method” on page 79 Description Deletes the item from the project. When true. i f (my Fo ld e r. 77 .i tem ( i n dex ) a pp. c u r Item .item (2). The first item is at index 1. The type of item. 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 " ). the parent is properly set to the correct folder. 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 . It then removes from the folder any top-level item that is not currently selected.JavaScript Reference Item object 77 Item object a pp.i te m s [ in d ex ] Description The Item object represents an item that can appear in the Project panel. / / 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 .numItems.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") . i.) { v ar c ur Item = my Fol d er.

i tem ( in d e x) . this is the project's root folder (a p p. read-only.JavaScript Reference Item object 78 } } } } Item comment attribute a pp.i tem ( in d e x) . up to 15.i d Description A unique and persistent identification number used internally to identify an item between sessions. pro je c t . Item parentFolder attribute a pp. and set this value to put items in the new folder. when you import this project into another project.com m en t Description A string that holds a comment.i te m ( i n dex ) . You can use the ItemCollection’s ad d Fo l d e r method to add a new folder. Type String. read/write. it has no effect on the item's appearance or behavior.ro o t Fol d e r ). Type String. pro je c t . See “ItemCollection addFolder() method” on page 80.i tem ( in d e x) . pro je c t . However. Type Integer. Item id attribute a pp. pro je c t .p aren t Fol d er Description The FolderItem object for the folder that contains this item.n a m e Description The name of the item as displayed in the Project panel. The comment is for the user's purpose only.999 bytes in length after any encoding conversion.p ro je c t . Item name attribute a pp. If this item is at the top level of the project. 78 . read/write. The ID is not displayed anywhere in the user interface. new IDs are assigned to all items in the imported project. The value of the ID remains the same when the project is saved to a file and later reloaded.

w i t h n a m e “co m p s” v ar compFolder = app.i tem( i ).i tem ( in d e x) . / / 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 . Parameters None. read-only. pro j e c t . i <= a p p. Item selected attribute a pp. } Item remove() method a pp. Returns Nothing. pro je c t .t y p eNam e Description A user-readable name for the item type. read/write. pro je c t .i tem ( in d e x) . num Item s . i + +) { i f (a pp.s e l e c te d Description When true.remove() Description Deletes this item from the project and from the Project panel.proj ec t. or “Composition”. a ddFo l der(“com ps” ). Type String. for example. i tem ( i ) i n s ta n ce o f C om pIte m ) a pp. / / c re a t e a n e w Fol d e r Ite m i n p ro j e c t . Example This script creates a new FolderItem in the Project panel and moves compositions into it. Set to true to select the item programmatically. 79 .JavaScript Reference Item object 79 Type FolderItem object. this item is selected. or to false to deselect it. “Footage”. pro je c t . If the item is a FolderItem. Multiple items can be selected at the same time. Type Boolean.i tem ( in d e x) . pa rent Fol der = compFol d er . “Folder”. items.p ro j e c t . all the items contained in the folder are also removed from the project. No files or folders are removed from disk. pro je c t . Item typeName attribute a pp. read/write.

. pi xe l As p e c t.100. are available when working with ItemCollection. then the new item’s p aren tFol de r is the root folder. • ItemCollection is a subclass of Collection. See “Collection object” on page 52. i te m Co l l e c t i o n. pro j e c t . 80 . in addition to those listed below.JavaScript Reference ItemCollection object 80 ItemCollection object a pp. i te m Co l l e c t i o n. Creates and returns a new CompItem object and adds it to this collection.30000].01.0] CompItem object. an integer in the range [4. The duration of the composition in seconds. The ItemCollection belonging to a Project object contains all the Item objects for items in the project. ItemCollection addComp() method a pp.99.a d dCom p ( n am e . Creates and returns a new FolderItem object and adds it to this collection. The frame rate of the composition.. The pixel aspect ratio of the composition. If the ItemCollection belongs to the project or the root folder.0. The width of the composition in pixels.0]. Methods Method Reference “ItemCollection addComp() method” on page 80 “ItemCollection addFolder() method” on page 80 Description Creates a new CompItem object and adds it to the collection.a d dFol der( n a m e ) Description Creates a new folder. The ItemCollection belonging to a FolderItem object contains all the Item objects for items in that folder. he i g ht. pro j e c t . pro je c t . du ra t io n .30000]. a d dCom p ( ) a d dFol der( ) Creates a new FolderItemobject and adds it to the collection.i tem s Description The ItemCollection object represents a collection of items. a floating-point value in the range [0. fram e R ate ) Description Creates a new composition... a floating-point value in the range [1. Parameters name w i dt h h eig h t p i xel As p e c t du r at i on f r a m eRa te Returns A string containing the name of the composition. If the ItemCollection belongs to any other folder. the new item’s pa ren tFol der is that Fol d erItem .0]. The height of the composition in pixels.0. a floating-point value in the range [0. All methods and attributes of Collection.. an integer in the range [4. w id t h. ItemCollection addFolder() method a pp.10800.

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. pa rent Fol der = compFol d er . FolderItem object. / / 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 . If the ItemCollection belongs to any other folder. num Item s . pro je c t .p ro j e c t . Parameters name Returns A string containing the name of the folder. items. i <= a p p. Example This script creates a new FolderItem in the Project panel and moves compositions into it. set the item object’s p aren tFol de r attribute. a ddFo l der(“com ps” ). To put items in the folder. see “Item parentFolder attribute” on page 78. i tem ( i ) i n s ta n ce o f C om pIte m ) a pp.i tem( i ).proj ec t. w i t h n a m e “co m p s” v ar compFolder = app. } 81 . i + +) { i f (a pp. the new folder’s p a ren t Fol d e r is that FolderItem . pro j e c t . / / c re a t e a n e w Fol d e r Ite m i n p ro j e c t .

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 .100. • s p e e d : A floating-point value. v ar e a s e Out = n e w Ke y fr am e E as e ( 0 . Attributes Attribute Reference “KeyframeEase speed attribute” on page 83 “KeyframeEase influence attribute” on page 82 Description The speed setting for a keyframe. This example sets the Scale. 8 5 ) . [ e a se Ou t ] ) . Description The KeyframeEase object encapsulates the keyframe ease settings of a layer’s AE property.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. v ar my Pos i t i o n Pro p e r t y = a p p. 8 5 ) . ea seO ut . [ e a se In ]. as shown in the Keyframe Velocity dialog box. ea seO ut ]).. ea seIn . in flu en ce Description The influence value of the keyframe. p ro je c t . i n f l u e n c e ). p ro je c t . p rop e r t y ( " S c a l e " ) my Sca l eProp er t y. read/write. The influence setting for a keyframe.5 . Sets the in f lu en ce attribute. speed i n f lu e n ce KeyframeEase influence attribute my Ke y.i te m ( 1 ) . [ea se In. Type Floating-point value in the range [0. [ea seO ut. a temporal property with either two or three dimensions. 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.7 5 . Both parameters are required.l ayer (1 ). Sets the sp ee d attribute.1. 82 .0]. i te m ( 1) .se tTempor alEa s eAt Ke y (2. The constructor creates a KeyframeEase object. has more than two keyframes. • i n f lu en ce : A floating-point value in the range [0. a spatial property. se tTem p o r a l E as e At Ke y ( 2 .p rop er t y (" Po si t i on " ) my Pos i t i o n Pro p e r t y.0].100. v ar e a s e Out = n e w Ke y fr am e E as e ( 0 . v ar my S c a l e Prop e r t y = a p p.1.7 5 . l ayer (1 ) . 5 0 ) .. Example This example assumes that the Position. easeIn ]. v ar e a s e In = n e w Ke y fr am e E as e ( 0 . 5 0 ) . See “Property setTemporalEaseAtKey() method” on page 137.

JavaScript Reference KeyframeEase object 83 KeyframeEase speed attribute my Ke y. sp ee d Description The speed value of the keyframe. read/write. 83 . and are displayed in the Keyframe Velocity dialog box. Type Floating-point value. The units depend on the type of keyframe.

This might. “LightLayer object” on page 98. the layer contains a video component. turn an icon off in the composition.en a bl e d = f al s e . i n dex name p aren t time s ta r t Ti m e s t retch i n Poi n t o u t Po i n t e n a bl e d solo s hy l o cke d h as Vi de o a c t ive nu l l L aye r s e l e c t e d Pro p e r t i e s com m e n t con t a i n i n g Com p 84 . in addition to their JavaScript attributes and methods. this is a null layer.JavaScript Reference Layer object 84 Layer object a pp.i te m ( 1 ) . A descriptive comment for the layer. When true. f i r st L aye r. Attributes Attribute Reference “Layer index attribute” on page 88 “Layer name attribute” on page 90 “Layer parent attribute” on page 90 “Layer time attribute” on page 92 “Layer startTime attribute” on page 92 “Layer stretch attribute” on page 92 “Layer inPoint attribute” on page 88 “Layer outPoint attribute” on page 90 “Layer enabled attribute” on page 87 “Layer solo attribute” on page 92 “Layer shy attribute” on page 91 “Layer locked attribute” on page 88 “Layer hasVideo attribute” on page 87 “Layer active attribute” on page 85 “Layer nullLayer attribute” on page 90 “Layer selectedProperties attribute” on page 91 “Layer comment attribute” on page 86 “Layer containingComp attribute” on page 86 Description The index position of the layer. The time stretch percentage of the layer. l ayer (1 ) . and AVLayer. the layer is soloed.i tem ( in d e x) . When true. The start time of the layer. The “out” point of the layer. the layer is shy. for example. The composition that contains this layer. When true. v ar f i r s t L aye r = a p p.na m e = "D isa ble d Layer". When true. pro je c t . When true. the layer is enabled. Layers contain AE properties. p ro je c t . this example disables the first layer in that composition and renames it. the layer is locked. It can be accessed from an item’s layer collection either by index number or by a name string. When true. LightLayer. “CameraLayer object” on page 51. The parent of this layer. so Layer attributes and methods are available when working with all layer types. When true. the layer is active at the current time. TextLayer. The “in” point of the layer. first L ayer. For examples of how to access properties in layers. • Layer is the base class for CameraLayer. see “PropertyBase object” on page 141. The current time of the layer. Example If the first item in the project is a CompItem. See “AVLayer object” on page 40.l ayer(i n de x ) Description The Layer object provides access to layers within compositions. and “TextLayer object” on page 173. All selected AE properties in the layer. The name of the layer.

and the time must be between the i n Poi n t and o u t Po i n t values of this layer. Layer active attribute a pp. the layer must be enabled. and the time must be between the in Poi n t and o utPoi n t values of this layer. Reports whether this layer will be active at a specified time.i tem ( in d e x) . pro je c t .layer(i n de x ). i s Na m e S e t Methods Method Reference “Layer remove() method” on page 91 “Layer moveToBeginning() method” on page 89 “Layer moveToEnd() method” on page 89 Description Deletes the layer from the composition. For this to be true. the layer must be enabled. This value is never true in an audio layer. To return true. Copies the layer to the top (beginning) of another composition. Duplicates the layer. Layer activeAtTime() method a pp. Moves the layer to the top of the composition (makes it the first layer). no other layer may be soloing unless this layer is soloed too. the layer's video is active at the current time.i tem ( in d e x) . the layer’s name has been explicitly set. Moves the layer to the bottom of the composition (makes it the last layer). there is a separate au dioAct ive attribute in the AVLayer object. Applies a named collection of animation settings to the layer. read-only. no other layer may be soloing unless this layer is soloed too. Type Boolean. “Layer moveBefore() method” on page 89 “Layer duplicate() method” on page 87 “Layer copyToComp() method” on page 87 “Layer activeAtTime() method” on page 85 “Layer setParentWithJump() method” on page 91 “Layer applyPreset() method” on page 86 Moves the layer above another layer. rem ove( ) m oveToB e g i n n i n g ( ) m oveToE n d ( ) moveAfter() m oveB e f ore( ) du pl i c ate( ) copy ToCom p ( ) a c t iveAtTim e() s e tPare n t Wi th Ju m p ( ) a pp ly Pre se t( ) “Layer moveAfter() method” on page 88 Moves the layer below another layer. ac t ive At Ti m e( t i m e) Description Returns true if this layer will be active at the specified time.JavaScript Reference Layer object 85 Attribute Reference “Layer isNameSet attribute” on page 88 Description When true. 85 .layer(i n de x ). Sets a new parent for this layer. ac t ive Description When true. pro je c t .

read-only. Layer containingComp attribute a pp. item (i n de x ).proj ec t. Predefined animation preset files are installed in the Presets folder. pro je c t . Type String. and users can create new animation presets through the user interface. Layer comment attribute a pp. pro je c t . Nothing.layer(i n de x ).layer(i n de x ).JavaScript Reference Layer object 86 Parameters time Returns The time in seconds. co m m e n t Description A descriptive comment for the layer. read/write. 86 .i tem ( in d e x) . Layer applyPreset() method a pp app. Boolean. l ayer( in d e x) . con ta in in g Com p Description The composition that contains this layer. Description Applies the specified collection of animation settings (an animation preset) to the layer. Type CompItem object.a pp lyPres e t( pre s e t Na m e ). Parameters pres e tNam e Returns An ExtendScript File object for the file containing the animation preset.i tem ( in d e x) . a floating-point value.

Returns Layer object. pro je c t .layer(i n de x ). has Vi deo Description When true.JavaScript Reference Layer object 87 Layer copyToComp() method a pp. Parameters None.i tem ( in d e x) . Creates a new Layer object with the same values as this one. Creates a new Layer object in which all values are the same as in this one. otherwise false. copy To Com p( intoComp) Description Copies the layer into the specified composition. the layer has a video switch (the eyeball icon) in the Timeline panel. 87 . 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.layer(i n de x ). This is the same as copying and pasting a layer through the user interface. Layer hasVideo attribute a pp. Type Boolean. The original layer remains unchanged. Nothing.layer( 1) .i tem ( in d e x) . dup l i c ate () Description Duplicates the layer.layer(i n de x ). Layer enabled attribute a pp. Layer duplicate() method a pp.i tem ( in d e x) .i tem ( in d e x) . Copying in a layer changes the index positions of previously existing layers in the target composition. and CompItem object. and prepends the new object to the l ayer s collection in the target CompItem. pro je c t . This corresponds to the video switch state of the layer in the Timeline panel. en ab l ed Description When true. otherwise false. pro je c t . the layer is enabled. pro je c t . Parameters i n toC om p Returns The target composition.layer(i n de x ). read/write. Retrieve the copy using i n t o Com p.

i tem ( i n d e x) . rather than automatically from the source. is Nam e S et Description True if the value of the n a m e attribute has been set explicitly. Layer inPoint attribute a pp. pro je c t . read/write. in Poi n t Description The “in” point of the layer. Type Boolean.0.JavaScript Reference Layer object 88 Type Boolean.. Type Integer in the range [1.. read-only. read-only. Layer index attribute a pp. pro je c t .l ayer (i n de x ).10800.n u m L ayers ]. otherwise false. pro je c t . Type Floating-point value in the range [-10800. the layer is locked. Layer locked attribute a pp. pro je c t . Layer moveAfter() method a pp.i tem ( in d e x) .i tem ( i n d e x) . Layer isNameSet attribute a pp.i tem ( in d e x) . expressed in composition time (seconds).layer(i n de x ). read-only.0] (minus or plus three hours).layer(i n de x ).l ayer (i n de x ).i tem ( in d e x) . read/write. This croplands to the lock toggle in the Layer panel. 88 .layer(i n de x ). in dex Description The index position of the layer. Type Boolean. pro je c t . l ocked Description When true. moveAf ter( laye r) Description Moves this layer to a position immediately after (below) the specified layer.

moveTo End () Description Moves this layer to the bottom position of the layer stack (the last layer). pro je c t . Returns Nothing. Parameters l ayer Returns The target layer. Layer moveToBeginning() method a pp.i tem ( i n d e x) . Returns Nothing.l ayer (i n de x ). pro je c t . Parameters None. Parameters None. moveB efore( l ay e r) Description Moves this layer to a position immediately before (above) the specified layer. 89 .i tem ( i n d e x) . Nothing. Nothing. a layer object in the same composition. a layer object in the same composition. moveTo Be g i nning() Description Moves this layer to the topmost position of the layer stack (the first layer). pro je c t .l ayer (i n de x ).i tem ( i n d e x) . Layer moveToEnd() method a pp. Layer moveBefore() method a pp.l ayer (i n de x ).JavaScript Reference Layer object 89 Parameters l ayer Returns The target layer.

JavaScript Reference Layer object 90 Layer name attribute a pp. otherwise false. this is the same as the Source name (which cannot be changed in the Layer panel).l ayer (i n de x ).i tem ( i n d e x) .i tem ( i n d e x) . pro je c t . Layer nullLayer attribute a pp. pa rent Description The parent of this layer. Layer parent attribute a pp.l ayer (i n de x ). Type Layer object or null. can be null. read/write. if the new parent has a rotation of 30 degrees. use the s e tPa re n t Wi t h Ju m p method. outPoint Description The “out” point of the layer. read-only. so that when you set the parent there is no apparent jump in the layer's transform. pro je c t . name Description The name of the layer. By default. To set the parent without changing the child layer's transform values. Offset values are calculated to counterbalance any transforms above this layer in the hierarchy. the layer was created as a null object. Layer outPoint attribute a pp.0. nul l Layer Description When true. Type Boolean. expressed in composition time (seconds).0] (minus or plus three hours).i tem ( i n d e x) . read/write.. 90 . the child layer is assigned a rotation of -30 degrees.i tem ( i n d e x) . read/write.l ayer (i n de x ).10800. For example.l ayer (i n de x ). but you can set it to be different. Type Floating-point value in the range [-10800. pro je c t . Type String. pro je c t .

translation.i tem ( i n d e x) . the layer is “shy. read-only. pro je c t .i tem ( i n d e x) . an offset is calculated and set in the child layer's transform fields. If you do not want the child layer to jump. to prevent the jump from occurring. There may be an apparent jump in the rotation. or scale of the child layer. without changing the transform values of the child layer. pro je c t .l ayer (i n de x ). remove () Description Deletes the specified layer from the composition. as this layer’s transform values are combined with those of its ancestors. pro je c t . Parameters None.i tem ( i n d e x) . Returns Nothing.” meaning that it is hidden in the Layer panel if the composition’s “Hide all shy layers” option is toggled on.JavaScript Reference Layer object 91 Layer remove() method a pp. Layer selectedProperties attribute a pp. Nothing. In this case.l ayer (i n de x ). Layer shy attribute a pp.i tem ( i n d e x) . set the p aren t attribute directly. 91 . Type Array of PropertyBase objects. Parameters n e w Pa re n t Returns A layer object in the same composition.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. shy Description When true. 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.l ayer (i n de x ). pro je c t . Layer setParentWithJump() method a pp.

Values between 0 and 1 are set to 1. so lo Description When true.l ayer (i n de x ). Type Floating-point value in the range [-9900.10800.i tem ( i n d e x) .l ayer (i n de x ).i tem ( i n d e x) .. Layer startTime attribute a pp.0] (minus or plus three hours).9900.0]. read/write. pro je c t .0. pro je c t .i tem ( i n d e x) .i tem ( i n d e x) .JavaScript Reference Layer object 92 Type Boolean. 92 . read/write. Type Floating-point value. t im e Description The current time of the layer.0. read-only. expressed in composition time (seconds). and values between -1 and 0 (not including 0) are set to -1.l ayer (i n de x ). read/write. the layer is soloed. read/write. expressed in composition time (seconds). Type Boolean.. Type Floating-point value in the range [-10800. st ar tTi m e Description The start time of the layer. Layer stretch attribute a pp.l ayer (i n de x ). Layer solo attribute a pp. pro je c t . A value of 100 means no stretch. otherwise false. pro je c t . st re tch Description The layer’s time stretch. Layer time attribute a pp. expressed as a percentage.

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 . are available when working with LayerCollection. The LayerCollection belonging to a CompItem object contains all the layer objects for layers in the composition. • LayerCollection is a subclass of Collection. v ar l ayer Co l l e c t ion = fi r s t Co m p. “LayerCollection addLight() method” on Creates a new light layer and adds it to this collection. l e n g t h ) . l e n g t h ) .JavaScript Reference LayerCollection object 93 LayerCollection object a pp. null layer and adds it to this collection.l ayers Description The LayerCollection object represents a set of layers. adds a new layer based on an AVItem in the project. Retrieves the layer object with a specified name. 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 . p ro je c t . this example shows the number of layers in the CompItem's layer collection. page 94 “LayerCollection addShape() method” on page 95 “LayerCollection byName() method” on page 96 “LayerCollection precompose() method” on page 97 Creates a new shape layer and adds it to this collection. Creates a new camera layer and adds it to this collection. a d d (a n AVIte m ) . “LayerCollection addText() method” on page 96 “LayerCollection addCamera() method” on page 94 Creates a new text layer and adds it to this collection.l ayer s. All methods and attributes of Collection.i tem ( i n d e x) . l ayer Co l l e c t ion . pro je c t . v ar a n AVItem = a pp. and adds it page 95 to this collection. a d d( ) a d dNul l ( ) a d dS o li d ( ) a d dTex t( ) a d dCamer a( ) a d dL i g ht () a d dS ha p e( ) by Na m e( ) pre co m p o s e ( ) Creates a new. in addition to those listed below. v ar f i r s t Co m p = a p p.i tem (2 ). Methods Method Reference “LayerCollection add() method” on page 94 “LayerCollection addNull() method” on page 95 Description Creates a new AVLayer and adds it to this collection. Example Given that the first item in the project is a CompItem and the second item is an AVItem. 93 . Collects specified layers into a new composition. “LayerCollection addSolid() method” on Creates a new layer.i te m ( 1 ) . See “Collection object” on page 52. The methods of the collection object allow you to manipulate the layer list. a FootageItem with a SolidSource. then displays the new number of layers.proje c t.

pro je c t .layers .a d d Cam er a( n a m e . a floating-point array [x. By default. pro je c t . LayerCollection addLight() method a pp.l ayers . a floating-point value. Returns CameraLayer object. The z value is set to 0.i tem ( i n d e x) . y]. the length of a still layer in seconds.i tem ( i n d e x) .a d d L ig h t ( n a m e .JavaScript Reference LayerCollection object 94 LayerCollection add() method a pp. Parameters name cen terPoi n t A string containing the name of the new layer. c e nt e r Po i n t) Description Creates a new camera layer and adds the CameraLayer object to this collection. pro je c t . Has no effect on movies. This method generates an exception if the item cannot be added as a layer to this CompItem. To set another preferred value. the d u r a t io n value is set according to user preferences. y]. choose Edit > Preferences > Import (Windows) or After Effects > Preferences > Import (Mac OS). and adds it to this collection. c e n t e r Po i n t ) Description Creates a new light layer and adds the LightLayer object to this collection. this is the same as the duration of the containing CompItem. Returns AVLayer object. and specify options under Still Footage. The center of the new light.a d d (ite m .l ayers . Parameters i te m du r at i on The AVItem object for the item to be added. Otherwise. sets the du r a ti on value of the new layer. du ra t io n ) Description Creates a new AVLayer object containing the specified item. sequences or audio. Used only if the item contains a piece of still footage.i tem ( i n d e x) . Parameters name cen terPoi n t A string containing the name of the new layer. Optional. 94 . LayerCollection addCamera() method a pp. a floating-point array [x. This is used to set the initial x and y values of the new camera’s Point of Interest property. The center of the new camera. If supplied.

w id t h. durat i on) Description Creates a new SolidSource object. G. Parameters None Returns ShapeLayer object. Parameters co lor The color of the solid. This is the same as using a shape tool in "Tool Creates Shape" mode. A]. a floating-point value.l ayers . B. empty Shape layer. pro je c t . Otherwise. the dur a t i on value is set according to user preferences. choose Edit > Preferences > Import (Windows) or After Effects > Preferences > Import (Mac OS).i tem ( i n d e x) . Use the ShapeLayer object to add properties. LayerCollection addNull() method a pp.0. By default. with values set as specified. n am e . 95 . If supplied. sets the d u r a ti o n value of the new layer. sets the new SolidSource as the m a i n S o u rce value of a new FootageItem object. This is the same as choosing Layer > New > Null Object.JavaScript Reference LayerCollection object 95 Returns LightLayer object. Tools automatically add a vector group that includes Fill and Stroke as specified in the tool options. sets the new FootageItem as its s o u rce .i tem ( i n d e x) . Creates a new AVLayer object. and adds the FootageItem to the project.0]. To set another preferred value. pro je c t .. [R. and path filters. this is the same as the duration of the containing CompItem. Parameters du r at i on Optional. l ayers . p ix e lAs p ec t.a d d Sh ap e () Description Creates a new ShapeLayer object for a new.a d d S o l id ( c ol or. LayerCollection addSolid() method a pp. LayerCollection addShape() method a pp.l ayers . such as shape. he ig h t . stroke. and adds the layer to this collection.1. Returns AVLayer object.i tem ( i n d e x) . a d d Nu l l ( durat io n ) Description Creates a new null layer and adds the AVLayer object to this collection. in the range [0. an array of four floating-point values. fill. pro je c t . the length of a still layer in seconds. and specify options under Still Footage.

LayerCollection addText() method a pp.0]. a string containing the source text of the new layer. or null if no layer with the given name is found. an integer in the range [4. and specify options under Still Footage. pro je c t . Parameters s o u rce Tex t Optional.i tem ( i n d e x) .JavaScript Reference LayerCollection object 96 name w i dt h h eig h t p i xel As p e c t du r at i on A string containing the name of the solid. 96 . Layer object or null. a floating-point value in the range [0. choose Edit > Preferences > Import (Windows) or After Effects > Preferences > Import (Mac OS). See “TextDocument object” on page 172. this is the same as the duration of the containing CompItem. To set another preferred value. the length of a still layer in seconds. LayerCollection byName() method a pp.l ayers . The height of the solid in pixels. If supplied. Parameters name Returns A string containing the name.i tem ( i n d e x) ..30000]. The pixel aspect ratio of the solid.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. a floating-point value. By default.. the dur at i on value is set according to user preferences. sets the dur at i on value of the new layer. Otherwise. The width of the solid in pixels.30000]. an integer in the range [4..l ayers . pro je c t . or a TextDocument object containing the source text of the new layer. Optional.100.by Nam e ( n a m e ) Description Returns the first (topmost) layer found in this collection with the specified name.01. Returns AVLayer object. Returns TextLayer object.

n a m e . When true (the default). An array of integers.l ayers . pro je c t . You can only set this to false if there is just one index in the l ayer In d i ce s array. and adds the new CompItem to this collection. Returns CompItem object. The name of the new CompItem object. Optional.JavaScript Reference LayerCollection object 97 LayerCollection precompose() method a pp.p re com p o s e ( l ay e r In di c i es . This is the same as selecting the “Move all attributes into the new composition” option in the Pre-compose dialog box. 97 . It removes the individual layers from this collection.i tem ( i n d e x) . Parameters l ayer In di ce s name m oveAl l At t r i bute s The position indexes of the layers to be collected. 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. retains all attributes in the new composition. This is the same as selecting the “Leave all attributes in” option in the Pre-compose dialog box.

i tem ( in d e x) . All methods and attributes of Layer are available when working with Light- Layer.l ayer(i n de x ) Description The LightLayer object represents a light layer within a composition. See “Layer object” on page 84.JavaScript Reference LightLayer object 98 LightLayer object a pp. see “LayerCollection addLight() method” on page 94. pro je c t . Create it using the LayerCollection object’s ad d L ig h t method. • LightLayer is a subclass of Layer. but has different AE properties than other layer types. It can be accessed in an item’s layer collection either by index number or by a name string. AE Properties LightLayer defines no additional attributes. 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 .

0 . m a r ke r Val u eO b j e ct ). Create it with the constructor..ke yVa lue (1 ). set the MarkerValue object in the Mar ker AE property of the layer: laye rO bj ec t . t r u e ).prop er t y ("Ma r ker"). my Mar ker ). all arguments except com m en t are optional. on page 101 s e tPar ame ters ( ) “MarkerValue setParameters() method” on page 101 Sets the key-value pairs associated with the marker value. “MarkerValue frameTarget attribute” on page 101 A specific frame target within the Web page specified by ur l . “MarkerValue url attribute” on page 102 A URL for Web page to be associated with the layer.l ayer (1 ). A script can set any number of parameter pairs.i te m ( 1 ) . cue Po intName . 99 . the order does not reflect the order displayed in the application. prop e r t y (" Mar ker " ) . Whether the Flash Video cue point is for an event or navigation. proper t y("Mar ker"). p arams ) Description The MarkerValue object represents a layer marker. The Flash Video cue point name. c h ap te r. pro je c t . 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"). com m e n t v ar ma r kerProper t y = a pp. prop e r t y (" Mar ker " ) .item(1). com m e n t cha p ter c u e Po in t Nam e e ven t Cue Poi n t ur l f r a m eTa rg et A chapter link reference point for the associated layer. and optionally a chapter reference point. This is an array containing key-value pairs.set ValueAtTim e(2 .layer (1 ). except p a r am s . comment. which can then be accessed with the get Par ame ters () and se t Par a m e ters () methods. pro je c t . Web-page link. layer(1). • To get comment values from a particular marker: v ar comment O fFirstMa r ker = app.v alu e At Ti m e (4 . item(1 ). Attributes Attribute Reference “MarkerValue comment attribute” on page 100 “MarkerValue chapter attribute” on page 100 “MarkerValue cuePointName attribute” on page 100 “MarkerValue eventCuePoint attribute” on page 100 Description A comment on the associated layer. v ar com m e n t O f Ma r ke r AtTi m e 4 = a pp. For information on the usage of markers see “Using markers” in After Effects Help. To associate a marker with a layer.JavaScript Reference MarkerValue object 99 MarkerValue object new Ma r kerVa lue( c om m e n t .prop er t y("Ma r ker"). All arguments are strings that set in the corresponding attributes of the returned MarkerValue object. f ra m eTar ge t. or Flash Video cue point with a particular point in a layer. u r l.proj ec t. my Layer. which associates a comment.s e tVa lu e AtTi m e (t im e. 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.

proper t y ("Mar ker ") . This comment appears in the Timeline panel next to the layer marker. as shown in the Marker dialog.0 ) ) .i tem ( i n d e x) . com m e n t Description A text comment for this marker. pro je c t . n e a res t Ke y In d ex ( 4 . MarkerValue chapter attribute a pp. com m e n t . MarkerValue eventCuePoint attribute a pp. pro je c t . proper t y ("Mar ker ") . 100 .ke y Value( i n d e x) . read/write. read/write.ke y Value( i n d e x) . read/write. ke y Va l u e ( m a r ke r Pro p e r t y.ch ap ter Description A text chapter link for this marker.l ayer (i n de x ).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 Value( i n d e x) . MarkerValue cuePointName attribute a pp. Type Boolean.ke y Value( i n d e x) . it is for navigation.i tem ( i n d e x) .e ven tCu e Poin t Description When t r ue . the FlashVideo cue point is for an event. Chapter links initiate a jump to a chapter in a QuickTime movie or in other formats that support chapter marks. 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 .i tem ( i n d e x) .l ayer (i n de x ). read/write.l ayer (i n de x ). pro je c t . Type String. MarkerValue comment attribute a pp.l ayer (i n de x ). Type String. proper t y ("Mar ker ") . Type String.i tem ( i n d e x) .c u e Po in t Nam e Description The Flash Video cue point name. proper t y ("Mar ker ") . pro je c t . otherwise.

Together with the URL value. Parameters ke y Valu ePai rs An object containing the key-value pairs as attributes and values. use this method to add more than three parameters.i tem ( i n d e x) . The object’s toS t r ing () method is called to assign the string value of each attribute to the named key. for a cue point associated with this marker value.i tem ( i n d e x) . Type String. proper t y ("Mar ker ") .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.ke y Value( i n d e x) . ti m e ToBl i n k = 1 . but you can add only three through the user interface.g e tPa r am e ters ( ) Description Returns the key-value pairs for Flash Video cue-point parameters. A cue point can have any number of parameters.i tem ( i n d e x) .l ayer (i n de x ). p ar m s. pro je c t .l ayer (i n de x ). MarkerValue getParameters() method a pp. proper t y ("Mar ker ") .JavaScript Reference MarkerValue object 101 MarkerValue frameTarget attribute a pp. proper t y ("Mar ker ") . pro je c t . this targets a specific frame within a Web page. MarkerValue setParameters() method a pp. se tPa r a m e ter s ( p a r m s ) . 101 . Parameters None. as si g n Me = "A s t r i ng" mv. pro je c t . read/write.f r a m eTa rg et Description A text frame target for this marker.ke y Value( i n d e x) . Returns An object with an attribute matching each parameter name. containing that parameter’s value.l ayer (i n de x ). Returns Nothing. Example v ar mv = new Mar kerValu e("My Mar ker"). for a cue point associated with this marker value. p ar m s.ke y Value( i n d e x) . v ar p ar m s = n ew O b j ec t.

mv).l ayer (i n de x ). read/write. pro je c t . MarkerValue url attribute a pp.u r l Description A URL for this marker. Type String.ke y Value( i n d e x) .i tem ( i n d e x) . This URL is an automatic link to a Web page. 102 . proper t y ("Mar ker ") .JavaScript Reference MarkerValue object 102 my Layer.set ValueAtTim e(2 .prop er t y ("Ma r ker").

in addition to those listed below.. read/write. Attributes Attribute Reference “MaskPropertyGroup maskMode attribute” on page 104 “MaskPropertyGroup inverted attribute” on page 103 “MaskPropertyGroup rotoBezier attribute” on page 104 “MaskPropertyGroup maskMotionBlur attribute” on page 104 “MaskPropertyGroup locked attribute” on page 104 “MaskPropertyGroup color attribute” on page 103 Description The mask mode.0].inver ted Description When true. read/write. pro je c t . ma sk Mo de i nver te d rotoB ez i er m a s k Mot i o n B lu r l o cke d co lor When true.layer(i n de x ). Type Array of three floating-point values. B].l ayer (i n de x ). [R. 103 . • MaskPropertyGroup is a subclass of PropertyGroup. and Timeline panel). in the range [0. Layer panel. pro je c t . the mask is locked. mas k Description The MaskPropertyGroup object encapsulates mask attributes in a layer.0.i tem ( i n d e x) .i tem ( in d e x) . the mask is inverted. mas k (ind e x) . When true. MaskPropertyGroup color attribute a pp. pro je c t . the shape of the mask is RotoBezier.color Description The color used to draw the mask outline as it appears in the user interface (Composition panel. How motion blur is applied to this mask.layer(i n de x ). the mask is inverted. are available when working with MaskPropertyGroup. mas k (ind e x) . When true. G.JavaScript Reference MaskPropertyGroup object 103 MaskPropertyGroup object a pp.1. The color used to draw the mask outline in the user interface. MaskPropertyGroup inverted attribute a pp.i tem ( in d e x) . See “PropertyBase object” on page 141 and “PropertyGroup object” on page 148. otherwise false. Type Boolean. All methods and attributes of PropertyBase and PropertyGroup.

MaskPropertyGroup maskMode attribute a pp. N ONE Ma sk Mo de.m as kMo ti o n Blu r Description How motion blur is applied to this mask.i tem ( in d e x) . read/write. false. Type A Mas kMo de enumerated value. SU BTRAC T Ma sk Mo de. One of: Ma sk Mot i on Blur. the mask is locked and cannot be edited in the user interface. pro je c t .layer(i n de x ). DIF F E R E NCE MaskPropertyGroup maskMotionBlur attribute a pp.layer(i n de x ). Type A Mak Mot i on Blur enumerated value. false. pro je c t .rotoB ezier Description When true.JavaScript Reference MaskPropertyGroup object 104 MaskPropertyGroup locked attribute a pp. the mask is a RotoBezier shape.l o cke d Description When true. Type Boolean. I NTERS E CT Ma sk Mo de.O N Ma sk Mot i on Blur. m a s k ( i n d e x ) . read/write. otherwise. Type Boolean. ADD Ma sk Mo de.i tem ( in d e x) . One of: Ma sk Mo de.i tem ( in d e x) . pro je c t .O F F MaskPropertyGroup rotoBezier attribute a pp.m as kMo de Description The masking mode for this mask. 104 . otherwise.i tem ( in d e x) . pro je c t . read/write. DA RK E N Ma sk Mo de. L IG HTE N Ma sk Mo de. mas k (i n d e x ) . mas k (i n d e x ) .layer(i n de x ). read/write. mas k (i n d e x ) .layer(i n de x ).S A ME _ AS _ L AYE R Ma sk Mot i on Blur.

105 . items. See “Collection object” on page 52. The first OutputModule object in the collection is at index position 1. 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. See “OutputModule object” on page 106 • OMCollection is a subclass of Collection.JavaScript Reference OMCollection object 105 OMCollection object a pp. All methods and attributes of Collection are available when working with OMCollection. pro je c t .renderQ ueue.

Parameters tem pl a teNam e Returns A string containing the name of the template to be applied. 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. Nothing. Applies an output-module template. and contains attributes and methods relating to the file to be rendered.renderQ ueue. The user-interface name of the output module. page 108 Methods Method Reference “OutputModule remove() method” on page 107 “OutputModule saveAsTemplate() method” on page 107 “OutputModule applyTemplate() method” on page 106 Description Removes this output module from the render-queue item’s list. 106 . pro je c t . f i le p o s t Ren de r Ac t i o n name tem pl a tes An action to be taken after rendering. item (i n de x ).JavaScript Reference OutputModule object 106 OutputModule object a pp. o u t p ut Mo d u l e s [ inde x ] . item (i n de x ). o u t p ut Mo d u l e s [ inde x ] . OutputModule file attribute a pp. rem ove( ) s aveAs Tem p l ate( ) a pp ly Te m p l ate ( ) Saves a new output-module template. OutputModule applyTemplate() method a pp.ap plyTemp l ate( t e m p l a te Na m e) Description Applies the specified existing output-module template. Attributes Attribute Reference “OutputModule file attribute” on page 106 “OutputModule postRenderAction attribute” on page 107 “OutputModule name attribute” on page 107 Description The path and name of the file to be rendered. pro je c t .f il e Description The ExtendScript File object for the file this output module is set to render. “OutputModule templates attribute” on All templates for the output module.renderQ ueue. item (i n de x ).renderQ ueue. pro je c t .

pro je c t .I M PO RT p o s t Ren de r Ac t i o n .JavaScript Reference OutputModule object 107 Type ExtendScript File object. as shown in the user interface. Parameters None.p o s tRen de r Ac t i o n Description An action to be performed when the render operation is completed.renderQ ueue. item (i n de x ). pro je c t .renderQ ueue. 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 .nam e Description The name of the output module.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. item (i n de x ). OutputModule saveAsTemplate() method a pp.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 . Type String. 107 . Type A Pos tRen d er Ac t ion enumerated value (read/write). item (i n de x ).rem ove () Description Removes this OutputModule object from the collection. OutputModule postRenderAction attribute a pp. item (i n de x ). pro je c t . OutputModule name attribute a pp.S E T _ P ROXY OutputModule remove() method a pp. o u t p ut Mo d u l e s [ inde x ] . o u t p ut Mo d u l e s [ inde x ] . pro je c t . read-only. read/write.renderQ ueue. Returns Nothing. o u t p ut Mo d u l e s [ inde x ] . o u t p ut Mo d u l e s [ inde x ] .renderQ ueue.

renderQ ueue. pro je c t . OutputModule templates attribute a pp. item (i n de x ). Type Array of strings. 108 .JavaScript Reference OutputModule object 108 Parameters name Returns A string containing the name of the new template. o u t p ut Mo d u l e s [ inde x ] . Nothing.tem p l ates Description The names of all output-module templates available in the local installation of After Effects. read-only.

All methods and attributes of FootageSource are available when working with PlaceholderSource. pro je c t .p roxy S o u rce Description The PlaceholderSource object describes the footage source of a placeholder.JavaScript Reference PlaceholderSource object 109 PlaceholderSource object a pp. 109 . PlaceholderSource does not define any additional methods or attributes. PlaceholderSource is a subclass of FootageSource.i tem ( i n d e x) . pro je c t . See “FootageSource object” on page 68.m a i n S o u rce a pp.i tem ( i n d e x) .

The project’s render queue. thumbnail views use the transparency checkerboard pattern. “Project linearBlending attribute” on page 114 When true. Consolidates all footage in the project. t i m e cod eD i sp l ay Ty p e t i m e cod e B as e Ty p e t i m e cod eN TS C D ro pFr am e t i m e cod eF i l m Ty p e nu m Item s selection renderQ ueue d i sp l ay S ta r t Fr a m e linearBlending “Project timecodeDisplayType attribute” on page 117 “Project timecodeBaseType attribute” on page 117 “Project timecodeNTSCDropFrame attribute” on page 118 “Project timecodeFilmType attribute” on page 118 “Project numItems attribute” on page 115 “Project selection attribute” on page 117 “Project renderQueue attribute” on page 116 The timecode base project setting. Attributes provide access to specific objects within the project. and also to project settings such as the timecode base. The currently active item. Methods Method Reference “Project item() method” on page 114 “Project consolidateFootage() method” on page 112 Description Retrieves an item from the project. f i le rootFo lder i te m s a c t iveItem bitsPerChan n el The color depth of the current project. The way the timecode is displayed. The total number of items contained in the project. “Project displayStartFrame attribute” on The frame at which to start numbering when dispage 112 playing the project. pro je c t Description The project object represents an After Effects project. Methods can import footage.JavaScript Reference Project object 110 Project object a pp. The folder containing all the contents of the project. the equivalent of the Project panel All items in the project. and save changes. linear blending is used for the project. The film type for the “Feet + Frames” project setting. The drop-frame project setting. i te m ( ) con s ol i d ate Fo ot ag e( ) 110 . Attributes Attribute Reference “Project file attribute” on page 113 “Project rootFolder attribute” on page 116 “Project items attribute” on page 114 “Project activeItem attribute” on page 111 “Project bitsPerChannel attribute” on page 112 Description The file for the currently open project. t r an s p aren c y Gr i d T hu m bn ai l s “Project transparencyGridThumbnails attribute” on page 118 When true. All items selected in the Project panel. such as imported files or footage and compositions. compositions and folders. create solids.

Imports a placeholder into the project. Returns Nothing. pro je c t . pro je c t . Automatically replaces text in all expressions. Type Item object or null. Displays a Save dialog box. Displays an Import File dialog box. or a null if no item is currently selected or if multiple items are selected. The new text.a utoF i xE x pres si on s (old Te x t. rem oveUnu se d Fo ota g e( ) red uce Proje c t( ) cl o se( ) s ave( ) s aveWi th Di a l o g ( ) i m p o r tP l ace h o ld e r ( ) i m p o r tF i l e ( ) i m p o r tF i l e Wi t h D i a l o g () s h ow Win dow( ) a utoF i xE x pres si o n s () Reduces the project to a specified set of items. Saves the project. n e wTe x t) Description Automatically replaces text found in broken expressions in the project.JavaScript Reference Project object 111 Method Reference “Project removeUnusedFootage() method” on page 115 “Project reduceProject() method” on page 115 “Project close() method” on page 112 “Project save() method” on page 116 “Project saveWithDialog() method” on page 116 “Project importFileWithDialog() method” on page 113 “Project importFile() method” on page 113 “Project importFileWithDialog() method” on page 113 “Project showWindow() method” on page 117 “Project autoFixExpressions() method” on page 111 Description Removes unused footage from the project. 111 . Closes the project with normal save options. Imports a file into the project. Project autoFixExpressions() method a pp.a c t iveItem Description The item that is currently active and is to be acted upon. Shows or hides the Project panel. read-only. Project activeItem attribute a pp. if the new text causes the expression to evaluate without errors. Parameters o l d Te x t n e w Te x t The text to replace.

Type Integer (8. Same as the File > Consolidate All Footage command. PRO M P T _ TO _ S AV E _ C H A N G E S : Prompt for whether to save changes before close. Project close() method a pp. C l o s e O p t i o n s . one of: C l o s e O p t i o n s . Parameters None. SAV E _ C H A N G E S : Save automatically on close. Project displayStartFrame attribute a pp. 16. D O _ N OT _ SAV E _ C H A N G E S : Close without saving. Returns Integer. A C l o s e O p t ion s enumerated value.d i sp l ay S ta r t Fr a m e 112 . True on success.b i ts PerC han n el Description The color depth of the current project. and the user cancels the save. the user is prompted. read/write. C l o s e O p t i o n s . pro je c t . 16. Project consolidateFootage() method a pp.con s ol i d ate Fo ot ag e( ) Description Consolidates all footage in the project. pro je c t . prompting the user to save changes or closing without saving changes. pro je c t .JavaScript Reference Project object 112 Project bitsPerChannel attribute a pp.cl o se( c lo s e O p t i on s ) Description Closes the project with the option of saving changes automatically. Returns Boolean. either 8. or 32 bits. pro je c t . Parameters cl o seO pt i on s Action to be performed on close. False if the file has not been previously saved. or 32 only). the total number of footage items removed.

pro je c t . Project file attribute a pp. pro je c t . pro je c t .f i le Description The ExtendScript File object for the file containing the project that is currently open. read-only. using the specified options.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 . Project importFile() method a pp. Example a pp. Type Integer. Same as the File > Import > File command.F R A M E S . 113 . p sd ” ) ) Project importFileWithDialog() method a pp. Same as the File > Import File command. 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 . 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. 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. Creates and returns a new FootageItem object from the file.) This is the same as setting “Start numbering frames at:” in the Project Settings > Display Style tab. (See “Project timecodeDisplayType attribute” on page 117. Returns Array of Item objects created during import. and adds it to the project’s i te m s array.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. read/write. Returns FootageItem object. Type File object or null if project has not been saved. or null if the user cancels the dialog. See “ImportOptions object” on page 74.

w idt h ..30000].JavaScript Reference Project object 114 Project importPlaceholder() method a pp. a floating-point value in the range [0. 114 . Project linearBlending attribute a pp. Parameters name w i dt h h eig h t f r a m eRa te du r at i on Returns A string containing the name of the placeholder. Project items attribute a pp. The height of the placeholder in pixels. an integer. The frame rate of the placeholder. Same as the File > Import > Placeholder command.0]. Project item() method a pp.. PlaceholderItem object. an integer in the range [4. pro je c t .0. 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. Parameters i n dex Returns The index position of the item.l i n ea rBl en di n g Description True if linear blending should be used for this project. f ra m eR a te .99. Type ItemCollection object. read-only.30000]. pro je c t .i tem s Description All of the items in the project.i m p or tP l aceho ld er( na m e .0.10800. The width of the placeholder in pixels. Item object. an integer in the range [4. h e ig ht . pro je c t .0] The duration of the placeholder in seconds...i tem ( i n d e x) Description Retrieves an item at a specified index position. The first item is at index 1. otherwise false. pro je c t . a floating-point value in the range [1.

nu m Item s Description The total number of items contained in the project. " ) Project reduceProject() method a pp. pro je c t . Project removeUnusedFootage() method a pp. pro je c t .proj ec t. t heItems[t he Item s. Parameters None.red uce Proje c t( a r ray _ o f _ i t e m s ) Description Removes all items from the project except those specified. Type Integer. Integer. the total number of FootageItem objects removed. pro je c t . Returns Integer. Parameters a r r ay _ of _ i tem s Returns An array containing the Item objects that are to be kept. read/write. pro je c t .proj ec t. Example v ar theItems = ne w Ar r ay().red uce Proje c t( th eItems) . a pp. 115 . t heItems[t he 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 . item(3 ).JavaScript Reference Project object 115 Type Boolean. the total number of items removed. including folders and all types of footage. Example n = a p p. Project numItems attribute a pp.p ro j e c t . num Item s . read-only.leng th] = app. Same as the File > Reduce Project command.leng th] = app.rem oveUnu se d Fo ota g e( ) Description Removes unused footage from the project. item(1 ). Same as the File > Remove Unused Footage command.

Project save() method a pp. read-only. prompts the user for a location and file name. but not items contained inside other folders in the Project panel. The same as the File > Save or File > Save As command.renderQ ueue Description The render queue of the project.rootFo lder Description The root folder containing the contents of the project. Parameters file Returns Optional. None.JavaScript Reference Project object 116 Project renderQueue attribute a pp. this is a virtual folder that contains all items in the Project panel. Type FolderItem object. If the project has never previously been saved and no file is specified.s aveWi th Di a l og ( ) Description Shows the Save dialog box. Pass a File object to save a project to a new file without prompting. pro je c t . 116 . Project rootFolder attribute a pp.s ave( file ) Description Saves the project. read-only.s ave( ) a pp. Project saveWithDialog() method a pp. Type RenderQueue object. pro je c t . or click Cancel to exit the dialog. pro je c t. pro je c t . pro je c t . Parameters None. An ExtendScript File object for the file to save. The user can name a file with a location and save the project.

pro je c t . true if the project was saved. as set in the Project Settings dialog box.t i m e cod eD i sp l ay Ty p e 117 .F P S 24 Tim eco de Ba s eTy p e. Project showWindow() method a pp. show the Project panel.F P S 60 Tim eco de Ba seTy p e.s how Win dow( d oSh ow ) Description Shows or hides the Project panel. hide the Project panel. pro je c t .t i m e cod e B as e Ty p e Description The Timecode Base option. in the sort order shown in the Project panel.F P S 50 Tim eco de Ba s eTy p e. pro je c t .F P S 25 Tim eco de Ba s eTy p e. read-only.s el e c t i on Description All items selected in the Project panel.F P S 30 Tim eco de Ba s eTy p e. read/write.JavaScript Reference Project object 117 Returns Boolean. Parameters doS h ow Returns When true. Type A Ti m e cod e B as e Ty p e enumerated value.AU TO Tim eco de Ba s eTy p e. Type Array of Item objects.F P S 48 Tim eco de Ba s eTy p e.FPS100 Project timecodeDisplayType attribute a pp. pro je c t . When false. One of: Tim eco de Ba s eTy p e. Project timecodeBaseType attribute a pp. Project selection attribute a pp. Nothing.

97 fps footage is displayed.JavaScript Reference Project object 118 Description The way in which timecode is set to display. read/write.MM 35 Project timecodeNTSCDropFrame attribute a pp.F R A M E S Tim e co de Di s p l ay Ty p e . pro je c t . Project transparencyGridThumbnails attribute a pp. 118 . thumbnail views use the transparency checkerboard pattern.T I M E C O DE Tim e co de Di s p l ay Ty p e . pro je c t . read/write. Type Boolean. Type A Ti m e cod eF i l m Ty p e enumerated value. Type A Ti m e cod eD i sp l ay Ty p e enumerated value.t r an s p aren c y Gr i d T hu m bn ai l s Description When true. false for the Non-Drop Frame option. as set in the Project Settings dialog box.MM 16 Tim eco de F il m Ty p e . true for the Drop Frame option. One of: Tim eco de F il m Ty p e .F E E T _ A N D_ F R A M E S Project timecodeFilmType attribute a pp.t i m e cod eN TS C D ro pFr am e Description How timecode for 29. as set in the Feet + Frames option in the Project Settings dialog box. as set in the Project Settings dialog box under NTSC. read/write. read/write.t i m e cod eF i l m Ty p e Description The film type. pro je c t . Type Boolean. One of: Tim e co de Di s p l ay Ty p e .

i tem ( i n d e x) . When true.JavaScript Reference Property object 119 Property object a pp. See “PropertyBase object” on page 141. pro je c t . often animatable. A text description of the units in which the value is expressed.l ayer (i n de x ). 119 . the expression is used to generate values for the property. the property defines a spatial value. that occurred when the last expression was evaluated. When true. and expression information about a particular AE property of a layer. The maximum permitted value. there is a maximum permitted value. to avoid confusion with the After Effects definition of property. if any. • PropertyGroup is a subclass of PropertyBase. keyframe. prop e r t y Sp ec Description The Property object contains value. there is a minimum permitted value. The number of keyframes on this property. For examples of how to access properties. prop er t y Va lue Ty p e v alu e h as Mi n h as Max m i n Va lu e m a x Va lu e i s Sp a t i a l can Var yOverTime i s Ti m e Va r y i n g nu m Ke y s un it sTex t e xp re ss i o n can S et Ex pression e xp re ss i o n E n ab l e d e xp re ss i o n E r ror Current value of the property. All methods and attributes of PropertyBase. of an effect. the property can be keyframed. in addition to those listed below. When true. When true. or transform within an individual layer. When true. When true. The error. NOTE: JavaScript objects commonly referred to as “properties” are called “attributes” in this guide. see “PropertyBase object” on page 141 and “PropertyGroup property() method” on page 150. When true. The minimum permitted value. An AE property is an value. Attributes Attribute Reference “Property propertyValueType attribute” on page 132 “Property value attribute” on page 139 “Property hasMin attribute” on page 124 “Property hasMax attribute” on page 124 “Property minValue attribute” on page 131 “Property maxValue attribute” on page 131 “Property isSpatial attribute” on page 125 “Property canVaryOverTime attribute” on page 123 “Property isTimeVarying attribute” on page 125 “Property numKeys attribute” on page 131 “Property unitsText attribute” on page 139 “Property expression attribute” on page 123 “Property canSetExpression attribute” on page 123 “Property expressionEnabled attribute” on page 124 “Property expressionError attribute” on page 124 Description Type of value stored in this property. the property has keyframes or an expression enabled that can vary its values. are available when working with PropertyGroup. the expression can be set by a script. mask. The expression string for this property.

120 . “Property keyInSpatialTangent() method” on Gets the “in” spatial tangent for a key. Gets the value of a keyframe at the time at which a condition occurs. Creates a keyframe for the property. Sets the “in” and “out” temporal ease for a key. Gets the keyframe nearest to a specified time. Methods Method Reference “Property valueAtTime() method” on page 139 “Property setValue() method” on page 137 “Property setValueAtTime() method” on page 138 “Property setValuesAtTimes() method” on page 138 “Property setValueAtKey() method” on page 138 “Property nearestKeyIndex() method” on page 131 “Property keyTime() method” on page 130 Description Gets the value of the property evaluated at given time. Finds a keyframe and sets the value of the property at that keyframe. Sets the static value of the property. “Property keyInInterpolationType() method” Gets the 'in' interpolation type for a key. Gets the “in” temporal ease for a key. this property can be interpolated. Removes a keyframe from the property. Sets the interpolation type for a key. Gets the time at which a condition occurs. “Property keyValue() method” on page 130 “Property addKey() method” on page 123 “Property removeKey() method” on page 133 “Property isInterpolationTypeValid() method” on page 125 “Property setInterpolationTypeAtKey() method” on page 133 When true. v alu eAt Time() s e tVal u e ( ) s e tVal u e AtTi m e ( ) s e tVal u e s At Ti m e s( ) s e tVal u e AtKe y( ) ne arestKe y In dex() ke y Ti m e( ) ke y Valu e( ) a d dKe y () rem oveKe y ( ) i s In ter p o l a t i o n Ty p e Va l i d () s e tIn te r p o l at i o n Ty p e AtKe y( ) ke y In In te r p o l at i o n Ty p e () ke y Out In ter p ol at i on Ty p e( ) s e tS pa t i alTa ngen ts At Ke y( ) ke y In Sp at i a lTan g en t () ke y Out Sp a ti a l Tan g en t () s e tTemp or alEa se AtKe y () ke y In Te m p o r a l E a s e ( ) Creates a set of keyframes for the property. page 126 “Property keyOutSpatialTangent() method” on page 127 “Property setTemporalEaseAtKey() method” on page 137 “Property keyInTemporalEase() method” on page 126 Gets the “out” spatial tangent for a key. s e l e c te d Ke y s prop er t y Index The position index of this property. on page 126 “Property keyOutInterpolationType() method” on page 127 “Property setSpatialTangentsAtKey() method” on page 136 Gets the 'out' interpolation type for a key. Sets the “in” and “out” tangent vectors for a key.JavaScript Reference Property object 120 Attribute Reference “Property selectedKeys attribute” on page 133 “Property propertyIndex attribute” on page 132 Description All selected keyframes of the property. Adds a new keyframe to the property at a given time.

Example: Change the value of a mask shape to be open instead of closed v ar my Mas k = my l ayer. 0 ]) . Example: Get and set the value of opacity v ar my Prop er t y = my L ayer. a n d is store d as a flo at my Prop er t y. Example: Get and set the value of a position v ar my Prop er t y = my L ayer. my Sh ap e = my Prop er t y. Reports whether a keyframe is selected. s e t Val u e ( [ 1 0 . “Property setSelectedAtKey() method” on page 135 “Property keySelected() method” on page 128 Sets whether a keyframe is selected. 3 0 . Sets whether a keyframe has temporal auto-Bezier. Reports whether a keyframe has spatial continuity. ke y Out Tem p or a l E as e( ) se tTemp or alContinuou sAtKe y () ke y Te m p o r a l Co n t i n u o u s ( ) s e t Te m p or al Au to B e z i e r At Ke y( ) ke y Te m p o r a l Au t o B e z i e r ( ) s e tS pa t i al Con t i nu o u sAtKe y( ) ke y Sp a ti a l Con t inu ous ( ) s e tS pa t i al AutoB e z i e r AtKe y ke ySp a ti a l AutoB ezi er( ) s e tRov i n g At Ke y ( ) ke y Rov i n g () s e tS e l ec te dAtKe y( ) ke y S el e c ted ( ) Sets whether a keyframe has temporal continuity. Sets whether a keyframe has spatial continuity. m as k( 1) . / / 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.JavaScript Reference Property object 121 Method Reference “Property keyOutTemporalEase() method” on page 128 “Property setTemporalContinuousAtKey() method” on page 136 “Property keyTemporalContinuous() method” on page 130 “Property setTemporalAutoBezierAtKey() method” on page 136 “Property keyTemporalAutoBezier() method” on page 129 “Property setSpatialContinuousAtKey() method” on page 135 “Property keySpatialContinuous() method” on page 129 “Property setSpatialAutoBezierAtKey() method” on page 135 “Property keySpatialAutoBezier() method” on page 129 “Property setRovingAtKey() method” on page 134 Description Gets the “out” temporal ease for a key. Reports whether a keyframe has spatial auto-Bezier. 121 . my Prop er t y. 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.v alu e. 5 ) . 0 . op a c it y . s e t Val u e ( 0 . va l u e . Sets whether a keyframe has spatial auto-Bezier.clo se d = false. Reports whether a keyframe has temporal auto-Bezier. p o s it i o n . Sets whether a keyframe is roving. 0 . s e t Val u e ( myS h a p e ).v al ue. 0 . my Sh ap e. //opa cit y ha s proper t yVa lue Ty p e of O n eD. / / 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 . v ar my Prop er t y = my Ma sk . Reports whether a keyframe has temporal continuity.m as kPa th . “Property keyRoving() method” on page 128 Reports whether a keyframe is roving. // 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 ar co lor Valu e = my Prop er t y. } e l se { my Prop er t y. my Layer.s c ale.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. scale.color. se t Valu e([ .po sit i on.co lor Valu e). se t Valu e( [5 0. . my Lig h t. I thoug h t there were 3 ke y f r a mes"). i f ( my Prop er t y.set Valu e([2 0.0 my Lig h t.8 . // 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. n e w Tex t D oc u m en t ( " ke y nu m b e r 3 " ) ) .set ValueAtTime(5. color. T he secon d crea tes a TextD o cument 122 .f als e) . Example: Change the keyframe values for the first three keyframes of some source text my Prop er t y = my Tex tL ayer.5 is the expected value of [10. sc a l e. or source text // Th ese t wo are e quiva lent . 10 0]). so u rceTex t. n e w Tex t D oc u m en t ( " ke y nu m b e r 2 " ) ) . 3 0]). // Th ese t wo are e quiva lent .50] v ar my Prop er t y = my L ayer.t r u e) . } Example: Keyframe a rotation from 0 to 90 and back again The animation is 10 seconds. } e l se { a l er t( " o op s " ). my Layer. rot at i o n . 9 0).set Valu e([2 0.scale. 3 0.8 .3 .3 . 0]) . // Th ese t wo are e quiva lent . // Th ese t wo are e quiva lent . . se t Valu e([ . . . s e t Val u e At Ke y( 2 . 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 " ) .opacity].1 .po sit i on. 50 .v alu eAt Ti me (3. s e t Val u e At Ke y( 1 . T he secon d fills in a defau l t of 0. my Prop er t y.set ValueAtTime(0. 0 ). 0). 50 ]) . my Prop er t y. } Example: Set values using the convenience syntax for position.g.1 ]) . 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 . my Layer. 5 * col orVa lue[ 0] .v alu eAt Ti me (2 . my Prop er t y. se t Valu e([5 0.nu m Ke y s < 3 ) { a l er t("er ror.b. my Prop er t y. 1.color. Example: Check that a scale calculated by an expression at time 3. n e w Tex t D oc u m en t ( " ke y nu m b e r 1 " ) ) . my Prop er t y = my L ayer.set ValueAtTime(4. [r. T he secon d fills in a defau l t of 1. s e t Val u e At Ke y( 3 . and the middle keyframe is at the 5 second mark. 0]). my Prop er t y. co lor Valu e[0 ] = 0. T he secon d fills in a defau l t of 100 .set ValueAtTime(10. Rotation properties are stored as a OneD value. my Prop er t y. 5. my Layer.

Type Boolean. See also “Property expression attribute” on page 123. A floating-point value. c a n S e t Ex pres si o n Description When true.layer(i n de x ). the named property can vary over time—that is. keyframe values or expressions can be written to this property. pro je c t . Property expression attribute a pp. pro je c t . in seconds. 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. The beginning of the composition is 0. prop e r t y Sp ec . 123 . read-only. my Tex t L ayer. the named property is of a type whose expression can be set by a script.i tem ( in d e x) .s ourceText .i tem ( in d e x) . read-only. Type Boolean. pro je c t .s ourceText .i tem ( in d e x) .layer(i n de x ).s e tVa lue( n ew Tex tD o c um en t( " fo o" ) ). Property canSetExpression attribute a pp. the string is evaluated.layer(i n de x ).JavaScript Reference Property object 123 my Tex t L ayer.i tem ( in d e x) . Writeable only when c a n S e t Ex p re ss i on for the named property is true. at which to add the keyframe. the index of the new keyframe or marker. Integer. Property addKey() method a pp.ex pres s io n Description The expression for the named property. prop e r t y Sp ec . pro je c t .canVa r yO verTim e Description When true. • If the string contains a valid expression. Parameters time Returns The time. prop e r t y Sp ec .s e tVa lue( " fo o" ) . ex pres si onEna bl e d becomes true.layer(i n de x ). When you specify a value for this attribute. Property canVaryOverTime attribute a pp.

124 .i tem ( in d e x) . Property hasMax attribute a pp. • If you set the attribute to the empty string. pro je c t .layer(i n de x ). e xp re ss i on E n ab l e d becomes false.ex pres s io n E n ab l e d Description When true. pro je c t . read/write. if any.layer(i n de x ). Type String. prop e r t y Sp ec . pro je c t . the named property uses its associated expression to generate a value. read-only. an error is generated. the keyframe information or static value of the property is used.i tem ( in d e x) . read/write if can S et Ex pression for the named property is true. otherwise false. contains the empty string (""). pro je c t . Type Boolean. and e xp re ss i o n E n ab l e d becomes false. Type Boolean.ha sMin Description When true. 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. prop e r t y Sp ec .layer(i n de x ).i tem ( in d e x) .ex pres s ion E r ror Description Contains the error.i tem ( in d e x) . When false. but no error is generated.JavaScript Reference Property object 124 • If the string does not contain a valid expression.layer(i n de x ). Type String.ha sMa x Description When true. there is a minimum permitted value for the named property. otherwise false. prop e r t y Sp ec . there is a maximum permitted value for the named property. read-only. prop e r t y Sp ec . or if the last expression string evaluated without error. If no expression string has been specified. Property expressionEnabled attribute a pp. Property hasMin attribute a pp. Property expressionError attribute a pp. generated by evaluation of the string most recently set in e xp re ss i o n .

isTimeVa r y i ng Description When true.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 . Examples are position and effect point controls. it has keyframes or an enabled expression.B E Z I E R Ke y fr am eIn ter p o l at i on Ty p e . pro je c t .JavaScript Reference Property object 125 Type Boolean. Parameters type A Ke y fr am eIn ter p o la t i on Ty p e enumerated value. prop e r t y Sp ec . the attribute ca n Var y O verTi m e must also be true.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. read-only. read-only. pro je c t .layer(i n de x ).i tem ( in d e x) .i tem ( in d e x) .H OL D Returns Boolean.isSp at i al Description When true. the named property defines a spatial value. prop e r t y Sp ec . Property isSpatial attribute a pp. prop e r t y Sp ec .layer(i n de x ). read-only. Type Boolean.i tem ( in d e x) . pro je c t . Property isInterpolationTypeValid() method a pp. When this attribute is true. the named property is time varying—that is.layer(i n de x ). Type Boolean. Property isTimeVarying attribute a pp. one of: Ke y fr am eIn ter p o l at i on Ty p e . 125 .

as returned by the a d dKe y or n ea re st Ke y - In dex method.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. 126 . pro je c t . as returned by the a d dKe y or n ea re st Ke y - In dex method. Parameters ke y In dex The index for the keyframe..numKeys]. pro je c t . An integer in the range [1. prop e r t y Sp ec ..layer(i n de x ).BE ZIER Ke y fr am eIn ter p o la t i on Ty p e . Thre eD_SPATIA L .numKeys]. one of: Ke y fr am eIn ter p o la t i on Ty p e .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. An integer in the range [1. pro je c t .JavaScript Reference Property object 126 Property keyInInterpolationType() method a pp. the array contains 2 floating-point values. Parameters ke y In dex The index for the keyframe.i tem ( in d e x) . prop e r t y Sp ec . • If the property value type is neither of these types. an exception is generated. Property keyInTemporalEase() method a pp.i tem ( in d e x) .i tem ( in d e x) . the array contains 3 floating-point values.layer(i n de x ). An integer in the range [1. prop e r t y Sp ec .H OL D Property keyInSpatialTangent() method a pp. Two D_ S PAT I A L .numKeys]. • If the property value type is Proper t y ValueTy p e. if the named property is spatial (that is. Returns Array of floating-point values: • If the property value type is Pro p e r t y Val u e Ty p e .ke y In Sp at ialTa n gent( ke y In d e x) Description Returns the incoming spatial tangent for the specified keyframe.L I N E A R Ke y fr ameIn ter p o la t ion Ty p e . Returns A Ke y f r am eIn ter p ol at i on Ty p e enumerated value. Parameters ke y In dex The index for the keyframe.layer(i n de x ). as returned by the ad d Ke y or ne arest- Ke y In dex method.. the value type is TwoD _ S PAT I AL or T hree D_ S PAT I AL ).

i tem ( in d e x) . Parameters ke y In dex The index for the keyframe. Property keyOutInterpolationType() method a pp.ke y O utS p at i alTangent( ke y In d e x) Description Returns the outgoing spatial tangent for the specified keyframe. prop e r t y Sp ec . Two D . • For any other value type.i tem ( in d e x) .JavaScript Reference Property object 127 Returns Array of KeyframeEase objects: • If the property value type is Proper t y ValueTy p e. Thre eD_SPATIA L . pro je c t . Parameters ke y In dex The index for the keyframe. Thre eD . • If the property value type is neither of these types. the array contains 2 objects. An integer in the range [1.numKeys].layer(i n de x ).BE ZIER Ke y fr am eIn ter p o la t i on Ty p e . 127 .numKeys].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. as returned by the ad d Ke y or ne arest- Ke y In dex method. • If the property value type is Proper t y ValueTy p e. Two D_ S PAT I A L . pro je c t . An integer in the range [1. the array contains 3 objects. the array contains 2 floating-point values.. Returns Array of floating-point values: • If the property value type is Pro p e r t y Val u e Ty p e . an exception is generated.. • If the property value type is Proper t y ValueTy p e. as returned by the ad d Ke y or ne arest- Ke y In dex method.L I N E A R Ke y fr ameIn ter p o la t ion Ty p e . one of: Ke y fr am eIn ter p o la t i on Ty p e . the array contains 3 floating-point values.H OL D Property keyOutSpatialTangent() method a pp. prop e r t y Sp ec . Returns A Ke y f r am eIn ter p ol at i on Ty p e enumerated value. the array contains 1 object.layer(i n de x ).

Property keySelected() method a pp. Parameters ke y In dex The index for the keyframe. An integer in the range [1. Thre eD . pro je c t . Parameters ke y In dex The index for the keyframe. pro je c t .layer(i n de x ). • For any other value type. as returned by the ad d Ke y or ne arest- Ke y In dex method.. The first and last keyframe in a property cannot rove. Returns Boolean. the array contains 1 object. 128 . if you try to set roving for one of these.l ayer(i n de x ). prop e r t y Sp ec . the array contains 3 objects.numKeys].. Parameters ke y In dex The index for the keyframe.numKeys]. the array contains 2 objects.ke y Rov i ng( ke y In d e x) Description Returns true if the specified keyframe is roving.i tem ( in d e x) .numKeys]. an exception is generated.ke y O utTempor alE ase( ke y In de x ) Description Returns the outgoing temporal ease for the specified keyframe. as returned by the ad d Ke y or ne arest- Ke y In dex method.ke y S e l ec te d (k e y In d e x ) Description Returns true if the specified keyframe is selected. the operation is ignored. Property keyRoving() method a pp.. An integer in the range [1. as returned by the ad d Ke y or ne arest- Ke y In dex method. prop e r t y Sp ec . and ke y Rov i n g ( ) continues to return false.i tem ( in d e x) . • If the property value type is Proper t y ValueTy p e.JavaScript Reference Property object 128 Property keyOutTemporalEase() method a pp. prop e r t y Sp ec . Returns Boolean.i tem ( in d e x) . pro je c t . If the property value type is neither TwoD _ S PAT I AL nor T h re e D_ S PAT I A L . Two D . Returns Array of KeyframeEase objects: • If the property value type is Proper t y ValueTy p e.layer(i n de x ). An integer in the range [1.

layer(i n de x ). as returned by the ad d Ke y or ne arest- Ke y In dex method. Property keySpatialContinuous() method a pp.JavaScript Reference Property object 129 Property keySpatialAutoBezier() method a pp. Parameters ke y In dex The index for the keyframe.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. An integer in the range [1. pro je c t . prop e r t y Sp ec . An integer in the range [1. An integer in the range [1.i tem ( in d e x) . Returns Boolean. 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. pro je c t . If the property value type is neither TwoD _ S PAT I AL nor T h re e D_ S PAT I A L .) If the property value type is neither TwoD _ S PAT I AL nor T h re e D_ S PAT I A L .numKeys].i tem ( in d e x) .layer(i n de x ). 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 . pro je c t . 129 .numKeys]. an exception is generated. Returns Boolean.. Parameters ke y In dex The index for the keyframe. prop e r t y Sp ec .numKeys].i tem ( in d e x) .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 ) . Property keyTemporalAutoBezier() method a pp. 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. as returned by the ad d Ke y or ne arest- Ke y In dex method. (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.. Parameters ke y In dex The index for the keyframe.layer(i n de x ). as returned by the ad d Ke y or ne arest- Ke y In dex method. Returns Boolean. an exception is generated..

this method generates an exception. pro je c t . pro je c t . Parameters ke y In dex The index for the keyframe.layer(i n de x ). prop e r t y Sp ec . Returns Boolean. If no keyframe or marker can be found that matches the argument. as returned by the ad d Ke y or near - e st Ke y In dex method.i tem ( in d e x) . prop e r t y Sp ec . Floating-point value.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.layer(i n de x ). An integer in the range [1. m a r ke r Com m e n t Returns The comment string attached to a marker (see “MarkerValue comment attribute” on page 100).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. 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 ) .i tem ( in d e x) . and an error is displayed.i tem ( in d e x) .i tem ( in d e x) .layer(i n de x ). Property keyValue() method a pp.numKeys]..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.i tem ( in d e x) . and an error is displayed. this method generates an exception. as returned by the ad d Ke y or ne arest- Ke y In dex method.numKeys]. An integer in the range [1. prop e r t y Sp ec .layer(i n de x ). prop e r t y Sp ec . prop e r t y Sp ec .layer(i n de x ).ke y Va lue (ke yInd ex ) a pp. pro je c t . 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. pro je c t . If no keyframe or marker can be found that matches the argument. Property keyTime() method a pp..ke y Ti me( ke y In de x ) a pp. Parameters ke y In dex The index for the keyframe. pro je c t . 130 .JavaScript Reference Property object 130 Property keyTemporalContinuous() method a pp.

prop e r t y Sp ec .numKeys].. The beginning of the composition is 0.maxVa lue Description The maximum permitted value of the named property. read-only. and an error is generated.layer(i n de x ). Property nearestKeyIndex() method a pp. Property numKeys attribute a pp. prop e r t y Sp ec .i tem ( in d e x) . pro je c t . m a r ke r Com m e n t Returns The comment string attached to a marker (see “MarkerValue comment attribute” on page 100). Floating-point value. If the ha sMin attribute is false. and an error is generated.i tem ( in d e x) . Type Floating-point value. Type Floating-point value. An integer in the range [1. Integer. a floating-point value. as returned by the ad d Ke y or near - e st Ke y In dex method. pro je c t . pro je c t .nea re st Ke yIndex( t i m e) Description Returns the index of the keyframe nearest to the specified time. Property maxValue attribute a pp. Property minValue attribute a pp.i tem ( in d e x) . pro je c t . read-only.layer(i n de x ). an exception occurs. Parameters time Returns The time in seconds. prop e r t y Sp ec .JavaScript Reference Property object 131 Parameters ke y In dex The index for the keyframe. an exception occurs.layer(i n de x ). If the h a s Ma x attribute is false.layer(i n de x ).i tem ( in d e x) . prop e r t y Sp ec . m i n Val u e Description The minimum permitted value of the named property.numKe ys 131 .

One of: E Proper t y Valu eTy p e.layer(i n de x ).TwoD Stores no data. For example. When setting a value for a shape.0] Array of 2 floating-point quantitative values.2 0 . Property propertyValueType attribute a pp. se t Valu e ([ 1 0 .[10 0. [1 00. Property propertyIndex attribute a pp. For example. In contrast. pro p e r t y (" A DB E Mas k Par a de " ). pro je c t . read-only.0 ]. v ar my Mas k = my l ayer.1. an Anchor Point value might be [5. 0. a Scale value might be [100.[0. as follows: v ar my Sh ap e = n ew S h ap e () .0] Array of 2 floating-point positional values For example.1 00]. pass in such an array. 20.i tem ( in d e x) . my Sh ap e. a 3D spatial property (such as a layer's position) is stored as an array of three floating point values.0] Array of three floating-point quantitative values. pro p e r t y (" p o si t i o n " ). 100 ].0. read/write.ver t ices = [[0. Type Integer. When setting a value for position.prop e r t y Val u e Ty p e Description The type of value stored in the named property. The first property is at index position 1. 10.NO _VA LUE Proper t y Valu eTy p e.2. as follows: my l ayer. 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. If the value is 0. For example.prop er t yIndex Description The position index of the named property. prop e r t y Sp ec .JavaScript Reference Property object 132 Description The number of keyframes in the named property. 100. Each type of data is stored and retrieved in a different kind of structure. prop e r t y Sp ec . All property objects store data according to one of these categories. pro je c t .1. a Scale value might be [5.T hree D Proper t y Valu eTy p e. 20.prop er t y ( " A DB E Ma sk S h ap e " ) .2.s e t Val u e ( myS h ap e ). pass a Shape object.TwoD _SPATI AL Proper t y Valu eTy p e. 0. Type Integer.T hree D_SPATIAL Proper t y Valu eTy p e. prop e r t y (1 ).i tem ( in d e x) . For example. a shape property (such as a layer's mask shape) is stored as a Shape object. Type A Prop er t y ValueTy p e enumerated value.0] ) .layer(i n de x ). Array of three floating-point positional values. the property is not being keyframed. an Anchor Point value might be [10.0.0]]. read-only. my Mas k .0] 132 .

0. i nTy p e .8.M ARKER Proper t y Valu eTy p e. 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. or if the property has no keyframes. see “TextDocument object” on page 172. 0. the remaining index numbers change. a value of 0 means no mask. as returned by the ad d Ke y or ne arest- Ke y In dex method. Property selectedKeys attribute a pp. MarkerValue object.layer(i n de x ).numKeys]. Array of 4 floating-point values in the range [0.M ASK_INDEX Proper t y Valu eTy p e.1..layer(i n de x ).CU STOM _VALU E Proper t y Valu eTy p e. [0.0]. To remove more than one keyframe.se t In ter p ol at i on Ty p eAt Ke y ( ke y In de x . Integer. prop e r t y Sp ec . pro je c t . Type Array of integers. you cannot get or set values for properties with this type. generates an exception and displays an error.3. If no keyframe with the specified index exists. If no keyframes are selected. a value of 0 means no layer.se l e c te d Ke y s Description The indices of all the selected keyframes in the named property.i tem ( in d e x) .LAY E R_IND E X Proper t y Valu eTy p e. prop e r t y Sp ec .. ou tTy p e ) 133 . For example.CO LO R Proper t y Valu eTy p e. TextDocument object.0.SH APE Proper t y Valu eTy p e. prop e r t y Sp ec . pro je c t . pro je c t . Property setInterpolationTypeAtKey() method a pp.i tem ( in d e x) . Parameters ke y In dex The index for the keyframe. Property removeKey() method a pp. read-only.i tem ( in d e x) .1.JavaScript Reference Property object 133 Proper t y Valu eTy p e. Integer. Shape object.layer(i n de x ). Returns Nothing. returns an empty array.O n eD Proper t y Valu eTy p e. When a keyframe is removed. see “Shape object” on page 165. 1.rem ove Ke y ( ke y In de x ) Description Removes the specified keyframe from the named property.TE XT _D O C UM ENT A floating-point value. see “MarkerValue object” on page 99. An integer in the range [1.0] Unimplemented type.

An integer in the range [1. Property setRovingAtKey() method a pp.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 . if you try to set roving for one of these. The incoming interpolation type.layer(i n de x ). pro je c t . A Ke y f r a m eIn ter p ol a t ion Ty p e enumerated value. An integer in the range [1. A Ke y f r a m eIn ter p ol a ti on Ty p e enumerated value. an exception is generated.i tem ( in d e x) . prop e r t y Sp ec .numKeys]. If the property value type is neither TwoD _ S PAT I AL nor T h re e D_ S PAT I A L .B E Z I E R 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 . n e w Va l ) Description Turns roving on or off for the specified keyframe. and ke y Rov i n g ( ) continues to return false. 134 . as returned by the a d dKe y or ne arestKe y - In dex method. Parameters ke y In dex i n Ty p e The index for the keyframe. one of: Ke y fr am eIn ter p o l at i on Ty p e .H OL D Returns Nothing. the ‘out’ type is set to the i n Ty p e value. one of: Ke y fr am eIn ter p o l at i on Ty p e . If not supplied. Returns Nothing..numKeys]. false to turn roving off.H OL D o u t Ty p e (Optional) The outgoing interpolation type.JavaScript Reference Property object 134 Description Sets the ‘in’ and ‘out’ interpolation types for the specified keyframe.se t Rov i ngAt Ke y( ke y In de x .. True to turn roving on. The first and last keyframe in a property cannot rove. Parameters ke y In dex newVal The index for the keyframe. as returned by the a d dKe y or n e a re s t Ke y In d e x method. the operation is ignored.

i tem ( in d e x) .se t Sele cted At Ke y( ke y In de x . An integer in the range [1. as returned by the ad d Ke y or ne arest- Ke y In dex method. prop e r t y Sp ec . false to deselect it. Nothing.. an exception is generated. True to turn spatial continuity on. prop e r t y Sp ec . Property setSpatialAutoBezierAtKey() method a pp. Parameters ke y In dex o n O ff Returns The index for the keyframe.. Returns Nothing.layer(i n de x ). pro je c t . as returned by the ad d Ke y or ne arest- Ke y In dex method. An integer in the range [1. An integer in the range [1. an exception is generated.se t Sp a t ia l AutoB ez i erAt Ke y ( ke y In dex . Parameters ke y In dex newVal The index for the keyframe.numKeys].layer(i n de x ).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. false to turn it off.i tem ( in d e x) . 135 . Parameters ke y In dex newVal The index for the keyframe.numKeys]. True to select the keyframe. pro je c t . n e w Va l ) Description Turns spatial continuity on or off for the specified keyframe. false to turn it off.JavaScript Reference Property object 135 Property setSelectedAtKey() method a pp.numKeys]. prop e r t y Sp ec . 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 .layer(i n de x ). If the property value type is neither TwoD _ S PAT I AL nor T h re e D_ S PAT I A L . o n O f f ) Description Selects or deselects the specified keyframe. Property setSpatialContinuousAtKey() method a pp. Returns Nothing.i tem ( in d e x) . pro je c t .. True to turn spatial auto-Bezier on. as returned by the ad d Ke y or ne arest- Ke y In dex method.

136 . Returns Nothing.i tem ( in d e x) . prop e r t y Sp ec . i n Tan g e n t . True to turn temporal auto-Bezier on. When this is turned on. pro je c t .numKeys]. The incoming tangent vector. • If the property value type is Prop er t y Va lue Ty p e. the array contains 2 values. 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 . • If the property value type is Prop er t y Va lue Ty p e. Parameters ke y In dex i n Ta n g e n t The index for the keyframe.layer(i n de x ). o u t Ta n gen t (Optional) The outgoing tangent vector. • If the property value type is Prop er t y Va lue Ty p e. the array contains 3 values.T hreeD _SPATIAL . Parameters ke y In dex newVal The index for the keyframe.i tem ( in d e x) .numKeys]. pro je c t .se t Sp a t ia lTangent sAtKe y (k e y In d e x . as returned by the ad d Ke y or ne arest- Ke y In dex method. An integer in the range [1... ou tTa n ge n t ) Description Sets the incoming and outgoing tangent vectors for the specified keyframe. the array contains 2 values. • If the property value type is Prop er t y Va lue Ty p e. An array of 2 or 3 floating-point values. n e w Va l ) Description Turns temporal continuity on or off for the specified keyframe. the array contains 3 values.JavaScript Reference Property object 136 Property setSpatialTangentsAtKey() method a pp. prop e r t y Sp ec . the ‘out’ tangent is set to the i n Ta n g e n t value. an exception is generated. If not supplied.i tem ( in d e x) . If the property value type is neither TwoD _ S PAT I AL nor T h re e D_ S PAT I A L .T hreeD _SPATIAL . Property setTemporalContinuousAtKey() method a pp.TwoD_SPATIA L .se t Temp or a l AutoB ezierAt Ke y( ke y In de x. false to turn it off.layer(i n de x ). as returned by the ad d Ke y or ne arest- Ke y In dex method. pro je c t . n e w Va l ) Description Turns temporal auto-Bezier interpolation on or off for the specified keyframe.TwoD_SPATIA L . 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. An array of 2 or 3 floating-point values. Property setTemporalAutoBezierAtKey() method a pp. Returns Nothing.layer(i n de x ). An integer in the range [1.

the array contains 2 objects.layer(i n de x ). as returned by the a dd Ke y or ne ar- estKe y In dex method. An array of 1. 2.se t Temp or a l Eas eAtKe y( ke y In d e x .i tem ( in d e x) . An array of 1. as returned by the ad d Ke y or ne arest- Ke y In dex method.T hree D . • If the property value type is Proper t y Valu eTy p e.numKeys]. prop e r t y Sp ec . An integer in the range [1. If not supplied. Property setTemporalEaseAtKey() method a pp. • For all other value types.. See “KeyframeEase object” on page 82. the array contains 1 object. The incoming temporal ease. prop e r t y Sp ec . If the named property has keyframes. or 3 KeyframeEase objects. i n Te m p o ra l E a s e . or 3 KeyframeEase objects. Parameters ke y In dex newVal The index for the keyframe.numKeys]. the outgoing ease is set to the i n Tem p o r a l E as e value.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 . An integer in the range [1.T hree D . ou tTe m p o ra lE as e ) Description Sets the incoming and outgoing temporal ease for the specified keyframe. o u t Te m p o r a l E a s e (Optional) The outgoing temporal ease.i tem ( in d e x) . the array contains 2 objects. pro je c t . the array contains 3 objects.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 i n Tem p or a l E a se The index for the keyframe. Returns Nothing. • If the property value type is Proper t y Valu eTy p e. the array contains 3 objects.TwoD . use “Property setValueAtTime() method” on page 138 or “Property setValueAtKey() method” on page 138. the array contains 1 object. false to turn it off. pro je c t . • If the property value type is Proper t y Valu eTy p e. True to turn temporal continuity on.. this method generates an exception and displays an error. Returns Nothing. 137 . Property setValue() method a pp. • For all other value types. 2. To set the value of a property with keyframes. • If the property value type is Proper t y Valu eTy p e.se t Valu e( n e w Va l u e ) Description Sets the static value of a property that has no keyframes.layer(i n de x ).TwoD .

and sets its value.layer(i n de x ). a floating-point value. A value appropriate for the type of property being set.se t Valu eAt Ti m e (t im e .numKeys]. this method generates an exception and displays an error. pro je c t . An integer in the range [1.layer(i n de x ).JavaScript Reference Property object 138 Parameters n e w Va lu e Returns A value appropriate for the type of property being set. as returned by the ad d Ke y or ne arest- Ke y In dex method.i tem ( in d e x) . prop e r t y Sp ec .se t Valu eAt Ke y ( ke y In d e x . or no keyframe with the specified index.i tem ( in d e x) . The beginning of the composition is 0.i tem ( in d e x) . Property setValueAtKey() method a pp. A value appropriate for the type of property being set. n e w Valu e) Description Sets the value of a keyframe at the specified time. If the named property has no keyframes. Creates a new keyframe for the named property. if one does not currently exist for a specified time. Property setValueAtTime() method a pp. pro je c t . Parameters ke y In dex n e w Va lu e The index for the keyframe. pro je c t . and sets its value.. Returns Nothing. see “Property propertyValueType attribute” on page 132. see “Property propertyValueType attribute” on page 132. n e w Va l u es) Description Sets values for a set of keyframes at specified of times. 138 . prop e r t y Sp ec . Returns Nothing. Parameters time n e w Va lu e The time in seconds. if one does not currently exist for the specified time. Nothing. see “Property propertyValueType attribute” on page 132.layer(i n de x ). n e w Va l u e ) Description Finds the specified keyframe and sets its value.se t Valu es At Ti mes ( t im e s . prop e r t y Sp ec . Creates a new keyframe for the named property. Property setValuesAtTimes() method a pp.

pro je c t . Property unitsText attribute a pp. returns the keyframed value at the current time. See examples for “Property object” on page 119. prop e r t y Sp ec . pro je c t .layer(i n de x ).i tem ( in d e x) .i tem ( in d e x) . The type of value returned depends on the property value type. Type String.i tem ( in d e x) . prop e r t y Sp ec .va lueAtTi me( t im e . pro je c t . A array of values appropriate for the type of property being set. Property value attribute a pp. p re E x pre s s i o n) Description The value of the named property as evaluated at the specified time. u n i t sTex t Description The text description of the units in which the value is expressed. Note that the type of value returned is not made explicit. in seconds. it will be of a different type. Each time is a floating-point value. returns the static value. Type A value appropriate for the type of the property (see “Property propertyValueType attribute” on page 132). Parameters t i m es n e w Va lu e s An array of times. The beginning of the composition is 0. • If there are keyframes. prop e r t y Sp ec . read-only. read-only. Property valueAtTime() method a pp. depending on the property evaluated. • Otherwise. see “Property propertyValueType attribute” on page 132. Returns Nothing.layer(i n de x ).JavaScript Reference Property object 139 Times and values are expressed as arrays. 139 . the arrays must be of the same length.layer(i n de x ). returns the evaluated expression value. • If ex p re ss i on E n ab l e d is true.va lue Description The value of the named property at the current time.

a floating-point value. If the property has an expression and this is true. return the value for the specified time without applying the expression to it. The beginning of the composition is 0. Returns A value appropriate for the type of the property (see “Property propertyValueType attribute” on page 132). Ignored if the property does not have an associated expression. 140 . return the result of evaluating the expression for the specified time.JavaScript Reference Property object 140 Parameters time pre E x pres si o n The time in seconds. When false.

Reference invalidation When something occurs that changes an object sufficiently for the reference to become invalid. layer(1). v ar l ayer 1 p o s i t io n = l ayer 1 . item(1 ). / / i nv a l i d ref e ren ce to d e l e te d o b j e c t Similarly.proj ec t. layer( 1) .i tem ( 1) .l ayer (i n de x ).l ayer( 1) ("Ef fe c t s " )( "Ad d Gr ai n")( "Vie w i ng Mo de "). v ar effe ct 1a ga in = a pp.proj ec t.v ie w i ngMo de . v al u e ) . layer(1).proje c t. because their index positions have changed. if you reference an AE property in a deleted object. if you delete an object. as controlled by application preferences.JavaScript Reference PropertyBase object 141 PropertyBase object a pp. so PropertyBase attributes and methods are available when working with properties and property groups. layer 1. item(1 ). p o s it i o n . item(1 ). item(1 ). a l er t( e f fe c t 2 .proj ec t.remove(). effe ct 1.ef fe c t (2 ). a l er t( l ayer 1 p o s i t io n . effec t. the following are all ways of access properties in the Effects group: v ar effe ct 1 = app. pro je c t .l ayer (1 )( " Ef fe c t s") . / / 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 “PropertyBase name attribute” on page 145 “PropertyBase matchName attribute” on page 144 Description Name of the property. layer(1). e f fe c t ( " Ad d Gr a i n " ) ( " Vi e w i n g Mo d e " ) . • PropertyBase is the base class for both Property and PropertyGroup. using various kinds of expression syntax.v i ew i ngMo de. For example. script references to that object can generate errors.remove(). the warning occurs: v ar layer 1 = app.proj ec t.i tem ( i n d e x) .n a m e ) . n a m e ) . See also “PropertyGroup property() method” on page 150. After Effects generates the "Object is Invalid" error when you subsequently reference that item or other items in the group.proj ec t.proj ec t. a reference to the deleted object generates the warning "Object is Invalid": v ar layer 1 = app. blend Wi t hO r ig in al.a d dGr a i n .t r an s for m . pro je c t . layer 1. For example: v ar effe ct 1 = app. prop e r t y Sp ec Description Properties are accessed by name through layers. v ar ef fe ct 2p ar am = app. item(1 ).effe c t (2 ). pro je c t .i tem (1 ). name matchNam e A special name for the property used to build unique naming paths. In this case. For example. v ar ef fe c t 1a ga in too 2 = a pp. See “Property object” on page 119 and “PropertyGroup object” on page 148.a ddGr ain. / / 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.effe c t (1 ). a l er t ( l ayer 1. v ar ef fe c t 1a g a in too = a pp. 141 .item(1). layer( 1 ) . item(1 ).layer (1 ). In simple cases this is straightforward.remove(). v ar effe ct 2 = app. layer(1).

“PropertyBase enabled attribute” on page 144 “PropertyBase active attribute” on page 142 “PropertyBase elided attribute” on page 143 “PropertyBase isEffect attribute” on page 144 “PropertyBase isMask attribute” on page 144 “PropertyBase selected attribute” on page 147 When true. pro je c t . i s Mod i fi e d c a n S e t E n a bl e d e n a bl e d a c t ive e l id ed i s E ff e c t i s Mas k s e l e c te d “PropertyBase isModified attribute” on page 144 When true. read/write if c a n S e t E n a b le d is true. it is the same as the ena b le d attribute. read-only if c a n S e t E n a bl e d is false. this property is a mask. this corresponds to the setting of the eyeball icon. the user interface displays an eyeball icon for this propon page 143 erty. Type Boolean. Moves this property to a new position in its parent group. 142 . a c t ive Description When true. this property is enabled. this property is selected. p aren tPro p e r t y “PropertyBase parentProperty attribute” on page 145 The immediate parent group of this property. “PropertyBase canSetEnabled attribute” When true. When true. When true. “PropertyBase propertyType attribute” on page 146 The property type. For a layer.JavaScript Reference PropertyBase object 142 Attribute Reference “PropertyBase propertyIndex attribute” on page 146 Description Index of this property within its parent group. prop e r t y Sp ec . this property is active. prop er t y Group () “PropertyBase propertyGroup() method” on page 146 rem ove( ) m oveTo( ) du pl i c ate( ) “PropertyBase remove() method” on page 147 “PropertyBase moveTo() method” on page 145 “PropertyBase duplicate() method” on page 143 Removes this from the project.layer(i n de x ). this property is an effect. this property is not displayed in the user interface. When true. the property has been changed since its creation. For an effect and all properties. PropertyBase active attribute a pp. When true. this property is active. When true. Methods Method Reference Description Gets the parent group for this property. prop er t y Index prop er t y D ep t h prop er t y Ty p e “PropertyBase propertyDepth attribute” The number of levels of parent groups between this property and on page 145 the containing layer.i tem ( in d e x) . Duplicates this property object.

I N D E XE D_ G RO UP .” This parent group is not displayed in the user interface. c a n S e t E n a b l e d Description When true. read-only.i tem ( in d e x) . creates and returns a new PropertyBase object with the same attribute values as this one. it is true for all layers. this property is a group used to organize other properties. PropertyBase elided attribute a pp. you can set the e n a bl e d attribute value. If this property is not a child of an indexed group. 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.JavaScript Reference PropertyBase object 143 PropertyBase canSetEnabled attribute a pp. pro je c t .layer(i n de x ). read-only.dup licate () Description If this property is a child of an indexed group. see “PropertyBase propertyType attribute” on page 146. pro je c t . PropertyBase duplicate() method a pp.i tem ( in d e x) . 143 . Parameters None. prop e r t y Sp ec . An indexed group has the type Prop er t y Ty p e . prop e r t y Sp ec . Type Boolean. Returns PropertyBase object. this is true if the user interface displays an eyeball icon for this property.i tem ( in d e x) . and so the two child properties are not indented in the Timeline panel. prop e r t y Sp ec .layer(i n de x ). pro je c t . for a text layer with two animators and no properties twirled down. For example. The property is not displayed in the user interface and its child properties are not indented in the Timeline panel. “Animator 1” and “Animator 2” are contained in a PropertyBase called “Text Animators.layer(i n de x ).elide d Description When true. Type Boolean. the method generates an exception and displays an error. Generally.

layer(i n de x ). but you can refer to it in scripts. Type Boolean. it is not localized.i tem ( in d e x) . prop e r t y Sp ec . The match name is not displayed. otherwise. 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.enabled Description When true.i tem ( in d e x) . the default is true. 144 . prop e r t y Sp ec . if there is one.layer(i n de x ). Type Boolean.i tem ( in d e x) . pro je c t .isMo d if ied Description When true. this property is an effect PropertyGroup. read-only.layer(i n de x ). read-only. read-only if c a n S e t E n a bl e d is false. this property is a mask PropertyGroup. pro je c t . read-only. Unlike the display name. this property has been changed since its creation.layer(i n de x ).JavaScript Reference PropertyBase object 144 PropertyBase enabled attribute a pp. Type Boolean.i tem ( in d e x) .layer(i n de x ). prop e r t y Sp ec . prop e r t y Sp ec . pro je c t . Every property has a unique match-name identifier.matchName Description A special name for the property used to build unique naming paths. It corresponds to the setting of the eyeball icon.i tem ( in d e x) . this property is enabled. prop e r t y Sp ec . Type Boolean. read/write if c a n S e t E n a b le d is true. pro je c t . PropertyBase matchName attribute a pp. PropertyBase isEffect attribute a pp. pro je c t . PropertyBase isModified attribute a pp. PropertyBase isMask attribute a pp.isEf fe c t Description When true.isMa s k Description When true.

(An indexed group has the type Pro p e r t y Ty p e. pro je c t .i tem ( in d e x) .p arentProp er t y Description The property group that is the immediate parent of this property.i tem ( in d e x) . PropertyBase parentProperty attribute a pp. Type PropertyGroup object or null. Type String. read/write for a child of an indexed group. prop e r t y Sp ec .) 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. Nothing. prop e r t y Sp ec . or if the index value is not valid. PropertyBase name attribute a pp. I N D E X E D _ G RO U P .layer(i n de x ). I N D E X E D _ G RO U P .prop er t yD ep th 145 . but always has a m a tch Na m e value. pro je c t . An integer. pro je c t . pro je c t .i tem ( in d e x) . see “PropertyBase propertyType attribute” on page 146. I N DE XE D _ G ROU P . see “PropertyBase propertyType attribute” on page 146). otherwise read-only. This method is valid only for children of indexed groups. PropertyBase propertyDepth attribute a pp. see “PropertyBase propertyType attribute” on page 146. PropertyBase moveTo() method a pp. read-only. prop e r t y Sp ec . or null if this PropertyBase is a layer.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.layer(i n de x ).nam e Description The display name of the property. (An indexed group has the type Prop ert y Ty p e. the method generates an exception and displays an error.) Parameters n e w In d e x Returns The new index position at which to place this property in its group.) Type String.i tem ( in d e x) .layer(i n de x ). read-only. if it is not.JavaScript Reference PropertyBase object 145 An indexed group may not have a nam e value. (Compare “PropertyBase matchName attribute” on page 144. a property group that has the type Pro p e r t y Ty p e.

layer(i n de x ). pro je c t . PropertyBase propertyType attribute a pp. The number of levels to ascend within the parent-child hierarchy. read/write. which gets the immediate parent. prop e r t y Sp ec . read-only. 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. Parameters co un tUp Optional.i tem ( in d e x) . prop e r t y Sp ec .prop er t yIndex Description The position index of this property within its parent group. pro je c t . or null if the count reaches the containing layer.. A property group whose members have an editable name and an index.JavaScript Reference PropertyBase object 146 Description The number of levels of parent groups between this property and the containing layer.i tem ( in d e x) . Returns PropertyGroup object.layer(i n de x ). The value 0 for a layer.i tem ( in d e x) .prop er t y D ep th ].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. Default is 1. pro je c t . An integer in the range [1. I N D E X E D _ G RO U P . Effects and masks are indexed groups.I N D E XE D_ G RO UP A single property such as position or zoom. Type A Prop er t y Ty p e enumerated value. pro je c t .layer(i n de x ).prop er t yTy p e Description The type of this property. One of: Prop er t y Ty p e . For example. PropertyBase propertyIndex attribute a pp. the m a s k s property of a layer refers to a variable number of individual masks by index number.layer(i n de x ). Type Integer.i tem ( in d e x) . Type Integer. prop e r t y Sp ec . 146 . prop e r t y Sp ec .prop er t yGrou p( ) a pp. see “PropertyBase propertyType attribute” on page 146).P ROPE RT Y Prop er t y Ty p e . PropertyBase propertyGroup() method a pp. read-only.

any animator that has been set to a text layer).NA ME D _ G ROU P A property group in which the member names are not editable. (An indexed group has the type Prop ert y Ty p e. Type Boolean. prop e r t y Sp ec . PropertyBase selected attribute a pp. Layers are named groups. To read the full set of selected properties of a composition or layer. I N DE XE D _ G ROU P . Returns Nothing.layer(i n de x ). This method is valid only for children of indexed groups. the method generates an exception and displays an error.se l e c te d Description When true.i tem ( in d e x) . otherwise read-only. PropertyBase remove() method a pp. use the se l e c te d Prop er t i es attribute of a Comp or Layer object. pro je c t . read/write for an effect or mask property group.) This method can be called on a text animation property (that is.i tem ( in d e x) . 147 .JavaScript Reference PropertyBase object 147 Prop er t y Ty p e .rem ove () Description Removes this property from its parent group. Parameters None. Set to true to select the property. prop e r t y Sp ec . or if the index value is not valid. pro je c t . this property is selected. see “PropertyBase propertyType attribute” on page 146. If this is a property group.layer(i n de x ). or to false to deselect it. if it is not. it removes the child properties as well. Sampling this attribute repeatedly for a large number of properties can slow down system performance.

I N D E XE D_ G RO UP . All methods and attributes of PropertyBase. pro je c t . • PropertyGroup is a base class for MaskPropertyGroup. use PropertyBase methods and attributes.layer(i n de x ).a d dProp er t y (n a m e ) Description Creates and returns a PropertyBase object with the specified name.JavaScript Reference PropertyGroup object 148 PropertyGroup object a pp.i tem ( i n d e x) . it generates an exception. PropertyGroup addProperty() method a pp.i tem ( in d e x) . For examples of how to access properties and property groups. To traverse the group hierarchy. see “PropertyBase object” on page 141. Property groups can be nested to provide a parent-child hierarchy.NA ME D _ G ROU P) . in addition to those listed below. pro je c t . see “PropertyBase propertyGroup() method” on page 146. Adds a property to the group. and adds it to this group. To check that you can add a particular property to this group. such as the mask feather of the third mask. See “MaskPropertyGroup object” on page 103. Attributes Attribute Reference Description nu m Prop er t i es Methods Method “PropertyGroup numProperties attribute” on page 149 The number of indexed properties in the group. call c a n Ad dPro p e r t y before calling this method. see “PropertyBase propertyType attribute” on page 146) The only exception is a text animator property. prop e r t y Grou p Sp e c Description The PropertyGroup object represents a group of properties. • PropertyGroup is a subclass of PropertyBase. you can only add properties to an indexed group (a property group that has the type Prop er t y Ty p e . It can contain Property objects and other PropertyGroup objects.l ayer (i n de x ). See “PropertyBase object” on page 141. (See “PropertyGroup canAddProperty() method” on page 149. PropertyGroup attributes and methods are available when working with mask groups. which can be added to a named group (a property group that has the type Prop er t y Ty p e. with a Layer object at the top (root) down to a single Property object. prop er t y ( ) c a n Ad dPro p e r t y () a d dProp er t y () Reports whether a property can be added to the group.) 148 . If this method cannot create a property with the specified name. prop e r t y Grou p Sp e c. are available when working with PropertyGroup. In general. Reference “PropertyGroup property() method” on page 150 “PropertyGroup canAddProperty() method” on page 149 “PropertyGroup addProperty() method” on page 148 Description Gets a member property or group.

pro je c t . PropertyGroup numProperties attribute a pp. Returns PropertyBase object. The following names are supported: • Any match name for a property that can be added through the user interface. • For text animators. For layers.ca 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. (See “PropertyBase matchName attribute” on page 144). see the “PropertyGroup property() method” on page 150. and motion tracker groups. The only legal input arguments are “mask” or “ADBE Mask Atom”. However. / / re tu r n s t r u e m a sk Gro u p. this method returns a value of 3. ca n Ad d Prop e r t y ( " A DB E Ma s k Ato m " ) . Type Integer. read-only. • When adding to an ADBE Mask Parade: “ADBE Mask Atom” “Mask” . ca n Ad d Prop e r t y ( " bl e n d " ) . . corresponding to the mask. PropertyGroup canAddProperty() method a pp. . For example. prop e r t y Grou p Sp e c. • When adding to an ADBE Effect Parade.i tem ( in d e x) . . Selector” and Expression Selector has the name “ADBE Text Expressible Selector” . For example. . “ADBE Text Animator” . any effect by match name. prop e r t y Grou p Sp e c. . such as “Bulge” “Glow” “Vegas” . “ADBE Paint Atom” “ADBE Text Position” “ADBE Text Anchor Point” . (See “PropertyGroup addProperty() method” on page 148).JavaScript Reference PropertyGroup object 149 Parameters name The display name or match name of the property to add.layer(i n de x ). m a sk Gro u p. .nu m Prop er t i es Description The number of indexed properties in this group. . • Any effect by display name.layer(i n de x ). / / re tu r n s t r u e m a s k Gro u p. “ADBE Mask Atom” . effect. • For selectors. Range Selector has the name “ADBE Text Selector” Wiggly Selector has the name “ADBE Text Wiggly . . Returns Boolean.i tem ( in d e x) . ca n Ad d Prop e r t y ( " m as k" ) . / / re t u r n s fa l s e Parameters name The display name or match name of the property to be checked. pro je c t . layers also have many other properties available only by name. 149 . such as “ADBE Bulge” “ADBE Glo2” “APC Vegas” . which are the indexed groups within the layer. you can only add mask to a mask group.

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 From an AVLayer with an audio component From a camera layer

• "Time Remap" or "timeRemapEnabled" • "Audio Levels" or "audioLevels" • "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 From a PropertyGroup "ADBE Mask Parade" From a PropertyGroup "ADBE Mask Atom"

• "Source Text" or "sourceText" or "Text" or "text" • "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. on page 155 “RenderQueue render() method” on page 154 “RenderQueue pauseRendering() method” on page 154 “RenderQueue stopRendering() method” on page 155 “RenderQueue item() method” on page 153 Starts the rendering process.renderQ ueue. Stops the rendering process. ren der in g nu m Item s i te m s Methods Method Reference Description s h ow Win dow( ) ren der( ) p au se Re n der in g () s to pRen d e r i n g ( ) i te m ( ) “RenderQueue showWindow() method” Show or hides the Render Queue panel. The collection of items in the render queue.. does not return until render is complete. The RenderQueueItem object provides access to the specific settings for an item to be rendered. Attributes provide access to items in the render queue and their render status. Attributes Attribute Reference “RenderQueue rendering attribute” on page 155 “RenderQueue numItems attribute” on page 154 “RenderQueue items attribute” on page 154 Description When true. pause. and stop the rendering process. Gets a render-queue item from the collection. Parameters i n dex Returns The position index of the item. An integer in the range [0.num Item s ]. Methods can start. RenderQueueItem object. Pauses or restarts the rendering process.renderQ ueue Description The RenderQueue object represents the render automation process. pro je c t . The total number of items in the render queue. See “RenderQueueItem object” on page 156. RenderQueue item() method a pp. pro je c t . a render is in progress. item( i n de x) Description Gets a specified item from the i te m s collection. the data and functionality that is available through the Render Queue panel of a particular After Effects project. 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 Returns
True to pause a current render process, false to continue a paused render.

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 eItem.onSta tusChange d in the associated RenderQueueItem object; see “RenderQueueItem 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 Returns
When true, show the Render Queue panel. When false, hide it.

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 onStatusChanged 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 “RenderQueueItem numOutputModules attribute” on page 158 “RenderQueueItem render attribute” on page 159 “RenderQueueItem startTime attribute” on page 160 “RenderQueueItem elapsedSeconds attribute” on page 157 “RenderQueueItem timeSpanStart attribute” on page 161 “RenderQueueItem timeSpanDuration attribute” on page 161 “RenderQueueItem skipFrames attribute” on page 160 “RenderQueueItem comp attribute” on page 157 “RenderQueueItem outputModules attribute” on page 159 Description The total number of Output Modules assigned to the item. When true, this item is rendered when the queue is started. The time when rendering began for the item.

nu m Out p utMo du le s ren der s ta r t Ti m e e l ap se d S e co n d s t i m e S p an S t ar t t i m eS p an D ur at i o n s ki p Fr a m e s com p outputMo du le s tem pl a tes s ta tu s onStatusChanged l o g Ty p e

The time elapsed in the current rendering of this item.

The start time in the composition to be rendered.

The duration of the composition to be rendered.

The number of frames to skip when rendering this item.

The composition to be rendered by this item.

The collection of Output Modules for this item.

“RenderQueueItem templates attribute” on A set of Render Settings templates. page 161 “RenderQueueItem status attribute” on page 160 “RenderQueueItem onStatusChanged attribute” on page 158 “RenderQueueItem logType attribute” on page 158 The current rendering status of the item.

A callback function that is called during the rendering process when the status of the item changes. A log type for this item.

Methods
Method Reference “RenderQueueItem outputModule() method” on page 159 “RenderQueueItem remove() method” on page 159 “RenderQueueItem saveAsTemplate() method” on page 160 Description Gets an Output Module for the item.

outputMo du le () rem ove( ) s aveAs Tem p l ate( )

Removes the item from the render queue. Saves a new Render Settings template.

156

dup l i c ate () Description Creates a duplicate of this item and adds it this render queue. See also “RenderQueueItem saveAsTemplate() method” on page 160 and “RenderQueueItem templates attribute” on page 161.renderQ ueue. To change the composition. Type CompItem object. pro je c t . RenderQueueItem elapsedSeconds attribute a pp. Returns RenderQueueItem object.renderQ ueue. you must delete this render-queue item and create a new one. item (i n de x ). Nothing. read-only. Parameters tem pl a teNam e Returns A string containing the name of the template to apply.JavaScript Reference RenderQueueItem object 157 Method Reference “RenderQueueItem applyTemplate() method” on page 157 “RenderQueueItem duplicate() method” on page 157 Description Applies a Render Settings template. RenderQueueItem applyTemplate() method a pp. Parameters None.a pp ly Te m p l ate ( te m p la te Nam e ) Description Applies a Render Settings template to the item. item (i n de x ). pro je c t . pro je c t . item (i n de x ). com p Description The composition that will be rendered by this render-queue item.renderQ ueue. RenderQueueItem duplicate() method a pp. a pp ly Te m p l ate ( ) du pl i c ate Duplicates this item.renderQ ueue. RenderQueueItem comp attribute a pp. e l a ps e dS e co n d s 157 . item . pro je c t .

JavaScript Reference RenderQueueItem object 158 Description The number of seconds spent rendering this item.renderQ ueue. pro je c t . RenderQueueItem logType attribute a pp. item(1 ). Type A function name string. Type Integer. See “RenderQueue pauseRendering() method” on page 154 and “RenderQueue stopRendering() method” on page 155. item (i n de x ). Example f u n c t io n my S ta tu s Ch an g e d( ) { a l er t(a pp. indicating which events should be logged while this item is being rendered.renderQ ueue. Type A Log Ty p e enumerated value. use this callback to pause or stop the rendering process.renderQ ueue. E R RO R S _ A N D _ S E T T I N G S L o g Ty p e .renderQ ueue. onSt at us Ch ange d Description The name of a callback function that is called whenever the value of the Ren derQ ueueItem. RenderQueueItem onStatusChanged attribute a pp. read-only. st at us) } 158 . item (i n de x ).sta tu s attribute changes. E R RO R S _ A N D _ PE R _ F RA ME _ I N F O RenderQueueItem numOutputModules attribute a pp. E R RO R S _ O N LY L o g Ty p e . l o g Ty p e Description A log type for this item. pro je c t . item (i n de x ). (read/write). or null if item has not been rendered. See also “Application onError attribute” on page 26. however. pro je c t . or null if no function is assigned. you can. You cannot make changes to render queue items or to the application while rendering is in progress or paused. See “RenderQueueItem status attribute” on page 160. o u t p ut Mo d u l e. read-only. One of: L o g Ty p e . numO ut put Mo dules Description The total number of Output Modules assigned to this item. Type Integer. pro je c t .

item (i n de x ).renderQ ueue.renderQ ueue. pro je c t . rem ove () Description Removes this item from the render queue. item(1 ). st at us is set to RQ Item S ta tu s.JavaScript Reference RenderQueueItem object 159 a pp. When set to true. pro je c t . RenderQueueItem remove() method a pp. the item will be rendered when the render queue is started. Parameters i n dex Returns The position index of the output module. pro je c t .num Out putMo dule s ]. Returns Nothing. o u t p ut Mo d u l e s Description The collection of Output Modules for the item. An integer in the range [1. item(1 ).renderQ ueue. RenderQueueItem render attribute a pp. pro je c t .QU E UE D . pro je c t . render = false. read-only.renderQ ueue.renderQ ueue. 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. U N QU E U E D .renderQ ueue. //change s sta tus a n d shows dia l og RenderQueueItem outputModules attribute a pp.. item (i n de x ). a pp. the Ren derQ ueueItem. When set to false. ren d er Description When true. Type OMCollection object.st atu s is set to RQ Item St at us . item (i n de x ). 159 . item (i n de x ). OutputModule object. RenderQueueItem outputModule() method a pp. Parameters None. onSt at usCh anged = my St atu sCha n ge d(). pro je c t .

Type Integer in the range [0. pro je c t . Read/write.renderQ ueue. This is equivalent to "rendering on twos. and results in regular rendering of all frames. Use this to do rendering tests that are faster than a full render. pro je c t . RenderQueueItem status attribute a pp. read-only. RenderQueueItem saveAsTemplate() method a pp..renderQ ueue. st ar tTi m e Description The day and time that this item started rendering. Nothing.renderQ ueue. saveAs Temp l ate (n a m e) Description Saves the item’s current render settings as a new template with the specified name. item (i n de x ). a sequence output would have half the number of frames and in movie output. item (i n de x ). For example.99]. A value of 1 skips every other frame. item (i n de x ). A value of 0 skip no frames. 160 .renderQ ueue. pro je c t . item (i n de x ). if skip has a value of 1. or null if the item has not started rendering.JavaScript Reference RenderQueueItem object 160 Type Boolean. Type Date object. Parameters name Returns A string containing the name of the new template. sk i p Fr am es Description The number of frames to skip when rendering this item." Higher values skip a larger number of frames. RenderQueueItem skipFrames attribute a pp. RenderQueueItem startTime attribute a pp. each frame would be double the duration. The total length of time remains unchanged. pro je c t . st at us Description The current render status of the item. read/write.

renderQ ueue. pro je c t .U SER _ STO P PED RQ Item St at us .D ON E Rendering process has been paused. Composition is rendering Rendering process was stopped by user or script.renderQ ueue. read-only.U N QUE U E D RQ Item St at us .renderQ ueue. read-only. Type Floating-point value. RenderQueueItem templates attribute a pp. Rendering process for the item is complete. Composition is ready to render. RenderQueueItem timeSpanStart attribute a pp. Rendering process was stopped due to an error. The duration is determined by subtracting the start time from the end time. pro je c t . t im eS pa n D ur a t i on Description The duration in seconds of the composition to be rendered. One of: RQ Ite m St a t u s . at which rendering will begin. 161 . Type Array of strings. read/write. item (i n de x ). t im eS pa n S ta r t Description The time in the composition. RenderQueueItem timeSpanDuration attribute a pp. Type Floating-point value.QU E UE D RQ Item St at us . Setting this value is the same as setting a custom end time in the Render Settings dialog box.E RR _ STO P PE D RQ Item St at us . See also “RenderQueueItem saveAsTemplate() method” on page 160. Setting this value is the same as setting a custom start time in the Render Settings dialog box. pro je c t . Item is listed in the Render Queue panel but composition is not ready to render. item (i n de x ). N E E D S _ O U T P U T RQ Item St at us . item (i n de x ).RE N D E RI N G RQ Item St at us .JavaScript Reference RenderQueueItem object 161 Type An RQItem S t atu s enumerated value. tem p l ate s Description The names of all Render Settings templates available for the item. Item lacks a valid output path. read/write. in seconds. W I L L _ C ON T I N U E RQ Ite m S t a t u s .

as shown in the Render Queue panel of the project. items. a d d( ) RQItemCollection add() method a pp. Parameters com p Returns The CompItem object for the composition to be added. Methods Method Reference “RQItemCollection add() method” on page 162 Description Adds a composition to the Render Queue.JavaScript Reference RQItemCollection object 162 RQItemCollection object a pp. creating a RenderQueueItem. RenderQueueItem object. a dd( c o m p ) Description Adds a composition to the Render Queue. pro je c t .renderQ ueue. See “RenderQueueItem object” on page 156 • RQItemCollection is a subclass of Collection. All methods and attributes of Collection are available when working with RQItemCollection. and allows you to create them from compositions. pro je c t . The collection provides access to the RenderQueueItem objects. See “Collection object” on page 52. items Description The RQItemCollection contains all of the render-queue items in a project. 162 .renderQ ueue. The first RenderQueueItem object in the collection is at index position 1.

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 “Settings saveSetting() method” on page 164 “Settings getSetting() method” on page 163 “Settings haveSetting() method” on page 163 Description Saves a default value for a setting. Retrieves a setting value. Reports whether a specified setting is assigned.

s aveS e t t in g () g e t S e tt i n g ( ) h aveS e tt i n g ( )

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 ke y Na m e Returns
A string containing the name of a settings section A string containing the key name of the setting item.

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 ke y Na m e Returns
A string containing the name of a settings section A string containing the key name of the setting item.

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 ke y Na m e v alu e Returns
A string containing the name of a settings section A string containing the key name of the setting item. A string containing the new value.

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 e.cl 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 e.clo 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 e.ver t ices = [[300 ,50],[ 20 0,1 50],[300 ,25 0],[4 00, 150 ]]; my Sh ap e.inTa ngents = [[55. 23,0 ], [0 ,-55 .23],[-55 .23 ,0],[0,5 5.2 3]]; my Sh ap e.out Ta n gent s = [[-5 5.2 3,0 ],[0, 55. 23],[55. 23, 0],[0,-55 .23 ]]; my Sh ap e.cl o se d = t r ue;

165

Shape inTangents attribute s h a p e O b j ec t. The tangent vectors coming into the shape vertices. the shape is a closed curve. Type Array of floating-point pair arrays. When false. The anchor points of the shape. Each tangent value defaults to [0. val ue. read/write. When the mask shape is not RotoBezier.0]. val ue. If the shape is in a RotoBezier mask. this results in a straight line segment. outTa n g en ts Description The outgoing tangent vectors. associated with the vertices of the shape. all tangent values are ignored and the tangents are automatically calculated. cl os ed Description When true. and collect the vectors into an array the same length as the ver t ices array. read/write. The tangent vectors coming out of the shape vertices. this results in a straight line segment. val ue. 166 . Shape outTangents attribute s h a p e O b j ec t. in Tan g en t s Description The incoming tangent vectors. the closing segment is not drawn. all tangent values are ignored and the tangents are automatically calculated. If the shape is in a RotoBezier mask. Each tangent value defaults to [0.JavaScript Reference Shape object 166 Attributes Attribute Reference “Shape closed attribute” on page 166 “Shape vertices attribute” on page 167 “Shape inTangents attribute” on page 166 “Shape outTangents attribute” on page 166 Description When true. and collect the vectors into an array the same length as the ver t ices array. cl o se d ver t ices i n Ta n g e n ts o u t Ta n gen t s Shape closed attribute s h a p e O b j ec t.0]. Specify each vector as an array of two floating-point values. Specify each vector as an array of two floating-point values. or direction handles. Type Boolean. associated with the vertices of the shape. When the mask shape is not RotoBezier. the first and last vertices are connected to form a closed curve. or direction handles.

[ 0 . For example: my Sh ap e . and collect the point pairs into an array for the complete set of points. Shape vertices attribute s h a p e O b j ec t. ver t i ce s Description The anchor points of the shape.ver t ice s = [ [ 0 . 0 ] ]. 1 ] . read/write. Type Array of floating-point pair arrays. 167 . Specify each point as an array of two floating-point values. [ 1 . val ue.0 ]. [ 1 .1 ]. read/write.JavaScript Reference Shape object 167 Type Array of floating-point pair arrays.

It can be accessed in an item’s layer collection either by index number or by a name string. All methods and attributes of AVLayer and Layer are available when working with ShapeLayer.l ayer(i n de x ) Description The ShapeLayer object represents a shape layer within a composition. see “LayerCollection addShape() method” on page 95.i tem ( in d e x) .JavaScript Reference ShapeLayer object 168 ShapeLayer object a pp. pro je c t . 168 . which is a subclass of Layer. Create it using the LayerCollection object’s ad d Sh ap e() method. See “Layer object” on page 84 and “AVLayer object” on page 40. • ShapeLayer is a subclass of AVLayer.

pro je c t .0]. B]. col or Description The color of the solid. Attributes Attribute Reference “SolidSource color attribute” on page 169 Description The color of the solid.i tem ( in d e x) . • SolidSource is a subclass of FootageSource. read/write. 169 . [R.JavaScript Reference SolidSource object 169 SolidSource object a pp. are available when working with SolidSource.p roxySo urce Description The SolidSource object represents a solid-color footage source. and blue values. pro je c t .. co lor SolidSource color attribute s olid S ourc e. Type Array of three floating-point values. expressed as red.i tem ( in d e x) . in the range [0. All methods and attributes of FootageSource. See “FootageSource object” on page 68. green.0. m a i n S o u rce a pp. in addition to those listed below. G.1.

Returns whatever the system outputs in response to the command. Description Executes a system command. The version of the operating system. For example. c a l lSys te m ( c m d L i n e To Exe c u te ) .. Example a l er t ( " Your O S i s " + sy stem. exe command. Reference “System callSystem() method” on page 170 Description Execute’s a command on the system’s command line.os Vers i on ). con f i r m ( " Yo u a re : " + s ys te m . m a ch i n e Na m e + " . e xe / c \ " t i m e / t \ " " ) . c a l lSys tem ( " c m d .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.###BOT_TEXT###quot; ). as if you had typed it on the operating system’s command line. It is available through the s ys te m global variable. passing the command to run in escaped quotes (###BOT_TEXT###quot;. u s e r Nam e m a chi n e Na m e o s Nam e o s Ver s i o n Methods Method “System machineName attribute” on page 170 The name of the host computer. Parameters c m d L i n e To Exec u te Returns A string containing the command and its parameters. mach ineName 170 . " ) . In Windows. 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 . . u s e r Na m e + " r un n i n g o n " + s y s t e m . if anything. System machineName attribute s ys te m . Attributes Attribute Reference “System userName attribute” on page 171 Description The current user name. a l er t ( " Cu r ren t t i m e i s " + t i m e S t r ). The output from the command. c a l l Sy s te m ( ) System callSystem() method s ys te m .os Name + " r u nni ng versi on " + sy stem. “System osName attribute” on page 171 “System osVersion attribute” on page 171 The name of the operating system. such as the user name and the name and version of the operating system. you can invoke commands using the / c switch for the c m d.

read-only. u s er Na m e Description The name of the user currently logged on to the system. read-only. System userName attribute s ys te m . System osName attribute s ys te m . read-only. Type String. Type String. Type String. read-only. System osVersion attribute s ys te m . Type String. osVersion Description The version of the current local operating system. 171 .JavaScript Reference System object 171 Description The name of the computer on which After Effects is running. osNa me Description The name of the operating system on which After Effects is running.

p ro p e r t y( " S o u rc e Tex t " ) . Attributes Attribute Reference “TextDocument text attribute” on page 172 Description The text layer’s Source Text value. se tVa lue At Ti m e ( 1 .prop e r t y ( " S o u rce Text " ) .text Description The text value for the text layer’s Source Text property. passing the string to be encapsulated. 6 6 .i tem ( in d e x) . This sets keyframe values for text that show different words over time: v a r tex tPro p = myTex t L ayer. se tVa lue At Ti m e ( 0 . tex tPro p. s e t Val u e ( my Tex t D o c u m e n t ) . pro je c t . 3 3 .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. se tVa lue At Ti m e ( . se tVa lue At Ti m e ( . tex tPro p. tex t TextDocument text attribute t e x t D o c u m e n t.layer(i n de x ). 172 . n e w Tex tD o c u m e n t (" i s " )) . tex tPro p. n e w Tex t D o c u m e n t ( " Hap py " ) ) . prop er t y ( "So urce Text").va lue ). Type String.v alu e Description The TextDocument object stores a value for a TextLayer's Source Text property. tex tPro p. n e w Tex t D o c u m e n t ( " yu m my! " )) . 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" ) . read/write.p rop er t y ( " S ou rce Tex t" ) . Create it with the constructor. my Tex t L ayer. n e w Tex tD o c u m e n t (" c a ke" ) ). a l er t( my Tex t L ayer.

l ayer(i n de x ) Description The TextLayer object represents a text layer within a composition. which is a subclass of Layer. pro je c t . • TextLayer is a subclass of AVLayer. See “Layer object” on page 84 and “AVLayer object” on page 40. but has the following AE properties and property groups. All methods and attributes of AVLayer and Layer are available when working with TextLayer. inherited from AVLayer. Create it using the LayerCollection object’s a d dTex t method. It can be accessed in an item’s layer collection either by index number or by a name string.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. 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 . AE Properties TextLayer defines no additional attributes. see “LayerCollection addText() method” on page 96.JavaScript Reference TextLayer object 173 TextLayer object a pp. 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. are not applicable to text layers.i tem ( in d e x) .

It also shows some typical programming constructions from JavaScript that apply to scripting.adobe. save_ a n d _ i n c rem en t. visit Adobe Studio Exchange at http://share. j sx .Examples This section describes sample scripts that are included on your DVD. and displays an alert letting the user know the new file name being saved.5. then extract the name without the numerical extension. Save and increment This script.studio. This set of examples is by no means exhaustive. defines variables for the name of the file and the numbering and file extension that we plan to add to it. assigning a zero for each if not. but it does demonstrate some of scripting’s more complex features in action. 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. For more examples from Adobe and from other After Effects users.com. and the ExtendScript File object. and choose Script in the Adobe After Effects section. assume that the incrementer has run before and increment the current numerical string. it is still included here because it makes effective use of conditionals. Note: Although much of the functionality of this script has been superseded by the incremental save feature that was introduced in After Effects 6. If there is. giving an overview of what they do and a description of how they work. functions. • Checks to see if there is an underscore character four characters from the end of the current file name. pops up an alert telling the user to save the project. or “_100” or above). • Saves the project with the new file name. and ends. This script does the following: • Determines whether the currently open project has ever been saved. • Creates a new file using the updated name and extension. • An incrementer loop tests for whether the numbering has extended to two or three digits (for example. If the project has not been saved. if the numbering has reached “_010” or above. 174 . • If the project has been saved at least once before.

This script does the following: • Prompts the user for a new folder to use as a render destination. If not. moving footage. tes t ForS e quen ce( ) . saves the new setting in preferences. or an image sequence. It attempts to detect whether each item is a still. • Makes the Render Queue panel visible and bring it to the front. The first one tests for the presence of sequential numbers anywhere in the file name. set this as a user prompt. allows the user to import the full. • Display a prompt to the user asking for a text string to use. and for each output module in it.Examples Render named items 175 Render named items This script. finds compositions in the open project with a particular text string in their names and sends all such compositions to the render queue. which are a special type of JavaScript designed to reduce the number of steps required to evaluate a string. This script does the following: • Checks to see if a default string for rendering has already been set in the user preferences. • Defines a helper function. and checks that the user chooses a folder rather than cancelling. and displays an alert stating the new file path. • Defines a function. Otherwise. js x . the text is undefined. Sends all matching compositions to the render queue. New render locations This script. gives the current render location a new name and location. If so. • Goes through the project looking for the text entered by the user. sm a r t Im p o r t . to import each of the files in the chosen folder. The user still has to make other choices in dialog boxes. • Checks that the user entered a new location (and didn’t cancel). converting it to all lowercase letters for consistency (although the search is not case sensitive). Smart import This script. we set a new se c t i onName and ke y Na m e in the preferences file. ren d e r Na m e d It e m s . which uses several helper functions. 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. along with a placeholder value for the string that will be entered by the user. n e w Re n d e r Lo c a t i o n s .js x . then creates a loop for each selected render queue item. and checks if the item that contains that text is a composition. nested contents of a folder just by selecting it. • If an item is queued. The function then checks adjacent files to see if a sequence exists. • If the user cancels. ready for the user to assign save locations for the new render queue items. This uses regular expressions. stopping after we’ve evaluated ten 175 . allows the user to select queued items in the render queue and assign a new render destination for them. This is handy if you’re always looking for the same string (for example. 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). p ro ce s s Fo l d er () . to test whether a given file is part of a sequence. “FINAL” or “CURRENT”). js x .

If not. e-mail sender.Examples Render and e-mail 176 files to save processing time. j s x . • E-mails the message. assumes a sequence and returns the first file of that sequence. em ail_met ho d s. 176 . using the ExtendScript Socket object. using the settings (such as the server) from the e m ai l _ m e th o d s . you can always run the script to make new settings that overwrite the existing ones.j sx (which establishes the sender. ren d er _ a n d _ e m a i l . Convert selected properties to markers This script. em ai l _ se tu p. For details of that utility. assumes there is no image sequence and checks for an array consisting of the matched string and its location within the file name. renders all queued items in an open project and sends an e-mail report to indicate when the render has completed. which prompts the user for the mail gateway and sender and recipient addresses. • Calls the main function. 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. • When rendering is complete. There is an option for forcing alphabetical order in sequences. creates an e-mail object.) • Render the items in the render queue. This script does the following: • Establishes conditions under which the script will run. You can run this script as standalone any time you want to change the settings. which is commented out in the script as written. and the total render time. (If there are saved settings that you need to change. run the email_se t up. If you want to force alphabetical order. If all files are part of a numbered sequence. Conve r t S e l e c te d Pro p e r t i e s to Mar ke r s . • Defines a helper function to actually import any image sequence discovered using te st For S equence() .force A l ph ab et i c al = t r ue .j sx . jsx . creates a text string for the e-mail message that contains the start time of the render. see the Creative Suite 3 JavaScript Tools Guide. A helper script. pro ces sFol der( ) . Another helper script.js x script • Displays an error if for any reason it is unable to send the mail. An open project with at least one item queued is required. It makes use of two other scripts that follow. 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). uncomment the line i m p o r tO p t i o n s . • Defines a helper function to pop up error dialog boxes if there is a problem with any file we are attempting to import. and e-mail recipient that are saved as Settings. prompts the user for the server name. the render time of each item in the queue. recipient. jsx . goes through the properties in each layer that are currently selected in the Timeline panel. and e-mail server). and converts the value of each property at each frame time to a Flash Video event cue point in a marker. jsx script. If no match is found for a number string. Render and e-mail This script. • Checks whether e-mail settings are already saved in the preferences.

with the values sampled at each frame. 177 . all markers that contain cue-point data are converted to Flash Video cue points. or a gradient property. Each marker is associated with an event-type Flash Video cue point. If the selected property has an expression. Note: This script does not convert properties that have complex value types. the Curves property of a Curve effect. 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. a marker is created for each frame. such as the Path property for a paint stroke. When you render the composition as Flash video.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.

.... 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 This code dump summarizes all public JavaScript objects (instantiable classes) and enumerated types defined for After Effects CS3..................S T RA I G H T = == == === == == === == === == == === == === == == === == === == == === == == === == === == == === == App li c a ti o n o b j e c t ..............P R E M U LT I P L I E D A l p h a Mo de .......-................ fl o a t de l ay.......I G N O R E A l p h a Mo de ........................-........... = == == === == == === == === == == === == === == == === == === == == === == == === == === == == === == AlphaMo de enum ......A l p h a Mo de ..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............

....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 ...... Ar r ay [b ot tom ...... l eft ]....................r i g ht] .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 ....-............... Ar r ay [ top....(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...........-... s t r i n g s e ver it y ) n o re tur n = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == == AVL ayer ob j ec t .....

....... w i dt h.........AD D 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 O LOR _ BUR N Bl e n d in g Mod 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..DA N C I N G _D I S S OLV E Bl e n d in g Mod e .AL PH A _ A DD 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 .DA R K E R _ C OLO R Bl e n d in g Mod e .-...C O LOR _ D O D G E Bl e n d in g Mod e ..D I S SO LVE 180 ............ 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 .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 ...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 .. 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............ l eft .......Bl e n d in g Mod e ..DA R K E N Bl e n d in g Mod e ..C O LOR 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 .-..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 ..LU M I N O S I T Y Bl 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 ...S AT U RAT I O N Bl e n d in g Mod e ...N O R M A L 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 ..L I N E A R _ D O D G E Bl e n d in g Mod e ............PI N _ L I G H T Bl e n d in g Mod e ....M ULT I PLY 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 .H A R D _ L I G HT 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 ..H UE Bl e n d in g Mod e ..S O F T _ L I G HT 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 .OV E R L AY Bl e n d in g Mod e ..C l o s e O p t i o n s .......After Effects Object Summary 181 Bl e n d in g Mod e .. 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 ...................-...S T E N C I L _ A L PHA Bl e n d in g Mod e ........ 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 ..E XC LU S I ON Bl e n d in g Mod e .............S C R E E N Bl e n d in g Mod e .......H A R D _ M I X Bl e n d in g Mod e .............. SAV E _ C H A N G E S = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == == Com p Ite m o b j e c t ......L I N E A R _ BU R N 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 .L I G H T E N Bl e n d in g Mod e .............-....

... i n te g e r h e i g h t...-....... 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 ............. 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 ......... s t r i n g n a m e .......-........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 ........ 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 ..... O F F F i e l d S e p a r a t i o n Ty p e . i n te g e r h e i g h t . 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....................... 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 ......... f l o at f r am e R a te ...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 .........-.. i n te g e r w id t h .......... i n te g e r w i d th ...................-....F i e l d S e p a r a t i o n Ty p e .....

..... 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 teg e r w i dt h ... inte ger w i dth ... 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....................-....................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 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 he ig ht ... f l o at dur at i o n ) n o re t u r n 183 ......-............-... i n te g e r w id t h ........-......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 ........................ i n te g e r h e i g h t. f l o at f r am e R a te ....... 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 ... i n te g e r h e i g h t........... flo at fr ameR ate........... st r i n g n a m e ..

...Ke y fr am eIn ter p o la t i on Ty p e ...... JA PA N E S E L a n g u a ge ............P ROJ E C T = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == == Im por tO p tions ob jec t .........BE Z I E R Ke y fr am eIn ter p o la t i on Ty p 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.......... i n te ger he ig ht .-............ 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 ...... f l o at dur a t i on ...... I TAL I A N L a n g u a ge .n e w Ke y fr a m e E as e ( fl o at s p e e d .......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 ... E N G L I S H L a n g u a ge .........Im p o r t As Ty p e ..............L a n g u a ge .......-........ s t r i n g n a m e .................. inte ger w i d th .............................................C O M P Im p o r t As Ty p e ......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 ....-..................... 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 ........... f l o at pi xe l Asp ec tR at i o......-...-................After Effects Object Summary 184 s et Proxy Wi thS e quen ce( F il e prox y F il e . S PAN I S H 184 .................-.-... G E R M AN L a n g u a ge ...F O OTAG E Im p o r t As Ty p e ......... 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 ..-........C O M P _ C RO PPE D _ L AYE R S Im p o r t As Ty p e ......... i n te g e r w i d th .....................-...................a d dComp ( st r i ng na me... i n te g e r h e i g h t ... F R E N C H L a n g u a ge .....................-.

............(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 185 = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == = C am er a L ayer ob je c t ..................................-......-........

.............................................................-............ ADD Ma sk Mo de...... [ 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 ........ 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....... inte ger heig ht.......-.......... [ st r in g u r l] ..-.........B EST L ayer Q u al i t y...................-. E R RO R S _ A N D _ PE R _ F RA ME _ I N F O L o g Ty p e ........... flo a t pixelAspe ct Ra t io... 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 ........LayerQu alit y................. s t r i n g n a m e ............ [ 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 ........... DIF F E R E NCE 186 .........................Ma sk Mo de.. i n te ger w i dt h...............-.......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 .................. [ s t r i n g cha p ter ] ......-.a d d( AVIte m t he Item .... DA RK E N Ma sk Mo de............-.... s t r in g n a m e ...... [ 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..-.... 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 . [ 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 .. E R RO R S _ A N D _ S E T T I N G S L o g Ty p e ....................L o g Ty p 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.........

..........................-.......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 .-.........................O F F Ma sk Mot i on Blur............-.....(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 ....-..........................-.............. L IG HTE N Ma sk Mo de.............................. I NTERS E CT Ma sk Mo de.. N ONE Ma sk Mo de..-......................Ma sk Mot i on Blur........ SU BTRAC T = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == Ma skMot i onBlur en um ...- 187 .....................................After Effects Object Summary 187 Ma sk Mo de...............S A ME _ AS _ L AYE R = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == Ma skProper t yGroup obj ec t ..............-................O N Ma sk Mot i on Blur.............-..............

...............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..............-..................I M PO RT Pos t Ren derAc t i on ...................-.-....................... i n teg e r i te m He ig h t .......................Pos t Ren derAc t i on .-.....................-. 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.....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 ............. 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 ... i n te g e r i te m Wi dt h ..........I M PO RT _ AN D _ RE P L AC E _ US AG E Pos t Ren derAc t i on .......-.........................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 .N O N E Pos t Ren derAc t i on .................. f l o a t fr a m e R a te ..

....-..........s tore d ......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 ..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 .............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 .........i n ........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..................

.i n ........ [ 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 ....t y p e . 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 ......i n ....store d... 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 ... Ar r ayO fKe y fr ameE ase inEase.s to re d ....s tore d ....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 . Ke y fr ameIn ter p o l at ion Ty p e in Ty p e ...(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 ..prop er t y = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == Pro p e r t y Gro u p o b j ec t ..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 ...... 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 .-...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 ... b o o l p re Ex p res s i on ) ret u r n s t y p e .......-.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 .. 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 .i n ..s tored . [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 . [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 .. t y p e .... 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...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 .stored .... 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 . Ar r ayOf ...stored . t y p e...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 ...i n . Ar r ayO fFlo a t i n Ta ngen t..

...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 ...... S S W W W Pul l dow n Ph a s e ....TE XT _D O C UM ENT Proper t y Valu eTy p e............................ O F F Pul l dow n Ph a s e .........Pul l dow n Me t h o d ..-................CU STOM _VALU E Proper t y Valu eTy p e.LAY E R_IND E X Proper t y Valu eTy p e. WS W W W _ 2 4P _ A DVAN C E Pul l dow n Ph a s e . P U L L D OW N _ 3 _ 2 191 ......NO _VA LUE Proper t y Valu eTy p e..............M ASK_INDEX Proper t y Valu eTy p e...................-..CO LO R Proper t y Valu eTy p 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 ..... W WS W W _ 2 4P _ A DVAN C E Pul l dow n Ph a s e ...-..........T hree D_SPATIAL Proper t y Valu eTy p e......M ARKER Proper t y Valu eTy p e.....TwoD _SPATIA L = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == Pul l dow n Ph a s e e nu m ...............Proper t y Valu eTy p e. S W W W W _ 2 4 P _ A DVA N C E Pul l dow n Ph a s e ... W W WS S Pul l dow n Ph a s e ...I N D E XE D_ G RO UP Prop er t y Ty p e ........ WS S W W Pul l d ow n Ph a s e .............Prop er t y Ty p e ................................T hree D Proper t y Valu eTy p e...... A DVAN C E _ 2 4 P Pul l dow n Me t h o d ..-...........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 .-....NA ME D _ GROU P Prop er t y Ty p e .TwoD Proper t y Valu eTy p e....................P ROPE RT Y = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = = Proper t y Valu eTy p e enum .. W WS S W Pul l d ow n Ph a s e ....O n eD Proper t y Valu eTy p e.-...... S W W WS Pul l d ow n Ph a s e .............SH APE Proper t y Valu eTy p e..-..........

.......................E RR _ STO P PE D RQ Ite m S t a t u s ............-....................-............ UN D O _C AC HE S = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == = RenderQu eu e obj ec t ..............QU E UE D RQ Item St at us .......-.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 ............ N E E D S _ O U T P U T RQ Item St at us ...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 .........................................-..-.............................RE N D E RI N G 192 ....................................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 ......... I M AG E _ C AC H E S PurgeTa rge t............................. SNAP SH OT _ C AC HES Purg eTa rg e t............D ON E RQ Item St at us .-.....-...Pur g e Ta r g e t ....................After Effects Object Summary 192 = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = PurgeTa rge t enu m .............................-................................-......-.... A L L _ C AC H E S Pur g e Ta r g e t ...

...............After Effects Object Summary 193 RQ Item St at us ...-............-.......g e t S e tt i n g ( s t r in g s e c t i o n Na m e ....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 ......-..........-........-....................................-........................ s t r in g s e c t i o n Ke y.............-..............- 193 ................................................. 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 .......UN QUE U E D RQ Item St at us ............................................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 ...............-........US E R _ STO P PED RQ Ite m St a t u s .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 ...................... W I L L _ C ON T I N U E = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == = S e tt i n g s o b j e c t ....................................... s t r i n g n e w Va l u e ) n o re t u r n = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == = Shape object ......-.....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 ..........-....................................................-............-............

................................................Tr a ck Mat teTy p e........F P S 60 = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == Tim e co de Di s p l ay Ty p e e nu m ....................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 ...... LUM A Tr a ck Ma t teTy p e .............AU TO Tim eco de Ba seTy p e........... P I X E L _ M OT I O N ....Fr am e Bl en d i n g Ty p e...............F P S 25 Tim eco de Ba s eTy 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.................... AL PH A Tr a ck Ma t teTy p e .......F P S 50 Tim eco de Ba s eTy 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 ..................F RAM E _ MI X Fr a m e Bl e n d i n g 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 ..........................FPS100 Tim eco de Ba s eTy p e....F P S 30 Tim eco de Ba s eTy p e.....MM 16 Tim eco de F il m Ty p e ..........................-.........Tim e co de Di s p l ay Ty p e ..... LU M A _ I N V E RT E D Tr a ck Ma t teTy p e .After Effects Object Summary 194 Tim eco de Ba s eTy p e.. AL P H A _ I N V E RT E D Tr a ck Mat teTy 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...-...MM 35 = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == = Tr a ck Mat teTy p e enu m ....-..- 194 ..........F P S 48 Tim eco de Ba s eTy 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 ...........F P S 24 Tim eco de Ba s eTy p e.-......