Project object
Project object
Section titled “Project object”app.project
Description
Section titled “Description”Represents a Premiere Pro project. As of Premiere Pro 12.0, multiple projects may be open at the same time.
Attributes
Section titled “Attributes”Project.activeSequence
Section titled “Project.activeSequence”app.project.activeSequence
Description
Section titled “Description”The currently active Sequence object, within the project.
A Sequence object, or 0
if no sequence is currently active.
Project.cloudProjectlocalID
Section titled “Project.cloudProjectlocalID”app.project.cloudProjectlocalID
Description
Section titled “Description”The ID of cloud project.
String; read/only.
Project.documentID
Section titled “Project.documentID”app.project.documentID
Description
Section titled “Description”A unique identifier for this project, in format of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
.
String; read-only.
Project.isCloudProject
Section titled “Project.isCloudProject”app.project.isCloudProject
Description
Section titled “Description”Check whether the project is cloud project.
Boolean; read-only.
Project.name
Section titled “Project.name”app.project.name
Description
Section titled “Description”The name of the project.
String; read-only.
Project.path
Section titled “Project.path”app.project.path
Description
Section titled “Description”The file path of the project.
String; read-only.
Example
Section titled “Example”Get a path of a curently active project
app.project.path; // /Users/USERNAME/Desktop/Project.prproj
Project.rootItem
Section titled “Project.rootItem”app.project.rootItem
Description
Section titled “Description”A ProjectItem object representing the “root” of the project.
A ProjectItem object; this will always be of type ProjectItemType_BIN
.
Project.sequences
Section titled “Project.sequences”app.project.sequences
Description
Section titled “Description”The sequences within the project.
SequenceCollection object, read-only.
Methods
Section titled “Methods”Project.addPropertyToProjectMetadataSchema()
Section titled “Project.addPropertyToProjectMetadataSchema()”app.project.addPropertyToProjectMetadataSchema(propertyName, propertyLabel, propertyType)
Description
Section titled “Description”Adds a new field of the specified type to Premiere Pro’s private project metadata schema.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
propertyName | String | A name of property to be added. |
propertyLabel | String | A label of property to be added. |
propertyType | Integer | Must be one of the following: |
- 0 - Integer | ||
- 1 - Real | ||
- 2 - String | ||
- 3 - Boolean |
Returns
Section titled “Returns”Returns true
if successful, undefined
if unsuccessful.
Project.closeDocument()
Section titled “Project.closeDocument()”app.project.closeDocument(saveFirst, promptIfDirty)
Description
Section titled “Description”Closes this project.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
saveFirst | Integer | If 1 , the project will be saved before closing. |
promptIfDirty | Integer | If 1 , the user will be asked whether they want to save changes first. |
Returns
Section titled “Returns”Returns 0
if successful.
Project.consolidateDuplicates()
Section titled “Project.consolidateDuplicates()”app.project.consolidateDuplicates()
Description
Section titled “Description”Invokes Premiere Pro’s “Consolidate Duplicate Footage” functionality, as available from the UI.
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”Returns 0
if successful.
Project.createNewSequence()
Section titled “Project.createNewSequence()”app.project.createNewSequence(sequenceName, sequenceID)
Description
Section titled “Description”Creates a new Sequence object with the specified ID.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
sequenceName | String | A name of a sequence. |
sequenceID | String | An uniquely identifying ID for a new sequence. |
Returns
Section titled “Returns”Returns a Sequence object if creation was successful, or 0
if unsuccessful.
Project.createNewSequenceFromClips()
Section titled “Project.createNewSequenceFromClips()”app.project.createNewSequenceFromClips(sequenceName, arrayOfProjectItems, [destinationBin])
Description
Section titled “Description”Creates a new Sequence object with the given name, in the specified destination bin, and sequentially inserts project items into it.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
sequenceName | String | Optional. A name for a new sequence. |
arrayOfProjectItems | Array of ProjectItem objects | An array of project items to be inserted into sequence. |
destinationBin | ProjectItem object | Optional. A bin to contain sequence. |
Returns
Section titled “Returns”Returns the newly-created Sequence object if successful; 0 if unsuccessful.
Project.deleteSequence()
Section titled “Project.deleteSequence()”app.project.deleteSequence(sequence)
Description
Section titled “Description”Deletes the specified Sequence object from the project.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
sequence | Sequence object | A sequence to delete. |
Returns
Section titled “Returns”Returns true
if successful, false
if unsuccessful.
Project.exportAAF()
Section titled “Project.exportAAF()”app.project.exportAAF(sequenceToExport, outputPath, mixdownVideo, explodeToMono, sampleRate, bitsPerSample, embedAudio, audioFileFormat, trimSources, handleFrames, presetPath, renderAudioEffects, includeClipCopies, preserveParentFolder)
Description
Section titled “Description”Exports an AAF file of the specified Sequence object, using the specified settings.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
sequenceToExport | Sequence object | A sequence to export. |
outputPath | String | An output path for .aaf file. |
mixdownVideo | Integer | If 1 , render video before export. |
explodeToMono | Integer | If 1 , breaks out stereo tracks to mono. |
sampleRate | Integer | The sample rate of output audio. |
bitsPerSample | Integer | The bits per sample of audio output. |
embedAudio | Integer | If 1 , audio is embedded, if 0 , external. |
audioFileFormat | Integer | 0 is AIFF, 1 is WAV. |
trimSources | Integer | If 1 , trim and re-encode media before export; 0 exports the entire file. |
handleFrames | Integer | The number of handle frames (from 0 to 1000). |
presetPath | String | A path to export preset (.epr) file. |
renderAudioEffects | Integer | If 1 , render audio effects before export. |
includeClipCopies | Integer | If 1 , include each copy of a clip. |
preserveParentFolder | Integer | If 1 , preserves the parent folder, in output. |
Returns
Section titled “Returns”Returns 0
if successful.
Project.exportFinalCutProXML()
Section titled “Project.exportFinalCutProXML()”app.project.exportFinalCutProXML(outputPath, suppressUI)
Description
Section titled “Description”Exports an FCP XML representation of the entire project, to the specified output path.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
outputPath | String | An output path for .xml file. |
suppressUI | Integer | If 1 , no warnings or alerts will be shown, during the export. |
Returns
Section titled “Returns”Returns 0
if successful.
Project.exportOMF()
Section titled “Project.exportOMF()”app.project.exportOMF(sequence, outputPath, omfTitle, sampleRate, bitsPerSample, audioEncapsulated, audioFileFormat, trimAudioFiles, handleFrames, includePan)
Description
Section titled “Description”Exports an OMF file of the specified Sequence object, using the specified settings.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
sequence | Sequence object | The sequence to be output. |
filePath | String | An output path for .omf file. |
omfTitle | String | The title of the OMF. |
sampleRate | The sample rate of output audio. | |
bitsPerSample | The bits per sample of audio output. | |
audioEncapsulated | Integer | If 1 , audio is embedded, if 0 , external. |
audioFileFormat | Integer | 0 is AIFF, 1 is WAV. |
trimAudioFiles | Integer | 1 means yes, trim audio files. |
handleFrames | Integer | Number of handle frames (from 0 to 1000). |
includePan | Integer | 1 means include pan info; 0 means don’t. |
Returns
Section titled “Returns”Returns 0
if successful.
Project.exportTimeline()
Section titled “Project.exportTimeline()”app.project.exportTimeline(exportControllerName)
Description
Section titled “Description”Exports the currently active Sequence object, using an Export Controller plug-in with the specified name.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
exportControllerName | String | 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
Section titled “Returns”Returns 0
if successful, or an error code if not.
Project.getGraphicsWhiteLuminance()
Section titled “Project.getGraphicsWhiteLuminance()”app.project.getGraphicsWhiteLuminance()
Description
Section titled “Description”Retrieves the current graphics white luminance value, for this project.
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”Returns the currently selected graphics white value.
Project.getInsertionBin()
Section titled “Project.getInsertionBin()”app.project.getInsertionBin()
Description
Section titled “Description”Returns a ProjectItem object referencing the bin into which import will occur.
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”Returns a ProjectItem object if successful, 0
if not.
Project.getProjectPanelMetadata()
Section titled “Project.getProjectPanelMetadata()”app.project.getProjectPanelMetadata()
Description
Section titled “Description”Returns the current layout of the Project panel.
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”Returns a String representing the current Project panel layout, or 0
if unsuccessful.
Project.getSharedLocation()
Section titled “Project.getSharedLocation()”app.project.getSharedLocation()
Description
Section titled “Description”Returns the path to the location to which shared files are to be copied.
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”Returns a String containing the path.
Project.getSupportedGraphicsWhiteLuminances()
Section titled “Project.getSupportedGraphicsWhiteLuminances()”app.project.getSupportedGraphicsWhiteLuminances()
Description
Section titled “Description”Retrieves the supported graphics white luminance values, for this project.
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”Returns an array of graphics white settings supported by the project; Currently it returns (100, 203, 300)
Project.importAEComps()
Section titled “Project.importAEComps()”app.project.importAEComps(path, compNames, [targetBin])
Description
Section titled “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
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
path | String | A path to the After Effects .aep project file. |
compNames | Array of strings | Names of compositions within the specified project, to be imported. |
targetBin | ProjectItem object | Optional. The destination bin for this import. |
Returns
Section titled “Returns”Returns 0
if successful.
Project.importAllAEComps()
Section titled “Project.importAllAEComps()”app.project.importAllAEComps(path, [targetBin])
Description
Section titled “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
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
path | String | A path to After Effects .aep project file. |
targetBin | ProjectItem object | Optional. The destination bin for this import. |
Returns
Section titled “Returns”Returns 0
if successful.
Project.importFiles()
Section titled “Project.importFiles()”app.project.importFiles(filePaths, suppressUI, targetBin, importAsNumberedStills)
Description
Section titled “Description”Imports media from the specified file paths.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
filePaths | Array of strings | An array of the file paths to be imported. |
suppressUI | Boolean | Whether warning dialogs should be suppressed. |
targetBin | ProjectItem object | The bin into which the files should be imported. |
importAsNumberedStills | Boolean | Whether the file paths should be interpreted as a sequence of numbered stills. |
Returns
Section titled “Returns”Returns true
if successful, false
if not.
Project.importSequences()
Section titled “Project.importSequences()”app.project.importSequences(path, sequenceIDs)
Description
Section titled “Description”Imports an array of sequence objects (with specified sequenceIDs), from the specified project, into the current project.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
path | String | A path to a project file. |
sequenceIDs | Array | An array of sequence IDs to import. |
Returns
Section titled “Returns”Returns 0
if successful.
Project.isSharedLocationCopyEnabled()
Section titled “Project.isSharedLocationCopyEnabled()”app.project.isSharedLocationCopyEnabled()
Description
Section titled “Description”Determines whether copying to a shared location is enabled, for this project.
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”Returns true
if copying is enabled; false
if not.
Project.newBarsAndTone()
Section titled “Project.newBarsAndTone()”app.project.newBarsAndTone(width, height, timeBase, PARNum, PARDen, audioSampleRate, name)
Description
Section titled “Description”Creates a new Sequence object with the given name, based on the specified preset (.sqpreset file).
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
width | Integer | |
height | Integer | |
timeBase | A timebase for a new project item. | |
PARNum | Integer | Pixel aspect ration numerator. |
PARDen | Integer | Pixel aspect ration denominator. |
audioSampleRate | Audio sample rate. | |
name | String | Name for a new project item. |
Returns
Section titled “Returns”Returns a ProjectItem object for the new bars and tone, or 0
if unsuccessful.
Project.newSequence()
Section titled “Project.newSequence()”app.project.newSequence(name, pathToSequencePreset)
Description
Section titled “Description”Creates a new Sequence object with the given name, based on the specified preset (.sqpreset file).
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
name | String | Name for a new sequence. |
pathToSequencePreset | String | A path to a preset .sqpreset file. |
Returns
Section titled “Returns”Returns a Sequence object, or 0
if unsuccessful.
Project.openSequence()
Section titled “Project.openSequence()”app.project.openSequence(sequence.sequenceID)
Description
Section titled “Description”Makes the Sequence object with the provided sequence ID, active. This will open the sequence in the Timeline panel.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
sequenceID | Sequence.sequenceID | A valid sequence ID that should be opened. |
Returns
Section titled “Returns”Returns true
if successful, false
if not.
Project.pauseGrowing()
Section titled “Project.pauseGrowing()”app.project.pauseGrowing(pause)
Description
Section titled “Description”Pauses (and resumes) growing file capture.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
pause | Integer | If 1 , growing files are enabled. |
Returns
Section titled “Returns”Returns 0
if successful.
Project.save()
Section titled “Project.save()”app.project.save()
Description
Section titled “Description”Saves the project, at its current path.
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”Returns 0
if successful.
Project.saveAs()
Section titled “Project.saveAs()”app.project.saveAs(path)
Description
Section titled “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
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
path | String | A path to a new file. |
Returns
Section titled “Returns”Returns 0
if successful, or an error code if not.
Project.setEnableTranscodeOnIngest()
Section titled “Project.setEnableTranscodeOnIngest()”app.project.setEnableTranscodeOnIngest(state)
Description
Section titled “Description”Controls the enablement of transcode-upon-ingest behavior, for the given project.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
state | Boolean | The desired state. |
Returns
Section titled “Returns”Returns true
if successful.
Project.setGraphicsWhiteLuminance()
Section titled “Project.setGraphicsWhiteLuminance()”app.project.setGraphicsWhiteLuminance(value)
Description
Section titled “Description”Sets the current graphics white luminance value, for this project.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
value | Integer | The value to be used; must be a value provided by Project.getSupportedGraphicsWhiteLuminances(). |
Returns
Section titled “Returns”Returns true
if successful.
Project.setProjectPanelMetadata()
Section titled “Project.setProjectPanelMetadata()”app.project.setProjectPanelMetadata(layout)
Description
Section titled “Description”Returns the current layout of the Project panel.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
layout | String | 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
Section titled “Returns”Returns 0
if unsuccessful.
Project.setScratchDiskPath()
Section titled “Project.setScratchDiskPath()”app.project.setScratchDiskPath(newPath, whichScratchDiskPath)
Description
Section titled “Description”Changes the specified scratch disk path to a new path.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
newPath | String | A new path. |
scratchDiskType | ScratchDiskType enum | One of: |
- ScratchDiskType.FirstVideoCaptureFolder | ||
- ScratchDiskType.FirstAudioCaptureFolder | ||
- ScratchDiskType.FirstVideoPreviewFolder | ||
- ScratchDiskType.FirstAudioPreviewFolder | ||
- ScratchDiskType.FirstAutoSaveFolder | ||
- ScratchDiskType.FirstCCLibrariesFolder | ||
- ScratchDiskType.FirstCapsuleMediaFolder | ||
- ScratchDiskType.FirstAudioCaptureFolder | ||
- ScratchDiskType.FirstVideoPreviewFolder | ||
- ScratchDiskType.FirstAudioPreviewFolder | ||
- ScratchDiskType.FirstAutoSaveFolder | ||
- ScratchDiskType.FirstCCLibrariesFolder | ||
- ScratchDiskType.FirstCapsuleMediaFolder |
Returns
Section titled “Returns”Returns 0
if unsuccessful.