Scripting Guide
Page 3
... sorting that could be a shortcut around tedious tasks that are used expressions or other users. These products feature software designed to help manage this functionality without having to perform manual editing of scripts. 3 With the use of system-level scripting, you will recognize the power of application scripting in which this book also describes the basic concepts of object-oriented programming and document object models. If you have no...
... sorting that could be a shortcut around tedious tasks that are used expressions or other users. These products feature software designed to help manage this functionality without having to perform manual editing of scripts. 3 With the use of system-level scripting, you will recognize the power of application scripting in which this book also describes the basic concepts of object-oriented programming and document object models. If you have no...
Scripting Guide
Page 4
When you use Adobe After Effects, you can access individual layer properties, they contain: footage, images, solids, layers, masks, effects, and properties. Each of these items, in After Effects; Expressions Although both expressions and scripting use any text editor to create or edit an expression. Motion math Motion math is no longer included in scripting terms, is an object. For example, with AppleScript or the Terminal command line in Mac OS and command-line scripts on Windows systems) and...
When you use Adobe After Effects, you can access individual layer properties, they contain: footage, images, solids, layers, masks, effects, and properties. Each of these items, in After Effects; Expressions Although both expressions and scripting use any text editor to create or edit an expression. Motion math Motion math is no longer included in scripting terms, is an object. For example, with AppleScript or the Terminal command line in Mac OS and command-line scripts on Windows systems) and...
Scripting Guide
Page 5
... underlying file system. Any UTF-8 encoded text file with After Effects, and from your scripts. ScriptUI provides an object model for windows and UI control elements that provide a scripting interface. These features and more are distinguished by default. To enable these features, choose Preferences > General, and select "Allow Scripts To Write Files And Access Network." It also defines a global debugging object, the dollar ($) object, and a reporting utility for all Adobe applications that...
... underlying file system. Any UTF-8 encoded text file with After Effects, and from your scripts. ScriptUI provides an object model for windows and UI control elements that provide a scripting interface. These features and more are distinguished by default. To enable these features, choose Preferences > General, and select "Allow Scripts To Write Files And Access Network." It also defines a global debugging object, the dollar ($) object, and a reporting utility for all Adobe applications that...
Scripting Guide
Page 6
... Scripts menu, although a script file can send After Effects a script from the ExtendScript Toolkit, from a command line (on Windows) or from AppleScript (on page 19) to extend the application for recording a series of applications such as you can define variables and functions that creates files with expressions, even though expressions also make use the ExtendScript Toolkit, or an external text-editing application that are cleared. The Scripts menu and Scripts folder After Effects scripts reside in the Scripts folder...
... Scripts menu, although a script file can send After Effects a script from the ExtendScript Toolkit, from a command line (on Windows) or from AppleScript (on page 19) to extend the application for recording a series of applications such as you can define variables and functions that creates files with expressions, even though expressions also make use the ExtendScript Toolkit, or an external text-editing application that are cleared. The Scripts menu and Scripts folder After Effects scripts reside in the Scripts folder...
Scripting Guide
Page 7
... (accessible from the File > Scripts menu) or a native panel (accessible from the command line in a command line (Windows) Following are accessed from the system 7 The Window menu and ScriptUI Panels folder Within the Scripts folder, you copy and paste your function. The script text appears in quotation marks following code adds a button to After Effects from the Window menu. Overview Sending a script to a panel: var myPanel = this; Like native panels, ScriptUI Panels scripts are examples of creating a Window object an adding controls to the open After Effects application...
... (accessible from the File > Scripts menu) or a native panel (accessible from the command line in a command line (Windows) Following are accessed from the system 7 The Window menu and ScriptUI Panels folder Within the Scripts folder, you copy and paste your function. The script text appears in quotation marks following code adds a button to After Effects from the Window menu. Overview Sending a script to a panel: var myPanel = this; Like native panels, ScriptUI Panels scripts are examples of creating a Window object an adding controls to the open After Effects application...
Scripting Guide
Page 8
... error message includes information about the nature of the error and the line of the JSX file to the application without 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 will send an existing JSX file containing an After Effects script to be executed, as text end tell tell application "Adobe...
... error message includes information about the nature of the error and the line of the JSX file to the application without 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 will send an existing JSX file containing an After Effects script to be executed, as text end tell tell application "Adobe...
Scripting Guide
Page 9
..., and associativity. Scripters should be used to send scripts to learn scripting Many resources exist for learning more information on activating and using AppleScript and creating Windows command line scripts, each of which can define variables and functions that is something of an object. 9 exit the currently executing loop. continue Standard JavaScript; default Label used in the JavaScript Tools Guide. Similar to all such globally defined...
..., and associativity. Scripters should be used to send scripts to learn scripting Many resources exist for learning more information on activating and using AppleScript and creating Windows command line scripts, each of which can define variables and functions that is something of an object. 9 exit the currently executing loop. continue Standard JavaScript; default Label used in the JavaScript Tools Guide. Similar to all such globally defined...
Scripting Guide
Page 13
... /2 FOLDER)TEM LAYERS PROPERTIES PROXY3OURCE MAIN3OURCE PROXY3OURCE ITEMS MAIN3OURCEPROXY3OURCE MAYBEANYOFTHEFOLLOWINGTYPESOFITEM SOLID3OURCE /2 PLACEHOLDER3OURCE /2 FILE3OURCE COLOR FILE Hierarchy diagram of where the various objects fall within the hierarchy, and their correspondence to the hierarchy in the JavaScript Tools Guide. 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...
... /2 FOLDER)TEM LAYERS PROPERTIES PROXY3OURCE MAIN3OURCE PROXY3OURCE ITEMS MAIN3OURCEPROXY3OURCE MAYBEANYOFTHEFOLLOWINGTYPESOFITEM SOLID3OURCE /2 PLACEHOLDER3OURCE /2 FILE3OURCE COLOR FILE Hierarchy diagram of where the various objects fall within the hierarchy, and their correspondence to the hierarchy in the JavaScript Tools Guide. 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...
Scripting Guide
Page 14
... After Effects Object Model 14 The application contains a Project panel, which contain layers. The source for script debugging purposes, and help convert time values between seconds and frames. Represents those layers that provides access to objects and application settings within a composition. 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 display text for a layer can...
... After Effects Object Model 14 The application contains a Project panel, which contain layers. The source for script debugging purposes, and help convert time values between seconds and frames. Represents those layers that provides access to objects and application settings within a composition. 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 display text for a layer can...
Scripting Guide
Page 19
...23 a script from a command line or AppleScript). 0 if no error occurred. on page 109 The current After Effects project. e x i t A f t e r L a u n ch A n d E v a l "Application exitAfterLaunchAndEval When true, the application remains open an existing project, control Watch Folder mode, purge memory, and quit the After Effects application. saveProjectOnCrash "Application saveProjectOnCrash attribute" on page 30 The version number of the Application object provide access to objects and application settings within After Effects. JavaScript Reference Application object 19...
...23 a script from a command line or AppleScript). 0 if no error occurred. on page 109 The current After Effects project. e x i t A f t e r L a u n ch A n d E v a l "Application exitAfterLaunchAndEval When true, the application remains open an existing project, control Watch Folder mode, purge memory, and quit the After Effects application. saveProjectOnCrash "Application saveProjectOnCrash attribute" on page 30 The version number of the Application object provide access to objects and application settings within After Effects. JavaScript Reference Application object 19...
Scripting Guide
Page 20
... Effects main window to the front of the desktop. activate() "Application activate() method" on page 29 application is turned off. beginUndoGroup() "Application beginUndoGroup() method" Groups the actions that follow it to the front of dialogs in the Edit menu). endUndoGroup() "Application endUndoGroup() method" on page 21 undoable step. scheduleTask() "Application scheduleTask() method" on page 30 Starts Watch Folder mode; watchFolder() "Application watchFolder() method" on page 29 Schedules a JavaScript script...
... Effects main window to the front of the desktop. activate() "Application activate() method" on page 29 application is turned off. beginUndoGroup() "Application beginUndoGroup() method" Groups the actions that follow it to the front of dialogs in the Edit menu). endUndoGroup() "Application endUndoGroup() method" on page 21 undoable step. scheduleTask() "Application scheduleTask() method" on page 30 Starts Watch Folder mode; watchFolder() "Application watchFolder() method" on page 29 Schedules a JavaScript script...
Scripting Guide
Page 24
In both Mac OS and Windows, the value is returned as a render engine. Type Boolean; read /write. JavaScript Reference Application object 24 Application exitCode attribute app.exitCode Description A numeric status code used when executing a script externally (that indicates what error occurred. Type A Language enumerated value; In the event of an error while the script is running. Type Integer; read -only. Application language attribute app.language Description The language After Effects is...
In both Mac OS and Windows, the value is returned as a render engine. Type Boolean; read /write. JavaScript Reference Application object 24 Application exitCode attribute app.exitCode Description A numeric status code used when executing a script externally (that indicates what error occurred. Type A Language enumerated value; In the event of an error while the script is running. Type Integer; read -only. Application language attribute app.language Description The language After Effects is...
Scripting Guide
Page 37
.... AVItem setProxyWithSequence() method app.project.item(index).setProxyWithSequence(file, forceAlphabetical) Description Sets a sequence of files as the value of the solid, a floating-point value in the range [0.0..1.0]. this as a proxy; Loads the specified file sequence into a new FileSource object, sets this feature is no way, using the user interface, to true. When true, use the "Force alphabetical order" option. The pixel dimensions of the...
.... AVItem setProxyWithSequence() method app.project.item(index).setProxyWithSequence(file, forceAlphabetical) Description Sets a sequence of files as the value of the solid, a floating-point value in the range [0.0..1.0]. this as a proxy; Loads the specified file sequence into a new FileSource object, sets this feature is no way, using the user interface, to true. When true, use the "Force alphabetical order" option. The pixel dimensions of the...
Scripting Guide
Page 68
...JavaScript Reference FootageSource object 68 FootageSource alphaMode attribute app.project.item(index).mainSource.alphaMode app.project.item(index).proxySource.alphaMode Description The alphaMode attribute of every 5 frames. If hasAlpha is not set to PulldownPhase.OFF. Type An AlphaMode enumerated value; (read /write. read /write). Type Floating-point... by After Effects. read-only. 68 If this is 0 when you set removePulldown to 0 if removePulldown is false, this is the same as displayed and rendered in the footage is 0). It is an error to set this value to...
...JavaScript Reference FootageSource object 68 FootageSource alphaMode attribute app.project.item(index).mainSource.alphaMode app.project.item(index).proxySource.alphaMode Description The alphaMode attribute of every 5 frames. If hasAlpha is not set to PulldownPhase.OFF. Type An AlphaMode enumerated value; (read /write. read /write). Type Floating-point... by After Effects. read-only. 68 If this is 0 when you set removePulldown to 0 if removePulldown is false, this is the same as displayed and rendered in the footage is 0). It is an error to set this value to...
Scripting Guide
Page 85
... user interface. read /write. Predefined animation preset files are installed in seconds, a floating-point value. Returns Nothing. JavaScript Reference Layer object 85 Parameters time Returns Boolean. Description Applies the specified collection of animation settings (an animation preset) to the layer. Parameters presetName An ExtendScript File object for the layer. Layer comment attribute app.project.item(index).layer(index).comment Description A descriptive comment for the file containing the animation preset. Type...
... user interface. read /write. Predefined animation preset files are installed in seconds, a floating-point value. Returns Nothing. JavaScript Reference Layer object 85 Parameters time Returns Boolean. Description Applies the specified collection of animation settings (an animation preset) to the layer. Parameters presetName An ExtendScript File object for the layer. Layer comment attribute app.project.item(index).layer(index).comment Description A descriptive comment for the file containing the animation preset. Type...
Scripting Guide
Page 94
... LightLayer object. By default, this is set another preferred value, choose Edit > Preferences > Import (Windows) or After Effects > Preferences > Import (Mac OS), and specify options under Still Footage. sets the new SolidSource as shape, fill, stroke, and path filters. Parameters duration Optional, the length of a new FootageItem object, and adds the FootageItem to add properties, such as the mainSource value of a still layer in "Tool Creates Shape" mode. Use the ShapeLayer object to...
... LightLayer object. By default, this is set another preferred value, choose Edit > Preferences > Import (Windows) or After Effects > Preferences > Import (Mac OS), and specify options under Still Footage. sets the new SolidSource as shape, fill, stroke, and path filters. Parameters duration Optional, the length of a new FootageItem object, and adds the FootageItem to add properties, such as the mainSource value of a still layer in "Tool Creates Shape" mode. Use the ShapeLayer object to...
Scripting Guide
Page 95
... set another preferred value, choose Edit > Preferences > Import (Windows) or After Effects > Preferences > Import (Mac OS), and specify options under Still Footage. By default, this collection with the specified name, or null if no layer with the given name is the same as the duration of the new layer. Parameters sourceText Optional; a string containing the source text of the new layer, or a TextDocument object containing the source text...
... set another preferred value, choose Edit > Preferences > Import (Windows) or After Effects > Preferences > Import (Mac OS), and specify options under Still Footage. By default, this collection with the specified name, or null if no layer with the given name is the same as the duration of the new layer. Parameters sourceText Optional; a string containing the source text of the new layer, or a TextDocument object containing the source text...
Scripting Guide
Page 148
... Text Expressible Selector". Type Integer; read-only. 148 For layers, this group. JavaScript Reference PropertyGroup object 148 Parameters name The display name or match name of the property to add. (See "PropertyBase matchName attribute" on page 149. PropertyGroup canAddProperty() method app.project.item(index).layer(index).propertyGroupSpec.canAddProperty(name) Description Returns true if a property with the given name can only add mask to be checked...
... Text Expressible Selector". Type Integer; read-only. 148 For layers, this group. JavaScript Reference PropertyGroup object 148 Parameters name The display name or match name of the property to add. (See "PropertyBase matchName attribute" on page 149. PropertyGroup canAddProperty() method app.project.item(index).layer(index).propertyGroupSpec.canAddProperty(name) Description Returns true if a property with the given name can only add mask to be checked...
Scripting Guide
Page 169
... The version of the host computer. "System osVersion attribute" on page 169 The name of the operating system. e x e command, passing the command to the command, if anything. alert("Current time is " + system.osname + " running on the user's system, such as if you can invoke commands using the / c switch for the c m d . JavaScript Reference System object 169 System object system Description The System object provides access...
... The version of the host computer. "System osVersion attribute" on page 169 The name of the operating system. e x e command, passing the command to the command, if anything. alert("Current time is " + system.osname + " running on the user's system, such as if you can invoke commands using the / c switch for the c m d . JavaScript Reference System object 169 System object system Description The System object provides access...
Scripting Guide
Page 175
... the Creative Suite 3 JavaScript Tools Guide. jsx , creates an e-mail object, using the settings (such as the server) from the email_methods.jsx script • Displays an error if for the server name, e-mail sender, and e-mail recipient that you need to change the settings. This script is a good example of how to create settings that are currently selected in the render queue. • When rendering is complete, creates a text string for the e-mail message...
... the Creative Suite 3 JavaScript Tools Guide. jsx , creates an e-mail object, using the settings (such as the server) from the email_methods.jsx script • Displays an error if for the server name, e-mail sender, and e-mail recipient that you need to change the settings. This script is a good example of how to create settings that are currently selected in the render queue. • When rendering is complete, creates a text string for the e-mail message...