background image

182

After Effects Object Summary

 

182 

  i n v e r t A l p h a   :   b o o l e a n   :   r e a d / w r i t e

  i s S t i l l  :   b o o l e a n   :   r e a d O n l y

  l o o p   :  i n t e g e r   :   r e a d / w r i t e

  m i s s i n g F o o t a g e P a t h   :   s t r i n g   :   r e a d O n l y

  n a t i v e F r a m e R a t e   :   f l o a t   :   r e a d O n l y

  p r e m u l C o l o r   :   A r r a y   o f   f l o a t   :   r e a d / w r i t e

  r e l o a d ( )   n o   r e t u r n

  r e m o v e P u l ld o w n   :   P u l l d o w n P h a s e   :   r e a d O n l y

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

F o l d e r I t e m   o b j e c t

- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -

  c o m m e n t   :   s t r i n g   :   r e a d / w r i t e

  i d   :   i n t e g e r   :   r e a d O n l y

  i t e m ( in t e g e r   i t e m I n d e x )   r e t u r n s   I t e m

  i t e m s   :   I t e m C o l l e c t i o n   :   r e a d O n l y

  n a m e   :   s t r i n g   :   r e a d / w r it e

  n u m I t e m s   :   in t e g e r   :   r e a d O n l y

  p a r e n t F o l d e r   :   F o l d e r I t e m   :   r e a d / w r i t e

  r e m o v e ( )   n o   r e t u r n

  s e l e c t e d   :   b o o l e a n   :   r e a d / w r i t e

  t y p e N a m e   :   s t r i n g   :   r e a d O n l y

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

F o o t a g e I t e m   o b j e c t

- - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -

  c o m m e n t   :   s t r i n g   :   r e a d / w r i t e

  d u r a t i o n   :   f l o a t   :   r e a d O n l y

  f i l e   :   F i l e   :   r e a d O n l y

  f o o t a g e M i s s i n g   :   b o o l e a n   :   r e a d O n l y

  f r a m e D u r a t i o n   :   f l o a t   :   r e a d O n l y

  f r a m e R a t e   :   f l o a t   :   r e a d O n l y

  h a s A u d i o   :   b o o le a n   :   r e a d O n l y

  h a s V i d e o   :   b o o l e a n   :   r e a d O n l y

  h e i g h t   :   i n t e g e r   :   r e a d / w r i t e

  i d   :   i n t e g e r   :   r e a d O n l y

  m a i n S o u r c e   :   F o o t a g e S o u r c e   :   r e a d O n l y

  n a m e   :   s t r i n g   :   r e a d / w r it e

  p a r e n t F o l d e r   :   F o l d e r I t e m   :   r e a d / w r i t e

  p i x e l A s p e c t   :   f l o a t   :   r e a d / w r i t e

  p r o x y S o u r ce   :   F o o t a g e S o u r c e   :   r e a d O n l y

  r e m o v e ( )   n o   r e t u r n

  r e p l a c e ( F i l e   p r o x y F i l e )   n o   r e t u r n

  r e p l a c e W i t h P l a c e h o l d e r ( s t r i n g   n a m e ,   i n t e g e r   w i d t h ,   i n t e g e r   h e i g h t ,   f l o a t   f r a m e R a t e ,   f l o a t   d u r a t i o n )  

n o   r e t u r n

  r e p l a c e W i t h S e q u e n c e ( F i l e   p r o x y F i le ,   b o o l e a n   f o r c e A l p h a b e t i c a l )   n o   r e t u r n

  r e p l a c e W i t h S o l i d ( A r r a y O f F l o a t   c o l o r ,   s t r i n g   n a m e ,   i n t e g e r   w i d t h ,   i n t e g e r   h e i g h t ,   f l o a t   p i x e l A s p e c R a t i o )  

n o   r e t u r n

  s e l e c t e d   :   b o o l e a n   :   r e a d / w r i t e

  s e t P r o x y( F i l e   p r o x y F i l e )   n o   r e t u r n

  s e t P r o x yT o N o n e ( )   n o   r e t u r n

  s e t P r o x yW i t h P l a c e h o l d e r ( s t r i n g   n a m e ,   i n t e g e r   w i d t h ,   i n t e g e r   h e i g h t ,   f l o a t   f r a m e R a t e ,   f l o a t   d u r a t i o n )  

n o   r e t u r n

Summary of Contents for 65009963 - After Effects CS4

Page 1: ...SCRIPTING GUIDE...

Page 2: ...other countries Apple Mac Macintosh and Mac OS are trademarks of Apple Computer Inc registered in the United States and other countries Microsoft and Windows are either registered trademarks or tradem...

Page 3: ...Watch Folder is less powerful and less convenient to set up See Examples on page 173 for examples of what scripts can do If you are new to scripting see Adobe Introduction to Scripting which introduce...

