ProjectItem object
ProjectItem object
Section titled “ProjectItem object”app.project.rootItem.children[index]
Description
Section titled “Description”Each item in a project is a ProjectItem, including the project root.
Attributes
Section titled “Attributes”ProjectItem.children
Section titled “ProjectItem.children”app.project.rootItem.children[index].children
Description
Section titled “Description”An array of project items, contained within the specified project item.
ProjectItemCollection object, read-only.
ProjectItem.getAudioChannelMapping
Section titled “ProjectItem.getAudioChannelMapping”app.project.rootItem.children[index].getAudioChannelMapping
Description
Section titled “Description”The audio channel mapping currently applied to this ProjectItem.
An audioChannelMapping object.
ProjectItem.getOverrideColorSpaceList
Section titled “ProjectItem.getOverrideColorSpaceList”app.project.rootItem.children[index].getOverrideColorSpaceList
Description
Section titled “Description”Add a description
Returns an object, containing similar data
{ value: [ sRGB, BT.601 (NTSC), BT.601 (PAL), BT.709, BT.709 (Scene), BT.2020, BT.2020 (Scene), BT.2100 PQ, BT.2100 PQ (Scene), BT.2100 HLG, BT.2100 HLG (Scene), DCDM XYZ, ]};
Javascript Object.
ProjectItem.name
Section titled “ProjectItem.name”app.project.rootItem.children[index].name
Description
Section titled “Description”The name of the project item.
String; read/write.
Example
Section titled “Example”Rename first project item.
var item = app.project.rootItem.children[0];if (item) { item.name = item.name + ', updated by PProPanel.';} else { alert('Could not rename project item');}
ProjectItem.nodeId
Section titled “ProjectItem.nodeId”app.project.rootItem.children[index].nodeId
Description
Section titled “Description”A unique ID assigned to the project item, upon its addition to the project.
String; read-only.
ProjectItem.teamProjectsAssetId
Section titled “ProjectItem.teamProjectsAssetId”app.project.rootItem.children[index].teamProjectsAssetId
Description
Section titled “Description”The Team Projects Asset ID of the project item.
String; read-only.
ProjectItem.treePath
Section titled “ProjectItem.treePath”app.project.rootItem.children[index].treePath
Description
Section titled “Description”The current project location of the project item.
Example: \\ProjectName.prproj\\Media\\MXF\\filename.mxf
String; read-only.
ProjectItem.type
Section titled “ProjectItem.type”app.project.rootItem.children[index].type
Description
Section titled “Description”One of:
"CLIP"
"BIN"
"ROOT"
"FILE"
Enumerated value; read-only.
Methods
Section titled “Methods”ProjectItem.attachProxy()
Section titled “ProjectItem.attachProxy()”app.project.rootItem.children[index].attachProxy(mediaPath, isHiRes)
Description
Section titled “Description”Attaches the media at newMediaPath
to the project item, as either hi-res or proxy media.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
mediaPath | String | The path to the the newly-assigned media. |
isHiRes | Integer | Whether the new media should be attached as the proxy 0 , or high resolution 1 media. |
Returns
Section titled “Returns”Returns 0
if successful.
ProjectItem.canChangeMediaPath()
Section titled “ProjectItem.canChangeMediaPath()”app.project.rootItem.children[index].canChangeMediaPath()
Description
Section titled “Description”Returns true
if Premiere Pro can change the path, associated with this project item; otherwise, returns false
.
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”Boolean; true
if media can be replaced, false
if not.
ProjectItem.canProxy()
Section titled “ProjectItem.canProxy()”app.project.rootItem.children[index].canProxy()
Description
Section titled “Description”Indicates whether it’s possible to attach a proxy, to this project item.
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”Returns true
if the project item permits a proxy to be attached; false
if not.
ProjectItem.changeMediaPath()
Section titled “ProjectItem.changeMediaPath()”app.project.rootItem.children[index].changeMediaPath(newPath)
Description
Section titled “Description”Updates the project item to point to a new media path.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
newPath | String | A new path to the media file. |
overrideChecks | Boolean | Override any safety concerns. |
Returns
Section titled “Returns”Returns 0
if replacement was successful.
ProjectItem.clearOutPoint()
Section titled “ProjectItem.clearOutPoint()”app.project.rootItem.children[index].clearOutPoint()
Description
Section titled “Description”Clears any assigned out point; the project item will then start at startTime
.
Parameters
Section titled “Parameters”None
Returns
Section titled “Returns”Returns 0
if successful.
ProjectItem.createBin()
Section titled “ProjectItem.createBin()”app.project.rootItem.children[index].createBin(name)
Description
Section titled “Description”Creates an empty bin, within the project item. Only works within bins.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
name | String | A name of a new bin. |
Returns
Section titled “Returns”Returns a project item representing the new bin if successful, or 0
if unsuccessful.
ProjectItem.createSmartBin()
Section titled “ProjectItem.createSmartBin()”app.project.rootItem.children[index].createSmartBin(name, queryString)
Description
Section titled “Description”Creates a search bin; only works for bin project items.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
name | String | A name of a new bin. |
queryString | String | Query string for search. |
Returns
Section titled “Returns”Returns a projectItem representing the newly-created bin, if successful.
ProjectItem.createSubClip()
Section titled “ProjectItem.createSubClip()”app.project.rootItem.children[index].createSubClip(name, startTime, endTime, hasHardBoundaries, takeAudio, takeVideo)
Description
Section titled “Description”Creates a new project item for a sub-clip of the existing project item.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
name | String | A name of a new subclip. |
startTime | String | Start time of subclip, in ticks. |
endTime | String | End time of subclip, in ticks. |
hasHardBoundaries | Integer | If 1 , the user cannot extend in and out. |
takeVideo | Integer | If 1 , use video from source. |
takeAudio | Integer | If 1 , use audio from source. |
Returns
Section titled “Returns”Returns a project item representing the new subclip, or 0 if creation failed.
ProjectItem.deleteBin()
Section titled “ProjectItem.deleteBin()”app.project.rootItem.children[index].deleteBin()
Description
Section titled “Description”Deletes a bin and all its contents from the project.
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”Returns 0
if deletion was successful.
ProjectItem.findItemsMatchingMediaPath()
Section titled “ProjectItem.findItemsMatchingMediaPath()”app.project.rootItem.children[index].findItemsMatchingMediaPath(pathToMatch, ignoreSubClips)
Description
Section titled “Description”Returns an array of project items, all of which reference the same media path.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
pathToMatch | String | A path to match. |
ignoreSubClips | Integer | If 1 , no subclips will be returned. |
Returns
Section titled “Returns”Returns an array of project items, or 0
if no project items matching the matchPath
were found.
ProjectItem.getColorLabel()
Section titled “ProjectItem.getColorLabel()”app.project.rootItem.children[index].getColorLabel()
Description
Section titled “Description”Retrieves the project item’s color label.
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”Integer, one of:
0
= Violet1
= Iris2
= Caribbean3
= Lavender4
= Cerulean5
= Forest6
= Rose7
= Mango8
= Purple9
= Blue10
= Teal11
= Magenta12
= Tan13
= Green14
= Brown15
= Yellow
ProjectItem.getColorSpace()
Section titled “ProjectItem.getColorSpace()”app.project.rootItem.children[index].getColorSpace()
Description
Section titled “Description”Retrieves the project item’s colorspace properties.
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”Returns an item’s colorspace properties, an object consisting of:
name
transferCharacteristic
primaries
matrixEquation
Example
Section titled “Example”this will write the above info to the Events panel.
var colorSpace = app.project.rootItem.children[0].getColorSpace()app.setSDKEventMessage("Color Space " + " = " + colorSpace.name, 'info');app.setSDKEventMessage("Transfer Characteristic " + " = " + colorSpace.transferCharacteristic, 'info');app.setSDKEventMessage("Color Primaries " + " = " + colorSpace.primaries, 'info');app.setSDKEventMessage("Matrix Equation " + " = " + colorSpace.matrixEquation, 'info');
ProjectItem.getOriginalColorSpace()
Section titled “ProjectItem.getOriginalColorSpace()”app.project.rootItem.children[index].getOriginalColorSpace()
Description
Section titled “Description”Retrieves the project item’s colorspace properties .
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”Returns an item’s colorspace properties, an object consisting of:
name
transferCharacteristic
primaries
matrixEquation
Example
Section titled “Example”See ProjectItem.getColorSpace()
ProjectItem.getEmbeddedLUTID()
Section titled “ProjectItem.getEmbeddedLUTID()”app.project.rootItem.children[index].getEmbeddedLUTID()
Description
Section titled “Description”Retrieves the project item’s LUTID .
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”Returns an item’s LUTID
Example
Section titled “Example”Writes LUTID to Events panel.
var lutID = app.project.rootItem.children[0].getEmbeddedLUTID()app.setSDKEventMessage("LutID " + " = " + lutID, 'info');
ProjectItem.getInputLUTID()
Section titled “ProjectItem.getInputLUTID()”app.project.rootItem.children[index].getInputLUTID()
Description
Section titled “Description”Retrieves the project item’s Input LUTID .
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”Returns an item’s Input LUTID
Example
Section titled “Example”Writes Input LUTID to Events panel.
var lutID = app.project.rootItem.children[0].getInputLUTID()app.setSDKEventMessage("Input LutID " + " = " + inputLutID, 'info');
ProjectItem.getFootageInterpretation()
Section titled “ProjectItem.getFootageInterpretation()”app.project.rootItem.children[index].getFootageInterpretation()
Description
Section titled “Description”Returns a structure describing the current interpretation of the projectItem.
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”A footage interpretation structure, or 0
if unsuccessful.
Property | Type | Description |
---|---|---|
alphaUsage | Integer | Alpha, will be one of: |
- 0 - ALPHACHANNEL_NONE | ||
- 1 - ALPHACHANNEL_STRAIGHT | ||
- 2 - ALPHACHANNEL_PREMULTIPLIED | ||
- 3 - ALPHACHANNEL_IGNORE | ||
fieldType | Integer | Field type, one of: |
- -1 - FIELDTYPE_DEFAULT | ||
- 0 - FIELDTYPE_PROGRESSIVE | ||
- 1 - FIELDTYPE_UPPERFIRST | ||
- 2 - FIELDTYPE_LOWERFIRST | ||
ignoreAlpha | Boolean | true or false . |
invertAlpha | Boolean | true or false . |
frameRate | Float | Frame rate as floating point value. |
pixelAspectRatio | Float | Pixel aspect ratio as floating point value. |
removePulldown | Boolean | true or false . |
vrConformProjectionType | Integer | The projection type in use, for VR footage. One of |
- 0 - VR_CONFORM_PROJECTION_NONE | ||
- 1 - VR_CONFORM_PROJECTION_EQUIRECTANGULAR | ||
vrLayoutType | Integer | The layout of footage in use, for VR. One of |
- 0 - VR_LAYOUT_MONOSCOPIC | ||
- 1 - VR_LAYOUT_STEREO_OVER_UNDER | ||
- 2 - VR_LAYOUT_STEREO_SIDE_BY_SIDE | ||
vrHorizontalView | String | The horizontal view in use, for VR footage. |
vrVerticalView | String | The vertical view in use, for VR footage. |
ProjectItem.getInPoint()
Section titled “ProjectItem.getInPoint()”app.project.rootItem.children[index].getInPoint()
Description
Section titled “Description”Obtains the current project item in point.
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”A Time object, containing the in point.
ProjectItem.getMarkers()
Section titled “ProjectItem.getMarkers()”app.project.rootItem.children[index].getMarkers()
Description
Section titled “Description”Retrieves the MarkerCollection object associated with this project item.
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”MarkerCollection object, read-only;
ProjectItem.getMediaPath()
Section titled “ProjectItem.getMediaPath()”app.project.rootItem.children[index].getMediaPath()
Description
Section titled “Description”Returns the path associated with the project item’s media, as a String.
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”A String containing the path to the media associate with the project item.
ProjectItem.getOutPoint()
Section titled “ProjectItem.getOutPoint()”app.project.rootItem.children[index].getOutPoint(mediaType)
Description
Section titled “Description”Retrieves the current out point for specified media type.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
mediaType | Integer | Pass 1 for video only, or 2 for audio only. |
If no mediaType is passed, function gets the out point for all media. |
Returns
Section titled “Returns”Returns a Time object.
ProjectItem.getProjectMetadata()
Section titled “ProjectItem.getProjectMetadata()”app.project.rootItem.children[index].getProjectMetadata()
Description
Section titled “Description”Retrieves metadata associated with the project item. Distinct from media XMP.
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”A String containing all Premiere Pro private project metadata, serialized.
ProjectItem.getProjectColumnsMetadata()
Section titled “ProjectItem.getProjectColumnsMetadata()”app.project.rootItem.children[index].getProjectColumnsMetadata()
Description
Section titled “Description”Returns a JSON string to the user with all the metadata from the current project view layout
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”A JSON string that can be parsed with JSON.parse() method in the Javascript layer.
This generates a list of objects, each object representing a column. Each object will contain 4 key/value pairs: ColumnName
, ColumnValue
, ColumnID
, ColumnPath
.
ColumnName
andColumnValue
serve as informational key/value.ColumnID
andColumnPath
can be used to modify that column via the method setProjectMetadata() or setXMPMetadata().
For example:
Key | Value | Description |
---|---|---|
ColumnName | "Name" | Name of the column |
ColumnValue | "A014C003_180620_R205.mov" | Example of colummn value |
ColumnID | "Column.Intrinsic.Name" | ID of the colummn |
ColumnPath | "http://ns.adobe.com/premierePrivateProjectMetaData/1.0/" | Path of the column |
ProjectItem.getProxyPath()
Section titled “ProjectItem.getProxyPath()”app.project.rootItem.children[index].getProxyPath()
Description
Section titled “Description”Retrieves the path to the proxy media associated with this project item.
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”Returns the path (as String) to the proxy media associated with the proxy item, or 0
if none is found.
ProjectItem.getXMPMetadata()
Section titled “ProjectItem.getXMPMetadata()”app.project.rootItem.children[index].getXMPMetadata()
Description
Section titled “Description”Retrieves the XMP metadata associated with the project item, as a String.
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”A String containing all XMP metadata, serialized.
ProjectItem.hasProxy()
Section titled “ProjectItem.hasProxy()”app.project.rootItem.children[index].hasProxy()
Description
Section titled “Description”Indicates whether a proxy has already been attached, to the project item.
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”Returns true
if the project item has a proxy attached; false
if not.
ProjectItem.isMergedClip()
Section titled “ProjectItem.isMergedClip()”app.project.rootItem.children[index].isMergedClip()
Description
Section titled “Description”Indicates whether the project item refers to a merged clip.
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”Returns true
if the project item is a merged clip, false
if it isn’t.
ProjectItem.isMulticamClip()
Section titled “ProjectItem.isMulticamClip()”app.project.rootItem.children[index].isMulticamClip()
Description
Section titled “Description”Indicates whether the project item refers to a multicam clip.
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”Returns true
if the project item is a multicam clip, false
if it isn’t.
ProjectItem.isOffline()
Section titled “ProjectItem.isOffline()”app.project.rootItem.children[index].isOffline()
Description
Section titled “Description”Returns a Boolean indicating whether the project item is offline.
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”Boolean, true
if offline.
ProjectItem.isSequence()
Section titled “ProjectItem.isSequence()”app.project.rootItem.children[index].isSequence()
Description
Section titled “Description”Indicates whether the project item refers to a Sequence object.
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”Returns true
if the project item is a Sequence object, or a multicam clip, or a merged clip. Returns false
if it isn’t any of those.
ProjectItem.moveBin()
Section titled “ProjectItem.moveBin()”app.project.rootItem.children[index].moveBin(newParentBinProjectItem)
Description
Section titled “Description”Moves the projectItem into a new parent bin.
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”Returns 0
if move was successful.
ProjectItem.refreshMedia()
Section titled “ProjectItem.refreshMedia()”app.project.rootItem.children[index].refreshMedia()
Description
Section titled “Description”Forces Premiere Pro to update its representation of the media associated with the project item. If the media was previously off-line, this can cause it to become online (if previously missing media has become available).
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”An array of markers associated with the project item, or 0
if there are no markers.
ProjectItem.renameBin()
Section titled “ProjectItem.renameBin()”app.project.rootItem.children[index].renameBin(newName)
Description
Section titled “Description”Changes name of bin. Only works on project items which are bins.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
newName | String | A new bin name. |
Returns
Section titled “Returns”Returns 0
if renaming bin was successful.
ProjectItem.select()
Section titled “ProjectItem.select()”app.project.rootItem.children[index].select()
Description
Section titled “Description”Sets the project item (which must be a bin), as the target for subsequent imports into the project.
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”Returns 0
if the project item has successfully been made the target, for subsequent imports.
ProjectItem.setColorLabel()
Section titled “ProjectItem.setColorLabel()”app.project.rootItem.children[index].setColorLabel(labelColor)
Description
Section titled “Description”Sets the project item’s color label.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
labelColor | Integer | A label color; see ProjectItem.getColorLabel(). |
Returns
Section titled “Returns”0
if successful.
ProjectItem.setFootageInterpretation()
Section titled “ProjectItem.setFootageInterpretation()”app.project.rootItem.children[index].setFootageInterpretation(interpretation)
Description
Section titled “Description”Returns a structure describing the current interpretation of the projectItem.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
interpretation | A footage interpretation structure. |
Returns
Section titled “Returns”true
if successful.
ProjectItem.setInPoint()
Section titled “ProjectItem.setInPoint()”app.project.rootItem.children[index].setInPoint(time, mediaType)
Description
Section titled “Description”Sets the in point to timeInTicks
, for specified media types.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
time | String | A time in ticks. |
mediaType | Integer | Determining which media type to affect; pass 1 for video only, 2 for audio only, or 4 for all media types. |
Returns
Section titled “Returns”Returns 0
if successful.
ProjectItem.setOffline()
Section titled “ProjectItem.setOffline()”app.project.rootItem.children[index].setOffline()
Description
Section titled “Description”Makes the project item offline.
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”true
if successful.
ProjectItem.setOutPoint()
Section titled “ProjectItem.setOutPoint()”app.project.rootItem.children[index].setOutPoint(time, mediaType)
Description
Section titled “Description”Sets the out point to timeInTicks
, for specified media types.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
time | String | A time in ticks. |
mediaType | Integer | Determining which media type to affect; pass 1 for video only, 2 for audio only, or 4 for all media types. |
Returns
Section titled “Returns”Returns 0
if successful.
ProjectItem.setOverrideFrameRate()
Section titled “ProjectItem.setOverrideFrameRate()”app.project.rootItem.children[index].setOverrideFrameRate(newFrameRate)
Description
Section titled “Description”Sets the frame rate of the project item.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
newFrameRate | Float | The new frame rate. |
Returns
Section titled “Returns”Returns 0
if the frame rate has successfully been changed.
ProjectItem.setOverridePixelAspectRatio()
Section titled “ProjectItem.setOverridePixelAspectRatio()”app.project.rootItem.children[index].setOverridePixelAspectRatio(numerator, denominator)
Description
Section titled “Description”Sets the pixel aspect ratio for the project item.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
numerator | Integer | A new numerator. |
denominator | Integer | A new denominator. |
Returns
Section titled “Returns”Returns 0
if the aspect ratio has successfully been changed.
ProjectItem.setProjectMetadata()
Section titled “ProjectItem.setProjectMetadata()”app.project.rootItem.children[index].setProjectMetadata(newMetadata, updatedFields)
Description
Section titled “Description”Sets the private project metadata associated with the project item.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
newMetadata | String | A new, serialized private project metadata. |
updatedFields | Array of strings | An array containing the names of the fields to be updated. |
Returns
Section titled “Returns”Returns 0
if update was successful.
ProjectItem.setScaleToFrameSize()
Section titled “ProjectItem.setScaleToFrameSize()”app.project.rootItem.children[index].setScaleToFrameSize()
Description
Section titled “Description”Turns on scaling to frame size, for when media from this project item is inserted into a sequence.
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”Undefined return value.
ProjectItem.setStartTime()
Section titled “ProjectItem.setStartTime()”app.project.rootItem.children[index].setStartTime(time)
Description
Section titled “Description”Assigns a new start time to the project item
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
time | String | A new starting time, represented in ticks. |
Returns
Section titled “Returns”Returns 0
if successful.
ProjectItem.setXMPMetadata()
Section titled “ProjectItem.setXMPMetadata()”app.project.rootItem.children[index].setXMPMetadata(newXMP)
Description
Section titled “Description”Sets the XMP metadata associated with the project item.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
newXMP | String | A new, serialized XMP metadata. |
Returns
Section titled “Returns”Returns 0
if update was successful.
ProjectItem.startTime()
Section titled “ProjectItem.startTime()”app.project.rootItem.children[index].startTime()
Description
Section titled “Description”Returns a Time object, representing start time.
Parameters
Section titled “Parameters”None.
Returns
Section titled “Returns”ProjectItem.videoComponents()
Section titled “ProjectItem.videoComponents()”app.project.rootItem.children[index].videoComponents()
Description
Section titled “Description”Video components for the ‘Master Clip’ of this project item.
ComponentCollection object, read-only.