Argument type: index is a Number.
Retrieves the layer by number (order in the Timeline panel). Example: thisComp.layer(3)
Argument type: name is a String.
Retrieves the layer by name. Names are matched by layer name, or source name if there is no layer name. If duplicate names exist, After Effects uses the first (topmost) one in the Timeline panel. Example:
thisComp.layer("Solid 1")
Argument type: otherLayer is a Layer object, and relIndex is a Number.
Retrieves the layer that is relIndex layers above or below otherLayer. For example, thisComp.layer(thisLayer, 1).active returns true if the next layer down in the Timeline panel is active.
Argument type: index is a Number.
Returns the MarkerKey object of the marker with the specified index. The index refers to the order of the marker in composition time, not to the name of the marker. For example, this expression returns the time of the first composition-time marker:
thisComp.marker.key(1).time
Argument type: name is a String.
Returns the MarkerKey object of the marker with the specified name. The name value is the name of the marker, as typed in the comment field in the marker dialog box, for example, marker.key("1"). For a composition-time marker, the default name is a number. If more than one marker in the composition has the same name, this method returns the marker that occurs first in time (in composition time). The value for a marker key is a String, not a Number. For example, this expression returns the time of the composition-time marker with the name "0":
thisComp.marker.key("0").time
Argument type: t is a Number.
Returns the marker that is nearest in time to t. For example, this expression returns the time of the composition-time marker nearest to the time of 1 second:
thisComp.marker.nearestKey(1).time
This expression returns the time of the composition-time marker nearest to the current time:
thisComp.marker.nearestKey(time).time
Returns the total number of composition-time markers in the composition.
Returns the number of layers in the composition.
Returns the Camera object for the camera through which the composition is rendered at the current frame. This is not necessarily the camera through which you are looking in the Composition panel.
Returns the composition’s width, in pixels.
Returns the composition’s height, in pixels.
Returns the composition’s duration, in seconds.
Returns the composition start time, in seconds.
Returns the duration of a frame, in seconds.
Returns the shutter-angle value of the composition, in degrees.
Returns the shutter phase of the composition, in degrees.
Returns the background color of the composition.
Returns the pixel aspect ratio of the composition.
Returns the name of the composition.
Example: Apply the following expression to the Position property to center a layer in the composition frame.No screen name said on May 26, 2008 at 4:21 PM :
[thisComp.width/2, thisComp.height/2]
How about when I want to return the composition’s height? Where;s that attribute?
Todd_Kopriva
said on
May 26, 2008
at
8:53 PM :
The height attribute is listed in the middle of this page.
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/en_US/AfterEffects/8.0/WS3878526689cb91655866c1103906c6dea-7a03.html
Comments
Comments are no longer accepted for After Effects CS3. After Effects CS4 is the current version. To discuss After Effects CS3, please use the Adobe forum.