Page 4: ...of a property an animatable value of an effect mask or transform within an individual layer Expressions Although both After Effects expressions and the After Effects scripting interface use JavaScript...

Page 5: ...r displaying short messages in dialog boxes alert confirm and prompt Interapplication Communication ExtendScript provides a common scripting environment for all Adobe applications and allows interappl...

Page 6: ...application file Only scripts contained in this Scripts folder when the application starts are automatically listed in the Scripts menu although a script file can reside anywhere To run a script that...

Page 7: ...nel var myToolsPanel createUI this myToolsPanel show You cannot use the File Scripts Run Script File menu command to run a script that refers to this To make your script work with either a Window obje...

Page 8: ...file tell application Adobe After Effects CS3 DoScript theFile end tell Finally this script is perhaps most useful when you are working directly on editing a JSX script and want to send it to After Ef...

Page 9: ...ables Scripting shares a global environment so any script executed at startup can define variables and functions that are available to all scripts In all cases variables and functions once defined by...

Page 10: ...to matchthe expres sion s value to a case label this Standard JavaScript method of indicating the current object true Literal representing the boolean true value undefined Indicates that the variable...

Page 11: ...nt with subtract operation Assignment with multiply operation Assignment with divide operation Assignment with modulo division operation Assignment with bitwise left shift operation Assignment with bi...

Page 12: ...left to right subtraction 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 Opera...

Page 13: ...by object you can refer to the following diagrams for an overview of where the various objects fall within the hierarchy and their correspon dence to the user interface Hierarchy diagram of the main...

Page 14: ...betically with links to the documentation page for each Object Description Global functions on page 16 Globally available functions that allowyou to display text for script debugging purposes and help...

Page 15: ...utput modules in a render queue OutputModule object on page 105 Represents an output module for a render queue PlaceholderSource object on page 108 Describes a placeholder for footage Project object o...

Page 16: ...tFormatToTime global function currentFormatToTime formattedTime fps isDuration Description Converts a formatted string for a frame time value to a number of seconds given a specified frame rate For ex...

Page 17: ...e counted from the project s starting frame see Project displayStartFrame attribute on page 111 Parameters Returns String in the project s current time display format write global function write text...

Page 18: ...global function writeLn text Description Writes output to the Info panel and adds a line break at the end Parameters Returns Nothing Example writeln This text appears on first line writeln This text...

Page 19: ...ication buildNumber Application buildNumber attribute on page 22 The number of this build of the application isWatchFolder Application isWatchFolder attribute on page 24 When true the local applicatio...

Page 20: ...tion beginUndoGroup method on page 21 Groups the actions that follow it into a single undoable step endUndoGroup Application endUndoGroup method on page 22 Ends an undo group needed only when a script...

Page 21: ...cally group all of its actions as a single undoable action for use with the Edit Undo Redo menu items Use the endUndoGroup method to mark the end of the group See Application endUndoGroup method on pa...

Page 22: ...method only if beginSuppressDialogs has previously been called See Application beginSuppress Dialogs method on page 21 Parameters Returns Nothing Application endUndoGroup method app endUndoGroup Descr...

Page 23: ...page 24 Application exitAfterLaunchAndEval attribute app exitAfterLaunchAndEval Description This attribute is used only when executing a script from a command line on Windows When the application is...

Page 24: ...nning of each script evalu ation In the event of an error while the script is running the script can set this to a positive integer that indicates what error occurred Type Integer read write Example a...

Page 25: ...y used by this application Type Number read only Application newProject method app newProject Description Creates a new project in After Effects replicating the File New New Project menu command If th...

Page 26: ...string and a severity string It should not return any value Type A function name string or null if no function is assigned read write Example function err errString alert errString app onError err App...

Page 27: ...ipt File object data majorVersion data minorVersion The ASE version number data values An array of SwatchValue SwatchValue type One of RGB CMYK LAB Gray SwatchValue r SwatchValue g SwatchValue b When...

Page 28: ...pes from memory Replicates the Purge options in the Edit menu Parameters Returns Nothing Application quit method app quit Description Quits the After Effects application Parameters None Returns Nothin...

Page 29: ...y Cache preferences area For both values if installed RAM is less than a given amount n gigabytes the value is a percentage of the installed RAM and is otherwise a percentage of n The value of n is 2...

Page 30: ...er Effects is running Type String read only Example var ver app version alert This machine is running version ver of After Effects Application watchFolder method app watchFolder folder_object_to_watch...

Page 31: ...31 JavaScript Reference Applicationobject 31 See also Application endWatchFolder method on page 23 Application parseSwatchFile method on page 27 Application isWatchFolder attribute on page 24...

Page 32: ...ribute on page 33 The frame duration for the item duration AVItem duration attribute on page 33 The total duration of the item useProxy AVItem useProxy attribute on page 38 When true a proxy source is...

Page 33: ...footage item s source file object See FootageItem mainSource attribute on page 65 and FileSource missingFootagePath attribute on page 60 Type Boolean read only AVItem frameDuration attribute app proj...

