Adobe 65009963 Scripting Guide

Adobe 65009963 - After Effects CS4 Manual

Adobe 65009963 manual content summary:

  • Adobe 65009963 | Scripting Guide - Page 1
    SCRIPTING GUIDE
  • Adobe 65009963 | Scripting Guide - Page 2
    organization. Adobe, the Adobe logo, After Effects, Photoshop, and Bridge are either registered trademarks or trademarks of Adobe Systems Incorporated 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
  • Adobe 65009963 | Scripting Guide - Page 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 to take advantage of this functionality without having to perform manual editing of scripts. 3
  • Adobe 65009963 | Scripting Guide - Page 4
    of a scriptable application is the object model. When you use Adobe After Effects, you create projects, compositions, and render-queue items . 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
  • Adobe 65009963 | Scripting Guide - Page 5
    Effects supports ExtendScript, Adobe's extended implementation of JavaScript. ExtendScript is used by all Adobe applications that 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
  • Adobe 65009963 | Scripting Guide - Page 6
    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 can with Adobe Photoshop® actions.
  • Adobe 65009963 | Scripting Guide - Page 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,
  • Adobe 65009963 | Scripting Guide - Page 8
    tell application "Adobe After Effects CS3" activate DoScript the_script end tell 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
  • Adobe 65009963 | Scripting Guide - Page 9
    Toolkit documentation in the JavaScript Tools Guide. More resources to learn scripting ECMA standard. The After Effects scripting engine supports the 3rd Edition of the ECMA-262 the keywords and operators included with ECMAScript, refer to ECMA-262.pdf, available at ww w. ecma -in tern atio nal .o rg
  • Adobe 65009963 | Scripting Guide - Page 10
    Overview More resources to learn scripting 10 Keyword/Statement function if/if...else new null return switch this true undefined var while with Description Used to define a function. Standard JavaScript conditional constructs. Standard JavaScript constructor statement. Assigned to a variable,
  • Adobe 65009963 | Scripting Guide - Page 11
    Overview More resources to learn scripting 11 Operators Description 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.
  • Adobe 65009963 | Scripting Guide - Page 12
    Overview Operators (highest precedence to lowest subtraction More resources to learn scripting 12 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
  • Adobe 65009963 | Scripting Guide - Page 13
    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 implements the 3rd Edition of the ECMA-262 Standard, including its notational and lexical
  • Adobe 65009963 | Scripting Guide - Page 14
    queue items as well as render settings and output modules. All of these entities are represented 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
  • Adobe 65009963 | Scripting Guide - Page 15
    JavaScript Reference The After Effects Object Model 15 Object Description "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
  • Adobe 65009963 | Scripting Guide - Page 16
    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
  • Adobe 65009963 | Scripting Guide - Page 17
    JavaScript Reference Global functions 17 fps isDuration The frames-per-second, a floating-point value. Optional. When true, the time is a duration (measured from frame 0). When false (the default), the time is measured from the project's starting frame. Returns Floating-point value, the number
  • Adobe 65009963 | Scripting Guide - Page 18
    JavaScript Reference writeLn() global function writeLn(text) Description Writes output to the Info panel and adds a line break at the end. Parameters text The string to display. Returns Nothing. Example writeln("This text appears on first line"); writeln("This text appears on second line");
  • Adobe 65009963 | Scripting Guide - Page 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
  • Adobe 65009963 | Scripting Guide - Page 20
    cancelTask() method" on page 22 Cancels a scheduled task. parseSwatchFile() "Application parseSwatchFile() method" on Loads a color swatch from an Adobe Swatch page 27 Exchange (ASE) file. Application activate() method app.activate() Description Opens the application main window if it is
  • Adobe 65009963 | Scripting Guide - Page 21
    menu (that is, "Undo < u n d o S t r i n g > ") Returns Nothing. Application buildName attribute app.buildName Description The name of the build of After Effects being run, used internally by Adobe for testing and troubleshooting. Type String; read-only. 21
  • Adobe 65009963 | Scripting Guide - Page 22
    buildNumber attribute app.buildNumber 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.cancelTask(taskID) Description Removes the specified task from the queue
  • Adobe 65009963 | Scripting Guide - Page 23
    JavaScript Reference Application object 23 Calling this method without having set a beginUndoGroup() method yields an error. Parameters None. Returns Nothing. Application endWatchFolder() method app.endWatchFolder() Description Ends Watch Folder mode. Parameters None Returns Nothing. See also "
  • Adobe 65009963 | Scripting Guide - Page 24
    JavaScript Reference Application object 24 Application exitCode attribute app.exitCode 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
  • Adobe 65009963 | Scripting Guide - Page 25
    JavaScript Reference Application object 25 Language.ENGLISH Language.FRENCH Language.GERMAN Language.ITALIAN Language.JAPANESE Language.SPANISH Example var lang = app.language; if (lang == Language.ENGLISH) alert("After Effects is running in English."); else if (lang == Language.FRENCH) alert("
  • Adobe 65009963 | Scripting Guide - Page 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
  • Adobe 65009963 | Scripting Guide - Page 27
    JavaScript Reference Application object 27 Application parseSwatchFile() method app.parseSwatchFile(file) Description Loads color swatch data from an Adobe Swatch Exchange (ASE) file. Parameters file The file specification, an ExtendScript F i l e object. Returns The swatch data, in this
  • Adobe 65009963 | Scripting Guide - Page 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.project Description The project that is currently loaded. See "
  • Adobe 65009963 | Scripting Guide - Page 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
  • Adobe 65009963 | Scripting Guide - Page 30
    JavaScript Reference Application object 30 Parameters doSave Returns Nothing. When true, preferences saved on quit, when false they are not. Application settings attribute app.settings Description The currently loaded settings. See "Settings object" on page 162. Type Settings object; read-only.
  • Adobe 65009963 | Scripting Guide - Page 31
    JavaScript Reference See also "Application endWatchFolder() method" on page 23 "Application parseSwatchFile() method" on page 27 "Application isWatchFolder attribute" on page 24 Application object 31 31
  • Adobe 65009963 | Scripting Guide - Page 32
    JavaScript Reference AVItem object 32 AVItem object app.project.item(index) 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
  • Adobe 65009963 | Scripting Guide - Page 33
    JavaScript Reference AVItem object 33 AVItem duration attribute app.project.item(index).duration 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 duration of the composition, and is read/write. • In a
  • Adobe 65009963 | Scripting Guide - Page 34
    JavaScript Reference AVItem object 34 AVItem frameRate attribute app.project.item(index).frameRate Description The frame rate of the AVItem, in frames-per-second. This is the reciprocal of the frameDuration. When set, the reciprocal is automatically set as a new frameDuration value. • In a
  • Adobe 65009963 | Scripting Guide - Page 35
    JavaScript Reference AVItem object 35 • In a FootageItem, the value is linked to the mainSource object, and is read/write only if the mainSource 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.
  • Adobe 65009963 | Scripting Guide - Page 36
    JavaScript Reference AVItem object 36 AVItem setProxy() method app.project.item(index).setProxy(file) Description Sets a file as the proxy of this AVItem. Loads the specified file into a new FileSource object, sets this as the value of the proxySource attribute, and sets useProxy to true. It does
  • Adobe 65009963 | Scripting Guide - Page 37
    JavaScript Reference AVItem object 37 duration Returns Nothing. The total length in seconds, up to 3 hours. An integer in the range [0.0..10800.0]. AVItem setProxyWithSequence() method app.project.item(index).setProxyWithSequence(file, forceAlphabetical) Description Sets a sequence of files as
  • Adobe 65009963 | Scripting Guide - Page 38
    JavaScript Reference AVItem object 38 AVItem time attribute app.project.item(index).time 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 timeToCurrentFormat to convert it to a string value
  • Adobe 65009963 | Scripting Guide - Page 39
    JavaScript Reference AVLayer object 39 AVLayer object app.project.item(index).layer(index) 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.
  • Adobe 65009963 | Scripting Guide - Page 40
    attribute" on When true, this is an adjustment layer. page 41 guideLayer "AVLayer frameBlendingType attribute" When true, this is a guide layer. on page 45 threeDLayer "AVLayer threeDLayer attribute" on page 48 When true, this is a 3D layer. threeDPerChar "AVLayer threeDPerChar
  • Adobe 65009963 | Scripting Guide - Page 41
    JavaScript Reference AVLayer object 41 Attribute isTrackMatte hasTrackMatte quality autoOrient Reference Description "AVLayer isTrackMatte attribute" on page 46 When true, this layer is being used as a track matte for the layer below it. "AVLayer hasTrackMatte attribute" on When true, the
  • Adobe 65009963 | Scripting Guide - Page 42
    JavaScript Reference AVLayer object 42 AVLayer audioActiveAtTime() method app.project.item(index).layer(index).audioActiveAtTime(time) Description Returns true if this layer's audio will be active at the specified time. For this method to return true, audioEnabled must be true, no other layer
  • Adobe 65009963 | Scripting Guide - Page 43
    JavaScript Reference AVLayer object 43 BlendingMode.ADD BlendingMode.ALPHA_ADD BlendingMode.CLASSIC_COLOR_BURN BlendingMode.CLASSIC_COLOR_DODGE BlendingMode.CLASSIC_DIFFERENCE BlendingMode.COLOR BlendingMode.COLOR_BURN BlendingMode.COLOR_DODGE BlendingMode.DANCING_DISSOLVE BlendingMode.DARKEN
  • Adobe 65009963 | Scripting Guide - Page 44
    JavaScript Reference AVLayer object 44 Returns An Object with the transformation properties set. Example var newLayer = comp.layers.add(newFootage); newLayer.threeDLayer = true; newLayer.blendingMode = BlendingMode.ALPHA_ADD; var transform = newLayer.calculateTransformFromPoints(tl, tr, bl); for(
  • Adobe 65009963 | Scripting Guide - Page 45
    .NO_FRAME_BLEND FrameBlendingType.PIXEL_MOTION AVLayer guideLayer attribute app.project.item(index).layer(index).guideLayer Description True if the layer is a guide layer. Type Boolean; read/write. AVLayer hasAudio attribute app.project.item(index).layer(index).hasAudio Description True if the
  • Adobe 65009963 | Scripting Guide - Page 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 trackMatteType value controls how the matte is applied. Type Boolean; read-only. AVLayer height attribute app.project.item(index).layer(
  • Adobe 65009963 | Scripting Guide - Page 47
    JavaScript Reference AVLayer object 47 AVLayer preserveTransparency attribute app.project.item(index).layer(index).preserveTransparency Description True if preserve transparency is enabled for the layer. Type Boolean; read/write. AVLayer quality attribute app.project.item(index).layer(index).
  • Adobe 65009963 | Scripting Guide - Page 48
    JavaScript Reference AVLayer object 48 AVLayer sourceRectAtTime() method app.project.item(index).layer(index).sourceRectAtTime(timeT, extents) 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
  • Adobe 65009963 | Scripting Guide - Page 49
    JavaScript Reference AVLayer trackMatteType attribute app.project.item(index).layer(index).trackMatteType Description If this layer has a track matte, specifies the way the track matte is applied. Type A TrackMatteType enumerated value; read/write. One of: TrackMatteType.ALPHA TrackMatteType.
  • Adobe 65009963 | Scripting Guide - Page 50
    JavaScript Reference CameraLayer object 50 CameraLayer object app.project.item(index).layer(index) 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.
  • Adobe 65009963 | Scripting Guide - Page 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
  • Adobe 65009963 | Scripting Guide - Page 52
    JavaScript Reference CompItem object 52 CompItem object app.project.item(index) app.project.items[index] 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 item collection.
  • Adobe 65009963 | Scripting Guide - Page 53
    JavaScript Reference CompItem object 53 Attribute resolutionFactor shutterAngle shutterPhase layers selectedLayers selectedProperties renderer renderers Reference Description "CompItem resolutionFactor attribute" The factor by which the x and y resolution of the Com- on page 57 position panel
  • Adobe 65009963 | Scripting Guide - Page 54
    JavaScript Reference CompItem object 54 CompItem displayStartTime attribute app.project.item(index).displayStartTime 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.
  • Adobe 65009963 | Scripting Guide - Page 55
    JavaScript Reference CompItem object 55 CompItem frameDuration attribute app.project.item(index).frameDuration Description The duration of a frame, in seconds. This is the inverse of the frameRate value (frames-per-second). Type Floating-point; read/write. CompItem hideShyLayers attribute app.
  • Adobe 65009963 | Scripting Guide - Page 56
    JavaScript Reference CompItem object 56 Returns Layer object. CompItem layers attribute app.project.item(index).layers Description A LayerCollection object that contains all the Layer objects for layers in this composition. See "LayerCollection object" on page 92. Type LayerCollection object; read
  • Adobe 65009963 | Scripting Guide - Page 57
    JavaScript Reference CompItem object 57 CompItem preserveNestedResolution attribute app.project.item(index).preserveNestedResolution Description When true, the resolution of nested compositions is preserved in the current composition. Corresponds to the value of the "Preserve Resolution When
  • Adobe 65009963 | Scripting Guide - Page 58
    JavaScript Reference CompItem object 58 CompItem selectedLayers attribute app.project.item(index).selectedLayers 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
  • Adobe 65009963 | Scripting Guide - Page 59
    JavaScript Reference Type Floating-point; read/write. CompItem workAreaStart attribute app.project.item(index).workAreaStart Description The time when the Composition work area begins, in seconds. Type Floating-point; read/write. CompItem object 59 59
  • Adobe 65009963 | Scripting Guide - Page 60
    JavaScript Reference FileSource object 60 FileSource object app.project.item(index).mainSource app.project.item(index).proxySource Description The FileSource object describes footage that comes from a file. • FileSource is a subclass of FootageSource. All methods and attributes of FootageSource,
  • Adobe 65009963 | Scripting Guide - Page 61
    JavaScript Reference FileSource object 61 FileSource reload() method app.project.item(index).mainSource.file.mainSource.reload() Description Reloads the asset from the file. This method can be called only on a mainSource, not a proxySource. Parameters None. Returns Nothing. 61
  • Adobe 65009963 | Scripting Guide - Page 62
    item in the folder, showing that item's name. var secondItem = app.project.item(2); if ( !(secondItem instanceof FolderItem) ) { alert("problem: second item is not a folder"); } else { for (i = 1; i
  • Adobe 65009963 | Scripting Guide - Page 63
    JavaScript Reference FolderItem object 63 FolderItem items attribute app.project.item(index).items 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
  • Adobe 65009963 | Scripting Guide - Page 64
    JavaScript Reference FootageItem object 64 FootageItem object app.project.item(index) app.project.items[index] 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 item
  • Adobe 65009963 | Scripting Guide - Page 65
    JavaScript Reference FootageItem object 65 FootageItem mainSource attribute app.project.item(index).mainSource 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
  • Adobe 65009963 | Scripting Guide - Page 66
    JavaScript Reference FootageItem object 66 frameRate duration The frame rate of the placeholder, a floating-point value in the range [1.0..99.0] The duration of the placeholder in seconds, a floating-point value in the range [0.0..10800.0]. FootageItem replaceWithSequence() method app.project.
  • Adobe 65009963 | Scripting Guide - Page 67
    JavaScript Reference FootageSource object 67 FootageSource object app.project.item(index).mainSource app.project.item(index).proxySource Description The FootageSource object holds information describing the source of some footage. It is used as the mainSource of a FootageItem, or the proxySource
  • Adobe 65009963 | 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 footageSource defines how the alpha information in the footage is to be interpreted. If
  • Adobe 65009963 | Scripting Guide - Page 69
    JavaScript Reference FootageSource object 69 FootageSource fieldSeparationType attribute app.project.item(index).mainSource.fieldSeparationType app.project.item(index).proxySource.fieldSeparationType Description How the fields are to be separated in non-still footage. It is an error to set this
  • Adobe 65009963 | Scripting Guide - Page 70
    JavaScript Reference FootageSource object 70 FootageSource hasAlpha attribute app.project.item(index).mainSource.hasAlpha app.project.item(index).proxySource.hasAlpha Description When true, the footage has an alpha component. In this case, the attributes alphaMode, invertAlpha, and premulColor
  • Adobe 65009963 | Scripting Guide - Page 71
    JavaScript Reference FootageSource object 71 FootageSource loop attribute app.project.item(index).mainSource.loop app.project.item(index).proxySource.loop 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
  • Adobe 65009963 | Scripting Guide - Page 72
    JavaScript Reference PulldownPhase.RemovePulldown.SWWWS PulldownPhase.RemovePulldown.WWWSS PulldownPhase.RemovePulldown.WWSSW PulldownPhase.RemovePulldown.WSSWW_24P_ADVANCE PulldownPhase.RemovePulldown.SSWWW_24P_ADVANCE PulldownPhase.RemovePulldown.SWWWS_24P_ADVANCE PulldownPhase.RemovePulldown.
  • Adobe 65009963 | Scripting Guide - Page 73
    JavaScript Reference ImportOptions object 73 ImportOptions object new ImportOptions(); new ImportOptions(file); Description The ImportOptions object encapsulates the options used to import a file with the Project.importFile methods. See "Project importFile() method" on page 112. The constructor
  • Adobe 65009963 | Scripting Guide - Page 74
    JavaScript Reference ImportOptions object 74 Returns Boolean. Example var io = new ImportOptions(File("c:\\myFile.psd")); if io.canImportAs(ImportAsType.COMP); io.importAs = ImportAsType.COMP; ImportOptions file attribute importOptions.file Description The file to be imported. If a file is set in
  • Adobe 65009963 | Scripting Guide - Page 75
    JavaScript Reference ImportOptions object 75 ImportOptions sequence attribute importOptions.sequence Description When true, a sequence is imported; otherwise, an individual file is imported. Type Boolean; read/write. 75
  • Adobe 65009963 | Scripting Guide - Page 76
    JavaScript Reference Item object 76 Item object app.project.item(index) app.project.items[index] 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
  • Adobe 65009963 | Scripting Guide - Page 77
    JavaScript Reference Item object 77 } } } } Item comment attribute app.project.item(index).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
  • Adobe 65009963 | Scripting Guide - Page 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. // create a new FolderItem in project, with name "comps" var compFolder = app.project.items.addFolder("comps"); // move all
  • Adobe 65009963 | Scripting Guide - Page 79
    JavaScript Reference ItemCollection object 79 ItemCollection object app.project.items 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
  • Adobe 65009963 | Scripting Guide - Page 80
    JavaScript Reference ItemCollection object 80 If the ItemCollection belongs to the project or the root folder, then the new folder's parentFolder is the root folder. If the ItemCollection belongs to any other folder, the new folder's parentFolder is that FolderItem. To put items in the folder, set
  • Adobe 65009963 | Scripting Guide - Page 81
    JavaScript Reference KeyframeEase object 81 KeyframeEase object myKey = new KeyframeEase(speed, influence); 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
  • Adobe 65009963 | Scripting Guide - Page 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. 82
  • Adobe 65009963 | Scripting Guide - Page 83
    JavaScript Reference Layer object 83 Layer object app.project.item(index).layer(index) 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
  • Adobe 65009963 | Scripting Guide - Page 84
    JavaScript Reference Layer object 84 Attribute isNameSet Reference "Layer isNameSet attribute" on page 87 Description When true, the layer's name has been explicitly set. Methods Method Reference Description remove() "Layer remove() method" on page 90 Deletes the layer from the composition
  • Adobe 65009963 | Scripting Guide - Page 85
    JavaScript Reference Layer object 85 Parameters time Returns Boolean. The time in seconds, a floating-point value. Layer applyPreset() method appapp.project.item(index).layer(index).applyPreset(presetName); Description Applies the specified collection of animation settings (an animation preset)
  • Adobe 65009963 | Scripting Guide - Page 86
    JavaScript Reference Layer object 86 Layer copyToComp() method app.project.item(index).layer(index).copyToComp(intoComp) Description Copies the layer into the specified composition. The original layer remains unchanged. Creates a new Layer object with the same values as this one, and prepends the
  • Adobe 65009963 | Scripting Guide - Page 87
    JavaScript Reference Layer object 87 Type Boolean; read-only. Layer index attribute app.project.item(index).layer(index).index Description The index position of the layer. Type Integer in the range [1..numLayers]; read-only. Layer inPoint attribute app.project.item(index).layer(index).inPoint
  • Adobe 65009963 | Scripting Guide - Page 88
    JavaScript Reference Parameters layer Returns Nothing. The target layer, a layer object in the same composition. Layer moveBefore() method app.project.item(index).layer(index).moveBefore(layer) Description Moves this layer to a position immediately before (above) the specified layer. Parameters
  • Adobe 65009963 | Scripting Guide - Page 89
    JavaScript Reference Layer object 89 Layer name attribute app.project.item(index).layer(index).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
  • Adobe 65009963 | Scripting Guide - Page 90
    JavaScript Reference Layer object 90 Layer remove() method app.project.item(index).layer(index).remove() Description Deletes the specified layer from the composition. Parameters None. Returns Nothing. Layer selectedProperties attribute app.project.item(index).layer(index).selectedProperties
  • Adobe 65009963 | Scripting Guide - Page 91
    JavaScript Reference Layer object 91 Type Boolean; read/write. Layer solo attribute app.project.item(index).layer(index).solo Description When true, the layer is soloed, otherwise false. Type Boolean; read/write. Layer startTime attribute app.project.item(index).layer(index).startTime Description
  • Adobe 65009963 | Scripting Guide - Page 92
    JavaScript Reference LayerCollection object 92 LayerCollection object app.project.item(index).layers 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
  • Adobe 65009963 | Scripting Guide - Page 93
    JavaScript Reference LayerCollection object 93 LayerCollection add() method app.project.item(index).layers.add(item, duration) 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
  • Adobe 65009963 | Scripting Guide - Page 94
    JavaScript Reference LayerCollection object 94 Returns LightLayer object. LayerCollection addNull() method app.project.item(index).layers.addNull(duration) Description Creates a new null layer and adds the AVLayer object to this collection. This is the same as choosing Layer > New > Null Object.
  • Adobe 65009963 | Scripting Guide - Page 95
    JavaScript Reference LayerCollection object 95 name width height pixelAspect duration A string containing the name of the solid. The width of the solid in pixels, an integer in the range [4..30000]. The height of the solid in pixels, an integer in the range [4..30000]. The pixel aspect ratio of
  • Adobe 65009963 | Scripting Guide - Page 96
    JavaScript Reference LayerCollection object 96 LayerCollection precompose() method app.project.item(index).layers.precompose(layerIndicies, name, moveAllAttributes) Description Creates a new CompItem object and moves the specified layers into its layer collection. It removes the individual layers
  • Adobe 65009963 | Scripting Guide - Page 97
    JavaScript Reference LightLayer object 97 LightLayer object app.project.item(index).layer(index) Description The LightLayer object represents a light layer within a composition. Create it using the LayerCollection object's addLight method; see "LayerCollection addLight() method" on page 93. It can
  • Adobe 65009963 | Scripting Guide - Page 98
    JavaScript Reference MarkerValue object 98 MarkerValue object new MarkerValue(comment, chapter, url, frameTarget, cuePointName, 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
  • Adobe 65009963 | Scripting Guide - Page 99
    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.project.item(index).layer(index).property("Marker").keyValue(index).comment Description A text
  • Adobe 65009963 | Scripting Guide - Page 100
    JavaScript Reference MarkerValue object 100 MarkerValue frameTarget attribute app.project.item(index).layer(index).property("Marker").keyValue(index).frameTarget Description A text frame target for this marker. Together with the URL value, this targets a specific frame within a Web page. Type
  • Adobe 65009963 | Scripting Guide - Page 101
    JavaScript Reference MarkerValue object 101 myLayer.property("Marker").setValueAtTime(2, mv); MarkerValue url attribute app.project.item(index).layer(index).property("Marker").keyValue(index).url Description A URL for this marker. This URL is an automatic link to a Web page. Type String; read/
  • Adobe 65009963 | Scripting Guide - Page 102
    JavaScript Reference MaskPropertyGroup object 102 MaskPropertyGroup object app.project.item(index).layer(index).mask Description The MaskPropertyGroup object encapsulates mask attributes in a layer. • MaskPropertyGroup is a subclass of PropertyGroup. All methods and attributes of PropertyBase and
  • Adobe 65009963 | Scripting Guide - Page 103
    JavaScript Reference MaskPropertyGroup object 103 MaskPropertyGroup locked attribute app.project.item(index).layer(index).mask(index).locked Description When true, the mask is locked and cannot be edited in the user interface; otherwise, false. Type Boolean; read/write. MaskPropertyGroup maskMode
  • Adobe 65009963 | Scripting Guide - Page 104
    JavaScript Reference OMCollection object 104 OMCollection object app.project.renderQueue.items.outputModules 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
  • Adobe 65009963 | Scripting Guide - Page 105
    JavaScript Reference OutputModule object 105 OutputModule object app.project.renderQueue.item(index).outputModules(index) 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
  • Adobe 65009963 | Scripting Guide - Page 106
    JavaScript Reference OutputModule object 106 Type ExtendScript File object; read/write. OutputModule name attribute app.project.renderQueue.item(index).outputModules[index].name Description The name of the output module, as shown in the user interface. Type String; read-only. OutputModule
  • Adobe 65009963 | Scripting Guide - Page 107
    JavaScript Reference OutputModule object 107 Parameters name Returns Nothing. A string containing the name of the new template. OutputModule templates attribute app.project.renderQueue.item(index).outputModules[index].templates Description The names of all output-module templates availalbe in
  • Adobe 65009963 | Scripting Guide - Page 108
    JavaScript Reference PlaceholderSource object 108 PlaceholderSource object app.project.item(index).mainSource app.project.item(index).proxySource Description The PlaceholderSource object describes the footage source of a placeholder. PlaceholderSource is a subclass of FootageSource. All methods
  • Adobe 65009963 | Scripting Guide - Page 109
    JavaScript Reference Project object 109 Project object app.project 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
  • Adobe 65009963 | Scripting Guide - Page 110
    JavaScript Reference Project object 110 Method removeUnusedFootage() reduceProject() close() save() saveWithDialog() importPlaceholder() importFile() importFileWithDialog() showWindow() autoFixExpressions() Reference Description "Project removeUnusedFootage() method" on page 114 Removes unused
  • Adobe 65009963 | Scripting Guide - Page 111
    JavaScript Reference Project object 111 Project bitsPerChannel attribute app.project.bitsPerChannel 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.project.close(closeOptions) Description
  • Adobe 65009963 | Scripting Guide - Page 112
    JavaScript Reference Project object 112 Description The frame at which to start numbering when displaying the project with a timecodeDisplayType value of TimecodeDisplayType.FRAMES. (See "Project timecodeDisplayType attribute" on page 116.) This is the same as setting "Start numbering frames at:"
  • Adobe 65009963 | Scripting Guide - Page 113
    JavaScript Reference Project object 113 Project importPlaceholder() method app.project.importPlaceholder(name, width, height, frameRate, duration) Description Creates and returns a new PlaceholderItem object and adds it to the project's items array. Same as the File > Import > Placeholder command
  • Adobe 65009963 | Scripting Guide - Page 114
    JavaScript Reference Project object 114 Type Boolean; read/write. Project numItems attribute app.project.numItems Description The total number of items contained in the project, including folders and all types of footage. Type Integer; read-only. Example n = app.project.numItems; alert("There are
  • Adobe 65009963 | Scripting Guide - Page 115
    JavaScript Reference Project object 115 Project renderQueue attribute app.project.renderQueue Description The render queue of the project. Type RenderQueue object; read-only. Project rootFolder attribute app.project.rootFolder Description The root folder containing the contents of the project;
  • Adobe 65009963 | Scripting Guide - Page 116
    JavaScript Reference Returns Boolean; true if the project was saved. Project selection attribute app.project.selection 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.project.
  • Adobe 65009963 | Scripting Guide - Page 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 TimecodeDisplayType enumerated value; read/write. One of: TimecodeDisplayType.TIMECODE TimecodeDisplayType.FRAMES TimecodeDisplayType.FEET_AND_FRAMES
  • Adobe 65009963 | Scripting Guide - Page 118
    . 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 propertyValueType value hasMin hasMax minValue maxValue isSpatial
  • Adobe 65009963 | Scripting Guide - Page 119
    JavaScript Reference Property object 119 Attribute Reference Description 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 "Property keyframeInterpolationType The type of interpolation used at a keyframe. attribute" on page 124 selectedKeys "Property selectedKeys attribute" on page 133 All
  • Adobe 65009963 | Scripting Guide - Page 120
    JavaScript Reference Property object 120 Method Reference Description keyInTemporalEase() "Property keyInTemporalEase() method" on Gets the "in" temporal ease for a key. page 126 keyOutTemporalEase() "Property keyOutTemporalEase() method" Gets the "out" temporal ease for a key. on page 127
  • Adobe 65009963 | Scripting Guide - Page 121
    JavaScript Reference Property object 121 myShape.closed = false; myProperty.setValue(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
  • Adobe 65009963 | Scripting Guide - Page 122
    JavaScript Reference Property object 122 myLight.color.setValue([.8, .3, .1, 1.0]); myLight.color.setValue([.8, .3, .1]); // These two are equivalent. The second creates a TextDocument myTextLayer.sourceText.setValue(new TextDocument("foo")); myTextLayer.sourceText.setValue("foo"); Property
  • Adobe 65009963 | Scripting Guide - Page 123
    JavaScript Reference Property object 123 • If the string contains a valid expression, expressionEnabled becomes true. • If the string does not contain a valid expression, an error is generated, and expressionEnabled becomes false. • If you set the attribute to the empty string, expressionEnabled
  • Adobe 65009963 | Scripting Guide - Page 124
    JavaScript Reference Property object 124 Type Boolean; read-only. Property isInterpolationTypeValid() method app.project.item(index).layer(index).propertySpec.isInterpolationTypeValid(type) Description Returns true if the named property can be interpolated using the specified keyframe
  • Adobe 65009963 | Scripting Guide - Page 125
    JavaScript Reference Property object 125 Type A KeyframeInterpolationType enumerated value; read/write. One of: KeyframeInterpolationType.LINEAR KeyframeInterpolationType.BEZIER KeyframeInterpolationType.HOLD Property keyInInterpolationType() method app.project.item(index).layer(index).
  • Adobe 65009963 | Scripting Guide - Page 126
    JavaScript Reference Property object 126 Property keyInTemporalEase() method app.project.item(index).layer(index).propertySpec.vkeyInTemporalEase(keyIndex) Description Returns the incoming temporal ease for the specified keyframe. Parameters keyIndex The index for the keyframe. An integer in
  • Adobe 65009963 | Scripting Guide - Page 127
    JavaScript Reference Property object 127 Returns Array of floating-point values: • If the property value type is PropertyValueType.TwoD_SPATIAL, the array contains 2 floating-point values. • If the property value type is PropertyValueType.ThreeD_SPATIAL, the array contains 3 floating-point values.
  • Adobe 65009963 | Scripting Guide - Page 128
    JavaScript Reference Property object 128 Property keySelected() method app.project.item(index).layer(index).propertySpec.keySelected(keyIndex) Description Returns true if the specified keyframe is selected. Parameters keyIndex The index for the keyframe. An integer in the range [1..numKeys], as
  • Adobe 65009963 | Scripting Guide - Page 129
    JavaScript Reference Property object 129 Property keyTemporalAutoBezier() method app.project.item(index).layer(index).propertySpec.keyTemporalAutoBezier(keyIndex) Description Returns true if the specified keyframe has temporal auto-Bezier interpolation. Temporal auto-Bezier interpolation affects
  • Adobe 65009963 | Scripting Guide - Page 130
    JavaScript Reference Property object 130 Returns Floating-point value. Property keyValue() method app.project.item(index).layer(index).propertySpec.keyValue(keyIndex) app.project.item(index).layer(index).propertySpec.keyValue(markerComment) Description Finds the specified keyframe or marker and
  • Adobe 65009963 | Scripting Guide - Page 131
    JavaScript Reference Property object 131 Property nearestKeyIndex() method app.project.item(index).layer(index).propertySpec.nearestKeyIndex(time) Description Returns the index of the keyframe nearest to the specified time. Parameters time The time in seconds; a floating-point value. The
  • Adobe 65009963 | Scripting Guide - Page 132
    JavaScript Reference Property object 132 myShape.vertices = [[0,0],[0,100],[100,100],[100,0]]; var myMask = mylayer.property("ADBE Mask Parade").property(1); myMask.property("ADBE Mask Shape").setValue(myShape); Type A PropertyValueType enumerated value; read/write. One of: E PropertyValueType.
  • Adobe 65009963 | Scripting Guide - Page 133
    JavaScript Reference Property object 133 Property selectedKeys attribute app.project.item(index).layer(index).propertySpec.selectedKeys 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
  • Adobe 65009963 | Scripting Guide - Page 134
    JavaScript Reference Property object 134 newVal Returns Nothing. True to turn roving on, false to turn roving off. Property setSelectedAtKey() method app.project.item(index).layer(index).propertySpec.setSelectedAtKey(keyIndex, onOff) Description Selects or deselects the specified keyframe.
  • Adobe 65009963 | Scripting Guide - Page 135
    JavaScript Reference Property object 135 Parameters keyIndex newVal Returns Nothing. The index for the keyframe. An integer in the range [1..numKeys], as returned by the a d d K e y or n e a r e s t Ke y I n d ex method. True to turn spatial continuity on, false to turn it off. Property
  • Adobe 65009963 | Scripting Guide - Page 136
    JavaScript Reference Property object 136 Property setTemporalContinuousAtKey() method app.project.item(index).layer(index).propertySpec.setTemporalContinuousAtKey(keyIndex, newVal) Description Turns temporal continuity on or off for the specified keyframe. When temporal continuity is turned on,
  • Adobe 65009963 | Scripting Guide - Page 137
    JavaScript Reference Property object 137 Property setValue() method app.project.item(index).layer(index).propertySpec.setValue(newValue) 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
  • Adobe 65009963 | Scripting Guide - Page 138
    JavaScript Reference Property object 138 Returns Nothing. Property setValuesAtTimes() method app.project.item(index).layer(index).propertySpec.setValuesAtTimes(times, newValues) Description Sets values for a set of keyframes at specified of times. Creates a new keyframe for the named property,
  • Adobe 65009963 | Scripting Guide - Page 139
    JavaScript Reference Property object 139 Property valueAtTime() method app.project.item(index).layer(index).propertySpec.valueAtTime(time, preExpression) 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
  • Adobe 65009963 | Scripting Guide - Page 140
    JavaScript Reference PropertyBase object 140 PropertyBase object app.project.item(index).layer(index).propertySpec 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
  • Adobe 65009963 | Scripting Guide - Page 141
    JavaScript Reference PropertyBase object 141 Attribute Reference Description p r o p e r t y I n d e x "PropertyBase propertyIndex attribute" Index of this property within its parent group. on page 145 p r o p e r t y D e p t h "PropertyBase propertyDepth attribute" The number of levels of
  • Adobe 65009963 | Scripting Guide - Page 142
    JavaScript Reference PropertyBase object 142 PropertyBase canSetEnabled attribute app.project.item(index).layer(index).propertySpec.canSetEnabled Description When true, you can set the enabled attribute value. Generally, this is true if the user interface displays an eyeball icon for this property
  • Adobe 65009963 | Scripting Guide - Page 143
    JavaScript Reference PropertyBase object 143 PropertyBase enabled attribute app.project.item(index).layer(index).propertySpec.enabled Description When true, this property is enabled. It corresponds to the setting of the eyeball icon, if there is one; otherwise, the default is true. Type Boolean;
  • Adobe 65009963 | Scripting Guide - Page 144
    JavaScript Reference PropertyBase object 144 An indexed group may not have a name value, but always has a matchName value. (An indexed group has the type PropertyType.INDEXED_GROUP; see "PropertyBase propertyType attribute" on page 145.) Type String; read-only. PropertyBase moveTo() method app.
  • Adobe 65009963 | Scripting Guide - Page 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.project.item(index).layer(index).propertySpec.propertyGroup()
  • Adobe 65009963 | Scripting Guide - Page 146
    JavaScript Reference PropertyBase object 146 PropertyType.NAMED_GROUP A property group in which the member names are not editable. Layers are named groups. PropertyBase remove() method app.project.item(index).layer(index).propertySpec.remove() Description Removes this property from its parent
  • Adobe 65009963 | Scripting Guide - Page 147
    JavaScript Reference PropertyGroup object 147 PropertyGroup object app.project.item(index).layer(index).propertyGroupSpec Description The PropertyGroup object represents a group of properties. It can contain Property objects and other PropertyGroup objects. Property groups can be nested to
  • Adobe 65009963 | Scripting Guide - Page 148
    Parameters 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
  • Adobe 65009963 | Scripting Guide - Page 149
    name in expression "parenthesis style" syntax, meaning the display name or the compact English name • Any name in expression "intercap style" syntax For supported property names, see the table below. Returns PropertyBase object or null if no child property with the specified string name is found
  • Adobe 65009963 | Scripting Guide - Page 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
  • Adobe 65009963 | Scripting Guide - Page 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.property("Effects").property("Box Blur"); myLayer.property("Effects").property("boxBlur"); myLayer.property("Effects").
  • Adobe 65009963 | Scripting Guide - Page 152
    JavaScript Reference RenderQueue object 152 RenderQueue object app.project.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
  • Adobe 65009963 | Scripting Guide - Page 153
    JavaScript Reference RenderQueue object 153 RenderQueue items attribute app.project.renderQueue.items 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.project.
  • Adobe 65009963 | Scripting Guide - Page 154
    JavaScript Reference RenderQueue object 154 Parameters None. Returns Nothing. RenderQueue rendering attribute app.project.renderQueue.rendering Description When true, the rendering process is in progress or paused. When false, it is stopped. Type Boolean; read-only. RenderQueue showWindow()
  • Adobe 65009963 | Scripting Guide - Page 155
    JavaScript Reference RenderQueueItem object 155 RenderQueueItem object app.project.renderQueue.items(index) 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
  • Adobe 65009963 | Scripting Guide - Page 156
    JavaScript Reference RenderQueueItem object 156 Method Reference a p p l y T e m p l a t e ( ) "RenderQueueItem applyTemplate() method" on page 156 duplicate "RenderQueueItem duplicate() method" on page 156 Description Applies a Render Settings template. Duplicates this item. RenderQueueItem
  • Adobe 65009963 | Scripting Guide - Page 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.project.renderQueue.item(index).outputModule.logType Description A log type for this
  • Adobe 65009963 | Scripting Guide - Page 158
    JavaScript Reference RenderQueueItem object 158 app.project.renderQueue.item(1).onStatusChanged = myStatusChanged(); app.project.renderQueue.item(1).render = false; //changes status and shows dialog RenderQueueItem outputModules attribute app.project.renderQueue.item(index).outputModules
  • Adobe 65009963 | Scripting Guide - Page 159
    JavaScript Reference RenderQueueItem object 159 Type Boolean; read/write. RenderQueueItem saveAsTemplate() method app.project.renderQueue.item(index).saveAsTemplate(name) Description Saves the item's current render settings as a new template with the specified name. Parameters name A string
  • Adobe 65009963 | Scripting Guide - Page 160
    JavaScript Reference RenderQueueItem object 160 Type An RQItemStatus enumerated value; read-only. One of: RQItemStatus.WILL_CONTINUE RQItemStatus.NEEDS_OUTPUT RQItemStatus.UNQUEUED RQItemStatus.QUEUED RQItemStatus.RENDERING RQItemStatus.USER_STOPPED RQItemStatus.ERR_STOPPED RQItemStatus.DONE
  • Adobe 65009963 | Scripting Guide - Page 161
    JavaScript Reference RQItemCollection object 161 RQItemCollection object app.project.renderQueue.items Description The RQItemCollection contains all of the render-queue items in a project, as shown in the Render Queue panel of the project. The collection provides access to the RenderQueueItem
  • Adobe 65009963 | Scripting Guide - Page 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
  • Adobe 65009963 | Scripting Guide - Page 163
    JavaScript Reference Parameters sectionName keyName A string containing the name of a settings section A string containing the key name of the setting item. Returns Boolean. Settings saveSetting() method app.settings.saveSetting(sectionName, keyName, value) Description Saves a default value
  • Adobe 65009963 | Scripting Guide - Page 164
    JavaScript Reference Shape object 164 Shape object app.project.item(index).layer(index).property(index).property("maskShape").value 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
  • Adobe 65009963 | Scripting Guide - Page 165
    JavaScript Reference Shape object 165 Attributes Attribute closed vertices inTangents outTangents Reference Description "Shape closed attribute" on page 165 When true, the shape is a closed curve. "Shape vertices attribute" on page 166 The anchor points of the shape. "Shape inTangents
  • Adobe 65009963 | Scripting Guide - Page 166
    JavaScript Reference Shape object 166 Type Array of floating-point pair arrays; read/write. Shape vertices attribute shapeObject.value.vertices 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
  • Adobe 65009963 | Scripting Guide - Page 167
    JavaScript Reference ShapeLayer object 167 ShapeLayer object app.project.item(index).layer(index) 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
  • Adobe 65009963 | Scripting Guide - Page 168
    JavaScript Reference SolidSource object 168 SolidSource object app.project.item(index).mainSource app.project.item(index).proxySource Description The SolidSource object represents a solid-color footage source. • SolidSource is a subclass of FootageSource. All methods and attributes of
  • Adobe 65009963 | Scripting Guide - Page 169
    JavaScript Reference System object 169 System object system Description The System object provides access to attributes found on the user's system, such as the user name and the name and version of the operating system. It is available through the system global variable. Example alert ("Your OS
  • Adobe 65009963 | Scripting Guide - Page 170
    JavaScript Reference Description The name of the computer on which After Effects is running. Type String; read-only. System osName attribute system.osName Description The name of the operating system on which After Effects is running. Type String; read-only. System osVersion attribute system.
  • Adobe 65009963 | Scripting Guide - Page 171
    JavaScript Reference TextDocument object 171 TextDocument object new TextDocument(docText) app.project.item(index).layer(index).property("Source Text").value Description The TextDocument object stores a value for a TextLayer's Source Text property. Create it with the constructor, passing the
  • Adobe 65009963 | Scripting Guide - Page 172
    JavaScript Reference TextLayer object 172 TextLayer object app.project.item(index).layer(index) 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
  • Adobe 65009963 | Scripting Guide - Page 173
    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_increment.jsx
  • Adobe 65009963 | Scripting Guide - Page 174
    Examples Render named items 174 Render named items This script, renderNamedItems.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
  • Adobe 65009963 | Scripting Guide - Page 175
    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 . For details of that utility, see the Creative Suite 3 JavaScript Tools Guide. Another helper script, email_setup.jsx, prompts the user for the server name
  • Adobe 65009963 | Scripting Guide - Page 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
  • Adobe 65009963 | Scripting Guide - Page 177
    After Effects Object Summary This code dump summarizes all public JavaScript objects (instantiable classes) and enumerated types defined for After Effects CS3. AlphaMode enum AlphaMode.IGNORE AlphaMode.PREMULTIPLIED AlphaMode.STRAIGHT Application object activate() no return beginSuppressDialogs
  • Adobe 65009963 | Scripting Guide - Page 178
    After Effects Object Summary 178 version : string : readOnly watchFolder(File file) no return onError(string errorString, string severity) no return AVLayer object integer propertyIndex) returns PropertyBase (string propertyName) returns PropertyBase active : boolean : readOnly activeAtTime(float
  • Adobe 65009963 | Scripting Guide - Page 179
    After Effects Object Summary 179 moveBefore(Layer otherLayer) no return moveTo(integer index) no return moveToBeginning() no return moveToEnd() no return name : string : read/write nullLayer : boolean : readOnly numProperties : integer : readOnly outPoint : float : read/write parent : Layer : read/
  • Adobe 65009963 | Scripting Guide - Page 180
    After Effects Object Summary 180 BlendingMode.EXCLUSION BlendingMode.HARD_LIGHT BlendingMode.HARD_MIX BlendingMode.HUE BlendingMode.LIGHTEN BlendingMode.LIGHTER_COLOR BlendingMode.LINEAR_BURN BlendingMode.LINEAR_DODGE BlendingMode.LINEAR_LIGHT BlendingMode.LUMINESCENT_PREMUL BlendingMode.LUMINOSITY
  • Adobe 65009963 | Scripting Guide - Page 181
    After Effects Object Summary 181 layer(Layer otherLayer, integer relativeIndex) returns Layer layers : LayerCollection: readOnly motionBlur : boolean : read/write name : string : read/write numLayers : integer : readOnly parentFolder : FolderItem : read/write pixelAspect : float : read/write
  • Adobe 65009963 | Scripting Guide - Page 182
    After Effects Object Summary 182 invertAlpha : boolean : read/write isStill : boolean : readOnly loop : integer : read/write missingFootagePath : string : readOnly nativeFrameRate : float : readOnly premulColor : Array of float : read/write reload() no return removePulldown : PulldownPhase :
  • Adobe 65009963 | Scripting Guide - Page 183
    After Effects Object Summary 183 setProxyWithSequence(File proxyFile, boolean forceAlphabetical) no return setProxyWithSolid(ArrayOfFloat color, string name, integer width, integer height, float pixelAspecRatio) no return time : float : readOnly typeName : string : readOnly useProxy : boolean : read
  • Adobe 65009963 | Scripting Guide - Page 184
    After Effects Object Summary 184 CameraLayer object integer propertyIndex) returns PropertyBase (string propertyName) returns PropertyBase active : boolean : readOnly activeAtTime(float atTime) returns boolean addProperty(string propertyName) returns PropertyBase adjustmentLayer : boolean :
  • Adobe 65009963 | Scripting Guide - Page 185
    After Effects Object Summary 185 stretch : float : read/write time : float : readOnly LayerCollection object add(AVItem theItem, [float duration]) returns AVLayer addCamera(string name, ArrayOfFloat centerPoint) returns Layer addLight(string name, ArrayOfFloat centerPoint) returns Layer addNull([
  • Adobe 65009963 | Scripting Guide - Page 186
    After Effects Object Summary 186 MaskMode.INTERSECT MaskMode.LIGHTEN MaskMode.NONE MaskMode.SUBTRACT MaskMotionBlur enum MaskMotionBlur.OFF MaskMotionBlur.ON MaskMotionBlur.SAME_AS_LAYER MaskPropertyGroup object integer propertyIndex) returns PropertyBase (string propertyName) returns
  • Adobe 65009963 | Scripting Guide - Page 187
    After Effects Object Summary 187 applyTemplate(string templateName) no return file : File : read/write name : string : readOnly postRenderAction : PostRenderAction : read/write remove() no return saveAsTemplate(string templateName) no return templates : Array of string: readOnly PlaceholderSource
  • Adobe 65009963 | Scripting Guide - Page 188
    After Effects Object Summary 188 removeUnusedFootage() returns integer renderQueue : RenderQueue : readOnly rootFolder : FolderItem : readOnly save(File toFile) returns boolean saveWithDialog() returns boolean selection : Array of Item : readOnly showWindow(boolean doShow) no return timecodeBaseType
  • Adobe 65009963 | Scripting Guide - Page 189
    After Effects Object Summary 189 moveTo(integer index) no return name : string : readOnly nearestKeyIndex(float atTime) returns integer numKeys : integer : readOnly parentProperty : PropertyGroup : readOnly propertyDepth : integer : readOnly propertyGroup([integer countUp]) returns PropertyGroup
  • Adobe 65009963 | Scripting Guide - Page 190
    After Effects Object Summary 190 numProperties : integer : readOnly parentProperty : PropertyGroup : readOnly property(integer propertyIndex) returns PropertyBase property(string propertyName) returns PropertyBase propertyDepth : integer : readOnly propertyGroup([integer countUp]) returns
  • Adobe 65009963 | Scripting Guide - Page 191
    After Effects Object Summary 191 PurgeTarget enum PurgeTarget.ALL_CACHES PurgeTarget.IMAGE_CACHES PurgeTarget.SNAPSHOT_CACHES PurgeTarget.UNDO_CACHES RenderQueue object item(integer itemIndex) returns RenderQueueItem items : RQItemCollection : readOnly numItems : integer : readOnly
  • Adobe 65009963 | Scripting Guide - Page 192
    After Effects Object Summary 192 RQItemStatus.UNQUEUED RQItemStatus.USER_STOPPED RQItemStatus.WILL_CONTINUE Settings object getSetting(string sectionName, string sectionKey) returns string haveSetting(string sectionName, string sectionKey) returns boolean saveSetting(string sectionName, string
  • Adobe 65009963 | Scripting Guide - Page 193
    After Effects Object Summary 193 TimecodeBaseType.AUTO TimecodeBaseType.FPS100 TimecodeBaseType.FPS24 TimecodeBaseType.FPS25 TimecodeBaseType.FPS30 TimecodeBaseType.FPS48 TimecodeBaseType.FPS50 TimecodeBaseType.FPS60 TimecodeDisplayType enum TimecodeDisplayType.FEET_AND_FRAMES TimecodeDisplayType.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193

SCRIPTING GUIDE