Skip to content

ProjectItem object

app.project.rootItem.children[index]

Each item in a project is a ProjectItem, including the project root.


app.project.rootItem.children[index].children

An array of project items, contained within the specified project item.

ProjectItemCollection object, read-only.


app.project.rootItem.children[index].getAudioChannelMapping

The audio channel mapping currently applied to this ProjectItem.

An audioChannelMapping object.


app.project.rootItem.children[index].getOverrideColorSpaceList

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.


app.project.rootItem.children[index].name

The name of the project item.

String; read/write.

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');
}

app.project.rootItem.children[index].nodeId

A unique ID assigned to the project item, upon its addition to the project.

String; read-only.


app.project.rootItem.children[index].teamProjectsAssetId

The Team Projects Asset ID of the project item.

String; read-only.


app.project.rootItem.children[index].treePath

The current project location of the project item.

Example: \\ProjectName.prproj\\Media\\MXF\\filename.mxf

String; read-only.


app.project.rootItem.children[index].type

One of:

  • "CLIP"
  • "BIN"
  • "ROOT"
  • "FILE"

Enumerated value; read-only.


app.project.rootItem.children[index].attachProxy(mediaPath, isHiRes)

Attaches the media at newMediaPath to the project item, as either hi-res or proxy media.

ParameterTypeDescription
mediaPathStringThe path to the the newly-assigned media.
isHiResIntegerWhether the new media should be attached as the proxy 0, or high resolution 1 media.

Returns 0 if successful.


app.project.rootItem.children[index].canChangeMediaPath()

Returns true if Premiere Pro can change the path, associated with this project item; otherwise, returns false.

None.

Boolean; true if media can be replaced, false if not.


app.project.rootItem.children[index].canProxy()

Indicates whether it’s possible to attach a proxy, to this project item.

None.

Returns true if the project item permits a proxy to be attached; false if not.


app.project.rootItem.children[index].changeMediaPath(newPath)

Updates the project item to point to a new media path.

ParameterTypeDescription
newPathStringA new path to the media file.
overrideChecksBooleanOverride any safety concerns.

Returns 0 if replacement was successful.


app.project.rootItem.children[index].clearOutPoint()

Clears any assigned out point; the project item will then start at startTime.

None

Returns 0 if successful.


app.project.rootItem.children[index].createBin(name)

Creates an empty bin, within the project item. Only works within bins.

ParameterTypeDescription
nameStringA name of a new bin.

Returns a project item representing the new bin if successful, or 0 if unsuccessful.


app.project.rootItem.children[index].createSmartBin(name, queryString)

Creates a search bin; only works for bin project items.

ParameterTypeDescription
nameStringA name of a new bin.
queryStringStringQuery string for search.

Returns a projectItem representing the newly-created bin, if successful.


app.project.rootItem.children[index].createSubClip(name, startTime, endTime, hasHardBoundaries, takeAudio, takeVideo)

Creates a new project item for a sub-clip of the existing project item.

ParameterTypeDescription
nameStringA name of a new subclip.
startTimeStringStart time of subclip, in ticks.
endTimeStringEnd time of subclip, in ticks.
hasHardBoundariesIntegerIf 1, the user cannot extend in and out.
takeVideoIntegerIf 1, use video from source.
takeAudioIntegerIf 1, use audio from source.

Returns a project item representing the new subclip, or 0 if creation failed.


app.project.rootItem.children[index].deleteBin()

Deletes a bin and all its contents from the project.

None.

Returns 0 if deletion was successful.


app.project.rootItem.children[index].findItemsMatchingMediaPath(pathToMatch, ignoreSubClips)

Returns an array of project items, all of which reference the same media path.

ParameterTypeDescription
pathToMatchStringA path to match.
ignoreSubClipsIntegerIf 1, no subclips will be returned.

Returns an array of project items, or 0 if no project items matching the matchPath were found.


app.project.rootItem.children[index].getColorLabel()

Retrieves the project item’s color label.

None.

Integer, one of:

  • 0 = Violet
  • 1 = Iris
  • 2 = Caribbean
  • 3 = Lavender
  • 4 = Cerulean
  • 5 = Forest
  • 6 = Rose
  • 7 = Mango
  • 8 = Purple
  • 9 = Blue
  • 10 = Teal
  • 11 = Magenta
  • 12 = Tan
  • 13 = Green
  • 14 = Brown
  • 15 = Yellow