Page 34: ...ootageItem Type Floating point value in the range 1 0 99 0 read only for a FootageItem otherwise read write AVItem hasAudio attribute app project item index hasAudio Description When true the AVItem h...

Page 35: ...ixel aspect ratio of the item In a CompItem the value is linked to the composition In a FootageItem the value is linked to the mainSource object Certain pixelAspect values are specially known to After...

Page 36: ...Description Removes the proxy from this AVItem sets the value of proxySource to null and sets the value of useProxy to false Parameters None Returns Nothing AVItem setProxyWithPlaceholder method app p...

Page 37: ...ithSolid color name width height pixelAspect Description Creates a SolidSource object with specified values sets this as the value of the proxySource attribute and sets useProxy to true It does not pr...

Page 38: ...retrieval the array value is copied so it is not automatically updated If you get this value then add this item into another composition you must retrieve the value again to get an array that includes...

Page 39: ...xtLayer objects See TextLayer object on page 172 AE Properties Different types of layers have different AE properties AVLayer has the following properties and property groups Marker Time Remap Motion...

Page 40: ...a per character basis in this text layer canSetCollapseTransformation AVLayer calculateTransformFrom Points method on page 43 When true it is legal to change the value of collapseTransformation collap...

Page 41: ...s a track matte for the layer below it hasTrackMatte AVLayer hasTrackMatte attribute on page 45 When true the layer above is being used as a track matte on this layer quality AVLayer quality attribute...

Page 42: ...yer index audioEnabled Description When true the layer s audio is enabled This value corresponds to the audio toggle switch in the Timeline panel Type Boolean read write AVLayer autoOrient attribute a...

Page 43: ...SCENT_PREMUL BlendingMode LUMINOSITY BlendingMode MULTIPLY BlendingMode NORMAL BlendingMode OVERLAY BlendingMode PIN_LIGHT BlendingMode SATURATION BlendingMode SCREEN BlendingMode SILHOUETE_ALPHA Blen...

Page 44: ...change the value of the collapseTransformation attribute on this layer Type Boolean read only AVLayer canSetTimeRemapEnabled attribute app project item index layer index canSetTimeRemapEnabled Descrip...

Page 45: ...for the layer Type A FrameBlendingType enumerated value read write One of FrameBlendingType FRAME_MIX FrameBlendingType NO_FRAME_BLEND FrameBlendingType PIXEL_MOTION AVLayer guideLayer attribute app...

Page 46: ...index layer index isNameFromSource Description True if the layer has no expressly set name but contains a named source In this case layer name has the same value as layer source name False if the lay...

Page 47: ...eSource method app project item index layer index replaceSource newSource fixExpressions Description Replaces the source for this layer Parameters Returns Nothing AVLayer source attribute app project...

Page 48: ...ription True if this is a 3D layer Type Boolean read write AVLayer threeDPerChar attribute app project item index layer index threeDPerChar Description True if this layer has the Enable Per character...

Page 49: ...ecifies the way the track matte is applied Type A TrackMatteType enumerated value read write One of TrackMatteType ALPHA TrackMatteType ALPHA_INVERTED TrackMatteType LUMA TrackMatteType LUMA_INVERTED...

Page 50: ...r collection either by index number or by a name string CameraLayer is a subclass of Layer All methods and attributes of Layer are available when working with CameraLayer See Layer object on page 83 A...

Page 51: ...Objects Attributes Methods Object Reference Description ItemCollection ItemCollection object on page 79 All of the items imported files folders solids and so on found in the Project panel LayerCollec...

Page 52: ...kAreaStart attribute on page 59 The work area start time workAreaDuration CompItem workAreaDuration attribute on page 58 The work area duration numLayers CompItem numLayers attribute on page 56 The nu...

Page 53: ...mpled shutterAngle CompItem shutterAngle attribute on page 58 The camera shutter angle shutterPhase CompItem shutterPhase attribute on page 58 The camera shutter phase layers CompItem layers attribute...

Page 54: ...ion When true Draft 3D mode is enabled for the Composition panel This corresponds to the value of the Draft 3D button in the Composition panel Type Boolean read write CompItem duplicate method app pro...

Page 55: ...r otherLayer relIndex app project item index layer name Description Returns a Layer object which can be specified by name an index position in this layer or an index position relative to another layer...

Page 56: ...e composition Corresponds to the value of the Motion Blur button in the Composition panel Type Boolean read write CompItem numLayers attribute app project item index numLayers Description The number o...

Page 57: ...Allowed values are the members of compItem renderers Type String read write CompItem renderers attribute app project item index renderers Description The available rendering plugin modules Member str...

Page 58: ...tterAngle attribute app project item index shutterAngle Description The shutter angle setting for the composition This corresponds to the Shutter Angle setting in the Advanced tab of the Composition S...

Page 59: ...e CompItemobject 59 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 Floa...

