Skip to content

Project object

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

ParameterTypeDescription
propertyNameStringA name of property to be added.
propertyLabelStringA label of property to be added.
propertyTypeIntegerMust be one of the following:
- 0 - Integer
- 1 - Real
- 2 - String
- 3 - Boolean

Returns

Returns true if successful, undefined if unsuccessful.


Project.closeDocument()

app.project.closeDocument(saveFirst, promptIfDirty)

Description

Closes this project.

Parameters

ParameterTypeDescription
saveFirstIntegerIf 1, the project will be saved before closing.
promptIfDirtyIntegerIf 1, the user will be asked whether they want to save changes first.

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

ParameterTypeDescription
sequenceNameStringA name of a sequence.
sequenceIDStringAn 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

ParameterTypeDescription
sequenceNameStringOptional. A name for a new sequence.
arrayOfProjectItemsArray of ProjectItem objectsAn array of project items to be inserted into sequence.
destinationBinProjectItem objectOptional. 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

ParameterTypeDescription
sequenceSequence objectA sequence to delete.

Returns

Returns true if successful, false if unsuccessful.


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

ParameterTypeDescription
sequenceToExportSequence objectA sequence to export.
outputPathStringAn output path for .aaf file.
mixdownVideoIntegerIf 1, render video before export.
explodeToMonoIntegerIf 1, breaks out stereo tracks to mono.
sampleRateIntegerThe sample rate of output audio.
bitsPerSampleIntegerThe bits per sample of audio output.
embedAudioIntegerIf 1, audio is embedded, if 0, external.
audioFileFormatInteger0 is AIFF, 1 is WAV.
trimSourcesIntegerIf 1, trim and re-encode media before export; 0 exports the entire file.
handleFramesIntegerThe number of handle frames (from 0 to 1000).
presetPathStringA path to export preset (.epr) file.
renderAudioEffectsIntegerIf 1, render audio effects before export.
includeClipCopiesIntegerIf 1, include each copy of a clip.
preserveParentFolderIntegerIf 1, preserves the parent folder, in output.

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

ParameterTypeDescription
outputPathStringAn output path for .xml file.
suppressUIIntegerIf 1, no warnings or alerts will be shown, during the export.

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

ParameterTypeDescription
sequenceSequence objectThe sequence to be output.
filePathStringAn output path for .omf file.
omfTitleStringThe title of the OMF.
sampleRateThe sample rate of output audio.
bitsPerSampleThe bits per sample of audio output.
audioEncapsulatedIntegerIf 1, audio is embedded, if 0, external.
audioFileFormatInteger0 is AIFF, 1 is WAV.
trimAudioFilesInteger1 means yes, trim audio files.
handleFramesIntegerNumber of handle frames (from 0 to 1000).
includePanInteger1 means include pan info; 0 means don’t.

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

ParameterTypeDescription
exportControllerNameStringThe 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.getSharedLocation()

app.project.getSharedLocation()

Description

Returns the path to the location to which shared files are to be copied.

Parameters

None.

Returns

Returns a String containing the path.


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

ParameterTypeDescription
pathStringA path to the After Effects .aep project file.
compNamesArray of stringsNames of compositions within the specified project, to be imported.
targetBinProjectItem objectOptional. 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

ParameterTypeDescription
pathStringA path to After Effects .aep project file.
targetBinProjectItem objectOptional. 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

ParameterTypeDescription
filePathsArray of stringsAn array of the file paths to be imported.
suppressUIBooleanWhether warning dialogs should be suppressed.
targetBinProjectItem objectThe bin into which the files should be imported.
importAsNumberedStillsBooleanWhether 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

ParameterTypeDescription
pathStringA path to a project file.
sequenceIDsArrayAn array of sequence IDs to import.

Returns

Returns 0 if successful.


Project.isSharedLocationCopyEnabled()

app.project.isSharedLocationCopyEnabled()

Description

Determines whether copying to a shared location is enabled, for this project.

Parameters

None.

Returns

Returns true if copying is enabled; false if not.


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

ParameterTypeDescription
widthInteger
heightInteger
timeBaseA timebase for a new project item.
PARNumIntegerPixel aspect ration numerator.
PARDenIntegerPixel aspect ration denominator.
audioSampleRateAudio sample rate.
nameStringName 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

ParameterTypeDescription
nameStringName for a new sequence.
pathToSequencePresetStringA 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

ParameterTypeDescription
sequenceIDSequence.sequenceIDA 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

ParameterTypeDescription
pauseIntegerIf 1, growing files are enabled.

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

ParameterTypeDescription
pathStringA 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

ParameterTypeDescription
stateBooleanThe 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

ParameterTypeDescription
valueIntegerThe 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

ParameterTypeDescription
layoutStringRepresents 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

ParameterTypeDescription
newPathStringA new path.
scratchDiskTypeScratchDiskType enumOne 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

Returns 0 if unsuccessful.