SCRIPTING GUIDE

© Copyright 2007 Adobe Systems Incorporated. All rights reserved.
Adobe
®
Creative Suite 3 After Effects
®
Scripting Guide
NOTICE: All information contained herein is the property of Adobe Systems Incorporated. No part of this publication (whether in hardcopy or
electronic form) may be reproduced or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or
otherwise, without the prior written consent of Adobe Systems Incorporated. The software described in this document is furnished under
license and may only be used or copied in accordance with the terms of such license.
This publication and the information herein is furnished AS IS, is subject to change without notice, and should not be construed as a
commitment by Adobe Systems Incorporated. Adobe Systems Incorporated assumes no responsibility or liability for any errors or
inaccuracies, makes no warranty of any kind (express, implied, or statutory) with respect to this publication, and expressly disclaims any and
all warranties of merchantability, fitness for particular purposes, and noninfringement of third party rights.
Any references to company names in sample templates are for demonstration purposes only and are not intended to refer to any actual
organization.
Adobe, the Adobe logo, After Effects, Photoshop, and Bridge are either registered trademarks or trademarks of Adobe Systems Incorporated
in the United States and/or other countries.
Apple, Mac, Macintosh, and Mac OS are trademarks of Apple Computer, Inc., registered in the United States and other countries. Microsoft,
and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and other countries. JavaScript
and all Java-related marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. UNIX is
a registered trademark of The Open Group.
All other trademarks are the property of their respective owners.
If this guide is distributed with software that includes an end user agreement, this guide, as well as the software described in it, is furnished
under license and may be used or copied only in accordance with the terms of such license. Except as permitted by any such license, no part
of this guide may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, recording,
or otherwise, without the prior written permission of Adobe Systems Incorporated. Please note that the content in this guide is protected
under copyright law even if it is not distributed with software that includes an end user license agreement.
The content of this guide is furnished for informational use only, is subject to change without notice, and should not be construed as a
commitment by Adobe Systems Incorporated. Adobe Systems Incorporated assumes no responsibility or liability for any errors or
inaccuracies that may appear in the informational content contained in this guide.
Adobe Systems Incorporated, 345 Park Avenue, San Jose, California 95110, USA.
3
Overview
The After Effects Scripting Guide demonstrates how to take procedural control of your After Effects projects via
scripting. This feature set is available in Adobe® After Effects® CS3 Professional Edition.
With the use of system-level scripting, you can streamline your render pipeline and avoid a lot of repetitive
pointing and clicking. If you have used expressions or other JavaScript-like techniques for animating, or
worked with system scripting in AppleScript or Visual Basic, you will recognize the power of application
scripting in After Effects. With some practice, and with sufficient experience using the JavaScript language, you
can take control of your graphics pipeline.
If you are new to scripting
After Effects is a visual tool with a graphical user interface; you are used to interacting with it via interface
elements such as menus, panels, and icons. For the most part, this is the most accessible way to work. Scripting
is designed for situations in which this methodology involves tedious repetition or painstaking searching and
sorting that could be automated. Scripting can be a shortcut around tedious tasks that would otherwise involve
repetitious pointing and clicking. It is also useful for leveraging the power of networked rendering in situations
where Watch Folder is less powerful (and less convenient to set up). See “Examples” on page 173 for examples
of what scripts can do.
If you are new to scripting, see Adobe Introduction to Scripting, which introduces basic scripting concepts and
describes different scripting languages that are available, including JavaScript. JavaScript and other scripting
languages are object-oriented, and this book also describes the basic concepts of object-oriented programming
and document object models.
Even if you have no inclination to learn the JavaScript language, you can still harness the power of scripting via
third-party solutions such as Rush Network Render Queue, a graphical user interface to set up distributed
renders from any computer on the network without having to set up on individual machines.
You can also leverage the contributions of scripting users who share scripts with other users. Larger studios
may have such users in-house, while other users can visit forums such as those found at
www. adobef orums. com.
About this guide
This guide is for users who manage a graphics pipeline (which may include other scriptable applications as
well) and who want to write scripts to add custom capabilities to After Effects.
This functionality is also offered via third-party network rendering management solutions. These products
feature software designed to help manage this process, so it is possible to take advantage of this functionality
without having to perform manual editing of scripts.
4
Overview Editing scripts
4
The heart of a scriptable application is the object model. When you use Adobe After Effects, you create
projects, compositions, and render-queue items along with all of the elements that they contain: footage,
images, solids, layers, masks, effects, and properties. Each of these items, in scripting terms, is an object. This
guide describes the JavaScript objects that have been defined for After Effects projects.
Much of what scripting can accomplish replicates what can be done via the After Effects user interface, so a
thorough knowledge of the application itself is also essential to understanding how to use this functionality.
The After Effects object model is composed of a project, items, compositions, layers, and render-queue items.
Each object has its own special attributes, and every object in an After Effects project has its own identity
(although not all are accessible to scripting). You should be familiar with the After Effects object model in
order to create scripts.
After Effects scripting is based on ECMAScript (or more specifically, the 3rd Edition of the ECMA-262
Standard). Further documentation on this standard can be found at www.ecma-international.org. To take full
advantage of what is possible with scripting you will also need an understanding of writing scripts at the
system level (for integration with AppleScript or the Terminal command line in Mac OS and command-line
scripts on Windows systems) and a background in how to work with JavaScript.
NOTE: JavaScript objects normally referred to as “properties” are consistently called “attributes” in this guide, to
avoid confusion with After Effects’ own definition of a property (an animatable value of an effect, mask, or
transform within an individual layer).
Expressions
Although both After Effects expressions and the After Effects scripting interface use JavaScript and can access
individual layer properties, they are entirely distinct entities. Expressions cannot access information from
scripts (such as variables and functions), although a script can be written to create or edit an expression.
Because both expressions and scripting use JavaScript, familiarity with either one is helpful in understanding
the other.
Motion math
Motion math is no longer included in After Effects; its functionality has been superseded by scripting and
expressions. All mathematical and logical operators common to ECMAScript are available in scripting.
For example, with expressions it is possible to simulate the physics of a bouncing ball by applying mathe-
matical rules to a “ball” layer. But using scripting, you can create a whole user interface that allows a bouncing
ball and shadow layer to be animated using criteria entered by the user.
Editing scripts
After Effects includes a JavaScript editor. To start it, choose File > Scripts > Open Script Editor. This script
editor and debugger, called the ExtendScript Toolkit, provides a convenient interface for creating and testing
your own scripts.
You can use any text editor to create, edit, and save scripts, but it is recommended that you choose an appli-
cation that does not automatically add header information when saving files and that saves with Unicode
(UTF-8) encoding.
• Windows applications that are useful for editing scripts include EM Editor or the built-in Notepad (be sure
to set Encoding within save options to UTF-8).
• Mac OS applications that are useful for editing scripts include BBEdit or the built-in OS X TextEdit (be sure
to set the Save type in Preferences to Unicode [UTF-8]).
5
Overview Activating full scripting features
5
The ExtendScript JSX format
After Effects supports ExtendScript, Adobe’s extended implementation of JavaScript. ExtendScript is used by
all Adobe applications that provide a scripting interface. In addition to implementing the JavaScript language
according to the ECMA 262 and E4X ECMA 357 specifications, ExtendScript provides certain additional
features and utilities:
ExtendScript Toolkit: For help in developing, debugging, and testing scripts, ExtendScript provides an inter-
active development and testing environment, the ExtendScript Toolkit. It also defines a global debugging
object, the dollar ($) object, and a reporting utility for ExtendScript elements, the ExtendScript Reflection
interface.
File and Folder Objects: Because path name syntax is very different in different operating systems, Adobe
ExtendScript defines Fi l e and Fol der objects to provide platform-independent access to the underlying file
system.
ScriptUI User Interface Module: The ExtendScript ScriptUI module provides the ability to create and interact
with user interface elements. ScriptUI provides an object model for windows and UI control elements that
you can use to create a user interface for your scripts.
Tools and Utilities: In addition, ExtendScript provides tools and features such as a localization utility for
providing user-interface string values in different languages and global functions for displaying short
messages in dialog boxes (al ert , conf i rm, and prompt ).
Interapplication Communication: ExtendScript provides a common scripting environment for all Adobe
applications, and allows interapplication communication through scripts.
External Communication: ExtendScript provides a Socket object that allows you to communicate with remote
systems from your After Effects scripts.
These features and more are described in detail in the JavaScript Tools Guide, which is available with After
Effects, and from partners.adobe.com.
ExtendScript script files are distinguished by the . j sx file extension, a variation on the standard . j s extension
used with standard JavaScript files. After Effects scripts must include the . j sx file extension in order to be
properly recognized by the application. Any UTF-8 encoded text file with the . j sx extension is recognized as
an ExtendScript file.
You can use the ExtendScript Toolkit to export a binary version of an ExtendScript file, which has the
extension . j sxbi n. Such a binary file may not be usable with all of the scripting integration features in After
Effects.
Activating full scripting features
For security reasons, the scripting features that operate outside the After Effects application (such as adding
and deleting files and folders on volumes, or accessing the network) are disabled by default.
To enable these features, choose Preferences > General, and select “Allow Scripts To Write Files And Access
Network.” This allows you to:
• Write to files
• Create folders and set the current folder
• Create a socket connection (for details of this JavaScript utility, see the JavaScript Tools Guide)
6
Overview Accessing and writing scripts
6
Adobe supplies a full-featured JavaScript debugger, called the ExtendScript Toolkit. The Toolkit is disabled by
default so that casual users do not encounter it. When editing or writing scripts, the Toolkit can help you
diagnose script problems more quickly. To activate the Toolkit on the local computer when a script error is
encountered, choose Preferences > General, and select Enable JavaScript Debugger. For detailed information
on the ExtendScript Toolkit, see the JavaScript Tools Guide.
Note that the Toolkit operates only when executing a script, not with expressions, even though expressions
also make use of JavaScript.
Accessing and writing scripts
To create and edit scripts for After Effects, you can use the ExtendScript Toolkit, or an external text-editing
application that creates files with Unicode UTF-8 text encoding. Beware of applications such as Microsoft
Word that by default add header information to files; these create line 0 errors in scripts, causing them to fail.
A script can reside anywhere, although to appear in the Scripts menu it must be saved in the Scripts folder
within the After Effects application folder.
There is no built-in method for recording a series of actions in After Effects into a script, as you can with
Adobe Photoshop® actions. Scripts are created outside After Effects and then executed within it, or externally
via a command-line, the ExtendScript Toolkit, or third-party render management software.
The Scripts menu and Scripts folder
After Effects scripts reside in the Scripts folder, within the same folder as your After Effects application file.
Only scripts contained in this Scripts folder when the application starts are automatically listed in the Scripts
menu, although a script file can reside anywhere.
To run a script that does not appear in the Scripts menu, choose File > Scripts > Run Script File, and choose
the script in the Open dialog box. Alternatively, you can send After Effects a script from the ExtendScript
Toolkit, from a command line (on Windows) or from AppleScript (on Mac OS).
To appear in the Open dialog box, your script must include the proper . j sx file extension.
Shutdown and Startup folders
Within the Scripts folder are two folders called Startup and Shutdown. After Effects runs scripts in these
folders automatically, in alphabetical order, on starting and quitting, respectively.
In the Startup folder you can place scripts that you wish to execute at startup of the application. They are
executed after the application is initialized and all plug-ins are loaded.
Scripting shares a global environment, so any script executed at startup can define variables and functions that
are available to all scripts. In all cases, variables and functions, once defined by running a script that contains
them, persist in subsequent scripts during a given After Effects session. Once the application is quit, all such
globally defined variables and functions are cleared. Be sure to give variables in scripts unique names, so that
a script does not inadvertently reassign global variables intended to persist throughout a session.
Attributes can also be added to existing objects such as the Application object (see “Application object” on
page 19) to extend the application for other scripts.
The Shutdown folder scripts are executed as the application quits. This occurs after the project is closed but
before any other application shutdown occurs.
7
Overview Sending a script to After Effects from the system
7
The Window menu and ScriptUI Panels folder
Within the Scripts folder, you can create another folder named ScriptUI Panels. Use this folder for scripts
whose user interface appears in a native panel (as opposed to a floating palette, dialog box, or window). The
advantage of a panel is that it can be docked with other panels, such as Project, Composition, and Time
Controls, and appear more integrated into the application. Like native panels, ScriptUI Panels scripts are
accessed from the Window menu.
Instead of creating a Window object an adding controls to it, a ScriptUI Panels script uses the "this" object that
represents the panel. For example, the following code adds a button to a panel:
var myPanel = t hi s;
myPanel . add("but t on", [10, 10, 100, 30], "Tool #1");
myPanel . show();
If your script creates its user interface in a function, you cannot use "this" as it will refer to the function itself,
not the panel. In this case, you should pass the "this" object as an argument to your function. For example:
f unct i on creat eUI (t hi sObj ) {
var myPanel = t hi sObj ;
myPanel . add("but t on", [10, 10, 100, 30], "Tool #1");
ret urn myPanel ;
}
var myTool sPanel = creat eUI(t hi s);
myTool sPanel . show();
You cannot use the File > Scripts > Run Script File menu command to run a script that refers to "this". To
make your script work with either a Window object (accessible from the File > Scripts menu) or a native panel
(accessible from the Window menu), check whether "this" is a Panel object. For example:
f unct i on creat eUI (t hi sObj ) {
var myPanel = (t hi sObj i nst anceof Panel ) ? t hi sObj : new Wi ndow("pal et t e", "My Tool s",
[100, 100, 300, 300]);
myPanel . add("but t on", [10, 10, 100, 30], "Tool #1");
ret urn myPanel ;
}
var myTool sPanel = creat eUI(t hi s);
myTool sPanel . show();
Sending a script to After Effects from the system
If you are familiar with how to run a script from the command line in Windows or via AppleScript, you can
send a script directly to the open After Effects application, so that the application automatically runs the script.
How to include After Effects scripting in a command line (Windows)
Following are examples of Windows command-line entries that will send an After Effects script to the appli-
cation without using the After Effects user interface to execute the script.
In the first example, you copy and paste your After Effects script directly on the command line and then run
it. The script text appears in quotation marks following the af t erf x. exe -s command:
af t erf x. exe -s "al ert ("You j ust sent an al ert t o Af t er Ef f ect s")"
8
Overview Testing and troubleshooting
8
Alternatively, you can specify the location of the JSX file to be executed. For example:
af t erf x. exe -r c: \ myDocument s\ Scri pt s\ yourAEScri pt Here. j sx
af t erf x. exe -r "c: \ myDocument s\ Scri pt s\ Scri pt Name wi t h Spaces. j sx"
How to include After Effects scripting in an AppleScript (Mac OS)
Following are three examples of AppleScript scripts that will send an existing JSX file containing an After
Effects script to the application without using the After Effects user interface to execute the script.
In the first example, you copy your After Effects script directly into the Script Editor and then run it. The script
text appears within quotation marks following the DoScript command, so internal quotes in the script must
be escaped using the backslash escape character, as follows:
t el l appl i cat i on "Adobe Af t er Ef f ect s CS3"
DoScri pt "al ert (\ "You j ust sent an al ert t o Af t er Ef f ect s\ ")"
end t el l
Alternatively, you could display a dialog box asking for the location of the JSX file to be executed, as follows:
set t heFi l e t o choose f i l e
t el l appl i cat i on "Adobe Af t er Ef f ect s CS3"
DoScri pt t heFi l e
end t el l
Finally, this script is perhaps most useful when you are working directly on editing a JSX script and want to
send it to After Effects for testing or to run. To use it effectively you must enter the application that contains
the open JSX file (in this example it is TextEdit); if you do not know the proper name of the application, type
in your best guess to replace “TextEdit” and AppleScript prompts you to locate it.
Simply highlight the script text that you want to run, and then activate this AppleScript:
(*
Thi s scri pt sends t he current sel ect i on t o Af t er Ef f ect s as a scri pt .
*)
t el l appl i cat i on "Text Edi t "
set t he_scri pt t o sel ect i on as t ext
end t el l
t el l appl i cat i on "Adobe Af t er Ef f ect s CS3"
act i vat e
DoScri pt t he_scri pt
end t el l
For more information on using AppleScript, check out Matt Neuberg’s AppleScript: the Definitive Guide
(O’Reilly & Associates) or Sal Soghoian’s AppleScript 1-2-3 (Peachpit Press).
Testing and troubleshooting
Any After Effects script that contains an error preventing it from being completed generates an error message
from the application. This error message includes information about the nature of the error and the line of
the script on which it occurred.
9
Overview More resources to learn scripting
9
Additionally, After Effects includes a JavaScript debugger. For more information on activating and using the
debugger, see the ExtendScript Toolkit documentation in the JavaScript Tools Guide.
More resources to learn scripting
Many resources exist for learning more about scripting that uses the ECMA standard.
The After Effects scripting engine supports 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-i nt ernat i onal . org/ publ i cat i ons/ st andards/ Ecma-262. ht m.
Books that deal with JavaScript 1.2 are also useful for understanding how scripting works in After Effects. One
book that is something of a standard for JavaScript users is JavaScript: The Definitive Guide (O’Reilly) by David
Flanagan. Another very readable source is JavaScript: A Beginner’s Guide (Osborne) by John Pollock. Both of
these texts contain information that pertains only to extensions of JavaScript for Internet browsers; however,
they also contain thorough descriptions of scripting fundamentals.
There are also books for using AppleScript and creating Windows command line scripts, each of which can be
used to send scripts to After Effects.
JavaScript variables
Scripting shares a global environment, so any script executed at startup can define variables and functions that
are available to all scripts. In all cases, variables and functions, once defined by running a script that contains
them, persist in subsequent scripts during a given After Effects session. Once the application is quit, all such
globally defined variables and functions are cleared. Scripters should be careful about giving variables in
scripts unique names, so that a script does not inadvertently reassign global variables intended to persist
throughout a session.
JavaScript keywords and statement syntax
Although it is not possible to provide an exhaustive resource describing usage of JavaScript, the following
tables provide an overview of keywords, statements, operators, precedence, and associativity.
The following table lists and describes all keywords and statements recognized by the After Effects scripting
engine.
Table 1 Keywords and Statement Syntax
Keyword/Statement Description
break Standard JavaScript; exit the currently executing loop.
cont i nue Standard JavaScript; cease execution of the current loop iteration.
case Label used in a swi t ch statement.
def aul t Label used in a swi t ch statement when a case label is not found.
do. . . whi l e Standard JavaScript construct. Similar to the whi l e loop, except loop condition evaluation occurs
at the end of the loop.
f al se Literal representing the boolean false value.
f or Standard JavaScript loop construct.
f or. . . i n Standard JavaScript construct. Provides a way to easily loop through the properties of an object.
10
Overview More resources to learn scripting
10
JavaScript operators
The following tables list and describe all operators recognized by the After Effects scripting engine and show
the precedence and associativity for all operators.
Table 2 Description of Operators
f unct i on Used to define a function.
i f / i f . . . el se Standard JavaScript conditional constructs.
new Standard JavaScript constructor statement.
nul l Assigned to a variable, array element, or object property to indicate that it does not contain a legal
value.
ret urn Standard JavaScript way of returning a value from a function or exiting a function.
swi t ch Standard JavaScript way of evaluating a JavaScript expression and attempting to match the expres-
sion’s value to a case label.
t hi s Standard JavaScript method of indicating the current object.
t rue Literal representing the boolean true value.
undef i ned Indicates that the variable, array element, or object property has not yet been assigned a value.
var Standard JavaScript syntax used to declare a local variable.
whi l e Standard JavaScript construct. Similar to the do. . . whi l e loop, except loop condition evaluation
occurs at the beginning of the loop.
wi t h Standard JavaScript construct used to specify an object to use in subsequent statements.
Operators Description
new Allocate object.
del et e Deallocate object.
t ypeof Returns data type.
voi d Returns undefined value.
. Structure member.
[] Array element.
() Function call.
++ Pre- or post-increment.
–– Pre- or post-decrement.
– Unary negation or subtraction.
~ Bitwise NOT.
! Logical NOT.
* Multiply.
/ Divide.
% Modulo division.
Keyword/Statement Description
11
Overview More resources to learn scripting
11
Table 3 Operator Precedence
+ Add.
<< Bitwise left shift.
>> Bitwise right shift.
>>> Unsigned bitwise right shift.
< Less than.
<= Less than or equal.
> Greater than.
>= Greater than or equal.
== Equal.
! = Not equal.
& Bitwise AND.
^ Bitwise XOR.
| Bitwise OR.
&& Logical AND.
| | Logical OR.
?: Conditional (ternary).
= Assignment.
+= Assignment with add operation.
–= Assignment with subtract operation.
*= Assignment with multiply operation.
/ = Assignment with divide operation.
%= Assignment with modulo division operation.
<<= Assignment with bitwise left shift operation.
>>= Assignment with bitwise right shift operation.
>>>= Assignment with unsigned bitwise right shift operation.
&= Assignment with bitwise AND operation.
^= Assignment with bitwise XOR operation.
| = Assignment with bitwise OR operation.
, Multiple evaluation.
Operators (highest precedence to lowest) Associativity
[], (), . left to right
new, del et e, – (unary negat i on), ! , t ypeof , voi d, ++, –– right to left
Operators Description
12
Overview More resources to learn scripting
12
*, / , % left to right
+, – (subt ract i on) left to right
<<, >>, >>> left to right
<, <=, >, >= left to right
==, ! = left to right
& left to right
^ left to right
| left to right
&& left to right
| | left to right
?: right to left
=, / =, %=, <<=, >>=, >>>=, &=, ^=, | =, +=, –=, *= right to left
, left to right
Operators (highest precedence to lowest) Associativity
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-i nt ernat i onal . org/ publ i cat i ons/ st andards/
Ecma- 262. ht m. For an overview of the most common keywords and statements available from ECMA-262,
see “JavaScript keywords and statement syntax” on page 9.
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 JavaS-
cript 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:
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 39 Represents those layers that contain AVItem objects (Comp layers, footage layers, solid
layers, text layers, and sound layers).
“CameraLayer object” on page 50 Represents a camera layer within a composition.
“Collection object” on page 51 Associates a set of objects or values as a logical group and provides access to them by
index.
“CompItem object” on page 52 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 60 Describes footage that comes from a file.
“FolderItem object” on page 62 Represents a folder in the Project panel.
“FootageItem object” on page 64 Represents a footage item imported into a project, which appears in the Project panel.
“FootageSource object” on page 67 Describes the file source of some footage.
“ImportOptions object” on page 73 Encapsulates options for importing files into After Effects.
“Item object” on page 76 Represents an item in a project that appears in the Project panel.
“ItemCollection object” on page 79 Collects items in a project.
“KeyframeEase object” on page 81 Encapsulates keyframe ease values in an After Effects property.
“Layer object” on page 83 A base class for layer classes.
“LayerCollection object” on page 92 Collects layers in a project.
“LightLayer object” on page 97 Represents a light layer within a composition.
“MarkerValue object” on page 98 Encapsulates marker values in an AE property.
“MaskPropertyGroup object” on
page 102
Encapsulates mask attributes in a layer.
“OMCollection object” on page 104 Collects output modules in a render queue.
“OutputModule object” on page 105 Represents an output module for a render queue.
“PlaceholderSource object” on page 108 Describes a placeholder for footage.
“Project object” on page 109 Represents an After Effects project.
“Property object” on page 118 Represents an After Effects property.
“PropertyBase object” on page 140 A base class for After Effects property and property group classes.
“PropertyGroup object” on page 147 Represents an After Effects property group.
“RenderQueue object” on page 152 Represents the After Effects render queue.
“RenderQueueItem object” on page 155 Represents a renderable item in a render queue.
“RenderQueueItem object” on page 155 Collects render-queue items in a render queue.
“RQItemCollection object” on page 161 Provides access to application settings and preferences.
“Shape object” on page 164 Encapsulates the outline shape information for a mask.
“ShapeLayer object” on page 167 Represents a shape layer within a composition.
“SolidSource object” on page 168 Describes a solid color that is the source of some footage.
“System object” on page 169 Provides access to the operating system from the application.
“TextDocument object” on page 171 Encapsulates the text in a text layer.
“TextLayer object” on page 172 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 ert , 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
current Format ToTi me(f ormat 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 111).
Parameters
Global function Description
cl earOut put () Clears text from the Info panel.
current Format ToTi me() Converts string time value to a numeric time value.
t i meToCurrent Format () Converts a numeric time value to a string time value.
wri t e() Writes text to the Info panel, with no line break added.
wri t eLn() Writes text to the Info panel, adding a line break at the end.
f ormat t edTi 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 meToCurrent Format (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 111).
Parameters
Returns
String in the project’s current time display format.
write() global function
wri t e(t ext )
Description
Writes output to the Info panel, with no line break added.
Parameters
Returns
Nothing.
Example
wri t e("Thi s t ext appears i n I nf o panel ");
wri 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.
t ext The string to display. Truncated if too long for the Info panel.
18
JavaScript Reference Global functions
18
writeLn() global function
wri t eLn(t ext )
Description
Writes output to the Info panel and adds a line break at the end.
Parameters
Returns
Nothing.
Example
wri t el n("Thi s t ext appears on f i rst l i ne");
wri t el n("Thi s t ext appears on second l i ne");
t ext 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 109
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 sWat chFol 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 161
Application settings that can be set via scripting.
onError “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 t erLaunchAndEval “Application exitAfterLaunchAndEval
attribute” on page 23
When true, the application remains open after running
a script from the command line on Windows.
saveProj ect OnCrash “Application saveProjectOnCrash
attribute” on page 28
When true, the project is saved if the application closes
unexpectedly.
memoryInUse “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 vat e()
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.
wat chFol der() “Application watchFolder() method” on
page 30
Starts Watch Folder mode; does not return
until Watch Folder mode is turned off.
pauseWat chFol der() “Application pauseWatchFolder() method”
on page 27
Pauses a current watch-folder process.
endWat chFol 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 MemoryUsageLi 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 vat e() “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.
parseSwat chFi 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 ri 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 ri 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 ert )
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 ert 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. endWat chFol 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 t erf x or af t erf 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 (EXI T_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 error 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.
Type
A Language enumerated value; read-only. One of:
25
JavaScript Reference Application object
25
Language. ENGLISH
Language. FRENCH
Language. GERMAN
Language. ITALIAN
Language. J APANESE
Language. SPANI SH
Example
var l ang = app. l anguage;
i f (l ang == Language. ENGLI SH)
al ert ("Af t er Ef f ect s i s runni ng i n Engl i sh. ");
el se i f (l ang == Language. FRENCH)
al ert ("Af t er Ef f ect s i s runni ng i n French. ");
el se
al ert ("Af t er Ef f ect s i s not runni ng i n Engl i sh or French. ");
Application memoryInUse attribute
app. memoryI nUse
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 111.
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 153.
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 err(errSt ri ng) {
al ert (errSt ri ng);
}
app. onError = err;
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_t est . 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 ert (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(pause)
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 Swat chVal ue.
Swat chVal ue. t ype One of "RGB", "CMYK", "LAB", "Gray"
Swat chVal ue. r
Swat chVal ue. g
Swat chVal ue. b
When t ype = "RGB", the color values in the range [0.0..1.0].
0, 0, 0 is Black.
Swat chVal ue. c
Swat chVal ue. m
Swat chVal ue. y
Swat chVal ue. k
When t ype = "CMYK", the color values in the range [0.0..1.0].
0, 0, 0, 0 is White.
Swat chVal ue. L
Swat chVal ue. a
Swat chVal 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.
Swat chVal 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 109.
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 ri 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 MemoryUsageLi mi t s(i mageCachePercent age, maxi mumMemoryPercent 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 Win32, 4 Gb for Win64, 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 ri 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 mumMemoryPercent 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 162.
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 ert ("Thi s machi ne i s runni ng versi on " + ver + " of Af t er Ef f ect s. ");
Application watchFolder() method
app. wat chFol 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: / t ool ”);
app. wat chFol der(t heFol der);
doSave When true, preferences saved on quit, when false they are not.
f ol der_obj ect _t o_wat ch 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 t em(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 76.
• 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 52 and
“FootageItem object” on page 64.
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 rameRat e “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.
usedI n “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 t em(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 durat 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 t em(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 65 and “FileSource missingFootagePath attribute”
on page 60.
Type
Boolean; read-only.
AVItem frameDuration attribute
app. proj ect . i t em(i ndex). f rameDurat i on
Description
Returns the length of a frame for this AVItem, in seconds. This is the reciprocal of f rameRat e. When set, the
reciprocal is automatically set as a new f rameRat e value.
This attribute returns the reciprocal of the f rameRat e, 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 ormFrameRat e of the mai nSource object. This sets both the f rameRat e and f rameDurat 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 t em(i ndex). f rameRat e
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 rameRat e of the composition, and is read/write.
• In a FootageItem, the value is linked to the f rameRat e of the mai nSource object, and is read-only. To change
it, set the conf ormFrameRat e of the mai nSource object. This sets both the f rameRat e and f rameDurat 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 t em(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 t em(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 t em(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 t em(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 t em(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 t em(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 t em(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 t em(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 t em(i ndex). set ProxyWi t hPl acehol der(name, wi dt h, hei 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 rameRat e 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 t em(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 t em(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 t em(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 meToCurrent 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 t em(i ndex). usedI n
Description
All the compositions that use this AVItem.
Note: 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 t em(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 t em(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.
Type
Integer in the range [1...30000]; read/write, except as noted.
39
JavaScript Reference AVLayer object
39
AVLayer object
app. proj ect . i t em(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 83.
• AVLayer is a base class for TextLayer, so AVLayer attributes and methods are available when working with
TextLayer objects. See “TextLayer object” on page 172.
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 Trackers
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
Mat eri 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 art Ti me, and i nPoi nt .
var f i rst Layer = app. proj ect . i t em(1). l ayer(1);
f i rst Layer. qual i t y = LayerQual i t y. BEST;
f i rst Layer. st art Ti me = 1;
40
JavaScript Reference AVLayer object
40
f i rst Layer. i nPoi nt = 2;
Attributes
Attribute Reference Description
source “AVLayer replaceSource() method” on
page 47
The source item for this layer.
i sNameFromSource “AVLayer isNameFromSource attribute”
on page 46
When true, the layer has no expressly set name,
but contains a named source.
hei ght “AVLayer height attribute” on page 46 The height of the layer.
wi dt h “AVLayer width attribute” on page 49 The width of the layer.
audi oEnabl ed “AVLayer audioEnabled attribute” on
page 42
When true, the layer's audio is enabled.
mot i onBl ur “AVLayer motionBlur attribute” on
page 46
When true, the layer's motion blur is enabled.
ef f ect sAct i ve “AVLayer effectsActive attribute” on
page 44
When true, the layer's effects are active.
adj ust ment Layer “AVLayer adjustmentLayer attribute” on
page 41
When true, this is an adjustment layer.
gui deLayer “AVLayer frameBlendingType attribute”
on page 45
When true, this is a guide layer.
t hreeDLayer “AVLayer threeDLayer attribute” on
page 48
When true, this is a 3D layer.
t hreeDPerChar “AVLayer threeDPerChar attribute” on
page 48
When true, 3D is set on a per-character basis in
this text layer.
canSet Col l apseTransf ormat i on “AVLayer calculateTransformFrom-
Points() method” on page 43
When true, it is legal to change the value of
col l apseTransf ormat i on.
col l apseTransf ormat i on “AVLayer collapseTransformation
attribute” on page 44
When true, collapse transformation is on.
f rameBl endi ng “AVLayer frameBlending attribute” on
page 45
When true, frame blending is enabled.
f rameBl endi ngType “AVLayer frameBlendingType attribute”
on page 45
The type of frame blending for the layer.
canSet Ti meRemapEnabl ed “AVLayer canSetTimeRemapEnabled
attribute” on page 44
When true, it is legal to change the value of
t i meRemapEnabl ed.
t i meRemapEnabl ed “AVLayer timeRemapEnabled attribute”
on page 48
When true, time remapping is enabled on this
layer.
hasAudi o “AVLayer hasAudio attribute” on
page 45
When true, the layer contains an audio compo-
nent.
audi oAct i ve “AVLayer audioActive attribute” on
page 41
When true, the layer's audio is active at the cur-
rent time.
bl endi ngMode “AVLayer blendingMode attribute” on
page 42
The blending mode of the layer.
preserveTransparency “AVLayer preserveTransparency
attribute” on page 47
When true, preserve transparency is enabled.
t rackMat t eType “AVLayer trackMatteType attribute” on
page 49
if layer has a track matte, specifies the way it is
applied.
41
JavaScript Reference AVLayer object
41
Methods
AVLayer adjustmentLayer attribute
app. proj ect . i t em(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 t em(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 t e “AVLayer isTrackMatte attribute” on
page 46
When true, this layer is being used as a track
matte for the layer below it.
hasTrackMat t e “AVLayer hasTrackMatte attribute” on
page 45
When true, the layer above is being used as a
track matte on this layer.
qual i t y “AVLayer quality attribute” on page 47 The layer quality setting.
aut oOri ent “AVLayer autoOrient attribute” on
page 42
The type of automatic orientation for the layer.
Method Reference Description
audi oAct i veAt Ti me() “AVLayer audioActiveAtTime() method”
on page 42
Reports whether this layer's audio is
active at a given time.
cal cul at eTransf ormFromPoi nt s() “AVLayer calculateTransformFrom-
Points() method” on page 43
Calculates a transformation from a set of
points in this layer.
repl aceSource() “AVLayer replaceSource() method” on
page 47
Changes the source item for this layer.
sourceRect At Ti me() “AVLayer sourceRectAtTime() method”
on page 48
Retrieves the source rectangle of a layer.
Attribute Reference Description
42
JavaScript Reference AVLayer object
42
AVLayer audioActiveAtTime() method
app. proj ect . i t em(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 t em(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 t em(i ndex). l ayer(i ndex). aut oOri ent
Description
The type of automatic orientation to perform for the layer.
Type
An Aut oOri ent Type enumerated value; read/write. One of:
Aut oOri ent Type. ALONG_PATH
Aut oOri ent Type. CAMERA_OR_POINT_OF_INTEREST
Aut oOri ent Type. NO_AUTO_ORI ENT
AVLayer blendingMode attribute
app. proj ect . i t em(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.
43
JavaScript Reference AVLayer object
43
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. CLASSIC_DIFFERENCE
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. DIFFERENCE
Bl endi ngMode. DI SSOLVE
Bl endi ngMode. EXCLUSION
Bl endi ngMode. HARD_LIGHT
Bl endi ngMode. HARD_MIX
Bl endi ngMode. HUE
Bl endi ngMode. LIGHTEN
Bl endi ngMode. LIGHTER_COLOR
Bl endi ngMode. LINEAR_BURN
Bl endi ngMode. LINEAR_DODGE
Bl endi ngMode. LINEAR_LI GHT
Bl endi ngMode. LUMINESCENT_PREMUL
Bl endi ngMode. LUMINOSITY
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. STENCIL_LUMA
Bl endi ngMode. VIVI D_LI GHT
AVLayer calculateTransformFromPoints() method
app. proj ect . i t em(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 t omRi ght The bottom right point coordinates in the form of an array, [x, y, z].
44
JavaScript Reference AVLayer object
44
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 ransf orm = newLayer. cal cul at eTransf ormFromPoi nt s(t l , t r, bl );
f or(var sel i n t ransf orm) {
newLayer. t ransf orm[sel ]. set Val ue(t ransf orm[sel ]);
}
AVLayer canSetCollapseTransformation attribute
app. proj ect . i t em(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 t em(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 t em(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 t em(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.
45
JavaScript Reference AVLayer object
45
Type
Boolean; read/write.
AVLayer frameBlending attribute
app. proj ect . i t em(i ndex). l ayer(i ndex). f rameBl endi ng
Description
True if frame blending is enabled for the layer.
Type
Boolean; read-only.
AVLayer frameBlendingType attribute
app. proj ect . i t em(i ndex). l ayer(i ndex). f rameBl 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:
FrameBl endi ngType. FRAME_MI X
FrameBl endi ngType. NO_FRAME_BLEND
FrameBl endi ngType. PI XEL_MOTI ON
AVLayer guideLayer attribute
app. proj ect . i t em(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 t em(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 t em(i ndex). l ayer(i ndex). hasTrackMat t e
46
JavaScript Reference AVLayer object
46
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 t em(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 t em(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 t em(i ndex)l ayer(i ndex). i sTrackMat 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 t em(i ndex). l ayer(i ndex). mot i onBl ur
Description
True if motion blur is enabled for the layer.
Type
Boolean; read/write.
47
JavaScript Reference AVLayer object
47
AVLayer preserveTransparency attribute
app. proj ect . i t em(i ndex). l ayer(i ndex). preserveTransparency
Description
True if preserve transparency is enabled for the layer.
Type
Boolean; read/write.
AVLayer quality attribute
app. proj ect . i t em(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. WI REFRAME
AVLayer replaceSource() method
app. proj ect . i t em(i ndex). l ayer(i ndex). repl aceSource (newSource, f i xExpres si ons )
Description
Replaces the source for this layer.
Parameters
Returns
Nothing.
AVLayer source attribute
app. proj ect . i t em(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 110.
48
JavaScript Reference AVLayer object
48
AVLayer sourceRectAtTime() method
app. proj ect . i t em(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, [t op, l ef t , wi dt h, hei ght ].
AVLayer threeDLayer attribute
app. proj ect . i t em(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 t em(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 t em(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.
49
JavaScript Reference AVLayer object
49
AVLayer trackMatteType attribute
app. proj ect . i t em(i ndex). l ayer(i ndex). t rackMat t eType
Description
If this layer has a track matte, specifies the way the track matte is applied.
Type
A TrackMat t eType enumerated value; read/write. One of:
TrackMat t eType. ALPHA
TrackMat t eType. ALPHA_INVERTED
TrackMat t eType. LUMA
TrackMat t eType. LUMA_INVERTED
TrackMat t eType. NO_TRACK_MATTE
AVLayer width attribute
app. proj ect . i t em(i ndex). l ayer(i ndex). wi dt h
Description
The width of the layer in pixels.
Type
Floating-point; read-only.
50
JavaScript Reference CameraLayer object
50
CameraLayer object
app. proj ect . i t em(i ndex). l ayer(i ndex)
Description
The CameraLayer object represents a camera layer within a composition. Create it using the LayerCollection
object’s addCamera method; see “LayerCollection addCamera() method” on page 93. 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 83.
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 Int erest
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
51
JavaScript Reference Collection object
51
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
It emCol l ect i on “ItemCollection object” on page 79 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 92
All of the layers in a composition.
OMCol l ect i on “OMCollection object” on page 104 All of the Output Module items in the project.
RQI t emCol l ect i on “RenderQueueItem object” on
page 155
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.
52
JavaScript Reference CompItem object
52
CompItem object
app. proj ect . i t em(i ndex)
app. proj ect . i t ems[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 t em 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 76.
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 t em(1);
al ert ("number of l ayers i s " + f i rst Comp. numLayers);
al ert ("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 55
The duration of a single frame.
workAreaSt art “CompItem workAreaStart attribute” on
page 59
The work area start time.
workAreaDurat i on “CompItem workAreaDuration
attribute” on page 58
The work area duration.
numLayers “CompItem numLayers attribute” on
page 56
The number of layers in the composition.
hi deShyLayers “CompItem hideShyLayers attribute” on
page 55
When true, shy layers are visible in the Timeline panel.
mot i onBl ur “CompItem motionBlur attribute” on
page 56
When true, motion blur is enabled for this composi-
tion.
draf t 3d “CompItem draft3d attribute” on
page 54
When true, Draft 3D mode is enabled for the Compo-
sition panel.
f rameBl endi ng “CompItem frameBlending attribute”
on page 54
When true, time filtering is enabled for this composi-
tion.
preserveNest edFrameRat e “CompItem preserveNestedFrameRate
attribute” on page 56
When true, the frame rate of nested compositions is
preserved.
preserveNest edResol ut i on “CompItem preserveNestedResolution
attribute” on page 57
When true, the resolution of nested compositions is
preserved.
bgCol or “CompItem bgColor attribute” on
page 53
The background color of the composition.
act i veCamera “CompItem activeCamera attribute” on
page 53
The current active camera layer.
di spl aySt art Ti me “CompItem displayStartTime attribute”
on page 54
Changes the display of the start time in the Timeline
panel.
53
JavaScript Reference CompItem object
53
Methods
CompItem activeCamera attribute
app. proj ect . i t em(i ndex). act i veCamera
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 t em(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 onFact or “CompItem resolutionFactor attribute”
on page 57
The factor by which the x and y resolution of the Com-
position panel is downsampled.
shut t erAngl e “CompItem shutterAngle attribute” on
page 58
The camera shutter angle.
shut t erPhase “CompItem shutterPhase attribute” on
page 58
The camera shutter phase.
l ayers “CompItem layers attribute” on page 56
“LayerCollection object” on page 92
The layers of the composition.
sel ect edLayers “CompItem selectedLayers attribute” on
page 58
The selected layers of the composition.
sel ect edPropert i es “CompItem selectedProperties
attribute” on page 58
The selected properties of the composition.
renderer “CompItem renderer attribute” on
page 57
The rendering plugin module to be used to render
this composition.
renderers “CompItem renderers attribute” on
page 57
The set of available rendering plugin modules.
Method Reference Description
dupl i cat e() “CompItem duplicate() method” on page 54 Creates and returns a duplicate of this composition.
l ayer() “CompItem layer() method” on page 55 Gets a layer from this composition.
Attribute Reference Description
54
JavaScript Reference CompItem object
54
CompItem displayStartTime attribute
app. proj ect . i t em(i ndex). di spl aySt art 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 t em(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 t em(i ndex). dupl i cat e()
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 t em(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.
55
JavaScript Reference CompItem object
55
CompItem frameDuration attribute
app. proj ect . i t em(i ndex). f rameDurat i on
Description
The duration of a frame, in seconds. This is the inverse of the f rameRat e value (frames-per-second).
Type
Floating-point; read/write.
CompItem hideShyLayers attribute
app. proj ect . i t em(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 t em(i ndex). l ayer(i ndex)
app. proj ect . i t em(i ndex). l ayer(ot herLayer, rel I ndex)
app. proj ect . i t em(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.
56
JavaScript Reference CompItem object
56
Returns
Layer object.
CompItem layers attribute
app. proj ect . i t em(i ndex). l ayers
Description
A LayerCollection object that contains all the Layer objects for layers in this composition. See “LayerCol-
lection object” on page 92.
Type
LayerCollection object; read-only.
CompItem motionBlur attribute
app. proj ect . i t em(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 t em(i ndex). numLayers
Description
The number of layers in the composition.
Type
Integer; read-only.
CompItem preserveNestedFrameRate attribute
app. proj ect . i t em(i ndex). preserveNest edFrameRat e
Description
When true, the frame rate of nested compositions is preserved in the current composition. Corresponds to the
value of the “Preserve frame rate when nested or in render queue” option in the Advanced tab of the Compo-
sition Settings dialog box.
Type
Boolean; read/write.
57
JavaScript Reference CompItem object
57
CompItem preserveNestedResolution attribute
app. proj ect . i t em(i ndex). preserveNest edResol 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 t em(i ndex). renderer
Description
The current rendering plugin 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 compI t em. renderers.
Type
String; read/write.
CompItem renderers attribute
app. proj ect . i t em(i ndex). renderers
Description
The available rendering plugin 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 t em(i ndex). resol ut i onFact or
Description
The x and y downsample resolution factors for rendering the composition.
The two values in the array specify how many pixels to skip when sampling; the first number controls
horizontal sampling, the second controls vertical sampling. Full resolution is [1,1], half resolution is [2,2], and
quarter resolution is [4,4]. The default is [1,1].
Type
Array of two integers in the range [1..99]; read/write.
58
JavaScript Reference CompItem object
58
CompItem selectedLayers attribute
app. proj ect . i t em(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 t em(i ndex). sel ect edPropert 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 t em(i ndex). shut t erAngl 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 t em(i ndex). shut t erPhase
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 t em(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.
59
JavaScript Reference CompItem object
59
Type
Floating-point; read/write.
CompItem workAreaStart attribute
app. proj ect . i t em(i ndex). workAreaSt art
Description
The time when the Composition work area begins, in seconds.
Type
Floating-point; read/write.
60
JavaScript Reference FileSource object
60
FileSource object
app. proj ect . i t em(i ndex). mai nSource
app. proj ect . i t em(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 67.
Attributes
Methods
FileSource file attribute
app. proj ect . i t em(i ndex). mai nSource. f i l e
app. proj ect . i t em(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 t em(i ndex). mai nSource. f i l e. mi ssi ngFoot agePat h
app. proj ect . i t em(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 60 The file that defines this asset.
mi ssi ngFoot agePat h “FileSource missingFootagePath attribute”
on page 60
The file that contains footage missing from this asset.
Method Reference Description
rel oad() “FileSource reload() method” on page 61 Reloads the asset from the file, if it is a mai nSource of
a FootageItem.
61
JavaScript Reference FileSource object
61
FileSource reload() method
app. proj ect . i t em(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.
62
JavaScript Reference FolderItem object
62
FolderItem object
app. proj ect . Fol derIt em
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 secondIt em = app. proj ect . i t em(2);
i f ( ! (secondI t em i nst anceof Fol derI t em) ) {
al ert ("probl em: second i t em i s not a f ol der");
} el se {
f or (i = 1; i <= secondIt em. numI t ems; i ++) {
al ert ("i t em number " + i + " wi t hi n t he f ol der i s named "
+ secondIt em. i t em(i ). name);
}
}
Attributes
Methods
FolderItem item() method
app. proj ect . i t em(i ndex). i t em
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 t ems “FolderItem items attribute” on page 63 The contents of this folder.
numIt ems “FolderItem numItems attribute” on page 63 The number of items contained in the folder.
Method Reference Description
i t em() “FolderItem item() method” on page 62 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.
63
JavaScript Reference FolderItem object
63
FolderItem items attribute
app. proj ect . i t em(i ndex). i t ems
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 t em(i ndex). numI t ems
Description
The number of items contained in the i t ems collection (f ol derI t 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.
64
JavaScript Reference FootageItem object
64
FootageItem object
app. proj ect . i t em(i ndex)
app. proj ect . i t ems[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 76.
Attributes
Methods
FootageItem file attribute
app. proj ect . i t em(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 ageI t 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 64 The footage source file.
mai nSource “FootageItem mainSource attribute” on page 65 All settings related to the footage item.
Method Reference Description
repl ace() “FootageItem replace() method” on
page 65
Replaces a footage file with another footage file.
repl aceWi t hPl acehol der() “FootageItem replaceWithPlace-
holder() method” on page 65
Replaces a footage file with a placeholder object.
repl aceWi t hSequence() “FootageItem replaceWithSequence()
method” on page 66
Replaces a footage file with an image sequence.
repl aceWi t hSol i d() “FootageItem replaceWithSolid()
method” on page 66
Replaces a footage file with a solid.
65
JavaScript Reference FootageItem object
65
FootageItem mainSource attribute
app. proj ect . i t em(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 67, and its three types:
• “SolidSource object” on page 168
• “FileSource object” on page 60
• “PlaceholderSource object” on page 108
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 60.
Type
FootageSource object; read-only.
FootageItem replace() method
app. proj ect . i t em(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 t em(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].
66
JavaScript Reference FootageItem object
66
FootageItem replaceWithSequence() method
app. proj ect . i t em(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 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 replaceWithSolid() method
app. proj ect . i t em(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 rameRat e 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].
67
JavaScript Reference FootageSource object
67
FootageSource object
app. proj ect . i t em(i ndex). mai nSource
app. proj ect . i t em(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 64 and “CompItem object” on page 52.
• FootageSource is the base class for SolidSource, so FootageSource attributes and methods are available
when working with SolidSource objects. See “SolidSource object” on page 168.
Attributes
Methods
Attribute Reference Description
hasAl pha “FootageSource hasAlpha attribute” on
page 70
When true, a footage clip or proxy includes an
alpha channel.
al phaMode “FootageSource alphaMode attribute”
on page 68
The mode of an alpha channel.
premul Col or “FootageSource premulColor attribute”
on page 71
The color to be premultiplied.
i nvert Al pha “FootageSource invertAlpha attribute”
on page 70
When true, an alpha channel in a footage clip or
proxy should be inverted.
i sSt i l l “FootageSource isStill attribute” on
page 70
When true, footage is a still image.
f i el dSeparat i onType “FootageSource fieldSeparationType
attribute” on page 69
The field separation type.
hi ghQual i t yFi el dSeparat i on “FootageSource highQualityFieldSepa-
ration attribute” on page 70
How the fields are to be separated in non-still foot-
age.
removePul l down “FootageSource removePulldown
attribute” on page 71
The pulldown type for the footage.
l oop “FootageSource loop attribute” on
page 71
How many times an image sequence is set to loop.
nat i veFrameRat e “FootageSource nativeFrameRate
attribute” on page 71
The native frame rate of the footage.
di spl ayFrameRat e “FootageSource displayFrameRate
attribute” on page 68
The effective frame rate as displayed and rendered
in compositions by After Effects.
conf ormFrameRat e “FootageSource conformFrameRate
attribute” on page 68
The rate to which footage should conform.
Method Reference Description
guessAl phaMode() “FootageSource guessAlphaMode()
method” on page 69
Estimates the al phaMode setting.
guessPul l down() “FootageSource guessPulldown()
method” on page 69
Estimates the pul l downType setting.
68
JavaScript Reference FootageSource object
68
FootageSource alphaMode attribute
app. proj ect . i t em(i ndex). mai nSource. al phaMode
app. proj ect . i t em(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. STRAIGHT
Al phaMode. PREMULTIPLIED
FootageSource conformFrameRate attribute
app. proj ect . i t em(i ndex). mai nSource. conf ormFrameRat e
app. proj ect . i t em(i ndex). proxySource. conf ormFrameRat e
Description
A frame rate to use instead of the nat i veFrameRat e value. If set to 0, the nat i veFrameRat e 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 veFrameRat e.
Type
Floating-point value in the range [0.0.. 99.0]; read/write.
FootageSource displayFrameRate attribute
app. proj ect . i t em(i ndex). mai nSource. di spl ayFrameRat e
app. proj ect . i t em(i ndex). proxySource. di spl ayFrameRat e
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 ormFrameRat e (if non-zero) or
the nat i veFrameRat e (if conf ormFrameRat e is 0). If removePul l down is not Pul l downPhase. OFF, this is
conf ormFrameRat e * 0.8, the effective frame rate after removing 1 of every 5 frames.
Type
Floating-point value in the range [0.0.. 99.0]; read-only.
69
JavaScript Reference FootageSource object
69
FootageSource fieldSeparationType attribute
app. proj ect . i t em(i ndex). mai nSource. f i el dSeparat i onType
app. proj ect . i t em(i ndex). proxySource. f i el dSeparat 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 dSeparat i onType. OFF
Fi el dSeparat i onType. UPPER_FI ELD_FI RST
Fi el dSeparat i onType. LOWER_FI ELD_FI RST
FootageSource guessAlphaMode() method
app. proj ect . i t em(i ndex). mai nSource. guessAl phaMode()
app. proj ect . i t em(i ndex). proxySource. guessAl phaMode()
Description
Sets al phaMode, premul Col or, and i nvert 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 t em(i ndex). mai nSource. guessPul l down(met hod)
app. proj ect . i t em(i ndex). proxySource. guessPul l down(met hod)
Description
Sets f i el dSeparat 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
70
JavaScript Reference FootageSource object
70
FootageSource hasAlpha attribute
app. proj ect . i t em(i ndex). mai nSource. hasAl pha
app. proj ect . i t em(i ndex). proxySource. hasAl pha
Description
When true, the footage has an alpha component. In this case, the attributes al phaMode, i nvert 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 t em(i ndex). mai nSource. hi ghQual i t yFi el dSeparat i on
app. proj ect . i t em(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 dSeparat i onType is Fi el dSeparat i onType. OFF.
Type
Boolean; read/write.
FootageSource invertAlpha attribute
app. proj ect . i t em(i ndex). mai nSource. i nvert Al pha
app. proj ect . i t em(i ndex). proxySource. i nvert 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 t em(i ndex). mai nSource. i sSt i l l
app. proj ect . i t em(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.
71
JavaScript Reference FootageSource object
71
FootageSource loop attribute
app. proj ect . i t em(i ndex). mai nSource. l oop
app. proj ect . i t em(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 t em(i ndex). mai nSource. nat i veFrameRat e
app. proj ect . i t em(i ndex). proxySource. nat i veFrameRat e
Description
The native frame rate of the footage.
Type
Floating-point; read/write.
FootageSource premulColor attribute
app. proj ect . i t em(i ndex). mai nSource. premul Col or
app. proj ect . i t em(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 t em(i ndex). mai nSource. removePul l down
app. proj ect . i t em(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 dSeparat 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
72
JavaScript Reference FootageSource object
72
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
73
JavaScript Reference ImportOptions object
73
ImportOptions object
new I mport Opt i ons();
new I mport Opt i ons(f i l e);
Description
The ImportOptions object encapsulates the options used to import a file with the Proj ect . i mport Fi l e
methods. See “Project importFile() method” on page 112.
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 mport Fi l e method. For
example:
new I mport Opt i ons(). f i l e = new Fi l e("myf i l e. psd");
Attributes
Methods
ImportOptions canImportAs() method
i mport Opt i ons . canImport 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 mport As attribute. See “ImportOptions importAs attribute” on
page 74.
Parameters
Attributes Reference Description
i mport As “ImportOptions importAs attribute” on
page 74
The type of file to be imported.
sequence “ImportOptions sequence attribute” on
page 75
When true, import a sequence of files, rather than an individ-
ual file.
f orceAl phabet i cal “ImportOptions forceAlphabetical
attribute” on page 74
When true, the “Force alphabetical order” option is set.
f i l e “ImportOptions file attribute” on
page 74
The file to import, or the first file of the sequence to import.
Method Reference Description
canImport As() “ImportOptions canImportAs() method”
on page 73
Restricts input to a particular file type.
t ype
The type of file that can be imported. An Import AsType enumerated value; one of:
Import AsType. COMP
Import AsType. FOOTAGE
I mport AsType. COMP_CROPPED_LAYERS
Import AsType. PROJ ECT
74
JavaScript Reference ImportOptions object
74
Returns
Boolean.
Example
var i o = new I mport Opt i ons(Fi l e(“c: \ \ myFi l e. psd”));
i f i o. canImport As(Import AsType. COMP);
i o. i mport As = I mport AsType. COMP;
ImportOptions file attribute
i mport 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 mport 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 mport Opt i ons . i mport As
Description
The type of object for which the imported file is to be the source. Before setting, use canImport As to check
that a given file can be imported as the source of the given object type. See “ImportOptions canImportAs()
method” on page 73.
Type
An Import AsType enumerated value; read/write. One of:
I mport AsType. COMP_CROPPED_LAYERS
I mport AsType. FOOTAGE
I mport AsType. COMP
I mport AsType. PROJ ECT
75
JavaScript Reference ImportOptions object
75
ImportOptions sequence attribute
i mport Opt i ons . sequence
Description
When true, a sequence is imported; otherwise, an individual file is imported.
Type
Boolean; read/write.
76
JavaScript Reference Item object
76
Item object
app. proj ect . i t em(i ndex)
app. proj ect . i t ems[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 62.
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 t em(2);
i f (myFol der. t ypeName ! = "Fol der") {
al ert ("error: second i t em i s not a f ol der");
}
el se {
var numInFol der = myFol der. numI t ems;
/ / Al ways run l oops backwards when del et i ng t hi ngs:
f or(i = numInFol der; i >= 1; i --) {
var curI t em = myFol der. i t em(i );
i f ( curIt em. parent Fol der ! = myFol der) {
al ert ("errorwi t hi n AE: t he parent Fol der i s not set correct l y");
}
el se {
i f ( ! curIt em. sel ect ed && curI t em. t ypeName == "Foot age") {
/ / Aha! an unsel ect ed sol i d.
curIt em. remove();
Attributes Reference Description
name “Item name attribute” on page 77 The name of the object as shown in the Project panel.
comment “Item comment attribute” on page 77 A descriptive string.
i d “Item id attribute” on page 77 A unique identifier for this item.
parent Fol der “Item parentFolder attribute” on page 77 The parent folder of this item.
sel ect ed “Item selected attribute” on page 78 When true, this item is currently selected.
t ypeName “Item typeName attribute” on page 78 The type of item.
Method Reference Description
remove() “Item remove() method” on page 78 Deletes the item from the project.
77
JavaScript Reference Item object
77
}
}
}
}
Item comment attribute
app. proj ect . i t em(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 t em(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 t em(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 t em(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 79.
78
JavaScript Reference Item object
78
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 derIt em 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 t o “comps” f ol der
f or(var i = 1; i <= app. proj ect . numIt ems; i ++) {
i f (app. proj ect . i t em(i ) i nst anceof CompIt em)
app. proj ect . i t em(i ). parent Fol der = compFol der;
}
Item remove() method
app. proj ect . i t em(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 t em(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 t em(i ndex). t ypeName
Description
A user-readable name for the item type; for example, “Folder”, “Footage”, or “Composition”.
Type
String; read-only.
79
JavaScript Reference ItemCollection object
79
ItemCollection object
app. proj ect . i t ems
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 51.
Methods
ItemCollection addComp() method
app. proj ect . i t emCol 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 t emCol 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 79
Creates a new CompItem object and adds it to the collection.
addFol der() “ItemCollection addFolder() method” on
page 79
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 rameRat e The frame rate of the composition, a floating-point value in the range [1.0..99.0]
80
JavaScript Reference ItemCollection object
80
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 derI t em.
To put items in the folder, set the item object’s parent Fol der attribute; see “Item parentFolder attribute” on
page 77.
Parameters
Returns
FolderItem object.
Example
This script creates a new FolderItem in the Project panel and moves compositions into it.
/ / creat e a new Fol derIt em 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 t o “comps” f ol der
f or(var i = 1; i <= app. proj ect . numIt ems; i ++) {
i f (app. proj ect . i t em(i ) i nst anceof CompIt em)
app. proj ect . i t em(i ). parent Fol der = compFol der;
}
name A string containing the name of the folder.
81
JavaScript Reference KeyframeEase object
81
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. There are two types
of ease, temporal and spatial, which are determined by the speed and influence settings. Both types are set
using the property’s set Temporal EaseAt Key method. See “Property setTemporalEaseAtKey() method” on
page 136.
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 rameEase(0. 5, 50);
var easeOut = new Keyf rameEase(0. 75, 85);
var myPosi t i onPropert y = app. proj ect . i t em(1). l ayer(1). propert y("Posi t i on")
myPosi t i onPropert y. set Temporal EaseAt Key(2, [easeIn], [easeOut ]);
This example sets the Scale, a temporal property with two dimensions. For 2D and 3D properties you must
set an easeI n and easeOut value for each dimension:
var easeIn = new Keyf rameEase(0. 5, 50);
var easeOut = new Keyf rameEase(0. 75, 85);
var myScal ePropert y = app. proj ect . i t em(1). l ayer(1). propert y("Scal e")
myScal ePropert y. set Temporal EaseAt Key(2, [easeIn, easeIn, easeIn], [easeOut , easeOut , easeOut ]);
Attributes
KeyframeEase influence attribute
myKey. 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 82 The speed setting for a keyframe.
i nf l uence “KeyframeEase influence attribute” on page 81 The influence setting for a keyframe.
82
JavaScript Reference KeyframeEase object
82
KeyframeEase speed attribute
myKey. 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.
83
JavaScript Reference Layer object
83
Layer object
app. proj ect . i t em(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 39,
“CameraLayer object” on page 50, “LightLayer object” on page 97, and “TextLayer object” on page 172.
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 140.
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 t em(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 87 The index position of the layer.
name “Layer name attribute” on page 89 The name of the layer.
parent “Layer parent attribute” on page 89 The parent of this layer.
t i me “Layer time attribute” on page 91 The current time of the layer.
st art Ti me “Layer startTime attribute” on page 91 The start time of the layer.
st ret ch “Layer stretch attribute” on page 91 The time stretch percentage of the layer.
i nPoi nt “Layer inPoint attribute” on page 87 The “in” point of the layer.
out Poi nt “Layer outPoint attribute” on page 89 The “out” point of the layer.
enabl ed “Layer enabled attribute” on page 86 When true, the layer is enabled.
sol o “Layer solo attribute” on page 91 When true, the layer is soloed.
shy “Layer shy attribute” on page 90 When true, the layer is shy.
l ocked “Layer locked attribute” on page 87 When true, the layer is locked.
hasVi deo “Layer hasVideo attribute” on page 86 When true, the layer contains a video component.
act i ve “Layer active attribute” on page 84 When true, the layer is active at the current time.
nul l Layer “Layer nullLayer attribute” on page 89 When true, this is a null layer.
sel ect edPropert i es “Layer selectedProperties attribute” on page 90 All selected AE properties in the layer.
comment “Layer comment attribute” on page 85 A descriptive comment for the layer.
cont ai ni ngComp “Layer containingComp attribute” on page 85 The composition that contains this layer.
84
JavaScript Reference Layer object
84
Methods
Layer active attribute
app. proj ect . i t em(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 t em(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 87 When true, the layer’s name has been explicitly set.
Method Reference Description
remove() “Layer remove() method” on page 90 Deletes the layer from the composition.
moveToBegi nni ng() “Layer moveToBeginning() method” on
page 88
Moves the layer to the top of the composition (makes it the
first layer).
moveToEnd() “Layer moveToEnd() method” on
page 88
Moves the layer to the bottom of the composition (makes it
the last layer).
moveAf t er() “Layer moveAfter() method” on page 87 Moves the layer below another layer.
moveBef ore() “Layer moveBefore() method” on
page 88
Moves the layer above another layer.
dupl i cat e() “Layer duplicate() method” on page 86 Duplicates the layer.
copyToComp() “Layer copyToComp() method” on
page 86
Copies the layer to the top (beginning) of another compo-
sition.
act i veAt Ti me() “Layer activeAtTime() method” on
page 84
Reports whether this layer will be active at a specified time.
set Parent Wi t hJump() “Layer setParentWithJump() method”
on page 90
Sets a new parent for this layer.
appl yPreset s() “Layer applyPreset() method” on
page 85
Applies a named collection of animation settings to the
layer.
Attribute Reference Description
85
JavaScript Reference Layer object
85
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 t em(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 t em(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.
86
JavaScript Reference Layer object
86
Layer copyToComp() method
app. proj ect . i t em(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 t em(i ndex). l ayer(i ndex). dupl i cat e()
Description
Duplicates the layer. Creates a new Layer object in which all values are the same as in this one. This has the
same effect as selecting a layer in the user interface and choosing Edit > Duplicate, except the selection in the
user interface does not change when you call this method.
Parameters
None.
Returns
Layer object.
Layer enabled attribute
app. proj ect . i t em(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 t em(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 nt oComp The target composition, and CompItem object.
87
JavaScript Reference Layer object
87
Type
Boolean; read-only.
Layer index attribute
app. proj ect . i t em(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 t em(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 t em(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 t em(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 t em(i ndex). l ayer(i ndex). moveAf t er(l ayer)
Description
Moves this layer to a position immediately after (below) the specified layer.
88
JavaScript Reference Layer object
88
Parameters
Returns
Nothing.
Layer moveBefore() method
app. proj ect . i t em(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 t em(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 t em(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.
89
JavaScript Reference Layer object
89
Layer name attribute
app. proj ect . i t em(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 t em(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 t em(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 t em(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.
90
JavaScript Reference Layer object
90
Layer remove() method
app. proj ect . i t em(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 t em(i ndex). l ayer(i ndex). sel ect edPropert 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 t em(i ndex). l ayer(i ndex). set Parent Wi t hJ ump(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 t em(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.
91
JavaScript Reference Layer object
91
Type
Boolean; read/write.
Layer solo attribute
app. proj ect . i t em(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 t em(i ndex). l ayer(i ndex). st art 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 t em(i ndex). l ayer(i ndex). st ret ch
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 t em(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.
92
JavaScript Reference LayerCollection object
92
LayerCollection object
app. proj ect . i t em(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 51.
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 t em(1);
var l ayerCol l ect i on = f i rst Comp. l ayers;
al ert ("number of l ayers bef ore i s " + l ayerCol l ect i on. l engt h);
var anAVI t em = app. proj ect . i t em(2);
l ayerCol l ect i on. add(anAVI t em);
al ert ("number of l ayers af t er i s " + l ayerCol l ect i on. l engt h);
Methods
Method Reference Description
add() “LayerCollection add() method” on
page 93
Creates a new AVLayer and adds it to this collection.
addNul l () “LayerCollection addNull() method” on
page 94
Creates a new, null layer and adds it to this collection.
addSol i d() “LayerCollection addSolid() method” on
page 94
Creates a new layer, a FootageItem with a SolidSource, and adds it
to this collection.
addText () “LayerCollection addText() method” on
page 95
Creates a new text layer and adds it to this collection.
addCamera() “LayerCollection addCamera() method”
on page 93
Creates a new camera layer and adds it to this collection.
addLi ght () “LayerCollection addLight() method” on
page 93
Creates a new light layer and adds it to this collection.
addShape() “LayerCollection addShape() method”
on page 94
Creates a new shape layer and adds it to this collection.
byName() “LayerCollection byName() method” on
page 95
Retrieves the layer object with a specified name.
precompose() “LayerCollection precompose()
method” on page 96
Collects specified layers into a new composition.
93
JavaScript Reference LayerCollection object
93
LayerCollection add() method
app. proj ect . i t em(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 t em(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 t em(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 t em 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.
cent erPoi 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.
cent erPoi nt The center of the new light, a floating-point array [x, y].
94
JavaScript Reference LayerCollection object
94
Returns
LightLayer object.
LayerCollection addNull() method
app. proj ect . i t em(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 t em(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 t em(i ndex). l ayers. addSol i d(col or, name, wi dt h, hei 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].
95
JavaScript Reference LayerCollection object
95
Returns
AVLayer object.
LayerCollection addText() method
app. proj ect . i t em(i ndex). l ayers. addText (s ourceText )
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 t em(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 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.
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 171.
name A string containing the name.
96
JavaScript Reference LayerCollection object
96
LayerCollection precompose() method
app. proj ect . i t em(i ndex). l ayers. precompose(l ayerI ndi ci es , name, moveAl l At t ri 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 ayerI ndi 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 ri but es 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 ayerI ndi ces array.
This is the same as selecting the “Leave all attributes in” option in the Pre-com-
pose dialog box.
97
JavaScript Reference LightLayer object
97
LightLayer object
app. proj ect . i t em(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 93. 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 83.
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 Int erest
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
I nt ensi t y
Col or
Cone Angl e
Cone Feat her
Cast s Shadows
Shadow Darkness
Shadow Di f f usi on
98
JavaScript Reference MarkerValue object
98
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 Paramet er() and set Paramet er() 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 . propert y("Marker"). set Val ueAt Ti me(t i me, markerVal 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. propert 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). propert y("Marker"). keyVal ue(1). comment ;
var comment Of MarkerAt Ti me4 =
app. proj ect . i t em(1). l ayer(1). propert y("Marker"). val ueAt Ti me(4. 0, t rue). comment
Attribute Reference Description
comment “MarkerValue comment attribute” on
page 99
A comment on the associated layer.
chapt er “MarkerValue chapter attribute” on
page 99
A chapter link reference point for the associated layer.
cuePoi nt Name “MarkerValue cuePointName attribute”
on page 99
The Flash Video cue point name.
event CuePoi nt “MarkerValue eventCuePoint attribute”
on page 99
Whether the Flash Video cue point is for an event or navigation.
url “MarkerValue getParameters() method”
on page 100
A URL for Web page to be associated with the layer.
f rameTarget “MarkerValue eventCuePoint attribute”
on page 99
A specific frame target within the Web page specified by url .
Method Reference Description
get Paramet ers() “MarkerValue getParameters() method”
on page 100
Retrieves the key-value pairs associated with the marker value.
set Paramet ers() “MarkerValue setParameters() method”
on page 100
Sets the key-value pairs associated with the marker value.
99
JavaScript Reference MarkerValue object
99
var markerPropert y = app. proj ect . i t em(1). l ayer(1). propert y("Marker");
var markerVal ueAt Ti meCl osest ToTi me4 =
markerPropert y. keyVal ue(markerPropert 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 t em(i ndex). l ayer(i ndex). propert y("Marker"). keyVal ue(i ndex). chapt er
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 t em(i ndex). l ayer(i ndex). propert 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 t em(i ndex). l ayer(i ndex). propert 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 t em(i ndex). l ayer(i ndex). propert 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.
100
JavaScript Reference MarkerValue object
100
MarkerValue frameTarget attribute
app. proj ect . i t em(i ndex). l ayer(i ndex). propert 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 t em(i ndex). l ayer(i ndex). propert 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 t em(i ndex). l ayer(i ndex). propert y("Marker"). keyVal ue( i ndex). set Paramet ers(keyVal 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 ri ng"
mv. set Paramet ers(parms);
keyVal uePai rs An object containing the key-value pairs as attributes and values. The object’s t oSt ri ng()
method is called to assign the string value of each attribute to the named key.
101
JavaScript Reference MarkerValue object
101
myLayer. propert y("Marker"). set Val ueAt Ti me(2, mv);
MarkerValue url attribute
app. proj ect . i t em(i ndex). l ayer(i ndex). propert 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.
102
JavaScript Reference MaskPropertyGroup object
102
MaskPropertyGroup object
app. proj ect . i t em(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 140 and “PropertyGroup object” on page 147.
Attributes
MaskPropertyGroup color attribute
app. proj ect . i t em(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 t em(i ndex). l ayer(i ndex). mask(i ndex). i nvert ed
Description
When true, the mask is inverted; otherwise false.
Type
Boolean; read/write.
Attribute Reference Description
maskMode “MaskPropertyGroup maskMode attribute”
on page 103
The mask mode.
i nvert ed “MaskPropertyGroup inverted attribute” on
page 102
When true, the mask is inverted.
rot oBezi er “MaskPropertyGroup rotoBezier attribute”
on page 103
When true, the shape of the mask is RotoBezier.
maskMot i onBl ur “MaskPropertyGroup maskMotionBlur
attribute” on page 103
How motion blur is applied to this mask.
l ocked “MaskPropertyGroup locked attribute” on
page 103
When true, the mask is locked.
col or “MaskPropertyGroup color attribute” on
page 102
The color used to draw the mask outline in the user
interface.
103
JavaScript Reference MaskPropertyGroup object
103
MaskPropertyGroup locked attribute
app. proj ect . i t em(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 t em(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. DI FFERENCE
MaskPropertyGroup maskMotionBlur attribute
app. proj ect . i t em(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 t em(i ndex). l ayer(i ndex). mas k(i ndex). rot oBezi er
Description
When true, the mask is a RotoBezier shape; otherwise, false.
Type
Boolean; read/write.
104
JavaScript Reference OMCollection object
104
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 105
• OMCollection is a subclass of Collection. All methods and attributes of Collection are available when
working with OMCollection. See “Collection object” on page 51.
105
JavaScript Reference OutputModule object
105
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 105
The path and name of the file to be rendered.
post RenderAct i on “OutputModule postRenderAction
attribute” on page 106
An action to be taken after rendering.
name “OutputModule name attribute” on
page 106
The user-interface name of the output module.
t empl at es “OutputModule templates attribute” on
page 107
All templates for the output module.
Method Reference Description
remove() “OutputModule remove() method” on
page 106
Removes this output module from the render-queue item’s list.
saveAsTempl at e() “OutputModule saveAsTemplate()
method” on page 106
Saves a new output-module template.
appl yTempl at e() “OutputModule applyTemplate()
method” on page 105
Applies an output-module template.
t empl at eName A string containing the name of the template to be applied.
106
JavaScript Reference OutputModule object
106
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 at es array.
107
JavaScript Reference OutputModule object
107
Parameters
Returns
Nothing.
OutputModule templates attribute
app. proj ect . renderQueue. i t em(i ndex). out put Modul es[i ndex]. t empl at es
Description
The names of all output-module templates availalbe in the local installation of After Effects.
Type
Array of strings; read-only.
name A string containing the name of the new template.
108
JavaScript Reference PlaceholderSource object
108
PlaceholderSource object
app. proj ect . i t em(i ndex). mai nSource
app. proj ect . i t em(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 67. PlaceholderSource does not
define any additional methods or attributes.
109
JavaScript Reference Project object
109
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 112 The file for the currently open project.
root Fol der “Project rootFolder attribute” on
page 115
The folder containing all the contents of the
project; the equivalent of the Project panel
i t ems “Project items attribute” on page 113 All items in the project.
act i veIt em “Project activeItem attribute” on
page 110
The currently active item.
bi t sPerChannel “Project bitsPerChannel attribute” on
page 111
The color depth of the current project.
t ransparencyGri dThumbnai l s “Project transparencyGridThumbnails
attribute” on page 117
When true, thumbnail views use the transpar-
ency checkerboard pattern.
t i mecodeDi spl ayType “Project timecodeDisplayType
attribute” on page 116
The way the timecode is displayed.
t i mecodeBaseType “Project timecodeBaseType attribute”
on page 116
The timecode base project setting.
t i mecodeNTSCDropFrame “Project timecodeNTSCDropFrame
attribute” on page 117
The drop-frame project setting.
t i mecodeFi l mType “Project timecodeFilmType attribute”
on page 117
The film type for the “Feet + Frames” project set-
ting.
numIt ems “Project numItems attribute” on
page 114
The total number of items contained in the
project.
sel ect i on “Project selection attribute” on
page 116
All items selected in the Project panel.
renderQueue “Project renderQueue attribute” on
page 115
The project’s render queue.
di spl aySt art Frame “Project displayStartFrame attribute” on
page 111
The frame at which to start numbering when dis-
playing the project.
l i nearBl endi ng “Project linearBlending attribute” on
page 113
When true, linear blending is used for the project.
Method Reference Description
i t em() “Project item() method” on page 113 Retrieves an item from the project.
consol i dat eFoot age() “Project consolidateFootage() method”
on page 111
Consolidates all footage in the project.
110
JavaScript Reference Project object
110
Project activeItem attribute
app. proj ect . act i veI t em
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 114
Removes unused footage from the project.
reduceProj ect () “Project reduceProject() method” on
page 114
Reduces the project to a specified set of items.
cl ose() “Project close() method” on page 111 Closes the project with normal save options.
save() “Project save() method” on page 115 Saves the project.
saveWi t hDi al og() “Project saveWithDialog() method” on
page 115
Displays a Save dialog box.
i mport Pl acehol der() “Project importFileWithDialog()
method” on page 112
Imports a placeholder into the project.
i mport Fi l e() “Project importFile() method” on
page 112
Imports a file into the project.
i mport Fi l eWi t hDi al og() “Project importFileWithDialog()
method” on page 112
Displays an Import File dialog box.
showWi ndow() “Project showWindow() method” on
page 116
Shows or hides the Project panel.
aut oFi xExpressi ons() “Project autoFixExpressions() method”
on page 110
Automatically replaces text in all expressions.
ol dText The text to replace.
newText The new text.
Method Reference Description
111
JavaScript Reference Project object
111
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 dat eFoot 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 art 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.
112
JavaScript Reference Project object
112
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 116.) 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 mport Fi l e(i mport 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 t ems array.
Parameters
Returns
FootageItem object.
Example
app. proj ect . i mport Fi l e(new I mport Opt i ons(Fi l e(“sampl e. psd”))
Project importFileWithDialog() method
app. proj ect . i mport 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 mport Opt i ons An ImportOptions object specifying the file to import and the options for the operation. See
“ImportOptions object” on page 73.
113
JavaScript Reference Project object
113
Project importPlaceholder() method
app. proj ect . i mport 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 t ems array. Same as the
File > Import > Placeholder command.
Parameters
Returns
PlaceholderItem object.
Project item() method
app. proj ect . i t em(i ndex)
Description
Retrieves an item at a specified index position.
Parameters
Returns
Item object.
Project items attribute
app. proj ect . i t ems
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; othewise 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 rameRat e 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.
114
JavaScript Reference Project object
114
Type
Boolean; read/write.
Project numItems attribute
app. proj ect . numI t 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 . numI t ems;
al ert ("There are " + n + " i t ems i n t hi s proj ect . ")
Project reduceProject() method
app. proj ect . reduceProj ect (array_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 heIt ems = new Array();
t heIt ems[t heI t ems. l engt h] = app. proj ect . i t em(1);
t heIt ems[t heI t ems. l engt h] = app. proj ect . i t em(3);
app. proj ect . reduceProj ect (t heI t 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.
array_of _i t ems An array containing the Item objects that are to be kept.
115
JavaScript Reference Project object
115
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.
116
JavaScript Reference Project object
116
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.
117
JavaScript Reference Project object
117
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. TIMECODE
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 ransparencyGri dThumbnai l s
Description
When true, thumbnail views use the transparency checkerboard pattern.
Type
Boolean; read/write.
118
JavaScript Reference Property object
118
Property object
app. proj ect . i t em(i ndex). l ayer(i ndex). propert 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 140 and “PropertyGroup
property() method” on page 149.
• 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 140.
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
propert yVal ueType “Property propertyValueType attribute”
on page 131
Type of value stored in this property.
val ue “Property value attribute” on page 138 Current value of the property.
hasMi n “Property hasMin attribute” on
page 123
When true, there is a minimum permitted value.
hasMax “Property hasMax attribute” on
page 123
When true, there is a maximum permitted value.
mi nVal ue “Property minValue attribute” on
page 130
The minimum permitted value.
maxVal ue “Property maxValue attribute” on
page 130
The maximum permitted value.
i sSpat i al “Property isSpatial attribute” on
page 124
When true, the property defines a spatial value.
canVaryOverTi me “Property canVaryOverTime attribute”
on page 122
When true, the property can be keyframed.
i sTi meVaryi ng “Property isTimeVarying attribute” on
page 124
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 138
A text description of the units in which the value is
expressed.
expressi on “Property expression attribute” on
page 122
The expression string for this property.
canSet Expressi on “Property canSetExpression attribute”
on page 122
When true, the expression can be set by a script.
expressi onEnabl ed “Property expressionEnabled attribute”
on page 123
When true, the expression is used to generate val-
ues for the property.
expressi onError “Property expressionError attribute” on
page 123
The error, if any, that occurred when the last expres-
sion was evaluated.
119
JavaScript Reference Property object
119
Methods
keyf rameInt erpol at i onType “Property keyframeInterpolationType
attribute” on page 124
The type of interpolation used at a keyframe.
sel ect edKeys “Property selectedKeys attribute” on
page 133
All selected keyframes of the property.
propert yI ndex “Property propertyIndex attribute” on
page 131
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 137
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 137
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 129 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 122 Adds a new keyframe to the property at
a given time.
removeKey() “Property removeKey() method” on
page 132
Removes a keyframe from the property.
i sI nt erpol at i onTypeVal i d() “Property isInterpolationTypeValid()
method” on page 124
When true, this property can be inter-
polated.
set I nt erpol at i onTypeAt Key() “Property setInterpolationTypeAtKey()
method” on page 133
Sets the interpolation type for a key.
keyI nI nt erpol at i onType() “Property keyInInterpolationType() method”
on page 125
Gets the 'in' interpolation type for a key.
keyOut I nt erpol at i onType() “Property keyOutInterpolationType()
method” on page 126
Gets the 'out' interpolation type for a
key.
set Spat i al Tangent sAt Key() “Property setSpatialTangentsAtKey()
method” on page 135
Sets the “in” and “out” tangent vectors
for a key.
keyI nSpat i al Tangent () “Property keyInSpatialTangent() method” on
page 125
Gets the “in” spatial tangent for a key.
keyOut Spat i al Tangent () “Property keyOutSpatialTangent() method”
on page 126
Gets the “out” spatial tangent for a key.
set Temporal EaseAt Key() “Property setTemporalEaseAtKey() method”
on page 136
Sets the “in” and “out” temporal ease for
a key.
Attribute Reference Description
120
JavaScript Reference Property object
120
Example: Get and set the value of opacity
var myPropert y = myLayer. opaci t y;
/ / opaci t y has propert yVal ueType of OneD, and i s st ored as a f l oat
myPropert y. set Val ue(0. 5);
/ / Vari abl e myOpaci t y i s a f l oat val ue
var myOpaci t y = myPropert y. val ue;
Example: Get and set the value of a position
var myPropert y = myLayer. posi t i on;
/ / posi t i on has propert yVal ueType of ThreeD_SPATIAL, and i s st ored as an array of 3 f l oat s
myPropert y. set Val ue([10. 0, 30. 0, 0. 0]);
/ / Vari abl e myPosi t i on i s an array of 3 f l oat s
var myPosi t i on = myPropert y. val ue;
Example: Change the value of a mask shape to be open instead of closed
var myMask = myl ayer. mask(1);
var myPropert y = myMask. maskPat h;
myShape = myPropert y. val ue;
keyI nTemporal Ease() “Property keyInTemporalEase() method” on
page 126
Gets the “in” temporal ease for a key.
keyOut Temporal Ease() “Property keyOutTemporalEase() method”
on page 127
Gets the “out” temporal ease for a key.
set Temporal 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 129
Reports whether a keyframe has tem-
poral continuity.
set Temporal Aut oBezi erAt Key() “Property setTemporalAutoBezierAtKey()
method” on page 135
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 134
Sets whether a keyframe has spatial
continuity.
keySpat i al Cont i nuous() “Property keySpatialContinuous() method”
on page 128
Reports whether a keyframe has spatial
continuity.
set Spat i al Aut oBezi erAt Key “Property setSpatialAutoBezierAtKey()
method” on page 134
Sets whether a keyframe has spatial
auto-Bezier.
keySpat i al Aut oBezi er() “Property keySpatialAutoBezier() method”
on page 128
Reports whether a keyframe has spatial
auto-Bezier.
set Rovi ngAt Key() “Property setRovingAtKey() method” on
page 133
Sets whether a keyframe is roving.
keyRovi ng() “Property keyRoving() method” on page 127 Reports whether a keyframe is roving.
set Sel ect edAt Key() “Property setSelectedAtKey() method” on
page 134
Sets whether a keyframe is selected.
keySel ect ed() “Property keySelected() method” on
page 128
Reports whether a keyframe is selected.
Method Reference Description
121
JavaScript Reference Property object
121
myShape. cl osed = f al se;
myPropert y. set Val ue(myShape);
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 myPropert y = myLi ght . col or;
var col orVal ue = myPropert y. val ueAt Ti me(2, t rue);
col orVal ue[0] = 0. 5 * col orVal ue[0];
myPropert 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 myPropert y = myLayer. scal e;
/ / f al se val ue of preExpressi on means eval uat e t he expressi on
var scal eVal ue = myPropert y. val ueAt Ti me(3. 5, f al se);
i f (scal eVal ue[0] == 10 && scal eVal ue[1] == 50) {
al ert ("hurray");
}
el se {
al ert ("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.
myPropert y = myLayer. rot at i on;
myPropert y. set Val ueAt Ti me(0, 0);
myPropert y. set Val ueAt Ti me(5, 90);
myPropert y. set Val ueAt Ti me(10, 0);
Example: Change the keyframe values for the first three keyframes of some source text
myPropert y = myText Layer. sourceText ;
i f (myPropert y. numKeys < 3) {
al ert ("error, I t hought t here were 3 keyf rames");
}
el se {
myPropert y. set Val ueAt Key(1, new Text Document ("key number 1"));
myPropert y. set Val ueAt Key(2, new Text Document ("key number 2"));
myPropert 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
122
JavaScript Reference Property object
122
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 creat es a Text Document
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 t em(i ndex). l ayer(i ndex). propert 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 t em(i ndex). l ayer(i ndex). propert 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 122.
Type
Boolean; read-only.
Property canVaryOverTime attribute
app. proj ect . i t em(i ndex). l ayer(i ndex). propert ySpec. canVaryOverTi 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 t em(i ndex). l ayer(i ndex). propert 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.
t i me The time, in seconds, at which to add the keyframe. A floating-point value. The beginning of the composition is 0.
123
JavaScript Reference Property object
123
• If the string contains a valid expression, expressi onEnabl ed becomes true.
• 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 t em(i ndex). l ayer(i ndex). propert 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 t em(i ndex). l ayer(i ndex). propert ySpec. expressi onError
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 t em(i ndex). l ayer(i ndex). propert 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 t em(i ndex). l ayer(i ndex). propert ySpec. hasMi n
Description
When true, there is a minimum permitted value for the named property; otherwise false.
124
JavaScript Reference Property object
124
Type
Boolean; read-only.
Property isInterpolationTypeValid() method
app. proj ect . i t em(i ndex). l ayer(i ndex). propert ySpec. i sInt erpol 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 t em(i ndex). l ayer(i ndex). propert 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 t em(i ndex). l ayer(i ndex). propert ySpec. i sTi meVaryi 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 canVaryOverTi me must also be true.
Type
Boolean; read-only.
Property keyframeInterpolationType attribute
app. proj ect . i t em(i ndex). l ayer(i ndex). propert ySpec. keyf rameInt erpol at i onType
Description
The type of interpolation used at a keyframe.
t ype A Keyf rameI nt erpol at i onType enumerated value; one of:
Keyf rameInt erpol at i onType. LINEAR
Keyf rameInt erpol at i onType. BEZIER
Keyf rameInt erpol at i onType. HOLD
125
JavaScript Reference Property object
125
Type
A Keyf rameI nt erpol at i onType enumerated value; read/write. One of:
Keyf rameInt erpol at i onType. LINEAR
Keyf rameInt erpol at i onType. BEZIER
Keyf rameInt erpol at i onType. HOLD
Property keyInInterpolationType() method
app. proj ect . i t em(i ndex). l ayer(i ndex). propert ySpec. keyI nI nt erpol at i onType(keyI ndex)
Description
Returns the 'in' interpolation type for the specified keyframe.
Parameters
Returns
A Keyf rameI nt erpol at i onType enumerated value; one of:
Keyf rameInt erpol at i onType. LINEAR
Keyf rameInt erpol at i onType. BEZIER
Keyf rameInt erpol at i onType. HOLD
Property keyInSpatialTangent() method
app. proj ect . i t em(i ndex). l ayer(i ndex). propert ySpec. keyInSpat i al Tangent (keyI ndex)
Description
Returns the incoming spatial tangent for the specified keyframe, if the named property is spacial (that is, the
value type is TwoD_SPATI AL or ThreeD_SPATIAL).
Parameters
Returns
Array of floating-point values:
• If the property value type is Propert yVal ueType. TwoD_SPATIAL, the array contains 2 floating-point
values.
• If the property value type is Propert 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.
keyI ndex The index for the keyframe. An integer in the range [1..numKeys], as returned by the addKey or nearest Key-
I ndex method.
keyI ndex The index for the keyframe. An integer in the range [1..numKeys], as returned by the addKey or nearest Key-
I ndex method.
126
JavaScript Reference Property object
126
Property keyInTemporalEase() method
app. proj ect . i t em(i ndex). l ayer(i ndex). propert ySpec. vkeyInTemporal Ease(keyI ndex)
Description
Returns the incoming temporal ease for the specified keyframe.
Parameters
Returns
Array of KeyframeEase objects:
• If the property value type is Propert yVal ueType. TwoD_SPATIAL, the array contains 2 objects.
• If the property value type is Propert yVal ueType. ThreeD_SPATIAL, the array contains 3 objects.
• For any other value type, the array contains 1 object.
Property keyOutInterpolationType() method
app. proj ect . i t em(i ndex). l ayer(i ndex). propert ySpec. keyOut Int erpol at i onType(keyI ndex)
Description
Returns the outgoing interpolation type for the specified keyframe.
Parameters
Returns
A Keyf rameI nt erpol at i onType enumerated value; one of:
Keyf rameInt erpol at i onType. LINEAR
Keyf rameInt erpol at i onType. BEZIER
Keyf rameInt erpol at i onType. HOLD
Property keyOutSpatialTangent() method
app. proj ect . i t em(i ndex). l ayer(i ndex). propert ySpec. keyOut Spat i al Tangent (keyI ndex)
Description
Returns the outgoing spatial tangent for the specified keyframe.
Parameters
keyI ndex The index for the keyframe. An integer in the range [1..numKeys], as returned by the addKey or nearest -
KeyIndex method.
keyI ndex The index for the keyframe. An integer in the range [1..numKeys], as returned by the addKey or nearest -
KeyIndex method.
keyI ndex 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 floating-point values:
• If the property value type is Propert yVal ueType. TwoD_SPATIAL, the array contains 2 floating-point
values.
• If the property value type is Propert 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 keyOutTemporalEase() method
app. proj ect . i t em(i ndex). l ayer(i ndex). propert ySpec. keyOut Temporal Ease(keyI ndex)
Description
Returns the outgoing temporal ease for the specified keyframe.
Parameters
Returns
Array of KeyframeEase objects:
• If the property value type is Propert yVal ueType. TwoD_SPATIAL, the array contains 2 objects.
• If the property value type is Propert yVal ueType. ThreeD_SPATIAL, the array contains 3 objects.
• For any other value type, the array contains 1 object.
Property keyRoving() method
app. proj ect . i t em(i ndex). l ayer(i ndex). propert ySpec. keyRovi ng(keyI ndex)
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.
keyI ndex The index for the keyframe. An integer in the range [1..numKeys], as returned by the addKey or nearest -
KeyIndex method.
keyI ndex 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 keySelected() method
app. proj ect . i t em(i ndex). l ayer(i ndex). propert ySpec. keySel ect ed(keyI ndex)
Description
Returns true if the specified keyframe is selected.
Parameters
Returns
Boolean.
Property keySpatialAutoBezier() method
app. proj ect . i t em(i ndex). l ayer(i ndex). propert ySpec. keySpat i al Aut oBezi er(keyI ndex)
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(keyI ndex) 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 t em(i ndex). l ayer(i ndex). propert ySpec. keySpat i al Cont i nuous(keyI ndex)
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.
keyI ndex The index for the keyframe. An integer in the range [1..numKeys], as returned by the addKey or nearest -
KeyIndex method.
keyI ndex The index for the keyframe. An integer in the range [1..numKeys], as returned by the addKey or nearest -
KeyIndex method.
keyI ndex 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 keyTemporalAutoBezier() method
app. proj ect . i t em(i ndex). l ayer(i ndex). propert ySpec. keyTemporal Aut oBezi er(keyI ndex)
Description
Returns true if the specified keyframe has temporal auto-Bezier interpolation.
Temporal auto-Bezier interpolation affects this keyframe only if keyf rameI nt erpol at i onType is Keyf rameI n-
t erpol at i onType. BEZI ER for both keyInInt erpol at i on(keyI ndex) and keyOut Int erpol at i on(keyI ndex).
Parameters
Returns
Boolean.
Property keyTemporalContinuous() method
app. proj ect . i t em(i ndex). l ayer(i ndex). propert ySpec. keyTemporal Cont i nuous(keyI ndex)
Description
Returns true if the specified keyframe has temporal continuity.
Temporal continuity affects this keyframe only if keyf rameInt erpol at i onType is Keyf rameInt erpol a-
t i onType. BEZIER for both keyInI nt erpol at i on(keyI ndex) and keyOut I nt erpol at i on(keyI ndex).
Parameters
Returns
Boolean.
Property keyTime() method
app. proj ect . i t em(i ndex). l ayer(i ndex). propert ySpec. keyTi me(keyI ndex)
app. proj ect . i t em(i ndex). l ayer(i ndex). propert ySpec. keyTi me(markerComment )
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

keyI ndex The index for the keyframe. An integer in the range [1..numKeys], as returned by the addKey or nearest -
KeyIndex method.
keyI ndex The index for the keyframe. An integer in the range [1..numKeys], as returned by the addKey or nearest -
KeyIndex method.
keyI ndex 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 99).
130
JavaScript Reference Property object
130
Returns
Floating-point value.
Property keyValue() method
app. proj ect . i t em(i ndex). l ayer(i ndex). propert ySpec. keyVal ue(keyI ndex)
app. proj ect . i t em(i ndex). l ayer(i ndex). propert 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.
Parameters

Returns
Floating-point value.
Property maxValue attribute
app. proj ect . i t em(i ndex). l ayer(i ndex). propert 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 t em(i ndex). l ayer(i ndex). propert 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.
keyI ndex 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 99).
131
JavaScript Reference Property object
131
Property nearestKeyIndex() method
app. proj ect . i t em(i ndex). l ayer(i ndex). propert 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 t em(i ndex). l ayer(i ndex). propert ySpec. numKeys
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 t em(i ndex). l ayer(i ndex). propert ySpec. propert 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 t em(i ndex). l ayer(i ndex). propert ySpec. propert yVal ueType
Description
The type of value stored in the named property. The Propert 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. propert 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();
t i me The time in seconds; a floating-point value. The beginning of the composition is 0.
132
JavaScript Reference Property object
132
myShape. vert i ces = [[0, 0], [0, 100], [100, 100], [100, 0]];
var myMask = myl ayer. propert y("ADBE Mask Parade"). propert y(1);
myMask. propert y("ADBE Mask Shape"). set Val ue(myShape);
Type
A Propert yVal ueType enumerated value; read/write. One of:
E
Property removeKey() method
app. proj ect . i t em(i ndex). l ayer(i ndex). propert ySpec. removeKey(keyI ndex)
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.
Propert yVal ueType. NO_VALUE Stores no data.
Propert 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]
Propert yVal ueType. ThreeD Array of three floating-point quantitative values. For example, a Scale
value might be [100.0, 20.2, 0.0]
Propert yVal ueType. TwoD_SPATIAL Array of 2 floating-point positional values For example, an Anchor Point
value might be [5.1, 10.0]
Propert yVal ueType. TwoD Array of 2 floating-point quantitative values. For example, a Scale value
might be [5.1, 100.0]
Propert yVal ueType. OneD A floating-point value.
Propert 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]
Propert yVal ueType. CUSTOM_VALUE Unimplemented type; you cannot get or set values for properties with this
type.
Propert yVal ueType. MARKER MarkerValue object; see “MarkerValue object” on page 98.
Propert yVal ueType. LAYER_INDEX Integer; a value of 0 means no layer.
Propert yVal ueType. MASK_INDEX Integer; a value of 0 means no mask.
Propert yVal ueType. SHAPE Shape object; see “Shape object” on page 164.
Propert yVal ueType. TEXT_DOCUMENT TextDocument object; see “TextDocument object” on page 171.
keyI ndex The index for the keyframe. An integer in the range [1..numKeys], as returned by the addKey or nearest -
KeyIndex method.
133
JavaScript Reference Property object
133
Property selectedKeys attribute
app. proj ect . i t em(i ndex). l ayer(i ndex). propert ySpec. sel ect edKeys
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 t em(i ndex). l ayer(i ndex). propert ySpec. set Int erpol at i onTypeAt Key(keyI ndex, i nType,
out Type)
Description
Sets the ‘in’ and ‘out’ interpolation types for the specified keyframe.
Parameters
Returns
Nothing.
Property setRovingAtKey() method
app. proj ect . i t em(i ndex). l ayer(i ndex). propert ySpec. set Rovi ngAt Key(keyI ndex, 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
keyI ndex The index for the keyframe. An integer in the range [1..numKeys], as returned by the addKey
or nearest KeyI ndex method.
i nType The incoming interpolation type. A Keyf rameI nt erpol at i onType enumerated value; one
of:
Keyf rameInt erpol at i onType. LINEAR
Keyf rameInt erpol at i onType. BEZIER
Keyf rameInt 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 rameI nt erpol at i onType enumerated value; one of:
Keyf rameInt erpol at i onType. LINEAR
Keyf rameInt erpol at i onType. BEZIER
Keyf rameInt erpol at i onType. HOLD
keyI ndex The index for the keyframe. An integer in the range [1..numKeys], as returned by the addKey or nearest Key-
Index method.
134
JavaScript Reference Property object
134
Returns
Nothing.
Property setSelectedAtKey() method
app. proj ect . i t em(i ndex). l ayer(i ndex). propert ySpec. set Sel ect edAt Key(keyI ndex, onOf f )
Description
Selects or deselects the specified keyframe.
Parameters
Returns
Nothing.
Property setSpatialAutoBezierAtKey() method
app. proj ect . i t em(i ndex). l ayer(i ndex). propert 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 t em(i ndex). l ayer(i ndex). propert ySpec. set Spat i al Cont i nuousAt Key(keyI ndex, 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.
newVal True to turn roving on, false to turn roving off.
keyI ndex 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.
keyI ndex 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.
135
JavaScript Reference Property object
135
Parameters
Returns
Nothing.
Property setSpatialTangentsAtKey() method
app. proj ect . i t em(i ndex). l ayer(i ndex). propert ySpec. set Spat i al Tangent sAt Key(keyI ndex, 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 t em(i ndex). l ayer(i ndex). propert ySpec. set Temporal Aut oBezi erAt Key(keyI ndex, 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(keyI ndex) is also true.
Parameters
Returns
Nothing.
keyI ndex 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.
keyI ndex 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 Propert yVal ueType. TwoD_SPATIAL, the array contains 2 values.
• If the property value type is Propert 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 Propert yVal ueType. TwoD_SPATIAL, the array contains 2 values.
• If the property value type is Propert yVal ueType. ThreeD_SPATIAL, the array contains 3 values.
keyI ndex 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.
136
JavaScript Reference Property object
136
Property setTemporalContinuousAtKey() method
app. proj ect . i t em(i ndex). l ayer(i ndex). propert ySpec. set Temporal Cont i nuousAt Key(keyI ndex, newVal )
Description
Turns temporal continuity on or off for the specified keyframe.
When temporal continuity is turned on, it affects this keyframe only if the Keyf rameI nt erpol at i onType is
Keyf rameInt erpol at i onType. BEZIER for both keyInInt erpol at i on(keyI ndex) and keyOut Int erpo-
l at i on(keyI ndex).
Parameters
Returns
Nothing.
Property setTemporalEaseAtKey() method
app. proj ect . i t em(i ndex). l ayer(i ndex). propert ySpec. set Temporal EaseAt Key(keyI ndex, 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 81.
Parameters
Returns
Nothing.
keyI ndex 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.
keyI ndex The index for the keyframe. An integer in the range [1..numKeys], as returned by the addKey or near-
est KeyI ndex method.
i nTemporal Ease The incoming temporal ease. An array of 1, 2, or 3 KeyframeEase objects.
• If the property value type is Propert yVal ueType. TwoD_SPATIAL, the array contains 2
objects.
• If the property value type is Propert yVal ueType. ThreeD_SPATIAL, 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 Propert yVal ueType. TwoD_SPATIAL, the array contains 2
objects.
• If the property value type is Propert yVal ueType. ThreeD_SPATIAL, the array contains 3
objects.
• For all other value types, the array contains 1 object.
137
JavaScript Reference Property object
137
Property setValue() method
app. proj ect . i t em(i ndex). l ayer(i ndex). propert 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 displayes an error. To set the
value of a property with keyframes, use “Property setValueAtTime() method” on page 137 or “Property
setValueAtKey() method” on page 137.
Parameters
Returns
Nothing.
Property setValueAtKey() method
app. proj ect . i t em(i ndex). l ayer(i ndex). propert ySpec. set Val ueAt Key(keyI ndex, 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 t em(i ndex). l ayer(i ndex). propert 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
newVal ue A value appropriate for the type of property being set; see “Property propertyValueType attribute” on page 131.
keyI ndex 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 131.
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 131.
138
JavaScript Reference Property object
138
Returns
Nothing.
Property setValuesAtTimes() method
app. proj ect . i t em(i ndex). l ayer(i ndex). propert 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.
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 t em(i ndex). l ayer(i ndex). propert 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 t em(i ndex). l ayer(i ndex). propert 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 118.
Type
A value appropriate for the type of the property (see “Property propertyValueType attribute” on page 131);
read-only.
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 131.
139
JavaScript Reference Property object
139
Property valueAtTime() method
app. proj ect . i t em(i ndex). l ayer(i ndex). propert 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.
Parameters
Returns
A value appropriate for the type of the property (see “Property propertyValueType attribute” on page 131).
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.
140
JavaScript Reference PropertyBase object
140
PropertyBase object
app. proj ect . i t em(i ndex). l ayer(i ndex). propert 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 t em(1). l ayer(1). ef f ect . addGrai n. vi ewi ngMode;
var ef f ect 1agai nt oo = app. proj ect . i t em(1). l ayer(1)("Ef f ect s"). addGrai n. vi ewi ngMode;
var ef f ect 1agai nt oo2 = app. proj ect . i t em(1). l ayer(1)("Ef f ect s")("Add Grai n")("Vi ewi ng Mode");
See also “PropertyGroup property() method” on page 149.
• 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 118 and “PropertyGroup object” on page 147.
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 ert (l ayer1. name); / / i nval i d ref erence t o del et ed 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 ransf orm. posi t i on;
l ayer1. remove();
al ert (l ayer1posi t i on. val ue); / / i nval i d ref erence t o propert y i n sel ect ed 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 2param = 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 ert (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 144
Name of the property.
mat chName “PropertyBase matchName attribute”
on page 143
A special name for the property used to build unique naming paths.
141
JavaScript Reference PropertyBase object
141
Methods
PropertyBase active attribute
app. proj ect . i t em(i ndex). l ayer(i ndex). propert 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.
propert yI ndex “PropertyBase propertyIndex attribute”
on page 145
Index of this property within its parent group.
propert yDept h “PropertyBase propertyDepth attribute”
on page 144
The number of levels of parent groups between this property and
the containing layer.
propert yType “PropertyBase propertyType attribute”
on page 145
The property type.
parent Propert y “PropertyBase parentProperty
attribute” on page 144
The immediate parent group of this property.
i sModi f i ed “PropertyBase isModified attribute” on
page 143
When true, the property has been changed since its creation.
canSet Enabl ed “PropertyBase canSetEnabled attribute”
on page 142
When true, the user interface displays an eyeball icon for this prop-
erty.
enabl ed “PropertyBase enabled attribute” on
page 143
When true, this property is enabled.
act i ve “PropertyBase active attribute” on
page 141
When true, this property is active.
el i ded “PropertyBase elided attribute” on
page 142
When true, this property is not displayed in the user interface.
i sEf f ect “PropertyBase isEffect attribute” on
page 143
When true, this property is an effect.
i sMask “PropertyBase isMask attribute” on
page 143
When true, this property is a mask.
sel ect ed “PropertyBase selected attribute” on
page 146
When true, this property is selected.
Method Reference Description
propert yGroup() “PropertyBase propertyGroup()
method” on page 145
Gets the parent group for this property.
remove() “PropertyBase remove() method” on
page 146
Removes this from the project.
moveTo() “PropertyBase moveTo() method” on
page 144
Moves this property to a new position in its parent group.
dupl i cat e() “PropertyBase duplicate() method” on
page 142
Duplicates this property object.
Attribute Reference Description
142
JavaScript Reference PropertyBase object
142
PropertyBase canSetEnabled attribute
app. proj ect . i t em(i ndex). l ayer(i ndex). propert 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 t em(i ndex). l ayer(i ndex). propert ySpec. dupl i cat e()
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 Propert yType. INDEXED_GROUP; see “PropertyBase propertyType
attribute” on page 145.
Parameters
None.
Returns
PropertyBase object.
PropertyBase elided attribute
app. proj ect . i t em(i ndex). l ayer(i ndex). propert 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 mat or 1
Ani mat or 2
In this example, “Animator 1” and “Animator 2” are contained in a PropertyBase called “Text Animators.”
This parent group is not displayed in the user interface, and so the two child properties are not indented in
the Timeline panel.
Type
Boolean; read-only.
143
JavaScript Reference PropertyBase object
143
PropertyBase enabled attribute
app. proj ect . i t em(i ndex). l ayer(i ndex). propert 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 t em(i ndex). l ayer(i ndex). propert 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 t em(i ndex). l ayer(i ndex). propert ySpec. i sMask
Description
When true, this property is a mask PropertyGroup.
Type
Boolean; read-only.
PropertyBase isModified attribute
app. proj ect . i t em(i ndex). l ayer(i ndex). propert 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 t em(i ndex). l ayer(i ndex). propert 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.
144
JavaScript Reference PropertyBase object
144
An indexed group may not have a name value, but always has a mat chName value. (An indexed group has the
type Propert yType. INDEXED_GROUP; see “PropertyBase propertyType attribute” on page 145.)
Type
String; read-only.
PropertyBase moveTo() method
app. proj ect . i t em(i ndex). l ayer(i ndex). propert ySpec. moveTo(newI ndex)
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 145.)
Parameters
Returns
Nothing.
PropertyBase name attribute
app. proj ect . i t em(i ndex). l ayer(i ndex). propert ySpec. name
Description
The display name of the property. (Compare “PropertyBase matchName attribute” on page 143.)
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 Propert yType. INDEXED_GROUP; see “PropertyBase propertyType attribute” on
page 145).
Type
String; read/write for a child of an indexed group; otherwise read-only.
PropertyBase parentProperty attribute
app. proj ect . i t em(i ndex). l ayer(i ndex). propert ySpec. parent Propert 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 t em(i ndex). l ayer(i ndex). propert ySpec. propert yDept h
newIndex The new index position at which to place this property in its group. An integer.
145
JavaScript Reference PropertyBase object
145
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 t em(i ndex). l ayer(i ndex). propert ySpec. propert yGroup()
app. proj ect . i t em(i ndex). l ayer(i ndex). propert ySpec. propert 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 t em(i ndex). l ayer(i ndex). propert ySpec. propert 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 Propert yType. INDEXED_GROUP; see “PropertyBase propertyType attribute” on
page 145).
Type
Integer; read-only.
PropertyBase propertyType attribute
app. proj ect . i t em(i ndex). l ayer(i ndex). propert ySpec. propert yType
Description
The type of this property.
Type
A Propert 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..propert yDept h]. Default is 1, which gets the immediate parent.
Propert yType. PROPERTY A single property such as position or zoom.
Propert yType. I NDEXED_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.
146
JavaScript Reference PropertyBase object
146
PropertyBase remove() method
app. proj ect . i t em(i ndex). l ayer(i ndex). propert 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 145.)
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 t em(i ndex). l ayer(i ndex). propert ySpec. sel ect ed
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 ect edPropert i es attribute of a
Comp or Layer object.
Type
Boolean; read/write for an effect or mask property group, otherwise read-only.
Propert yType. NAMED_GROUP A property group in which the member names are not editable. Layers are
named groups.
147
JavaScript Reference PropertyGroup object
147
PropertyGroup object
app. proj ect . i t em(i ndex). l ayer(i ndex). propert 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 145.
For examples of how to access properties and property groups, see “PropertyBase object” on page 140.
• 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 140.
• PropertyGroup is a base class for MaskPropertyGroup. PropertyGroup attributes and methods are available
when working with mask groups. See “MaskPropertyGroup object” on page 102.
Attributes
Methods
PropertyGroup addProperty() method
app. proj ect . i t em(i ndex). l ayer(i ndex). propert yGroupSpec. addPropert 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
Propert yType. INDEXED_GROUP; see “PropertyBase propertyType attribute” on page 145) The only
exception is a text animator property, which can be added to a named group (a property group that has the
type Propert 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 canAddPropert y before calling this method. (See “Property-
Group canAddProperty() method” on page 148.)
Attribute Reference Description
numPropert i es “PropertyGroup numProperties attribute” on page 148 The number of indexed properties in the group.
Method Reference Description
propert y() “PropertyGroup property() method” on
page 149
Gets a member property or group.
canAddPropert y() “PropertyGroup canAddProperty() method”
on page 148
Reports whether a property can be added to the group.
addPropert y() “PropertyGroup addProperty() method” on
page 147
Adds a property to the group.
148
JavaScript Reference PropertyGroup object
148
Parameters
Returns
PropertyBase object.
PropertyGroup canAddProperty() method
app. proj ect . i t em(i ndex). l ayer(i ndex). propert yGroupSpec. canAddPropert 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. canAddPropert y("mask"); / / ret urns t rue
maskGroup. canAddPropert y("ADBE Mask At om"); / / ret urns t rue
maskGroup. canAddPropert y("bl end"); / / ret urns f al se
Parameters
Returns
Boolean.
PropertyGroup numProperties attribute
app. proj ect . i t em(i ndex). l ayer(i ndex). propert yGroupSpec. numPropert 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 149.
Type
Integer; read-only.
name The display name or match name of the property to add. (See “PropertyBase matchName attribute” on page 143).
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 147).
149
JavaScript Reference PropertyGroup object
149
PropertyGroup property() method
app. proj ect . i t em(i ndex). l ayer(i ndex). propert yGroupSpec. propert y(i ndex)
app. proj ect . i t em(i ndex). l ayer(i ndex). propert yGroupSpec. propert 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. propert y("posi t i on")
myl ayer(1)
myl ayer. propert 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. propert y("ADBE Masks"). propert 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”
150
JavaScript Reference PropertyGroup object
150
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”
• "ADBE Mask Feather", or “maskFeather”
• "ADBE Mask Opacity", or “maskOpacity”
• "ADBE Mask Offset", or “maskOffset”
151
JavaScript Reference PropertyGroup object
151
Examples
1 If a layer named “myLayer” has a Box Blur effect, you can retrieve the effect in any of the following ways:
myLayer. propert y(“Ef f ect s”). propert y(“Box Bl ur”);
myLayer. propert y(“Ef f ect s”). propert y(“boxBl ur”);
myLayer. propert y(“Ef f ect s”). propert y(“ADBE Box Bl ur”);
2 If a layer named “myLayer” has a mask named “Mask 1” you can retrieve it as follows:
myLayer. propert y(“Masks”). propert y(“Mask 1”);
3 To get a Bulge Center value from a Bulge effect, you can use either of the following:
myLayer. propert y(“Ef f ect s”). propert y(“Bul ge”). propert y(“Bul ge Cent er”);
myLayer. propert y(“Ef f ect s”). propert y(“Bul ge”). propert y(“bul geCent er”);
152
JavaScript Reference RenderQueue object
152
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 155.
Attributes
Methods
RenderQueue Item() method
app. proj ect . renderQueue. i t em(i ndex)
Description
Gets a specified item from the i t ems collection.
Parameters
Returns
RenderQueueItem object.
Attribute Reference Description
renderi ng “RenderQueue rendering attribute” on page 154 When true, a render is in progress.
numIt ems “RenderQueue numItems attribute” on page 153 The total number of items in the render queue.
i t ems “RenderQueue items attribute” on page 153 The collection of items in the render queue.
Method Reference Description
showWi ndow() “RenderQueue showWindow() method”
on page 154
Show or hides the Render Queue panel.
render() “RenderQueue render() method” on
page 153
Starts the rendering process; does not return until render is
complete.
pauseRenderi ng() “RenderQueue pauseRendering()
method” on page 153
Pauses or restarts the rendering process.
st opRenderi ng() “RenderQueue stopRendering()
method” on page 154
Stops the rendering process.
i t em() “RenderQueue Item() method” on
page 152
Gets a render-queue item from the collection.
i ndex The position index of the item. An integer in the range [0..numIt ems].
153
JavaScript Reference RenderQueue object
153
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 155.
Type
RQItemCollection object; read-only.
RenderQueue numItems attribute
app. proj ect . renderQueue. numIt ems
Description
The total number of items in the render queue.
Type
Integer; read-only.
RenderQueue pauseRendering() method
app. proj ect . renderQueue. pauseRenderi 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
onError callback. See “RenderQueueItem onStatusChanged attribute” on page 157 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 pauseRenderi ng()
or st opRenderi ng() from an onError 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 157.
pause True to pause a current render process, false to continue a paused render.
154
JavaScript Reference RenderQueue object
154
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 opRenderi 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 onError callback. See “RenderQueueItem onStatus-
Changed attribute” on page 157 and “Application onError attribute” on page 26.
Parameters
None.
Returns
Nothing.
doShow When true, show the Render Queue panel. When false, hide it.
155
JavaScript Reference RenderQueueItem object
155
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 161.
Attributes
Methods
Attribute Reference Description
numOut put Modul es “RenderQueueItem numOutputModules
attribute” on page 157
The total number of Output Modules assigned to the
item.
render “RenderQueueItem render attribute” on
page 158
When true, this item is rendered when the queue is
started.
st art Ti me “RenderQueueItem startTime attribute” on
page 159
The time when rendering began for the item.
el apsedSeconds “RenderQueueItem elapsedSeconds
attribute” on page 156
The time elapsed in the current rendering of this item.
t i meSpanSt art “RenderQueueItem timeSpanStart
attribute” on page 160
The start time in the composition to be rendered.
t i meSpanDurat i on “RenderQueueItem timeSpanDuration
attribute” on page 160
The duration of the composition to be rendered.
ski pFrames “RenderQueueItem skipFrames attribute”
on page 159
The number of frames to skip when rendering this item.
comp “RenderQueueItem comp attribute” on
page 156
The composition to be rendered by this item.
out put Modul es “RenderQueueItem outputModules
attribute” on page 158
The collection of Output Modules for this item.
t empl at es “RenderQueueItem templates attribute” on
page 160
A set of Render Settings templates.
st at us “RenderQueueItem status attribute” on
page 159
The current rendering status of the item.
onSt at usChanged “RenderQueueItem onStatusChanged
attribute” on page 157
A callback function that is called during the rendering
process when the status of the item changes.
l ogType “RenderQueueItem logType attribute” on
page 157
A log type for this item.
Method Reference Description
out put Modul e() “RenderQueueItem outputModule() method” on
page 158
Gets an Output Module for the item.
remove() “RenderQueueItem remove() method” on page 158 Removes the item from the render queue.
saveAsTempl at e() “RenderQueueItem saveAsTemplate() method” on
page 159
Saves a new Render Settings template.
156
JavaScript Reference RenderQueueItem object
156
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 159 and “RenderQueueItem templates attribute” on page 160.
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 cat e()
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 156
Applies a Render Settings template.
dupl i cat e “RenderQueueItem duplicate() method” on page 156 Duplicates this item.
t empl at eName A string containing the name of the template to apply.
Method Reference Description
157
JavaScript Reference RenderQueueItem object
157
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 RenderQueueIt em. st at us attribute
changes. See “RenderQueueItem status attribute” on page 159.
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 153 and “RenderQueue stopRendering() method” on page 154.
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 ert (app. proj ect . renderQueue. i t em(1). st at us)
}
158
JavaScript Reference RenderQueueItem object
158
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-
QueueIt em. st at us is set to RQIt emSt at us. QUEUED. When set to false, st at us is set to RQI t em-
St at us. UNQUEUED.
i ndex The position index of the output module. An integer in the range [1..numOut put Modul es ].
159
JavaScript Reference RenderQueueItem object
159
Type
Boolean; read/write.
RenderQueueItem saveAsTemplate() method
app. proj ect . renderQueue. i t em(i ndex). saveAsTempl at e(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 art 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.
160
JavaScript Reference RenderQueueItem object
160
Type
An RQIt emSt at us enumerated value; read-only. One of:
RenderQueueItem templates attribute
app. proj ect . renderQueue. i t em(i ndex). t empl at es
Description
The names of all Render Settings templates available for the item. See also “RenderQueueItem saveAsTemplate()
method” on page 159.
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 art
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.
RQI t emSt at us. WI LL_CONTI NUE Rendering process has been paused.
RQI t emSt at us. NEEDS_OUTPUT Item lacks a valid output path.
RQI t 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
RQI t emSt at us. USER_STOPPED Rendering process was stopped by user or script.
RQI t emSt at us. ERR_STOPPED Rendering process was stopped due to an error.
RQI t emSt at us. DONE Rendering process for the item is complete.
161
JavaScript Reference RQItemCollection object
161
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 155
• RQItemCollection is a subclass of Collection. All methods and attributes of Collection are available when
working with RQItemCollection. See “Collection object” on page 51.
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 161 Adds a composition to the Render Queue.
comp The CompItem object for the composition to be added.
162
JavaScript Reference Settings object
162
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. set t i ngs . get Set t i ng(s ect i onName, keyName)
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 ert ("The set t i ng i s " + n);
Settings haveSetting() method
app. set t i ngs . haveSet t i ng(s ect i onName, keyName)
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 163 Saves a default value for a setting.
get Set t i ng() “Settings getSetting() method” on page 162 Retrieves a setting value.
haveSet t i ng() “Settings haveSetting() method” on page 162 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.
163
JavaScript Reference Settings object
163
Parameters
Returns
Boolean.
Settings saveSetting() method
app. set t i ngs . saveSet t i ng(s ect i onName, keyName, 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.
164
JavaScript Reference Shape object
164
Shape object
app. proj ect . i t em(i ndex). l ayer(i ndex). propert y(i ndex). propert 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 103.) 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 vert 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. vert i ces = [[0, 0], [0, 100], [100, 100], [100, 0]];
myShape. cl osed = t rue;
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. vert 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. vert 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 rue;
165
JavaScript Reference Shape object
165
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
vert 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
vert 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 165 When true, the shape is a closed curve.
vert i ces “Shape vertices attribute” on page 166 The anchor points of the shape.
i nTangent s “Shape inTangents attribute” on page 165 The tangent vectors coming into the shape vertices.
out Tangent s “Shape outTangents attribute” on page 165 The tangent vectors coming out of the shape vertices.
166
JavaScript Reference Shape object
166
Type
Array of floating-point pair arrays; read/write.
Shape vertices attribute
s hapeObj ect . val ue. vert 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. vert i ces = [[0, 0], [0, 1], [1, 1], [1, 0]];
Type
Array of floating-point pair arrays; read/write.
167
JavaScript Reference ShapeLayer object
167
ShapeLayer object
app. proj ect . i t em(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 94. 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 83 and “AVLayer object” on
page 39.
168
JavaScript Reference SolidSource object
168
SolidSource object
app. proj ect . i t em(i ndex). mai nSource
app. proj ect . i t em(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 67.
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 168 The color of the solid.
169
JavaScript Reference System object
169
System object
syst em
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 syst em global variable.
Example
al ert ("Your OS i s " + syst em. osname + " runni ng versi on " + syst em. osversi on);
conf i rm("You are: " + syst em. userName + " runni ng on " + syst em. machi neName + ". ");
Attributes
Methods
System callSystem() method
syst em. cal l Syst em (cmdLi neToExecut e);
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 = syst em. cal l Syst em("cmd. exe / c \ "t i me / t \ "");
al ert ("Current t i me i s " + t i meSt r);
Parameters
Returns
The output from the command.
System machineName attribute
syst em. machi neName
Attribute Reference Description
userName “System userName attribute” on page 170 The current user name.
machi neName “System machineName attribute” on page 169 The name of the host computer.
osName “System osName attribute” on page 170 The name of the operating system.
osVersi on “System osVersion attribute” on page 170 The version of the operating system.
Method Reference Description
cal l Syst em() “System callSystem() method” on page 169 Execute’s a command on the system’s command line.
cmdLi neToExecut e A string containing the command and its parameters.
170
JavaScript Reference System object
170
Description
The name of the computer on which After Effects is running.
Type
String; read-only.
System osName attribute
syst em. osName
Description
The name of the operating system on which After Effects is running.
Type
String; read-only.
System osVersion attribute
syst em. osVersi on
Description
The version of the current local operating system.
Type
String; read-only.
System userName attribute
syst em. userName
Description
The name of the user currently logged on to the system.
Type
String; read-only.
171
JavaScript Reference TextDocument object
171
TextDocument object
new Text Document (docText )
app. proj ect . i t em(i ndex). l ayer(i ndex). propert 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. propert y("Source Text "). set Val ue(myText Document );
al ert (myText Layer. propert y("Source Text "). val ue);
This sets keyframe values for text that show different words over time:
var t ext Prop = myText Layer. propert y("Source Text ");
t ext Prop. set Val ueAt Ti me(0, new Text Document ("Happy"));
t ext Prop. set Val ueAt Ti me(. 33, new Text Document ("cake"));
t ext Prop. set Val ueAt Ti me(. 66, new Text Document ("i s"));
t ext Prop. set Val ueAt Ti me(1, new Text Document ("yummy! "));
Attributes
TextDocument text attribute
t ext Document . t ext
Description
The text value for the text layer’s Source Text property.
Type
String; read/write.
Attribute Reference Description
t ext “TextDocument text attribute” on page 171 The text layer’s Source Text value.
172
JavaScript Reference TextLayer object
172
TextLayer object
app. proj ect . i t em(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 95. 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 83 and “AVLayer object” on
page 39.
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
Perpendi 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
Int er-Charact er Bl endi ng
Ani mat ors
Unused Properties and Attributes
The Ti me Remap and Mot i on Trackers 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 rackMat t eType
i sTrackMat t e
hasTrackMat t e
173
Examples
This section describes sample scripts that are included on your DVD, giving an overview of what they do and
a description of how they work.
This set of examples is by no means exhaustive, but it does demonstrate some of scripting’s more complex
features in action. It also shows some typical programming constructions from JavaScript that apply to
scripting.
For more examples from Adobe and from other After Effects users, visit Adobe Studio Exchange at
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.
174
Examples Render named items
174
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, smart I mport . 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, t est 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
175
Examples Render and e-mail
175
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 t est 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 mport 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, Convert Sel ect ed Propert i es t o 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.
176
Examples Convert selected properties to markers
176
This script adds a layer-time marker on the layer at the same time as each keyframe for each selected property.
Each marker is associated with an event-type Flash Video cue point, and the cue point is given a parameter
whose name is the name of the property and whose value is the property’s value at that time. If the selected
property has an expression, a marker is created for each frame, with the values sampled at each frame.
Note: This script does not convert properties that have complex value types, such as the Path property for a paint
stroke, the Curves property of a Curve effect, or a gradient property.
When you render the composition as Flash video, all markers that contain cue-point data are converted to
Flash Video cue points.
177
After Effects Object Summary
This code dump summarizes all public JavaScript objects (instantiable classes) and enumerated types defined
for After Effects CS3.
========================================================================
Al phaMode enum
---------------------------------------------------------------------------
Al phaMode. IGNORE
Al phaMode. PREMULTIPLIED
Al phaMode. STRAI GHT
========================================================================
Appl i cat i on obj ect
---------------------------------------------------------------------------
act i vat e() no ret urn
begi nSuppressDi al ogs() no ret urn
begi nUndoGroup(st ri ng undoName) no ret urn
bui l dName : st ri ng : readOnl y
bui l dNumber : i nt eger : readOnl y
cancel Task(i nt eger t askID) no ret urn
endSuppressDi al ogs(bool ean showAl ert ) no ret urn
endUndoGroup() no ret urn
endWat chFol der() no ret urn
exi t Af t erLaunchAndEval : bool ean : read/ wri t e
exi t Code : i nt eger : read/ wri t e
f i ndMenuCommandI d() 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 sWat chFol der : bool ean : readOnl y
l anguage : Language : readOnl y
memoryI nUse : number : readOnl y
newProj ect () no ret urn
open([Fi l e f i l e]) ret urns Proj ect
openTempl at e(Fi l e f i l eToOpenWi t hTempl at eSemant i cs) no ret urn
parseSwat chFi l e(Fi l e swat chFi l e) ret urns Swat chObj ect
pauseWat chFol der(bool ean doPause) no ret urn
proj ect : Proj ect : readOnl y
purge(PurgeTarget t arget ) no ret urn
qui t () no ret urn
saveProj ect OnCrash : bool ean : read/ wri t e
schedul eTask(st ri ngToExecut e, f l oat del ay, bool ean repeat ) ret urns t askID
set MemoryUsageLi mi t s(f l oat i mageCachePercent , f l oat maxi mumMemoryPercent ) no ret urn
set SavePref erencesOnQui t (bool ean doSave) no ret urn
set t i ngs : Set t i ngs : readOnl y
178
After Effects Object Summary
178
versi on : st ri ng : readOnl y
wat chFol der(Fi l e f i l e) no ret urn
onError(st ri ng errorSt ri ng, st ri ng severi t y) no ret urn
=======================================================================
AVLayer obj ect
---------------------------------------------------------------------------
(i nt eger propert yIndex) ret urns Propert yBase
(st ri ng propert yName) ret urns Propert yBase
act i ve : bool ean : readOnl y
act i veAt Ti me(f l oat at Ti me) ret urns bool ean
addPropert y(st ri ng propert yName) ret urns Propert yBase
adj ust ment Layer : bool ean : read/ wri t e
appl yPreset (st ri 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 urns bool ean
audi oEnabl ed : bool ean : read/ wri t e
aut oOri ent : Aut oOri ent Type : read/ wri t e
bl endi ngMode : Bl endi ngMode : read/ wri t e
cal cul at eTransf ormFromPoi nt s(Array [t op, l ef t ], Array [t op, ri ght ], Array [bot t om, ri ght ])
ret urns Obj ect wi t h t ransf orm propert i es set
canAddPropert y(st ri ng propert yName) ret urns bool ean
canSet Col l apseTransf 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/ wri t e
comment : st ri ng : read/ wri t e
cont ai ni ngComp : CompIt em : readOnl y
copyToComp(CompIt em i nt oComp) no ret urn
dupl i cat e() ret urns AVLayer
ef f ect sAct i ve : bool ean : read/ wri t e
el i ded : bool ean : readOnl y
enabl ed : bool ean : read/ wri t e
f rameBl endi ng : bool ean : readOnl y
f rameBl endi ngType : FrameBl endi ngType : read/ wri t e
gui deLayer : bool ean : read/ wri t e
hasAudi o : bool ean : readOnl y
hasTrackMat t e : bool ean : readOnl y
hasVi deo : bool ean : readOnl y
hei ght : f l oat : readOnl y
i nPoi nt : f l oat : read/ wri t e
i ndex : i nt eger : 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 t e : bool ean : readOnl y
l ocked : bool ean : read/ wri t e
mat chName : st ri ng : readOnl y
mot i onBl ur : bool ean : read/ wri t e
moveAf t er(Layer ot herLayer) no ret urn
179
After Effects Object Summary
179
moveBef ore(Layer ot herLayer) no ret urn
moveTo(i nt eger i ndex) no ret urn
moveToBegi nni ng() no ret urn
moveToEnd() no ret urn
name : st ri ng : read/ wri t e
nul l Layer : bool ean : readOnl y
numPropert i es : i nt eger : readOnl y
out Poi nt : f l oat : read/ wri t e
parent : Layer : read/ wri t e
parent Propert y : Propert yGroup : readOnl y
preserveTransparency : bool ean : read/ wri t e
propert y(i nt eger propert yI ndex) ret urns Propert yBase
propert y(st ri ng propert yName) ret urns Propert yBase
propert yDept h : i nt eger : readOnl y
propert yGroup([i nt eger count Up]) ret urns Propert yGroup
propert yType : Propert yType : readOnl y
qual i t y : LayerQual i t y : read/ wri t e
remove() no ret urn
repl aceSource(It em newSource, bool ean f i xExpressi ons) no ret urn
sel ect ed : bool ean : read/ wri t e
sel ect edPropert i es : Array of Propert yBase: readOnl y
set Parent Wi t hJump(Layer newParent ) no ret urn
shy : bool ean : read/ wri t e
sol o : bool ean : read/ wri t e
source : AVIt em : readOnl y
sourceRect At Ti me(f l oat at Ti me, bool ean i ncl udeExt ent s)
ret urns Obj ect wi t h f l oat propert i es: t op; l ef t ; wi dt h; hei ght
st art Ti me : f l oat : read/ wri t e
st ret ch : f l oat : read/ wri t e
t hreeDLayer : bool ean : read/ wri t e
t hreeDPerChar : bool ean : read/ wri t e
t i me : f l oat : readOnl y
t i meRemapEnabl ed : bool ean : read/ wri t e
t rackMat t eType : TrackMat t eType : read/ wri t e
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. CLASSIC_DIFFERENCE
Bl endi ngMode. COLOR
Bl endi ngMode. COLOR_BURN
Bl endi ngMode. COLOR_DODGE
Bl endi ngMode. DANCI NG_DISSOLVE
Bl endi ngMode. DARKEN
Bl endi ngMode. DARKER_COLOR
Bl endi ngMode. DIFFERENCE
Bl endi ngMode. DI SSOLVE
180
After Effects Object Summary
180
Bl endi ngMode. EXCLUSION
Bl endi ngMode. HARD_LIGHT
Bl endi ngMode. HARD_MIX
Bl endi ngMode. HUE
Bl endi ngMode. LIGHTEN
Bl endi ngMode. LIGHTER_COLOR
Bl endi ngMode. LINEAR_BURN
Bl endi ngMode. LINEAR_DODGE
Bl endi ngMode. LINEAR_LI GHT
Bl endi ngMode. LUMINESCENT_PREMUL
Bl endi ngMode. LUMINOSITY
Bl endi ngMode. MULTI PLY
Bl endi ngMode. NORMAL
Bl endi ngMode. OVERLAY
Bl endi ngMode. PI N_LI GHT
Bl endi ngMode. SATURATION
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. STENCIL_LUMA
Bl endi ngMode. VIVI D_LI GHT
=======================================================================
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 ri ng preset Name) no ret urn
bgCol or : Array of f l oat : read/ wri t e
comment : st ri ng : read/ wri t e
di spl aySt art Ti me : f l oat : read/ wri t e
draf t 3d : bool ean : read/ wri t e
dupl i cat e() ret urns CompI t em
durat i on : f l oat : read/ wri t e
f oot ageMi ssi ng : bool ean : readOnl y
f rameBl endi ng : bool ean : read/ wri t e
f rameDurat i on : f l oat : read/ wri t e
f rameRat e : f l oat : read/ wri t e
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 t e
i d : i nt eger : readOnl y
l ayer(i nt eger l ayerIndex) ret urns Layer
l ayer(st ri ng l ayerName) ret urns Layer
181
After Effects Object Summary
181
l ayer(Layer ot herLayer, i nt eger rel at i veIndex) ret urns Layer
l ayers : LayerCol l ect i on: readOnl y
mot i onBl ur : bool ean : read/ wri t e
name : st ri ng : read/ wri t e
numLayers : i nt eger : readOnl y
parent Fol der : Fol derI t em : read/ wri t e
pi xel Aspect : f l oat : read/ wri t e
preserveNest edFrameRat e : bool ean : read/ wri t e
preserveNest edResol ut i on : bool ean : read/ wri t e
proxySource : Foot ageSource : readOnl y
remove() no ret urn
renderer : st ri ng : read/ wri t e
renderers : Array of st ri ng: readOnl y
resol ut i onFact or : Array of i nt eger : read/ wri t e
sel ect ed : bool ean : read/ wri t e
sel ect edLayers : Array of Layer : readOnl y
sel ect edPropert i es : Array of Propert 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 ri ng name, i nt eger wi dt h, i nt eger hei ght , f l oat f rameRat e, f l oat durat 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(ArrayOf Fl oat col or, st ri ng name, i nt eger wi dt h, i nt eger hei ght ,
f l oat pi xel AspecRat i o) no ret urn
shut t erAngl e : i nt eger : read/ wri t e
shut t erPhase : i nt eger : read/ wri t e
t i me : f l oat : read/ wri t e
t ypeName : st ri ng : readOnl y
useProxy : bool ean : read/ wri t e
usedIn : Array of CompIt em : readOnl y
wi dt h : i nt eger : read/ wri t e
workAreaDurat i on : f l oat : read/ wri t e
workAreaSt art : f l oat : read/ wri t e
=======================================================================
Fi el dSeparat i onType enum
---------------------------------------------------------------------------
Fi el dSeparat i onType. LOWER_FI ELD_FI RST
Fi el dSeparat i onType. OFF
Fi el dSeparat i onType. UPPER_FI ELD_FI RST
=======================================================================
Fi l eSource obj ect
---------------------------------------------------------------------------
al phaMode : Al phaMode : read/ wri t e
conf ormFrameRat e : f l oat : read/ wri t e
di spl ayFrameRat e : 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/ wri t e
182
After Effects Object Summary
182
i nvert Al pha : bool ean : read/ wri t e
i sSt i l l : bool ean : readOnl y
l oop : i nt eger : read/ wri t e
mi ssi ngFoot agePat h : st ri ng : readOnl y
nat i veFrameRat e : f l oat : readOnl y
premul Col or : Array of f l oat : read/ wri t e
rel oad() no ret urn
removePul l down : Pul l downPhase : readOnl y
======================================================================
Fol derIt em obj ect
---------------------------------------------------------------------------
comment : st ri ng : read/ wri t e
i d : i nt eger : readOnl y
i t em(i nt eger i t emI ndex) ret urns I t em
i t ems : I t emCol l ect i on : readOnl y
name : st ri ng : read/ wri t e
numIt ems : i nt eger : readOnl y
parent Fol der : Fol derI t em : read/ wri t e
remove() no ret urn
sel ect ed : bool ean : read/ wri t e
t ypeName : st ri ng : readOnl y
=======================================================================
Foot ageI t em obj ect
---------------------------------------------------------------------------
comment : st ri ng : read/ wri t e
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 rameRat e : 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 nt eger : readOnl y
mai nSource : Foot ageSource : readOnl y
name : st ri ng : read/ wri t e
parent Fol der : Fol derI t em : read/ wri t e
pi xel Aspect : f l oat : read/ wri t e
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 nt eger hei ght , f l oat f rameRat 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(ArrayOf Fl oat col or, st ri ng name, i nt eger wi dt h, i nt eger hei ght , f l oat pi xel AspecRat i o)
no ret urn
sel ect ed : bool ean : read/ wri t e
set Proxy(Fi l e proxyFi l e) no ret urn
set ProxyToNone() no ret urn
set ProxyWi t hPl acehol der(st ri ng name, i nt eger wi dt h, i nt eger hei ght , f l oat f rameRat e, f l oat durat i on)
no ret urn
183
After Effects Object Summary
183
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(ArrayOf Fl oat col or, st ri ng name, i nt eger wi dt h, i nt eger 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/ wri t e
usedIn : Array of CompIt em : readOnl y
wi dt h : i nt eger : read/ wri t e
=======================================================================
I mport AsType enum
---------------------------------------------------------------------------
I mport AsType. COMP
I mport AsType. COMP_CROPPED_LAYERS
I mport AsType. FOOTAGE
I mport AsType. PROJ ECT
=======================================================================
I mport Opt i ons obj ect
---------------------------------------------------------------------------
new I mport Opt i ons(Fi l e f i l eToImport ) ret urns Import Opt i ons
canImport As(I mport AsType asType) ret urns bool ean
f i l e : Fi l e : read/ wri t e
f orceAl phabet i cal : bool ean : read/ wri t e
i mport As : I mport AsType : read/ wri t e
sequence : bool ean : read/ wri t e
=======================================================================
It emCol l ect i on obj ect
---------------------------------------------------------------------------
addComp(st ri ng name, i nt eger wi dt h, i nt eger hei ght , f l oat pi xel Aspect Rat i o, f l oat durat i on,
f l oat f rameRat e) ret urns CompI t em
addFol der(st ri ng name) ret urns Fol derIt em
=======================================================================
Keyf rameEase 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/ wri t e
speed : f l oat : read/ wri t e
=======================================================================
Keyf rameInt erpol at i onType enum
---------------------------------------------------------------------------
Keyf rameInt erpol at i onType. BEZIER
Keyf rameInt erpol at i onType. HOLD
Keyf rameInt erpol at i onType. LINEAR
======================================================================
Language enum
---------------------------------------------------------------------------
Language. ENGLISH
Language. FRENCH
Language. GERMAN
Language. ITALIAN
Language. J APANESE
Language. SPANI SH
184
After Effects Object Summary
184
======================================================================
CameraLayer obj ect
---------------------------------------------------------------------------
(i nt eger propert yIndex) ret urns Propert yBase
(st ri ng propert yName) ret urns Propert yBase
act i ve : bool ean : readOnl y
act i veAt Ti me(f l oat at Ti me) ret urns bool ean
addPropert y(st ri ng propert yName) ret urns Propert yBase
adj ust ment Layer : bool ean : readOnl y
appl yPreset (st ri ng preset Name) no ret urn
aut oOri ent : Aut oOri ent Type : read/ wri t e
canAddPropert y(st ri ng propert yName) ret urns bool ean
canSet Enabl ed : bool ean : readOnl y
comment : st ri ng : read/ wri t e
cont ai ni ngComp : CompIt em : readOnl y
copyToComp(CompIt em i nt oComp) no ret urn
dupl i cat e() ret urns CameraLayer
el i ded : bool ean : readOnl y
enabl ed : bool ean : read/ wri t e
hasVi deo : bool ean : readOnl y
i nPoi nt : f l oat : read/ wri t e
i ndex : i nt eger : 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/ wri t e
mat chName : st ri ng : readOnl y
moveAf t er(Layer ot herLayer) no ret urn
moveBef ore(Layer ot herLayer) no ret urn
moveTo(i nt eger i ndex) no ret urn
moveToBegi nni ng() no ret urn
moveToEnd() no ret urn
name : st ri ng : read/ wri t e
nul l Layer : bool ean : readOnl y
numPropert i es : i nt eger : readOnl y
out Poi nt : f l oat : read/ wri t e
parent : Layer : read/ wri t e
parent Propert y : Propert yGroup : readOnl y
propert y(i nt eger propert yI ndex) ret urns Propert yBase
propert y(st ri ng propert yName) ret urns Propert yBase
propert yDept h : i nt eger : readOnl y
propert yGroup([i nt eger count Up]) ret urns Propert yGroup
propert yType : Propert yType : readOnl y
remove() no ret urn
sel ect ed : bool ean : read/ wri t e
sel ect edPropert i es : Array of Propert yBase: readOnl y
set Parent Wi t hJump(Layer newParent ) no ret urn
shy : bool ean : read/ wri t e
sol o : bool ean : read/ wri t e
st art Ti me : f l oat : read/ wri t e
185
After Effects Object Summary
185
st ret ch : f l oat : read/ wri t e
t i me : f l oat : readOnl y
======================================================================
LayerCol l ect i on obj ect
---------------------------------------------------------------------------
add(AVIt em t heI t em,
[f l oat durat i on]) ret urns AVLayer
addCamera(st ri ng name,
ArrayOf Fl oat cent erPoi nt ) ret urns Layer
addLi ght (st ri ng name,
ArrayOf Fl oat cent erPoi nt ) ret urns Layer
addNul l ([f l oat durat i on]) ret urns AVLayer
addShape() ret urns Layer
addSol i d(ArrayOf Fl oat col or, st ri ng name, i nt eger 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 t ext Doc]) ret urns AVLayer
addText (st ri ng t ext ) ret urns AVLayer
byName(st ri ng name) ret urns Layer
precompose(ArrayOf Int eger l ayerIndi ces, st ri ng name, [bool ean moveAl l At t ri but es])
ret urns CompIt em
======================================================================
LayerQual i t y enum
---------------------------------------------------------------------------
LayerQual i t y. BEST
LayerQual i t y. DRAFT
LayerQual i t y. WI REFRAME
====================================================================
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 ri ng comment , [st ri ng chapt er], [st ri ng url ], [st ri ng f rameTarget ])
ret urns MarkerVal ue
chapt er : st ri ng : read/ wri t e
comment : st ri ng : read/ wri t e
cuePoi nt Name : st ri ng : read/ wri t e
event CuePoi nt : bool ean : read/ wri t e
f rameTarget : st ri ng : read/ wri t e
get Paramet ers() ret urns obj ect wi t h propert i es set
set Paramet ers(Obj ect keyVal uePai rs) no ret urn
url : st ri ng : read/ wri t e
=====================================================================
MaskMode enum
---------------------------------------------------------------------------
MaskMode. ADD
MaskMode. DARKEN
MaskMode. DI FFERENCE
186
After Effects Object Summary
186
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
=====================================================================
MaskPropert yGroup obj ect
---------------------------------------------------------------------------
(i nt eger propert yIndex) ret urns Propert yBase
(st ri ng propert yName) ret urns Propert yBase
act i ve : bool ean : readOnl y
addPropert y(st ri ng propert yName) ret urns Propert yBase
canAddPropert y(st ri ng propert yName) ret urns bool ean
canSet Enabl ed : bool ean : readOnl y
col or : Array of f l oat : read/ wri t e
dupl i cat e() ret urns MaskPropert yGroup
el i ded : bool ean : readOnl y
enabl ed : bool ean : readOnl y
i nvert ed : bool ean : read/ wri t e
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/ wri t e
maskMode : MaskMode : read/ wri t e
maskMot i onBl ur : MaskMot i onBl ur : read/ wri t e
mat chName : st ri ng : readOnl y
moveTo(i nt eger i ndex) no ret urn
name : st ri ng : read/ wri t e
numPropert i es : i nt eger : readOnl y
parent Propert y : Propert yGroup : readOnl y
propert y(i nt eger propert yI ndex) ret urns Propert yBase
propert y(st ri ng propert yName) ret urns Propert yBase
propert yDept h : i nt eger : readOnl y
propert yGroup([i nt eger count Up]) ret urns Propert yGroup
propert yI ndex : i nt eger : readOnl y
propert yType : Propert yType : readOnl y
remove() no ret urn
rot oBezi er : bool ean : read/ wri t e
sel ect ed : bool ean : read/ wri t e
=================================================================
OMCol l ect i on obj ect
---------------------------------------------------------------------------
add() ret urns Out put Modul e
=====================================================================
Out put Modul e obj ect
---------------------------------------------------------------------------
187
After Effects Object Summary
187
appl yTempl at e(st ri ng t empl at eName) no ret urn
f i l e : Fi l e : read/ wri t e
name : st ri ng : readOnl y
post RenderAct i on : Post RenderAct i on : read/ wri t e
remove() no ret urn
saveAsTempl at e(st ri ng t empl at eName) no ret urn
t empl at es : Array of st ri ng: readOnl y
=====================================================================
Pl acehol derSource obj ect
---------------------------------------------------------------------------
al phaMode : Al phaMode : read/ wri t e
conf ormFrameRat e : f l oat : read/ wri t e
di spl ayFrameRat e : f l oat : readOnl y
f i el dSeparat i onType : Fi el dSeparat i onType : read/ wri t e
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/ wri t e
i nvert Al pha : bool ean : read/ wri t e
i sSt i l l : bool ean : readOnl y
l oop : i nt eger : read/ wri t e
nat i veFrameRat e : f l oat : readOnl y
premul Col or : Array of f l oat : read/ wri t e
removePul l down : Pul l downPhase : read/ wri t e
====================================================================
Post RenderAct i on enum
---------------------------------------------------------------------------
Post RenderAct i on. IMPORT
Post RenderAct i on. I MPORT_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/ wri t e
cl ose(Cl oseOpt i ons cl oseOpt i ons) ret urns bool ean
consol i dat eFoot age() ret urns i nt eger
di spl aySt art Frame : i nt eger : read/ wri t e
f i l e : Fi l e : readOnl y
i mport Fi l e(Import Opt i ons i mport Opt i ons) ret urns It em
i mport Fi l eWi t hDi al og() ret urns ArrayOf I t em
i mport Pl acehol der(st ri ng i t emName, i nt eger i t emWi dt h, i nt eger i t emHei ght , f l oat f rameRat e,
f l oat durat i on) ret urns Foot ageIt em
i t em(i nt eger i t emI ndex) ret urns I t em
i t ems : I t emCol l ect i on : readOnl y
l i nearBl endi ng : bool ean : read/ wri t e
numIt ems : i nt eger : readOnl y
reduceProj ect (ArrayOf It em i t emsToPreserve) ret urns i nt eger
188
After Effects Object Summary
188
removeUnusedFoot age() ret urns i nt eger
renderQueue : RenderQueue : readOnl y
root Fol der : Fol derIt em : readOnl y
save(Fi l e t oFi l e) ret urns bool ean
saveWi t hDi al og() ret urns bool ean
sel ect i on : Array of It em : readOnl y
showWi ndow(bool ean doShow) no ret urn
t i mecodeBaseType : Ti mecodeBaseType : read/ wri t e
t i mecodeDi spl ayType : Ti mecodeDi spl ayType : read/ wri t e
t i mecodeFi l mType : Ti mecodeFi l mType : read/ wri t e
t i mecodeNTSCDropFrame : bool ean : read/ wri t e
t ransparencyGri dThumbnai l s : bool ean : read/ wri t e
=====================================================================
Propert y obj ect
---------------------------------------------------------------------------
act i ve : bool ean : readOnl y
addKey(f l oat at Ti me) ret urns i nt eger
canSet Enabl ed : bool ean : readOnl y
canSet Expressi on : bool ean : readOnl y
canVaryOverTi me : bool ean : readOnl y
dupl i cat e() ret urns Propert y
el i ded : bool ean : readOnl y
enabl ed : bool ean : readOnl y
expressi on : st ri ng : read/ wri t e
expressi onEnabl ed : bool ean : read/ wri t e
expressi onError : st ri ng : readOnl y
hasMax : bool ean : readOnl y
hasMi n : bool ean : readOnl y
i sEf f ect : bool ean : readOnl y
i sI nt erpol at i onTypeVal i d(Keyf rameI nt 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 meVaryi ng : bool ean : readOnl y
keyI nI nt erpol at i onType(i nt eger keyI ndex) ret urns Keyf rameI nt erpol at i onType
keyInSpat i al Tangent (i nt eger keyIndex) ret urns ArrayOf Fl oat
keyInTemporal Ease(i nt eger keyIndex) ret urns ArrayOf Keyf rameEase
keyOut I nt erpol at i onType(i nt eger keyIndex) ret urns Keyf rameInt erpol at i onType
keyOut Spat i al Tangent (i nt eger keyIndex) ret urns ArrayOf Fl oat
keyOut Temporal Ease(i nt eger keyIndex) ret urns ArrayOf Keyf rameEase
keyRovi ng(i nt eger keyI ndex) ret urns bool ean
keySel ect ed(i nt eger keyI ndex) ret urns bool ean
keySpat i al Aut oBezi 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 nt eger keyI ndex) ret urns f l oat
keyTi me(st ri ng markerName) ret urns f l oat
keyVal ue(i nt eger keyI ndex) ret urns t ype-st ored-i n-propert y
keyVal ue(st ri ng markerName) ret urns t ype-st ored-i n-propert y
mat chName : st ri ng : readOnl y
189
After Effects Object Summary
189
moveTo(i nt eger i ndex) no ret urn
name : st ri ng : readOnl y
nearest KeyIndex(f l oat at Ti me) ret urns i nt eger
numKeys : i nt eger : readOnl y
parent Propert y : Propert yGroup : readOnl y
propert yDept h : i nt eger : readOnl y
propert yGroup([i nt eger count Up]) ret urns Propert yGroup
propert yI ndex : i nt eger : readOnl y
propert yType : Propert yType : readOnl y
propert yVal ueType : Propert yVal ueType : readOnl y
remove() no ret urn
removeKey(i nt eger keyI ndex) no ret urn
sel ect ed : bool ean : read/ wri t e
sel ect edKeys : Array of i nt eger : readOnl y
set I nt erpol at i onTypeAt Key(i nt eger keyI ndex, Keyf rameInt erpol at i onType i nType,
[Keyf rameInt erpol at i onType out Type]) no ret urn
set Rovi ngAt Key(i nt eger keyIndex, bool ean i sRovi ng) no ret urn
set Sel ect edAt Key(i nt eger keyIndex, bool ean i sSel ect ed) no ret urn
set Spat i al Aut oBezi erAt Key(i nt eger keyI ndex, bool ean i sAut oBezi er) no ret urn
set Spat i al Cont i nuousAt Key(i nt eger keyIndex, bool ean i sCont i nuous) no ret urn
set Spat i al Tangent sAt Key(i nt eger keyIndex, ArrayOf Fl oat i nTangent , [ArrayOf Fl oat out Tangent ])
no ret urn
set Temporal Aut oBezi erAt Key(i nt eger keyIndex, bool ean i sAut oBezi er) no ret urn
set Temporal Cont i nuousAt Key(i nt eger keyI ndex, bool ean i sCont i nuous) no ret urn
set Temporal EaseAt Key(i nt eger keyIndex, ArrayOf Keyf rameEase i nEase,
[ArrayOf Keyf rameEase out Ease]) no ret urn
set Val ue(t ype-st ored-i n-propert y newVal ue) no ret urn
set Val ueAt Key(i nt eger keyI ndex, t ype-s t ored-i n-propert y newVal ue) no ret urn
set Val ueAt Ti me(f l oat at Ti me, t ype-st ored-i n-propert y newVal ue) no ret urn
set Val uesAt Ti mes(ArrayOf Fl oat at Ti mes, ArrayOf -t ype-st ored-i n-propert y newVal ues) no ret urn
uni t sText : st ri ng : readOnl y
val ue : t ype-st ored-i n-propert y: readOnl y
val ueAt Ti me(f l oat at Ti me, bool preExpressi on) ret urns t ype-st ored-i n-propert y
=====================================================================
Propert yGroup obj ect
---------------------------------------------------------------------------
(i nt eger propert yIndex) ret urns Propert yBase
(st ri ng propert yName) ret urns Propert yBase
act i ve : bool ean : readOnl y
addPropert y(st ri ng propert yName) ret urns Propert yBase
canAddPropert y(st ri ng propert yName) ret urns bool ean
canSet Enabl ed : bool ean : readOnl y
dupl i cat e() ret urns Propert 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
mat chName : st ri ng : readOnl y
moveTo(i nt eger i ndex) no ret urn
name : st ri ng : readOnl y
190
After Effects Object Summary
190
numPropert i es : i nt eger : readOnl y
parent Propert y : Propert yGroup : readOnl y
propert y(i nt eger propert yI ndex) ret urns Propert yBase
propert y(st ri ng propert yName) ret urns Propert yBase
propert yDept h : i nt eger : readOnl y
propert yGroup([i nt eger count Up]) ret urns Propert yGroup
propert yI ndex : i nt eger : readOnl y
propert yType : Propert yType : readOnl y
remove() no ret urn
sel ect ed : bool ean : read/ wri t e
======================================================================
Propert yType enum
---------------------------------------------------------------------------
Propert yType. INDEXED_GROUP
Propert yType. NAMED_GROUP
Propert yType. PROPERTY
====================================================================
Propert yVal ueType enum
---------------------------------------------------------------------------
Propert yVal ueType. COLOR
Propert yVal ueType. CUSTOM_VALUE
Propert yVal ueType. LAYER_INDEX
Propert yVal ueType. MARKER
Propert yVal ueType. MASK_INDEX
Propert yVal ueType. NO_VALUE
Propert yVal ueType. OneD
Propert yVal ueType. SHAPE
Propert yVal ueType. TEXT_DOCUMENT
Propert yVal ueType. ThreeD
Propert yVal ueType. ThreeD_SPATIAL
Propert yVal ueType. TwoD
Propert 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
191
After Effects Object Summary
191
===================================================================
PurgeTarget enum
---------------------------------------------------------------------------
PurgeTarget . ALL_CACHES
PurgeTarget . IMAGE_CACHES
PurgeTarget . SNAPSHOT_CACHES
PurgeTarget . UNDO_CACHES
======================================================================
RenderQueue obj ect
---------------------------------------------------------------------------
i t em(i nt eger i t emIndex) ret urns RenderQueueIt em
i t ems : RQI t emCol l ect i on : readOnl y
numIt ems : i nt eger : readOnl y
pauseRenderi ng(bool ean doPause) no ret urn
render() no ret urn
renderi ng : bool ean : readOnl y
showWi ndow(bool ean doShow) no ret urn
st opRenderi ng() no ret urn
====================================================================
RenderQueueIt em obj ect
---------------------------------------------------------------------------
appl yTempl at e(st ri ng t empl at eName) no ret urn
comp : CompIt em : readOnl y
dupl i cat e() ret urns RenderQueueIt em
el apsedSeconds : f l oat : readOnl y
l ogType : LogType : read/ wri t e
numOut put Modul es : i nt eger : 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/ wri t e
saveAsTempl at e(st ri ng t empl at eName) no ret urn
ski pFrames : i nt eger : read/ wri t e
st art Ti me : f l oat : readOnl y
st at us : RQIt emSt at us : readOnl y
t empl at es : Array of st ri ng: readOnl y
t i meSpanDurat i on : f l oat : read/ wri t e
t i meSpanSt art : f l oat : read/ wri t e
onSt at usChanged() no ret urn
=====================================================================
RQI t emCol l ect i on obj ect
---------------------------------------------------------------------------
add(CompIt em compToAdd) ret urns RenderQueueI t em
=====================================================================
RQIt emSt at us enum
---------------------------------------------------------------------------
RQI t emSt at us. DONE
RQI t emSt at us. ERR_STOPPED
RQI t emSt at us. NEEDS_OUTPUT
RQIt emSt at us. QUEUED
RQIt emSt at us. RENDERING
192
After Effects Object Summary
192
RQI t emSt at us. UNQUEUED
RQI t emSt at us. USER_STOPPED
RQI t emSt at us. WI LL_CONTI NUE
======================================================================
Set t i ngs obj ect
---------------------------------------------------------------------------
get Set t i ng(st ri ng sect i onName, st ri ng sect i onKey) ret urns st ri ng
haveSet t i ng(st ri ng sect i onName, st ri ng sect i onKey) ret urns bool ean
saveSet t i ng(st ri ng sect i onName, st ri ng sect i onKey, st ri ng newVal ue) no ret urn
======================================================================
Shape obj ect
---------------------------------------------------------------------------
new Shape() ret urns Shape
cl osed : bool ean : read/ wri t e
i nTangent s : Array of f l oat [2] : read/ wri t e
out Tangent s : Array of f l oat [2] : read/ wri t e
vert i ces : Array of f l oat [2] : read/ wri t e
======================================================================
Sol i dSource obj ect
---------------------------------------------------------------------------
al phaMode : Al phaMode : read/ wri t e
col or : Array of f l oat : read/ wri t e
conf ormFrameRat e : f l oat : readOnl y
di spl ayFrameRat e : 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 nvert Al pha : bool ean : read/ wri t e
i sSt i l l : bool ean : readOnl y
l oop : i nt eger : readOnl y
nat i veFrameRat e : f l oat : readOnl y
premul Col or : Array of f l oat : read/ wri t e
removePul l down : Pul l downPhase : readOnl y
======================================================================
Syst em obj ect
---------------------------------------------------------------------------
cal l Syst em(st ri ng cmdLi neToExect ut e) ret urns out put Of CommandAsSt ri ng
machi neName : st ri ng : readOnl y
osName : st ri ng : readOnl y
osVersi on : st ri ng : readOnl y
userName : st ri ng : readOnl y
======================================================================
Text Document obj ect
---------------------------------------------------------------------------
new Text Document (st ri ng t ext ) ret urns Text Document
t ext : st ri ng : read/ wri t e
======================================================================
Ti mecodeBaseType enum
---------------------------------------------------------------------------
193
After Effects Object Summary
193
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. TIMECODE
======================================================================
Ti mecodeFi l mType enum
---------------------------------------------------------------------------
Ti mecodeFi l mType. MM16
Ti mecodeFi l mType. MM35
======================================================================
TrackMat t eType enum
---------------------------------------------------------------------------
TrackMat t eType. ALPHA
TrackMat t eType. ALPHA_INVERTED
TrackMat t eType. LUMA
TrackMat t eType. LUMA_INVERTED
TrackMat t eType. NO_TRACK_MATTE
======================================================================
Aut oOri ent Type enum
---------------------------------------------------------------------------
Aut oOri ent Type. ALONG_PATH
Aut oOri ent Type. CAMERA_OR_POINT_OF_INTEREST
Aut oOri ent Type. NO_AUTO_ORI ENT
======================================================================
FrameBl endi ngType enum
---------------------------------------------------------------------------
FrameBl endi ngType. FRAME_MI X
FrameBl endi ngType. NO_FRAME_BLEND
FrameBl endi ngType. PIXEL_MOTION
---------------------------------------------------------------------------

© Copyright 2007 Adobe Systems Incorporated. All rights reserved. Adobe® Creative Suite 3 After Effects® Scripting Guide NOTICE: All information contained herein is the property of Adobe Systems Incorporated. No part of this publication (whether in hardcopy or electronic form) may be reproduced or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written consent of Adobe Systems Incorporated. The software described in this document is furnished under license and may only be used or copied in accordance with the terms of such license. This publication and the information herein is furnished AS IS, is subject to change without notice, and should not be construed as a commitment by Adobe Systems Incorporated. Adobe Systems Incorporated assumes no responsibility or liability for any errors or inaccuracies, makes no warranty of any kind (express, implied, or statutory) with respect to this publication, and expressly disclaims any and all warranties of merchantability, fitness for particular purposes, and noninfringement of third party rights. Any references to company names in sample templates are for demonstration purposes only and are not intended to refer to any actual organization. Adobe, the Adobe logo, After Effects, Photoshop, and Bridge are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States and/or other countries. Apple, Mac, Macintosh, and Mac OS are trademarks of Apple Computer, Inc., registered in the United States and other countries. Microsoft, and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and other countries. JavaScript and all Java-related marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. UNIX is a registered trademark of The Open Group. All other trademarks are the property of their respective owners. If this guide is distributed with software that includes an end user agreement, this guide, as well as the software described in it, is furnished under license and may be used or copied only in accordance with the terms of such license. Except as permitted by any such license, no part of this guide may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, recording, or otherwise, without the prior written permission of Adobe Systems Incorporated. Please note that the content in this guide is protected under copyright law even if it is not distributed with software that includes an end user license agreement. The content of this guide is furnished for informational use only, is subject to change without notice, and should not be construed as a commitment by Adobe Systems Incorporated. Adobe Systems Incorporated assumes no responsibility or liability for any errors or inaccuracies that may appear in the informational content contained in this guide. Adobe Systems Incorporated, 345 Park Avenue, San Jose, California 95110, USA.

Overview

The After Effects Scripting Guide demonstrates how to take procedural control of your After Effects projects via scripting. This feature set is available in Adobe® After Effects® CS3 Professional Edition. With the use of system-level scripting, you can streamline your render pipeline and avoid a lot of repetitive pointing and clicking. If you have used expressions or other JavaScript-like techniques for animating, or worked with system scripting in AppleScript or Visual Basic, you will recognize the power of application scripting in After Effects. With some practice, and with sufficient experience using the JavaScript language, you can take control of your graphics pipeline.

If you are new to scripting
After Effects is a visual tool with a graphical user interface; you are used to interacting with it via interface elements such as menus, panels, and icons. For the most part, this is the most accessible way to work. Scripting is designed for situations in which this methodology involves tedious repetition or painstaking searching and sorting that could be automated. Scripting can be a shortcut around tedious tasks that would otherwise involve repetitious pointing and clicking. It is also useful for leveraging the power of networked rendering in situations where Watch Folder is less powerful (and less convenient to set up). See “Examples” on page 173 for examples of what scripts can do. If you are new to scripting, see Adobe Introduction to Scripting, which introduces basic scripting concepts and describes different scripting languages that are available, including JavaScript. JavaScript and other scripting languages are object-oriented, and this book also describes the basic concepts of object-oriented programming and document object models. Even if you have no inclination to learn the JavaScript language, you can still harness the power of scripting via third-party solutions such as Rush Network Render Queue, a graphical user interface to set up distributed renders from any computer on the network without having to set up on individual machines. You can also leverage the contributions of scripting users who share scripts with other users. Larger studios may have such users in-house, while other users can visit forums such as those found at w w w .ad o b ef o r u m s .c o m .

About this guide
This guide is for users who manage a graphics pipeline (which may include other scriptable applications as well) and who want to write scripts to add custom capabilities to After Effects. This functionality is also offered via third-party network rendering management solutions. These products feature software designed to help manage this process, so it is possible to take advantage of this functionality without having to perform manual editing of scripts.

3

Expressions cannot access information from scripts (such as variables and functions). This script editor and debugger. choose File > Scripts > Open Script Editor. and every object in an After Effects project has its own identity (although not all are accessible to scripting).Overview Editing scripts 4 The heart of a scriptable application is the object model. solids. You can use any text editor to create. you can create a whole user interface that allows a bouncing ball and shadow layer to be animated using criteria entered by the user. After Effects scripting is based on ECMAScript (or more specifically. Editing scripts After Effects includes a JavaScript editor. Motion math Motion math is no longer included in After Effects. All mathematical and logical operators common to ECMAScript are available in scripting. you create projects. but it is recommended that you choose an application that does not automatically add header information when saving files and that saves with Unicode (UTF-8) encoding. NOTE: JavaScript objects normally referred to as “properties” are consistently called “attributes” in this guide. Expressions Although both After Effects expressions and the After Effects scripting interface use JavaScript and can access individual layer properties. This guide describes the JavaScript objects that have been defined for After Effects projects. compositions. although a script can be written to create or edit an expression. they are entirely distinct entities. compositions. and render-queue items along with all of the elements that they contain: footage. 4 . Each object has its own special attributes. its functionality has been superseded by scripting and expressions. mask. Further documentation on this standard can be found at www. to avoid confusion with After Effects’ own definition of a property (an animatable value of an effect. is an object. layers. and properties. called the ExtendScript Toolkit. To start it. • Mac OS applications that are useful for editing scripts include BBEdit or the built-in OS X TextEdit (be sure to set the Save type in Preferences to Unicode [UTF-8]). so a thorough knowledge of the application itself is also essential to understanding how to use this functionality. items. The After Effects object model is composed of a project. layers. and render-queue items. in scripting terms. provides a convenient interface for creating and testing your own scripts.org. When you use Adobe After Effects. with expressions it is possible to simulate the physics of a bouncing ball by applying mathematical rules to a “ball” layer. the 3rd Edition of the ECMA-262 Standard). masks. images. and save scripts. Much of what scripting can accomplish replicates what can be done via the After Effects user interface. But using scripting. Each of these items. familiarity with either one is helpful in understanding the other. or transform within an individual layer). For example. To take full advantage of what is possible with scripting you will also need an understanding of writing scripts at the system level (for integration with AppleScript or the Terminal command line in Mac OS and command-line scripts on Windows systems) and a background in how to work with JavaScript. effects. edit. You should be familiar with the After Effects object model in order to create scripts.ecma-international. • Windows applications that are useful for editing scripts include EM Editor or the built-in Notepad (be sure to set Encoding within save options to UTF-8). Because both expressions and scripting use JavaScript.

com. and p r o m pt ). the scripting features that operate outside the After Effects application (such as adding and deleting files and folders on volumes. ScriptUI User Interface Module: The ExtendScript ScriptUI module provides the ability to create and interact with user interface elements. js xb i n . In addition to implementing the JavaScript language according to the ECMA 262 and E4X ECMA 357 specifications.Overview Activating full scripting features 5 The ExtendScript JSX format After Effects supports ExtendScript. ScriptUI provides an object model for windows and UI control elements that you can use to create a user interface for your scripts. Any UTF-8 encoded text file with the .” This allows you to: • Write to files • Create folders and set the current folder • Create a socket connection (for details of this JavaScript utility. After Effects scripts must include the . You can use the ExtendScript Toolkit to export a binary version of an ExtendScript file. see the JavaScript Tools Guide) 5 . Activating full scripting features For security reasons. ExtendScript provides certain additional features and utilities: ExtendScript Toolkit: For help in developing. the dollar ($) object. and from partners. or accessing the network) are disabled by default.adobe. To enable these features. and testing scripts. debugging. ExtendScript provides tools and features such as a localization utility for providing user-interface string values in different languages and global functions for displaying short messages in dialog boxes (ale rt . File and Folder Objects: Because path name syntax is very different in different operating systems. choose Preferences > General. which has the extension . These features and more are described in detail in the JavaScript Tools Guide. Adobe’s extended implementation of JavaScript. and a reporting utility for ExtendScript elements.j sx extension is recognized as an ExtendScript file. ExtendScript script files are distinguished by the .js extension used with standard JavaScript files. External Communication: ExtendScript provides a S o c k e t object that allows you to communicate with remote systems from your After Effects scripts. ExtendScript is used by all Adobe applications that provide a scripting interface.j sx file extension. and allows interapplication communication through scripts. Such a binary file may not be usable with all of the scripting integration features in After Effects. It also defines a global debugging object. Tools and Utilities: In addition. a variation on the standard . ExtendScript provides an inter- active development and testing environment. which is available with After Effects. and select “Allow Scripts To Write Files And Access Network.js x file extension in order to be properly recognized by the application. Adobe ExtendScript defines F i l e and F o l d e r objects to provide platform-independent access to the underlying file system. c o n fi r m . the ExtendScript Reflection interface. the ExtendScript Toolkit. Interapplication Communication: ExtendScript provides a common scripting environment for all Adobe applications.

or third-party render management software. you can use the ExtendScript Toolkit. Shutdown and Startup folders Within the Scripts folder are two folders called Startup and Shutdown. in alphabetical order. After Effects runs scripts in these folders automatically. or an external text-editing application that creates files with Unicode UTF-8 text encoding. within the same folder as your After Effects application file. They are executed after the application is initialized and all plug-ins are loaded. although to appear in the Scripts menu it must be saved in the Scripts folder within the After Effects application folder. and choose the script in the Open dialog box. as you can with Adobe Photoshop® actions. choose Preferences > General. This occurs after the project is closed but before any other application shutdown occurs. Alternatively. Beware of applications such as Microsoft Word that by default add header information to files. from a command line (on Windows) or from AppleScript (on Mac OS).Overview Accessing and writing scripts 6 Adobe supplies a full-featured JavaScript debugger. not with expressions. There is no built-in method for recording a series of actions in After Effects into a script. When editing or writing scripts. you can send After Effects a script from the ExtendScript Toolkit. The Toolkit is disabled by default so that casual users do not encounter it. Scripting shares a global environment. on starting and quitting. once defined by running a script that contains them. In the Startup folder you can place scripts that you wish to execute at startup of the application. choose File > Scripts > Run Script File. To appear in the Open dialog box. Note that the Toolkit operates only when executing a script. see the JavaScript Tools Guide. Only scripts contained in this Scripts folder when the application starts are automatically listed in the Scripts menu. Accessing and writing scripts To create and edit scripts for After Effects. To activate the Toolkit on the local computer when a script error is encountered. persist in subsequent scripts during a given After Effects session. In all cases. 6 . variables and functions. The Scripts menu and Scripts folder After Effects scripts reside in the Scripts folder. Scripts are created outside After Effects and then executed within it. even though expressions also make use of JavaScript. or externally via a command-line. your script must include the proper . and select Enable JavaScript Debugger. respectively. the Toolkit can help you diagnose script problems more quickly. causing them to fail. called the ExtendScript Toolkit. A script can reside anywhere. To run a script that does not appear in the Scripts menu. although a script file can reside anywhere. js x file extension. so any script executed at startup can define variables and functions that are available to all scripts. these create line 0 errors in scripts. The Shutdown folder scripts are executed as the application quits. Attributes can also be added to existing objects such as the Application object (see “Application object” on page 19) to extend the application for other scripts. so that a script does not inadvertently reassign global variables intended to persist throughout a session. the ExtendScript Toolkit. For detailed information on the ExtendScript Toolkit. all such globally defined variables and functions are cleared. Be sure to give variables in scripts unique names. Once the application is quit.

10. Use this folder for scripts whose user interface appears in a native panel (as opposed to a floating palette. or window).add("bu tt on". } v a r m y T o o l s P a n e l = c r e at e U I ( t h i s ) . dialog box. you can create another folder named ScriptUI Panels. "T ool #1 ") . "T ool #1 ") . For example: f u n c t io n c r e a teU I ( th is O b j) { v a r m y P an e l = ( th is O b j i n st an c e o f P a n e l ) ? t h i s O b j : n e w W i n d o w ( " p a l e t t e " . you cannot use "this" as it will refer to the function itself. Sending a script to After Effects from the system If you are familiar with how to run a script from the command line in Windows or via AppleScript. you can send a script directly to the open After Effects application. } v a r m y T o o l s P a n e l = c r e at e U I ( t h i s ) . The script text appears in quotation marks following the a ft erf x . return myPanel. If your script creates its user interface in a function. "T ool #1 ") . The advantage of a panel is that it can be docked with other panels. not the panel. 10.show(). 3 00. 30 ]. myPane l. [100 . 10 0. 30 ]. 30 ]. the following code adds a button to a panel: va r myPane l = t his. a ScriptUI Panels script uses the "this" object that represents the panel. [10 .add("bu tt on". 100 . Composition. myPane l.s command: a ft erf x .Overview Sending a script to After Effects from the system 7 The Window menu and ScriptUI Panels folder Within the Scripts folder.show(). you copy and paste your After Effects script directly on the command line and then run it. For example. return myPanel.s ho w ( ). m y P an e l . you should pass the "this" object as an argument to your function. myToolsPanel. 3 00]). 10. and Time Controls. 100 .add("bu tt on". check whether "this" is a Panel object. such as Project. " M y T o o l s " . Instead of creating a Window object an adding controls to it. How to include After Effects scripting in a command line (Windows) Following are examples of Windows command-line entries that will send an After Effects script to the application without using the After Effects user interface to execute the script. so that the application automatically runs the script. myToolsPanel.e xe . Like native panels. In this case. and appear more integrated into the application. ScriptUI Panels scripts are accessed from the Window menu. To make your script work with either a Window object (accessible from the File > Scripts menu) or a native panel (accessible from the Window menu). You cannot use the File > Scripts > Run Script File menu command to run a script that refers to "this". For example: f u n c t io n c r e a teU I ( th is O b j) { va r myPane l = t hisO b j. In the first example. myPane l. [10 . [10 . 100 .ex e -s " a le rt (" Y o u j us t s en t an al e rt t o Af t er E f f ec ts " ) " 7 .

8 . Testing and troubleshooting Any After Effects script that contains an error preventing it from being completed generates an error message from the application. The script text appears within quotation marks following the DoScript command. check out Matt Neuberg’s AppleScript: the Definitive Guide (O’Reilly & Associates) or Sal Soghoian’s AppleScript 1-2-3 (Peachpit Press). *) t e l l ap p l ic a ti o n " T e xt E d i t" s e t the _ sc r ip t to s e l e c t i o n as te x t en d t ell t el l ap p l ic a ti on "A dob e Af ter Eff ec t s C S3 " a ct i vat e D o S c r i pt th e _ s cr ip t en d t ell For more information on using AppleScript. This error message includes information about the nature of the error and the line of the script on which it occurred. if you do not know the proper name of the application. so internal quotes in the script must be escaped using the backslash escape character.Overview Testing and troubleshooting 8 Alternatively. as follows: s et the F i le to c h oos e f i le t el l ap p l ic a ti on "A dob e Af ter Eff ec t s C S3 " D oS c ri pt th eF i l e en d t ell Finally. e x e -r " c : \ m y D o c u m e n t s \ Sc r i p ts \ S c r i pt N am e w it h S p ac e s . type in your best guess to replace “TextEdit” and AppleScript prompts you to locate it. you can specify the location of the JSX file to be executed. this script is perhaps most useful when you are working directly on editing a JSX script and want to send it to After Effects for testing or to run.j sx " How to include After Effects scripting in an AppleScript (Mac OS) Following are three examples of AppleScript scripts that will send an existing JSX file containing an After Effects script to the application without using the After Effects user interface to execute the script. To use it effectively you must enter the application that contains the open JSX file (in this example it is TextEdit). jsx a f t e r f x . you copy your After Effects script directly into the Script Editor and then run it. For example: a ft er f x . Simply highlight the script text that you want to run. In the first example. and then activate this AppleScript: (* T h i s s c r i p t s e n d s t he c u r r e n t s e l e c t i o n t o A ft er E f f e c t s a s a s c r i p t . you could display a dialog box asking for the location of the JSX file to be executed. as follows: t el l ap p l ic a ti on "A dob e Af ter Eff ec t s C S3 " D o S c r i p t " a l e r t( \ " Y o u j u s t s e n t a n aler t t o Af te r Ef fe ct s \")" en d t ell Alternatively. e x e -r c : \ m y D o c u m e n t s \ Sc r i p t s \ y o u r AE S criptH ere.

Scripters should be careful about giving variables in scripts unique names. Another very readable source is JavaScript: A Beginner’s Guide (Osborne) by John Pollock. Standard JavaScript loop construct..Overview More resources to learn scripting 9 Additionally. The following table lists and describes all keywords and statements recognized by the After Effects scripting engine. Books that deal with JavaScript 1. available at ww w. Similar to the w h il e loop. objects. however. so any script executed at startup can define variables and functions that are available to all scripts.in 9 . JavaScript variables Scripting shares a global environment. ecma -in t ern atio nal . refer to ECMA-262. precedence. so that a script does not inadvertently reassign global variables intended to persist throughout a session. except loop condition evaluation occurs at the end of the loop. Standard JavaScript construct.. variables and functions. expressions. statements. see the ExtendScript Toolkit documentation in the JavaScript Tools Guide. persist in subsequent scripts during a given After Effects session.ht m . In all cases. Label used in a s w i tc h statement when a c a s e label is not found.pdf. After Effects includes a JavaScript debugger. For a complete listing of the keywords and operators included with ECMAScript. and statements. For more information on activating and using the debugger. Label used in a s w i tc h statement. all such globally defined variables and functions are cleared. types. The After Effects scripting engine supports the 3rd Edition of the ECMA-262 Standard. Both of these texts contain information that pertains only to extensions of JavaScript for Internet browsers. Literal representing the boolean false value. exit the currently executing loop. and associativity. One book that is something of a standard for JavaScript users is JavaScript: The Definitive Guide (O’Reilly) by David Flanagan.2 are also useful for understanding how scripting works in After Effects.w hile f al s e for f or. including its notational and lexical conventions. Table 1 Keywords and Statement Syntax Description Standard JavaScript. JavaScript keywords and statement syntax Although it is not possible to provide an exhaustive resource describing usage of JavaScript. they also contain thorough descriptions of scripting fundamentals. Standard JavaScript construct. .o rg/pu blicatio ns/stan dard s/Ecm a-262 . Provides a way to easily loop through the properties of an object. cease execution of the current loop iteration. operators. once defined by running a script that contains them. . More resources to learn scripting Many resources exist for learning more about scripting that uses the ECMA standard. Once the application is quit. There are also books for using AppleScript and creating Windows command line scripts. Keyword/Statement break continue case d e f au lt d o. Standard JavaScript. the following tables provide an overview of keywords. each of which can be used to send scripts to After Effects.

new delete t y pe o f vo id . except loop condition evaluation occurs at the beginning of the loop. [] () ++ –– – ~ ! * / % 10 .. Logical NOT.w hile loop. Table 2 Operators Description of Operators Description Allocate object. Standard JavaScript way of returning a value from a function or exiting a function.or post-increment. Structure member. e l s e new n u ll re tu rn s wi t c h t hi s t rue un de fined va r w hi l e w i th JavaScript operators The following tables list and describe all operators recognized by the After Effects scripting engine and show the precedence and associativity for all operators. Literal representing the boolean true value. Pre. Pre. Array element. f u n c t io n i f / if . Returns undefined value. Unary negation or subtraction. Modulo division. or object property has not yet been assigned a value. Divide. Deallocate object. array element. Standard JavaScript syntax used to declare a local variable. Multiply. Function call. Bitwise NOT. Standard JavaScript constructor statement. . . Similar to the d o. or object property to indicate that it does not contain a legal value. Indicates that the variable. Standard JavaScript construct. Returns data type. Standard JavaScript way of evaluating a JavaScript expression and attempting to match the expression’s value to a c a se label. Standard JavaScript construct used to specify an object to use in subsequent statements. Standard JavaScript conditional constructs. array element.Overview More resources to learn scripting 10 Keyword/Statement Description Used to define a function. Assigned to a variable. Standard JavaScript method of indicating the current object.or post-decrement. .

Less than. !. Assignment with bitwise AND operation. ne w. Assignment with add operation. Logical OR. Assignment. Bitwise left shift. () .Overview More resources to learn scripting 11 Operators Description Add. – (u n ar y n eg at i o n ) . Table 3 Operator Precedence Associativity left to right right to left Operators (highest precedence to lowest) [ ]. Bitwise XOR. t y p eo f . Less than or equal. + +. Assignment with modulo division operation. – – 11 . Assignment with unsigned bitwise right shift operation. Assignment with bitwise XOR operation. Greater than or equal. Conditional (ternary). Multiple evaluation. voi d . Bitwise OR. Assignment with multiply operation. de le te . Bitwise AND. Not equal. Assignment with divide operation. Unsigned bitwise right shift. Greater than. Logical AND. Assignment with bitwise right shift operation. + << >> > >> < <= > >= == != & ^ | && || ?: = += –= *= /= %= < <= > >= > >> = &= ^= |= . Assignment with bitwise left shift operation. Equal. Bitwise right shift. . Assignment with bitwise OR operation. Assignment with subtract operation.

> . – ( su b tra c ti on) < <. << =. 12 . % =. /= . >> . != & ^ | && || ?: = . > = = =. ^= . % + . > > >= . –= . *= . < =. &=. /.Overview More resources to learn scripting 12 Operators (highest precedence to lowest) Associativity left to right left to right left to right left to right left to right left to right left to right left to right left to right left to right right to left right to left left to right *. += . |= . > >> < . > > =.

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

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

Represents the After Effects render queue. Represents an After Effects project. Represents an output module for a render queue. Collects output modules in a render queue. Collects render-queue items in a render queue. Provides access to the operating system from the application. Encapsulates keyframe ease values in an After Effects property. Encapsulates mask attributes in a layer. 15 . which appears in the Project panel. Describes a placeholder for footage. Represents a renderable item in a render queue. Collects items in a project. Represents a footage item imported into a project. A base class for layer classes.JavaScript Reference The After Effects Object Model 15 Object “FileSource object” on page 60 “FolderItem object” on page 62 “FootageItem object” on page 64 “FootageSource object” on page 67 “ImportOptions object” on page 73 “Item object” on page 76 “ItemCollection object” on page 79 “KeyframeEase object” on page 81 “Layer object” on page 83 “LayerCollection object” on page 92 “LightLayer object” on page 97 “MarkerValue object” on page 98 “MaskPropertyGroup object” on page 102 “OMCollection object” on page 104 “OutputModule object” on page 105 “PlaceholderSource object” on page 108 “Project object” on page 109 “Property object” on page 118 “PropertyBase object” on page 140 “PropertyGroup object” on page 147 “RenderQueue object” on page 152 “RenderQueueItem object” on page 155 “RenderQueueItem object” on page 155 “RQItemCollection object” on page 161 “Shape object” on page 164 “ShapeLayer object” on page 167 “SolidSource object” on page 168 “System object” on page 169 “TextDocument object” on page 171 “TextLayer object” on page 172 Description Describes footage that comes from a file. Encapsulates options for importing files into After Effects. Represents an item in a project that appears in the Project panel. Represents a folder in the Project panel. Encapsulates marker values in an AE property. Represents an After Effects property group. Describes the file source of some footage. Collects layers in a project. A base class for After Effects property and property group classes. Encapsulates the outline shape information for a mask. Provides access to application settings and preferences. Represents a shape layer within a composition. Represents an After Effects property. Encapsulates the text in a text layer. Represents a light layer within a composition. Describes a solid color that is the source of some footage. Represents a text layer within a composition.

Parameters f o r m a tt e d T i m e The frame time value. f ps . 16 .4 seconds (12/30). Converts a numeric time value to a string time value.JavaScript Reference Global functions 16 Global functions These globally available functions that are specific to After Effects. c o n f ir m . Any JavaScript object or function can call these functions. a string specifying a number of frames in the project’s current time display format.5 seconds (12/24). with no line break added. If the frame rate is 30 fps. Returns Nothing. For details. i s D u r a t i o n) Description Converts a formatted string for a frame time value to a number of seconds. see the Adobe Bridge® JavaScript Reference. clearOutput() global function clearOutput() Description Clears the output in the Info panel. Parameters None. Global function Description Clears text from the Info panel. Writes text to the Info panel. which allow you to display text in a small (3-line) area of the Info panel. currentFormatToTime() global function cur rent F orma tTo T im e( f o r m a t t e d T i m e . given a specified frame rate. the frames are counted from 0. adding a line break at the end. NOTE: The After Effects global functions for standard dialogs and file I/O are still supported in this release. For example. clearOutput() cur rent F orma tTo T im e() t im eToCu rren tForm at () w r i te () writeLn() Additional global functions for standard user I/O (ale rt . If the time is a duration. Writes text to the Info panel.5 documentation. and the frame rate is 24 fps. for detailed reference information. Converts string time value to a numeric time value. if the formatted frame time value is 0:00:12 (the exact string format is determined by a project setting). but are deprecated and will not be supported in future releases. Otherwise. the frames are counted from the project’s starting frame (see “Project displayStartFrame attribute” on page 111). and p r o m pt ) and static functions for file I/O. the time would be 0. and to convert numeric time values to and from string values. see the After Effects 6. are defined by ExtendScript. the time would be 0.

Optional. the time is measured from the project’s starting frame. the number of seconds. When true. If the time is a duration. with no line break added. that is. The format of the timecode string is determined by a project setting. the frames are counted from 0. Parameters t im e fps i s D u r a t io n The number of seconds. and the frame rate is 24 fps. Example w r i te (" T h i s t e x t a pp e a rs i n I n fo pa n e l " ) . the frame would be 0:00:12 (when the project is set to Display Timecode). For example. When true. When false (the default). the frame would be 0:00:15. the time is a duration (measured from frame 0). a formatted string that shows which frame corresponds to that time. at the specified rate. the time is a duration (measured from frame 0). a floating-point value. the time is measured from the project’s starting frame. " ) .JavaScript Reference Global functions 17 fps i s D u r a t io n The frames-per-second. w r i t e (" w i t h m o r e o n s a m e l i n e . Returns String in the project’s current time display format. Nothing. timeToCurrentFormat() global function t im eToCu rren tForm at (t i m e . a floating-point value. Returns Floating-point value. if the time is 0. 17 . the frames are counted from the project’s starting frame (see “Project displayStartFrame attribute” on page 111). Otherwise. If the frame rate is 30 fps. Optional. a floating-point value. f ps . Parameters t ex t Returns The string to display. i s D u r a t i o n) Description Converts a numeric time value (a number of seconds) to a frame time value. Truncated if too long for the Info panel. The frames-per-second. write() global function w r i te (t e x t) Description Writes output to the Info panel.5 seconds. When false (the default).

Parameters t ex t Returns The string to display. Nothing.JavaScript Reference Global functions 18 writeLn() global function w r i t e L n ( t e x t) Description Writes output to the Info panel and adds a line break at the end. Example w r i te l n (" T h i s t e x t a pp ea rs on f ir st l i n e" ) . w r i te l n (" T h i s t e x t a pp ea r s o n s e c o n d l i n e " ) . 18 .

and creates a project file as necessary. A positive number indicates an error that occurred while running the script. the local application is running in Watch Folder mode. purge memory. When true. open an existing 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 161 “Application onError attribute” on page 26 “Application exitCode attribute” on page 24 When true. A numeric status code used when executing a script externally (that is. the application remains open after running a script from the command line on Windows. from a command line or AppleScript). it closes the open project. Attributes of the Application object provide access to specific objects within After Effects. control Watch Folder mode. and quit the After Effects application. When true. “Application buildNumber attribute” on The number of this build of the application. When true. e x i t A f ter L a u n ch A n d E v a l “Application exitAfterLaunchAndEval attribute” on page 23 s ave Pr oje ct O nCra sh memoryInUse “Application saveProjectOnCrash attribute” on page 28 “Application memoryInUse attribute” on page 25 19 . Memory in use by this application. prompting the user to save or discard changes as necessary. the project is saved if the application closes unexpectedly. onE rror exitCode A callback function that is called when an error occurs in the application. 0 if no error occurred. When the After Effects application quits. The name of this build of the application. ap p . Methods of the Application object can create a project. The single global object is always available by its name.JavaScript Reference Application object 19 Application object a pp Description Provides access to objects and application settings within the After Effects application. The version number of the After Effects application. project language ve rsio n buildName buildNumber isWatchFolder isRenderEngine s e t ti n g s The language in which the application is running. Application settings that can be set via scripting. the local After Effects application is running as a render engine. Attributes Attribute Reference “Application project attribute” on page 28 and “Project object” on page 109 “Application language attribute” on page 24 “Application version attribute” on page 30 “Application buildName attribute” on page 21 Description The current After Effects project.

“Application parseSwatchFile() method” on Loads a color swatch from an Adobe Swatch page 27 Exchange (ASE) file. Parameters None. needed only when a script contains more than one undo group. Pauses a current watch-folder process. “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. n e w P r o j ec t ( ) open() q ui t( ) w at c hF o l d er ( ) p au se W at c h F o l d e r ( ) e n d W a tc h F o l d e r( ) p u r g e () b e g in U n d o G r o u p( ) endUndoGroup() b e g in S u p p r e s s Di al o g s( ) e n dS u p p r e s s Di al o g s ( ) s e t M e m o r y Us ag e L i m i ts () set Sa vePre fe rencesO n Qu it () a ct i vat e( ) s c h e d u l e T as k( ) c a n ce l T a s k () p a r se S w at c h F i l e ( ) Opens a project or an Open Project dialog box. Begins suppression of dialogs in the user interface. “Application scheduleTask() method” on page 29 “Application cancelTask() method” on page 22 Schedules a JavaScript script for delayed execution. Application activate() method a pp . Sets whether preferences are saved when the application is quit. Starts Watch Folder mode.a c ti va te( ) Description Opens the application main window if it is minimized or iconified. page 23 “Application purge() method” on page 28 Purges a targeted type of cached information (replicates Purge options in the Edit menu). Sets memory usage limits as in the Memory & Cache preferences area. Groups the actions that follow it into a single undoable step. and brings it to the front of the desktop. Quits the application. Ends suppression of dialogs in the user interface. Cancels a scheduled task.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. Ends an undo group. does not return until Watch Folder mode is turned off. “Application endWatchFolder() method” on Ends a current watch-folder process. 20 .

In this case. 21 . Type String. Returns Nothing. See “Application endSuppressDialogs() method” on page 22. Parameters undoString Returns The text that will appear for the Undo command in the Edit menu (that is. 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 endSuppr essD ialogs() to resume the display of error dialogs. Parameters None. used internally by Adobe for testing and troubleshooting.JavaScript Reference Application object 21 Returns Nothing.) b e g in U n d o G r o u p( ) and e n d U n d o G r o u p ( ) pairs can be nested. and will undo correctly. (See “Application endUndoGroup() method” on page 22. Application beginSuppressDialogs() method a pp . Use the e n d U n d o G r o u p ( ) method to mark the end of the group.b e g in Su pp r e ss Di a lo g s( ) Description Begins suppression of script error dialog boxes in the user interface.b u il d N am e Description The name of the build of After Effects being run. “Undo <u nd oS tri n g> ”) Nothing. Application beginUndoGroup() method a pp . read-only.b e g in Un d oG rou p( u n d oS t r in g) Description Marks the beginning of an undo group. Application buildName attribute a pp . the names of inner groups are ignored. Groups within groups become part of the larger group.

Application endSuppressDialogs() method a pp . read-only. Application cancelTask() method a pp . See “Application beginSuppressDialogs() method” on page 21. You can use this method to place an end to an undo group in the middle of a script. as returned by ap p . Application endUndoGroup() method a pp . Type Integer.e n dU n d oG rou p( ) Description Marks the end of an undo group begun with the a p p .c a n c e l T as k (t a s k I D ) Description Removes the specified task from the queue of tasks scheduled for delayed execution. errors that have occurred following the call to b e g i n S u p p r e ss D ia l o g s ( ) are displayed in a dialog box.JavaScript Reference Application object 22 Application buildNumber attribute a pp . should you wish to use more than one undo group for a single script. when true. used internally by Adobe for testing and troubleshooting. Error dialogs are displayed by default. the system will close the undo group automatically. you do not need to use this method. 22 .e n dS u p p r e s s Di al o g s( al er t ) Description Ends the suppression of script error dialog boxes in the user interface. in its absence at the end of a script. Returns Nothing. Nothing. b e g i n U n d o Gr ou p ( ) method. Parameters a l ert Boolean. call this method only if b e g i n S u p p r e s s Di al o g s ( ) has previously been called.s ch e d u l e T a s k( ) . If you are using only a single undo group for a given script.b u il d N u m b e r Description The number of the build of After Effects being run. Parameters t as kI D Returns An integer that identifies the task.

the – r or – s command line flag causes the application to run a script (from a file or from a string. respectively). Type Boolean. e xi t A f t e r L a u n c h A n d E v a l Description This attribute is used only when executing a script from a command line on Windows. Application endWatchFolder() method a pp . 23 . When the application is launched from the command line. read/write. if it is false. Parameters None.e n dW atc h F ol d er( ) Description Ends Watch Folder mode. Parameters None Returns Nothing. If this attribute is set to true. It has no effect in Mac OS. See also “Application watchFolder() method” on page 30 “Application parseSwatchFile() method” on page 27 “Application isWatchFolder attribute” on page 24 Application exitAfterLaunchAndEval attribute a p p .JavaScript Reference Application object 23 Calling this method without having set a b e g in Un d o G r o u p( ) method yields an error. This attribute only has an effect when After Effects is run from the Windows command line. After Effects will exit after the script is run. Returns Nothing. the application will remain open.

Type A L a n gu ag e enumerated value. Type Boolean. Application isWatchFolder attribute a pp . read-only. Type Boolean. Application language attribute a pp . and a script was specified with the – r or – s option. read-only. One of: 24 . • in Mac OS. the value is returned on the command line when After Effects was launched on the commands line (using the af te rf x or a f t er f x – m command). the script can set this to a positive integer that indicates what error occurred.e xi t C o d e Description A numeric status code used when executing a script externally (that is. i f v alue is 2. • In Windows. from a command line or AppleScript). read/write.isRenderEngine Description True if After Effects is running as a render engine.JavaScript Reference Application object 24 Application exitCode attribute a pp . Example a pp .i s W at c h F o l d e r Description True if the Watch Folder dialog box is currently displayed and the application is currently watching a folder for rendering. an er ror h as occurr ed Application isRenderEngine attribute app. Type Integer. read-only. In the event of an error while the script is running. e xi t C o d e = 2 . the value is set to 0 (E X I T _ S U C C E S S ) at the beginning of each script evaluation. In both Mac OS and Windows. the value is returned as the AppleScript D oS cr ip t result for each script. / / o n qui t .l a n g ua g e Description The language After Effects is running.

If the user cancels out of the Save dialog box. p r o je c t .c l o s e ( C l o s e O p t io n s. e l s e i f ( l a n g = = L a n g u a g e.SPANISH Example v a r l a n g = a pp . D O _ N O T _ S A V E _ C H A N G E S ) . the new project is not created and the method returns null. D O _ N O T _ SA VE _ C H A N G E S ) to close the current project before opening a new one.memoryInUse Description The number of bytes of memory currently used by this application. p r o j e c t . If the current project has been edited.JavaScript Reference Application object 25 L a n g u a g e . or null if no new project is created. Type Number. l a n g u a g e . See “Project close() method” on page 111. I T AL I A N Language.n e wP ro jec t () .JAPANESE Language. c l o s e ( C l o s e Op t io n s . F R E N C H ) a l e r t (" A f t e r E f f e c t s i s r un n i n g i n F r e n c h . Application newProject() method a pp . Application memoryInUse attribute app. " ) . E N GL I SH Language. " ) . Example a pp .n e wP ro jec t () Description Creates a new project in After Effects. 25 . a pp . the user is prompted to save it.ENGLISH) a l e r t (" A f t e r E f f e c ts i s r u n n i n g i n E n g l i s h . read-only.GERMAN L a n g u a g e . if (lang == Language. Returns A new Project object.FRENCH Language. else a l e r t (" A f t e r E f f e c ts i s n o t r u n n i n g i n E n g l i s h o r F r e n c h . Use a pp . " ) . Parameters None. replicating the File > New > New Project menu command.

or null if no function is assigned. Example v a r m y _ f il e = n e w F i l e ( " .JavaScript Reference Application object 26 Application onError attribute a pp. or null if the user cancels the Open dialog box. Returns A new Project object for the specified project.o pe n () a pp . Type A function name string. file. for example. Application open() method a pp . the method prompts the user to select a project file. you can respond to errors systematically. i f (m y _ f i l e . n ame ). you can close and restart the application. .o n Erro r Description The name of a callback function that is called when an error occurs. The callback function is passed the error string and a severity string. If not supplied.o p e n ( m y _ f il e ). i f (n e w_ p r o j e c t) { a l ert (ne w_proj ect. noting the error in a log file if it occurred during rendering.o n Erro r = e rr. a e p" ) . Example f u n c t io n e r r ( e r r S t r i n g ) { a l ert (e rrStr ing).o pe n (f i l e) Description Opens a project. An ExtendScript File object for the project file to open. } } 26 . By creating a function and assigning it to this attribute. Parameters file Optional. See “RenderQueue render() method” on page 153. /m y _ fol d e r / m y _ t e s t . e x i s ts ) { n e w_ p r o j e c t = ap p . It should not return any value. read/write. } a pp.

1. v al u e s S w at ch V a l u e . The ASE version number.. Parameters p au se Returns True to pause. b S w a t ch V a l u e .0 is Black. One of " R G B " . b S w at ch V a l u e . in this format: d at a.0]. The swatch data. the value range is [0.0] 0. g S w at ch V a l u e . c S w at ch V a l u e .0]. 0. 0.0. When t y pe = " G ra y " . the color values in the range [0. 0. the color values. a S w at ch V a l u e .0].JavaScript Reference Application object 27 Application parseSwatchFile() method a pp .0. When t y pe = " C M YK " .0.. Parameters file Returns The file specification. the color values in the range [0. L S w at ch V a l u e .+128. 0 is Black.p ar se Sw a tc h F i l e (file ) Description Loads color swatch data from an Adobe Swatch Exchange (ASE) file.0. a and b are in the range [-128. r S w at ch V a l u e . 0 is White.0]. v al u e When t y pe = " L A B" . an ExtendScript F i l e object. " L A B " . An array of S wa tc h V al u e .p au se W at c h F o l d e r (p au se ) Description Pauses or resumes the search of the target watch folder for items to render. 0 is Black. 27 . false to resume.0.. 0. L is in the range [0. t y p e S w at ch V a l u e . 0. 0. y S w at ch V a l u e . k S w at ch V a l u e .. Application pauseWatchFolder() method a pp .1. Nothing. m in orVe rs io n d at a. 0. m S w at ch V a l u e . " G r a y " When t y pe = " R G B " .. " C M Y K " . m ajo r V e r si o n d at a.1.1.

p r o j e c t Description The project that is currently loaded.p u r g e ( t a r ge t) Description Purges unused data of the specified types from memory. S N A P S HO T _ C A C HE S : Purges all data cached as comp/layer snapshots. Parameters None. Replicates the Purge options in the Edit menu. See “Project object” on page 109. A L L _ C A C H E S : Purges all data that After Effects has cached to physical memory.q ui t( ) Description Quits the After Effects application. read-only. • P u r g e T a r g e t . • Pur g e T a r g e t . Returns Nothing. a Pu rgeTa rget enumerated value. Application quit() method a pp . I M A G E _ C A C H E S : Purges all saved image data.s av e P r o je c tO n C r a sh 28 . Parameters t arg e t The type of elements to purge from memory. Application purge() method a pp . Type Project object. • Pur g eTa rget . Application saveProjectOnCrash attribute a pp . one of: • P u r g e T a r g e t .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.U N DO _ C ACH E S : Purges all data saved in the undo cache.

and is otherwise a percentage of n. Parameters s tr in g T o E x e c u t e delay re pe at A string containing JavaScript to be executed. 4 Gb for Win64. When true. r e p ea t) Description Schedules the specified JavaScript for delayed execution. Set to false to suppress this dialog box and quit without saving. if installed RAM is less than a given amount (n gigabytes). m ax i m u m M e m o r y P e r c en t a g e) Description Sets memory usage limits as in the Memory & Cache preferences area. Returns Integer. 3. 29 . Floating-point value. The value of n is: 2 Gb for Win32. the value is a percentage of the installed RAM.s c h e du le T as k (s t r i n g T oE x e c u t e. 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.s e t M e m o r y Us ag e L i m i ts (i m ag eC a ch eP e rce n t ag e. a unique identifier for this task.JavaScript Reference Application object 29 Description When true (the default). which can be used to cancel it with a p p. For both values. Application setSavePreferencesOnQuit() method a pp . execute the script repeatedly. Parameters i m a g eC a ch eP erc e n ta g e m a x im u m M e m o r y P e r c e n t a g e Returns Floating-point value. A number of milliseconds to wait before executing the JavaScript. Application setMemoryUsageLimits() method a pp . the maximum usable percentage of memory. c anc el Ta sk ( ) . Application scheduleTask() method a pp . the percentage of memory assigned to image cache. Type Boolean. read/write.s e t S ave Pr e fe r e n c e sO n Q u i t(do Save ) Description Set or clears the flag that determines whether preferences are saved when the application is closed. Nothing.5 Gb for Mac OS. When false the script is executed only once. de l a y. with the specified delay between each execution. A floating-point value.

s e t ti n g s Description The currently loaded settings. Nothing.JavaScript Reference Application object 30 Parameters d o S av e Returns When true.w at c h F o l d e r (t h e F o ld e r ). Type Settings object. Parameters folder_object_to_watch Returns The ExtendScript Folder object for the folder to watch. a pp . read-only. a l e r t ( " T h is m a c h i n e i s r un n i n g v e r s io n " + v e r + " o f A ft e r E f f e c t s . See “Settings object” on page 162.v ers i on Description An alphanumeric string indicating which version of After Effects is running. v e r s i o n . Example v a r v e r = a pp . Example var theFolder = new Folder(“c:/tool”). when false they are not. preferences saved on quit. read-only. Type String. " ) . Nothing. Application watchFolder() method a pp . 30 . Application settings attribute a pp . Application version attribute a pp .w at c h F o l d e r (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.

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 .

Current time of the item. • AVItem is the base class for both CompItem and FootageItem. The FootageItem object used as proxy for the item. name w i dt h h ei g ht p i xe l A s pe c t f r am e R a te f ram eDu rat ion d u r a ti o n usePro xy proxySource t im e usedIn h as Vi de o h as Aud i o f o o t a g e Mi s s i n g “AVItem frameDuration attribute” on page 33 The frame duration for the item.i te m (i nd e x) Description The AVitem object provides access to attributes and methods of audio/visual files imported into After Effects. The CompItem objects that use this item. the item has a video component.JavaScript Reference AVItem object 32 AVItem object a pp . 32 . page 36 s e t Pr o x y T o N o n e () “AVItem setProxyToNone() method” on page 36 Removes the proxy for the item. See “Item object” on page 76. Sets a sequence as a proxy for the item. When true. a proxy source is used for this item. s e t Pr o x y () s et Pr o x y W it hS eq ue n c e() s et Pr o x y W it hS o l i d () Sets a solid as a proxy for the item. When true. 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 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. The frame rate of the item. The height of the item.p r o j e c t . s etP rox yWi thP l acehold er() “AVItem setProxyWithPlaceholder() method” on Sets a placeholder as a proxy for the item. the item cannot be found or is a placeholder. When true. are available when working with AVItem. See “CompItem object” on page 52 and “FootageItem object” on page 64. The pixel aspect ratio of the item. • AVItem is a subclass of Item. All methods and attributes of Item. so AVItem attributes and methods are also available when working with CompItem and FootageItem objects. When true. the item has an audio component. in addition to those listed below. The width 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.

AVItem footageMissing attribute a pp . of the item. the value is linked to the du rat i on of the m a i n So u r c e object.3). and is read-only.d u r a ti o n Description Returns the duration. This is the reciprocal of f ra m eRa te . Still footage items have a duration of 0. When set.i te m (i nd e x) . which may not be identical to a value you set. the reciprocal is automatically set as a new f r am e R a te value. and is read-only..0. Type Boolean. the path of the missing source file is in the m i s s i n g F o ot a g e P a t h attribute of the footage item’s source-file object. set the c o n f o r m F r a m e R a t e of the m ai n S ourc e object. or represents footage with a source file that cannot be found. This attribute returns the reciprocal of the f r am e R a te . otherwise read/write.p r o j e c t . • In a CompItem.p r o j e c t . In this case. (1 / (1 / 0. This sets both the f rame Rat e and fr ame Dur at io n of the FootageItem.i te m (i nd e x) . See “FootageItem mainSource attribute” on page 65 and “FileSource missingFootagePath attribute” on page 60. read-only.0]. 1. read/write for a CompItem.JavaScript Reference AVItem object 33 AVItem duration attribute a pp .3)) is close to. if that value is not evenly divisible into 1. • In a FootageItem. Type Floating-point value in the range [1/99. this value is linked to the m a i n S o u r ce ..i te m (i nd e x) . and is read/write. Due to numerical limitations. 0. in seconds. the AVItem is a placeholder. 33 . AVItem frameDuration attribute a pp .3.0]. If the AVItem is a FootageItem. To change it.p r o j e c t .f ram eDu rat ion Description Returns the length of a frame for this AVItem. read-only for a FootageItem. the value is linked to the d u r a ti o n of the composition. otherwise. in seconds. but not exactly.10800. read-only. 0.0 (for example.f o o t a g e Mi s s i n g Description When true. Type Floating-point value in the range [0.

99.i te m (i nd e x) .he ight Description The height of the item in pixels. read-only. • In a FootageItem.. Type Floating-point value in the range [1.JavaScript Reference AVItem object 34 AVItem frameRate attribute a pp . This sets both the f ra m eRa te and f r a m e D u r a ti o n of the FootageItem. • In a CompItem.p r o j e c t . in frames-per-second. 34 .i te m (i nd e x) . the value is linked to the m a i n S o u r c e object. the value is linked to the composition.i te m (i nd e x) . To change it. • In a FootageItem. Type Boolean. the reciprocal is automatically set as a new f ram eDu rat ion value.p r o j e c t .ha sVide o Description When true. and is read-only.p r o j e c t .i te m (i nd e x) . the value is linked to the fr ame Rat e of the m a i n S o u r c e object. the AVItem has an audio component. AVItem hasAudio attribute a pp . AVItem height attribute a pp . the AVItem has an video component. read-only. This is the reciprocal of the f rame Dur at io n .0. AVItem hasVideo attribute a pp . read-only for a FootageItem. set the c o n f o r m F r am e R a t e of the m ai n S ourc e object. the value is linked to the composition. When set.f r am e R a te Description The frame rate of the AVItem. the value is linked to the f r am e R a te of the composition.p r o j e c t . otherwise read/write. the value is linked to the m a i n S o u r c e object. • In a CompItem. and is read/write. • In a FootageItem. • In a CompItem. Type Boolean. and is read/write.h a s A u d i o Description When true.0]. • In a CompItem. the value is linked to the composition.

s et P rox y Wi th Se qu ence( ) . 0. to change it. Type String. 07. this value controls the display name in the Project panel. AVItem proxySource attribute a pp . the value is linked to the m a i n S o u r c e object.p r o x y S o u r ce Description The FootageSource being used as a proxy. AVItem name attribute a pp .100. These are the set {1. 2. 1 ..JavaScript Reference AVItem object 35 • In a FootageItem. read-only. Certain pi x e l A s p e c t values are specially known to After Effects. 95. or s et Pr o x y W it hP l ac e ho l d er( ) .. 2.01. the value you retrieve after setting may be slightly different from the value you supplied. it is read-only. Otherwise. AVItem pixelAspect attribute a pp . Type Floating-point value.i te m (i nd e x) .42 . 9. • In a CompItem. Type Integer in the range [1. read/write.p r o j e c t .p r o j e c t . 35 .i te m (i nd e x) . 0. and are stored and retrieved with perfect accuracy. read/write. the value is linked to the composition.0]. 1. • In a FootageItem. and is read/write only if the m a i n So u r c e object is a SolidSource.. read/write.9} . If the m a in So u r c e object is a FileSource.p r o j e c t . • In a FootageItem. Other values may show slight rounding errors when you set or get them. that is. except as noted. in the range [0. 1.p i xe l A s pe ct Description The pixel aspect ratio of the item.i te m (i nd e x) . se tP rox y Wi t hS ol i d( ) . 1 . the value is linked to the m a i n S o u rc e object. as shown in the Project panel. the value is linked to the m a i n S o u r c e object. The attribute is read-only. but does not affect the file name.30000]. call any of the AVItem methods that change the proxy source: se tP rox y ( ) . Type FootageSource object.n a m e Description The name of the item.

99]. Parameters name w i dt h. the method estimates the alpha interpretation. and sets u se Pr ox y to true. this behavior occurs when a proxy has been set and then moved or deleted. h eight f r am e R a te A string containing the name of the new object.p r o j e c t .s et Pro x y( fil e) Description Sets a file as the proxy of this AVItem. s e t P r o x yT o N o n e ( ) Description Removes the proxy from this AVItem.. h e igh t . It does not preserve the interpretation parameters.p r o j e c t . an integer in the range [4. sets this as the value of the p r o x y S o u r c e attribute. an integer in the range [1. and sets the value of u se Pr ox y to f al s e . and sets u s e P r o x y to true. s e t Pro x yW it h P l a c e h o l d e r ( n am e .30000]. None. rather than asking the user. If the file has an unlabeled alpha channel. NOTE: There is no direct way to set a placeholder as a proxy in the user interface.i te m (i nd e x) .i te m (i nd e x) .. Returns Nothing. 36 . The pixel dimensions of the placeholder. instead using the user preferences. sets the value of p r o xy S o u r c e to null. The frames-per-second. sets this as the value of the p r o xy S o u r c e attribute. and the user preference says to ask the user what to do. du rat ion ) Description Creates a PlaceholderSource object with specified values. Loads the specified file into a new FileSource object. but both actions are performed as in the user interface. instead using the user preferences.i te m (i nd e x) . w idt h . It does not preserve the interpretation parameters.p r o j e c t . AVItem setProxyToNone() method a pp . Parameters None.JavaScript Reference AVItem object 36 AVItem setProxy() method a pp . This differs from setting a FootageItem's main source. Parameters file Returns An ExtendScript File object for the file to be used as a proxy. AVItem setProxyWithPlaceholder() method a pp . f r am e Ra t e.

37 . rather than asking the user. and the user preference says to ask the user what to do. using the user interface. sets this as the value of the p r o xy S o u r c e attribute. f o r ce A l ph a b e t i c a l ) Description Sets a sequence of files as the proxy of this AVItem. with the option of forcing alphabetical order. Nothing. w id t h .01.30000].set Pro x yW it hSeq uen ce ( f i l e . to set a solid as a proxy.0].10800. a floating-point value in the range [0.1. use the “Force alphabetical order” option. an array of 3 floating-point values. It does not preserve the interpretation parameters. the method estimates the alpha interpretation.i te m (i nd e x) .p r o j e c t . B].. and sets usePro xy to true.i te m (i nd e x) . Parameters file f o r c e A l ph ab e t i c al Returns An ExtendScript File object for the first file in the sequence. this feature is available only through scripting. h ei gh t .0]. Nothing. p ix el A s p ec t) Description Creates a SolidSource object with specified values.0. The pixel dimensions of the placeholder. 100. Loads the specified file sequence into a new FileSource object. an integer in the range [1. Parameters color name w i dt h.s et Pro x yW it hSolid (c ol o r. G.. and sets usePro xy to true. A string containing the name of the new object. AVItem setProxyWithSequence() method a pp .p r o j e c t . [R. up to 3 hours. The pixel aspect of the solid.JavaScript Reference AVItem object 37 d u r a ti o n Returns The total length in seconds. When true. NOTE: There is no way..0]. AVItem setProxyWithSolid() method a pp ... h eight p i xe l A s pe c t Returns The color of the solid. sets this as the value of the pr ox y So urc e attribute. na m e .. If any file has an unlabeled alpha channel. Nothing. An integer in the range [0.0. instead using the user preferences. instead using the user preferences. in the range [0. It does not preserve the interpretation parameters.

in pixels. and is read/write. except as noted. If you get this value. read-only. • In a FootageItem. and to false by the S e t Pr o x y T o N o n e () method. Use the global method t im eToCu rren tForm at to convert it to a string value that expresses the time in terms of frames. AVItem usedIn attribute a pp . the value is linked to the m a i n S o u r c e object. and is read/write only if the m a i n So u r c e object is a SolidSource. so it is not automatically updated.i te m (i nd e x) .JavaScript Reference AVItem object 38 AVItem time attribute a pp ..u s e P r o x y Description When true.p r o j e c t . read/write. It is set to true by all the S e tP r o x y methods.i te m (i nd e x) . AVItem width attribute a pp . i s S t i l l is true). Note: Upon retrieval.30000]. Type Floating-point value. see “timeToCurrentFormat() global function” on page 17.p r o j e c t .u s e d I n Description All the compositions that use this AVItem.i te m (i nd e x) .p r o j e c t . it is read-only.t im e Description The current time of the item when it is being previewed directly from the Project panel. • In a CompItem.p r o j e c t .w i dt h Description The width of the item. the array value is copied. 38 .i te m (i nd e x) . read/write. Type Integer in the range [1. Type Array of CompItem objects. you must retrieve the value again to get an array that includes the new item.m a in S o u rc e . Type Boolean. then add this item into another composition. AVItem useProxy attribute a pp . It is an error to set this value for a FootageItem whose m a in S o u rc e is still (ite m . a proxy is used for the item. read/write. This value is a number of seconds.. Otherwise. the value is linked to the composition.

39 . are available when working with AVLayer.i te m (i nd e x) . s t art T i m e . f i rst L a ye r. See “TextLayer object” on page 172. solid layers. footage layers.i te m (1 ). and in Poi n t .l a y e r ( inde x) Description The AVLayer object provides an interface to those layers that contain AVItem objects (Comp layers. l ay er( 1) . All methods and attributes of Layer. and sound layers). AE Properties Different types of layers have different AE properties. first L a ye r.sta rt Tim e = 1 . AVLayer has the following properties and property groups: Ma r k e r T i m e R em a p Motion Trackers M a s ks E f f e c ts T r a n s f o rm A n ch o r P o i n t P o s i ti o n S c al e O r i e n t a t io n X R o t at io n Y R o t at io n Ro ta ti on O pa c i ty Layer Styles M a t e r i a l O pt i o n s Ca st s Sh ad ow s L i g h t T r a n s m is s io n Ac c e pt s S h ad ow s Ac c e pt s Li gh ts Am bie n t D if f u s e S p e c u l ar Shininess M eta l Au dio Au dio L evels Example If the first item in the project is a CompItem. so AVLayer attributes and methods are available when working with TextLayer objects. va r f ir st L ay e r = a p p.JavaScript Reference AVLayer object 39 AVLayer object a pp .q ua li t y = L a y erQ ua li t y .BE ST . and the first layer of that CompItem is an AVLayer. in addition to those listed below. text layers. • AVLayer is a subclass of Layer. pro jec t . See “Layer object” on page 83.p r o j e c t . • AVLayer is a base class for TextLayer. the following sets the layer qua l i ty .

“AVLayer hasAudio attribute” on page 45 “AVLayer audioActive attribute” on page 41 “AVLayer blendingMode attribute” on page 42 “AVLayer preserveTransparency attribute” on page 47 “AVLayer trackMatteType attribute” on page 49 When true. When true. the layer has no expressly set name. When true. it is legal to change the value of c o l l a ps e T r an s f o r m a t i o n . “AVLayer timeRemapEnabled attribute” When true. the layer's audio is active at the current time. “AVLayer frameBlendingType attribute” The type of frame blending for the layer. this is an adjustment layer. 3D is set on a per-character basis in this text layer. When true. time remapping is enabled on this on page 48 layer. s o u r ce isNameFromSource h ei g ht w i dt h a ud io E n ab l ed m o t i o n B lu r effectsActive a d j us t m e n t L a y e r gu ideLa y er t hre eDLa yer t hre eDP er C ha r c a n Se tC o ll a p s e T ra n s f o r m a t i o n c o l l a p s e T r an s f o r m a t i o n f r am e Bl e n di n g f r am e Bl e n di n g T y p e c a n Se tT i m e R em a p E n ab l e d t im eRem ap E n ab l e d h as Aud i o a ud io Ac ti ve b l e n d i n g M o de p r e s e r v e T r a n s p a re n c y t rac k M a tt eT y p e “AVLayer isNameFromSource attribute” When true. 40 . on page 46 but contains a named source. preserve transparency is enabled. The blending mode of the layer. When true. frame blending is enabled.JavaScript Reference AVLayer object 40 f i r s t L a ye r. collapse transformation is on. “AVLayer adjustmentLayer attribute” on When true. this is a guide layer. it is legal to change the value of t i m e R e m a p E n a b le d . the layer's audio is enabled. on page 45 “AVLayer canSetTimeRemapEnabled attribute” on page 44 When true. When true. this is a 3D layer. page 41 “AVLayer frameBlendingType attribute” When true. When true. When true. “AVLayer height attribute” on page 46 “AVLayer width attribute” on page 49 “AVLayer audioEnabled attribute” on page 42 “AVLayer motionBlur attribute” on page 46 “AVLayer effectsActive attribute” on page 44 The height of the layer. i n P o i n t = 2 . The width of the layer. if layer has a track matte. Attributes Attribute Reference “AVLayer replaceSource() method” on page 47 Description The source item for this layer. When true. specifies the way it is applied. the layer's motion blur is enabled. the layer's effects are active. on page 45 “AVLayer threeDLayer attribute” on page 48 “AVLayer threeDPerChar attribute” on page 48 “AVLayer calculateTransformFromPoints() method” on page 43 “AVLayer collapseTransformation attribute” on page 44 “AVLayer frameBlending attribute” on page 45 When true. the layer contains an audio component. When true.

this layer is being used as a track matte for the layer below it. and the time must be between the i n P o i n t and o u t P o i n t of this layer. AVLayer audioActive attribute a pp . AVLayer adjustmentLayer attribute a pp . a d j u s t m e n t L a y e r Description True if the layer is an adjustment layer. The layer quality setting. i s T r a c k M a tt e h as T rac k Ma tt e q ual i t y a uto Ori e n t Methods Method Reference Description a ud io Ac ti ve AtT im e () calculateTransformFromPoints() re pla c eSource () s o u r ce R e c t A t T im e () “AVLayer audioActiveAtTime() method” Reports whether this layer's audio is on page 42 active at a given time. The type of automatic orientation for the layer.i te m (i nd e x) .p r o j e c t . “AVLayer calculateTransformFromPoints() method” on page 43 “AVLayer replaceSource() method” on page 47 “AVLayer sourceRectAtTime() method” on page 48 Calculates a transformation from a set of points in this layer. read-only.JavaScript Reference AVLayer object 41 Attribute Reference “AVLayer isTrackMatte attribute” on page 46 “AVLayer hasTrackMatte attribute” on page 45 “AVLayer quality attribute” on page 47 “AVLayer autoOrient attribute” on page 42 Description When true. Changes the source item for this layer.l a y e r ( inde x) .l a y e r ( inde x) . Type Boolean.p r o j e c t . When true. Type Boolean. a ud io E n ab l ed must be true. the layer above is being used as a track matte on this layer.i te m (i nd e x) . no other layer with audio may be soloing unless this layer is soloed too. Retrieves the source rectangle of a layer. read/write. For this value to be true. 41 .a u d i o A c t iv e Description True if the layer's audio is active at the current time.

and the time must be between the i n P o i n t and o u t P o i n t of this layer.l a y e r ( inde x) . AVLayer autoOrient attribute a pp .b l e n di n g M o d e Description The blending mode of the layer. a ud i o A c t i v e A t T i m e ( t i m e ) Description Returns true if this layer's audio will be active at the specified time. A floating-point value. Type Boolean. the layer's audio is enabled.i te m (i nd e x) . C A ME R A _ O R _ PO I N T _ O F _ I N T E R E ST Au toO ri en tT y p e.l a y e r ( inde x) . AVLayer audioEnabled attribute a pp . read/write. no other layer with audio may be soloing unless this layer is soloed too.i te m (i nd e x) .a u d i o E n a bl e d Description When true. One of: 42 . Parameters t im e Returns The time. Type A Blend i ngMo de enumerated value.JavaScript Reference AVLayer object 42 AVLayer audioActiveAtTime() method a pp .i te m (i nd e x) .N O _ AU T O_ O R I E N T AVLayer blendingMode attribute a pp . A L O N G _ P A T H A u t o O r i e n tT y p e . Type An A u t o O ri e n t T y p e enumerated value. One of: A u t o O ri e n tT y p e .p r o j e c t .l a y e r ( inde x) .a u t o Or i e n t Description The type of automatic orientation to perform for the layer. read/write. in seconds. This value corresponds to the audio toggle switch in the Timeline panel. Boolean.i te m (i nd e x) .laye r( inde x) . read/write.p r o j e c t . For this method to return true.p r o j e c t .p r o j e c t . a ud i oE n a b le d must be true.

laye r( inde x) . S I L H O U E T E _ A L P H A B le n d in g M o d e . y. z] . Parameters p o i n tT o pL e f t p o i n tT o pR ig h t p oi n tB ot tom Ri g ht The top left point coordinates in the form of an array. z] . S O F T _ L I G H T B le n d in g M o d e . y .c a l c u l at e T r a n s for m F r o m P o i n t s( p o i n t To p L e f t . L I N E A R _ D O D G E B le n d i n g M o d e . D I F F E R E N C E B le n d in g M o d e . D A N C I N G _ D I S S O L V E B le n d i n g M o d e . [ x. D AR K E N B le n d ing Mod e. The bottom right point coordinates in the form of an array.L UMIN E SC ENT_PREMU L B le n d i n g M o d e . [x . D I S S O L V E B le n di n g M o d e . y .A DD B le n d in g Mod e. C OL O R B le n d in g M o d e .p r o j e c t . L I G H T E N B le n d in g M o d e . E XCL U S I O N B le n d in g Mod e. C OL O R _ B UR N B le n d in g M o d e . M UL T I PL Y B le n ding Mode. V I V I D _ L I G H T AVLayer calculateTransformFromPoints() method a pp . L I N E A R _ B U R N B le n di n g M o d e .H UE B le n d i n g M o d e . P I N _ L I GH T B le n d in g M o d e . z ] . S T E N C I L _ A L P H A B le n d in g M o d e .i te m (i nd e x) . S T E N C I L _ L U M A B le n d in g M o d e . L I N E A R _ L I GH T B le n ding Mode. p o i n t T o p R ig h t . C OL O R _ D O D G E B le n d in g M o d e . O V E RL A Y B le n d in g M o d e . S I L H O U E T T E _ L U M A B le n d in g M o d e . L I G H T E R _ C O L O R B le n d in g M o d e .JavaScript Reference AVLayer object 43 B le n ding Mode. C L A S S I C _ C O L O R _ D O D G E B le n d i n g M o d e . C L A S S I C _ C O L O R _ B UR N B le n d in g M o d e . S C R E E N B le n d in g M o d e . H AR D_ M I X B le n ding Mode.H AR D_ L I G H T B le n di n g M o d e . L UM I N OS I T Y B le n d in g M o d e . 43 . p o i n t B ottomRig ht ) Description Calculates a transformation from a set of points in this layer. S A T U R A T I O N B le n d i n g M o d e . The top right point coordinates in the form of an array.D ARK E R_COL OR B le n d i n g M o d e . C L A S S I C _ D I F F E R E N C E B le n d in g M o d e .N ORM AL B le n d in g M o d e .A L P HA_ A DD B le n d in g M o d e . [x .

} AVLayer canSetCollapseTransformation attribute a pp . c a n S e t T im e R e m a p E n a b l e d Description True if it is legal to change the value of the time RemapE nabled attribute on this layer.l a y e r ( inde x) .c o ll a ps e T r an s f o r m a ti o n Description True if collapse transformation is on for this layer. as indicated by the <f> icon next to it in the user interface.i te m (i nd e x) . read-only. n e w L a y e r . va r t rans f orm = new L aye r.l a y e r ( inde x) .i te m (i nd e x) .l a y e r ( inde x) . e ff e c t sA c t i v e Description True if the layer's effects are active. 44 . read-only. read/write. tr a n s f o r m [ s e l ] . ne wLa y er.l a y e r ( inde x) .i te m (i nd e x) . A L P H A _ A D D . Type Boolean. AVLayer collapseTransformation attribute a pp . b le n d in g M o d e = B l e n d i n g M o d e . AVLayer canSetTimeRemapEnabled attribute a pp .layer s. AVLayer effectsActive attribute a pp .p r o j e c t .p r o j e c t . t r. Type Boolean.JavaScript Reference AVLayer object 44 Returns An Object with the transformation properties set. Example va r new L a y er = comp.p r o j e c t .i te m (i nd e x) . bl) . add(ne wFoo ta ge).s e t V al u e ( tr a n s for m [s e l ] ) . c a n S e t C ol l a p s e T r a n sf o r m a ti o n Description True if it is legal to change the value of the c o l l a p s e T r a n s f o r m a t io n attribute on this layer. for(va r se l in tra n sfor m) { n e w L a y e r . thr eeD Layer = t rue .calcu late Tra n sf orm F romP oints ( tl. Type Boolean.p r o j e c t .

l a y e r ( inde x) .h as T r a c kM a tt e 45 .i te m (i nd e x) .g u i de L ay e r Description True if the layer is a guide layer. read/write.l a y e r ( inde x) .p r o j e c t .l a y e r ( inde x) .i te m (i nd e x) . N O _ F R A M E _ B L E N D F r a m e B l e n d in g T y pe . AVLayer frameBlendingType attribute a pp .f r a m e B l e n d in g T y pe Description The type of frame blending to perform when frame blending is enabled for the layer.JavaScript Reference AVLayer object 45 Type Boolean. AVLayer hasAudio attribute a pp . read/write.p r o j e c t . AVLayer frameBlending attribute a pp .p r o j e c t .p r o j e c t . P I X E L _ M O T I O N AVLayer guideLayer attribute a pp .i te m (i nd e x) .l a y e r ( inde x) . One of: F r a m e B l e n d in g T y pe . Type A F r a m e B l e n d i n g T y p e enumerated value.f r a m e B l e n d in g Description True if frame blending is enabled for the layer. Type Boolean. Type Boolean.h as A u d i o Description True if the layer contains an audio component. F R A M E _ M I X F r a m e B l e n d in g T y pe . read-only.p r o j e c t .i te m (i nd e x) . AVLayer hasTrackMatte attribute a pp . Type Boolean.i te m (i nd e x) . read-only. regardless of whether it is audio-enabled or soloed. read/write.l a y e r ( inde x) .

p r o j e c t .l a y e r ( inde x) . AVLayer height attribute a pp .i te m (i nd e x) l a y e r (i nd e x) .i s N am e F r o m S o u r c e Description True if the layer has no expressly set name. read/write.JavaScript Reference AVLayer object 46 Description True if the layer in front of this layer is being used as a track matte on this layer. Type Floating-point. this layer's t rac k M a t t e T y p e value controls how the matte is applied.l a y e r ( inde x) . read-only. n am e has the same value as l a y e r . False if the layer has an expressly set name.i te m (i nd e x) .m o ti o n B l u r Description True if motion blur is enabled for the layer. Type Boolean.i te m (i nd e x) .s ource . AVLayer motionBlur attribute a pp . When true. read-only. In this case. Type Boolean. read-only.i te m (i nd e x) . AVLayer isTrackMatte attribute a pp . or if the layer does not have a source. AVLayer isNameFromSource attribute a pp . read-only.i s T r ac k M a tt e Description True if this layer is being used as a track matte for the layer behind it. 46 .h e i g ht Description The height of the layer in pixels.p r o j e c t .l a y e r ( inde x) . l a y e r. Type Boolean. Type Boolean.p r o j e c t .name .p r o j e c t . but contains a named source.

laye r( inde x) . See also “Project autoFixExpressions() method” on page 110.i te m (i nd e x) .re pla ce S ource () to change the value. 47 . Type AVItem object.p r o j e c t .s o u r c e Description The source AVItem for this layer. T rue to adjust expressions for the new source.JavaScript Reference AVLayer object 47 AVLayer preserveTransparency attribute a pp .BEST L a y e r Q u a l i t y . One of: LayerQuality.l a y e r ( inde x) .p r o j e c t . AVLayer source attribute a pp . read-only. do this only at the end of the operation.p r o j e c t .WIREFRAME AVLayer replaceSource() method a pp .p r o j e c t . Parameters newSource f i xE xp re ss i on s The new source AVItem object. Type Boolean. f ix Ex p re s si on s ) Description Replaces the source for this layer.p r e se r v e T r an s p ar e n c y Description True if preserve transparency is enabled for the layer.i te m (i nd e x) . read/write. Type A L a y e r Qu a l i t y enumerated value.i te m (i nd e x) . read/write.q u a l it y Description The quality with which this layer is displayed. AVLayer quality attribute a pp . fa l se otherwise. Use AV Layer .i te m (i nd e x) . Returns Nothing. D R AF T LayerQuality.l a y e r ( inde x) .l a y e r ( inde x) .r ep l ac eS our c e ( ne wS o ur ce . Note that this feature can be resource-intensive. if replacing a large amount of footage. The value is null in a Text layer.

l a y e r ( inde x).i te m (i nd e x) .t hr eeD Pe rCha r Description True if this layer has the Enable Per-character 3D switch set.i te m (i nd e x) . Use. read/write.l a y e r ( inde x) . Type Boolean. Extents apply to shape layers. 48 . T rue to include the extents. to write text that is properly aligned to the baseline. [ to p. Parameters t im eT e x t en t s The time index. w i dt h.laye r( inde x) . AVLayer threeDPerChar attribute a pp . Type Boolean. t i m e R e m a p E n a b l e d Description True if time remapping is enabled for this layer.i te m (i nd e x) . Returns A JavaScript object with four attributes. corrected for text or shape layer content. e x t e n t s ) Description Retrieves the rectangle bounds of the layer at the specified time index. AVLayer timeRemapEnabled attribute a pp . read/write.p r o j e c t .p r o j e c t . Type Boolean.JavaScript Reference AVLayer object 48 AVLayer sourceRectAtTime() method a pp . in seconds. fa l se otherwise. s o u rc e R e ct A t T i m e ( t i m e T . increasing the size of the layer bounds as necessary. Applies only to text layers.p r o j e c t . heigh t] .i te m (i nd e x) . left .t hr eeD Layer Description True if this is a 3D layer.l a y e r ( inde x). allowing its characters to be animated off the plane of the text layer. for example. A floating-point value.p r o j e c t . read/write. AVLayer threeDLayer attribute a pp .

read-only. Type Floating-point.t ra ck Ma tt eT y p e Description If this layer has a track matte. specifies the way the track matte is applied. Type A T r a c k M a t t e T y p e enumerated value.p r o j e c t .LUM A TrackM atte Type .i te m (i nd e x) .p r o j e c t .l a y e r ( inde x) .i te m (i nd e x) .ALPHA TrackM atte Type .LUM A_INV E RTED TrackMatteType.w i d th Description The width of the layer in pixels.JavaScript Reference AVLayer object 49 AVLayer trackMatteType attribute a pp .ALPHA_INVER TED TrackM atte Type . 49 .NO_TRACK_MATTE AVLayer width attribute a pp . read/write.l a y e r ( inde x) . One of: TrackM atte Type .

• CameraLayer is a subclass of Layer. but has different AE properties than other layer types.i te m (i nd e x) .p r o j e c t . AE Properties CameraLayer defines no additional attributes.JavaScript Reference CameraLayer object 50 CameraLayer object a pp .l a y e r( in de x) Description The CameraLayer object represents a camera layer within a composition. Create it using the LayerCollection object’s ad d C am e r a method. see “LayerCollection addCamera() method” on page 93. It can be accessed in an item’s layer collection either by index number or by a name string. All methods and attributes of Layer are available when working with CameraLayer. It has the following properties and property groups: Ma r k e r T r a n s f o rm P oi n t o f In ter es t P o s i ti o n S c al e O r i e n t a t io n X R o t at io n Y R o t at io n Ro ta ti on O pa c i ty C a m e r a O p t io n s Zoom D ep th of F i el d F o c u s D is t a n c e B l ur L ev el 50 . See “Layer object” on page 83.

“LayerCollection object” on page 92 All of the layers in a composition. Attributes leng th Methods [] Retrieves an object in the collection by its index number. However. solids. not 0. The number of objects in the collection. and so on) found in the Project panel.JavaScript Reference Collection object 51 Collection object Like an array. You do not assign objects to them yourself—their contents update automatically as objects are created or deleted. “RenderQueueItem object” on page 155 All of the render-queue items in the project. Objects Object Reference Description I t e m C o l le c t i o n L a y e r C o ll e c t i o n OMCollection R Q I t e m C o l l e ct i o n “ItemCollection object” on page 79 All of the items (imported files. The first object is at index 1. most collection objects are read-only. a collection associates a set of objects or values as a logical group and provides access to them by index. folders. The index numbering of a collection starts with 1. 51 . “OMCollection object” on page 104 All of the Output Module items in the project.

motion blur is enabled for this composition. and allows you to manipulate and get information about it. “CompItem hideShyLayers attribute” on When true. The first shows the number of layers in the CompItem.JavaScript Reference CompItem object 52 CompItem object a pp . page 55 “CompItem workAreaStart attribute” on The work area start time. page 55 “CompItem motionBlur attribute” on page 56 “CompItem draft3d attribute” on page 54 “CompItem frameBlending attribute” on page 54 When true. n u m L a y e r s ) . shy layers are visible in the Timeline panel.i te m s[i n d ex ] Description The CompItem object represents a composition. la y er( f ir st C o m p . a l e r t (" n u m b e r o f l a y e r s i s " + f i r s t C o m p . Attributes Attribute Reference Description f ram eDu rat ion w o r k A r e aS ta r t w o r k A r e aD ur a t i o n numLayers h id eS hy L a y ers m o t i o n B lu r d r a ft 3 d f r am e Bl e n di n g “CompItem frameDuration attribute” on The duration of a single frame. Access the objects by position index number in a project’s i t e m collection. pr oje ct . page 59 “CompItem workAreaDuration attribute” on page 58 “CompItem numLayers attribute” on page 56 The work area duration.n u m L ay e rs ). When true. Example Given that the first item in the project is a CompItem. 52 . All methods and attributes of AVItem and Item. preser veNe st edFrame Rat e “CompItem preserveNestedFrameRate attribute” on page 56 preserveNestedResolution “CompItem preserveNestedResolution attribute” on page 57 bgColor a ct i veC a m er a displayStartTime “CompItem bgColor attribute” on page 53 “CompItem activeCamera attribute” on page 53 “CompItem displayStartTime attribute” on page 54 The current active camera layer. the following code displays two alerts. which is a subclass of Item. are available when working with CompItem. va r f ir st C omp = ap p. time filtering is enabled for this composition.p r o j e c t . When true. When true.i te m (i nd e x) a pp . See “AVItem object” on page 32 and “Item object” on page 76. The number of layers in the composition. in addition to those listed below. • CompItem is a subclass of AVItem. the resolution of nested compositions is preserved. a l ert (" n a m e of l as t l a y er i s " + f i rs t C o m p. the frame rate of nested compositions is preserved. Draft 3D mode is enabled for the Composition panel. When true. The background color of the composition. and the second shows the name of the last layer in the CompItem.p r o j e c t .n am e) . Changes the display of the start time in the Timeline panel.i t em( 1) .

Gets a layer from this composition. G. re so lu tionFa ctor s h u t te r A n g le s h u t te r P h a se l a ye r s s e l e c t e d L ay e r s s e l e c t e d P r o p e r t ie s re nde rer re nde rer s The camera shutter phase. The camera shutter angle. B]. green. in the range [0. Type An array containing three floating-point values.a ct i veC a m er a Description The active camera.0.i te m (i nd e x) . The value is null if the composition contains no enabled camera layers.1. read-only.p r o j e c t . “CompItem layers attribute” on page 56 The layers of the composition.. read/write. 53 . The three array values specify the red.p r o j e c t . The set of available rendering plugin modules. “LayerCollection object” on page 92 “CompItem selectedLayers attribute” on The selected layers of the composition. which is the front-most camera layer that is enabled.b g C o lo r Description The background color of the composition. The rendering plugin module to be used to render this composition. [R.i te m (i nd e x) . Methods Method Reference “CompItem duplicate() method” on page 54 “CompItem layer() method” on page 55 Description Creates and returns a duplicate of this composition.0]. Type CameraLayer object. CompItem bgColor attribute a pp . and blue components of the color. d u p l i ca te () l a ye r ( ) CompItem activeCamera attribute a pp . page 58 “CompItem selectedProperties attribute” on page 58 “CompItem renderer attribute” on page 57 “CompItem renderers attribute” on page 57 The selected properties of the composition.JavaScript Reference CompItem object 53 Attribute Reference “CompItem resolutionFactor attribute” on page 57 “CompItem shutterAngle attribute” on page 58 “CompItem shutterPhase attribute” on page 58 Description The factor by which the x and y resolution of the Composition panel is downsampled.

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

numLayers–ot her L ayer . .p r o j e c t .i te m (i nd e x) . An integer in the range [1–othe rL a ye r .l a y e r ( inde x) a pp . The relIn de x value is added to the index value of this layer to find the position of the desired layer.l a y e r ( na m e ) Description Returns a Layer object. only layers with s h y set to false are shown in the Timeline panel.i te m (i nd e x) . CompItem layer() method a pp .i te m (i nd e x) . all layers are visible. —or— otherLayer relIndex A Layer object in this composition. When false. read/write.p r o j e 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. relative to oth erLa y er . Type Boolean. This value is added to the oth erLa y er value to derive the absolute index of the layer to return. This is the inverse of the fr ameR at e value (frames-per-second). The position of the desired layer. r elI n de x) a pp .l a y e r ( ot h er La y er .JavaScript Reference CompItem object 55 CompItem frameDuration attribute a pp . . an index position in this layer. or an index position relative to another layer. including those whose sh y value is true. read/write. Parameters index The index number of the desired layer in this composition. 55 . where n u m L a y e r s is the number of layers in the composition.i te m (i nd e x) . where n u m L a y e r s is the number of layers in the composition.fram eDu rat i on Description The duration of a frame.index ].. Type Floating-point. which can be specified by name.p r o j e c t .numLayers].. CompItem hideShyLayers attribute a pp .p r o j e c t . i n d e x .h i d e S h y L a y e r s Description When true.i te m (i nd e x) . An integer in the range [1.p r o j e c t . in seconds.

CompItem numLayers attribute a pp . CompItem motionBlur attribute a pp . 56 .i te m (i nd e x) . read-only.p r o j e c t .i te m (i nd e x) . Corresponds to the value of the Motion Blur button in the Composition panel. CompItem preserveNestedFrameRate attribute a pp .l a y e r s Description A LayerCollection object that contains all the Layer objects for layers in this composition. See “LayerCollection object” on page 92. read/write.p r e s e r v e N e s t e d F r a m e Ra t e Description When true.m o t i o n B l u r Description When true. motion blur is enabled for the composition.p r o j e c t .p r o j e 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.num L ayer s Description The number of layers in the composition.p r o j e c t . Type Boolean. Type Boolean. Type LayerCollection object. read/write.i te m (i nd e x) .JavaScript Reference CompItem object 56 Returns Layer object.i te m (i nd e x) . the frame rate of nested compositions is preserved in the current composition. Type Integer. read-only. CompItem layers attribute a pp .

Full resolution is [1.p r o j e c t . Type Boolean. half resolution is [2. CompItem renderer attribute a pp . The default is [1. as set in the Advanced tab of the Composition Settings dialog box.i te m (i nd e x) . the first number controls horizontal sampling. 57 . Type Array of strings. CompItem resolutionFactor attribute a pp .re nde rer Description The current rendering plugin module to be used to render this composition.p r o j e c t .ren de rers .i te m (i nd e x) . Member strings reflect installed modules. Type Array of two integers in the range [1.re solu tionFa ctor Description The x and y downsample resolution factors for rendering the composition. Type String.99]. read/write.JavaScript Reference CompItem object 57 CompItem preserveNestedResolution attribute a pp . read-only.p r e s e r v e N e s t e d R e s o l u t io n Description When true.4]. as seen in the Advanced tab of the Composition Settings dialog box.re nde rer s Description The available rendering plugin modules.i te m (i nd e x) . CompItem renderers attribute a pp .2].i te m (i nd e x) .p r o j e c t .. The two values in the array specify how many pixels to skip when sampling. Allowed values are the members of c o m p I t e m. read/write. and quarter resolution is [4.p r o j e c t .1]. read/write. the second controls vertical sampling.1]. Corresponds to the value of the “Preserve Resolution When Nested” option in the Advanced tab of the Composition Settings dialog box. the resolution of nested compositions is preserved in the current composition.

720].p r o j e c t . The first property is at index position 0. read-only... read/write..p r o j e c t .s h u t te r P h as e Description The shutter phase setting for the composition.s e l e c t e d P r o p e r t ie s Description All of the selected properties (Property and PropertyGroup objects) in this composition. This corresponds to the Shutter Phase setting in the Advanced tab of the Composition Settings dialog box.p r o j e c t .w ork Are aD ura tion 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.p r o j e c t .JavaScript Reference CompItem object 58 CompItem selectedLayers attribute a pp .s e l e c t e d L ay e r s Description All of the selected layers in this composition. Type Integer in the range [–360. CompItem shutterPhase attribute a pp .p r o j e c t . Type Integer in the range [0.i te m (i nd e x) . This corresponds to the Shutter Angle setting in the Advanced tab of the Composition Settings dialog box.i te m (i nd e x) . CompItem workAreaDuration attribute a pp . read-only.i te m (i nd e x) . Type Array of Property and PropertyGroup objects.360].s h u t te r A n g l e Description The shutter angle setting for the composition.i te m (i nd e x) . 58 .i te m (i nd e x) . read/write. Type Array of Layer objects. This is a 0-based array (the first object is at index 0). CompItem shutterAngle attribute a pp . CompItem selectedProperties attribute a pp ..

i te m (i nd e x) . 59 .p r o j e c t . Type Floating-point.workAre aSta rt Description The time when the Composition work area begins. read/write.JavaScript Reference CompItem object 59 Type Floating-point. CompItem workAreaStart attribute a pp . in seconds. read/write.

m is s i n g F o o t a g e Pa t h a pp . 60 . See “FootageSource object” on page 67. p r o x y S o u r ce . m a in So u r c e .p r o j e c t .i te m (i nd e x) . fi l e . are available when working with FileSource. All methods and attributes of FootageSource.i te m (i nd e x) .p r o j e c t .p r o j e c t . • FileSource is a subclass of FootageSource.i te m (i nd e x) .f i l e Description The ExtendScript File object for the file that defines this asset.JavaScript Reference FileSource object 60 FileSource object a pp .f i l e . Type String. call re pla c e() or r e p l a c e W i t h S e q u e n c e ( ) .i te m (i nd e x) . reload() FileSource file attribute a pp . Type File object. if it is a m a i n So u r c e of a FootageItem. • If this FileSource is a m a i n S o u r c e of a FootageItem. read-only. fi l e a pp .i te m (i nd e x) . read-only.i te m (i nd e x) .p r o j e c t . f i le m i s s i n g F o ot a g e P a t h “FileSource missingFootagePath attribute” The file that contains footage missing from this asset. in addition to those listed below.m a in So u r c e .p r o j e c t .p roxySour ce Description The FileSource object describes footage that comes from a file. Attributes Attribute Reference “FileSource file attribute” on page 60 Description The file that defines this asset. To change the value: • If this FileSource is a pr ox y So urc e of an AVItem. call s e t Pr o x y () or s et P rox y Wi th Se qu ence( ) . p r o x y S o u r ce . m a in So ur c e a pp . on page 60 Methods Method Reference “FileSource reload() method” on page 61 Description Reloads the asset from the file. m i s s i n g F o o ta g e P a t h Description The path and filename of footage that is missing from this asset. FileSource missingFootagePath attribute a pp . See also “AVItem footageMissing attribute” on page 33.p r o j e c t .

JavaScript Reference FileSource object 61 FileSource reload() method a pp . 61 . Parameters None. m a in So u r c e . This method can be called only on a m a i n S o u rc e . fi l e . m a i n S o u r ce . not a p r o x y S o u r ce . r e l o a d ( ) Description Reloads the asset from the file.p r o j e c t .i te m (i nd e x) . Returns Nothing.

The number of items contained in the folder.na m e) . i te m ( ) FolderItem item() method a pp . Note that “top-level” here means toplevel within the folder. the position index of the item to retrieve.i te m (i nd e x) . i f ( ! ( s e c o n d I t e m i n st a n ce o f F o l de r I t e m ) ) { a l e r t (" p r o b l e m : s e c o n d i t e m i s n o t a f o l d e r " ) . i te m s nu mIte ms Methods Method Reference “FolderItem item() method” on page 62 Description Gets an item from the folder. i <= se cond Item .F o l d e r I t e m Description The FolderItem object corresponds to a folder in your Project panel.ite m(i) . The first item is at index 1.i te m Description Returns the top-level item in this folder at the specified index position. } else { f or ( i = 1 . } } Attributes Attribute Reference “FolderItem items attribute” on page 63 “FolderItem numItems attribute” on page 63 Description The contents of this folder. compositions.JavaScript Reference FolderItem object 62 FolderItem object a pp . It can contain various types of items (footage. Parameters index Returns An integer. showing that item’s name. pr ojec t .i te m ( 2) . va r s ec ond It em = ap p. not necessarily within the project. Example Given that the second item in the project is a FolderItem.p r o j e c t . i + +) { a l e r t ( " i t e m n u m b e r " + i + " w i t h i n t h e f o l d e r i s n am e d " + se cond Ite m . solids) as well as other folders. Item object.numI tem s. p r o j e c t . 62 . the following code puts up an alert for each top-level item in the folder.

read only. Type Integer. Type ItemCollection object. Only those items that are top-level in the root folder are also top-level in the Project.i te m (i nd e x) .p r o j e c t . 63 .p r o j e c t .JavaScript Reference FolderItem object 63 FolderItem items attribute a pp .n u m I te m s Description The number of items contained in the i t e m s collection (f o l d e r I t e m . this collection contains only the top-level items in the folder. If the folder contains another folder. not any subitems contained in it.i te m (i nd e x) . only the FolderItem for that folder is counted. FolderItem numItems attribute a pp . Top-level within the folder is not the same as top-level within the project.item s.i te m s Description An ItemCollection object containing Item object that represent the top-level contents of this folder. le n gth ). read only. Unlike the ItemCollection in the Project object.

read only.p r o j e c t .p r o j e c t . this is the same as Fo o t age I t em .i te m (i nd e x) a pp .i te m (i nd e x) . All settings related to the footage item. These are accessed by position index number in a project’s i te m collection.f i le Description The ExtendScript File object for the footage's source file. are available when working with FootageItem. FootageItem file attribute a pp . All methods and attributes of AVItem and Item.f i le .i te m s[i n d ex ] Description The FootageItem object represents a footage item imported into a project. f i le m a i n So u r c e Methods Method Reference “FootageItem replace() method” on page 65 “FootageItem replaceWithPlaceholder() method” on page 65 “FootageItem replaceWithSequence() method” on page 66 “FootageItem replaceWithSolid() method” on page 66 Description Replaces a footage file with another footage file. Attributes Attribute Reference “FootageItem file attribute” on page 64 “FootageItem mainSource attribute” on page 65 Description The footage source file. Otherwise it is null. Replaces a footage file with a solid. m ai n S our ce . Replaces a footage file with an image sequence. If the FootageItem's m a i n So u r c e is a FileSource. 64 . • FootageItem is a subclass of AVItem. in addition to those listed below.JavaScript Reference FootageItem object 64 FootageItem object a pp .p r o j e c t . re pla c e() r e pl a c e W i t h Pl a c e h o l de r () re pla c eWith S equ ence() replaceWithSolid() Replaces a footage file with a placeholder object. Type File object. See “AVItem object” on page 32 and “Item object” on page 76. which appears in the Project panel. which is a subclass of Item.

Parameters name w i dt h h ei g ht A string containing the name of the placeholder. the method creates a new FileSource object for the file and sets m a in S o u rc e to that object. See “AVItem footageMissing attribute” on page 33 and “FileSource missingFootagePath attribute” on page 60. it sets the n a m e . 65 .re pla ceWith Pla c eho ld er (n a m e. d ura tio n ) Description Changes the source of this FootageItem to the specified placeholder. sets its values from the parameters. FootageItem replaceWithPlaceholder() method a pp . The width of the placeholder in pixels.p r o j e c t . In addition to loading the file.30000]. wid t h . he ig ht. Creates a new PlaceholderSource object. The attribute is read-only.30000]. and the f o o t a g e M i s s i n g value is true.i te m (i nd e x) .JavaScript Reference FootageItem object 65 FootageItem mainSource attribute a pp . In the new source object..p r o j e c t . and sets m a i n S o u rc e to that object. The method preserves interpretation parameters from the previous m a i n S o u r ce object.. To change its value. fr ame Dur at io n . Type FootageSource object. and du rat i on attributes (see “AVItem object” on page 32) based on the contents of the file. an integer in the range [4. read-only. m i s si n g F o o t a g e P a t h attribute.p r o j e c t . FootageItem replace() method a pp . The height of the placeholder in pixels. call one of the FootageItem “replace” methods. the method estimates the alpha interpretation. w i dt h .m a in So u r c e Description The footage source.i te m (i nd e x) . If the specified file has an unlabeled alpha channel. the path to the missing footage file is in the F i l e S o u r c e . Parameters file An ExtendScript File object for the file to be used as the footage main source. r e pl a c e ( file ) Description Changes the source of this FootageItem to the specified file. including those that are normally accessed through the Interpret Footage dialog box. h ei g ht . and its three types: • “SolidSource object” on page 168 • “FileSource object” on page 60 • “PlaceholderSource object” on page 108 If this is a FileSource object. an integer in the range [4.i te m (i nd e x) . an object that contains all of the settings related to that footage item. See the “FootageSource object” on page 67. fra m eR ate .

sets its values from the parameters. FootageItem replaceWithSequence() method a pp . an integer in the range [4.i te m (i nd e x) . A string containing the name of the solid.. the method creates a new FileSource object for the file and sets m a in S o u rc e to that object. h ei g ht .99.0. If the specified file has an unlabeled alpha channel. r e pl a c e W i t h So l id (co l or . Parameters color name w i dt h h ei g ht p i xe l A s pe c t The color of the solid. The pixel aspect ratio of the solid. G.30000].30000]. the method estimates the alpha interpretation.0] The duration of the placeholder in seconds. The method preserves interpretation parameters from the previous m a i n S o u r ce object. The height of the solid in pixels. and du rat i on attributes (see “AVItem object” on page 32) based on the contents of the file. f r a m e D u r at i o n .100.01. [R. a floating-point value in the range [0. p i xe l As p e ct ) Description Changes the source of this FootageItem to the specified solid. 66 . FootageItem replaceWithSolid() method a pp . an integer in the range [4. in the range [0.0]. The width of the solid in pixels. Parameters file f o r c e A l ph ab e t i c al An ExtendScript File object for the first file in the sequence to be used as the footage main source. a floating-point value in the range [1. use the “Force alphabetical order” option.0].1.i te m (i nd e x) . it sets the n a m e . Creates a new SolidSource object. w i dt h ..0.re pla ceWi th Se qu ence( file.10800.0]. h e igh t .p r o j e c t .p r o j e c t . a floating-point value in the range [0.. In addition to loading the file. B]..JavaScript Reference FootageItem object 66 f r am e R a te d u r a ti o n The frame rate of the placeholder. When true. In the new source object.0. w idt h. an array of three floating-point values. forc eA l p h a b e t i c a l ) Description Changes the source of this FootageItem to the specified image sequence. n am e .. and sets m a i n S o u rc e to that object..

• FootageSource is the base class for SolidSource.i te m (i nd e x) . How many times an image sequence is set to loop. When true. “FootageSource highQualityFieldSepa. “FootageSource alphaMode attribute” on page 68 The mode of an alpha channel.m a in So u r c e a pp . “FootageSource removePulldown attribute” on page 71 “FootageSource loop attribute” on page 71 “FootageSource nativeFrameRate attribute” on page 71 “FootageSource displayFrameRate attribute” on page 68 “FootageSource conformFrameRate attribute” on page 68 The pulldown type for the footage.p r o j e c t . Attributes Attribute Reference Description h as Al ph a a l ph aMo de premulColor i n v e r tA l ph a i s St i l l f i e l dS e pa r at i o n T y p e h ig h Qu a l i ty F i e l d S e p a r a ti o n r e m o v e P u l ld o w n loop na tive Fr ame Rat e d i sp l ay F r a m e R ate conformFrameRate “FootageSource hasAlpha attribute” on When true. The native frame rate of the footage. See “SolidSource object” on page 168. or the pr ox y So urc e of a CompItem or FootageItem. Methods Method Reference “FootageSource guessAlphaMode() method” on page 69 “FootageSource guessPulldown() method” on page 69 Description Estimates the a l p h a M o d e setting. a footage clip or proxy includes an page 70 alpha channel.i te m (i nd e x) .How the fields are to be separated in non-still footration attribute” on page 70 age. The effective frame rate as displayed and rendered in compositions by After Effects. an alpha channel in a footage clip or proxy should be inverted. so FootageSource attributes and methods are available when working with SolidSource objects. footage is a still image. on page 71 “FootageSource invertAlpha attribute” on page 70 “FootageSource isStill attribute” on page 70 “FootageSource fieldSeparationType attribute” on page 69 When true.p r o j e c t . The rate to which footage should conform. guessAlphaMode() g u e ss P u l l d o w n () Estimates the p u l l do wn T yp e setting. “FootageSource premulColor attribute” The color to be premultiplied. The field separation type.p roxySour ce Description The FootageSource object holds information describing the source of some footage.JavaScript Reference FootageSource object 67 FootageSource object a pp . 67 . See “FootageItem object” on page 64 and “CompItem object” on page 52. It is used as the m a i n So u r c e of a FootageItem.

.0. co n f o rm F r a m e R a t e a pp . this attribute has no relevant meaning.i te m (i nd e x) . O F F . Type Floating-point value in the range [0.JavaScript Reference FootageSource object 68 FootageSource alphaMode attribute a pp . 68 .p roxySour ce . It is an error to set this value to 0 if r em ove P u l l d o w n is not set to P u l l d o w n Ph a s e .i te m (i nd e x) .a l p h a M o d e Description The alphaMode attribute of footageSource defines how the alpha information in the footage is to be interpreted.0]. One of: AlphaMode. 99. the effective frame rate after removing 1 of every 5 frames.i te m (i nd e x) . If r e m o v e P u l ld o w n is P u l l do wn P h a s e .O FF .8.STRAIGHT Alpha Mode. Type Floating-point value in the range [0. It is an error to set this value if F o o t a g e So u r c e .p roxySour ce .p r o j e c t . If r e m o v e P u l ld o w n is not Pu l ld ow n P ha se . If this is 0 when you set r e m o v e P u ll d o w n to a value other than P u l l d o w n Ph a s e .p r o j e c t .0].0. O F F . the na tive Frame Rat e is used instead. PR EMU L TIPLIED FootageSource conformFrameRate attribute a pp . O F F . m a in So ur c e. (read/write). m a in So ur c e.p roxySour ce .i te m (i nd e x) . 99.IGNORE AlphaMode.p r o j e c t . this is c o n f o r m F r a m e R a t e * 0. FootageSource displayFrameRate attribute a pp .i te m (i nd e x) . alp haM od e a pp . then this is automatically set to the value of na tive Fram eRat e . read-only. m a in So ur c e..c o n f o r m F r a m e R a t e Description A frame rate to use instead of the na tive Frame Rat e value. Type An A l p h a M o d e enumerated value.p r o j e c t . If set to 0. i sS ti l l is true. read/write.p r o j e c t .i te m (i nd e x) . If hasAlpha is false.p r o j e c t .d i sp l ay F r a m e R a te Description The effective frame rate as displayed and rendered in compositions by After Effects. di s pl a y F rame Rat e a pp . then this is the same as the co n f o rm F r a m e R a t e (if non-zero) or the na tive Frame Rat e (if c o n f o r m F r a m e R a t e is 0).

Returns Nothing.p r o j e c t . f i e l d S e p a r a ti o n T y p e a pp . P U L L D O W N _ 3 _ 2 Pulldow nMe th od. Type A Fie l dS ep ar at io nType enumerated value.gue ss Alp ha Mod e( ) Description Sets a l ph aMo de .p r o j e c t .p roxySour ce . If h a s A l p h a is false.p r o j e c t . If i s St i l l is true. read/write. One of: F i e l d S e p a r a ti o n T y p e .OF F . 69 .O F F if r e m o v e P u l ld o w n is not Pu ll d ow n P ha se .p roxySour ce . It is an error to set this value to Fie l dSepa rat io nType. no change is made.f ie l dS e p a r at i o n T y p e Description How the fields are to be separated in non-still footage. g u e s s P u ll d o w n ( m et h o d) a pp .p r o j e c t .i te m (i nd e x) .gue ss P ulld own ( m e t h o d ) Description Sets f i el d Se pa ra ti on T y p e and r e m ov e P u l l d o w n to the best estimates for this footage source. It is an error to set this attribute if i sS t i ll is true. O F F FieldSeparationType.i te m (i nd e x) .i te m (i nd e x) .JavaScript Reference FootageSource object 69 FootageSource fieldSeparationType attribute a pp . gue s s A l ph aM o d e () a pp . Parameters me tho d The method to use for estimation. AD VANCE _ 24P Returns Nothing.UPPER_FIELD_FIRST FieldSeparationType. one of: P u l l d o w n M e th od .i te m (i nd e x) .p roxySour ce . FootageSource guessPulldown() method a pp .p r o j e c t .p r o j e c t . no change is made. and i n v e r tA lp h a to the best estimates for this footage source.i te m (i nd e x) .LOWER_FIELD_FIRST FootageSource guessAlphaMode() method a pp .i te m (i nd e x) . m a in So ur c e . p r e m u l C o l o r . Parameters None.ma in So urce. A P u l l d o w n M e t h o d enumerated value. m a in So ur c e.

ha sA lph a Description When true. FootageSource highQualityFieldSeparation attribute a pp . sound files. 70 . read-only. and placeholders of non-zero duration. read-only. when false. those attributes have no relevant meaning for the footage.p r o j e c t . m a in So ur c e.p r o j e c t . is S ti l l a pp . Type Boolean. and p r e m u l C o l o r have valid values.p r o j e c t .i te m (i nd e x) . h a s A l p h a a pp . Type Boolean. or if a l ph aMo de is A l p h a M o d e . this attribute is ignored.i sS t i ll Description When true the footage is still. an alpha channel in a footage clip or proxy should be inverted.O F F . in v ert Al p ha a pp .p r o j e c t .i te m (i nd e x) . sequences. FootageSource isStill attribute a pp .p r o j e c t . m a in So ur c e. Type Boolean. If ha sA lph a is false.h i g h Qu a l i ty F i e l d S e p a r a ti o n Description When true. After Effects uses special algorithms to determine how to perform high-quality field separation. read/write. m a in So ur c e. or if fie ld S ep ar at io nType is Fie l dSepa rat io nType. It is an error to set this attribute if i sS t il l is true.i n v e r tA lp h a Description When true. Examples of still footage are JPEG files.p r o j e c t .p roxySour ce .i te m (i nd e x) . m a in So ur c e.JavaScript Reference FootageSource object 70 FootageSource hasAlpha attribute a pp . FootageSource invertAlpha attribute a pp . the footage has an alpha component. in v ert Al p ha .i te m (i nd e x) . Examples of non-still footage are movie files.p roxySour ce .i te m (i nd e x) .p r o j e c t . In this case. and placeholders with duration of 0.p roxySour ce . solids. This attribute is valid only if an alpha is present.i te m (i nd e x) .p r o j e c t . read/write. the attributes a l p h a M o d e . h i g h Q ua li t y F i e l d S e p a r a t i o n a pp . I G N O R E .i te m (i nd e x) .i te m (i nd e x) . it has a time-based component.p roxySour ce . Type Boolean. When false.

It is an error to set this attribute if i sS t il l is true. pr emul Co lo r a pp . FootageSource premulColor attribute a pp .p r o j e c t ..1. m a in So ur c e.p r o j e c t . G. read/write.p roxySour ce . m a in So ur c e.i te m (i nd e x) .JavaScript Reference FootageSource object 71 FootageSource loop attribute a pp . r e m o v e P u l l d o w n a pp . R e m o v e P u l l do wn . It is an error to attempt to set this to a value other than P u l l d o w n Ph a s e . W S SW W P u l l d o w n Ph a s e . default is 1.0.p r o j e c t . R e m o v e P u l l do wn . read/write.p r o j e c t . O F F in the case where f ie l dS e p a r at i o n T y p e is F i e l d S e pa ra t i o n T y p e . It is an error to set this attribute if i sS t il l is true.p roxySour ce . read/write. SS W W W 71 . Type Array of three floating-point values [ R .p r o j e c t .na tiveFr ameR at e Description The native frame rate of the footage. l o o p a pp .i te m (i nd e x) . in the range [0.i te m (i nd e x) . 9999]. read/write. Type Integer in the range [1. FootageSource nativeFrameRate attribute a pp .i te m (i nd e x) . FootageSource removePulldown attribute a pp .p r o j e c t .r e m o v e Pul l d o w n Description How the pulldowns are to be removed when field separation is used. n at iv eF ra m eRa te a pp . O F F .i te m (i nd e x) .PREMU L TIPLIED . Type Floating-point. R e m o v e P u l l do wn .i te m (i nd e x) .l o o p Description The number of times that the footage is to be played consecutively when used in a composition. One of: P u l l d o w n Ph a s e .i te m (i nd e x) .p r o j e c t .p r e m u l C o l o r Description The color to be premultiplied. m a in So ur c e. m a in So ur c e.p roxySour ce ..p r o j e c t . B] . Type A Pu ll d ow n P ha se enumerated value.0]. O F F P u l l d o w n Ph a s e .i te m (i nd e x) . This attribute is valid only if the a l p haM od e is a l ph aM ode .p roxySour ce .

W W S S W P u l l d o w n Ph a s e . R e m o v e P u l l d o wn . W W S S W _ 2 4 P _ A D V A N C E 72 . SW W W S _ 2 4 P _ A D V A N C E P u l l d o w n Ph a s e . W S SW W _ 2 4 P _ A D V A N C E P u l l d o w n Ph a s e .JavaScript Reference FootageSource object 72 P u l l d o w n Ph a s e . SW W W S P u l l d o w n P h a s e . W W W S S _ 2 4 P _ A D V A N C E P u l l d o w n Ph a s e . R e m o v e P u l l do wn . W W W S S P u l l d o w n Ph a s e . R e m o v e P u l l do wn . SS W W W _ 2 4 P _ A D V A N C E P u l l d o w n Ph a s e . R e m o v e P u l l do wn . R e m o v e P u l l d o wn . R e m o v e P u l l do wn . R e m o v e P u l l do wn . R e m o v e P u l l do wn .

If it is not supplied.PROJECT 73 . import a sequence of files. Description The ImportOptions object encapsulates the options used to import a file with the P r o je c t . An I m p o r t A s T y p e enumerated value.f i l e = n e w F il e (" m y f i l e .C O MP _ C R O PP E D _ L AY E R S ImportAsType. See “Project importFile() method” on page 112. If this method returns true. F O O T A GE I m p ort As T y pe . you must explicitly set the value of the f i l e attribute before using the object with the i m p o r t Fi l e method. Methods Method Reference Description c a n I m p o r t A s( ) “ImportOptions canImportAs() method” Restricts input to a particular file type. For example: n e w I m p o r tO pt i o n s () . the “Force alphabetical order” option is set. importAs sequence f o r c e A l ph ab e t i c al f i le When true.p s d" ) . Parameters t y pe The type of file that can be imported. The constructor takes an optional parameter.JavaScript Reference ImportOptions object 73 ImportOptions object n e w I m p o r tO pt i o n s () . or the first file of the sequence to import. The file to import. an ExtendScript File object for the file. on page 73 ImportOptions canImportAs() method i m p o r t O p t i o n s . rather than an individual file. you can set the given type as the value of the i m p o r t A s attribute. Attributes Attributes Reference “ImportOptions importAs attribute” on page 74 “ImportOptions sequence attribute” on page 75 “ImportOptions forceAlphabetical attribute” on page 74 “ImportOptions file attribute” on page 74 Description The type of file to be imported. one of: ImportAsType. See “ImportOptions importAs attribute” on page 74. n e w I m p o r tO pt i o n s (f i l e ) .COMP I m p o r t A s T y p e .i m p o r t F il e methods. When true.ca n Imp ort As (t y p e ) Description Reports whether the file can be imported as the source of a particular object type.

ImportOptions importAs attribute i m p o r t O p t i o n s .i m p o r tAs = I m po r tA sT yp e . i o .f orce Alph abe tical Description When true. Type ExtendScript File object. ImportOptions forceAlphabetical attribute i m p o r t O p t i o n s . Before setting.C O M P I m p o r tA s T y p e . use c a n I m p o r t A s to check that a given file can be imported as the source of the given object type.JavaScript Reference ImportOptions object 74 Returns Boolean. Type An I m p o r t A s T y p e enumerated value.file Description The file to be imported.C O M P _ C R O P PE D_ L A Y E R S I m p o r tA s T y p e . i m p o r t As Description The type of object for which the imported file is to be the source. Example v a r i o = n e w I m p o r t Op ti o n s( F i le (“ c : \ \ m y F il e .F O O T A G E I m p o r tA s T y p e . read/write. has the same effect as setting the “Force alphabetical order” option in the File > Import > File dialog box. If a file is set in the constructor. you can access it through this attribute. if io . read/write. ImportOptions file attribute importOptions. See “ImportOptions canImportAs() method” on page 73. C OM P . One of: I m p o r tA s T y p e .p sd ” ) ). read/write.canIm po rtA s(ImportAsType .CO MP). Type Boolean.P R O J E C T 74 .

s eq uence Description When true. otherwise.JavaScript Reference ImportOptions object 75 ImportOptions sequence attribute i m p o r t O p t i o n s . an individual file is imported. Type Boolean. read/write. 75 . a sequence is imported.

s e l e c t ed & & c u r I t e m . See “AVItem object” on page 32 and “FolderItem object” on page 62.JavaScript Reference Item object 76 Item object a pp . It also checks to make sure that. i te m s[ i n de x ] Description The Item object represents an item that can appear in the Project panel.item(2). which are in turn the base classes for various other item types. It then removes from the folder any top-level item that is not currently selected.ty p e N a m e ! = " F o l d e r " ) { a l ert ("er ror: se cond it em is not a folde r"). } else { var numInFolder = myFolder. name comment id p ar e n tF o l de r selected t y pe N am e Methods Method Reference “Item remove() method” on page 78 Description Deletes the item from the project.i t e m ( i n d e x ) a pp . A unique identifier for this item. i >= 1. A descriptive string. var myFolder = app.pare ntFo ld er != m yFo lde r) { a l ert (" er ro rw i th i n AE : t he pa ren t F o l d er i s n o t s et c o rre c tl y " ) . so Item attributes and methods are available when working with all of these item types. Attributes Attributes Reference “Item name attribute” on page 77 “Item comment attribute” on page 77 “Item id attribute” on page 77 “Item parentFolder attribute” on page 77 “Item selected attribute” on page 78 “Item typeName attribute” on page 78 Description The name of the object as shown in the Project panel.project. p r o j e c t . curItem. } else { i f ( ! c u rI t e m . the parent is properly set to the correct folder. • Item is the base class for AVItem and for FolderItem. this item is currently selected. / / A l w ay s r u n lo o p s b a c kw ar ds w hen d el e ti n g t hi n g s : for(i = numInFolder. The parent folder of this item. p r o j e c t . The first item is at index 1. The type of item. i f (m y F o l d e r . i tem (i). if ( cur I te m.numItems. When true. i--) { va r curI tem = myFolder.remove(). t y p e N a m e = = " F o o t a g e " ) { / / A h a ! a n u n s e l e c t e d so l id . for each item in the folder. re move () Example This example gets the second item from the project and checks that it is a folder. 76 .

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

JavaScript Reference Item object 78 Type FolderItem object. } Item remove() method a pp . 78 . it e m s .s e l e c t e d Description When true. If the item is a FolderItem. “Folder”. or “Composition”. Set to true to select the item programmatically.p r o j e c t. / / m o v e a l l c o m po s i t i o n s i n t o n e w f o l d e r b y s e t t in g / / c o m p I t e m ’ s p a r e n tF o l d e r t o “ c o m p s ” f o l d e r f o r ( v a r i = 1 . for example. Multiple items can be selected at the same time. Item selected attribute a pp .p ro ject . or to false to deselect it. Example This script creates a new FolderItem in the Project panel and moves compositions into it. n u m I t e m s . read/write. / / c r e at e a n e w F o l d e r I t e m in p r o je c t . read-only. w i t h n a m e “ c o m p s ” v a r c o m p F o l d e r = ap p . all the items contained in the folder are also removed from the project.re m ove () Description Deletes this item from the project and from the Project panel.p r o j e c t . this item is selected.p r o j e c t . p r o j e ct . Returns Nothing. “Footage”.i te m (i nd e x) . Type String. i < = a p p . p r o j e c t .i t e m ( i ) . read/write. Parameters None. i + + ) { if (a pp .i te m (i nd e x) .p r o j e c t .i te m (i nd e x) . p a r e n t F o l d e r = c o m p F o l d e r .a dd F o l d e r ( “ c o m p s ” ). Item typeName attribute a pp . Type Boolean.t yp eN am e Description A user-readable name for the item type.item (i) in st anceo f Co mp Item ) a pp . No files or folders are removed from disk.

p ix el A s p ec t .i te m s Description The ItemCollection object represents a collection of items.ad d C o m p ( n am e . Creates and returns a new FolderItem object and adds it to this collection. a floating-point value in the range [0.0].30000].JavaScript Reference ItemCollection object 79 ItemCollection object a pp . are available when working with ItemCollection. h ei gh t .. The ItemCollection belonging to a FolderItem object contains all the Item objects for items in that folder. See “Collection object” on page 51. f ra m e Rat e ) Description Creates a new composition.0] CompItem object. If the ItemCollection belongs to any other folder.0. The ItemCollection belonging to a Project object contains all the Item objects for items in the project.. d u ra t io n . a dd C om p( ) a dd F o l d e r ( ) Creates a new FolderItemobject and adds it to the collection. The height of the composition in pixels.30000]. All methods and attributes of Collection.. an integer in the range [4. the new item’s pa rent F ol d er is that F o l d e r I t e m .10800. then the new item’s pa rent F ol d er is the root folder. w i dt h .0. an integer in the range [4.ad d F o l d e r ( n a m e ) Description Creates a new folder. in addition to those listed below. Parameters name w i dt h h ei g ht p i xe l A s pe c t d u r a ti o n f r am e R a te Returns A string containing the name of the composition..p r o j e c t . ItemCollection addComp() method a pp . Creates and returns a new CompItem object and adds it to this collection. ItemCollection addFolder() method a pp .p r o j e c t . The frame rate of the composition.p r o j e c t .i te m C o l l e c ti o n.01. The duration of the composition in seconds.i te m C o l l e c ti o n. a floating-point value in the range [0. The width of the composition in pixels. If the ItemCollection belongs to the project or the root folder. 79 . • ItemCollection is a subclass of Collection.0]. Methods Method Reference “ItemCollection addComp() method” on page 79 “ItemCollection addFolder() method” on page 79 Description Creates a new CompItem object and adds it to the collection. The pixel aspect ratio of the composition.99..100. a floating-point value in the range [1.

/ / c r e at e a n e w F o l d e r I t e m in p r o je c t .a dd F o l d e r ( “ c o m p s ” ). i + + ) { if (a pp . / / m o v e a l l c o m po s i t i o n s i n t o n e w f o l d e r b y s e t t in g / / c o m p I t e m ’ s p a r e n tF o l d e r t o “ c o m p s ” f o l d e r f o r ( v a r i = 1 . then the new folder’s pa ren tF ol d er is the root folder. Example This script creates a new FolderItem in the Project panel and moves compositions into it. p a r e n t F o l d e r = c o m p F o l d e r . it e m s . To put items in the folder.p r o j e c t. w i t h n a m e “ c o m p s ” v a r c o m p F o l d e r = ap p . the new folder’s p ar e n t F o l de r is that F o ld e r I t e m . n u m I t e m s . see “Item parentFolder attribute” on page 77. FolderItem object. Parameters name Returns A string containing the name of the folder. p r o j e c t . p r o j e ct .i t e m ( i ) .p ro ject . } 80 . If the ItemCollection belongs to any other folder.item (i) in st anceo f Co mp Item ) a pp .JavaScript Reference ItemCollection object 80 If the ItemCollection belongs to the project or the root folder. set the item object’s pa rent F ol d er attribute. i < = a p p .

temporal and spatial. Attributes Attribute Reference “KeyframeEase speed attribute” on page 82 “KeyframeEase influence attribute” on page 81 Description The speed setting for a keyframe.7 5 . • i n f l u e n c e : A floating-point value in the range [0.7 5 . pro jec t . va r m y P o s it i o n P ro p ert y = a p p. [ e a s e I n ] .1. l ay er (1) . Type Floating-point value in the range [0. a spatial property.0]. Sets the s pe e d attribute. se tT e m po ral E a se At Ke y (2 .proje c t. pr o p e r t y (" S c al e " ) m y S c al e Pro pe rty . v a r e a se Ou t = n e w K e y fr am e E as e ( 0 .0]. For 2D and 3D properties you must set an easeI n and e as eO ut value for each dimension: va r ea se In = n ew Ke yfr ameE as e( 0. v a r e a se Ou t = n e w K e y fr am e E as e ( 0 . [ eas eI n .5 . 81 . ea seO ut . has more than two keyframes. i n f l u e n c e Description The influence value of the keyframe. Both types are set using the property’s setT empora lEaseAt K ey method. There are two types of ease. Example This example assumes that the Position. 50) . 8 5 ) .100. i t e m ( 1 ) .l ay e r ( 1 ).JavaScript Reference KeyframeEase object 81 KeyframeEase object m y K e y = n e w K e y f r a m e E a s e (s p ee d. e aseO ut]). 8 5 ) .100. read/write.1. s e t T e m p o r a l E a s eA tK e y ( 2 . This example sets the Scale.. • s p e e d : A floating-point value. The influence setting for a keyframe. which are determined by the speed and influence settings. as shown in the Keyframe Velocity dialog box. Both parameters are required. i n f l u e n c e ) .p ro pe rty ( " P o si t i o n " ) m y P o s i t i o n P r o p e r t y . [ e a s e O u t ] ) . Description The KeyframeEase object encapsulates the keyframe ease settings of a layer’s AE property. va r myScalePro pe rty = app. See “Property setTemporalEaseAtKey() method” on page 136. ea se In]..i te m( 1). Sets the i n fl u e n c e attribute. s pe e d influence KeyframeEase influence attribute m y K ey . easeIn . The constructor creates a KeyframeEase object.5 . a temporal property with two dimensions. va r ea se In = n ew Ke yfr ameE as e( 0. [e aseO ut. 50) .

Type Floating-point value.JavaScript Reference KeyframeEase object 82 KeyframeEase speed attribute m y K ey . The units depend on the type of keyframe. s p e e d Description The speed value of the keyframe. read/write. 82 . and are displayed in the Keyframe Velocity dialog box.

A descriptive comment for the layer. It can be accessed from an item’s layer collection either by index number or by a name string. This might. The “in” point of the layer. See “AVLayer object” on page 39.JavaScript Reference Layer object 83 Layer object a pp . When true. so Layer attributes and methods are available when working with all layer types. Example If the first item in the project is a CompItem. the layer contains a video component.l a y e r( in de x) Description The Layer object provides access to layers within compositions. the layer is enabled. The composition that contains this layer. When true. turn an icon off in the composition. l ay er( 1) . The start time of the layer. When true. and “TextLayer object” on page 172. All selected AE properties in the layer.e nabled = fa lse. Layers contain AE properties. the layer is shy.i te m (1 ). The “out” point of the layer. f i rst L a ye r. • Layer is the base class for CameraLayer. The name of the layer. When true. Attributes Attribute Reference “Layer index attribute” on page 87 “Layer name attribute” on page 89 “Layer parent attribute” on page 89 “Layer time attribute” on page 91 “Layer startTime attribute” on page 91 “Layer stretch attribute” on page 91 “Layer inPoint attribute” on page 87 “Layer outPoint attribute” on page 89 “Layer enabled attribute” on page 86 “Layer solo attribute” on page 91 “Layer shy attribute” on page 90 “Layer locked attribute” on page 87 “Layer hasVideo attribute” on page 86 “Layer active attribute” on page 84 “Layer nullLayer attribute” on page 89 “Layer selectedProperties attribute” on page 90 “Layer comment attribute” on page 85 “Layer containingComp attribute” on page 85 Description The index position of the layer. The current time of the layer. for example. When true. in addition to their JavaScript attributes and methods. the layer is locked. the layer is active at the current time. When true. “CameraLayer object” on page 50. and AVLayer. pro jec t . The time stretch percentage of the layer. TextLayer. For examples of how to access properties in layers. LightLayer. this is a null layer. When true. first L a ye r.i te m (i nd e x) .n a m e = " Di s ab l ed L ay e r" . index name p ar e n t t im e s ta r tT im e s tr e tc h inPoint outPoint en abled solo shy locked h as Vi de o a ct i ve n u ll L a y e r s e l e c t e d P r o p e r t ie s comment containingComp 83 . “LightLayer object” on page 97. this example disables the first layer in that composition and renames it. see “PropertyBase object” on page 140. the layer is soloed. The parent of this layer.p r o j e c t . va r f ir st L ay e r = a p p.

Layer active attribute a pp .i te m (i nd e x) . the layer’s name has been explicitly set.laye r( in de x) . 84 .p r o j e c t . the layer's video is active at the current time. This value is never true in an audio layer. For this to be true. Copies the layer to the top (beginning) of another composition. and the time must be between the i n Po in t and o u t P o in t values of this layer. a c ti v e A tT i m e (t i m e) Description Returns true if this layer will be active at the specified time. no other layer may be soloing unless this layer is soloed too. Duplicates the layer.JavaScript Reference Layer object 84 Attribute Reference “Layer isNameSet attribute” on page 87 Description When true. Moves the layer to the top of the composition (makes it the first layer).i te m (i nd e x) . Reports whether this layer will be active at a specified time. Layer activeAtTime() method a pp . the layer must be enabled. i s N a m e Se t Methods Method Reference “Layer remove() method” on page 90 “Layer moveToBeginning() method” on page 88 “Layer moveToEnd() method” on page 88 Description Deletes the layer from the composition. re move () m o v e T o B eg i n n i n g ( ) moveToEnd() m o v e A f t er ( ) mo veBe fo re() d u p l i ca te () copyToComp() a ct i v e A tT i m e ( ) “Layer moveAfter() method” on page 87 Moves the layer below another layer. read-only. a pp l y Pr e s e t s( ) “Layer applyPreset() method” on page 85 Applies a named collection of animation settings to the layer. “Layer moveBefore() method” on page 88 “Layer duplicate() method” on page 86 “Layer copyToComp() method” on page 86 “Layer activeAtTime() method” on page 84 Moves the layer above another layer.laye r( in de x) . To return true.p r o j e c t . no other layer may be soloing unless this layer is soloed too. s et Pa ren t W i th Jum p ( ) “Layer setParentWithJump() method” on page 90 Sets a new parent for this layer. and the time must be between the i n P o i n t and o utP oi n t values of this layer. Type Boolean.a ctive Description When true. Moves the layer to the bottom of the composition (makes it the last layer). the layer must be enabled. there is a separate aud i oAct iv e attribute in the AVLayer object.

Description Applies the specified collection of animation settings (an animation preset) to the layer. Boolean. Predefined animation preset files are installed in the Presets folder.JavaScript Reference Layer object 85 Parameters t im e Returns The time in seconds. Layer containingComp attribute a pp . c o m m e n t Description A descriptive comment for the layer.i te m (i nd e x) . and users can create new animation presets through the user interface. Layer applyPreset() method a pp ap p . Type CompItem object.p r o j e c t. read/write. a p p l y P r e s e t (p re s e t N am e ).laye r( in de x) . a floating-point value.co n ta iningC omp Description The composition that contains this layer.p r o j e c t . read-only. Nothing.layer (i n de x) . Layer comment attribute a pp .laye r( in de x) .i te m (i nd e x) . Type String. Parameters presetName Returns An ExtendScript File object for the file containing the animation preset. it e m( in d ex ) . 85 .p r o j e c t .

i te m (i nd e x) . and CompItem object. 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.JavaScript Reference Layer object 86 Layer copyToComp() method a pp . Returns Layer object. the layer is enabled.i te m (i nd e x) . Type Boolean. Nothing. c o py T o C o m p (i n t oC o m p ) Description Copies the layer into the specified composition.i te m (i nd e x) . The original layer remains unchanged. Layer duplicate() method a pp . 86 .laye r( 1) .h as Vid eo Description When true.i te m (i nd e x) . read/write.e nabled Description When true.p r o j e c t .laye r( in de x) . This corresponds to the video switch state of the layer in the Timeline panel.p r o j e c t . Creates a new Layer object in which all values are the same as in this one. the layer has a video switch (the eyeball icon) in the Timeline panel. This has the same effect as selecting a layer in the user interface and choosing Edit > Duplicate.p r o j e c t .p r o j e c t .laye r( in de x) . Retrieve the copy using i n t o C o m p . Parameters intoComp Returns The target composition. and prepends the new object to the l a y e r s collection in the target CompItem. Layer hasVideo attribute a pp . Layer enabled attribute a pp .laye r( in de x) .d up licat e( ) Description Duplicates the layer. Creates a new Layer object with the same values as this one. Parameters None. except the selection in the user interface does not change when you call this method. otherwise false.laye r( in de x) . otherwise false.

laye r( in de x) .. otherwise false.i te m (i nd e x) .i te m (i nd e x) . Layer inPoint attribute a pp .is N ame S et Description True if the value of the n a m e attribute has been set explicitly.0] (minus or plus three hours).m o v e A ft e r ( l a ye r ) Description Moves this layer to a position immediately after (below) the specified layer.10800.p r o j e c t . 87 .i te m (i nd e x) .l ay e r ( inde x) .p r o j e c t . Layer isNameSet attribute a pp . Layer index attribute a pp . the layer is locked.p r o j e c t . read-only. Type Boolean.ind ex Description The index position of the layer. read/write. read-only. expressed in composition time (seconds). Type Boolean. i n P o i n t Description The “in” point of the layer. Type Floating-point value in the range [-10800. Layer moveAfter() method a pp .i te m (i nd e x) . rather than automatically from the source.p r o j e c t . Type Integer in the range [1.0. Layer locked attribute a pp . read-only. This croplands to the lock toggle in the Layer panel. read/write.JavaScript Reference Layer object 87 Type Boolean.l ay e r ( inde x) .p r o j e c t ..n u m L a y e r s ].i te m (i nd e x) .l o ck e d Description When true.laye r( in de x) .laye r( in de x) .

Nothing.m o v e T o E n d () Description Moves this layer to the bottom position of the layer stack (the last layer). m ov e T o B e g i n n i n g ( ) Description Moves this layer to the topmost position of the layer stack (the first layer). a layer object in the same composition.JavaScript Reference Layer object 88 Parameters l a ye r Returns The target layer. Returns Nothing. 88 . a layer object in the same composition.p r o j e c t . Layer moveBefore() method a pp . Nothing. Parameters None.p r o j e c t .i te m (i nd e x) .m o v e B e f o r e ( l a y e r ) Description Moves this layer to a position immediately before (above) the specified layer. Returns Nothing.p r o j e c t .i te m (i nd e x) . Parameters None.l ay e r ( inde x) . Parameters l a ye r Returns The target layer. Layer moveToBeginning() method a pp .l ay e r ( inde x) .l ay e r ( inde x) . Layer moveToEnd() method a pp .i te m (i nd e x) .

Layer nullLayer attribute a pp . the layer was created as a null object. but you can set it to be different.l ay e r ( inde x) .p r o j e c t . if the new parent has a rotation of 30 degrees. By default. read/write. Type String.l ay e r ( inde x) . the child layer is assigned a rotation of -30 degrees. read/write.p r o j e c t . can be null.p r o j e c t . Type Boolean.l ay e r ( inde x) .o u tP o i n t Description The “out” point of the layer.p r o j e c t . use the se tP are n tWi t hJu mp method. read/write.i te m (i nd e x) . Type Floating-point value in the range [-10800. Type Layer object or null.10800. For example. this is the same as the Source name (which cannot be changed in the Layer panel). Layer parent attribute a pp .n a m e Description The name of the layer. Layer outPoint attribute a pp .JavaScript Reference Layer object 89 Layer name attribute a pp .l ay e r ( inde x) .. 89 . so that when you set the parent there is no apparent jump in the layer's transform.i te m (i nd e x) . To set the parent without changing the child layer's transform values. read-only.i te m (i nd e x) . Offset values are calculated to counterbalance any transforms above this layer in the hierarchy. expressed in composition time (seconds). n u l l L a y e r Description When true. otherwise false.0.0] (minus or plus three hours).i te m (i nd e x) .p a r e n t Description The parent of this layer.

Type Array of PropertyBase objects. Layer shy attribute a pp . s e l e c t e d P r o p e r t i e s Description An array containing all of the currently selected Property and PropertyGroup objects in the layer. In this case.l ay e r ( inde x) .set P are n tWit hJu mp( n e w P a r e n t ) Description Sets the parent of this layer to the specified layer. Parameters ne wPar ent Returns A layer object in the same composition.JavaScript Reference Layer object 90 Layer remove() method a pp . set the p a r e n t attribute directly. as this layer’s transform values are combined with those of its ancestors. If you do not want the child layer to jump. translation. Nothing.i te m (i nd e x) . Parameters None.p r o j e c t .l ay e r ( inde x) . to prevent the jump from occurring.p r o j e c t . There may be an apparent jump in the rotation.i te m (i nd e x) . an offset is calculated and set in the child layer's transform fields. without changing the transform values of the child layer. read-only. the layer is “shy. Layer selectedProperties attribute a pp .p r o j e c t . Returns Nothing.l ay e r ( inde x) .s hy Description When true.r e m o v e () Description Deletes the specified layer from the composition.i te m (i nd e x) .i te m (i nd e x) . Layer setParentWithJump() method a pp .p r o j e c t .” meaning that it is hidden in the Layer panel if the composition’s “Hide all shy layers” option is toggled on. or scale of the child layer. 90 .l ay e r ( inde x) .

s t art T i m e Description The start time of the layer. Values between 0 and 1 are set to 1. expressed in composition time (seconds).i te m (i nd e x) .i te m (i nd e x) . otherwise false. Type Floating-point value in the range [-9900. read-only.p r o j e c t . 91 .l ay e r ( inde x) .l ay e r ( inde x) . read/write.9900. read/write.l ay e r ( inde x) .p r o j e c t . read/write. Layer stretch attribute a pp .. Type Boolean.0] (minus or plus three hours). Type Floating-point value. read/write. expressed in composition time (seconds).i te m (i nd e x) .p r o j e c t ..0. Layer startTime attribute a pp .s t r e t c h Description The layer’s time stretch.p r o j e c t .l ay e r ( inde x) .s o l o Description When true.t i m e Description The current time of the layer. and values between -1 and 0 (not including 0) are set to -1. Layer solo attribute a pp .JavaScript Reference Layer object 91 Type Boolean.0]. expressed as a percentage.i te m (i nd e x) . Layer time attribute a pp . the layer is soloed.0.10800. A value of 100 means no stretch. Type Floating-point value in the range [-10800.

a dd ( a n A VI t e m ) . The methods of the collection object allow you to manipulate the layer list. v a r l a y e r C o l l e c t i o n = f i r s t C o m p. and adds it page 94 to this collection. page 93 “LayerCollection addShape() method” on page 94 “LayerCollection byName() method” on page 95 “LayerCollection precompose() method” on page 96 Creates a new shape layer and adds it to this collection. are available when working with LayerCollection. Methods Method Reference “LayerCollection add() method” on page 93 “LayerCollection addNull() method” on page 94 Description Creates a new AVLayer and adds it to this collection.i te m (i nd e x) . Creates a new camera layer and adds it to this collection. Collects specified layers into a new composition. va r f ir st C omp = ap p. null layer 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.i t em( 1) . a dd ( ) a dd N u l l ( ) a dd S ol i d( ) a dd T ex t () a dd C a m era () a dd L i g ht () a dd S ha pe () byName() p rec o m po se () Creates a new. “LayerCollection addText() method” on page 95 “LayerCollection addCamera() method” on page 93 Creates a new text layer and adds it to this collection.i t e m ( 2 ) . Retrieves the layer object with a specified name. “LayerCollection addSolid() method” on Creates a new layer. See “Collection object” on page 51. “LayerCollection addLight() method” on Creates a new light layer and adds it to this collection. l e n g t h ) . this example shows the number of layers in the CompItem's layer collection.p r o j e c t .JavaScript Reference LayerCollection object 92 LayerCollection object a pp . The LayerCollection belonging to a CompItem object contains all the layer objects for layers in the composition. in addition to those listed below. then displays the new number of layers. l e n g t h ). a l e r t (" n u m b e r o f l a y e r s a f t e r is " + la y e r C o l l e c t i o n . All methods and attributes of Collection. adds a new layer based on an AVItem in the project. v a r an A V I t e m = ap p . l a ye r C o l l e c t i o n . l a y e r s.l ay e r s Description The LayerCollection object represents a set of layers. pr oje ct .p r o je c t. 92 . a l e r t (" n u m b e r o f l a y e r s b e f o r e i s " + l a y e r C o l l e c t i o n . • LayerCollection is a subclass of Collection. a FootageItem with a SolidSource.

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

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

JavaScript Reference LayerCollection object 95 name w i dt h h ei g ht p i xe l A s pe c t d u r a ti o n A string containing the name of the solid.i te m (i nd e x) . LayerCollection byName() method a pp . Parameters name Returns A string containing the name. or a TextDocument object containing the source text of the new layer. The height of the solid in pixels. Returns TextLayer object. The width of the solid in pixels. the length of a still layer in seconds.l ay e r s . Parameters s o u r ce T e x t Optional. and specify options under Still Footage. choose Edit > Preferences > Import (Windows) or After Effects > Preferences > Import (Mac OS).100. Otherwise.i te m (i nd e x) .30000]. an integer in the range [4. a floating-point value in the range [0. By default. sets the d u r a ti o n value of the new layer.0].p r o j e c t . Returns AVLayer object. LayerCollection addText() method a pp . Layer object or null. Optional.. To set another preferred value. a string containing the source text of the new layer. The pixel aspect ratio of the solid.01. If supplied. an integer in the range [4.. a floating-point value.. this is the same as the duration of the containing CompItem.30000]. 95 .p r o j e c t . b y N a m e (n a m e) Description Returns the first (topmost) layer found in this collection with the specified name. the du rat i on value is set according to user preferences. or null if no layer with the given name is found. See “TextDocument object” on page 171.ad d T e x t( s ou r c e T e x t ) Description Creates a new text layer and adds the new TextLayer object to this collection. l a y e r s .

and adds the new CompItem to this collection. n a m e .i te m (i nd e x) . An array of integers. p r e c o m p o s e ( l a y e r I n di c i e s . Returns CompItem object. This is the same as selecting the “Leave all attributes in” option in the Pre-compose dialog box. m o v e A l l At t r i b u t e s ) Description Creates a new CompItem object and moves the specified layers into its layer collection. l a y e r s . It removes the individual layers from this collection.JavaScript Reference LayerCollection object 96 LayerCollection precompose() method a pp . Parameters l a ye r I n d i c e s name m o v e A l l A t t ri bu te s The position indexes of the layers to be collected. retains all attributes in the new composition.p r o j e c t . Optional. When true (the default). The name of the new CompItem object. 96 . You can only set this to false if there is just one index in the l a y e r I n d i ce s array. This is the same as selecting the “Move all attributes into the new composition” option in the Pre-compose dialog box.

AE Properties LightLayer defines no additional attributes. Create it using the LayerCollection object’s a dd L i g ht method. All methods and attributes of Layer are available when working with Light- Layer. see “LayerCollection addLight() method” on page 93.JavaScript Reference LightLayer object 97 LightLayer object a pp .p r o j e c t . It can be accessed in an item’s layer collection either by index number or by a name string.l a y e r( in de x) Description The LightLayer object represents a light layer within a composition. • LightLayer is a subclass of Layer.i te m (i nd e x) . It has the following properties and property groups: Ma r k e r T r a n s f o rm P oi n t o f In ter es t P o s i ti o n S c al e O r i e n t a t io n X R o t at io n Y R o t at io n Ro ta ti on O pa c i ty L i g ht O pt i o n s Intensity Co lo r Cone Angle C o n e F e a t h er Ca st s Sh ad ow s S h a do w D ar k n e ss S h a do w D i ff u s i o n 97 . See “Layer object” on page 83. but has different AE properties than other layer types.

propert y("M arker " ). The Flash Video cue point name. m y M ar k e r ) . pr oject . Examples • To set a marker that says “Fade Up” at the 2 second mark: va r myMa rk er = new Ma rk erVa lue("Fade U p "). Create it with the constructor. or Flash Video cue point with a particular point in a layer. Methods Method Reference Description ge tPara m et ers() “MarkerValue getParameters() method” Retrieves the key-value pairs associated with the marker value. the order does not reflect the order displayed in the application. set the MarkerValue object in the Ma rke r AE property of the layer: layer O bjec t . set Va l ueA tTime( t i m e . la y e r (1 ).l a y e r ( 1 ) .JavaScript Reference MarkerValue object 98 MarkerValue object ne w M arkerV alue (c o m m e n t .com m ent 98 . Whether the Flash Video cue point is for an event or navigation. m y L a y e r .k e y V a l u e ( 1 ) . • To get comment values from a particular marker: va r comme ntO f Fir st Ma rke r = app.ite m (1). which can then be accessed with the g et Pa ra m et er( ) and s e t Pa r am e te r ( ) methods. comment chapter c u e Po in t N a m e eventCuePoint ur l f ram eTar get A chapter link reference point for the associated layer. pr o p e r t y ( " M a rk e r " ) . except p ar am s . All arguments are strings that set in the corresponding attributes of the returned MarkerValue object. c h a pt e r . This is an array containing key-value pairs. v a r c o m m e n t O f M a r ke rA t T i m e 4 = a pp . pa r a m s) Description The MarkerValue object represents a layer marker. To associate a marker with a layer.p r o p e r ty ( " Mar ke r"). valu eAt T ime(4. Attributes Attribute Reference “MarkerValue comment attribute” on page 99 “MarkerValue chapter attribute” on page 99 “MarkerValue cuePointName attribute” on page 99 “MarkerValue eventCuePoint attribute” on page 99 “MarkerValue getParameters() method” on page 100 “MarkerValue eventCuePoint attribute” on page 99 Description A comment on the associated layer.tr ue). u r l . A URL for Web page to be associated with the layer. s e t V a l u e A t T i m e ( 2 .0 . f r a m eT a r g et .p r o j e c t . on page 100 s e t Pa r am e te r s () “MarkerValue setParameters() method” on page 100 Sets the key-value pairs associated with the marker value.. which associates a comment. A specific frame target within the Web page specified by u rl .i te m (1 ). Web-page link.c o m m e n t . c u e P o i n t N a m e. and optionally a chapter reference point. p r o pe rt y ( " M a r k e r " ) . m a rk er Va lue O bj ec t ). For information on the usage of markers see “Using markers” in After Effects Help. all arguments except c o m m e n t are optional. A script can set any number of parameter pairs.

p r o pe r ty ( " M a r ke r " ) .k e y V a l u e ( i n d ex ). comment Description A text comment for this marker. Chapter links initiate a jump to a chapter in a QuickTime movie or in other formats that support chapter marks.l ay e r ( inde x) .p r o pe r ty ( " M a r ke r " ) . n e ar e s t K e y I n d e x ( 4 .k e y V a l u e ( i n d ex ).pro pe rty("Ma rke r"). v a r c o m m e n t O f M a r ke rC l o s e s t T o T im e 4 = m ar ke r V a l u e A t T i m e C l o s e s t T o T i m e 4 . 0 ) ) . Type Boolean. c ueP oi ntN ame Description The Flash Video cue point name. k e y V a l u e ( m a r k e r P r o p e r t y . even tCu ePoint Description When t rue .p r o pe r ty ( " M a r ke r " ) . Type String. read/write.i te m (i nd e x) . as shown in the Marker dialog.p r o j e c t .JavaScript Reference MarkerValue object 99 va r ma rk erPropert y = a p p.i te m (i nd e x) .l ay e r ( inde x) .ite m (1 ).p r o pe r ty ( " M a r ke r " ) . pro ject . layer (1). c hap t er Description A text chapter link for this marker. read/write.l ay e r ( inde x) . read/write. MarkerValue comment attribute a pp .k e y V a l u e ( i n d ex ).i te m (i nd e x) . 99 . the FlashVideo cue point is for an event. This comment appears in the Timeline panel next to the layer marker. va r ma rkerVa lueA tTim eC lose stToTime 4 = m a r k e r P r o p e r t y . MarkerValue cuePointName attribute a pp . c o m m e n t . it is for navigation.p r o j e c t . otherwise.k e y V a l u e ( i n d ex ).p r o j e c t . MarkerValue eventCuePoint attribute a pp .i te m (i nd e x) .p r o j e c t . Type String. MarkerValue chapter attribute a pp . read/write. Type String.l ay e r ( inde x) .

Type String. par m s. timeTo Blink = 1.p r o pe r ty ( " M a r ke r " ) . va r parm s = new Obj ect. read/write.i te m (i nd e x) . MarkerValue getParameters() method a pp .p r o pe r ty ( " M a r ke r " ) .project.l ay e r ( inde x) . 100 . The object’s toS t ri ng( ) method is called to assign the string value of each attribute to the named key.item( in dex).i te m (i nd e x) . Together with the URL value. as si gnM e = "A st ri ng" m v . MarkerValue setParameters() method app.JavaScript Reference MarkerValue object 100 MarkerValue frameTarget attribute a pp . fr ameTa rge t Description A text frame target for this marker. Example v a r m v = n e w M a r k e r V al u e (" M y M ar k e r " ) .l ay e r ( inde x) .property("Mark er").k e y V a l u e ( i n d ex ).p r o j e c t .l ayer(inde x). A cue point can have any number of parameters. but you can add only three through the user interface. Parameters k ey Va l u eP ai r s An object containing the key-value pairs as attributes and values. this targets a specific frame within a Web page. g et Pa ram e te rs( ) Description Returns the key-value pairs for Flash Video cue-point parameters. containing that parameter’s value. use this method to add more than three parameters. for a cue point associated with this marker value. Returns An object with an attribute matching each parameter name. Returns Nothing.p r o j e c t . p ar m s.keyVal ue( in dex).k e y V a l u e ( i n d ex ). s e tP a r am e t e r s( p a r m s ) . for a cue point associated with this marker value.s etP arameters(keyValuePairs ) Description Associates a set of key-value pairs for Flash Video cue-point parameters. Parameters None.

l ay e r ( inde x) . p r o pe rt y ( " M a r k e r " ) . 101 . read/write. url Description A URL for this marker. m v ) .JavaScript Reference MarkerValue object 101 m y L a y e r .p r o j e c t .k e y V a l u e ( i n d ex ).p r o pe r ty ( " M a r ke r " ) . MarkerValue url attribute a pp . This URL is an automatic link to a Web page.i te m (i nd e x) . Type String. s e t V a l u e A t T i m e ( 2 .

in the range [0.m as k Description The MaskPropertyGroup object encapsulates mask attributes in a layer. 102 . B].m as k( i n d ex ). c o l o r Description The color used to draw the mask outline as it appears in the user interface (Composition panel.i te m (i nd e x) . All methods and attributes of PropertyBase and PropertyGroup. Type Boolean.laye r( in de x) ..0. the mask is locked. in addition to those listed below. See “PropertyBase object” on page 140 and “PropertyGroup object” on page 147. MaskPropertyGroup inverted attribute a pp . ma sk Mo de i n v e r te d ro toB ezier ma skMo tionB l ur locked color When true.1.laye r( in de x) . Type Array of three floating-point values.0]. the mask is inverted.p r o j e c t . Attributes Attribute Reference “MaskPropertyGroup maskMode attribute” on page 103 “MaskPropertyGroup inverted attribute” on page 102 “MaskPropertyGroup rotoBezier attribute” on page 103 “MaskPropertyGroup maskMotionBlur attribute” on page 103 “MaskPropertyGroup locked attribute” on page 103 “MaskPropertyGroup color attribute” on page 102 Description The mask mode.p r o j e c t .l ay e r ( inde x) . are available when working with MaskPropertyGroup. How motion blur is applied to this mask. [R. Layer panel. i n vert ed Description When true. When true.JavaScript Reference MaskPropertyGroup object 102 MaskPropertyGroup object a pp .i te m (i nd e x) . G. The color used to draw the mask outline in the user interface. the shape of the mask is RotoBezier. the mask is inverted.p r o j e c t . otherwise false.m as k( i n d ex ). • MaskPropertyGroup is a subclass of PropertyGroup.i te m (i nd e x) . read/write. When true. and Timeline panel). read/write. MaskPropertyGroup color attribute a pp .

m as k( i n d ex ) .LIGH T EN Ma skM ode . Type A M a k M o ti o n B l u r enumerated value. D I F F E R E N C E MaskPropertyGroup maskMotionBlur attribute a pp . maskMotio nBlur Description How motion blur is applied to this mask. otherwise. false. the mask is locked and cannot be edited in the user interface.m as k( i n d ex ).laye r( in de x) . read/write.JavaScript Reference MaskPropertyGroup object 103 MaskPropertyGroup locked attribute a pp . Type Boolean. MaskPropertyGroup maskMode attribute a pp .p r o j e c t .SUB TRAC T Ma skM ode . read/write.p r o j e c t .i te m (i nd e x) .m as k( i n d ex ).INTE RSECT Ma skM ode .i te m (i nd e x) . 103 . SA ME _ A S _ L A YE R Ma skM otionB l ur. One of: Ma skM ode . read/write. OF F MaskPropertyGroup rotoBezier attribute a pp .laye r( in de x) . false. ON Ma s k M ot i o n B l u r . the mask is a RotoBezier shape.NO N E Ma skM ode . One of: M a s k M ot i o n B l u r .i te m (i nd e x) .i te m (i nd e x) . otherwise. m a s k M o d e Description The masking mode for this mask. rotoBe z ie r Description When true.AD D Ma skM ode . Type A M a s k M o d e enumerated value. Type Boolean.p r o j e c t .laye r( in de x) . read/write. l oc ke d Description When true.p r o j e c t .m a s k ( i n de x ).laye r( in de x) .D ARKEN M a s k M ode .

The collection provides access to the OutputModule objects.item s.render Qu eue .proj ect . but does not provide any additional functionality. See “OutputModule object” on page 105 • OMCollection is a subclass of Collection. The first OutputModule object in the collection is at index position 1. out pu tMo du les Description The OMCollection contains all of the output modules in a render queue. All methods and attributes of Collection are available when working with OMCollection. See “Collection object” on page 51. 104 .JavaScript Reference OMCollection object 104 OMCollection object a pp.

Applies an output-module template. page 107 Methods Method Reference “OutputModule remove() method” on page 106 “OutputModule saveAsTemplate() method” on page 106 “OutputModule applyTemplate() method” on page 105 Description Removes this output module from the render-queue item’s list.o u t p u t M o d u l e s [ inde x ].o u t p u t M o d u l e s ( inde x ) Description An OutputModule object of a RenderQueueItem generates a single file or sequence via a render operation.proj ect .render Qu eue .item (i nd e x) .render Qu eue . ap pl y T e m pl a te (t e m p l a t e N a m e) Description Applies the specified existing output-module template. OutputModule file attribute a pp.o u t p u t M o d u l e s [ inde x ].JavaScript Reference OutputModule object 105 OutputModule object a pp. Parameters t em p l at eN a m e Returns A string containing the name of the template to be applied. and contains attributes and methods relating to the file to be rendered. f i le p o s tR e n d e r A c t i o n name t em p l at es An action to be taken after rendering. OutputModule applyTemplate() method a pp. fi l e Description The ExtendScript File object for the file this output module is set to render.item (i nd e x) . Attributes Attribute Reference “OutputModule file attribute” on page 105 “OutputModule postRenderAction attribute” on page 106 “OutputModule name attribute” on page 106 Description The path and name of the file to be rendered.item (i nd e x) .proj ect . “OutputModule templates attribute” on All templates for the output module. The user-interface name of the output module.render Qu eue . 105 . re move () s a v e A s T e m p l a t e( ) a pp l y T e m p l at e ( ) Saves a new output-module template. Nothing.proj ect .

sa veAsTe mpla te (n a m e) Description Saves this output module as a template and adds it to the t em p l at es array.render Qu eue . 106 . OutputModule name attribute a pp. Type A Pos t Rend er Ac ti on enumerated value (read/write).proj ect . read-only.proj ect .o u t p u t M o d u l e s [ inde x ]. Returns Nothing.I M PO R T _ A N D_ R E P L A C E _ US A G E p o s tR e n d e r A c t i o n . OutputModule postRenderAction attribute a pp.proj ect .o u t p u t M o d u l e s [ inde x ].item (i nd e x) .o u t p u t M o d u l e s [ inde x ]. read/write. one of: p o s tR e n d e r A c t i o n .JavaScript Reference OutputModule object 106 Type ExtendScript File object. po st Rend er Ac ti on Description An action to be performed when the render operation is completed.I M PO R T p o s tR e n d e r A c t i o n . as shown in the user interface.render Qu eue . r e m o v e( ) Description Removes this OutputModule object from the collection.S E T _ P R O XY OutputModule remove() method a pp.render Qu eue .item (i nd e x) .item (i nd e x) . OutputModule saveAsTemplate() method a pp.item (i nd e x) . n a m e Description The name of the output module.N O N E p o s tR e n d e r A c t i o n . Type String.o u t p u t M o d u l e s [ inde x ]. Parameters None.render Qu eue .proj ect .

read-only.proj ect .JavaScript Reference OutputModule object 107 Parameters name Returns A string containing the name of the new template. tem pla tes Description The names of all output-module templates availalbe in the local installation of After Effects. 107 . OutputModule templates attribute a pp. Nothing.o u t p u t M o d u l e s [ inde x ].render Qu eue . Type Array of strings.item (i nd e x) .

p r o j e c t .m a in So u r c e a pp .i te m (i nd e x) . See “FootageSource object” on page 67. PlaceholderSource is a subclass of FootageSource.JavaScript Reference PlaceholderSource object 108 PlaceholderSource object a pp . p r o x y S o u r ce Description The PlaceholderSource object describes the footage source of a placeholder.i te m (i nd e x) . All methods and attributes of FootageSource are available when working with PlaceholderSource. 108 .p r o j e c t . PlaceholderSource does not define any additional methods or attributes.

Consolidates all footage in the project. Methods can import footage. and also to project settings such as the timecode base. The film type for the “Feet + Frames” project setting. “Project linearBlending attribute” on page 113 When true. create solids. “Project displayStartFrame attribute” on The frame at which to start numbering when dispage 111 playing the project.p r o j e c t Description The project object represents an After Effects project. The currently active item. f i le ro otFo ld er i te m s a ct i veI t em b i t s P e r C h an n e l The color depth of the current project. The drop-frame project setting. t im e c o d e D is p l ay T y p e t im e c o d e Ba s e T y p e t im ec o d eN T S C D ro p F ram e t im e c o d e F i l m T y p e nu mIte ms selection re nde rQ ueu e d i sp l ay S t ar t F r am e linearBlending “Project timecodeDisplayType attribute” on page 116 “Project timecodeBaseType attribute” on page 116 “Project timecodeNTSCDropFrame attribute” on page 117 “Project timecodeFilmType attribute” on page 117 “Project numItems attribute” on page 114 “Project selection attribute” on page 116 “Project renderQueue attribute” on page 115 The timecode base project setting. The total number of items contained in the project. t ra n s p a r e n c y G r i d T h um b n a i l s “Project transparencyGridThumbnails attribute” on page 117 When true. linear blending is used for the project. i te m ( ) c o n s o l i d a t e F o o t a g e () 109 . such as imported files or footage and compositions. The project’s render queue. Methods Method Reference “Project item() method” on page 113 “Project consolidateFootage() method” on page 111 Description Retrieves an item from the project. thumbnail views use the transparency checkerboard pattern. compositions and folders.JavaScript Reference Project object 109 Project object a pp . Attributes provide access to specific objects within the project. The folder containing all the contents of the project. and save changes. All items selected in the Project panel. The way the timecode is displayed. the equivalent of the Project panel All items in the project. Attributes Attribute Reference “Project file attribute” on page 112 “Project rootFolder attribute” on page 115 “Project items attribute” on page 113 “Project activeItem attribute” on page 110 “Project bitsPerChannel attribute” on page 111 Description The file for the currently open project.

Imports a file into the project. a u toF i x E x p r e s si o n s(old T e xt .p r o j e c t . p r o j e c t .ac t iv e I t e m Description The item that is currently active and is to be acted upon. Closes the project with normal save options. Returns Nothing. read-only. if the new text causes the expression to evaluate without errors. Project autoFixExpressions() method a pp . Parameters oldText ne wTe xt The text to replace. Imports a placeholder into the project. Project activeItem attribute a pp . n e w T e xt ) Description Automatically replaces text found in broken expressions in the project. Saves the project. r e m o v e U n u s e d F o o ta g e ( ) re du ceProje c t() close() s av e () s av e W i th Di al o g () i m p ort Pl a c eho l de r() i m p o r t F i le () i m p o r t F i le W i th D i a l o g ( ) showWindow() a u to F ix E x p r e s s i o n s( ) Reduces the project to a specified set of items. or a null if no item is currently selected or if multiple items are selected. Shows or hides the Project panel. Displays an Import File dialog box. Automatically replaces text in all expressions. The new text. Displays a Save dialog box. 110 . Type Item object or null.JavaScript Reference Project object 110 Method Reference “Project removeUnusedFootage() method” on page 114 “Project reduceProject() method” on page 114 “Project close() method” on page 111 “Project save() method” on page 115 “Project saveWithDialog() method” on page 115 “Project importFileWithDialog() method” on page 112 “Project importFile() method” on page 112 “Project importFileWithDialog() method” on page 112 “Project showWindow() method” on page 116 “Project autoFixExpressions() method” on page 110 Description Removes unused footage from the project.

d is p l ay S ta r tF r am e 111 . one of: C l o s e O p t i o n s . read/write. either 8. False if the file has not been previously saved.b i ts Pe r C h a n n e l Description The color depth of the current project. 16.p r o j e c t . True on success. Parameters None. Parameters c l o s e O pt i o n s Action to be performed on close. and the user cancels the save. Returns Boolean. Same as the File > Consolidate All Footage command.c l o s e ( c los e O p t io n s) Description Closes the project with the option of saving changes automatically. Project consolidateFootage() method a pp . D O _ N O T _ S A V E _ C H A N GE S : Close without saving. Project close() method a pp . Type Integer (8. A C l o s e O p t i o n s enumerated value. the user is prompted.p r o j e c t . prompting the user to save changes or closing without saving changes. 16. C l o s e O p t i o n s . Returns Integer. or 32 bits. Project displayStartFrame attribute a pp .p r o j e c t . P R O M P T _ T O _S A VE _ C H A N G E S : Prompt for whether to save changes before close. S A V E _ C H A N G E S : Save automatically on close. c o n s o l i d a te F o o t a g e ( ) Description Consolidates all footage in the project.JavaScript Reference Project object 111 Project bitsPerChannel attribute a pp . C l o s e O p t i o n s . or 32 only). p r o j e c t . the total number of footage items removed.

Same as the File > Import > File command. Project file attribute a pp .p r o j e c t . Example a pp .p r o j e c t .i m po r tF i l e W it h D ia l o g ( ) Description Shows an Import File dialog box. Same as the File > Import File command.p s d” ) ) Project importFileWithDialog() method a pp .fi l e Description The ExtendScript File object for the file containing the project that is currently open. Project importFile() method a pp . Type File object or null if project has not been saved. and adds it to the project’s i t e m s array. Type Integer.i m po r tF i l e (i m p o r t O p t i o n s ) Description Imports the file specified in the specified ImportOptions object.p r o j e c t . using the specified options.JavaScript Reference Project object 112 Description The frame at which to start numbering when displaying the project with a t i m e c o d e D is p l a y T y p e value of T i m e c o d e D i s p l a yT yp e . 112 . F R A M E S . Creates and returns a new FootageItem object from the file. Parameters i m p o r t Op t io n s An ImportOptions object specifying the file to import and the options for the operation. See “ImportOptions object” on page 73.) This is the same as setting “Start numbering frames at:” in the Project Settings > Display Style tab. read-only. Returns Array of Item objects created during import. Returns FootageItem object. (See “Project timecodeDisplayType attribute” on page 116.p r o j e c t . or null if the user cancels the dialog. read/write.i m po r tF i l e ( n e w I m p or tO pt i o n s (F i l e ( “ s am p l e .

Project items attribute a pp . The frame rate of the placeholder. he ig ht. du ra tio n ) Description Creates and returns a new PlaceholderItem object and adds it to the project’s i te m s array.0.p r o j e c t .i te m s Description All of the items in the project. The height of the placeholder in pixels.. Same as the File > Import > Placeholder command. an integer. Project item() method a pp . Project linearBlending attribute a pp . othewise false.p r o j e c t . a floating-point value in the range [0. The width of the placeholder in pixels.. an integer in the range [4..99. Parameters index Returns The index position of the item.i te m (i nd e x) Description Retrieves an item at a specified index position. fram e Ra t e . an integer in the range [4.l i n e ar Bl e n d i n g Description True if linear blending should be used for this project.0]. read-only. a floating-point value in the range [1. w id t h.30000].p r o j e c t . PlaceholderItem object.10800. Parameters name w i dt h h ei g ht f r am e R a te d u r a ti o n Returns A string containing the name of the placeholder. The first item is at index 1.0] The duration of the placeholder in seconds.JavaScript Reference Project object 113 Project importPlaceholder() method a pp ..p r o j e c t . Item object.30000]. Type ItemCollection object.i m po r tP l ac e h o l d e r ( n am e .0. 113 .

Returns Integer. Same as the File > Reduce Project command. Same as the File > Remove Unused Footage command. ") Project reduceProject() method a pp .p r o j e c t . r e m ov e U n u s e d F o o t a g e () Description Removes unused footage from the project. Example v a r t he I t em s = n ew A r r a y ( ) .l en g t h] = a pp .JavaScript Reference Project object 114 Type Boolean.p r o j e c t .i te m (1 ).p ro jec t . Parameters None. Integer. the total number of FootageItem objects removed. Project numItems attribute a pp . Example n = ap p .r e d u c e Pr o je c t (t h e I te m s) . t heI t em s [ th eI te m s .l en g t h] = a pp . the total number of items removed. read/write.p r o je c t. Project removeUnusedFootage() method a pp .i te m (3 ). including folders and all types of footage.r e d u c e Pr o je c t (a rr ay _ o f _ it e m s ) Description Removes all items from the project except those specified. 114 . Parameters a rra y_o f_it ems Returns An array containing the Item objects that are to be kept. t heI t em s [ th eI te m s . a l ert ("Th ere a re " + n + " it ems in th is proj ect.n u m I t e m s Description The total number of items contained in the project. Type Integer.n u m I t e m s . read-only. a pp . p r o j e c t .p r o j e c t .p ro jec t .

None. read-only.sa v e ( ) a pp .r o o tF o l d e r Description The root folder containing the contents of the project. prompts the user for a location and file name.JavaScript Reference Project object 115 Project renderQueue attribute a pp. Type RenderQueue object. 115 . An ExtendScript File object for the file to save. read-only. Project saveWithDialog() method a pp . Pass a File object to save a project to a new file without prompting. Parameters file Returns Optional. but not items contained inside other folders in the Project panel. Type FolderItem object.sa v e (fil e) Description Saves the project.p r o j e c t .proj ect .p r o j e c t .p r o j e c t . or click Cancel to exit the dialog. Project save() method a pp .render Qu eue Description The render queue of the project. Project rootFolder attribute a pp .p r o j e c t . this is a virtual folder that contains all items in the Project panel. The user can name a file with a location and save the project. If the project has never previously been saved and no file is specified.sa v e W it h D ia l o g ( ) Description Shows the Save dialog box. Parameters None. The same as the File > Save or File > Save As command.

AU T O Timeco de BaseT ype. Project showWindow() method a pp . F PS30 Timeco de BaseT ype. as set in the Project Settings dialog box. Nothing. When false. in the sort order shown in the Project panel. read-only. F PS24 Timeco de BaseT ype.sh o w W i n do w(d oS h ow ) Description Shows or hides the Project panel. hide the Project panel.p roj ec t . read/write. Parameters doShow Returns When true. show the Project panel.ti me co de Ba se Ty pe Description The Timecode Base option.ti m e co de Di s pl a y T y pe 116 .p r o j e c t . One of: T i m e c o d e B a s e T yp e . Type Array of Item objects. F PS10 0 Project timecodeDisplayType attribute a pp . true if the project was saved. Project timecodeBaseType attribute a pp . F PS50 Timeco de BaseT ype.p r o j e c t . Type A T im e c o d e Ba s e T y p e enumerated value.se l e c ti o n Description All items selected in the Project panel.JavaScript Reference Project object 116 Returns Boolean. F PS60 Timeco de BaseT ype. F PS25 Timeco de BaseT ype.p r o j e c t . F PS48 Timeco de BaseT ype. Project selection attribute a pp .

117 . true for the Drop Frame option.ti m e co de N T S C Dr o pF r am e Description How timecode for 29. read/write. T I M E C OD E T i m e c o d e D i s p l a yT yp e . as set in the Project Settings dialog box. Type Boolean. Type A T im e c o d e D is p l ay T y p e enumerated value. false for the Non-Drop Frame option. thumbnail views use the transparency checkerboard pattern. M M 1 6 T i m e c o d e F il m T yp e . read/write.p r o j e c t .ti m e co de F il m T yp e Description The film type. One of: T i m e c o d e F il m T yp e .97 fps footage is displayed. F R A M E S T i m e c o de D i s pl a yT yp e . read/write. Project transparencyGridThumbnails attribute a pp .tr an s pa r e n cy G r i d T h u m b n ai l s Description When true. as set in the Project Settings dialog box under NTSC. M M 3 5 Project timecodeNTSCDropFrame attribute a pp . read/write. F E E T _ A N D _ F R A M E S Project timecodeFilmType attribute a pp . Type A T im ec o d e F i l m T y p e enumerated value.p r o j e c t . One of: T i m e c o d e D i s p l a yT yp e . as set in the Feet + Frames option in the Project Settings dialog box. Type Boolean.p r o j e c t .JavaScript Reference Project object 117 Description The way in which timecode is set to display.

A text description of the units in which the value is expressed. The expression string for this property.JavaScript Reference Property object 118 Property object a pp . An AE property is an value. The maximum permitted value. When true. that occurred when the last expression was evaluated. When true. or transform within an individual layer. the expression is used to generate values for the property.p r o j e c t . When true. The number of keyframes on this property.l ay e r ( inde x) . often animatable. Attributes Attribute Reference Description propertyValueType va lue h as Mi n h as Max minValue maxValue i s Sp a t i a l c a n Va r y O v e r T i m e i s T im eV a r y i n g numKeys un it sT ext e x p r e ss i o n c an Se tE x p r e s s io n e x p r e ss i o n E n a b l e d e x p r e ss i o n E r r o r “Property propertyValueType attribute” Type of value stored in this property. For examples of how to access properties. the property has keyframes or an expression enabled that can vary its values. See “PropertyBase object” on page 140. When true. there is a maximum permitted value. there is a minimum permitted value.i te m (i nd e x) . the expression can be set by a script. mask. if any. on page 131 “Property value attribute” on page 138 “Property hasMin attribute” on page 123 “Property hasMax attribute” on page 123 “Property minValue attribute” on page 130 “Property maxValue attribute” on page 130 “Property isSpatial attribute” on page 124 “Property canVaryOverTime attribute” on page 122 “Property isTimeVarying attribute” on page 124 “Property numKeys attribute” on page 131 “Property unitsText attribute” on page 138 “Property expression attribute” on page 122 “Property canSetExpression attribute” on page 122 “Property expressionEnabled attribute” on page 123 “Property expressionError attribute” on page 123 Current value of the property. in addition to those listed below. see “PropertyBase object” on page 140 and “PropertyGroup property() method” on page 149. of an effect. When true. The minimum permitted value. the property defines a spatial value. All methods and attributes of PropertyBase. the property can be keyframed. When true. and expression information about a particular AE property of a layer. The error. NOTE: JavaScript objects commonly referred to as “properties” are called “attributes” in this guide. 118 . When true. keyframe.p r op e r t y S p ec Description The Property object contains value. are available when working with PropertyGroup. to avoid confusion with the After Effects definition of property. • PropertyGroup is a subclass of PropertyBase.

valueAtTime() s e t V al u e ( ) s e t V a l u eA t T i m e ( ) s e t V al u e s A tT i m e s( ) s e t V al u e A t K e y () n e a r e st K e y I n d e x ( ) k ey T i m e( ) k ey Va l u e( ) a dd K ey ( ) re move Key() i s I n te r p o l a t io n T y pe V a li d ( ) s e t I n te r p o l at io n T y pe A t Ke y () keyInInterpolationType() k e y O u t I n t e r po l a t i o n T y pe () s e t Sp a ti al T a n g e n t sA tK e y ( ) k e y I n S p a t ia l T a n g e n t ( ) k eyO utS p at ialTan gent () setTemporalEaseAtKey() Creates a set of keyframes for the property. Finds a keyframe and sets the value of the property at that keyframe. Gets the value of a keyframe at the time at which a condition occurs. Methods Method Reference “Property valueAtTime() method” on page 139 “Property setValue() method” on page 137 “Property setValueAtTime() method” on page 137 “Property setValuesAtTimes() method” on page 138 “Property setValueAtKey() method” on page 137 “Property nearestKeyIndex() method” on page 131 “Property keyTime() method” on page 129 Description Gets the value of the property evaluated at given time. 119 .JavaScript Reference Property object 119 Attribute Reference “Property keyframeInterpolationType attribute” on page 124 “Property selectedKeys attribute” on page 133 “Property propertyIndex attribute” on page 131 Description The type of interpolation used at a keyframe. Adds a new keyframe to the property at a given time. this property can be interpolated. Sets the static value of the property. “Property keyValue() method” on page 130 “Property addKey() method” on page 122 “Property removeKey() method” on page 132 “Property isInterpolationTypeValid() method” on page 124 “Property setInterpolationTypeAtKey() method” on page 133 When true. Gets the keyframe nearest to a specified time. Creates a keyframe for the property. keyframeInterpolationType selectedKeys p r o p e r ty I n d e x All selected keyframes of the property. Removes a keyframe from the property. “Property keyInInterpolationType() method” Gets the 'in' interpolation type for a key. The position index of this property. on page 125 “Property keyOutInterpolationType() method” on page 126 “Property setSpatialTangentsAtKey() method” on page 135 Gets the 'out' interpolation type for a key. Sets the “in” and “out” temporal ease for a key. page 125 “Property keyOutSpatialTangent() method” on page 126 “Property setTemporalEaseAtKey() method” on page 136 Gets the “out” spatial tangent for a key. Sets the “in” and “out” tangent vectors for a key. Sets the interpolation type for a key. “Property keyInSpatialTangent() method” on Gets the “in” spatial tangent for a key. Gets the time at which a condition occurs.

Reports whether a keyframe has spatial auto-Bezier.JavaScript Reference Property object 120 Method Reference “Property keyInTemporalEase() method” on page 126 “Property keyOutTemporalEase() method” on page 127 “Property setTemporalContinuousAtKey() method” on page 136 “Property keyTemporalContinuous() method” on page 129 “Property setTemporalAutoBezierAtKey() method” on page 135 “Property keyTemporalAutoBezier() method” on page 129 “Property setSpatialContinuousAtKey() method” on page 134 “Property keySpatialContinuous() method” on page 128 “Property setSpatialAutoBezierAtKey() method” on page 134 “Property keySpatialAutoBezier() method” on page 128 “Property setRovingAtKey() method” on page 133 Description Gets the “in” temporal ease for a key. Sets whether a keyframe is roving. / / p os it i on ha s p ro pe rty V al ue T y pe of T hree D_ S P AT IA L . Sets whether a keyframe has spatial continuity. Sets whether a keyframe has spatial auto-Bezier. 5 ).v alue . Reports whether a keyframe is selected. a n d i s s t o r e d a s a n a r r ay o f 3 f l o a t s myProper ty.0 . Reports whether a keyframe has temporal auto-Bezier. 0 . / / V a r i a b l e m y P o s i t i o n is a n a r r a y o f 3 f l o at s v a r m y P o s it i o n = m y P r o p e rt y. valu e. // Va riable myOp acit y is a f l oat va lue va r myO pa c ity = m y Pro pe rty.0]). “Property keyRoving() method” on page 127 Reports whether a keyframe is roving. “Property setSelectedAtKey() method” on page 134 “Property keySelected() method” on page 128 Sets whether a keyframe is selected. Sets whether a keyframe has temporal continuity.0. s e t V a l u e ( 0 .set Va lue([1 0. myShape = myPro pe rty. Example: Get and set the value of a position va r myProper ty = m yL ayer. Sets whether a keyframe has temporal auto-Bezier. 120 . Example: Get and set the value of opacity v a r m y P r o p e r t y = m yL ay e r . va l u e. k ey I n T e m po r al E a s e() k ey O u tT em p o r a lE as e( ) s e t T e m p o r a l C o n t in u o u s A t K e y ( ) keyTem por alCon tinuou s() s e t T e m p o r a l A u t o Be z i e r A t K e y ( ) k eyTem por alAu toB ezier () s e t Sp a ti al C o n ti n u o u sA tK e y ( ) k ey S pa ti a l C o n t in u o u s ( ) s e t Sp a ti al A u toB e z i e r A tK e y k ey S pa ti a l A u t o Be z ie r ( ) s e t R o v i n g A tK e y ( ) k ey R o v in g () s et Se l ecte dA tK ey( ) k ey S e l e c t ed ( ) Gets the “out” temporal ease for a key. po sit io n . 30 .m a s k ( 1 ) . Reports whether a keyframe has temporal continuity. o p a c i t y . Example: Change the value of a mask shape to be open instead of closed v a r m y M a s k = m y l a y e r . v a r m y P r o p e r t y = m yM as k . an d i s s t o r e d as a f l o a t m y P r o p e r t y . / / o p ac i t y h as p r o p e r t y V a l u e T y p e o f O n e D. Reports whether a keyframe has spatial continuity. m a s k P a t h .

r o t a t i o n . This sets the value of the red component of a light's color at time 4 to be half of that at time 2: va r myP rop er ty = m yL igh t. Example: Change the keyframe values for the first three keyframes of some source text m y P r o p e r t y = m y T e x t L a y e r .f a ls e) . 3 0 .g. s e t V a l u e A t T i m e ( 5 . myProperty.JavaScript Reference Property object 121 m y S h a pe . color. m y L a y e r . i f (m y P r o p e r t y .v alueA tTime (3 . se tV al u e ([ 2 0 . 5 0 ]) .opacity]. m y P r o p e r t y . 9 0) . The se co nd fi l l s i n a de fa ul t o f 1 00. ne w T e x t D o c u m e n t( " k e y n um b e r 2 " ) ) . c o l o r V a l u e [ 0 ] = 0 .setValueAtTime(10. ne w T e x t D o c u m e n t( " k e y n um b e r 1 " ) ) . // Th ese tw o a re eq uiva lent . 0 ] ) . myProper ty. m y P r o p e r t y . Example: Get the value of a color at a particular time A color is stored as an array of four floats. s o u r c e T e xt .setValue(myShape). 50 . ne w T e x t D o c u m e n t( " k e y n um b e r 3 " ) ) . // Th ese tw o a re eq uiva lent .s c al e . p o s i t i o n .5.colorValue).set Va lueAt K ey(3. myProperty. m y L a y e r .50] va r myProper ty = m yL ayer. 100 ]). sca l e. } else { myProper ty. 0 ). } else { a l ert (" oo ps " ) . m y P r o p e r t y = m y L a y e r . scale. myLa yer.set Va lueAt K ey(1.s e tV al u e ([ 5 0 . I th ough t t her e w ere 3 ke yfra mes").scale . or source text // Th ese tw o a re eq uiva lent . } Example: Set values using the convenience syntax for position. p o s i t i o n . m y L a y e r .setV alue ([50 .setValueAtTime(4. 5 * c o l o r V a l u e [0 ]. se tV al u e ([ 2 0 . va r color Valu e = m yP ro pe rty. myProper ty.c l o s e d = f a l s e .b. The se co nd fi l l s i n a de fa ul t o f 0 .5 is the expected value of [10.set Va lueAt K ey(2. Example: Check that a scale calculated by an expression at time 3. Rotation properties are stored as a OneD value. color. myProperty. and the middle keyframe is at the 5 second mark.t rue ). 3 0 ] ) . n u m K e y s < 3 ) { a l ert ("er ror. } Example: Keyframe a rotation from 0 to 90 and back again The animation is 10 seconds. i f ( s c a l e V al u e [0 ] = = 1 0 & & s c a l e V a l u e [ 1 ] = = 5 0 ) { a l ert ("h urra y"). 0). The se co nd fi l l s i n a de fa ul t o f 1 . [r. value At Tim e( 2. / / f a l s e v a l u e o f p r e E x p r e s s i o n m e a n s e v a l u at e t h e e x p r e s s i o n va r s c aleV alue = myP rop er ty. s e t V a l u e A t T i m e ( 0 .0 121 .

Type Boolean. m y T e xt L a y e r . read-only. . 8.ex p r e s s i o n Description The expression for the named property.p r op e r t y S p ec . Property addKey() method a pp . 8. the string is evaluated. at which to add the keyframe. 122 .3 . Integer. Writeable only when canSet Expr ession for the named property is true. Parameters t im e Returns The time. When you specify a value for this attribute. 0] ). myLigh t.i te m (i nd e x) .laye r( in de x) . s e t V al u e (" f o o " ) . the index of the new keyframe or marker. .1 .co lo r.p r op e rt y S p ec .i te m (i nd e x) . the named property can vary over time—that is. The beginning of the composition is 0.1 ]) . Type Boolean.JavaScript Reference Property object 122 myLigh t.co lo r.p r op e rt y S p ec .c an Se tE x p r e s s io n Description When true. c a n V a r yO v e rT i m e Description When true. // Th ese tw o a re eq uiva lent .p r o j e c t .s et Valu e( [.p r op e rt y S p ec . s o u r c e T e x t . the named property is of a type whose expression can be set by a script.p r o j e c t .s et Valu e( [.i te m (i nd e x) . A floating-point value. The s e co n d cr e a t e s a T e xt Do c u m e n t m y T e xt L a y e r . keyframe values or expressions can be written to this property. .laye r( in de x) . See also “Property expression attribute” on page 122. s e t V al u e (n e w T e x t D o c u m e n t( " f o o " ) ) . read-only. s o u r c e T e x t .p r o j e c t . Property canVaryOverTime attribute a pp . in seconds.laye r( in de x) .laye r( in de x) . Property canSetExpression attribute a pp .3 .p r o j e c t .i te m (i nd e x) . 1. .a dd Key( 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. Property expression attribute a pp .

i te m (i nd e x) . Type String.ha s Min Description When true. • If the string does not contain a valid expression. the named property uses its associated expression to generate a value.p r o j e c t . an error is generated. read/write if c an Se tE x p r e s s io n for the named property is true. otherwise false.ha s Max Description When true. Property expressionEnabled attribute a pp . the keyframe information or static value of the property is used.JavaScript Reference Property object 123 • If the string contains a valid expression. there is a maximum permitted value for the named property. generated by evaluation of the string most recently set in expr ession .i te m (i nd e x) .ex p r e s s i o n E n a b le d Description When true. e x p r e s s i o n E n a b l e d becomes false. but no error is generated. 123 .laye r( in de x) .p r o j e c t .i te m (i nd e x) . Property expressionError attribute a pp .p r op e rt y S p ec . read/write. e x p r e s s i o n E n a b l e d becomes true.laye r( in de x) .p r op e rt y S p ec .p r o j e c t .laye r( in de x) . there is a minimum permitted value for the named property.i te m (i nd e x) . Property hasMin attribute a pp . and e xp re ss i on E n a b l ed becomes false.p r op e rt y S p ec . If no expression string has been specified. or if the last expression string evaluated without error. Type Boolean. otherwise false. When false. if any. Type Boolean.p r o j e c t . contains the empty string ("").ex p r e s s i o n E r r o r Description Contains the error. read-only. Property hasMax attribute a pp . read-only.p r op e rt y S p ec . This attribute can be set to true only if c a n Se tE x p re ss i on for the named property is true and expr ession contains a valid expression string.laye r( in de x) . • If you set the attribute to the empty string. Type String.

JavaScript Reference Property object 124 Type Boolean.i te m (i nd e x) . Property isInterpolationTypeValid() method a pp .i te m (i nd e x) .p r o j e c t . the named property is time varying—that is.laye r( in de x) .p r op e rt y S p ec .p r o j e c t . the named property defines a spatial value. Property isSpatial attribute a pp . one of: K e y f r a m e I n t er p o l a ti o n T y p e .i s Sp at i al Description When true.i te m (i nd e x) .i s I nte rpo l at io n Ty pe Val i d ( t yp e ) Description Returns true if the named property can be interpolated using the specified keyframe interpolation type.k ey f ram e I n te rp ol at i on T y p e Description The type of interpolation used at a keyframe. H O L D Returns Boolean.i te m (i nd e x) .p r o j e c t .p r op e rt y S p ec .is T im eVa rying Description When true. it has keyframes or an enabled expression. read-only.laye r( in de x) .laye r( in de x) .p r op e rt y S p ec . L I N E A R K e y f r a m e I n t er p o l a ti o n T y p e . the attribute c a n V a r y O v e r T im e must also be true. Property isTimeVarying attribute a pp . B E Z I E R K e y f r a m e I n t er p o l a ti o n T y p e . When this attribute is true. read-only. Parameters t y pe A K e y f r a m e I n t er p o l a ti o n T y p e enumerated value.p r op e rt y S p ec .laye r( in de x) . Property keyframeInterpolationType attribute a pp . Type Boolean. 124 . read-only. Type Boolean.p r o j e c t . Examples are position and effect point controls.

as returned by the ad d K e y or n e a r e s t K e y I n d e x method. L I N E A R K e y f r a m e I n t er p o l a ti o n T y p e . an exception is generated. Returns Array of floating-point values: • If the property value type is P r o p e r t y V a l u e T y p e . as returned by the ad d K e y or n e a r e s t K e y I n d e x method.numKeys]. H O L D Property keyInSpatialTangent() method a pp . k e y I n I n t e r p o l a ti o n T y p e ( keyInd ex ) Description Returns the 'in' interpolation type for the specified keyframe. Parameters k ey I n d ex The index for the keyframe. the array contains 3 floating-point values. One of: K e y f r a m e I n t er p o l a ti o n T y p e . Parameters k ey I n d ex The index for the keyframe. the value type is T w o D _ SP A T I A L or T hree D_ S P AT I AL ). • If the property value type is neither of these types. if the named property is spacial (that is. 125 .laye r( in de x) .p r op e rt y S p ec . An integer in the range [1.. An integer in the range [1. H O L D Property keyInInterpolationType() method a pp .i te m (i nd e x) .k eyInS p at ia lTange nt( keyInd ex ) Description Returns the incoming spatial tangent for the specified keyframe. L I N E A R K e y f r a m e I n t er p o l a ti o n T y p e .JavaScript Reference Property object 125 Type A Ke y fr am eI n ter po l ati o n T y pe enumerated value. Returns A Ke y fr am eI n ter po l ati o n T y pe enumerated value. read/write.p r op e rt y S p ec ..numKeys].T wo D _ S P A T I A L . • If the property value type is P r o p e r t y V a l u e T y p e . one of: K e y f r a m e I n t er p o l a ti o n T y p e .laye r( in de x) .p r o j e c t . B E Z I E R K e y f r a m e I n t er p o l a ti o n T y p e . the array contains 2 floating-point values. B E Z I E R K e y f r a m e I n t er p o l a ti o n T y p e . T hr e e D_ S P A T I A L .p r o j e c t .i te m (i nd e x) .

Property keyOutInterpolationType() method a pp . 126 ..p r o j e c t . Returns A Ke y fr am eI n ter po l ati o n T y pe enumerated value. Parameters k ey I n d ex The index for the keyframe.i te m (i nd e x) . • If the property value type is P r o p e r t y V a l u e T y p e . as returned by the a dd K ey or near estKe y I n d ex method.. Parameters k ey I n d ex The index for the keyframe. An integer in the range [1. the array contains 2 objects.numKeys]. Parameters k ey I n d ex The index for the keyframe..T wo D _ S P A T I A L .k eyO utSpat i alTan g ent (k e y I n d e x) Description Returns the outgoing spatial tangent for the specified keyframe.i te m (i nd e x) . • For any other value type. An integer in the range [1.p r o j e c t . the array contains 1 object. as returned by the a dd K ey or near estKe y I n d ex method.laye r( in de x) .numKeys]. B E Z I E R K e y f r a m e I n t er p o l a ti o n T y p e . one of: K e y f r a m e I n t er p o l a ti o n T y p e . L I N E A R K e y f r a m e I n t er p o l a ti o n T y p e . the array contains 3 objects. as returned by the a dd K ey or near estKe y I n d ex method.p r o j e c t .p r op e rt y S p ec .numKeys].p r op e rt y S p ec .laye r( in de x) . Returns Array of KeyframeEase objects: • If the property value type is P r o p e r t y V a l u e T y p e .k eyO utIn ter po la tion Type ( k e y I n d e x) Description Returns the outgoing interpolation type for the specified keyframe. T hr e e D_ S P A T I A L . H O L D Property keyOutSpatialTangent() method a pp .JavaScript Reference Property object 126 Property keyInTemporalEase() method a pp . An integer in the range [1.p r op e rt y S p ec .vk eyInTe m p ora lE as e( keyI ndex ) Description Returns the incoming temporal ease for the specified keyframe.i te m (i nd e x) .laye r( in de x) .

laye r( in de x) . an exception is generated. the array contains 2 objects. 127 ..T wo D _ S P A T I A L . • For any other value type.T wo D _ S P A T I A L . Property keyRoving() method a pp .JavaScript Reference Property object 127 Returns Array of floating-point values: • If the property value type is P r o p e r t y V a l u e T y p e . the array contains 2 floating-point values. T hr e e D_ S P A T I A L . Property keyOutTemporalEase() method a pp . • If the property value type is P r o p e r t y V a l u e T y p e . and k ey R o v i n g ( ) continues to return false. The first and last keyframe in a property cannot rove.p r op e rt y S p ec .numKeys]. an exception is generated. An integer in the range [1. • If the property value type is neither of these types.p r op e rt y S p e c. If the property value type is neither T w o D_ S P A T I A L nor T h r e e D_ S P A T I A L . Returns Array of KeyframeEase objects: • If the property value type is P r o p e r t y V a l u e T y p e . the array contains 1 object.k eyO utTe m pora lE ase( keyI ndex ) Description Returns the outgoing temporal ease for the specified keyframe. Parameters k ey I n d ex The index for the keyframe.k eyRov in g (k ey I nd e x) Description Returns true if the specified keyframe is roving. as returned by the a dd K ey or near estKe y I n d ex method..i te m (i nd e x) .numKeys]. Returns Boolean. An integer in the range [1.l a y e r( in de x) .p r o j e c t . pr oj e ct . i t e m (i n de x) . the array contains 3 objects. • If the property value type is P r o p e r t y V a l u e T y p e . Parameters k ey I n d ex The index for the keyframe. T hr e e D_ S P A T I A L . if you try to set roving for one of these. the operation is ignored. as returned by the a dd K ey or near estKe y I n d ex method. the array contains 3 floating-point values.

k eySpa tia lA ut oBe z ie r( keyI ndex ) Description Returns true if the specified keyframe has spatial auto-Bezier interpolation. Parameters k ey I n d ex The index for the keyframe.laye r( in de x) . Property keySpatialAutoBezier() method a pp . Returns Boolean.p r op e rt y S p ec .i te m (i nd e x) .numKeys]..numKeys].p r o j e c t .laye r( in de x) .i te m (i nd e x) . Property keySpatialContinuous() method a pp . Parameters k ey I n d ex The index for the keyframe. as returned by the a dd K ey or near estKe y I n d ex method. An integer in the range [1. (This type of interpolation affects this keyframe only if ke ySpat i alCo ntinuo us( keyInd ex ) is also true. Returns Boolean.i te m (i nd e x) . k e y S e l e c t e d (k ey I nd e x) Description Returns true if the specified keyframe is selected. as returned by the a dd K ey or near estKe y I n d ex method. an exception is generated. k e y S p a ti a lC o n t i n u o u s (k ey I n de x) Description Returns true if the specified keyframe has spatial continuity... Parameters k ey I n d ex The index for the keyframe.p r o j e c t . If the property value type is neither T w o D_ S P A T I A L nor T h r e e D_ S P A T I A L . An integer in the range [1. 128 . an exception is generated.p r o j e c t . An integer in the range [1.numKeys].JavaScript Reference Property object 128 Property keySelected() method a pp .) If the property value type is neither T w o D_ S P A T I A L nor T h r e e D_ S P A T I A L . as returned by the a dd K ey or near estKe y I n d ex method.p r op e rt y S p ec . Returns Boolean.p r op e rt y S p ec .laye r( in de x) .

p r op e rt y S p ec . k e y T i m e ( m a r k e r C o m m en t) Description Finds the specified keyframe or marker and returns the time at which it occurs.p r op e rt y S p ec . Parameters k ey I n d ex The index for the keyframe. Property keyTemporalContinuous() method a pp .numKeys]. An integer in the range [1. An integer in the range [1..p r o j e c t . Returns Boolean.p r o j e c t . 129 . Temporal auto-Bezier interpolation affects this keyframe only if ke y fr am eI n ter po l at io n T y pe is K e y fr a m e I n t e r p o l a t i o n T y p e . as returned by the a dd K ey or near estKe y I n d ex method.i te m (i nd e x) . this method generates an exception.. B E Z I E R for both k e y I n I n t e r p o l a t i o n ( keyI ndex ) and ke y Ou tInt erp ola ti on( keyInd ex ) .i te m (i nd e x) .numKeys]. and an error is displayed.i te m (i nd e x) . k e y T e m p o r a l C o n t i n u o u s( keyInd ex ) Description Returns true if the specified keyframe has temporal continuity. k e y T e m p o r a l A u t o B e z i e r ( k e y I n d e x) Description Returns true if the specified keyframe has temporal auto-Bezier interpolation. Temporal continuity affects this keyframe only if keyframe Inte rpolat io nType is K e y f r a m e I n t e r p o l a t io n T y p e . If no keyframe or marker can be found that matches the argument.p r op e rt y S p ec . B E Z I E R for both k e y I n I n t e r p o l a t io n (k ey I nd e x) and k ey O u t I n te r p o l at i o n ( k e y I n d e x) .p r op e rt y S p ec .laye r( in de x) . k e y T i m e ( keyInd ex ) a pp .numKeys]. Parameters k ey I n d ex The index for the keyframe. Property keyTime() method a pp . as returned by the a dd K ey or near estKe y I n d ex method. Parameters k ey I n d ex The index for the keyframe. An integer in the range [1.i te m (i nd e x) . markerComment The comment string attached to a marker (see “MarkerValue comment attribute” on page 99). Returns Boolean.p r o j e c t .p r o j e c t .laye r( in de x) .JavaScript Reference Property object 129 Property keyTemporalAutoBezier() method a pp .laye r( in de x) ..laye r( in de x) . as returned by the ad dKe y or near - e st K ey I n d ex method.

JavaScript Reference

Property object

130

Returns

Floating-point value.

Property keyValue() method
a pp .p r o j e c t .i te m (i nd e x) .laye r( in de x) .p r op e rt y S p ec .k eyVa lue( keyInd ex ) a pp .p r o j e c t .i te m (i nd e x) .laye r( in de x) .p r op e rt y S p ec .k eyVa lue( m a r k e r C o m m en t) Description

Finds the specified keyframe or marker and returns its current value. If no keyframe or marker can be found that matches the argument, this method generates an exception, and an error is displayed.
Parameters k ey I n d ex
The index for the keyframe. An integer in the range [1..numKeys], as returned by the ad dKe y or near -

e st K ey I n d ex method. markerComment Returns
The comment string attached to a marker (see “MarkerValue comment attribute” on page 99).

Floating-point value.

Property maxValue attribute
a pp .p r o j e c t .i te m (i nd e x) .laye r( in de x) .p r op e rt y S p ec .ma x Valu e Description

The maximum permitted value of the named property. If the hasMa x attribute is false, an exception occurs, and an error is generated.
Type

Floating-point value; read-only.

Property minValue attribute
a pp .p r o j e c t .i te m (i nd e x) .laye r( in de x) .p r op e rt y S p ec . m i n V a l u e Description

The minimum permitted value of the named property. If the ha sM in attribute is false, an exception occurs, and an error is generated.
Type

Floating-point value; read-only.

130

JavaScript Reference

Property object

131

Property nearestKeyIndex() method
a pp .p r o j e c t .i te m (i nd e x) .laye r( in de x) .p r op e rt y S p ec . n e ar e s t K e y I n d e x (t i m e) Description

Returns the index of the keyframe nearest to the specified time.
Parameters t im e Returns
The time in seconds; a floating-point value. The beginning of the composition is 0.

Integer.

Property numKeys attribute
a pp .p r o j e c t .i te m (i nd e x) .laye r( in de x) .p r op e rt y S p ec . n u m K e y s Description

The number of keyframes in the named property. If the value is 0, the property is not being keyframed.
Type

Integer; read-only.

Property propertyIndex attribute
a pp .p r o j e c t .i te m (i nd e x) .laye r( in de x) .p r op e rt y S p ec .p rop er tyInd ex Description

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

Integer; read-only.

Property propertyValueType attribute
a pp .p r o j e c t .i te m (i nd e x) .laye r( in de x) .p r op e rt y S p ec .p r o p e r ty V a l u e T y p e Description

The type of value stored in the named property. The Pr ope rty V al ue T y pe enumeration has one value for each type of data that can be stored in or retrieved from a property. Each type of data is stored and retrieved in a different kind of structure. All property objects store data according to one of these categories. For example, a 3D spatial property (such as a layer's position) is stored as an array of three floating point values. When setting a value for position, pass in such an array, as follows:
my l a ye r.p rop er ty ( " po si t io n "). se tVa lue([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:
v a r m y S h a pe = n e w S h a p e () ;

131

JavaScript Reference

Property object

132

mySha pe .ve rtices = [[0,0 ], [0 ,10 0], [1 00, 100 ], [10 0,0 ]]; v a r m y M a s k = m y l a y e r .p r o p e r t y ( " A DBE Mask Pa rade").pro pe rty(1); m y M as k. pr o pe r ty ( " A D BE M as k S h ap e " ) .s e tV al u e (m y S h a p e ) ; Type

A Pr ope rty V al ue T y pe enumerated value; read/write. One of:
E

PropertyValueType.NO_VALUE PropertyValueType.ThreeD_SPATIAL PropertyValueType.ThreeD P r o p e r t y V a l u e T y p e . T w o D_ S P A T I A L PropertyValueType.TwoD PropertyValueType.OneD PropertyValueType.COLOR P r o p e r t y V a l u e T y p e . C U S T O M_ V A L U E PropertyValueType.MARKER PropertyValueType.LAYER_INDEX PropertyValueType.MASK_INDEX Proper tyVa lueType. SH APE PropertyValueType.TEXT_DOCUMENT

Stores no data. Array of three floating-point positional values. For example, an Anchor Point value might be [10.0, 20.2, 0.0] Array of three floating-point quantitative values. For example, a Scale value might be [100.0, 20.2, 0.0] Array of 2 floating-point positional values For example, an Anchor Point value might be [5.1, 10.0] Array of 2 floating-point quantitative values. For example, a Scale value might be [5.1, 100.0] A floating-point value. Array of 4 floating-point values in the range [0.0..1.0]. For example, [0.8, 0.3, 0.1, 1.0] Unimplemented type; you cannot get or set values for properties with this type. MarkerValue object; see “MarkerValue object” on page 98. Integer; a value of 0 means no layer. Integer; a value of 0 means no mask. Shape object; see “Shape object” on page 164. TextDocument object; see “TextDocument object” on page 171.

Property removeKey() method
a pp .p r o j e c t .i te m (i nd e x) .laye r( in de x) .p r op e rt y S p ec .re m ove Ke y (k ey I nd e x) Description

Removes the specified keyframe from the named property. If no keyframe with the specified index exists, generates an exception and displays an error. When a keyframe is removed, the remaining index numbers change. To remove more than one keyframe, you must start with the highest index number and work down to the lowest to ensure that the remaining indices reference the same keyframe after each removal.
Parameters k ey I n d ex
The index for the keyframe. An integer in the range [1..numKeys], as returned by the a dd K ey or near estKe y I n d ex method.

Returns

Nothing.

132

numKeys]. and k ey R o v i n g ( ) continues to return false.p r o j e c t . or if the property has no keyframes. If not supplied.p r o j e c t . n ew Va l) Description Turns roving on or off for the specified keyframe.p r o j e c t .laye r( in de x) . H O L D Returns Nothing. s e l e c t ed K e y s Description The indices of all the selected keyframes in the named property. i n Ty p e . as returned by the a d dK ey or n e a re s t K e y I n d e x method.laye r( in de x) .numKeys].. an exception is generated. returns an empty array. Property setRovingAtKey() method a pp .p r op e rt y S p ec . Property setInterpolationTypeAtKey() method a pp . the ‘out’ type is set to the i n T y p e value. Parameters k ey I n d ex inType The index for the keyframe. An integer in the range [1. o ut T y p e) Description Sets the ‘in’ and ‘out’ interpolation types for the specified keyframe.JavaScript Reference Property object 133 Property selectedKeys attribute a pp . An integer in the range [1. L I N E A R K e y f r a m e I n t er p o l a ti o n T y p e . s e t R o v i n g A tK e y ( k e y I n d ex . A K e y f r a m e I n t er p o l a ti o n T y p e enumerated value. one of: K e y f r a m e I n t er p o l a ti o n T y p e . The first and last keyframe in a property cannot rove.p r op e rt y S p ec . if you try to set roving for one of these. A K e y f r a m e I n t er p o l a ti o n T y p e enumerated value. Type Array of integers.i te m (i nd e x) . H O L D outType (Optional) The outgoing interpolation type.p r op e rt y S p ec . read-only. one of: K e y f r a m e I n t er p o l a ti o n T y p e . B E Z I E R K e y f r a m e I n t er p o l a ti o n T y p e .s et I n te rp ol at io n T y pe At Ke y (k ey I nd e x. The incoming interpolation type. If the property value type is neither T w o D_ S P A T I A L nor T h r e e D_ S P A T I A L .i te m (i nd e x) . as returned by the a d dK ey or n e a r e s t Ke y In de x method. If no keyframes are selected..laye r( in de x) . L I N E A R K e y f r a m e I n t er p o l a ti o n T y p e .i te m (i nd e x) . Parameters k ey I n d ex The index for the keyframe. B E Z I E R K e y f r a m e I n t er p o l a ti o n T y p e . 133 . the operation is ignored.

If the property value type is neither T w o D_ S P A T I A L nor T h r e e D_ S P A T I A L . o nO f f ) Description Selects or deselects the specified keyframe. Property setSelectedAtKey() method a pp . Parameters k ey I n d ex onOff Returns The index for the keyframe. an exception is generated.JavaScript Reference Property object 134 newVal True to turn roving on..laye r( in de x) .s et Sp at i alCon ti nuo usA tK ey( k e y I n d ex . false to turn roving off.p r o j e c t . True to select the keyframe. as returned by the a dd K ey or near estKe y I n d ex method. as returned by the a dd K ey or near estKe y I n d ex method. 134 .numKeys]. Nothing. false to deselect it.p r op e rt y S p ec .p r op e rt y S p ec . An integer in the range [1. n e w V a l ) Description Turns spatial continuity on or off for the specified keyframe. Returns Nothing.s e t S p a t i a l A u to B e z i e r At K e y( k e y I n d e x . Returns Nothing.s et Se lecte dA tKey( keyInd ex .. True to turn spatial auto-Bezier on.i te m (i nd e x) .p r op e rt y S p ec . an exception is generated. Property setSpatialContinuousAtKey() method a pp .p r o j e c t . If the property value type is neither T w o D_ S P A T I A L nor T h r e e D_ S P A T I A L .i te m (i nd e x) .p r o j e c t . Parameters k ey I n d ex newVal The index for the keyframe. An integer in the range [1.i te m (i nd e x) .numKeys]. Property setSpatialAutoBezierAtKey() method a pp .laye r( in de x) . n e w V a l ) Description Turns spatial auto-Bezier interpolation on or off for the specified keyframe. false to turn it off.laye r( in de x) .

numKeys]. Returns Nothing. as returned by the a dd K ey or near estKe y I n d ex method. it affects this keyframe only if ke ySpa tialCo ntinuo us(k ey I nd e x) is also true. T h r e e D _ S P A T I A L . the array contains 3 values. an exception is generated. as returned by the a dd K ey or near estKe y I n d ex method.laye r( in de x) .p r o j e c t .i te m (i nd e x) . the array contains 3 values. If the property value type is neither T w o D_ S P A T I A L nor T h r e e D_ S P A T I A L . • If the property value type is P r o p e r t y V a l u e T y p e .p r o j e c t . An integer in the range [1. T w o D_ S P A T I A L .set Spat ialTa n gent sA tKey( k e y I n d ex .. • If the property value type is P r o p e r t y V a l u e T y p e . Property setSpatialTangentsAtKey() method a pp . • If the property value type is P r o p e r t y V a l u e T y p e . An array of 2 or 3 floating-point values.laye r( in de x) . True to turn spatial continuity on.. s e t T e m p o r a l A u t o B e z i e r A t K e y ( k e yI n de x . the array contains 2 values.i te m (i nd e x) . The incoming tangent vector. T w o D_ S P A T I A L . as returned by the a dd K ey or near estKe y I n d ex method.numKeys].numKeys]. false to turn it off. Returns Nothing.p r op e rt y S p ec . o ut T an g en t) Description Sets the incoming and outgoing tangent vectors for the specified keyframe. An integer in the range [1. Property setTemporalAutoBezierAtKey() method a pp . i n T a n g e nt . An array of 2 or 3 floating-point values. the ‘out’ tangent is set to the i n T a n g e n t value.p r op e rt y S p ec . T h r e e D _ S P A T I A L . When this is turned on.. An integer in the range [1. the array contains 2 values. True to turn temporal auto-Bezier on. n ew Va l ) Description Turns temporal auto-Bezier interpolation on or off for the specified keyframe.JavaScript Reference Property object 135 Parameters k ey I n d ex newVal The index for the keyframe. Returns Nothing. ou tTa n gent (Optional) The outgoing tangent vector. false to turn it off. • If the property value type is P r o p e r t y V a l u e T y p e . If not supplied. Parameters k ey I n d ex newVal The index for the keyframe. Parameters k ey I n d ex inTangent The index for the keyframe. 135 .

Parameters k ey I n d ex i n T e m po r a l E a se The index for the keyframe. the array contains 1 object. i n T e m po r a l E a s e . s e t T e m p o r a l E a s e A t K e y ( k e y I n de x . See “KeyframeEase object” on page 81. Returns Nothing..p r o j e c t . s e t T e m p o r a l C o n t in u ou s A t K e y ( k ey I n de x . • If the property value type is Pro pe rty V al ue T y pe . the array contains 2 objects. An integer in the range [1. If not supplied. false to turn it off. An array of 1. An array of 1. as returned by the a dd K ey or near estKe y I n d ex method. Parameters k ey I n d ex newVal The index for the keyframe.i te m (i nd e x) . as returned by the a dd K ey or ne ar- estKe yI n de x method. it affects this keyframe only if the K e y fr a m e I n ter po l a ti o n T yp e is K e y f r a m e I n t er p o l a ti o n T y p e . Property setTemporalEaseAtKey() method a pp . Returns Nothing.laye r( in de x) . • For all other value types.T w oD_ S P AT I A L . • If the property value type is Pro pe rty V al ue T y pe . True to turn temporal continuity on.p r op e rt y S p ec . the array contains 1 object. o ut T e m po ra l Ea s e ) Description Sets the incoming and outgoing temporal ease for the specified keyframe. the array contains 2 objects.T w oD_ S P AT I A L .p r op e rt y S p ec .p r o j e c t .T hr eeD _ SP AT I AL .numKeys]. • If the property value type is Pro pe rty V al ue T y pe . or 3 KeyframeEase objects. ou tTe m po ralEa se (Optional) The outgoing temporal ease.i te m (i nd e x) . n ew Va l) Description Turns temporal continuity on or off for the specified keyframe. or 3 KeyframeEase objects. the array contains 3 objects. The incoming temporal ease. An integer in the range [1. 136 . 2..laye r( in de x) .T hr eeD _ SP AT I AL . B E Z I E R for both k e y I n I n t e r p o l a t i o n ( k e y I n d e x ) and ke y Ou tInt erp ol a t i o n ( keyInd ex ) . When temporal continuity is turned on. 2.numKeys]. • For all other value types. the outgoing ease is set to the i n T e m po - r a lE a s e value.JavaScript Reference Property object 136 Property setTemporalContinuousAtKey() method a pp . • If the property value type is Pro pe rty V al ue T y pe . the array contains 3 objects.

see “Property propertyValueType attribute” on page 131. A value appropriate for the type of property being set.i te m (i nd e x) .. and sets its value. this method generates an exception and displayes an error. use “Property setValueAtTime() method” on page 137 or “Property setValueAtKey() method” on page 137. Nothing. Property setValueAtTime() method a pp . or no keyframe with the specified index.p r o j e c t .i te m (i nd e x) .p r op e rt y S p ec . as returned by the a dd K ey or near estKe y I n d ex method. 137 . If the named property has no keyframes.numKeys]. see “Property propertyValueType attribute” on page 131.set Valu e( ne wV al ue ) Description Sets the static value of a property that has no keyframes.i te m (i nd e x) . If the named property has keyframes. a floating-point value.JavaScript Reference Property object 137 Property setValue() method a pp . Property setValueAtKey() method a pp .p r o j e c t .set Valu eAt K ey(k ey I n de x.laye r( in de x) . Creates a new keyframe for the named property.set Valu eAt T ime( t i m e .laye r( in de x) . To set the value of a property with keyframes. if one does not currently exist for the specified time. The beginning of the composition is 0. Parameters ne wV alue Returns A value appropriate for the type of property being set. Returns Nothing. ne wV a lue ) Description Finds the specified keyframe and sets its value. see “Property propertyValueType attribute” on page 131. An integer in the range [1. Parameters k ey I n d ex ne wV alue The index for the keyframe. n e w Va l u e ) Description Sets the value of a keyframe at the specified time.p r op e rt y S p ec . Parameters t im e ne wV alue The time in seconds. this method generates an exception and displays an error. A value appropriate for the type of property being set.p r op e rt y S p ec .p r o j e c t .laye r( in de x) .

Creates a new keyframe for the named property. read-only. See examples for “Property object” on page 118. read-only.p r o j e c t .p r op e rt y S p ec . The beginning of the composition is 0.p r o j e c t . Type A value appropriate for the type of the property (see “Property propertyValueType attribute” on page 131). and sets its value.va l ue Description The value of the named property at the current time.p r o j e c t . Each time is a floating-point value.set Valu esAtTime s( t i m e s .p r op e rt y S p ec .laye r( in de x) . returns the static value. 138 . The type of value returned depends on the property value type. n e w V a l u e s ) Description Sets values for a set of keyframes at specified of times. see “Property propertyValueType attribute” on page 131. Property value attribute a pp . • Otherwise. the arrays must be of the same length. returns the keyframed value at the current time. Times and values are expressed as arrays. u n i t sT ex t Description The text description of the units in which the value is expressed. Property unitsText attribute a pp . A array of values appropriate for the type of property being set.p r op e rt y S p ec . in seconds.i te m (i nd e x) .i te m (i nd e x) . Returns Nothing. • If there are keyframes. if one does not currently exist for a specified time. Parameters t im es ne wV alue s An array of times. Type String. • If e x p r e s s i o n E n a b l e d is true. returns the evaluated expression value.laye r( in de x) .laye r( in de x) .i te m (i nd e x) . Property setValuesAtTimes() method a pp .JavaScript Reference Property object 138 Returns Nothing.

return the value for the specified time without applying the expression to it. Returns A value appropriate for the type of the property (see “Property propertyValueType attribute” on page 131). v a l u e A tT i m e ( t i m e . The beginning of the composition is 0. a floating-point value. return the result of evaluating the expression for the specified time. Ignored if the property does not have an associated expression. Note that the type of value returned is not made explicit.JavaScript Reference Property object 139 Property valueAtTime() method a pp .i te m (i nd e x) . depending on the property evaluated. p r eE x p r e s s i o n ) Description The value of the named property as evaluated at the specified time. Parameters t im e p r e E xp r e ss i o n The time in seconds.p r op e rt y S p ec . 139 . it will be of a different type.p r o j e c t . When false. If the property has an expression and this is true.laye r( in de x) .

p r o j e c t.p r op e r t y S p ec Description Properties are accessed by name through layers. la ye r1. / / i n v al i d r ef eren ce to d ele ted obj ect Similarly.n a m e ) . l ay er ( 1 ) ( " E ff e c t s" ) ( " A d d G r a i n " )( " V i e w i n g M o de " ).l a y e r ( 1 ) . so PropertyBase attributes and methods are available when working with properties and property groups. if you reference an AE property in a deleted object. See “Property object” on page 118 and “PropertyGroup object” on page 147. script references to that object can generate errors. n am e ). remov e().i t e m ( 1 ) . / / i n v a li d r e f e r e n c e b e ca u s e g r o u p in de x p o s i ti o n s h a v e c h an g e d Attributes Attribute Reference “PropertyBase name attribute” on page 144 “PropertyBase matchName attribute” on page 143 Description Name of the property. e f f e c t ( " A d d G r a i n " ) ( " V i e w in g M o d e " ) . v a r e f f e c t1 ag a in to o 2 = a pp .item (1 ). / / in v al i d r ef e r e n c e t o p r o p e r t y i n s e l e c t e d o b j e c t A less straightforward case is when a property is removed from a property group. See also “PropertyGroup property() method” on page 149. a reference to the deleted object generates the warning "Object is Invalid": v a r l ay e r 1 = ap p . v a r e f f e c t1 ag a in to o = ap p . v i e w in g M o d e .p r o j e c t. For example: v a r e f f e c t1 = a pp .l ay e r ( inde x) . v a r e f f e c t1 ag a in = ap p .p r o j e c t .i te m (1 ).p r o je c t .i te m (1 ).l ay e r (1 ). For example.i te m (1 ). if you delete an object. using various kinds of expression syntax. v a r l a y e r 1 p o s i t i o n = l a y e r 1 . e f f e c t1 .l a y e r ( 1 ) (" E f f e c ts " ) . po s i t i o n .JavaScript Reference PropertyBase object 140 PropertyBase object a pp . la ye r1. In simple cases this is straightforward.r e m o v e () . 140 .v ie wingM od e.i te m (i nd e x) .l a y e r ( 1 ) .l ay e r (1 ). item (1 ) . the warning occurs: v a r l ay e r 1 = ap p .ef f e c t (2) . After Effects generates the "Object is Invalid" error when you subsequently reference that item or other items in the group.ef f ect. a l ert (l a ye r1.i t e m ( 1 ) . because their index positions have changed.p r o je c t . In this case.p r o je c t .b l e n dW i t hO r i g i n al .a dd G r ai n . it e m ( 1) . a l e r t (e ff e c t 2 . ad d Gr ain. v al u e ).ef f e c t( 2 ) .l a y e r ( 1 ) .la yer( 1) .ef f e c t (1) . For example. t r a n s f o r m .proj ect. it e m ( 1 ) .p r o je c t. remov e(). the following are all ways of access properties in the Effects group: va r effect1 = a pp.p r o je c t. va r effect2 pa ram = a pp. v a r e f f e c t2 = a pp . name matchName A special name for the property used to build unique naming paths. • PropertyBase is the base class for both Property and PropertyGroup.pro ject . a l e r t (l a ye r 1 p o s i ti o n . as controlled by application preferences.la yer( 1 ) . Reference invalidation When something occurs that changes an object sufficiently for the reference to become invalid.

p r o j e c t . this property is active. this corresponds to the setting of the eyeball icon. Duplicates this property object. For an effect and all properties.JavaScript Reference PropertyBase object 141 Attribute Reference “PropertyBase propertyIndex attribute” on page 145 Description Index of this property within its parent group. When true. this property is active. i s M o d i fi e d c a n Se t E n a b l e d en abled a ct i ve elided i s E ff e c t isMask selected “PropertyBase isModified attribute” on page 143 When true. this property is an effect. it is the same as the e n a b l e d attribute. 141 .laye r( in de x) .p r op e r t y S p ec . this property is selected. When true. When true. p r o p e r t y G r o u p ( ) “PropertyBase propertyGroup() method” on page 145 re move () moveTo() d u p l i ca te () “PropertyBase remove() method” on page 146 “PropertyBase moveTo() method” on page 144 “PropertyBase duplicate() method” on page 142 Removes this from the project. Moves this property to a new position in its parent group. “PropertyBase propertyType attribute” on page 145 The property type. When true. read/write if c a n Se t E n a b l e d is true. When true. p r o p e r ty I n d e x p r o p e r ty De pt h p r o p e r ty T y p e “PropertyBase propertyDepth attribute” The number of levels of parent groups between this property and on page 144 the containing layer. Methods Method Reference Description Gets the parent group for this property. “PropertyBase canSetEnabled attribute” When true.i te m (i nd e x) . p ar e n tP r o pe r ty “PropertyBase parentProperty attribute” on page 144 The immediate parent group of this property. read-only if c a n S e t E n a b l e d is false. this property is enabled. this property is a mask. the property has been changed since its creation. the user interface displays an eyeball icon for this propon page 142 erty. “PropertyBase enabled attribute” on page 143 “PropertyBase active attribute” on page 141 “PropertyBase elided attribute” on page 142 “PropertyBase isEffect attribute” on page 143 “PropertyBase isMask attribute” on page 143 “PropertyBase selected attribute” on page 146 When true.a ct ive Description When true. Type Boolean. PropertyBase active attribute a pp . this property is not displayed in the user interface. For a layer.

see “PropertyBase propertyType attribute” on page 145. it is true for all layers.JavaScript Reference PropertyBase object 142 PropertyBase canSetEnabled attribute a pp . the method generates an exception and displays an error. “Animator 1” and “Animator 2” are contained in a PropertyBase called “Text Animators.laye r( in de x) . this property is a group used to organize other properties.p r o j e c t . I N D E X E D _ G R O U P . An indexed group has the type P r o p e r t y T y p e . read-only. e l i d ed Description When true. Generally.i te m (i nd e x) .can Se tEna bled Description When true. you can set the ena b led attribute value.d up lica te () Description If this property is a child of an indexed group. you might see: T e xt P at h O pt i o n s Mo re O p tions An ima to r 1 An ima to r 2 In this example. The property is not displayed in the user interface and its child properties are not indented in the Timeline panel. Type Boolean. 142 .laye r( in de x) .i te m (i nd e x) .p r op e r t y S p ec . read-only. If this property is not a child of an indexed group. Parameters None. and so the two child properties are not indented in the Timeline panel. creates and returns a new PropertyBase object with the same attribute values as this one.p r o j e c t . Type Boolean. for a text layer with two animators and no properties twirled down.p r op e r t y S p ec . this is true if the user interface displays an eyeball icon for this property.i te m (i nd e x) .p r o j e c t . PropertyBase elided attribute a pp .” This parent group is not displayed in the user interface. Returns PropertyBase object.laye r( in de x) . PropertyBase duplicate() method a pp .p r op e r t y S p ec . For example.

The match name is not displayed.JavaScript Reference PropertyBase object 143 PropertyBase enabled attribute a pp .is E ff ect Description When true.i te m (i nd e x) .i te m (i nd e x) .i te m (i nd e x) . Type Boolean. this property is an effect PropertyGroup. It corresponds to the setting of the eyeball icon. the default is true. Unlike the display name. read-only.p r op e r t y S p ec .laye r( in de x) . this property is a mask PropertyGroup.laye r( in de x) .en abled Description When true. PropertyBase isEffect attribute a pp . Type Boolean. read-only. PropertyBase matchName attribute a pp . 143 . this property is enabled. it is not localized. m a tc h N am e Description A special name for the property used to build unique naming paths. Type Boolean.i te m (i nd e x) .p r o j e c t .laye r( in de x) . 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. PropertyBase isModified attribute a pp .p r o j e c t . PropertyBase isMask attribute a pp .p r op e r t y S p ec .p r o j e c t . read-only. read/write if c a n Se t E n a b l e d is true.p r o j e c t . read-only if c a n S e t E n a b l e d is false.laye r( in de x) . if there is one.p r op e r t y S p ec .p r op e r t y S p ec . but you can refer to it in scripts. Every property has a unique match-name identifier. otherwise. i s M o d i fi e d Description When true.laye r( in de x) . Type Boolean. this property has been changed since its creation.p r op e r t y S p ec .p r o j e c t .i te m (i nd e x) .is Mas k Description When true.

I N D E X E D _ G R O U P .laye r( in de x) . see “PropertyBase propertyType attribute” on page 145. PropertyBase name attribute a pp .p r op e r t y S p ec . a property group that has the type P r o pe rt y T y p e .pare n tPro pe rty Description The property group that is the immediate parent of this property.) Parameters ne wIndex Returns The new index position at which to place this property in its group. if it is not. Type String. I N D E X E D _ GR OU P . This method is valid only for children of indexed groups. I N D E X E D _ G R O U P .mov eTo( n e w I n d ex ) Description Moves this property to a new position in its parent property group. otherwise read-only.i te m (i nd e x) .i te m (i nd e x) . (An indexed group has the type P r o p e r t y T y p e .laye r( in de x) .p r op e r t y S p ec .p rop er tyDe pt h 144 .p r op e r t y S p ec . Nothing. but always has a m a t c h N a m e value. see “PropertyBase propertyType attribute” on page 145.p r op e r t y S p ec . PropertyBase moveTo() method a pp . read-only.p r o j e c t .p r o j e c t . read-only. or if the index value is not valid.p r o j e c t .laye r( in de x) .p r o j e c t . Type PropertyGroup object or null.na m e Description The display name of the property. PropertyBase parentProperty attribute a pp . An integer.) It is an error to set the nam e value if the property is not a child of an indexed group (that is.) Type String. PropertyBase propertyDepth attribute a pp . read/write for a child of an indexed group. (An indexed group has the type P r o p e r t y T y p e .i te m (i nd e x) . the method generates an exception and displays an error. (Compare “PropertyBase matchName attribute” on page 143. see “PropertyBase propertyType attribute” on page 145).JavaScript Reference PropertyBase object 144 An indexed group may not have a n a m e value.i te m (i nd e x) .laye r( in de x) . or null if this PropertyBase is a layer.

pr ope rt yD ep th ].laye r( in de x) . read-only. Type Integer. 145 . Parameters countUp Optional.p r o j e c t . p r o p e r ty G r o u p( ) a pp . p r o p e r t y T y p e Description The type of this property.p r op e r t y S p ec .p r op e r t y S p ec . or null if the count reaches the containing layer. the m a s k s property of a layer refers to a variable number of individual masks by index number.P R O P E R T Y PropertyType. A property group whose members have an editable name and an index..i te m (i nd e x) . Default is 1.JavaScript Reference PropertyBase object 145 Description The number of levels of parent groups between this property and the containing layer. read/write. PropertyBase propertyIndex attribute a pp . The value 0 for a layer. p r o p e r ty G r o u p( co untUp ) Description Gets the PropertyGroup object for an ancestor group of this property at a specified level of the parent-child hierarchy.p r op e r t y S p ec .p r o j e c t . For example. Type A Pr ope rty Ty p e enumerated value.laye r( in de x) . if it is a child of an indexed group (a property group that has the type Pr op ert yT yp e.p r o j e c t .p r o j e c t .laye r( in de x) . Returns PropertyGroup object.i te m (i nd e x) .i te m (i nd e x) . Type Integer.laye r( in de x) .p r op e r t y S p ec . The number of levels to ascend within the parent-child hierarchy.INDEXED_GROUP A single property such as position or zoom. PropertyBase propertyType attribute a pp . I NDE XED _ G RO UP .p rop er tyInd ex Description The position index of this property within its parent group.i te m (i nd e x) . Effects and masks are indexed groups. One of: P r o p e r ty T y p e . which gets the immediate parent. An integer in the range [1. PropertyBase propertyGroup() method a pp . read-only. see “PropertyBase propertyType attribute” on page 145).

PropertyBase selected attribute a pp .p r op e r t y S p ec .i te m (i nd e x) . 146 .JavaScript Reference PropertyBase object 146 P r o p e r ty T y p e . this property is selected. otherwise read-only. s e l e c t ed Description When true. To read the full set of selected properties of a composition or layer.p r o j e c t . Returns Nothing. PropertyBase remove() method a pp .N A M E D _ GR OU P A property group in which the member names are not editable. the method generates an exception and displays an error.p r o j e c t . I N D E X E D _ G R O U P . use the s e l e c t e d P r o p e r t ie s attribute of a Comp or Layer object. see “PropertyBase propertyType attribute” on page 145. Layers are named groups. if it is not. any animator that has been set to a text layer).i te m (i nd e x) . Parameters None.re m ove () Description Removes this property from its parent group.laye r( in de x) .p r op e r t y S p ec . (An indexed group has the type P r o p e r t y T y p e . it removes the child properties as well.laye r( in de x) . Set to true to select the property. Sampling this attribute repeatedly for a large number of properties can slow down system performance. or if the index value is not valid.) This method can be called on a text animation property (that is. or to false to deselect it. This method is valid only for children of indexed groups. If this is a property group. read/write for an effect or mask property group. Type Boolean.

If this method cannot create a property with the specified name. For examples of how to access properties and property groups.) 147 . are available when working with PropertyGroup. See “MaskPropertyGroup object” on page 102. and adds it to this group. • PropertyGroup is a subclass of PropertyBase. it generates an exception. PropertyGroup attributes and methods are available when working with mask groups. See “PropertyBase object” on page 140. PropertyGroup addProperty() method a pp .p r o j e c t . Attributes Attribute Reference Description n u m P r op e r t ie s Methods Method “PropertyGroup numProperties attribute” on page 148 The number of indexed properties in the group. with a Layer object at the top (root) down to a single Property object.laye r( in de x) . In general. To traverse the group hierarchy. such as the mask feather of the third mask. (See “PropertyGroup canAddProperty() method” on page 148.p r o j e c t . Property groups can be nested to provide a parent-child hierarchy. • PropertyGroup is a base class for MaskPropertyGroup.p r op e r t y G r oup S p e c . see “PropertyBase propertyType attribute” on page 145) The only exception is a text animator property. in addition to those listed below. a d dP rop er ty ( n a m e ) Description Creates and returns a PropertyBase object with the specified name.p r op e r t y G r oup S p e c Description The PropertyGroup object represents a group of properties. call c a n A dd P r o p e r t y before calling this method. see “PropertyBase propertyGroup() method” on page 145. Adds a property to the group. To check that you can add a particular property to this group. All methods and attributes of PropertyBase. Reference “PropertyGroup property() method” on page 149 “PropertyGroup canAddProperty() method” on page 148 “PropertyGroup addProperty() method” on page 147 Description Gets a member property or group. It can contain Property objects and other PropertyGroup objects.l ay e r ( inde x) .JavaScript Reference PropertyGroup object 147 PropertyGroup object a pp .i te m (i nd e x) . p r o p e r ty ( ) c an A d dP r o p e r ty ( ) a dd P r o p e r t y () Reports whether a property can be added to the group.N A M E D _ GR OU P) .i te m (i nd e x) . see “PropertyBase object” on page 140. use PropertyBase methods and attributes. you can only add properties to an indexed group (a property group that has the type P r o p e r t y T y p e . I N D E X E D _ G R O U P . which can be added to a named group (a property group that has the type P r o p e r ty T y p e .

c an A d d Pr o p e r t y (" A DBE M a s k A t o m " ) . “ADBE Mask Atom”. • For selectors. such as “ADBE Bulge”. PropertyGroup canAddProperty() method a pp . / / r e t u r n s t r u e m a sk G r o u p. For example. “ADBE Paint Atom”. “APC Vegas”. Wiggly Selector has the name “ADBE Text Wiggly Selector”. • Any effect by display name. c an A d d Pr o p e r t y (" b len d"). see the “PropertyGroup property() method” on page 149. “ADBE Text Anchor Point”. and Expression Selector has the name “ADBE Text Expressible Selector”. // re tur n s false Parameters name The display name or match name of the property to be checked. n u m P r o p e r t i e s Description The number of indexed properties in this group. m a sk G r o u p.JavaScript Reference PropertyGroup object 148 Parameters name The display name or match name of the property to add. which are the indexed groups within the layer.p r o j e c t .i te m (i nd e x) . The following names are supported: • Any match name for a property that can be added through the user interface. read-only.laye r( in de x) . “ADBE Text Animator”. Range Selector has the name “ADBE Text Selector”. this method returns a value of 3. layers also have many other properties available only by name. corresponding to the mask. However. “ADBE Text Position”.p r o j e c t . • When adding to an ADBE Mask Parade: “ADBE Mask Atom”.laye r( in de x) . any effect by match name. • For text animators. (See “PropertyGroup addProperty() method” on page 147). • When adding to an ADBE Effect Parade. such as “Bulge”. and motion tracker groups. / / r e tu r n s t r u e m a sk G r o u p. c an A d d Pr o p e r t y (" m a sk " ) . (See “PropertyBase matchName attribute” on page 143). For layers. Type Integer. effect. PropertyGroup numProperties attribute a pp . “Mask”.p r op e r t y G r oup S p e c. For example. “ADBE Glo2”. Returns Boolean.ca n AddPro pe rty( n a m e ) Description Returns true if a property with the given name can be added to this property group.i te m (i nd e x) . you can only add mask to a mask group. “Glow”.p r op e r t y G r oup S p e c . 148 . The only legal input arguments are “mask” or “ADBE Mask Atom”. “Vegas”. Returns PropertyBase object.

p r o j e c t .i te m (i nd e x) .p r o pe r ty ( " A D BE M as ks " ) . For example.n u m P r o p e r - t i es ]. p r o p e r t y ( 1 ) Some properties of a layer.p r op e r t y G r oup S p e c . see the table below. A name specification can use the same syntax that is available with expressions. or “Masks” • "ADBE Effect Parade".p r o j e c t . meaning the display name or the compact English name • Any name in expression “intercap style” syntax For supported property names. Properties accessible by name From any Layer • "ADBE Mask Parade". such as position and zoom.JavaScript Reference PropertyGroup object 149 PropertyGroup property() method a pp . as specified by either its index or name. p r o pe r ty( n am e ) Description Finds and returns a child property of this group. Returns PropertyBase object or null if no child property with the specified string name is found.p o s i ti o n m y l a ye r ( " po si ti o n " ) my l a ye r.laye r( in de x) .p r op e r t y G r oup S p e c .p r o p e r t y (1 ) Parameters index The index for the child property. An integer in the range [0.. or “Motion Trackers” 149 . When using the name to find a property that is multiple levels down. The following are all allowed and are equivalent: m y l a ye r . you must make more than one call to this method. can be accessed only by name. p r o pe r ty( in d ex ) a pp . and returns the first mask in the mask group: m y L a y e r .i te m (i nd e x) .p rop er ty ( " po si t io n ") m y l a ye r ( 1 ) m y l a ye r . the following call searches two levels down. name The name of the child property.laye r( in de x) . This can be: • Any match name • Any name in expression “parenthesis style” syntax. or “Effects” • "ADBE MTrackers". in this is an indexed group.

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 “maskFeather” • "ADBE Mask Opacity". or “maskOffset” 150 .JavaScript Reference PropertyGroup object 150 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. or “maskShape” • "ADBE Mask Feather". or “maskOpacity” • "ADBE Mask Offset".

m y L a y e r .pro pe rty(“Bu lg e Cent er” ). p r o pe rt y ( “ b u l g e C e n t e r ” ) . p r o p e r t y (“ b o xB l u r ” ) .p r o pe r ty ( “ E f fe c ts ” ). p r o p e r t y(“B ulge”). m y L a y e r . 2 If a layer named “myLayer” has a mask named “Mask 1” you can retrieve it as follows: m y L a y e r . m y L a y e r .p r o pe r ty ( “ E f fe c ts ” ).p r o pe r ty ( “ E f fe c ts ” ). you can use either of the following: m y L a y e r . 151 . p r o p e r t y (“ B o x Bl u r ” ). pr o p e r t y (“ M as k 1 ” ). 3 To get a Bulge Center value from a Bulge effect. p r o p e r t y( “ B ul g e ” ) .p r o pe r ty ( “ E f fe c ts ” ).p r o pe r ty ( “ E f fe c ts ” ). p rop ert y (“ A DB E Box B lu r” ) . you can retrieve the effect in any of the following ways: m y L a y e r .p r o pe r ty ( “ M a sk s ” ).JavaScript Reference PropertyGroup object 151 Examples 1 If a layer named “myLayer” has a Box Blur effect.

render Qu eue .proj ect . 152 .. and stop the rendering process. pause. Methods can start. See “RenderQueueItem object” on page 155. RenderQueue Item() method a pp. a render is in progress.item ( i nd e x) Description Gets a specified item from the i te m s collection.JavaScript Reference RenderQueue object 152 RenderQueue object a pp. does not return until render is complete.render Qu eue Description The RenderQueue object represents the render automation process. The total number of items in the render queue.proj ect . Parameters index Returns The position index of the item. Stops the rendering process. Attributes Attribute Reference “RenderQueue rendering attribute” on page 154 “RenderQueue numItems attribute” on page 153 “RenderQueue items attribute” on page 153 Description When true. An integer in the range [0.n um I tem s ]. The collection of items in the render queue. The RenderQueueItem object provides access to the specific settings for an item to be rendered. on page 154 “RenderQueue render() method” on page 153 “RenderQueue pauseRendering() method” on page 153 “RenderQueue stopRendering() method” on page 154 “RenderQueue Item() method” on page 152 Starts the rendering process. RenderQueueItem object. Gets a render-queue item from the collection. Pauses or restarts the rendering process. re nde ring nu mIte ms i te m s Methods Method Reference Description showWindow() r e n d e r( ) p au se R e n d e r i n g ( ) s to pR e n d e r i n g ( ) i te m ( ) “RenderQueue showWindow() method” Show or hides the Render Queue panel. Attributes provide access to items in the render queue and their render status. the data and functionality that is available through the Render Queue panel of a particular After Effects project.

item s Description A collection of all items in the render queue. read-only. call p a u se R e n d e r i n g ( ) or s t o pR e n d e r i n g ( ) from an onEr ror or onS t at usC han ged callback. This is the same as clicking Render in the Render Queue panel.render Qu eue .render () Description Starts the rendering process.o n E r r o r . define a callback function in R enderQ ueu eIt em.proj ect .proj ect .JavaScript Reference RenderQueue object 153 RenderQueue items attribute a pp. Type RQItemCollection object. p r o j e c t .render Qu eue .proj ect .render Qu eue . Nothing. see “RenderQueueItem onStatusChanged attribute” on page 157. To pause or stop the rendering process. This is the same as clicking Pause in the Render Queue panel during a render. RenderQueue numItems attribute a pp.p a u s e R e n d e r i n g ( p au s e ) Description Pauses the current rendering process. define a callback function in ap p .numIt ems Description The total number of items in the render queue. You can call this method from an o n S t a t u s C h a n g e d or onE rror callback. The method does not return until the render process is complete. read-only. See “RenderQueueItem onStatusChanged attribute” on page 157 and “Application onError attribute” on page 26. See “RenderQueueItem object” on page 155. see “Appli- cation onError attribute” on page 26. 153 . • To respond to changes in the status of a particular item while the render is progressing. RenderQueue pauseRendering() method a pp . Parameters p au se Returns True to pause a current render process.o n Sta tusCha n ged in the associated RenderQueueItem object. RenderQueue render() method a pp. false to continue a paused render. • To respond to errors during the rendering process.r e n d e r Q u e u e . Type Integer. or continues a paused rendering process.

JavaScript Reference

RenderQueue object

154

Parameters

None.
Returns

Nothing.

RenderQueue rendering attribute
a pp . pr o j e c t .r e n d e r Q u e u e .r e n d e r i n g 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.proj ect .render Qu eue .sh ow Windo w( d oS h ow ) Description

Shows or hides the Render Queue panel.
Parameters doShow Returns
When true, show the Render Queue panel. When false, hide it.

Nothing.

RenderQueue stopRendering() method
a pp.proj ect .render Qu eue .st opRen de ring() 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 s C h a n g e d or onErr or callback. See “RenderQueueItem onStatusChanged attribute” on page 157 and “Application onError attribute” on page 26.
Parameters

None.
Returns

Nothing.

154

JavaScript Reference

RenderQueueItem object

155

RenderQueueItem object
a pp.proj ect .render Qu eue .item s( i n d ex ) 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 161.
Attributes
Attribute Reference “RenderQueueItem numOutputModules attribute” on page 157 “RenderQueueItem render attribute” on page 158 “RenderQueueItem startTime attribute” on page 159 “RenderQueueItem elapsedSeconds attribute” on page 156 “RenderQueueItem timeSpanStart attribute” on page 160 “RenderQueueItem timeSpanDuration attribute” on page 160 “RenderQueueItem skipFrames attribute” on page 159 “RenderQueueItem comp attribute” on page 156 “RenderQueueItem outputModules attribute” on page 158 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.

n u m O u tp u t M o d u l e s re nde r s ta r tT im e elapsedSeconds t im eS pa n S ta r t t im eS pa n Du rat i o n s ki p F r a m e s comp outputModules t em p l at es s ta tu s onStatusChanged logType

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 160 “RenderQueueItem status attribute” on page 159 “RenderQueueItem onStatusChanged attribute” on page 157 “RenderQueueItem logType attribute” on page 157 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 158 “RenderQueueItem remove() method” on page 158 “RenderQueueItem saveAsTemplate() method” on page 159 Description Gets an Output Module for the item.

outputModule() re move () s a v e A s T e m p l a t e( )

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

155

JavaScript Reference

RenderQueueItem object

156

Method

Reference “RenderQueueItem applyTemplate() method” on page 156 “RenderQueueItem duplicate() method” on page 156

Description Applies a Render Settings template.

a pp l y T e m p l at e ( ) d u p l i ca te

Duplicates this item.

RenderQueueItem applyTemplate() method
a pp.proj ect .render Qu eue .item .ap p l y T e m p l at e ( t e m p l a t e N am e ) Description

Applies a Render Settings template to the item. See also “RenderQueueItem saveAsTemplate() method” on page 159 and “RenderQueueItem templates attribute” on page 160.
Parameters t em p l at eN a m e Returns
A string containing the name of the template to apply.

Nothing.

RenderQueueItem comp attribute
a pp.proj ect .render Qu eue .item (i nd e x) .c o m p Description

The composition that will be rendered by this render-queue item. To change the composition, you must delete this render-queue item and create a new one.
Type

CompItem object; read-only.

RenderQueueItem duplicate() method
a pp.proj ect .render Qu eue .item (i nd e x) .d u p l ic a te () Description

Creates a duplicate of this item and adds it this render queue.
Parameters

None.
Returns

RenderQueueItem object.

RenderQueueItem elapsedSeconds attribute
a pp.proj ect .render Qu eue .item (i nd e x) .e l a ps e d S e c o n d s

156

JavaScript Reference

RenderQueueItem object

157

Description

The number of seconds spent rendering this item.
Type

Integer, or null if item has not been rendered; read-only.

RenderQueueItem logType attribute
a pp.proj ect .render Qu eue .item (i nd e x) .o u t p u t M o d u l e. l o g T y p e Description

A log type for this item, indicating which events should be logged while this item is being rendered.
Type

A L o g T y p e enumerated value; (read/write). One of:
L o g T y p e .E R R OR S _ O N L Y L o g T y pe . E R R OR S _ A N D _ S E T T I N G S L o g T y pe . E R R OR S _ A N D _ P E R _ F R A M E _ I N F O

RenderQueueItem numOutputModules attribute
a pp.proj ect .render Qu eue .item (i nd e x) .n u m Ou tp u t M o d u l e s Description

The total number of Output Modules assigned to this item.
Type

Integer; read-only.

RenderQueueItem onStatusChanged attribute
a pp.proj ect .render Qu eue .item (i nd e x) .o n S t a t u s C h a n g e d Description

The name of a callback function that is called whenever the value of the Re n de rQ ueue I te m .s ta tus attribute changes. See “RenderQueueItem status attribute” on page 159. 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 pauseRendering() method” on page 153 and “RenderQueue stopRendering() method” on page 154. See also “Application onError attribute” on page 26.
Type

A function name string, or null if no function is assigned.
Example f u n c t io n m y S t a t u s C h a n g e d ( ) { a l ert (a pp.pro ject .ren de rQu eue .item (1 ). st at us) }

157

JavaScript Reference

RenderQueueItem object

158

a pp.proj ect .render Qu eue .item (1 ).o n S t a t u s C h a n g e d = m y S t a t u s C h a n g e d ( ) ; a pp.proj ect .render Qu eue .item (1 ).r ender = f al s e ; / / c h a n g e s s ta tu s an d s h o w s di a l o g

RenderQueueItem outputModules attribute
a pp.proj ect .render Qu eue .item (i nd e x) .o u t p u t M o d u l e s Description

The collection of Output Modules for the item.
Type

OMCollection object; read-only.

RenderQueueItem outputModule() method
a pp.proj ect .render Qu eue .item (i nd e x) .o u t p u t M o d u l e ( i n d ex ) Description

Gets an output module with the specified index position.
Parameters index Returns
The position index of the output module. An integer in the range [1..numO ut pu tM odules ].

OutputModule object.

RenderQueueItem remove() method
a pp.proj ect .render Qu eue .item (i nd e x) .re move () Description

Removes this item from the render queue.
Parameters

None.
Returns

Nothing.

RenderQueueItem render attribute
a pp.proj ect .render Qu eue .item (i nd e x) .re nde r Description

When true, the item will be rendered when the render queue is started. When set to true, the R e n d e r Q ueu eIt em.st atu s is set to R QI t em S ta tu s. QU E UE D . When set to false, st at us is set to RQI temS ta tu s. U N Q U E U E D .

158

JavaScript Reference

RenderQueueItem object

159

Type

Boolean; read/write.

RenderQueueItem saveAsTemplate() method
a pp.proj ect .render Qu eue .item (i nd e x) .s a v e A s T e m p l a t e( n a m e ) Description

Saves the item’s current render settings as a new template with the specified name.
Parameters name Returns
A string containing the name of the new template.

Nothing.

RenderQueueItem skipFrames attribute
a pp.proj ect .render Qu eue .item (i nd e x) .s ki p F r am e s Description

The number of frames to skip when rendering this item. Use this to do rendering tests that are faster than a full render. A value of 0 skip no frames, and results in regular rendering of all frames. A value of 1 skips every other frame. This is equivalent to "rendering on twos." Higher values skip a larger number of frames. The total length of time remains unchanged. For example, if skip has a value of 1, a sequence output would have half the number of frames and in movie output, each frame would be double the duration.
Type

Integer in the range [0..99]. Read/write.

RenderQueueItem startTime attribute
a pp.proj ect .render Qu eue .item (i nd e x) .s ta r tT im e Description

The day and time that this item started rendering.
Type

Date object, or null if the item has not started rendering; read-only.

RenderQueueItem status attribute
a pp.proj ect .render Qu eue .item (i nd e x) .s ta tu s Description

The current render status of the item.

159

Setting this value is the same as setting a custom end time in the Render Settings dialog box. RE N D E R I N G R Q I t e m S ta tu s. UN Q U E U E D R Q I t e m S t a tu s. One of: R Q I t e m S t a tu s. U S E R _ S T O PP E D R Q I t e m S t a tu s. Composition is ready to render. The duration is determined by subtracting the start time from the end time. Item lacks a valid output path. QU E U E D R Q I t e m S t a tu s. RenderQueueItem templates attribute a pp.render Qu eue . See also “RenderQueueItem saveAsTemplate() method” on page 159. in seconds. Item is listed in the Render Queue panel but composition is not ready to render. Type Array of strings.proj ect .item (i nd e x) . DO N E Rendering process has been paused. at which rendering will begin.item (i nd e x) . N E E D S _ O U T P U T R Q I t e m S t a tu s. read/write. 160 .t em p l at es Description The names of all Render Settings templates available for the item. Setting this value is the same as setting a custom start time in the Render Settings dialog box. RenderQueueItem timeSpanStart attribute a pp. E R R _ S T O P P E D R Q I t e m S t a tu s.render Qu eue .item (i nd e x) . Type Floating-point value.t im eS pa n Du rat i o n Description The duration in seconds of the composition to be rendered. W I L L _ C O N T I N U E R Q I t e m S t a tu s. Type Floating-point value. RenderQueueItem timeSpanDuration attribute a pp.t im eS pa n S ta r t Description The time in the composition. read/write. Rendering process for the item is complete. read-only.proj ect . Rendering process was stopped due to an error.proj ect .JavaScript Reference RenderQueueItem object 160 Type An R Q I t e m S t a tu s enumerated value. read-only. Composition is rendering Rendering process was stopped by user or script.render Qu eue .

RenderQueueItem object. See “Collection object” on page 51.item s Description The RQItemCollection contains all of the render-queue items in a project.proj ect . as shown in the Render Queue panel of the project. creating a RenderQueueItem.proj ect . Methods Method Reference “RQItemCollection add() method” on page 161 Description Adds a composition to the Render Queue.render Qu eue . Parameters comp Returns The CompItem object for the composition to be added. See “RenderQueueItem object” on page 155 • RQItemCollection is a subclass of Collection. 161 . The collection provides access to the RenderQueueItem objects. The first RenderQueueItem object in the collection is at index position 1.render Qu eue .JavaScript Reference RQItemCollection object 161 RQItemCollection object a pp. All methods and attributes of Collection are available when working with RQItemCollection. a dd ( ) RQItemCollection add() method a pp. and allows you to create them from compositions.item s. add( c o m p ) Description Adds a composition to the Render Queue.

se t t i ng s . g e t Se tt i n g (" E r as e r . " A l i g n e d C l o n e " ) .JavaScript Reference Settings object 162 Settings object Description The Settings object provides an easy way to manage settings for scripts. 162 . and key names are listing in quotation marks below the section name. Reports whether a specified setting is assigned.Paint Settings” section. section names are enclosed in brackets and quotation marks. In the preferences file. Example If you have saved a setting named with the key name “Aligned Clone” in the “Eraser . and each key name is associated with a value. Retrieves a setting value.get Sett ing( se ct i on N a m e. a l e r t (" T h e s e tt i n g i s " + n ). k e y N a m e) Description Returns true if the specified scripting preferences item exists and has a value. ke y N am e ) Description Retrieves a scripting preferences item value from the preferences file. You can create new settings with this object. as well as accessing existing settings.P a i n t S e t t i n g s ". Settings haveSetting() method a pp . se t t i ng s . 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. Methods Method Reference “Settings saveSetting() method” on page 163 “Settings getSetting() method” on page 162 “Settings haveSetting() method” on page 162 Description Saves a default value for a setting. All values are strings. s av e S e tt i n g () ge tS et ti ng( ) h aveS e tt in g () Settings getSetting() method a pp . String.ha veSet ting( s ec t i o n N a m e . Parameters s e c t io n N am e k ey N a m e Returns A string containing the name of a settings section A string containing the key name of the setting item. you can retrieve the value with this script: v a r n = ap p .se tt i n g s.

Boolean. v a l u e) Description Saves a default value for a scripting preferences item. 163 . Parameters s e c t io n N am e k ey N a m e va lue 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. k ey N a m e . Settings saveSetting() method a pp . Nothing.s ave Se tt in g (s e c t i o n N a m e .JavaScript Reference Settings object 163 Parameters s e c t io n N am e k ey N a m e Returns A string containing the name of a settings section A string containing the key name of the setting item. se t t i ng s .

If the shape is closed. and do not need to be explicitly set. For example.c l o s e d = t r u e . or the outline shape of a Mask.0].25 0]. regardless of the actual location of the vertex. RotoBezier masks calculate their tangents automatically.-1] is located above and to the left of the vertex and has a 45 degree slope. v a r m y S h a pe = n e w S h a p e () . [ 10 0.2 3].i n T a n g e n t s = [ [ 5 5 . its tangent values are filled with the automaticallycalculated tangent values.[ . 5 5 . Example: Create a “U” shaped mask A "U" is an open shape with the same 4 vertices used in the square: v a r m y S h a pe = n e w S h a p e () . [ 10 0. m y S h a p e . and of the "Path" AE property of a shape layer. then set the attributes individually to define the shape. pr op ert y (" m a sk S ha pe ").0 ]. [2 00. Example: Create an oval An oval is a closed shape with 4 vertices and with i n T a n g e n t and o utT a n g en t values: v a r m y S h a pe = n e w S h a p e () . 100 ].2 3 . m y S h a pe . [1 00.23]].5 5.0 ]] . m y S h a p e . A shape has a set of anchor points.[0. (See “MaskPropertyGroup rotoBezier attribute” on page 103. 2 3 ] ] .[400 .10 0]. It is the value of the “Mask Path” AE properties. [1 00. empty Shape object. .0 ]] .) If a shape is used in a RotoBezier mask.laye r( in de x) . for RotoBezier masks. [0 . Example: Create a square mask A square is a closed shape with 4 vertices.-55 .0 ].c l o s e d = t r u e . This means that. [ 0 . m y S h a pe .5 5 .v e r t i c e s = [ [ 3 0 0 . 55. my S ha pe . The longer a handle is. A tangent value is a pair of x.c l o s e d = f a l s e .150 ]]. an incoming shape segment stays closer to the vector for an in T an g e n t of [-2. the greater its influence.ou tTa n gent s = [[-55 . [0 .-2] than it does for an i n T a n g e n t of [-1.0 ].pro pe rty ( in d ex ). 100 ]. a tangent of [-1. 5 0 ]. When you access the new shape.[30 0. for each anchor point.JavaScript Reference Shape object 164 Shape object a pp .y coordinates specified relative to the associated vertex.ve rti c es = [[ 0. [0 . the i n T a n g e n t for the first vertex and the ou tTa n gent for the final vertex are ignored. value Description The Shape object encapsulates information describing a shape in a shape layer. 23. the default.0 ]. If a shape is not closed. new S h a p e ( ) . mySha pe .1 50]. or vertices. There is one incoming tangent vector and one outgoing tangent vector associated with each vertex in the shape. to create a new.2 3] .10 0]. m y S h a p e . A tangent vector (in a non-RotoBezier mask) determines the direction of the line that is drawn to or from an anchor point. [0 .0 ] . Use the constructor. 164 . The i n T a n g e n ts and o u t T a n g e n t s for connected straight-line segments are 0.ve rti c es = [[ 0.23 . 2 3 . and a pair of direction handles. the tangent values are ignored.i te m (i nd e x) .-1].p r o j e c t . even though both of these come toward the vertex from the same direction. or tangent vectors. you can construct a shape by setting only the v e r ti c e s attribute and setting both in T an g e n ts and o utT an g e n ts to null. these two vectors specify the direction handles of the final connecting segment out of the final vertex and back into the first vertex. my S ha pe . for example.[55.

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

[0 .1 ].v ert ice s Description The anchor points of the shape. Specify each point as an array of two floating-point values. [1 . 166 .0 ].1] .ve rti c es = [[ 0. Shape vertices attribute s h a p e O b j ec t . read/write.JavaScript Reference Shape object 166 Type Array of floating-point pair arrays. read/write. Type Array of floating-point pair arrays. [ 1.va lu e.0] ] . and collect the point pairs into an array for the complete set of points. For example: my S ha pe .

l a y e r( in de x) Description The ShapeLayer object represents a shape layer within a composition.i te m (i nd e x) . Create it using the LayerCollection object’s a dd S h ap e ( ) method. 167 . which is a subclass of Layer.JavaScript Reference ShapeLayer object 167 ShapeLayer object a pp . see “LayerCollection addShape() method” on page 94. It can be accessed in an item’s layer collection either by index number or by a name string.p r o j e c t . All methods and attributes of AVLayer and Layer are available when working with ShapeLayer. See “Layer object” on page 83 and “AVLayer object” on page 39. • ShapeLayer is a subclass of AVLayer.

expressed as red.i te m (i nd e x) . See “FootageSource object” on page 67.p r o j e c t .0]. read/write. G. in addition to those listed below. Attributes Attribute Reference “SolidSource color attribute” on page 168 Description The color of the solid.1.p r o j e c t . [R. m a in So ur c e a pp .JavaScript Reference SolidSource object 168 SolidSource object a pp .i te m (i nd e x) .. and blue values. green.0. are available when working with SolidSource.p roxySour ce Description The SolidSource object represents a solid-color footage source. color SolidSource color attribute s o l i d S our c e . 168 . B]. All methods and attributes of FootageSource. • SolidSource is a subclass of FootageSource. Type Array of three floating-point values. in the range [0.c o l o r Description The color of the solid.

. e x e / c \ " t i m e / t \ " " ) . In Windows. m a c h i n e N a m e 169 ."). The version of the operating system. if anything. . Attributes Attribute Reference “System userName attribute” on page 170 Description The current user name. userName machineName osName osVe rsio n Methods Method “System machineName attribute” on page 169 The name of the host computer. passing the command to run in escaped quotes (\ " . Example a l e r t ( " Y ou r O S i s " + s y s t e m . Parameters c m d L i n e T o E xe c u t e Returns A string containing the command and its parameters. such as the user name and the name and version of the operating system. The output from the command.userName + " running on " + system. Description Executes a system command. c a l lS y s t e m ( " c m d .JavaScript Reference System object 169 System object s y st e m Description The System object provides access to attributes found on the user’s system.machineName + ". \ " ). Reference “System callSystem() method” on page 169 Description Execute’s a command on the system’s command line. For example. a l e r t ( " C u r r e n t t im e i s " + t i m e S t r ) . e x e command. as if you had typed it on the operating system’s command line. Returns whatever the system outputs in response to the command. you can invoke commands using the / c switch for the c m d . It is available through the sy s te m global variable. System machineName attribute s y st e m . c a l l S ys t e m ( c m d L in e T o E x e c u te ) . confirm("You are: " + system. the following retrieves the current time and displays it to the user: v a r t im e S t r = s y s t e m . c a l l S y s t e m () System callSystem() method s y st e m . “System osName attribute” on page 170 “System osVersion attribute” on page 170 The name of the operating system. os v e r s i o n ) . o s n a m e + " r u n n i n g v er s i o n " + s y s t e m .

System osVersion attribute s y st e m . Type String. o s V er s i o n Description The version of the current local operating system. read-only. osN ame Description The name of the operating system on which After Effects is running. read-only.JavaScript Reference System object 170 Description The name of the computer on which After Effects is running. System userName attribute s y st e m . read-only. Type String. Type String. u s e r N a m e Description The name of the user currently logged on to the system. 170 . Type String. read-only. System osName attribute s y st e m .

t ex t TextDocument text attribute t e x t D o c u m e n t .set Va lueA tTime(.p r o j e c t . n e w T e x t D o c u m e n t( " y u m m y! " )) . Examples This sets a value of some source text and displays an alert showing the new value: v a r m y T e x t D o cu m e n t = n e w T e x tD o c u m e n t( " H a pp y C a ke ") . p r o p e r t y ( " So u r c e T e x t " ) . Attributes Attribute Reference “TextDocument text attribute” on page 171 Description The text layer’s Source Text value.pro pe rty ( " S o u r c e T e x t " ) . v a l u e Description The TextDocument object stores a value for a TextLayer's Source Text property. t ex t P r o p . v a l u e ) .laye r( in de x) . t ex t P r o p . n e w T e x t D o c u m e n t( " is " ) ) . s e t V a l u e A t T i m e ( 0 . 6 6 .property("Source Text").JavaScript Reference TextDocument object 171 TextDocument object ne w Te xt Do cument( do cT ex t ) a pp . m y T e xt L a y e r . s e t V a l u e A t T i m e ( 1 . read/write. 171 . s e t V a l u e ( m y T e x t D oc u m e n t ) . passing the string to be encapsulated.i te m (i nd e x) .t ext Description The text value for the text layer’s Source Text property. s e t V a l u e A t T i m e ( . ne w Te xtD ocumen t("cak e")). t ex t P r o p . Create it with the constructor. This sets keyframe values for text that show different words over time: var textProp = myTextLayer. n e w T e x tD o c u m e n t( " H ap py " ) ) . t extProp. Type String. p r o p e r t y ( " S o u r c e T ex t " ) .3 3. a l e r t ( m y T e xt L a ye r .

JavaScript Reference

TextLayer object

172

TextLayer object
a pp .p r o j e c t .i te m (i nd e x) .l a y e r( in de x) Description

The TextLayer object represents a text layer within a composition. Create it using the LayerCollection object’s a dd T ex t method; see “LayerCollection addText() method” on page 95. 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 83 and “AVLayer object” on page 39.
AE Properties

TextLayer defines no additional attributes, but has the following AE properties and property groups, in addition to those inherited from AVLayer:
T e xt Source Text P at h O pt i o n s P at h Reverse Path Perpendicular To Path For c e Alignmen t F i r s t M ar g i n Last Margin M ore O p ti on s A n ch o r P o i n t G r o u p i n g G r o up in g A l ig n m e n t F i l l & St r o k e Int er-C har acte r Ble n ding An ima to rs Unused Properties and Attributes

The T i m e R e m a p and M oti on T r ac k ers properties, inherited from AVLayer, are not applicable to text layers, and their related AVLayer attributes are not used:
c a n Se tT i m e R em a p E n ab l e d t im eRem ap E n ab l e d t rac k M a tt eT y p e i s T r a c k M a tt e h as T rac k Ma tt e

172

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, s a v e_ a n d _ i n c r e m en t . js x , 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.

173

Examples

Render named items

174

Render named items
This script, re n de rN am ed I tem s. jsx , finds compositions in the open project with a particular text string in their names and sends all such compositions to the render queue. This script does the following:
• Checks to see if a default string for rendering has already been set in the user preferences. If so, set this as a

user prompt. This is handy if you’re always looking for the same string (for example, “FINAL” or “CURRENT”). If not, we set a new se c ti onNa m e and ke y N ame in the preferences file, along with a placeholder value for the string that will be entered by the user.
• Display a prompt to the user asking for a text string to use. • Goes through the project looking for the text entered by the user, and checks if the item that contains that

text is a composition. Sends all matching compositions to the render queue.
• If the user cancels, the text is undefined. Otherwise, saves the new setting in preferences, converting it to all

lowercase letters for consistency (although the search is not case sensitive).
• Makes the Render Queue panel visible and bring it to the front, ready for the user to assign save locations

for the new render queue items.

New render locations
This script, n e w R e n d e r L o c at io n s. js x , allows the user to select queued items in the render queue and assign a new render destination for them. This script does the following:
• Prompts the user for a new folder to use as a render destination. • Checks that the user entered a new location (and didn’t cancel), then creates a loop for each selected render

queue item, and for each output module in it.
• If an item is queued, gives the current render location a new name and location, and displays an alert stating

the new file path.

Smart import
This script, s m art I m p o rt .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, pr oc es sF ol d er () , to import each of the files in the chosen folder, which uses several

helper functions.
• Defines a helper function, tes t ForS eq uence () , 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

174

Another helper script. and e-mail recipient that are saved as Settings. e m ai l _ m e t h o d s . ema i l_meth ods. see the Creative Suite 3 JavaScript Tools Guide. 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 ort Op ti on s. • Calls the main function. assumes there is no image sequence and checks for an array consisting of the matched string and its location within the file name. Convert selected properties to markers This script.f or ce Alp ha be ti cal = t ru e . using the ExtendScript Socket object. run the e m ai l _ s e t u p . js x . If all files are part of a numbered sequence. and e-mail server).j sx (which establishes the sender. e m ai l _ s etu p. C on v ert Se l ec te d P ro pe rti es t o Ma rke rs . p r o c e s s F o l d e r ( ) . creates an e-mail object. you can always run the script to make new settings that overwrite the existing ones. • When rendering is complete. This script does the following: • Establishes conditions under which the script will run. Render and e-mail This script. which prompts the user for the mail gateway and sender and recipient addresses.js x script. • Checks whether e-mail settings are already saved in the preferences. recipient. assumes a sequence and returns the first file of that sequence. renders all queued items in an open project and sends an e-mail report to indicate when the render has completed. You can run this script as standalone any time you want to change the settings. If you want to force alphabetical order. the render time of each item in the queue.js x . A helper script. jsx . There is an option for forcing alphabetical order in sequences. e-mail sender.Examples Render and e-mail 175 files to save processing time. which is commented out in the script as written.j sx script • Displays an error if for any reason it is unable to send the mail. (If there are saved settings that you need to change. goes through the properties in each layer that are currently selected in the Timeline panel. and the total render time. using the settings (such as the server) from the ema il_me th ods.js x (to send the e-mail properly) and ema i l_set up.) • Render the items in the render queue. An open project with at least one item queued is required. If no match is found for a number string. 175 . If not. and converts the value of each property at each frame time to a Flash Video event cue point in a marker. • Defines a helper function to pop up error dialog boxes if there is a problem with any file we are attempting to import. prompts the user for the server name. r e n de r _ a n d_ e m ai l . It makes use of two other scripts that follow. For details of that utility. • E-mails the message. j s x . • Defines a helper function to actually import any image sequence discovered using t es t F o r S e q u en c e ( ) . creates a text string for the e-mail message that contains the start time of the render.

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

I G N O RE A l ph aM ode ................................After Effects Object Summary This code dump summarizes all public JavaScript objects (instantiable classes) and enumerated types defined for After Effects CS3.......S T RAI GH T = == == === == == === == === == == === == === == == === == === == == === == == === == === == == === == A pp l i c at io n ob je c t ............................. boole an re pe at ) re tu rns tas k ID s et Me m oryU sa geLi mi ts ( floa t i m a g eCa c heP er ce n t....-............ floa t d ela y..............PREMU L TIPLIED A l ph aM ode .......... floa t m ax i m umM emoryP er ce n t) no r etu rn s et S ave Pr ef eren c e sO n Q ui t( b ool e an d oS ave ) n o ret urn s et ti n g s : S et ti n g s : r ead O n l y 177 .. = == == === == == === == === == == === == === == == === == === == == === == == === == === == == === == A l ph aM ode en um ....................-.......a c ti va te () no re tu rn b e g i n Su pp r e ss Di a l o g s () n o r e tu r n be ginUndoGro up(str ing undoNam e) n o ret urn b u i ld N a m e : s t r i n g : r e ad On l y b u i ld N u m b e r : i n t eg e r : r e a d O n l y c a n c e l T a s k ( i n t e g e r ta skID ) no ret urn e n d Su pp r e ss Di a lo g s( b o o le an s how Ale rt) no r etu rn e n d U n d o G r o u p( ) n o r e t u r n e n d W a t c h F o l d e r ( ) n o r e t ur n e x it A f t e r L a u n c h A n d E v a l : b o o l e a n : r e a d / w r i t e e x it Code : int ege r : re ad/write findMenuCommandId() returns integer i s P r o f e s s i o n a l V e r si o n : b o o l e a n : r e a d O n ly i s R e n de rE n g i n e : b o o l e a n : r e a d O n l y i s UI S u pp r e s s e d : b o o l e an : r e ad O n l y i s W a t c h F o l d e r : b o o l e an : r ea d O n l y l a n g u a g e : L an g u a g e : r e a d O n l y m em o r yI n U s e : n u m b e r : r e a d O n l y n ewPro ject () no r etu rn o pe n ([ F i l e f il e ]) r e t u r n s P r o j e c t o pe n T e m p l a t e ( F i l e f i l e T oO p e n W it h T e m p l a t e Se m a n t i c s ) n o r e t u r n pa rse S wa tchFile(File swa tch File ) re tu rns Swat chO b ject p a u s e W a t c h F o l d e r ( b o o l e a n d o P a u se ) n o r e t ur n p ro ject : P roje c t : r ead O n ly pur g e(Pu rgeTa rge t t arge t) no re tur n q uit () no re tu rn sa veProj ectO nCra sh : boo le an : rea d/write s c he du leTas k (s tr i n gToEx ecu te.........A l ph aM ode ........

.......... A r r ay [ b o tt o m ............ri g ht ] ..............After Effects Object Summary 178 ve rsio n : string : rea dO n ly w a t c h F o l d e r ( F i l e f i l e ) n o r e t ur n o n E r r o r (s t r in g e r r o r S t r i n g ......-.... r i g ht ]) r e t u r n s Ob j e c t w i th tra n s fo r m p r o p e r t i e s set c an A d dP r o p e r ty ( st r i n g p r o p ert y N am e) r et urn s b o o l ea n c a n Se tC o ll a p s e T ra n s f o r m a t i o n : b o o l e a n : r e a d O n l y c an Se tE n a b l ed : b ool e an : r ead O n l y c a n Se tT i m e R em a p E n ab l e d : b o o le an : r e a d O n l y c o l l a p s e T r an s f o r m a t i o n : b o o l e a n : r e a d/ w r i t e c o m m e n t : s t r i n g : r ea d / w r i t e containingComp : CompItem : readOnly copyToComp(CompItem intoComp) no return d u p l i ca te () r e t u r n s A V L ay e r effectsActive : boolean : read/write e l i d e d : b o o le an : r e a dO n l y e n a b l e d : b o o le an : r e a d/ w r i t e fram eBle nding : boolea n : re adOnly f r a m e B l e n d i n g T y p e : F r a m e Bl e n d i n g T y p e : r ea d / w r i t e gu ideLa y er : boolea n : re ad/wr it e h as Aud i o : b oo le an : rea dO n l y h asTrack Ma tt e : boo l ean : rea dO n ly h as Vi de o : b oo l ean : rea dO n l y h eight : flo at : rea d Only i n P o i n t : fl o a t : r e a d/ w r i t e i n d e x : i n t e g e r : r e a dO n l y i s E f f ec t : b o o l e an : r ea d O n l y i s M a s k : b o o l e an : r ea d O n l y i s M o d i fi e d : b o o l e a n : r e a dO n l y i s N a m e Fr o m S o u r c e : b o o le an : r e a d O n l y is Name Se t : bo olean : rea d Only isTrackMatte : boolean : readOnly l o c k e d : b o o le an : r e a d/ w r i t e m a t c h N a m e : s t r i n g : r ea d O n l y m o t i o n B lu r : b o o l e a n : r e a d / w r i t e mo veAfte r(Layer oth erLa y er) no re tu rn 178 ...-... A r r a y [t o p ..( i n t e g e r p r o p e r t y I n d e x ) r e t ur n s P r o p e r t y B a s e ( st r i n g p r o p e r ty N am e) r e t ur n s P r o p e r t y B a s e a ct i v e : b o o l e a n : r e a d O n l y a ct i v e A tT i m e ( f l o a t a t T i m e ) r e t u r n s b o o l e an a dd P r o p e r t y ( s t r i n g p r o p e r t y N a m e ) r e t u r n s P r o pe rt y B as e a dj us t m e n tL a y e r : b o o l e a n : r e a d/ w r i t e a pp l y Pr e s e t( s tr in g p re se tN a m e) n o re tur n a ud io Ac ti ve : b ool e an : r ead O n l y a ud io Acti ve AtTi m e (f l oa t a tTi me) re tur n s boo l ean a u d io E n a b l e d : b o o l e a n : r e a d / wr i t e auto Orie nt : A utoOr ie ntType : read/write b l end i ngMo de : Bl e n di ngM od e : re ad /w ri te c a l c u l a t e T r a n s f o r m Fr o m P o i n t s ( A r r a y [ t o p ..... l e f t ] ........... s t r i n g s e v e r it y ) n o r e t ur n = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == == AV Laye r obje ct .........

.... C L A S S I C _ C O L O R _ D O D G E B le n d i n g M o d e .D AN C I N G _D I S S OL V E B le n d i n g M o d e ...............D ARK ER _COL OR B le n d i n g M o d e .. b o o l e a n i n c l u d e E x t e n t s ) ret urns Obj ect with flo at pro pe r ties : t op ....... h eight s ta rtT ime : f l oat : re ad /wr it e s tr etch : f lo at : rea d /wr it e t hre eDLa yer : boolea n : re ad/wr it e t hre eDPer C ha r : boole an : rea d/write t im e : f l o at : re ad On ly t im eRem ap E n ab l e d : b ool ea n : re ad / wr it e t r a c k M a t t e T y p e : T r a c k M a t t e T y p e : r e a d / w r it e w i dt h : f l o a t : r ead O n l y = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == == B le n ding Mode en um .... D I F F E R E N C E B le n d in g M o d e .B le n d i n g M o d e .After Effects Object Summary 179 mo veBe fo re(Laye r ot herL ayer) no r etu rn moveTo(integer index) no return moveToBeginning() no return moveToEnd() no return n a m e : s t r i n g : r e a d / w r it e n u ll L a y e r : b o o l e a n : r e a d O n l y nu mPr opert ie s : int ege r : re adO n ly o u t P o i n t : f l o at : r e a d/ w r i t e p ar en t : L ay er : re ad / wr it e p ar en tP ro pe rty : Pro pe rty G ro up : re ad On l y preser veTra n spa rency : bo olea n : rea d /wr it e p r o p e r t y ( i n t e g e r p r o p e r t y I n d e x ) r e tu r n s Pr o p e r t y Bas e p r o p e r ty ( st r i n g p r o p e r t y N am e ) r e tu r n s Pr o p e r t y Bas e proper tyDe pt h : int ege r : re adO n ly p r o p e r t y G r o u p ( [ i n t e g e r c o u n t Up ] ) r e tu r n s Pr o p e r t y Gr o u p p r o p e r t y T y p e : P r o p e r t y T y p e : r ea d O n l y q ua l i t y : L a y e r Q u al i t y : r e a d/ w r i t e re move () no re tu rn r e p l a c e S o u r c e (I t e m n e w S o u r c e ......-...... C OL O R _ D O D G E B le n d in g Mod e..-.... bo o l e a n f i x E x p r e s s i o n s) n o r e t u r n s elect ed : boole an : r ead /w rite s e l e c t e d P r o p e r t i e s : A r r a y o f P r o p e rt yB as e : r e a dO n l y s et Pa ren t W i th Jum p ( L ay e r newParen t) no re tur n s h y : b o o l e a n : r e a d/ w r i t e s olo : bo olea n : rea d /writ e s our ce : AV Ite m : re ad Only s o u r ce R e c t A t T im e( f l o a t a t T i m e ... lef t . D AR K E N B le n d ing Mod e. C L A S S I C _ C O L O R _ B UR N B le n d in g M o d e . D I S S O L V E 179 .... A DD B le n d in g Mod e........ w id t h. C L A S S I C _ D I F F E R E N C E B le n d in g M o d e . C OL O R _ B UR N B le n d in g M o d e ......... C OL O R B le n d in g M o d e .A L P HA_ A DD B le n d in g M o d e ........

-..................-...-.... L I N E A R _ L I GH T B le n ding Mode............L UMIN E SC ENT_PREMU L B le n d i n g M o d e .... P R O M P T _ T O _ SA VE _ C H A N G E S CloseOptions.DO_NOT_SAVE_CHANGES C l o s e O p t i o n s ...... L I N E A R _ B U R N B le n d i n g M o d e ....SAT URA TION B le n d i n g M o d e ..... L UM I N OS I T Y B le n d in g M o d e .... O V E RL A Y B le n d in g M o d e .. S I L H O U E T T E _ L U M A B le n d in g M o d e ...CloseOptions.......H AR D_ L I G H T B le n d i n g M o d e .......... H AR D_ M I X B le n d i n g M o d e .... S I L H O U E T E _ A L P H A B le n d in g M o d e ...... S T E N C I L _ L U M A B le n d in g M o d e .....E XCLU S ION B le n d in g Mod e..... L I G H T E N B le n d in g M o d e .. L I G H T E R _ C O L O R B le n d i n g M o d e ..a ct i v e C a m e r a : L a y e r : r e a d O n l y a pp l y Pr e s e t( s tr in g p re se tN a m e) n o re tur n bgColor : Array of float : read/write c o m m e n t : s t r i n g : r ea d / w r i t e d i s p l a y S t a r t T i m e : f l oa t : r ead /w rite d r a ft 3 d : b o o l e an : r e ad / w r i te d u p l i ca te () r e t u r n s C o m pI te m dura tion : flo at : rea d/writ e f o o t a g e Mi s s i n g : b o o l e a n : r e a d O n l y fram eBle nding : boolea n : re ad/wr it e f ram eDu rat ion : f l oat : r ead /w rite fram eRa te : floa t : rea d/w rit e h as Aud i o : b oo le an : rea dO n l y h as Vi de o : b oo l ean : rea dO n l y h e i g h t : i n te g e r : r e a d / w r i te h id e S h y L a y e r s : b o o l e an : r e a d/ w r i t e i d : i n te g e r : r e a dO n l y l a y e r ( i n t eg e r l a y e r I n d e x ) r et u r n s L a y e r l a y e r ( s t r i n g l a y e r N a m e ) r et u r n s L a y e r 180 ... S O F T _ L I G H T B le n d in g M o d e ....N ORM AL B le n d in g M o d e .......SAVE_CHANGES = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == == CompItem object ... S T E N C I L _ A L P H A B le n d in g M o d e ........ H UE B le n d i n g M o d e . M UL T I PL Y B le n ding Mode...... V I V I D _ L I G H T = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == == CloseOptions enum ... L I N E A R _ D O D G E B le n d i n g M o d e ..After Effects Object Summary 180 B le n ding Mode..... P I N _ L I GH T B le n ding Mode.......-........... S C R E E N B le n d in g M o d e ....

................ st ring nam e....... inte ger h eight ....-..........a lp h aMo de : A l p h a M o d e : r e ad / w r i te conform F rame Rat e : floa t : read/write d i s p l a y F r a m e R at e : f l o a t : r e a d O n l y f i e l d S e pa ra t i o n T y p e : F i e l d S e p a r a ti o n T y p e : r e a dO n l y f i le : File : r ead O n ly guessAlphaMode() no return g u e ss P u l l d o w n (P u l l d o w n M e t h o d p ul l d ow nMet ho d) no re tu rn h as Al ph a : b ool ea n : re ad On l y h ig h Q u a l i t y F i e l d S e p a r a t i o n : b o o l e a n : r e a d / w r it e 181 ..... i n t eg e r hei g ht .. int eger width .................-.............After Effects Object Summary 181 laye r(Layer oth erLa y er.. U P PE R _ F I E L D _ F I R S T = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == == FileSource object ...-...... f l oa t f rame Rat e.......................FieldSeparationType... float pixelAspecRatio) no return shut te rAngle : inte ger : rea d/write shut te rPha se : integ er : r ead/write t im e : f l o at : re ad / w ri te t y p e N a m e : s t r i n g : r ea d O n l y usePro xy : boolea n : re ad/wr it e u s e d I n : A r r a y o f CompIte m : re adOnly w i dt h : int ege r : re ad /wr it e workAre aD ura tion : floa t : rea d/write w o rk Are aS ta rt : f l o at : re ad / wr it e = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == == F i e l d S e p a r a ti o n T y p e e n u m ................. i n t eg e r w i d t h ..... int ege r rela tive Inde x) re tu rns Layer l a y e r s : L a y e r C o l l e c t i o n : r e a d O n ly m o t i o n B lu r : b o o l e a n : r e a d / w r i t e n a m e : s t r i n g : r e a d / w r it e nu mLayer s : int ege r : re adOn ly p a r en t F o l de r : F o l d e r I te m : r e a d/ w r i t e p i xe lAs pe c t : f l oa t : r ead /w ri te pr e s e r v e N e s t e d F r a m e Ra t e : b o o l e a n : r e a d / w r it e p r e s e r v e N e s t e d R e s o l u t i o n : b o o l e a n : r e a d/ w r i t e p r o x y S o u r ce : F o o t a g e S o u r c e : r e a d O n l y re move () no re tu rn re nde rer : st ring : read/write re nde rer s : A rra y of st ring: re adOn ly re so lu tionFa ctor : Arr ay of inte ger : rea d/write s elect ed : boole an : r ead /w rite selectedLayers : Array of Layer : readOnly s e l e c t e d P r o p e r t i e s : A r r a y o f P r o p e rt yB as e : r e a dO n l y s e t Pr o x y( F i l e p r o x y F i l e ) n o r e t u r n s e t P r ox yT oN o n e ( ) n o r e t u r n s et Pr o x yW it hP l ac e ho l d e r ( s t r i n g n a m e .. O F F F i e l d S e p a r a ti o n T y p e .. floa t d ur ati on ) no ret urn s et Pr o x yW it hS eq ue n c e(F i l e p ro xy F i l e...... b o o l ea n fo rc eAl p ha b et ic a l ) n o ret urn set Pr oxyW it hSolid(A rra yO fFloat color......LOWER_FIELD_FIRST F i e l d S e p a r a ti o n T y p e .......-..

....-.. flo at fra m eRa te ......... i n t eg e r hei g ht .............. inte ger w i dth....c o m m e n t : s t r i n g : r ea d / w r i t e i d : i n te g e r : r e a dO n l y i te m ( in t e g e r i te m I n de x ) r e tu r n s I te m items : ItemCollection : readOnly n a m e : s t r i n g : r e a d / w r it e nu mIte ms : in tege r : r eadOnly p a r en t F o l de r : F o l d e r I te m : r e a d/ w r i t e re move () no re tu rn s elect ed : boole an : r ead /w rite t y p e N a m e : s t r i n g : r ea d O n l y = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == == F o o ta g e I t e m o b j e c t .......... in teg er w i dt h .. f l oa t f rame Rat e... f l o a t p i x e l A s pe c R a t i o ) no ret urn s elect ed : boole an : r ead /w rite s e t Pr o x y( F i l e p r o x y F i l e ) n o r e t u r n s e t P r ox yT oN o n e ( ) n o r e t u r n s et Pr o x yW it hP l ac e ho l d e r ( s t r i n g n a m e ......After Effects Object Summary 182 inve rtA l ph a : boo l ean : rea d/writ e i s St i l l : b o o l e a n : r e a d On l y loo p : int ege r : re ad/wr it e m i s s i n g F o ot a g e P a t h : s t r i n g : r e a d O n l y na tive Fr ame Rat e : f l oa t : r ead O n ly p rem ul C ol or : Arr ay of fl o at : rea d/ w ri t e r e l o a d ( ) n o r e t ur n r e m o v e Pu l ld o w n : P u l l d o w n P h a s e : r e a dO n l y = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == = FolderItem object .................-.............. string n ame... b ool e an f orc e Al ph ab et i c al ) n o re tur n re pla c eWith S olid(Arr ayO fFloa t color ...... floa t d ur ati on ) no ret urn 182 ................................... i n t e g e r h e i g h t..... float du rat i on) no ret urn re pl a c eW i th Se qu en c e( F i l e p rox y F i le .........-.....c o m m e n t : s t r i n g : r ea d / w r i t e d ura ti on : flo at : rea dO n ly f i le : File : r ead O n ly f o o t a g e Mi s s i n g : b o o l e a n : r e a d O n l y f ram eDu rat ion : f l oat : r ead O n ly fram eRa te : floa t : rea dO n ly h as Aud i o : b oo le an : rea dO n l y h as Vi de o : b oo l ean : rea dO n l y h e i g h t : i n te g e r : r e a d / w r i te i d : i n te g e r : r e a dO n l y ma in So urce : FootageSou rce : r eadO n ly n a m e : s t r i n g : r e a d / w r it e p a r en t F o l de r : F o l d e r I te m : r e a d/ w r i t e p i xe lAs pe c t : f l oa t : r ead /w ri te p r o x y S o u r ce : F o o t a g e S o u r c e : r e a d O n l y re move () no re tu rn re pl a c e( F il e pro x yF i l e) no r etu rn re pla c eWith Pla ceho lder (st ring name .... in tege r he ig ht... i n t eg e r w i d t h .-..

......................................................-.. B E Z I E R K e y f r a m e I n t er p o l a ti o n T y p e ...........n e w K e y f r a m e E a s e ( f l o a t s p e ed ........... f lo at i n f l u e n c e ) r e t ur n s K e y f r a m e E a s e i n f l uen c e : fl o at : rea d/ w ri t e s pe e d : f l o at : r e ad / wr it e = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == == K e y f r a m e I n t er p o l a ti o n T y p e e n u m .............F O O T A G E I m p o r tA s T y p e .............................................I m p o r tA s T y p e ........... i n t e g e r h e i g h t ....... int eger width ..................................FRENCH Language. st ring nam e. E N GL I SH Language.After Effects Object Summary 183 s et Pr o x yW it hS eq ue n c e(F i l e p ro xy F i l e.... b o o l ea n fo rc eAl p ha b et ic a l ) n o ret urn set Pr oxyW it hSolid(A rra yO fFloat color...-.......-.....JAPANESE Language..............-............................................. I T AL I A N Language...K e y f r a m e I n t e r p o l a ti o n T y p e . H O L D K e y f r a m e I n t er p o l a ti o n T y p e .......................-.-...-. inte ger h eight ..L a n g u a g e .........-........-....................GERMAN L a n g u a g e ..... float pixelAspecRatio) no return t im e : f l o at : re ad On ly t y p e N a m e : s t r i n g : r ea d O n l y usePro xy : boolea n : re ad/wr it e u s e d I n : A r r a y o f CompIte m : re adOnly w i dt h : int ege r : re ad /wr it e = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == == I m p o r tA s T y p e e n u m ....P R O J E C T = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == == I m p o r tO pt i o n s o b jec t ..... f l o a t d u r a ti o n ...........C O M P _ C R O P PE D_ L A Y E R S I m p o r tA s T y p e ............-.................-.n e w I m p o r tO pt i o n s (F i l e f i l e T oIm por t) ret urn s Impor tO pt i ons c a n I m p o r t A s ( I m p o r tA s T y p e a s T y p e ) r e t u r n s b o o l e an f i le : File : r ead /w rite f o r c e A l p h ab e t i c a l : b o o l e a n : r e a d/ w r i t e i m p o r t A s : I m p o r t A s T y p e : r e ad / wr it e s e q ue n c e : b o o l e a n : r ea d / w r i t e = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == == I t e m C o l le c t i o n o b j ec t ................C O M P I m p o r tA s T y p e ......SPANISH 183 ... i n t e g e r wi d th ..... f l o a t p ix e lA sp e c t R a t i o ......... f l o a t f r a m e R a te ) r e tur n s C o m p I te m a dd F o l d e r ( s t r i n g n a m e ) r e t u r n s F o l d e rI t e m = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == == KeyframeEase object .......a dd C o m p ( st r i n g n a m e ...........-. L I N E A R = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == = Language enum ....

....( i n t e g e r p r o p e r t y I n d e x ) r e t ur n s P r o p e r t y B a s e ( st r i n g p r o p e r ty N am e) r e t ur n s P r o p e r t y B a s e a ct i v e : b o o l e a n : r e a d O n l y a ct i v e A tT i m e ( f l o a t a t T i m e ) r e t u r n s b o o l e an a dd P r o p e r t y ( s t r i n g p r o p e r t y N a m e ) r e t u r n s P r o pe rt y B as e a dj us tm en tL a y er : b o ol ean : rea dO n l y a pp l y Pr e s e t( s tr in g p re se tN a m e) n o re tur n auto Orie nt : A utoOr ie ntType : read/write c an A d dP r o p e r ty ( st r i n g p r o p ert y N am e) r et urn s b o o l ea n c an Se tE n a b l ed : b ool e an : r ead O n l y c o m m e n t : s t r i n g : r ea d / w r i t e containingComp : CompItem : readOnly copyToComp(CompItem intoComp) no return d u p l i ca te () r e t u r n s C a m e r aL a ye r e l i d e d : b o o le an : r e a dO n l y e n a b l e d : b o o le an : r e a d/ w r i t e h as Vi de o : b oo l ean : rea dO n l y i n P o i n t : fl o a t : r e a d/ w r i t e i n d e x : i n t e g e r : r e a dO n l y i s E f f ec t : b o o l e an : r ea d O n l y i s M a s k : b o o l e an : r ea d O n l y i s M o d i fi e d : b o o l e a n : r e a dO n l y is Name Se t : bo olean : rea d Only l o c k e d : b o o le an : r e a d/ w r i t e m a t c h N a m e : s t r i n g : r ea d O n l y mo veAfte r(Layer oth erLa y er) no re tu rn mo veBe fo re(Laye r ot herL ayer) no r etu rn moveTo(integer index) no return moveToBeginning() no return moveToEnd() no return n a m e : s t r i n g : r e a d / w r it e n u ll L a y e r : b o o l e a n : r e a d O n l y nu mPr opert ie s : int ege r : re adO n ly o u t P o i n t : f l o at : r e a d/ w r i t e p ar en t : L ay er : re ad / wr it e p ar en tP ro pe rty : Pro pe rty G ro up : re ad On l y p r o p e r t y ( i n t e g e r p r o p e r t y I n d e x ) r e tu r n s Pr o p e r t y Bas e p r o p e r ty ( st r i n g p r o p e r t y N am e ) r e tu r n s Pr o p e r t y Bas e proper tyDe pt h : int ege r : re adO n ly p r o p e r t y G r o u p ( [ i n t e g e r c o u n t Up ] ) r e tu r n s Pr o p e r t y Gr o u p p r o p e r t y T y p e : P r o p e r t y T y p e : r ea d O n l y re move () no re tu rn s elect ed : boole an : r ead /w rite s e l e c t e d P r o p e r t i e s : A r r a y o f P r o p e rt yB as e : r e a dO n l y s et Pa ren t W i th Jum p ( L ay e r newParen t) no re tur n s h y : b o o l e a n : r e a d/ w r i t e s olo : bo olea n : rea d /writ e s ta rtT ime : f l oat : re ad /wr it e 184 .........................After Effects Object Summary 184 = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == = CameraLayer object ..........-..................-................

........E R R O R S _ A N D _ S E T T I N G S L o g T y p e ......... Ar rayO fFlo at ce nte rPoint) ret urn s La yer a dd N u l l ( [ f l o a t d u r a t i o n ] ) r e t ur n s A V L a y e r a dd S h a p e ( ) r e t ur n s L a y e r a dd S o l i d ( A r ra y O fF l o a t c o lo r ...... [ b o o le a n m o v e A l l A t t r i b u t e s ] ) r e t ur n s C o m p I t e m = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == = LayerQuality enum .......... [ f l o at d u r a ti o n ] ) r e tu r n s A V L a y e r a dd T ex t ([ T ex t Do c u m en t te xt Do c] ) ret urn s AV L ay er a dd T e x t (s t r i n g te xt ) r e t u r n s A V L ay e r b y N a m e ( s t r i n g n a m e ) r e t ur n s L a y e r p rec o m po se (Ar ray O f Inte ger l a ye rInd i c es ....-........................a dd ( A V I t e m t he I t e m .............-..... fl o a t p i x e l A s pe c tRa ti o ............LayerQuality............-........-......n e w M ar k e r V al u e (s t r i n g c o m m e n t......... in t e g e r h e ig h t...... st r i n g n a m e ... [ fl o at dur at io n ]) re tur n s A VL a ye r a dd C a m era (s tr i n g n am e ..........D ARKEN M a s k M ode ......................Ma skM ode ....L o g T y pe ............ E R R O R S _ A N D _ P E R _ F R A M E _ I N F O L o g T y p e ..............-.. [s t ring url] ................-........... [ s t r i n g c h ap te r]..........After Effects Object Summary 185 s tr etch : f lo at : rea d /wr it e t im e : f l o at : re ad On ly = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == = L a y e r C o ll e c t i o n o b j ec t ...................AD D Ma skM ode .E R R O R S _ O N L Y = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == = M a r k e r V al u e o b j e c t .................. s tr in g n a m e . i n t e g e r w i d t h ..... D R AF T L a y e r Q u a l i t y ..-...... D I F F E R E N C E 185 .............BEST L a y e r Q u a l i t y .. [ st ring f ram eTar get ]) ret urns Ma rke rVa lue cha p ter : string : rea d/write c o m m e n t : s t r i n g : r ea d / w r i t e c u e Po in t N a m e : s t r in g : r e a d / w r i t e ev ent C uePoint : boole an : r ead/w rite fram eTar get : string : rea d/write ge tPara m et ers() r etu rns ob j e c t w i t h p r o p e r t i e s s e t s e t Pa r am e te r s (O b jec t ke y V a l u eP a i r s ) n o r e t ur n u r l : s t r i n g : r e a d/ w r i t e = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == Ma skM ode enum .................... W I R E FR AM E = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = = Log T ype enum ..-..................... Ar rayO fFlo at ce nte rPoint) ret urn s La yer a dd L i g h t (s t r i n g n a m e .....-..........-......................

................INTE RSECT Ma skM ode ......- 186 ...............-......................... ON M a s k M ot i o n B l u r ..........-..........After Effects Object Summary 186 Ma skM ode .......M a s k M ot i o n B l u r ...........................LIGH T EN Ma skM ode ...-..........................-..NO N E M a s k M od e .-........................( i n t e g e r p r o p e r t y I n d e x ) r e t ur n s P r o p e r t y B a s e ( st r i n g p r o p e r ty N am e) r e t ur n s P r o p e r t y B a s e a ct i v e : b o o l e a n : r e a d O n l y a dd P r o p e r t y ( s t r i n g p r o p e r t y N a m e ) r e t u r n s P r o pe rt y B as e c an A d dP r o p e r ty ( st r i n g p r o p ert y N am e) r et urn s b o o l ea n c an Se tE n a b l ed : b ool e an : r ead O n l y c ol or : Arr ay of f lo at : rea d / wr it e d u p l i ca te () r e t u r ns M askProper tyGrou p e l i d e d : b o o le an : r e a dO n l y e n a b l e d : b o o le a n : r e a dO n l y inve rte d : boolea n : re ad/wr it e i s E f f ec t : b o o l e an : r ea d O n l y i s M a s k : b o o l e an : r ea d O n l y i s M o d i fi e d : b o o l e a n : r e a dO n l y l o c k e d : b o o le an : r e a d/ w r i t e m a s k M o d e : M a s k M o d e : r e a d/ w r i t e m a s k M o t i o n B l u r : M as k M ot i o n B l u r : r e a d/ w r i t e m a t c h N a m e : s t r i n g : r ea d O n l y moveTo(integer index) no return n a m e : s t r i n g : r e a d / w r it e nu mPr opert ie s : int ege r : re adO n ly p ar en tP ro pe rty : Pro pe rty G ro up : re ad On l y p r o p e r t y ( i n t e g e r p r o p e r t y I n d e x ) r e tu r n s Pr o p e r t y Bas e p r o p e r ty ( st r i n g p r o p e r t y N am e ) r e tu r n s Pr o p e r t y Bas e proper tyDe pt h : int ege r : re adO n ly p r o p e r t y G r o u p ( [ i n t e g e r c o u n t Up ] ) r e tu r n s Pr o p e r t y Gr o u p p r o p e r ty I n d e x : i n t e g e r : r e a d On l y p r o p e r t y T y p e : P r o p e r t y T y p e : r ea d O n l y re move () no re tu rn ro toB ezier : boolea n : r ead/w rite s elect ed : boole an : r ead /w rite = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == = OMCollection object ............ S U B T R A C T = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == Ma skM otionB l ur e n um ..........a dd ( ) r e tu r n s Out p u tM o d u l e = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == O utpu tMo du le obje ct ............ SA ME _ A S _ L A YE R = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == Ma skProper tyGrou p o b ject ..................... OF F Ma skM otionB l ur..............-..............................................-.-........

a lp h aMo de : A l p h a M o d e : r e ad / w r i te conform F rame Rat e : floa t : read/write d i s p l a y F r a m e R at e : f l o a t : r e a d O n l y f i e l d S e pa ra t i o n T y p e : F i e l d S e p a r a ti o n T y p e : r e a d/ w r i t e guessAlphaMode() no return g u e ss P u l l d o w n (P u l l d o w n M e t h o d p ul l d ow nMet ho d) no re tu rn h as Al ph a : b ool ea n : re ad On l y h ig h Q u a l i t y F i e l d S e p a r a t i o n : b o o l e a n : r e a d / w r it e inve rtA l ph a : boo l ean : rea d/writ e i s St i l l : b o o l e a n : r e a d On l y loo p : int ege r : re ad/wr it e na tive Fr ame Rat e : f l oa t : r ead O n ly p rem ul C ol or : Arr ay of fl o at : rea d/ w ri t e r e m o v e P u l ld o w n : P u l l d o w n P h a s e : r e a d/ w r i t e = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = = PostRenderAction enum ..........-.........-...P o s tR e n d e r A c t i o n .. n e w T e xt ) n o r e t u r n b i t s P e r C h an n e l : i n t e g e r : r e a d/ w r i t e c l o s e ( C l o s e O p t i o n s cl o se Op t i o n s) r e t u r n s b o o le an c o n s o l i d a t e F o o t a g e () r e t u r n s i n t e g e r displaySta rt Frame : inte ger : rea d/writ e f i le : File : r ead O n ly i m p o r t F i l e ( I m po rt O p t i o n s i m p o r t O p t i o n s ) r e t ur n s I t e m i m p o r t F i l e W i t h D i a l o g ( ) r e t ur n s A r r a y O f I t e m import Pla c eho l de r(st ring itemN ame..N O N E PostRenderAction..................................-.. I M PO R T _ A N D _ R E P L A C E _ U S A G E P o s tR e n d e r A c t i o n ......................................-.......... f l o a t d u r a t i o n ) r et u r n s F o o t a g e I t e m i te m ( in t e g e r i te m I n de x ) r e tu r n s I te m items : ItemCollection : readOnly l i n e a r B l e n d i n g : b o o l e a n : r e a d / w r it e nu mIte ms : in tege r : r eadOnly r e du c e P r o j e c t ( A r r a y O f I t em i t e m s T o P r e s e r v e ) r et ur n s i n t e g er 187 .....After Effects Object Summary 187 a pp l y T e m p l at e ( st r i n g t em p l at eN a m e) n o ret ur n f i le : File : r ead /w rite name : string : readOnly p o s tR e n d e r A c t i o n : P o s tR e n d e r A c t i o n : r e a d / w r i t e re move () no re tu rn s ave As T em p l at e( st ri n g t em p l at eN am e) n o ret urn t em p l at es : Arr ay o f st ri n g : read O n l y = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == PlaceholderSource object ............................a ct i v e I t e m : I t e m : r e a d O n l y a u to F ix E x p r e s s io n s( o l d T e x t .I M PO R T P o s t R e n d e r A c t i o n .....SET_PROXY = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == P r o j e c t o b jec t .......... floa t fra m eRa te ......................-... int ege r ite m He igh t.................... integ er ite m Widt h..............-........

.....s t or e d .a ct i v e : b o o l e a n : r e a d O n l y a dd K ey ( fl oa t a tT i m e ) r etu rn s in teg e r c an Se tE n a b l ed : b ool e an : r ead O n l y c an Se tE x p r e s s io n : b o o l e an : r e a dO n l y can Var yOve rTime : bo olea n : re adOnly d u p l i ca te () r e t u r n s P r o p e r ty e l i d e d : b o o le an : r e a dO n l y e n a b l e d : b o o le a n : r e a dO n l y e x p r e ss i o n : s tr in g : r e a d / wr i t e e x pr e ss i o n E n a b le d : b o o l e a n : r e a d / w r i t e e x p r e ss i o n E r r o r : s tr in g : r e ad On l y h as Max : bo olea n : rea d Only h as Mi n : b oo le an : rea dO n l y i s E f f ec t : b o o l e an : r ea d O n l y i s I n te r p o l a t io n T y pe V a li d ( Ke y fr a m e I n te r p o l a t i o n T y p e t y p e ) r e t u r n s b o o l e an i s M a s k : b o o l e an : r ea d O n l y i s M o d i fi e d : b o o l e a n : r e a dO n l y i s Sp a t i a l : b o o l e a n : r e a d On l y i s T im eV a r y i n g : b o o le a n : r e a dO n l y k e y I n I n t e r p o l a t i o n T y p e ( i n t e g e r k e y I n d e x ) r e t ur n s K e y f r a m e I n t er p o l a ti o n T y p e k e y I n S p a t ia l T a n g e n t ( i n t e g e r k e y I n d e x ) r e t ur n s A r r a y O f Fl o a t keyInTe m po ralEa se (int ege r ke yInde x ) re tu rns Arra yOfKeyfram eEase k e y O u t I n t e r po l a t i o n T y pe (i n t eg e r k e y I n de x) r e t u r n s K e y f r a m e I n t er p o l a ti o n T y p e k eyO utS p at ialTan gent (int eger keyIn de x) re tur n s A rra yO f F loat k ey O u t T e m p o r a lE as e ( i n te g e r k ey I n d e x ) r et ur n s A r r ay O f K e y f r a m e E a se keyRov in g(integer ke yI nde x) re tur n s bo olean k eySelect ed(int eger ke yI nde x ) re tu rns bo olea n k eySpa tia l Aut oBe zie r(in tege r k eyIndex) r et urns boolea n k e y S p a t i a l C o n t in u ou s ( i n t e g e r ke yIndex) r etu rns boolea n k ey T em por al Au toB ez i er (i n t eg er k ey I n de x) re tur n s b o ol ean k e y T e m p o r al Co n t i n u o u s ( i n t e g e r k e y I n d e x ) r e t ur n s b o o le an k e y T i m e ( i n t e g e r k e y I n d e x ) r e t ur n s f l o a t k e y T i m e ( s t r i n g m a r k e r N a m e ) r e t ur n s f l o a t k ey Va l u e( i n te g er k ey I n d ex ) r e t u r n s t yp e ..i n .After Effects Object Summary 188 re move UnusedFoo tag e() re tu rns int ege r re nde rQ ueu e : Re nde rQ ueue : re adOnly ro otFo lder : FolderIt em : rea dO n ly s ave (F i l e t o F i l e) ret urn s b o o l e an s a v e W i t h D i a l o g ( ) r e t ur n s b o o le an s el e c t i o n : A r r a y o f I t e m : r ea d O n l y s h o w W i n d o w ( b o ol e a n d o S h o w ) n o r et u r n t im ec o d e B a s e T y p e : T i m e c o de Bas e T y p e : r e a d/ w r i t e t im ec o d e D i s p l a y T y p e : T i m ec o de Di s pl a yT yp e : rea d/ w ri t e t im ec o d e F i l m T y p e : T i m e c o d e F il m T y p e : r e a d / w r i t e t im ec o d e N T S C D r o p F r a m e : b o o le a n : r e a d/ w r i t e t ra n s p a r e n c y G r i d T h um b n a i l s : b o o l e a n : r e a d/ w r i t e = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == Property object ............s t o r e d ....-........-.p r o p e r t y m a t c h N a m e : s t r i n g : r ea d O n l y 188 .....i n ....................p r o p e r t y k e y V a l u e ( s t r i n g m a r k e r N a m e ) r e t ur n s t y p e ....................

.ty p e ..in ...s to r e d . bo olean isSelect ed) no ret urn s et Sp at i al Au toB ez i er AtK e y (i n t eg er k ey I n de x..in ..( i n t e g e r p r o p e r t y I n d e x ) r e t ur n s P r o p e r t y B a s e ( st r i n g p r o p e r ty N am e) r e t ur n s P r o p e r t y B a s e a ct i v e : b o o l e a n : r e a d O n l y a dd P r o p e r t y ( s t r i n g p r o p e r t y N a m e ) r e t u r n s P r o pe rt y B as e c an A d dP r o p e r ty ( st r i n g p r o p ert y N am e) r et urn s b o o l ea n c an Se tE n a b l ed : b ool e an : r ead O n l y d u p l i ca te () r e t ur n s Proper tyGrou p e l i d e d : b o o le an : r e a dO n l y e n a b l e d : b o o le a n : r e a dO n l y i s E f f ec t : b o o l e an : r ea d O n l y i s M a s k : b o o l e an : r ea d O n l y i s M o d i fi e d : b o o l e a n : r e a dO n l y m a t c h N a m e : s t r i n g : r ea d O n l y moveTo(integer index) no return name : string : readOnly 189 ...p ro pe rty ne wV alue ) no return s e t V a l u e A t K e y (i n t e g e r ke y I n d e x .... [ A r ra y O f Ke y f r a m e E as e o u t E a se ] ) n o r e tur n s e t V al u e ( ty p e ...i n .After Effects Object Summary 189 moveTo(integer index) no return name : string : readOnly n e a r e st K e y I n d e x ( f l o a t a t T i m e ) r e t u r n s i n t e g e r n u m K e y s : in t e g e r : r ea d O n l y p ar en tP ro pe rty : Pro pe rty G ro up : re ad On l y proper tyDe pt h : int ege r : re adO n ly p r o p e r t y G r o u p ( [ i n t e g e r c o u n t Up ] ) r e tu r n s Pr o p e r t y Gr o u p p r o p e r ty I n d e x : i n t e g e r : r e a d On l y p r o p e r t y T y p e : P r o p e r t y T y p e : r ea d O n l y proper tyVa lueType : Pro pe rtyV alue T ype : re adOnly re move () no re tu rn re move Ke y(integer ke yI nde x ) no r eturn s elect ed : boole an : r ead /w rite s e l e c t e d K e y s : A r r a y o f in t e g e r : r e a d O n l y s et I n te rp o l at io n T y pe At Ke y (i n t eg er ke yI nde x..s t o r e d .... A r r a y O f K e y f r a m e E a s e i n E a s e ....pr o p er t y n e w V a l u e) n o r e t u r n s e t V a l u es A t T i m e s( A r r a y O f F l o a t a t T i m e s ...s to r e d .s tor e d . b o o l ea n i sA uto Bez i e r) n o ret urn s e t Sp a t i a l C o n ti n u o u sA tK e y ( i n te g e r k e y In d e x .pr o p e r t y n e w V a l u es ) n o r e t u r n un it sT ext : st ring : re adOn ly va lue : type-stor ed-in-pro pe rty: rea dO n ly v a l u e A t T i m e ( f l o a t a t T i m e .p r o pe r ty = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == Proper tyGrou p o b ject ....-.s to r e d ..... Keyframe Inte rpolat io nType inType .p r op e r t y n e w V a l u e) n o r e t ur n s e t V a l u eA t T i m e ( f l o a t a tT i m e ...... A r r a y O f .... b o o l e a n i s R o v in g ) n o r et ur n set Se l ecte dA tKey(inte g er k eyInd ex.... b o o l e an i s C o n t in u ou s ) n o r e t u r n s e t T e m p o r a l E a s e A t K e y ( i n t e g e r k ey I n d e x . [ K e y f r a m e I n t e r p o l a t i o n T y p e o u t T y p e ] ) n o r e t ur n s e t Ro v i n g A t K e y ( i n t e g e r k ey I n d e x . b o o l e a n i s A u t oB ez i e r ) n o r e t u r n s e t T e m p o r a l C o n t in u o u s A t K e y ( in t e g e r k e y I n d e x . ty p e ... [ A r r a y O f F l o a t o u t T a n g en t ] ) no ret urn s e t T e m p o r a l A u t o B e z i e r A t K e y ( i n te g e r k ey I n d e x . b o o l p r e E x p r e s si o n ) r e tu r n s ty p e ......i n .. ty p e ..........-..i n ........... bo o l e a n is C o n ti n u o u s) n o r et u r n s e t Sp a t i a l T a n g e n t sA tK e y ( i n t e g e r k e y I n d e x . A r r a y O f F l o a t i n T a n g e n t ..

.....ThreeD PropertyValueType......-............. S W W W S PulldownPhase.........WWWWS_24P_ADVANCE = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == PulldownMethod enum .TwoD Proper tyVa lueType.. O F F P u l l d o w n Ph a s e ......NO_VALUE PropertyValueType. S S W W W P u l l d o w n Ph a s e ..ThreeD_SPATIAL PropertyValueType..............SWWWW_24P_ADVANCE P u l l d o w n Ph a s e .. C U S T O M_ V A L U E PropertyValueType........PropertyType....... W SS W W P u l l d o w n Ph a s e ......P u l l d o w n Ph a s e ...... W W W S S PulldownPhase..-.......TEXT_DOCUMENT PropertyValueType...... A DV A N C E _ 2 4P PulldownMethod...................After Effects Object Summary 190 nu mPr opert ie s : int ege r : re adO n ly p ar en tP ro pe rty : Pro pe rty G ro up : re ad On l y p r o p e r t y ( i n t e g e r p r o p e r t y I n d e x ) r e tu r n s Pr o p e r t y Bas e p r o p e r ty ( st r i n g p r o p e r t y N am e ) r e tu r n s Pr o p e r t y Bas e proper tyDe pt h : int ege r : re adO n ly p r o p e r t y G r o u p ( [ i n t e g e r c o u n t Up ] ) r e tu r n s Pr o p e r t y Gr o u p p r o p e r ty I n d e x : i n t e g e r : r e a d On l y p r o p e r t y T y p e : P r o p e r t y T y p e : r ea d O n l y re move () no re tu rn s elect ed : boole an : r ead /w rite = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == = PropertyType enum ....COLOR P r o p e r t y V a l u e T y p e ........... W W SS W P u l l d o w n Ph a s e ..................-.........WWWSW_24P_ADVANCE PulldownPhase..MASK_INDEX PropertyValueType...... W SW W W _ 2 4 P _ A D V A N C E P u l l d o w n Ph a s e ...OneD Proper tyVa lueType.INDEXED_GROUP P r o p e r t y T y p e ... Two D_SPA TIAL = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == P u l l d o w n Ph a s e e n u m ............-.......P R O P E R T Y = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = = PropertyValueType enum .... W W SW W _ 2 4 P _ A D V A N C E P u l l d o w n Ph a s e .... SH APE PropertyValueType...........P u l l d o w n M e t h o d ..........................................MARKER PropertyValueType..-.........PULLDOWN_3_2 190 ......PropertyValueType............-...-..... N A ME D _ GR OU P P r o p e r ty T y p e .LAYER_INDEX PropertyValueType.............-........

................................Purge T ar get................. E R R _ S T O P P E D R Q I t e m S t a tu s..............-.-.-........... UN D O_ C A C H E S = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == = Re nde rQ ueu e obje ct ........ ALL_CA CHE S Purge T ar get............ QU E U E D R Q I t e m S t a tu s................-. SNAPSH O T _CACH E S P u r g e T ar g e t.....-.. RE N D E R I N G 191 ........................ N E E D S _ O U T P U T R Q I t e m S t a tu s................-... IMA GE _ CACHES Purge T ar get.....................-...............a pp l y T e m p l at e ( st r i n g t em p l at eN a m e) n o ret ur n c o m p : C om p I t e m : r e a d O n l y du pl i c a te () r e t ur n s R e n d e r Q ue u e I t em e l a ps e d S e c o n d s : f l o at : r e ad On l y l o g T y p e : L o g T y p e : r ea d / w r i t e n u m O u tp u t M o d u l e s : i n t e g e r : r e a d O n l y ou tp ut Mod ule( i n te ger o utp ut Mo du le Ind ex ) r etu rns Ou tp ut Mod ule o u t p u t M o d u l e s : O MC o l l e c t i o n : r e a dO n l y re move () no re tu rn re nde r : boo l ean : rea d/writ e s ave As T em p l at e( st ri n g t em p l at eN am e) n o ret urn s k i pF r a m e s : i n t e g e r : r e a d/ w r i t e s ta rtT ime : f l oat : re ad Only s ta tu s : R QIt emSt at us : rea dO n ly t em p l at es : Arr ay o f st ri n g : read O n l y t im eS pa n Du rat i o n : f l o at : re ad / w ri te t im eS pa n S ta rt : fl oa t : rea d/ w ri t e o n S t a t u s C h a n g e d ( ) n o r et u r n = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == R Q I t e m C o l l e ct i o n o b j e c t ............................................................-...............................-.....................-... DO N E R Q I t e m S t a tu s...R Q I t e m S t a tu s...............................ite m (int ege r item Inde x) re tu rns RenderQ ue ueIt em i t e m s : R Q I t e m C o l l e c t io n : r e a d O n l y nu mIte ms : in tege r : r eadOnly p au se R e n d e r i n g ( b o o l e an d o P au se ) n o r e tu r n re nde r() no ret urn r e n d e ri n g : b o o l e a n : r e a d O n l y s h o w W i n d o w ( b o ol e a n d o S h o w ) n o r et u r n s t o pR e n d e r i n g ( ) n o r e t u r n = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = = Re nde rQ ueu eIte m obje ct .After Effects Object Summary 191 = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = P urg e T ar g et e n um ..........a d d ( C o m p I t e m c o m p T o A d d ) r et u r n s R e n d e r Q u e u e I t e m = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == R Q I t e m S t a tu s e n u m ...........

........................................................ge tS et ti ng( st ri n g s ecti o nName ....-.........c a l l S y s tem (s tr in g cm dL i n e T o E x e c t u te ) r et u r n s o u t p u tO f C om m a n d A sS t r i n g machineName : string : readOnly o s N a m e : s t r in g : r e a d O n l y osVe rsio n : string : rea dO n ly userName : string : readOnly = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == = T e xt D o c u m e n t o b j e c t .........n e w T e xt D o c u m e n t ( s t r i n g t e x t ) r e t u r n s T e x t D o c u m e n t t ext : st ring : re ad/write = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == = Timeco de BaseT ype e n um ........-...-................................ UN Q U E U E D R Q I t e m S ta tu s.......................... string ne wV alue ) no r eturn = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == = S h a pe o b j e ct ......-...n e w S h a pe () r e tur n s S h a p e c l o s e d : b o o le an : r e a d/ w r i t e i n T a n g e n t s : A r r a y o f floa t[ 2] : re ad /wr i te ou tTa n gents : Arr ay of floa t[ 2] : r ead /w ri te ve rtices : A rra y o f floa t[2] : rea d /writ e = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == = S ol i d So urc e o bj ec t ..-..-.. s tr i n g s e c t io n K e y ) r e tu r n s st r i n g h av e S e t t in g (s t r in g s e c t i o n N a m e .............................After Effects Object Summary 192 R Q I t e m S t a tu s..-............................- 192 ..........................-.-...............................................................................a lp h aMo de : A l p h a M o d e : r e ad / w r i te c ol or : Arr ay of f lo at : rea d / wr it e conformFrameRate : float : readOnly d i s p l a y F r a m e R at e : f l o a t : r e a d O n l y f i e l d S e pa ra t i o n T y p e : F i e l d S e p a r a ti o n T y p e : r e a dO n l y guessAlphaMode() no return g u e ss P u l l d o w n (P u l l d o w n M e t h o d p ul l d ow nMet ho d) no re tu rn h as Al ph a : b ool ea n : re ad On l y h igh Qu alityFieldSepara tion : boolea n : re adOn ly inve rtA l ph a : boo l ean : rea d/writ e i s St i l l : b o o l e a n : r e a d On l y loo p : int ege r : re adOn ly na tive Fr ame Rat e : f l oa t : r ead O n ly p rem ul C ol or : Arr ay of fl o at : rea d/ w ri t e r e m o v e Pu l ld o w n : P u l l d o w n P h a s e : r e a dO n l y = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == = S y st e m o b j e c t ......... s t r in g s e ct i o n K e y ) r e t u r n s b o o le an s a v e S e t t i n g ( s t r i n g s e c t i o n N a m e ....................... W I L L _ C O N T I N U E = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == = S e t ti n g s o b j e c t .............................-......-......................-.... s t r i n g sectionKe y.... U S E R _ S T O PP E D R Q I t e m S t a tu s................

..........................LUM A TrackM atte Type ...... T I M E C OD E = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == = T i m e c o d e F il m T yp e e n u m ......FPS24 TimecodeBaseType.-........... A L O N G _ P A T H A u t o O r i e n tT y p e ... M M 1 6 T i m e c o d e F il m T y p e ........T i m e c o de D i s pl a yT yp e ..............................ALPHA _INVER TED TrackM atte Type ................T i m e c o d e F il m T y p e ..ALPHA TrackM atte Type ..............-..............- 193 .......FPS30 TimecodeBaseType...-. N O _ A U T O _ O R I E N T = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == = Fra m eB lendin gType enum ......-...LUM A_INV E RTED TrackMatteType.......A u t o O ri e n tT y p e .-....-................FPS50 TimecodeBaseType.....-...................F r a m e B l e n d in g T y pe .. M M 3 5 = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == = TrackM atte Type enum ........-.....FPS100 TimecodeBaseType................................. N O _ F R A M E _ B L E N D F r a m e B l e n d in g T y pe ............................................. AU T O TimecodeBaseType....-.............-...............................................FPS60 = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == T i m e c o d e D i s p l a yT yp e e n u m ... P I X E L _ M O T I O N .....NO_TRACK_MATTE = == == == = == == == = == == == == = == == == == = == == == == = == == == == = == == == == = == == == = == = A u t o O r i e n tT y p e e n u m ....-....... F R A M E S T i m e c o d e D i s p l a yT yp e ...FPS48 TimecodeBaseType................................... F R A M E _ M I X F r a m e B l e n d in g T y pe .. F E E T _ A N D _ F R A M E S T i m e c o d e D i s p l a yT yp e .... C A ME R A _ O R _ PO I N T _ O F _ I N T E R E S T A u t o O r i e n tT y p e .....-...After Effects Object Summary 193 T i m e c o d e B a s e T y p e ....FPS25 TimecodeBaseType.......TrackM atte Type .........

Sign up to vote on this title
UsefulNot useful