Page 60: ...ySource of an AVItem call setProxy or setProxyWithSequence If this FileSource is a mainSource of a FootageItem call replace or replaceWithSequence Type File object read only FileSource missingFootageP...

Page 61: ...eobject 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 proxySourc...

Page 62: ...ndItem numItems i alert item number i within the folder is named secondItem item i name Attributes Methods FolderItem item method app project item index item Description Returns the top level item in...

Page 63: ...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...

Page 64: ...File object for the footage s source file If the FootageItem s mainSource is a FileSource this is the same as FootageItem mainSource file Otherwise it is null Type File object read only Attribute Ref...

Page 65: ...this FootageItem to the specified file In addition to loading the file the method creates a new FileSource object for the file and sets mainSource to that object In the new source object it sets the...

Page 66: ...Solid color name width height pixelAspect Description Changes the source of this FootageItem to the specified solid Creates a new SolidSource object sets its values from the parameters and sets mainSo...

Page 67: ...alpha channel in a footage clip or proxy should be inverted isStill FootageSource isStill attribute on page 70 When true footage is a still image fieldSeparationType FootageSource fieldSeparationType...

Page 68: ...is an error to set this value if FootageSource isStill is true It is an error to set this value to 0 if remove Pulldown is not set to PulldownPhase OFF If this is 0 when you set removePulldown to a v...

Page 69: ...OWER_FIELD_FIRST FootageSource guessAlphaMode method app project item index mainSource guessAlphaMode app project item index proxySource guessAlphaMode Description Sets alphaMode premulColor and inver...

Page 70: ...to set this attribute if isStill is true or if fieldSeparationType is FieldSeparationType OFF Type Boolean read write FootageSource invertAlpha attribute app project item index mainSource invertAlpha...

Page 71: ...m index mainSource premulColor app project item index proxySource premulColor Description The color to be premultiplied This attribute is valid only if the alphaMode is alphaMode PREMULTIPLIED Type Ar...

Page 72: ...se RemovePulldown WWWSS PulldownPhase RemovePulldown WWSSW PulldownPhase RemovePulldown WSSWW_24P_ADVANCE PulldownPhase RemovePulldown SSWWW_24P_ADVANCE PulldownPhase RemovePulldown SWWWS_24P_ADVANCE...

Page 73: ...his method returns true you can set the given type as the value of the importAs attribute See ImportOptions importAs attribute on page 74 Parameters Attributes Reference Description importAs ImportOpt...

Page 74: ...importOptions forceAlphabetical Description When true has the same effect as setting the Force alphabetical order option in the File Import File dialog box Type Boolean read write ImportOptions import...

Page 75: ...aScript Reference ImportOptionsobject 75 ImportOptions sequence attribute importOptions sequence Description When true a sequence is imported otherwise an individual file is imported Type Boolean read...

Page 76: ...app project item 2 if myFolder typeName Folder alert error second item is not a folder else var numInFolder myFolder numItems Always run loops backwards when deleting things for i numInFolder i 1 i v...

Page 77: ...reloaded However when you import this project into another project new IDs are assigned to all items in the imported project The ID is not displayed anywhere in the user interface Type Integer read o...

Page 78: ...d app project item index remove Description Deletes this item from the project and from the Project panel If the item is a FolderItem all the items contained in the folder are also removed from the pr...

Page 79: ...Folder is the root folder If the ItemCollection belongs to any other folder the new item s parentFolder is that FolderItem Parameters Returns CompItem object ItemCollection addFolder method app projec...

Page 80: ...see Item parentFolder attribute on page 77 Parameters Returns FolderItem object Example This script creates a new FolderItem in the Project panel and moves compositions into it create a new FolderIte...

Page 81: ...meEase 0 5 50 var easeOut new KeyframeEase 0 75 85 var myPositionProperty app project item 1 layer 1 property Position myPositionProperty setTemporalEaseAtKey 2 easeIn easeOut This example sets the Sc...

Page 82: ...eEaseobject 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...

Page 83: ...Layer name attribute on page 89 The name of the layer parent Layer parent attribute on page 89 The parent of this layer time Layer time attribute on page 91 The current time of the layer startTime La...

Page 84: ...true the layer s name has been explicitly set Method Reference Description remove Layer remove method on page 90 Deletes the layer from the composition moveToBeginning Layer moveToBeginning method on...

Page 85: ...sers can create new animation presets through the user interface Parameters Returns Nothing Layer comment attribute app project item index layer index comment Description A descriptive comment for the...

Page 86: ...project item index layer index duplicate Description Duplicates the layer Creates a new Layer object in which all values are the same as in this one This has the same effect as selecting a layer in t...

Page 87: ...0 minus or plus three hours read write Layer isNameSet attribute app project item index layer index isNameSet Description True if the value of the name attribute has been set explicitly rather than a...

