Project object¶
app.project
Description
Represents a Premiere Pro project. As of Premiere Pro 12.0, multiple projects may be open at the same time.
Attributes¶
Project.activeSequence¶
app.project.activeSequence
Description
The currently active Sequence object, within the project.
Type
a Sequence object, or 0
if no sequence is currently active.
Project.cloudProjectlocalID¶
app.project.cloudProjectlocalID
Description
The ID of cloud project.
Type
String; read/only.
Project.documentID¶
app.project.documentID
Description
A unique identifier for this project, in format of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
.
Type
String; read-only.
Project.isCloudProject¶
app.project.isCloudProject
Description
Check whether the project is cloud project.
Type
Boolean; read-only.
Project.name¶
app.project.name
Description
The name of the project.
Type
String; read-only.
Project.path¶
app.project.path
Description
The file path of the project.
Type
String; read-only.
Example
Get a path of a curently active project
app.project.path; // /Users/USERNAME/Desktop/Project.prproj
Project.rootItem¶
app.project.rootItem
Description
A ProjectItem object representing the “root” of the project.
Type
A ProjectItem object; this will always be of type ProjectItemType_BIN
.
Project.sequences¶
app.project.sequences
Description
The sequences within the project.
Type
SequenceCollection object, read-only.
Methods¶
Project.addPropertyToProjectMetadataSchema()¶
app.project.addPropertyToProjectMetadataSchema(propertyName, propertyLabel, propertyType)
Description
Adds a new field of the specified type to Premiere Pro’s private project metadata schema.
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
A name of property to be added. |
|
|
A label of property to be added. |
|
Must be one of the following:
|
Returns
Returns true if successful, undefined if unsuccessful.
Project.closeDocument()¶
app.project.closeDocument(saveFirst, promptIfDirty)
Description
Closes this project.
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
If |
|
|
If |
Returns
Returns 0 if successful.
Project.consolidateDuplicates()¶
app.project.consolidateDuplicates()
Description
Invokes Premiere Pro’s “Consolidate Duplicate Footage” functionality, as available from the UI.
Parameters
None.
Returns
Returns 0 if successful.
Project.createNewSequence()¶
app.project.createNewSequence(sequenceName, sequenceID)
Description
Creates a new Sequence object with the specified ID.
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
A name of a sequence. |
|
|
An uniquely identifying ID for a new sequence. |
Returns
Returns a Sequence object if creation was successful, or 0 if unsuccessful.
Project.createNewSequenceFromClips()¶
app.project.createNewSequenceFromClips(sequenceName, arrayOfProjectItems, destinationBin);
Description
Creates a new Sequence object with the given name, in the specified destination bin, and sequentially inserts project items into it.
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
Optional. A name for a new sequence. |
|
|
An array of project items to be inserted into sequence. |
|
Optional. A bin to contain sequence. |
Returns
Returns the newly-created Sequence object if successful; 0 if unsuccessful.
Project.deleteSequence()¶
app.project.deleteSequence(sequence)
Description
Deletes the specified Sequence object from the project.
Parameters
Argument |
Type |
Description |
---|---|---|
|
A sequence to delete. |
Returns
Returns 0 if successful.
Project.exportAAF()¶
app.project.exportAAF(sequenceToExport, outputPath, mixdownVideo, explodeToMono, sampleRate, bitsPerSample, embedAudio, audioFileFormat, trimSources, handleFrames, presetPath, renderAudioEffects, includeClipCopies, preserveParentFolder)
Description
Exports an AAF file of the specified Sequence object, using the specified settings.
Parameters
Argument |
Type |
Description |
---|---|---|
|
A sequence to export. |
|
|
|
An output path for .aaf file. |
|
|
If |
|
|
If |
|
|
The sample rate of output audio. |
|
|
The bits per sample of audio output. |
|
|
If |
|
|
|
|
|
If |
|
|
The number of handle frames (from 0 to 1000). |
|
|
A path to export preset (.epr) file. |
|
|
If |
|
|
If |
|
|
If |
Returns
Returns 0 if successful.
Project.exportFinalCutProXML()¶
app.project.exportFinalCutProXML(outputPath, suppressUI)
Description
Exports an FCP XML representation of the entire project, to the specified output path.
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
An output path for .xml file. |
|
|
If |
Returns
Returns 0 if successful.
Project.exportOMF()¶
app.project.exportOMF(sequence, outputPath, omfTitle, sampleRate, bitsPerSample, audioEncapsulated, audioFileFormat, trimAudioFiles, handleFrames, includePan)
Description
Exports an OMF file of the specified Sequence object, using the specified settings.
Parameters
Argument |
Type |
Description |
---|---|---|
|
The sequence to be output. |
|
|
|
An output path for .omf file. |
|
|
The title of the OMF. |
|
The sample rate of output audio. |
|
|
The bits per sample of audio output. |
|
|
|
If |
|
|
|
|
|
|
|
|
Number of handle frames (from 0 to 1000). |
|
|
|
Returns
Returns 0 if successful.
Project.exportTimeline()¶
app.project.exportTimeline(exportControllerName)
Description
Exports the currently active Sequence object, using an Export Controller plug-in with the specified name.
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
The name of the Export Controller plug-in to be used. To use the Premiere Pro SDK example Export Controller, the value would be “SDK Export Controller”. |
Returns
Returns 0 if successful, or an error code if not.
Project.getGraphicsWhiteLuminance()¶
app.project.getGraphicsWhiteLuminance();
Description
Retrieves the current graphics white luminance value, for this project.
Parameters
None.
Returns
Returns the currently selected graphics white value.
Project.getInsertionBin()¶
app.project.getInsertionBin()
Description
Returns a ProjectItem object referencing the bin into which import will occur.
Parameters
None.
Returns
Returns a ProjectItem object if successful, 0 if not.
Project.getProjectPanelMetadata()¶
app.project.getProjectPanelMetadata()
Description
Returns the current layout of the Project panel.
Parameters
None.
Returns
Returns a String representing the current Project panel layout, or 0 if unsuccessful.
Project.getSupportedGraphicsWhiteLuminances()¶
app.project.getSupportedGraphicsWhiteLuminances();
Description
Retrieves the supported graphics white luminance values, for this project.
Parameters
None.
Returns
Returns an array of graphics white settings supported by the project; Currently it returns (100, 203, 300)
Project.importAEComps()¶
app.project.importAEComps(path, compNames, targetBin)
Description
Imports specified Compositions (by name) from the containing After Effects .aep project file. You can specify a target bin within the containing project; otherwise, the Compositions will appear in the most recently targeted bin, within this project.
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
A path to the After Effects .aep project file. |
|
|
Names of compositions within the specified project, to be imported. |
|
Optional. The destination bin for this import. |
Returns
Returns 0 if successful.
Project.importAllAEComps()¶
app.project.importAllAEComps(path, targetBin)
Description
Imports specified Compositions (by name) from the containing After Effects .aep project file. You can specify a target bin within the containing project; otherwise, the Compositions will appear in the most recently targeted bin, within this project.
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
A path to After Effects .aep project file. |
|
Optional. The destination bin for this import. |
Returns
Returns 0 if successful.
Project.importFiles()¶
app.project.importFiles(filePaths, suppressUI, targetBin, importAsNumberedStills)
Description
Imports media from the specified file paths.
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
An array of the file paths to be imported. |
|
|
Whether warning dialogs should be suppressed. |
|
The bin into which the files should be imported. |
|
|
|
Whether the file paths should be interpreted as a sequence of numbered stills. |
Returns
Returns true if successful, false if not.
Project.importSequences()¶
app.project.importSequences(path, sequenceIDs)
Description
Imports an array of sequence objects (with specified sequenceIDs), from the specified project, into the current project.
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
A path to a project file. |
|
|
An array of sequence IDs to import. |
Returns
Returns 0 if successful.
Project.newBarsAndTone()¶
app.project.newBarsAndTone(width, height, timeBase, PARNum, PARDen, audioSampleRate, name)
Description
Creates a new Sequence object with the given name, based on the specified preset (.sqpreset file).
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
|
|
|
|
|
A timebase for a new project item. |
|
|
|
Pixel aspect ration numerator. |
|
|
Pixel aspect ration denominator. |
|
Audio sample rate. |
|
|
|
Name for a new project item. |
Returns
Returns a ProjectItem object for the new bars and tone, or 0 if unsuccessful.
Project.newSequence()¶
app.project.newSequence(name, pathToSequencePreset)
Description
Creates a new Sequence object with the given name, based on the specified preset (.sqpreset file).
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
Name for a new sequence. |
|
|
A path to a preset .sqpreset file. |
Returns
Returns a Sequence object, or 0 if unsuccessful.
Project.openSequence()¶
app.project.openSequence(sequence.sequenceID)
Description
Makes the Sequence object with the provided sequence ID, active. This will open the sequence in the Timeline panel.
Parameters
Argument |
Type |
Description |
---|---|---|
|
A valid sequence ID that should be opened. |
Returns
Returns true if successful, false if not.
Project.pauseGrowing()¶
app.project.pauseGrowing(pause)
Description
Pauses (and resumes) growing file capture.
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
If |
Returns
Returns 0 if successful.
Project.save()¶
app.project.save()
Description
Saves the project, at its current path.
Parameters
None.
Returns
Returns 0 if successful.
Project.saveAs()¶
app.project.saveAs(path)
Description
Exports the current project to a new unique file path, opens the project from the new location, and closes the previously-opened (and identical) project.
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
A path to a new file. |
Returns
Returns 0 if successful, or an error code if not.
Project.setEnableTranscodeOnIngest()¶
app.project.setEnableTranscodeOnIngest(state);
Description
Controls the enablement of transcode-upon-ingest behavior, for the given project.
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
The desired state. |
Returns
Returns true if successful.
Project.setGraphicsWhiteLuminance()¶
app.project.setGraphicsWhiteLuminance(value)
Description
Sets the current graphics white luminance value, for this project.
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
The value to be used; must be a value provided by Project.getSupportedGraphicsWhiteLuminances(). |
Returns
Returns true if successful.
Project.setProjectPanelMetadata()¶
app.project.setProjectPanelMetadata(layout)
Description
Returns the current layout of the Project panel.
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
Represents the desired Project panel layout. Note: The only known method for generating a valid layout string, is setting the Project panel as desired then using Project.getProjectPanelMetadata(). |
Returns
Returns 0 if unsuccessful.
Project.setScratchDiskPath()¶
app.project.setScratchDiskPath(newPath, whichScratchDiskPath)
Description
Changes the specified scratch disk path to a new path.
Parameters
Argument |
Type |
Description |
---|---|---|
|
|
A new path. |
|
|
Enumerated value, must be one of the following:
|
ScratchDiskType.FirstAudioCaptureFolder
ScratchDiskType.FirstVideoPreviewFolder
ScratchDiskType.FirstAudioPreviewFolder
ScratchDiskType.FirstAutoSaveFolder
ScratchDiskType.FirstCCLibrariesFolder
ScratchDiskType.FirstCapsuleMediaFolder
Returns
Returns 0 if unsuccessful.