FootageItem object¶
app.project.item(index)
app.project.items[index]
Description
The FootageItem object represents a footage item imported into a project, which appears in the Project panel. These are accessed by position index number in a project’s item collection.
FootageItem is a subclass of AVItem object, which is a subclass of Item object. All methods and attributes of AVItem and Item, in addition to those listed below, are available when working with FootageItem.
Attributes¶
FootageItem.file¶
app.project.item(index).file
Description
The Extendscript 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.
FootageItem.mainSource¶
app.project.item(index).mainSource
Description
The footage source, an object that contains all of the settings related to that footage item, including those that are normally accessed through the Interpret Footage dialog box. The attribute is read-only. To change its value, call one of the FootageItem “replace” methods. See the FootageSource object, and its three types:
If this is a FileSource object, and the footageMissing value is true, the path to the missing footage file is in the FileSource.missingFootagePath attribute.
Type
FootageSource object; read-only.
Methods¶
FootageItem.openInViewer()¶
app.project.item(index).openInViewer()
Description
Opens the footage in a Footage panel, and moves the Footage panel to front and gives it focus.
Note
Missing and placeholder footage can be opened using this method, but cannot manually (via double-clicking it).
Parameters
None.
Returns
Viewer object for the Footage panel, or null if the footage could not be opened.
FootageItem.replace()¶
app.project.item(index).replace(file)
Description
Changes the source of 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 name
, width
, height
, frameDuration
, and duration
attributes (see AVItem object) based on the contents of the file.
The method preserves interpretation parameters from the previous mainSource
object.
If the specified file has an unlabeled alpha channel, the method estimates the alpha interpretation.
Parameters
|
An Extendscript File object for the file to be used as the footage main source. |
FootageItem.replaceWithPlaceholder()¶
app.project.item(index).replaceWithPlaceholder(name, width, height, frameRate, duration)
Description
Changes the source of this FootageItem to the specified placeholder. Creates a new PlaceholderSource object, sets its values from the parameters, and sets mainSource
to that object.
Parameters
|
A string containing the name of the placeholder. |
|
The width of the placeholder in pixels, an integer
in the range |
|
The height of the placeholder in pixels, an integer
in the range |
|
The frame rate of the placeholder, a floating-point
value in the range |
|
The duration of the placeholder in seconds, a
floating-point value in the range |
FootageItem.replaceWithSequence()¶
app.project.item(index).replaceWithSequence(file, forceAlphabetical)
Description
Changes the source of this FootageItem to the specified image sequence.
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 name
, width
, height
, frameDuration
, and duration
attributes (see AVItem object) based on the contents of the file.
The method preserves interpretation parameters from the previous mainSource
object. If the specified file has an unlabeled alpha channel, the method estimates the alpha interpretation.
Parameters
|
An Extendscript File object for the first file in the sequence to be used as the footage main source. |
|
When true, use the “Force alphabetical order” option. |
FootageItem.replaceWithSolid()¶
app.project.item(index).replaceWithSolid(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 mainSource
to that object.
Parameters
|
The color of the solid, an array of three floating-point
values, |
|
A string containing the name of the solid. |
|
The width of the solid in pixels, an integer in the range
|
|
The height of the solid in pixels, an integer in the range
|
|
The pixel aspect ratio of the solid, a floating-point value
in the range |