Page 88: ...od app project item index layer index moveToBeginning Description Moves this layer to the topmost position of the layer stack the first layer Parameters None Returns Nothing Layer moveToEnd method app...

Page 89: ...int Description The out point of the layer expressed in composition time seconds Type Floating point value in the range 10800 0 10800 0 minus or plus three hours read write Layer parent attribute app...

Page 90: ...ets the parent of this layer to the specified layer without changing the transform values of the child layer There may be an apparent jump in the rotation translation or scale of the child layer as th...

Page 91: ...int value in the range 10800 0 10800 0 minus or plus three hours read write Layer stretch attribute app project item index layer index stretch Description The layer s time stretch expressed as a perce...

Page 92: ...length var anAVItem app project item 2 layerCollection add anAVItem alert number of layers after is layerCollection length Methods Method Reference Description add LayerCollection add method on page...

Page 93: ...ion Parameters item The AVItem object for the item to be added duration Optional the length of a still layer in seconds a floating point value Used only if the item contains a piece of still footage H...

Page 94: ...r object LayerCollection addSolid method app project item index layers addSolid color name width height pixelAspect duration Description Creates a new SolidSource object with values set as specified s...

Page 95: ...r in the range 4 30000 height The height of the solid in pixels an integer in the range 4 30000 pixelAspect The pixel aspect ratio of the solid a floating point value in the range 0 01 100 0 duration...

Page 96: ...ion Parameters Returns CompItem object layerIndices The position indexes of the layers to be collected An array of integers name The name of the new CompItem object moveAllAttributes Optional When tru...

Page 97: ...index number or by a name string LightLayer is a subclass of Layer All methods and attributes of Layer are available when working with Light Layer See Layer object on page 83 AE Properties LightLayer...

Page 98: ...at the 2 second mark var myMarker new MarkerValue Fade Up myLayer property Marker setValueAtTime 2 myMarker To get comment values from a particular marker var commentOfFirstMarker app project item 1...

Page 99: ...rt chapter marks Type String read write MarkerValue comment attribute app project item index layer index property Marker keyValue index comment Description A text comment for this marker This comment...

Page 100: ...g each parameter name containing that parameter s value MarkerValue setParameters method app project item index layer index property Marker keyValue index setParameters keyValuePairs Description Assoc...

Page 101: ...01 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 automati...

Page 102: ...and Timeline panel Type Array of three floating point values R G B in the range 0 0 1 0 read write MaskPropertyGroup inverted attribute app project item index layer index mask index inverted Descripti...

Page 103: ...numerated value read write One of MaskMode NONE MaskMode ADD MaskMode SUBTRACT MaskMode INTERSECT MaskMode LIGHTEN MaskMode DARKEN MaskMode DIFFERENCE MaskPropertyGroup maskMotionBlur attribute app pr...

Page 104: ...er queue The collection provides access to the OutputModule objects but does not provide any additional functionality The first OutputModule object in the collection is at index position 1 See OutputM...

Page 105: ...ject for the file this output module is set to render Attribute Reference Description file OutputModule file attribute on page 105 The path and name of the file to be rendered postRenderAction OutputM...

Page 106: ...be performed when the render operation is completed Type A PostRenderAction enumerated value read write one of postRenderAction NONE postRenderAction IMPORT postRenderAction IMPORT_AND_REPLACE_USAGE...

Page 107: ...odule templates attribute app project renderQueue item index outputModules index templates Description The names of all output module templates availalbe in the local installation of After Effects Typ...

Page 108: ...urce Description The PlaceholderSource object describes the footage source of a placeholder PlaceholderSource is a subclass of FootageSource All methods and attributes of FootageSource are available w...

Page 109: ...e thumbnail views use the transpar ency checkerboard pattern timecodeDisplayType Project timecodeDisplayType attribute on page 116 The way the timecode is displayed timecodeBaseType Project timecodeBa...

Page 110: ...educeProject method on page 114 Reduces the project to a specified set of items close Project close method on page 111 Closes the project with normal save options save Project save method on page 115...

Page 111: ...he file has not been previously saved the user is prompted and the user cancels the save Project consolidateFootage method app project consolidateFootage Description Consolidates all footage in the pr...

Page 112: ...rtFile method app project importFile importOptions Description Imports the file specified in the specified ImportOptions object using the specified options Same as the File Import File command Creates...

Page 113: ...ems Description All of the items in the project Type ItemCollection object read only Project linearBlending attribute app project linearBlending Description True if linear blending should be used for...

Page 114: ...from the project except those specified Same as the File Reduce Project command Parameters Returns Integer the total number of items removed Example var theItems new Array theItems theItems length ap...

Page 115: ...tem object read only Project save method app project save app project save file Description Saves the project The same as the File Save or File Save As command If the project has never previously been...

Page 116: ...ct panel Parameters Returns Nothing Project timecodeBaseType attribute app project timecodeBaseType Description The Timecode Base option as set in the Project Settings dialog box Type A TimecodeBaseTy...

