After-Effects-CS6-Scripting-Guide - Display the Filter Gallery
The constructor takes an optional parameter, an ExtendScript File object for the file. Each tangent value defaults to [0,0]. CompItem shutterAngle attributeapp. Finds a keyframe and sets the value ofthe property at that keyframe. Creates a new PlaceholderSource object, sets its values from the parameters, and sets m a i n S ou rc e to that object. AVLayer audioEnabled attributeapp. TypeFloating-point; read-only.
Scripts in After Effects
Tools and Utilities: In addition, ExtendScript provides tools and features such as a localization utility forproviding user-interface string values in different languages and global functions for displaying shortmessages in dialog boxes alert, confirm, and prompt.
External Communication: ExtendScript provides a Socket object that allows you to communicate with remotesystems from your After Effects scripts. Interapplication Communication: ExtendScript provides a common scripting environment for all Adobeapplications, and allows interapplication communication through scripts.
If you choose to use another text editor to create, edit, and save scripts, be sure to choose an application thatdoes not automatically add header information when saving files and that saves with Unicode UTF-8 encoding.
In many text editors, you can set preferences for saving with UTF-8 encoding. After Effects scripts must include the. Any UTFencoded text file with the. You can use the ExtendScript Toolkit to export a binary version of an ExtendScript file, which has theextension.
Such a binary file may not be usable with all of the scripting integration features in After Effects. Activating full scripting featuresThe default is for scripts to not be allowed to write files or send or receive communication over a network. OverviewLoading and running scripts5Any After Effects script that contains an error preventing it from being completed generates an error messagefrom the application.
This error message includes information about the nature of the error and the line of thescript on which it occurred. This feature is disabled by default so that casual users do not encounterit. If you edit a script while After Effects is running, you must save your changes for the changes to be applied.
Ifyou place a script in the Scripts folder while After Effects is running, you must restart After Effects for thescript to appear in the Scripts menu, though you can immediately run the new script using the Run Script Filecommand. Running scripts from the command line, a batch file, or an AppleScript scriptIf you are familiar with how to run a script from the command line in Windows or via AppleScript, you cansend a script directly to the open After Effects application, so that the application automatically runs the script.
To run a script from the command line, call afterfx. Use the -r switch and the fullpath of the script to run as arguments. This command does not open a new instance of the After Effects application;it runs the script in the existing instance. Following are examples of Windows command-line entries that will send an After Effects script to the applicationwithout 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 runit.
The script text appears in quotation marks following the afterfx. For example:afterfx. In the first example, you copy your After Effects script directly into the Script Editor and then run it.
After Effects runs scripts in thesefolders 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 areexecuted 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 thatare available to all scripts.
In all cases, variables and functions, once defined by running a script that containsthem, persist in subsequent scripts during a given After Effects session. Once the application is quit, all suchglobally defined variables and functions are cleared. Be sure to give variables in scripts unique names, so thata script does not inadvertently reassign global variables intended to persist throughout a session.
OverviewLoading and running scripts7The Shutdown folder scripts are executed as the application quits. This occurs after the project is closed butbefore any other application shutdown occurs. If a script has beenwritten to provide a user interface in a dockable panel, the script should be put in the ScriptUI folder.
ScriptUIpanels work much the same as the default panels in the After Effects user interface. Instead of creating a Window object and adding controls to it, a ScriptUI Panels script uses the this object thatrepresents the panel. In this case, you should pass the this object as an argument to your function. However, a script that is busy processing a lot of data might not be very responsive.
After Effects scripting referenceThis chapter lists and describes JavaScript classes, objects, methods, attributes, and global functions defined by After Effects. Elements of basic JavaScript relevant to After Effects scriptingJavaScript variables Scripting shares a global environment, so any script executed at startup can define variables and functions thatare available to all scripts. Scripters should be careful about giving variables in scriptsunique names, so that a script does not inadvertently reassign global variables intended to persist throughouta session.
JavaScript keywords and statement syntaxAlthough it is not possible to provide an exhaustive resource describing usage of JavaScript, the following tablesprovide an overview of keywords, statements, operators, precedence, and associativity. The following table lists and describes all keywords and statements recognized by the After Effects scriptingengine.
Standard JavaScript; cease execution of the current loop iteration. Label used in a switch statement. Label used in a switch statement when a case label is not found.
Standard JavaScript construct. Similar to the while loop, except loop condition evaluation occursat the end of the loop. Literal representing the Boolean false value. Standard JavaScript loop construct. Provides a way to easily loop through the properties of an object. Used to define a function. Standard JavaScript conditional constructs. Standard JavaScript constructor statement.
Assigned to a variable, array element, or object property to indicate that it does not contain a legalvalue. Standard JavaScript way of returning a value from a function or exiting a function. Standard JavaScript method of indicating the current object. Literal representing the Boolean true value. Indicates that the variable, array element, or object property has not yet been assigned a value. Standard JavaScript syntax used to declare a local variable.
Similar to the do Standard JavaScript construct used to specify an object to use in subsequent statements. JavaScript operatorsThe following tables list and describe all operators recognized by the After Effects scripting engine and showthe precedence and associativity for all operators. Deallocate object. Returns data type. Returns undefined value.. Structure member. Function call. Logical NOT. Bitwise XOR. Bitwise OR. Logical OR.? Hierarchy diagram of the main After Effects scripting objects ExtendScript also defines the ScriptUI module, a set of window and user-interface controlobjects, 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. The application contains a Project panel, which displays a project.
The project contains compositions, whichcontain 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 renderqueue contains render-queue items as well as render settings and output modules. All of these entities are representedby objects in scripting. Object summaryThe following table lists all objects alphabetically, with links to the documentation page for each. A single global object, available by its name app , that provides access to objects andapplication settings within the After Effects application.
Represents those layers that contain AVItem objects composition layers, footage layers,solid layers, text layers, and sound layers.
Represents a camera layer within a composition. Associates a set of objects or values as a logical group and provides access to them byindex. Represents a composition, and allows you to manipulate it and get information about it.
Represents a folder in the Project panel. Represents a footage item imported into a project, which appears in the Project panel. Describes the file source of some footage. Encapsulates options for importing files into After Effects. Represents an item in a project that appears in the Project panel. Collects items in a project. Encapsulates keyframe ease values in an After Effects property.
A base class for layer classes. Collects layers in a project. Represents a light layer within a composition. Encapsulates marker values in an After Effects property. Encapsulates mask attributes in a layer.
Collects output modules in a render queue. Represents an output module for a render queue. Describes a placeholder for footage. Represents an After Effects project.
Represents an After Effects property. A base class for After Effects property and property group classes. Represents an After Effects property group. Represents the After Effects render queue. Represents a renderable item in a render queue. Collects render-queue items in a render queue.
Provides access to application settings and preferences. Encapsulates the outline shape information for a mask. Represents a shape layer within a composition. Describes a solid color that is the source of some footage. Provides access to the operating system from the application. Encapsulates the text in a text layer. Represents a text layer within a composition. Represents a Composition, Layer, or Footage panel.
After Effects scripting referenceGlobal functions14Global functionsThese globally available functions that are specific to After Effects. Any JavaScript object or function can callthese functions, which allow you to display text in a small 3-line area of the Info panel, and to convertnumeric time values to and from string values. Converts string time value to a numeric time value. Converts a numeric time value to a string time value. Writes text to the Info panel, with no line break added.
Writes text to the Info panel, adding a line break at the end. When true, the specified object exists. Forexample, if the formatted frame time value is the exact string format is determined by a projectsetting , and the frame rate is 24 fps, the time would be 0. If the frame rate is 30 fps, the timewould be 0. If the time is a duration, the frames are counted from 0. The frames-per-second, a floating-point value.
After Effects scripting referenceGlobal functions15isDurationOptional. When true, the time is a duration measured from frame 0. ReturnsFloating-point value, the number of seconds. Some operations,such as the PropertyBase moveTo method, might invalidate existing variable assignments to relatedobjects. This function allows you to test whether those assignments are still valid before attempting to accessthem. ParametersobjThe After Effects object to check for validity.
For example, if the time is 0. If the framerate is 30 fps, the frame would be The format of the timecode string is determined by a project setting. ParameterstimefpsThe number of seconds, a floating-point value. After Effects scripting referenceGlobal functions16isDurationOptional. ParameterstextThe string to display. Truncated if too long for the Info panel. Examplewrite "This text appears in Info panel " ;write "with more on same line.
Examplewriteln "This text appears on first line" ;writeln "This text appears on second line" ; After Effects scripting referenceApplication object17Application objectappDescriptionProvides access to objects and application settings within the After Effects application.
The single global objectis always available by its name, app. Attributes of the Application object provide access to specific objects within After Effects.
Methods of theApplication 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.
The locale language and region in which the applicationis running. The version number of the After Effects application. The name of this build of the application. The number of this build of the application. When true, the local application is running in WatchFolder mode. When true, the local After Effects application is runningas a render engine.
Application settings that can be set via scripting. A callback function that is called when an error occursin the application. A numeric status code used when executing a scriptexternally that is, from a command line or AppleScript. A positive number indicates anerror that occurred while running the script. When true, the application remains open after runninga script from the command line on Windows.
When true, the project is saved if the application closesunexpectedly. Memory in use by this application. The effects available in the application. The currently focused or last-focused viewer panel. Pauses a current watch-folder process. Ends a current watch-folder process. Ends an undo group; needed only when ascript contains more than one undo group.
Begins suppression of dialogs in the user interface. Ends suppression of dialogs in the user interface. Sets whether preferences are saved when theapplication is quit. Cancels a scheduled task.
Application activate methodapp. After Effects scripting referenceApplication object19ReturnsNothing. Application activeViewer attributeapp. Returns null if no viewers are open. TypeViewer object; read-only. Application beginSuppressDialogs methodapp. Use endSuppressDialogs to resume thedisplay of error dialogs. Application beginUndoGroup methodapp.
Use the endUndoGroup method to markthe end of the group. Groups within groups become part of thelarger group, and will undo correctly. In this case, the names of inner groups are ignored. Application buildName attributeapp. After Effects scripting referenceApplication object20DescriptionThe name of the build of After Effects being run, used internally by Adobe for testing and troubleshooting.
TypeString; read-only. Application buildNumber attributeapp. TypeInteger; read-only. Application cancelTask methodapp. ParameterstaskIDAn integer that identifies the task, as returned by app. Application effects attributeapp. TypeArray, with each element containing the following properties; read-only:displayNamecategorymatchNameString representing the localized display name of the effect as seen in the Effect menu.
String representing the localized category label as seen in the Effect menu. String representing the internal unique name for the effect. This name does not change between versionsof After Effects. Use this value to apply the effect. Error dialogs are displayed by default;call this method only if beginSuppressDialogs has previously been called. ParametersalertBoolean; when true, errors that have occurred following the call to beginSuppressDialogs are displayed in adialog box.
Application endUndoGroup methodapp. You can use this method toplace an end to an undo group in the middle of a script, should you wish to use more than one undo group fora 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 absenceat the end of a script, the system will close the undo group automatically. Calling this method without having set a beginUndoGroup method yields an error.
Application endWatchFolder methodapp. When the applicationis 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 remainopen.
This attribute only has an effect when After Effects is run from the Windows command line. It has no effectin Mac OS. Application exitCode attributeapp. In the event of an error while the script is running, the script can set this to a positive integer thatindicates what error occurred.
After Effects scripting referenceApplication object23TypeString; read-only. TypeBoolean; read-only. Application isWatchFolder attributeapp. Application memoryInUse attributeapp. After Effects scripting referenceApplication object24TypeNumber; read-only. Application newProject methodapp. If the current project has been edited, the user is prompted to save it. If the user cancels out of the Save dialogbox, the new project is not created and the method returns null.
Use app. ReturnsA new Project object, or null if no new project is created. By creating a function and assigning it tothis 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. The callback function is passed the error string and a severity string.
It should not return any value. After Effects scripting referenceApplication object25DescriptionOpens a project.
An ExtendScript File object for the project file to open. If not supplied, the method prompts theuser to select a project file. ReturnsA new Project object for the specified project, or null if the user cancels the Open dialog box. ParametersfileThe file specification, an ExtendScript File object. ReturnsThe swatch data, in this format:data.
An array of SwatchValue. After Effects scripting referenceApplication object26SwatchValue. L is in the range [0. Application pauseWatchFolder methodapp. ParameterspauseTrue to pause, false to resume. TypeProject object; read-only. Application purge methodapp. Replicates the Purge options in the Edit menu.
Application quit methodapp. Application saveProjectOnCrash attributeapp. Set to false to suppress this dialog box and quitwithout saving. Application scheduleTask methodapp. A number of milliseconds to wait before executing the JavaScript. A floating-point value. After Effects scripting referenceApplication object28repeatWhen true, execute the script repeatedly, with the specified delay between each execution. When falsethe script is executed only once. ReturnsInteger, a unique identifier for this task, which can be used to cancel it with app.
Application setMemoryUsageLimits methodapp. For both values, if installed RAM is lessthan a given amount n gigabytes , the value is a percentage of the installed RAM, and is otherwise apercentage of n. ParametersimageCachePercentagemaximumMemoryPercentageFloating-point value, the percentage of memory assigned to image cache. Floating-point value, the maximum usable percentage of memory. Application setSavePreferencesOnQuit methodapp.
ParametersdoSaveWhen true, preferences saved on quit, when false they are not. Application settings attributeapp. TypeSettings object; read-only. After Effects scripting referenceApplication object29Application version attributeapp.
All methods and attributes of Item, in addition to those listed below, areavailable when working with AVItem. Sets a solid as a proxy for the item. Sets a placeholder as a proxy for the item. Still footage items have a duration of 0. TypeFloating-point value in the range [0. AVItem footageMissing attributeapp. AVItem frameDuration attributeapp.
This is the reciprocal of frameRate. When set, thereciprocal is automatically set as a new frameRate value. This attribute returns the reciprocal of the frameRate, which may not be identical to a value you set, if thatvalue is not evenly divisible into 1.
To change it, set theconformFrameRate of the mainSource object. This sets both the frameRate and frameDuration of theFootageItem. This is the reciprocal of the frameDuration. When set,the reciprocal is automatically set as a new frameDuration value. To changeit, set the conformFrameRate of the mainSource object. This sets both the frameRate and frameDurationof the FootageItem. TypeFloating-point value in the range [1. AVItem hasAudio attributeapp. AVItem hasVideo attributeapp.
AVItem height attributeapp. Otherwise, it is read-only. TypeInteger in the range [ AVItem name attributeapp. If the mainSource object is a FileSource, thisvalue controls the display name in the Project panel, but does not affect the file name. AVItem pixelAspect attributeapp. The value you retrieve after setting may be slightly different from the value you supplied.
The following tablecompares the value as it appears in the UI with the more-accurate value returned by this attribute. TypeFootageSource object; read-only. AVItem setProxy methodapp. Loads the specified file into a new FileSource object, sets this as thevalue 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 preferencesays 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. ParametersfileAn ExtendScript File object for the file to be used as a proxy. It does not preserve the interpretation parameters, instead using the user preferences. NOTE: There is no direct way to set a placeholder as a proxy in the user interface; this behavior occurs when aproxy has been set and then moved or deleted.
ParametersnameA string containing the name of the new object. An integer in the range [0. Loads thespecified file sequence into a new FileSource object, sets this as the value of the proxySource attribute, and setsuseProxy to true.
If anyfile has an unlabeled alpha channel, and the user preference says to ask the user what to do, the methodestimates the alpha interpretation, rather than asking the user. After Effects scripting referenceAVItem object36NOTE: There is no way, using the user interface, to set a solid as a proxy; this feature is available only throughscripting.
Parameterscolor The color of the solid, an array of 3 floating-point values, [R, G, B], in the range [0. AVItem time attributeapp. This value is a numberof seconds. It is an error to set this value for a FootageItem whose mainSource is still item. AVItem usedIn attributeapp. Note that upon retrieval, the array value is copied, so it is not automatically updated. If you get this value, thenadd this item into another composition, you must retrieve the value again to get an array that includes the newitem.
TypeArray of CompItem objects; read-only. AVItem useProxy attributeapp. AVItem width attributeapp. All methods and attributes of Layer, in addition to those listed below, areavailable when working with AVLayer. When true, the layer's motion blur is enabled. When true, the layer's effects are active. When true, this is an adjustment layer. When true, this is a guide layer. When true, this is a 3D layer. When true, 3D is set on a per-character basis inthis text layer.
When true, this is an environment layer. When true, it is legal to change the value ofcollapseTransformation. When true, collapse transformation is on. When true, frame blending is enabled. The type of frame blending for the layer. When true, it is legal to change the value oftimeRemapEnabled. When true, time remapping is enabled on thislayer. When true, the layer contains an audio component.
The blending mode of the layer. When true, preserve transparency is enabled. When true, this layer is being used as a trackmatte for the layer below it. When true, the layer above is being used as atrack matte on this layer. Calculates a transformation from a set ofpoints in this layer.
Changes the source item for this layer. Retrieves the source rectangle of a layer. Opens the layer in a Layer panel. AVLayer adjustmentLayer attributeapp. AVLayer audioActive attributeapp. After Effects scripting referenceAVLayer object41For this value to be true, audioEnabled must be true, no other layer with audio may be soloing unless this layeris soloed too, and the time must be between the inPoint and outPoint of this layer. For this method to return true, audioEnabled must be true, no other layer with audio may be soloing unlessthis layer is soloed too, and the time must be between the inPoint and outPoint of this layer.
ParameterstimeThe time, in seconds. AVLayer audioEnabled attributeapp. This value corresponds to the audio toggle switch in the Timelinepanel. AVLayer autoOrient attributeapp. One of:AutoOrientType.
Layer always faces the active camera or points at itspoint of interest. Each character in a per-character 3D text layer automaticallyfaces the active camera. AVLayer blendingMode attributeapp. One of:BlendingMode. The top right point coordinates in the form of an array, [x, y, z].
The bottom right point coordinates in the form of an array, [x, y, z]. ReturnsAn Object with the transformation properties set. AVLayer effectsActive attributeapp.
AVLayer environmentLayer attributeapp. Setting this attribute to true automaticallymakes the layer 3D threeDLayer becomes true. AVLayer frameBlending attributeapp. AVLayer frameBlendingType attributeapp. One of:FrameBlendingType.
AVLayer hasAudio attributeapp. AVLayer hasTrackMatte attributeapp. When true, this layer's track-MatteType value controls how the matte is applied. AVLayer height attributeapp. TypeFloating-point; read-only. In this case, layer. False if the layer has an expressly set name, or if the layer does not have a source. AVLayer isTrackMatte attributeapp. AVLayer motionBlur attributeapp.
AVLayer openInViewer methodapp. ReturnsViewer object for the Layer panel, or null if the layer could not be opened e. AVLayer quality attributeapp. One of:LayerQuality. True to adjust expressions for the new source, false otherwise. Note that this feature can beresource-intensive; if replacing a large amount of footage, do this only at the end of the operation. AVLayer source attributeapp.
The value is null in a Text layer. Use AVLayer. TypeAVItem object; read-only. Use, for example, to write text that is properly aligned to the baseline. ParameterstimeTextentsThe time index, in seconds. True to include the extents, false otherwise. Extents apply to shape layers, increasing the size ofthe layer bounds as necessary. ReturnsA JavaScript object with four attributes, [top, left, width, height].
AVLayer threeDLayer attributeapp. Applies only to text layers. AVLayer timeRemapEnabled attributeapp. One of:TrackMatteType. All methods and attributes of Layer are available when working withCameraLayer. After Effects scripting referenceCollection object51Collection objectLike an array, a collection associates a set of objects or values as a logical group and provides access to themby index. However, most collection objects are read-only.
You do not assign objects to them yourself—theircontents update automatically as objects are created or deleted. The index numbering of a collection starts with 1, not 0. AttributeslengthThe number of objects in the collection. Methods[] Retrieves an object in the collection by its index number.
The first object is at index 1. All methods and attributes of AVItem andItem, in addition to those listed below, are available when working with CompItem. ExampleGiven that the first item in the project is a CompItem, the following code displays two alerts. The first showsthe number of layers in the CompItem, and the second shows the name of the last layer in the CompItem.
When true, indicates that the compositionuses drop-frame timecode. The work area start time. The work area duration. When true, motion blur is enabled forthis composition. When true, the frame rate of nestedcompositions is preserved.
When true, the resolution of nestedcompositions is preserved. The factor by which the x and y resolutionof the Composition panel isdownsampled.
The camera shutter angle. The camera shutter phase. The minimum number of motion blursamples per frame for Classic 3D layers,shape layers, and certain effects. The maximum number of motion blursamples of 2D layer motion. The selected properties of the composition. CompItem activeCamera attributeapp.
The value is null if the compositioncontains no enabled camera layers. TypeCameraLayer object; read-only. The three array values specify the red, green, and blue componentsof the color. TypeAn array containing three floating-point values, [R, G, B], in the range [0. CompItem displayStartTime attributeapp. CompItem draft3d attributeapp. This corresponds to the value of the Draft3D button in the Composition panel. CompItem dropFrame attributeapp.
When false, indicates non-drop-frametimecode. This corresponds to the setting in the Composition Settings dialog box. CompItem duplicate methodapp. ReturnsCompItem object. CompItem frameBlending attributeapp. Corresponds to the value of the Frame Blendingbutton in the Composition panel. CompItem frameDuration attributeapp. This is the inverse of the frameRate value frames-per-second.
CompItem hideShyLayers attributeapp. When false, all layers are visible,including those whose shy value is true. CompItem layer methodapp. After Effects scripting referenceCompItem object56ParametersindexThe index number of the desired layer in this composition.
An integer in the range [ The relIndex value is added to the index value of thislayer to find the position of the desired layer. The position of the desired layer, relative to otherLayer. An integer in the range [1—other-Layer.
This value is added to the otherLayer value to derive the absolute index of the layer toreturn. ReturnsLayer object. CompItem layers attributeapp. TypeLayerCollection object; read-only. CompItem motionBlur attributeapp. Corresponds to the value of the Motion Blur buttonin the Composition panel. CompItem numLayers attributeapp. CompItem openInViewer methodapp. ReturnsViewer object for the Composition panel, or null if the composition could not be opened.
CompItem preserveNestedFrameRate attributeapp. CompItem renderer attributeapp. Allowed values are the members of compItem. CompItem renderers attributeapp. Member strings reflect installed modules, as seen in the Advancedtab of the Composition Settings dialog box. TypeArray of strings; read-only. CompItem resolutionFactor attributeapp. The two values in the array specify how many pixels to skip when sampling; the first number controlshorizontal sampling, the second controls vertical sampling.
Full resolution is [1,1], half resolution is [2,2], andquarter resolution is [4,4]. The default is [1,1]. TypeArray of two integers in the range [ This is a 0-based array the first object is at index 0. TypeArray of Layer objects; read-only. CompItem selectedProperties attributeapp. The first property isat index position 0. TypeArray of Property and PropertyGroup objects; read-only. CompItem shutterAngle attributeapp. This corresponds to the Shutter Angle setting in the Advancedtab of the Composition Settings dialog box.
CompItem shutterPhase attributeapp. This corresponds to the Shutter Phase setting in the Advancedtab of the Composition Settings dialog box. TypeInteger in the range [— CompItem workAreaDuration attributeapp. This is the difference of the start-point and end-point times of theComposition work area.
CompItem workAreaStart attributeapp. All methods and attributes of FootageSource, in addition to thoselisted below, are available when working with FileSource. FileSource file attributeapp.
TypeFile object; read-only. FileSource missingFootagePath attributeapp. This method can be called only on a mainSource, not a proxySource. It can contain various types of items footage, compositions, solids as well as other folders. 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-levelin the root folder are also top-level in the Project. TypeItemCollection object; read only. FolderItem numItems attributeapp. If the folder contains another folder, only the FolderItem for that folder is counted, not any subitems containedin it. TypeInteger; read only. All methods and attributes of AVItem andItem, in addition to those listed below, are available when working with FootageItem. Replaces a footage file with a placeholder object. Replaces a footage file with an image sequence.
Replaces a footage file with a solid. Opens the footage in a Footage panel. FootageItem file attributeapp.
Otherwiseit is null. TypeFile object; read only. The attribute is read-only. FootageItem openInViewer methodapp. NOTE: Missing and placeholder footage can be opened using this method, but cannot manually via doubleclickingit. ReturnsViewer object for the Footage panel, or null if the footage could not be opened. FootageItem replace methodapp. In addition to loading the file, the method createsa new FileSource object for the file and sets mainSource to that object.
The method preserves interpretation parameters from the previous mainSource object. If the specified file hasan unlabeled alpha channel, the method estimates the alpha interpretation. FootageItem replaceWithPlaceholder methodapp. Creates a new PlaceholderSource object,sets its values from the parameters, and sets mainSource to that object. ParametersnameA string containing the name of the placeholder. FootageItem replaceWithSequence methodapp. In addition to loading the file, themethod creates a new FileSource object for the file and sets mainSource to that object.
ParametersfileforceAlphabeticalAn ExtendScript File object for the first file in the sequence to be used as the footage main source. FootageItem replaceWithSolid methodapp. Creates a new SolidSource object, sets its valuesfrom the parameters, and sets mainSource to that object. After Effects scripting referenceFootageItem object68Parameterscolor The color of the solid, an array of three floating-point values, [R, G, B], in the range [0.
The mode of an alpha channel. The color to be premultiplied. When true, an alpha channel in a footage clip orproxy should be inverted. When true, footage is a still image. All methods and attributes of Layer, in addition to those listed below, are available when working with AVLayer. AVLayer audioActive attribute app.
For this method to return true, au d i oE nabl e d must be true, no other layer with audio may be soloing unless this layer is soloed too, and the time must be between the i n Poi nt and out Poi nt of this layer. Parameters t i me The time, in seconds. AVLayer audioEnabled attribute app. This value corresponds to the audio toggle switch in the Timeline panel. AVLayer autoOrient attribute app.
AVLayer blendingMode attribute app. One of: Blendi ngMo de. ADD Blendi ngMo de. HU E Ble ndi ngMo d e. Parameters p oi nt Top L e f t The top left point coordinates in the form of an array, [x , y, z]. Returns An Object with the transformation properties set. AVLayer effectsActive attribute app. AVLayer environmentLayer attribute app. Setting this attribute to true automatically makes the layer 3D t hre e DL aye r becomes true. AVLayer frameBlending attribute app.
AVLayer frameBlendingType attribute app. AVLayer hasAudio attribute app. AVLayer hasTrackMatte attribute app. When true, this layer's t r a ck- Matte Typ e value controls how the matte is applied. AVLayer height attribute app. Type Floating-point; read-only. In this case, layer. False if the layer has an expressly set name, or if the layer does not have a source. AVLayer isTrackMatte attribute app.
AVLayer motionBlur attribute app. AVLayer openInViewer method app. Returns Viewer object for the Layer panel, or null if the layer could not be opened e. AVLayer quality attribute app. Note that this feature can be resource-intensive; if replacing a large amount of footage, do this only at the end of the operation. AVLayer source attribute app. The value is null in a Text layer. Use AV L ayer. Type AVItem object; read-only.
Use, for example, to write text that is properly aligned to the baseline. Parameters t i me T The time index, in seconds. Extents apply to shape layers, increasing the size of the layer bounds as necessary. Returns A JavaScript object with four attributes, [ top, l e f t , w i dt h , he i g ht ]. AVLayer threeDLayer attribute app. Applies only to text layers. AVLayer timeRemapEnabled attribute app. One of: Tra ck Matt e Ty p e.
All methods and attributes of Layer are available when working with CameraLayer. 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. Methods [] Retrieves an object in the collection by its index number. The first object is at index 1. All methods and attributes of AVItem and Item, in addition to those listed below, are available when working with CompItem. 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. The value is null if the composition contains no enabled camera layers. Type CameraLayer object; read-only. 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. CompItem displayStartTime attribute app. CompItem draft3d attribute app. This corresponds to the value of the Draft 3D button in the Composition panel.
CompItem dropFrame attribute app. When false, indicates non-drop-frame timecode. This corresponds to the setting in the Composition Settings dialog box. CompItem duplicate method app. Returns CompItem object. CompItem frameBlending attribute app.
Corresponds to the value of the Frame Blending button in the Composition panel. CompItem frameDuration attribute app. This is the inverse of the f rame R ate value frames-per-second.
CompItem hideShyLayers attribute app. When false, all layers are visible, including those whose shy value is true. CompItem layer method app. An integer in the range [ The rel Ind e x value is added to the index value of this layer to find the position of the desired layer. An integer in the range [1—ot he r- L aye r. This value is added to the ot he r L aye r value to derive the absolute index of the layer to return.
Returns Layer object. CompItem layers attribute app. Type LayerCollection object; read-only. CompItem motionBlur attribute app. Corresponds to the value of the Motion Blur button in the Composition panel. CompItem numLayers attribute app. CompItem openInViewer method app. Returns Viewer object for the Composition panel, or null if the composition could not be opened. CompItem preserveNestedFrameRate attribute app.
CompItem renderer attribute app. Allowed values are the members of c omp Ite m. CompItem renderers attribute app. 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. 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 [ This is a 0-based array the first object is at index 0. Type Array of Layer objects; read-only.
CompItem selectedProperties attribute app. The first property is at index position 0. Type Array of Property and PropertyGroup objects; read-only. CompItem shutterAngle attribute app. This corresponds to the Shutter Angle setting in the Advanced tab of the Composition Settings dialog box.
CompItem shutterPhase attribute app. This corresponds to the Shutter Phase setting in the Advanced tab of the Composition Settings dialog box. Type Integer in the range [— CompItem workAreaDuration attribute app. This is the difference of the start-point and end-point times of the Composition work area.
CompItem workAreaStart attribute app. All methods and attributes of FootageSource, in addition to those listed below, are available when working with FileSource. FileSource file attribute app. Type File object; read-only. FileSource missingFootagePath attribute app. This method can be called only on a mainS ource , not a prox yS ou rce. It can contain various types of items footage, compositions, solids as well as other folders. FolderItem item method app.
Parameters index An integer, the position index of the item to retrieve. The first item is at index 1. Returns Item object. 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. If the folder contains another folder, only the FolderItem for that folder is counted, not any subitems contained in it. Type Integer; read only. All methods and attributes of AVItem and Item, in addition to those listed below, are available when working with FootageItem.
Otherwise it is null. Type File object; read only. The attribute is read-only. FootageItem openInViewer method app. NOTE: Missing and placeholder footage can be opened using this method, but cannot manually via double- clicking it. Returns Viewer object for the Footage panel, or null if the footage could not be opened. FootageItem replace method app. In addition to loading the file, the method creates a new FileSource object for the file and sets mainS ource to that object.
The method preserves interpretation parameters from the previous m a i n S ou rc e object. If the specified file has an unlabeled alpha channel, the method estimates the alpha interpretation. FootageItem replaceWithPlaceholder method app. Creates a new PlaceholderSource object, sets its values from the parameters, and sets m a i n S ou rc e to that object.
Parameters name A string containing the name of the placeholder. FootageItem replaceWithSequence method app. In addition to loading the file, the method creates a new FileSource object for the file and sets m ai nS ou rc e to that object. Parameters file An ExtendScript File object for the first file in the sequence to be used as the footage main source. FootageItem replaceWithSolid method app. Creates a new SolidSource object, sets its values from the parameters, and sets m ai n S ou rc e to that object.
If hasAlpha is false, this attribute has no relevant meaning. One of: A lp ha Mo de. If set to 0, the n at ive Fr ame R ate is used instead. It is an error to set this value if Fo ot ageS ou rc e. OF F, then this is automatically set to the value of nat ive FrameR ate. FootageSource displayFrameRate attribute app. 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 d S e p arat i onTy p e.
If hasA lpha is false, no change is made. FootageSource guessPulldown method app. If i s St i l l is true, no change is made. Parameters met ho d The method to use for estimation. In this case, the attributes a lpha Mo d e , i nve r t A lpha , and pre mu l C ol or have valid values. When false, those attributes have no relevant meaning for the footage.
FootageSource highQualityFieldSeparation attribute app. FootageSource invertAlpha attribute app. This attribute is valid only if an alpha is present. If h asA lp ha is false, or if a lpha Mo d e is A lp haMo de. FootageSource isStill attribute app. 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.
FootageSource nativeFrameRate attribute app. FootageSource premulColor attribute app. This attribute is valid only if the a lpha Mo d e is a lph aMo d e. Type Array of three floating-point values [ R , G , B ] , in the range [0. FootageSource removePulldown attribute app. It is an error to attempt to set this to a value other than P u l l d ow nPhas e. Remove Pu l l dow n. 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 mp or t Fi l e method. For example: n e w Imp or t O pt i ons.
If this method returns true, you can set the given type as the value of the i mp or t As attribute. Parameters t yp e The type of file that can be imported. If a file is set in the constructor, you can access it through this attribute.
ImportOptions forceAlphabetical attribute imp or tO pti on s. ImportOptions importAs attribute imp or tO pti on s. Before setting, use c an Imp or t As to check that a given file can be imported as the source of the given object type. One of: Imp or t AsTy p e. 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. The comment is for the user's purpose only; it has no effect on the item's appearance or behavior. Item id attribute app. 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. Item label attribute app. Colors are represented by their number 0 for None, or 1 to 16 for one of the preset colors in the Labels preferences.
Custom label colors cannot be set programmatically. Item name attribute app. Item parentFolder attribute app. If this item is at the top level of the project, this is the project's root folder app. Example This script creates a new FolderItem in the Project panel and moves compositions into it.
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. Item selected attribute app. Multiple items can be selected at the same time. Set to true to select the item programmatically, or to false to deselect it. Item typeName attribute app. 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. All methods and attributes of Collection, in addition to those listed below, are available when working with ItemCollection. Creates and returns a new CompItem object and adds it to this collection. Parameters name A string containing the name of the composition. ItemCollection addFolder method app.
Creates and returns a new FolderItem object and adds it to this collection. Parameters name A string containing the name of the folder. Returns FolderItem object. The constructor creates a KeyframeEase object. Both parameters are required. Sets the sp e e d attribute. Sets the i n f lu e n c e attribute.
Example This example assumes that the Position, a spatial property, has more than two keyframes. KeyframeEase influence attribute myKe y. The units depend on the type of keyframe, and are displayed in the Keyframe Velocity dialog box.
Layers contain AE properties, in addition to their JavaScript attributes and methods. 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. Layer active attribute app. For this to be true, the layer must be enabled, no other layer may be soloing unless this layer is soloed too, and the time must be between the i n Poi nt and out Poi nt values of this layer.
This value is never true in an audio layer; there is a separate au d i oAc t ive attribute in the AVLayer object. Layer activeAtTime method app. 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 n Poi nt and out Poi nt values of this layer.
Layer applyPreset method app app. Predefined animation preset files are installed in the Presets folder, and users can create new animation presets through the user interface.
Layer comment attribute app. Layer containingComp attribute app. Type CompItem object; read-only. 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 aye rs collection in the target CompItem. Retrieve the copy using into C omp. Copying in a layer changes the index positions of previously existing layers in the target composition. This is the same as copying and pasting a layer through the user interface.
Parameters i ntoC omp The target composition, and CompItem object. Layer duplicate method app. Creates a new Layer object in which all values are the same as in this one.
Layer enabled attribute app. This corresponds to the video switch state of the layer in the Timeline panel. Layer hasVideo attribute app. Layer index attribute app. Layer inPoint attribute app. Type Floating-point value in the range [ Layer isNameSet attribute app. Layer locked attribute app.
This corresponds to the lock toggle in the Layer panel. Layer moveAfter method app. Layer moveBefore method app. Parameters l aye r The target layer, a layer object in the same composition. Layer moveToBeginning method app. Layer moveToEnd method app. 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. Layer nullLayer attribute app. Layer outPoint attribute app.
Layer parent attribute app. 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 degrees.
To set the parent without changing the child layer's transform values, use the s e t Pare nt Wit h Ju mp method. Layer selectedProperties attribute app. Type Array of PropertyBase objects; read-only. Layer setParentWithJump method app. If you do not want the child layer to jump, set the p are nt attribute directly. In this case, an offset is calculated and set in the child layer's transform fields, to prevent the jump from occurring.
Parameters n e w Pa re nt Optional, a layer object in the same composition. If not specified, it sets the parent to None. Layer shy attribute app. Layer solo attribute app. Layer startTime attribute app. Layer stretch attribute app. A value of means no stretch. Values between 0 and 1 are set to 1, and values between -1 and 0 not including 0 are set to Layer time attribute app.
Type Floating-point value; read-only. 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.
All methods and attributes of Collection, in addition to those listed below, are available when working with LayerCollection. 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.
This method generates an exception if the item cannot be added as a layer to this CompItem. Parameters ite m The AVItem object for the item to be added. Used only if the item contains a piece of still footage. Has no effect on movies, sequences or audio. If supplied, sets the du r at i on value of the new layer.
Otherwise, the duration value is set according to user preferences. By default, this is the same as the duration of the containing CompItem. Returns AVLayer object. LayerCollection addBoxText method app. To create a point text layer, use the a dd Te x t method. Parameters s ou rc e Te xt Optional; a string containing the source text of the new layer, or a TextDocument object contain- ing the source text of the new layer. Returns TextLayer object. LayerCollection addCamera method app. Parameters name A string containing the name of the new layer.
The z value is set to 0. Returns CameraLayer object. LayerCollection addLight method app. Returns LightLayer object. LayerCollection addNull method app. Parameters du r at i on Optional, the length of a still layer in seconds, a floating-point value.
Otherwise, the du r at i on value is set according to user preferences. LayerCollection addShape method app. Use the ShapeLayer object to add properties, such as shape, fill, stroke, and path filters. Tools automatically add a vector group that includes Fill and Stroke as specified in the tool options. Returns ShapeLayer object. LayerCollection addSolid method app. Creates a new AVLayer object, sets the new FootageItem as its s ou rc e , and adds the layer to this collection. Parameters c ol or The color of the solid, an array of three floating-point values, [R, G, B], in the range [0.
LayerCollection addText method app. To create a paragraph box text layer, use the a dd B oxTe x t method. LayerCollection byName method app. Parameters name A string containing the name. Returns Layer object or null. LayerCollection precompose method app. It removes the individual layers from this collection, and adds the new CompItem to this collection. Parameters l aye r Indi c e s The position indexes of the layers to be collected.
An array of integers. When true the default , retains all attributes in the new composition. You can only set this to false if there is just one index in the l aye r Ind i ce s array.
All methods and attributes of Layer are available when working with Light- Layer. LightLayer lightType attribute app. Trying to set this attribute for a non-light layer produces an error. Create it with the constructor; all arguments except com me nt are optional. All arguments are strings that set in the corre- sponding attributes of the returned MarkerValue object, except p ar ams. This is an array containing key-value pairs. 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 Marke r AE property of the layer: laye rO bj ec t.
Chapter links initiate a jump to a chapter in a QuickTime movie or in other formats that support chapter marks. MarkerValue comment attribute app. This comment appears in the Timeline panel next to the layer marker.
MarkerValue cuePointName attribute app. MarkerValue duration attribute app. The duration appears in the Timeline panel as a short bar extending from the marker location. MarkerValue frameTarget attribute app. Together with the URL value, this targets a specific frame within a Web page.
MarkerValue getParameters method app. MarkerValue setParameters method app. A cue point can have any number of parameters, but you can add only three through the user interface; use this method to add more than three parameters.
Parameters ke y Va lu e Pai rs An object containing the key-value pairs as attributes and values. This URL is an automatic link to a Web page. All methods and attributes of PropertyBase and PropertyGroup, in addition to those listed below, are available when working with MaskPropertyGroup. Type Array of three floating-point values, [R, G, B], in the range [0. MaskPropertyGroup inverted attribute app. MaskPropertyGroup maskFeatherFalloff attribute app.
One of: Mask Mo de. A DD Mask Mo de. One of: Mas k Mot i on Blu r. ON Mask Mot i on Blu r. 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. All methods and attributes of Collection are available when working with OMCollection. Parameters te mpl ate Name A string containing the name of the template to be applied. OutputModule name attribute app. OutputModule postRenderAction attribute app. OutputModule saveAsTemplate method app. Parameters name A string containing the name of the new template.
OutputModule templates attribute app. PlaceholderSource is a subclass of FootageSource. All methods and attributes of FootageSource are available when working with PlaceholderSource. PlaceholderSource does not define any additional methods or attributes. 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. Type Item object or null; read-only. Project autoFixExpressions method app. Parameters oldText The text to replace. Project bitsPerChannel attribute app. Project close method app. Parameters clos e O pt ions Action to be performed on close.
Cl os eO pt ions. 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. Returns Integer; the total number of footage items removed. Project feetFramesFilmType attribute app.
Use this attribute instead of the old t i me c o d e Fi l mTyp e attribute. M M 3 5 Project file attribute app. Type File object or null if project has not been saved; read-only. Project footageTimecodeDisplayStartType attribute app. Project framesUseFeetFrames attribute app. Project importFile method app.
Parameters i mp or t O pt i ons An ImportOptions object specifying the file to import and the options for the operation. Returns FootageItem object. Returns Array of Item objects created during import; or null if the user cancels the dialog box. Project importPlaceholder method app. Returns PlaceholderItem object. Project item method app. Parameters index The index position of the item, an integer. Project items attribute app. Project linearBlending attribute app. Project numItems attribute app.
Returns Integer; the total number of items removed. Returns Integer; the total number of FootageItem objects removed. Project renderQueue attribute app. Type RenderQueue object; read-only. Project rootFolder attribute app. Type FolderItem object; read-only. Project save method app. 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. An ExtendScript File object for the file to save. The user can name a file with a location and save the project, or click Cancel to exit the dialog box. Returns Boolean; true if the project was saved. Project selection attribute app. Type Array of Item objects; read-only. Project showWindow method app. Parameters d o Show When true, show the Project panel.
When false, hide the Project panel. Project timeDisplayType attribute app. One of: Ti me Di spl ay Typ e. Project xmpPacket attribute app. Example The following example code accesses the XMP metadata of the current project, and modifies the Label project metadata field.
An AE property is an value, often animatable, of an effect, mask, or transform within an individual layer. All methods and attributes of PropertyBase, in addition to those listed below, are available when working with Property.
Rotation properties are stored as a OneD value. Parameters t i me The time, in seconds, at which to add the keyframe. The beginning of the composition is 0. Returns Integer; the index of the new keyframe or marker.
Property canSetExpression attribute app. Property dimensionsSeparated attribute app. Property expression attribute app. Writeable only when c an S e t E xpre s s i on for the named property is true. When you specify a value for this attribute, the string is evaluated.
Property expressionEnabled attribute app. When false, the keyframe information or static value of the property is used. This attribute can be set to true only if c an S e t E xpre ss i on for the named property is true and e x pre ss i on contains a valid expression string. Property expressionError attribute app. If no expression string has been specified, or if the last expression string evaluated without error, contains the empty string "".
Property getSeparationFollower method app. For example, you can use this method on the Position property to access the separated X Position and Y Position properties. Parameters dim The dimension number starting at 0. Returns Property object, or an error if the property is not multidimensional or does not have the specified dimension.
Property hasMax attribute app. Property hasMin attribute app. Property isInterpolationTypeValid method app. Property isSeparationFollower attribute app. For example, the X Position property has this attribute set to true. Property isSeparationLeader attribute app. For example, the Position property has this attribute set to true.
Examples are position and effect point controls. Property isTimeVarying attribute app. When this attribute is true, the attribute c an Var y O ve r Ti m e must also be true. Property keyInInterpolationType method app. Parameters ke y Ind e x The index for the keyframe. Property keyInTemporalEase method app. TwoD , the array contains 2 objects. T h re e D , the array contains 3 objects. Property keyOutInterpolationType method app. Property keyOutTemporalEase method app.
Property keyRoving method app. The first and last keyframe in a property cannot rove; if you try to set roving for one of these, the operation is ignored, and ke yR ov ing continues to return false.
Property keySelected method app. Property keySpatialAutoBezier method app. This type of interpolation affects this keyframe only if ke y Sp at i a l C ont i nu ou s ke yInde x is also true. Property keySpatialContinuous method app. Property keyTemporalAutoBezier method app. Temporal auto-Bezier interpolation affects this keyframe only if the keyframe interpolation type is Ke y f ra - meInter p ol at ionTyp e.
Property keyTemporalContinuous method app. Temporal continuity affects this keyframe only if keyframe interpolation type is Ke y f rame Inte r p ol a- t i onTyp e. Property keyTime method app. Returns Floating-point value. Property keyValue method app. If no keyframe or marker can be found that matches the argument, this method generates an exception, and an error is displayed.
Returns Floating-point value for keyframes, MarkerValue object for markers. Property maxValue attribute app. If the h a s Ma x attribute is false, an exception occurs, and an error is generated. Property minValue attribute app. If the hasMin attribute is false, an exception occurs, and an error is generated.
Property nearestKeyIndex method app. Parameters t i me The time in seconds; a floating-point value. Returns Integer. Property numKeys attribute app. If the value is 0, the property is not being keyframed. Property propertyIndex attribute app. The first property is at index position 1. Property propertyValueType attribute app.
The Prop e r t yVa lu e Ty p e enumeration has one value for each type of data that can be stored in or retrieved from a property. Each type of data is stored and retrieved in a different kind of structure. All property objects store data according to one of these categories. For example, a 3D spatial property such as a layer's position is stored as an array of three floating point values. When setting a value for position, pass in such an array, as follows: my l aye r.
For example, an Anchor Point value might be [ T h re e D Array of three floating-point quantitative values. For example, a Scale value might be [ Two D Array of 2 floating-point quantitative values. For example, a Scale value might be [5. O n eD A floating-point value. For example, [0. Property removeKey method app. 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. Property selectedKeys attribute app. If no keyframes are selected, or if the property has no keyframes, returns an empty array.
Type Array of integers; read-only. Property separationDimension attribute app. The first dimension starts at 0. For example, the Y Position property has a s e p ar at i on D i m e n s i on value of 1; X Position has a value of 0.
Property separationLeader attribute app. Type Property object; read-only. Property setInterpolationTypeAtKey method app. Property setRovingAtKey method app.