app.project.rootItem.children[index].getColorSpace()

Retrieves the project item’s colorspace properties.

None.

Returns an item’s colorspace properties, an object consisting of:

  • name
  • transferCharacteristic
  • primaries
  • matrixEquation

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');

app.project.rootItem.children[index].getOriginalColorSpace()

Retrieves the project item’s colorspace properties .

None.

Returns an item’s colorspace properties, an object consisting of:

  • name
  • transferCharacteristic
  • primaries
  • matrixEquation

See ProjectItem.getColorSpace()


app.project.rootItem.children[index].getEmbeddedLUTID()

Retrieves the project item’s LUTID .

None.

Returns an item’s LUTID

Writes LUTID to Events panel.

var lutID = app.project.rootItem.children[0].getEmbeddedLUTID()
app.setSDKEventMessage("LutID " + " = " + lutID, 'info');

app.project.rootItem.children[index].getInputLUTID()

Retrieves the project item’s Input LUTID .

None.

Returns an item’s Input LUTID

Writes Input LUTID to Events panel.

var lutID = app.project.rootItem.children[0].getInputLUTID()
app.setSDKEventMessage("Input LutID " + " = " + inputLutID, 'info');

app.project.rootItem.children[index].getFootageInterpretation()

Returns a structure describing the current interpretation of the projectItem.

None.

A footage interpretation structure, or 0 if unsuccessful.

PropertyTypeDescription
alphaUsageIntegerAlpha, will be one of:
- 0 - ALPHACHANNEL_NONE
- 1 - ALPHACHANNEL_STRAIGHT
- 2 - ALPHACHANNEL_PREMULTIPLIED
- 3 - ALPHACHANNEL_IGNORE
fieldTypeIntegerField type, one of:
- -1 - FIELDTYPE_DEFAULT
- 0 - FIELDTYPE_PROGRESSIVE
- 1 - FIELDTYPE_UPPERFIRST
- 2 - FIELDTYPE_LOWERFIRST
ignoreAlphaBooleantrue or false.
invertAlphaBooleantrue or false.
frameRateFloatFrame rate as floating point value.
pixelAspectRatioFloatPixel aspect ratio as floating point value.
removePulldownBooleantrue or false.
vrConformProjectionTypeIntegerThe projection type in use, for VR footage. One of
- 0 - VR_CONFORM_PROJECTION_NONE
- 1 - VR_CONFORM_PROJECTION_EQUIRECTANGULAR
vrLayoutTypeIntegerThe 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
vrHorizontalViewStringThe horizontal view in use, for VR footage.
vrVerticalViewStringThe vertical view in use, for VR footage.

app.project.rootItem.children[index].getInPoint()

Obtains the current project item in point.

None.

A Time object, containing the in point.


app.project.rootItem.children[index].getMarkers()

Retrieves the MarkerCollection object associated with this project item.

None.

MarkerCollection object, read-only;


app.project.rootItem.children[index].getMediaPath()

Returns the path associated with the project item’s media, as a String.

None.

A String containing the path to the media associate with the project item.


app.project.rootItem.children[index].getOutPoint(mediaType)

Retrieves the current out point for specified media type.

ParameterTypeDescription
mediaTypeIntegerPass 1 for video only, or 2 for audio only.
If no mediaType is passed, function gets the out point for all media.

Returns a Time object.


app.project.rootItem.children[index].getProjectMetadata()

Retrieves metadata associated with the project item. Distinct from media XMP.

None.

A String containing all Premiere Pro private project metadata, serialized.


app.project.rootItem.children[index].getProjectColumnsMetadata()

Returns a JSON string to the user with all the metadata from the current project view layout

None.

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.

For example:

KeyValueDescription
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

app.project.rootItem.children[index].getProxyPath()

Retrieves the path to the proxy media associated with this project item.

None.

Returns the path (as String) to the proxy media associated with the proxy item, or 0 if none is found.


app.project.rootItem.children[index].getXMPMetadata()

Retrieves the XMP metadata associated with the project item, as a String.

None.

A String containing all XMP metadata, serialized.


app.project.rootItem.children[index].hasProxy()