Page 117: ...option in the Project Settings dialog box Type A TimecodeFilmType enumerated value read write One of TimecodeFilmType MM16 TimecodeFilmType MM35 Project timecodeNTSCDropFrame attribute app project tim...

Page 118: ...e is a minimum permitted value hasMax Property hasMax attribute on page 123 When true there is a maximum permitted value minValue Property minValue attribute on page 130 The minimum permitted value ma...

Page 119: ...at which a condition occurs keyValue Property keyValue method on page 130 Gets the value of a keyframe at the time at which a condition occurs addKey Property addKey method on page 122 Adds a new key...

Page 120: ...Property keyTemporalContinuous method on page 129 Reports whether a keyframe has tem poral continuity setTemporalAutoBezierAtKey Property setTemporalAutoBezierAtKey method on page 135 Sets whether a...

Page 121: ...e animation is 10 seconds and the middle keyframe is at the 5 second mark Rotation properties are stored as a OneD value myProperty myLayer rotation myProperty setValueAtTime 0 0 myProperty setValueAt...

Page 122: ...Expression Description When true the named property is of a type whose expression can be set by a script See also Property expression attribute on page 122 Type Boolean read only Property canVaryOverT...

Page 123: ...ute can be set to true only if canSetExpression for the named property is true and expression contains a valid expression string Type Boolean read write Property expressionError attribute app project...

Page 124: ...e position and effect point controls Type Boolean read only Property isTimeVarying attribute app project item index layer index propertySpec isTimeVarying Description When true the named property is t...

Page 125: ...item index layer index propertySpec keyInSpatialTangent keyIndex Description Returns the incoming spatial tangent for the specified keyframe if the named property is spacial that is the value type is...

Page 126: ...eyIndex Description Returns the outgoing interpolation type for the specified keyframe Parameters Returns A KeyframeInterpolationType enumerated value one of KeyframeInterpolationType LINEAR KeyframeI...

Page 127: ...TIAL the array contains 2 objects If the property value type is PropertyValueType ThreeD_SPATIAL the array contains 3 objects For any other value type the array contains 1 object Property keyRoving me...

Page 128: ...her TwoD_SPATIAL nor ThreeD_SPATIAL an exception is generated Parameters Returns Boolean Property keySpatialContinuous method app project item index layer index propertySpec keySpatialContinuous keyIn...

Page 129: ...ionType BEZIER for both keyInInterpolation keyIndex and keyOutInterpolation keyIndex Parameters Returns Boolean Property keyTime method app project item index layer index propertySpec keyTime keyIndex...

Page 130: ...project item index layer index propertySpec maxValue Description The maximum permitted value of the named property If the hasMax attribute is false an exception occurs and an error is generated Type F...

Page 131: ...tyValueType attribute app project item index layer index propertySpec propertyValueType Description The type of value stored in the named property The PropertyValueType enumeration has one value for e...

Page 132: ...ue might be 10 0 20 2 0 0 PropertyValueType ThreeD Array of three floating point quantitative values For example a Scale value might be 100 0 20 2 0 0 PropertyValueType TwoD_SPATIAL Array of 2 floatin...

Page 133: ...he first and last keyframe in a property cannot rove if you try to set roving for one of these the operation is ignored and keyRoving continues to return false If the property value type is neither Tw...

Page 134: ...s generated Parameters Returns Nothing Property setSpatialContinuousAtKey method app project item index layer index propertySpec setSpatialContinuousAtKey keyIndex newVal Description Turns spatial con...

Page 135: ...ge 1 numKeys as returned by the addKey or nearest KeyIndex method newVal True to turn spatial continuity on false to turn it off keyIndex The index for the keyframe An integer in the range 1 numKeys a...

Page 136: ...e keyframe An integer in the range 1 numKeys as returned by the addKey or nearest KeyIndex method newVal True to turn temporal continuity on false to turn it off keyIndex The index for the keyframe An...

Page 137: ...rates an exception and displays an error Parameters Returns Nothing Property setValueAtTime method app project item index layer index propertySpec setValueAtTime time newValue Description Sets the val...

Page 138: ...e is expressed Type String read only Property value attribute app project item index layer index propertySpec value Description The value of the named property at the current time If expressionEnabled...

Page 139: ...ding on the property evaluated Parameters Returns A value appropriate for the type of the property see Property propertyValueType attribute on page 131 time The time in seconds a floating point value...

Page 140: ...ate errors In simple cases this is straightforward For example if you delete an object a reference to the deleted object generates the warning Object is Invalid var layer1 app project item 1 layer 1 l...

Page 141: ...been changed since its creation canSetEnabled PropertyBasecanSetEnabled attribute on page 142 When true the user interface displays an eyeball icon for this prop erty enabled PropertyBase enabled att...

Page 142: ...exception and displays an error An indexed group has the type PropertyType INDEXED_GROUP see PropertyBase propertyType attribute on page 145 Parameters None Returns PropertyBase object PropertyBase el...

Page 143: ...item index layer index propertySpec isMask Description When true this property is a mask PropertyGroup Type Boolean read only PropertyBase isModified attribute app project item index layer index prope...

Page 144: ...hing PropertyBase name attribute app project item index layer index propertySpec name Description The display name of the property Compare PropertyBase matchName attribute on page 143 It is an error t...

Page 145: ...The position index of this property within its parent group if it is a child of an indexed group a property group that has the type PropertyType INDEXED_GROUP see PropertyBase propertyType attribute o...

Page 146: ...alled on a text animation property that is any animator that has been set to a text layer Parameters None Returns Nothing PropertyBase selected attribute app project item index layer index propertySpe...

Page 147: ...s Methods PropertyGroup addProperty method app project item index layer index propertyGroupSpec addProperty name Description Creates and returns a PropertyBase object with the specified name and adds...

Page 148: ...hich are the indexed groups within the layer However layers also have many other properties available only by name see the PropertyGroup property method on page 149 Type Integer read only name The dis...

Page 149: ...to find a property that is multiple levels down you must make more than one call to this method For example the following call searches two levels down and returns the first mask in the mask group myL...

Page 150: ...ather or coneFeather Shadow Darkness or shadowDarkness Shadow Diffusion or shadowDiffusion Casts Shadows or castsShadows From a 3D layer Accepts Shadows or acceptsShadows Accepts Lights or acceptsLigh...

Page 151: ...r property Effects property boxBlur myLayer property Effects property ADBE Box Blur 2 If a layer named myLayer has a mask named Mask 1 you can retrieve it as follows myLayer property Masks property Ma...

Page 152: ...nderQueueItem object Attribute Reference Description rendering RenderQueue rendering attribute on page 154 When true a render is in progress numItems RenderQueue numItems attribute on page 153 The tot...

Page 153: ...nStatusChanged attribute on page 157 and Application onError attribute on page 26 Parameters Returns Nothing RenderQueue render method app project renderQueue render Description Starts the rendering p...

Page 154: ...Description Shows or hides the Render Queue panel Parameters Returns Nothing RenderQueue stopRendering method app project renderQueue stopRendering Description Stops the rendering process This is the...

Page 155: ...mposition to be rendered timeSpanDuration RenderQueueItem timeSpanDuration attribute on page 160 The duration of the composition to be rendered skipFrames RenderQueueItem skipFrames attribute on page...

Page 156: ...item To change the composition you must delete this render queue item and create a new one Type CompItem object read only RenderQueueItem duplicate method app project renderQueue item index duplicate...

Page 157: ...total number of Output Modules assigned to this item Type Integer read only RenderQueueItem onStatusChanged attribute app project renderQueue item index onStatusChanged Description The name of a call...

Page 158: ...dule index Description Gets an output module with the specified index position Parameters Returns OutputModule object RenderQueueItem remove method app project renderQueue item index remove Descriptio...

Page 159: ...f all frames A value of 1 skips every other frame This is equivalent to rendering on twos Higher values skip a larger number of frames The total length of time remains unchanged For example if skip ha...

Page 160: ...s dialog box Type Floating point value read write RenderQueueItem timeSpanStart attribute app project renderQueue item index timeSpanStart Description The time in the composition in seconds at which r...

Page 161: ...ion is at index position 1 See RenderQueueItem object on page 155 RQItemCollection is a subclass of Collection All methods and attributes of Collection are available when working with RQItemCollection...

Page 162: ...s a scripting preferences item value from the preferences file Parameters Returns String Example If you have saved a setting named with the key name Aligned Clone in the Eraser Paint Settings section...

Page 163: ...s a default value for a scripting preferences item Parameters Returns Nothing sectionName A string containing the name of a settings section keyName A string containing the key name of the setting ite...

Page 164: ...same direction If a shape is not closed the inTangent for the first vertex and the outTangent for the final vertex are ignored If the shape is closed these two vectors specify the direction handles of...

Page 165: ...ed Type Array of floating point pair arrays read write Shape outTangents attribute shapeObject value outTangents Description The outgoing tangent vectors or direction handles associated with the verti...

Page 166: ...ttribute 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 complete se...

Page 167: ...he LayerCollection object s addShape method see LayerCollection addShape method on page 94 It can be accessed in an item s layer collection either by index number or by a name string ShapeLayer is a s...

Page 168: ...ods and attributes of FootageSource in addition to those listed below are available when working with SolidSource See FootageSource object on page 67 Attributes SolidSource color attribute solidSource...

Page 169: ...ommands using the c switch for the cmd exe command passing the command to run in escaped quotes For example the following retrieves the current time and displays it to the user var timeStr system call...

Page 170: ...osName Description The name of the operating system on which After Effects is running Type String read only System osVersion attribute system osVersion Description The version of the current local ope...