Indicates whether a proxy has already been attached, to the project item.

None.

Returns true if the project item has a proxy attached; false if not.


app.project.rootItem.children[index].isMergedClip()

Indicates whether the project item refers to a merged clip.

None.

Returns true if the project item is a merged clip, false if it isn’t.


app.project.rootItem.children[index].isMulticamClip()

Indicates whether the project item refers to a multicam clip.

None.

Returns true if the project item is a multicam clip, false if it isn’t.


app.project.rootItem.children[index].isOffline()

Returns a Boolean indicating whether the project item is offline.

None.

Boolean, true if offline.


app.project.rootItem.children[index].isSequence()

Indicates whether the project item refers to a Sequence object.

None.

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.


app.project.rootItem.children[index].moveBin(newParentBinProjectItem)

Moves the projectItem into a new parent bin.

None.

Returns 0 if move was successful.


app.project.rootItem.children[index].refreshMedia()

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).

None.

An array of markers associated with the project item, or 0 if there are no markers.


app.project.rootItem.children[index].renameBin(newName)

Changes name of bin. Only works on project items which are bins.

ParameterTypeDescription
newNameStringA new bin name.

Returns 0 if renaming bin was successful.


app.project.rootItem.children[index].select()

Sets the project item (which must be a bin), as the target for subsequent imports into the project.

None.

Returns 0 if the project item has successfully been made the target, for subsequent imports.


app.project.rootItem.children[index].setColorLabel(labelColor)

Sets the project item’s color label.

ParameterTypeDescription
labelColorIntegerA label color; see ProjectItem.getColorLabel().

0 if successful.


app.project.rootItem.children[index].setFootageInterpretation(interpretation)

Returns a structure describing the current interpretation of the projectItem.

ParameterTypeDescription
interpretationA footage interpretation structure.

true if successful.


app.project.rootItem.children[index].setInPoint(time, mediaType)

Sets the in point to timeInTicks, for specified media types.

ParameterTypeDescription
timeStringA time in ticks.
mediaTypeIntegerDetermining which media type to affect; pass 1 for video only, 2 for audio only, or 4 for all media types.

Returns 0 if successful.


app.project.rootItem.children[index].setOffline()

Makes the project item offline.

None.

true if successful.


app.project.rootItem.children[index].setOutPoint(time, mediaType)

Sets the out point to timeInTicks, for specified media types.

ParameterTypeDescription
timeStringA time in ticks.
mediaTypeIntegerDetermining which media type to affect; pass 1 for video only, 2 for audio only, or 4 for all media types.

Returns 0 if successful.


app.project.rootItem.children[index].setOverrideFrameRate(newFrameRate)

Sets the frame rate of the project item.

ParameterTypeDescription
newFrameRateFloatThe new frame rate.

Returns 0 if the frame rate has successfully been changed.


app.project.rootItem.children[index].setOverridePixelAspectRatio(numerator, denominator)

Sets the pixel aspect ratio for the project item.

ParameterTypeDescription
numeratorIntegerA new numerator.
denominatorIntegerA new denominator.

Returns 0 if the aspect ratio has successfully been changed.


app.project.rootItem.children[index].setProjectMetadata(newMetadata, updatedFields)

Sets the private project metadata associated with the project item.

ParameterTypeDescription
newMetadataStringA new, serialized private project metadata.
updatedFieldsArray of stringsAn array containing the names of the fields to be updated.

Returns 0 if update was successful.


app.project.rootItem.children[index].setScaleToFrameSize()

Turns on scaling to frame size, for when media from this project item is inserted into a sequence.

None.

Undefined return value.


app.project.rootItem.children[index].setStartTime(time)

Assigns a new start time to the project item

ParameterTypeDescription
timeStringA new starting time, represented in ticks.

Returns 0 if successful.


app.project.rootItem.children[index].setXMPMetadata(newXMP)

Sets the XMP metadata associated with the project item.

ParameterTypeDescription
newXMPStringA new, serialized XMP metadata.

Returns 0 if update was successful.


app.project.rootItem.children[index].startTime()

Returns a Time object, representing start time.

None.

Time object.


app.project.rootItem.children[index].videoComponents()

Video components for the ‘Master Clip’ of this project item.

ComponentCollection object, read-only.