Page 171: ...property Source Text setValue myTextDocument alert myTextLayer property Source Text value This sets keyframe values for text that show different words over time var textProp myTextLayer property Sour...

Page 172: ...with TextLayer See Layer object on page 83 and AVLayer object on page 39 AE Properties TextLayer defines no additional attributes but has the following AE properties and property groups in addition t...

Page 173: ...r Effects 6 5 it is still included here because it makes effective use of conditionals functions and the ExtendScript File object This script does the following Determines whether the currently open p...

Page 174: ...is script does the following Prompts the user for a new folder to use as a render destination Checks that the user entered a new location and didn t cancel then creates a loop for each selected render...

Page 175: ...dy saved in the preferences If not run the email_setup jsx script which prompts the user for the mail gateway and sender and recipient addresses If there are saved settings that you need to change you...

Page 176: ...e of the property and whose value is the property s value at that time If the selected property has an expression a marker is created for each frame with the values sampled at each frame Note This scr...

Page 177: ...er read write findMenuCommandId returns integer isProfessionalVersion boolean readOnly isRenderEngine boolean readOnly isUISuppressed boolean readOnly isWatchFolder boolean readOnly language Language...

Page 178: ...rty string propertyName returns boolean canSetCollapseTransformation boolean readOnly canSetEnabled boolean readOnly canSetTimeRemapEnabled boolean readOnly collapseTransformation boolean read write c...

Page 179: ...turn selected boolean read write selectedProperties Array of PropertyBase readOnly setParentWithJump Layer newParent no return shy boolean read write solo boolean read write source AVItem readOnly sou...

Page 180: ...dingMode STENCIL_LUMA BlendingMode VIVID_LIGHT CloseOptions enum CloseOptions DO_NOT_SAVE_CHANGES CloseOptions PROMPT_TO_SAVE_CHANGES CloseOptions SAVE_CHANGES CompItem object activeCamera Layer readO...

Page 181: ...height float frameRate float duration no return setProxyWithSequence File proxyFile boolean forceAlphabetical no return setProxyWithSolid ArrayOfFloat color string name integer width integer height fl...

Page 182: ...sing boolean readOnly frameDuration float readOnly frameRate float readOnly hasAudio boolean readOnly hasVideo boolean readOnly height integer read write id integer readOnly mainSource FootageSource r...

Page 183: ...tions canImportAs ImportAsType asType returns boolean file File read write forceAlphabetical boolean read write importAs ImportAsType read write sequence boolean read write ItemCollection object addCo...

Page 184: ...ffect boolean readOnly isMask boolean readOnly isModified boolean readOnly isNameSet boolean readOnly locked boolean read write matchName string readOnly moveAfter Layer otherLayer no return moveBefor...

Page 185: ...byName string name returns Layer precompose ArrayOfInteger layerIndices string name boolean moveAllAttributes returns CompItem LayerQuality enum LayerQuality BEST LayerQuality DRAFT LayerQuality WIRE...

Page 186: ...boolean readOnly inverted boolean read write isEffect boolean readOnly isMask boolean readOnly isModified boolean readOnly locked boolean read write maskMode MaskMode read write maskMotionBlur MaskMot...

Page 187: ...loat readOnly premulColor Array of float read write removePulldown PulldownPhase read write PostRenderAction enum PostRenderAction IMPORT PostRenderAction IMPORT_AND_REPLACE_USAGE PostRenderAction NON...

Page 188: ...readOnly isInterpolationTypeValid KeyframeInterpolationType type returns boolean isMask boolean readOnly isModified boolean readOnly isSpatial boolean readOnly isTimeVarying boolean readOnly keyInInte...

Page 189: ...o return setTemporalAutoBezierAtKey integer keyIndex boolean isAutoBezier no return setTemporalContinuousAtKey integer keyIndex boolean isContinuous no return setTemporalEaseAtKey integer keyIndex Arr...

Page 190: ...tyValueType COLOR PropertyValueType CUSTOM_VALUE PropertyValueType LAYER_INDEX PropertyValueType MARKER PropertyValueType MASK_INDEX PropertyValueType NO_VALUE PropertyValueType OneD PropertyValueType...

Page 191: ...licate returns RenderQueueItem elapsedSeconds float readOnly logType LogType read write numOutputModules integer readOnly outputModule integer outputModuleIndex returns OutputModule outputModules OMCo...

Page 192: ...ay of float read write conformFrameRate float readOnly displayFrameRate float readOnly fieldSeparationType FieldSeparationType readOnly guessAlphaMode no return guessPulldown PulldownMethod pulldownMe...

Page 193: ...layType FRAMES TimecodeDisplayType TIMECODE TimecodeFilmType enum TimecodeFilmType MM16 TimecodeFilmType MM35 TrackMatteType enum TrackMatteType ALPHA TrackMatteType ALPHA_INVERTED TrackMatteType LUMA...

Reviews: