MediaPoolItem

Yanru MuAbout 2 min

MediaPoolItem

GetName()

Return: string

Returns the clip name.

GetMetadata(metadataType=None)

Return: string|dict

Returns the metadata value for the key metadataType.

If parameter is not specified, a dict of all set metadata properties is returned.

SetMetadata(metadataType, metadataValue)

Return: Bool

Sets the given metadata to metadataValue (string). Returns True if successful.

GetMediaId()

Return: string

Returns a unique ID name related to MediaPoolItem.

AddMarker(frameId, color, name, note, duration,customData)

Return: Bool

Creates a new marker at given frameId position and with given marker information.

customData is optional and helps to attach user specific data to the marker.

GetMarkers()

Return: {markers...}

Returns a dict (frameId -> {information}) of all markers and dicts with their information.

{
	96.0: 
		{
			'color': 'Green', 
			'duration': 1.0, 
			'note': '', 
			'name': 'Marker 1',
            'customData': ''
		}, 
	# ...
}

In the above example - there is one 'Green' marker at offset 96 (position of the marker)

Note

Before 16.2, return list of markers [markers...]

Returns a list of all markers and their information.

GetMarkerByCustomData(customData)

Return: {markers...}

Returns marker {information} for the first matching marker with specified customData.

GetMarkerCustomData(frameId)

Return: string

Returns customData string for the marker at given frameId position.

UpdateMarkerCustomData(frameId, customData)

Return: Bool

Updates customData (string) for the marker at given frameId position.

CustomData is not exposed via UI and is useful for scripting developer to attach any user specific data to markers.

DeleteMarkersByColor(color)

Return: Bool

Delete all markers of the specified color from the media pool item. "All" as argument deletes all color markers.

DeleteMarkerAtFrame(frameNum)

Return: Bool

Delete marker at frame number from the media pool item.

DeleteMarkerByCustomData(customData)

Return: Bool

Delete first matching marker with specified customData.

AddFlag(color)

Return: Bool

Adds a flag with given color (string).

GetFlagList()

Return: [colors...]

Returns a list of flag colors assigned to the item.

Note

Old version GetFlags() Deprecated

ClearFlags(color)

Return: Bool

Clears the flag of the given color if one exists. An "All" argument is supported and clears all flags.

GetClipColor()

Return: string

Returns an item color as a string.

SetClipColor(colorName)

Return: Bool

Sets color of an item based on the colorName (string).

ClearClipColor()

Return: Bool

Clears the item color.

GetClipProperty(propertyName)

Return: string|dict

Returns the property value for the key propertyName.

If no argument is specified, a dict of all clip properties is returned. Check the section below for more information.

SetClipProperty(propertyName, propertyValue)

Return: Bool

Sets the given property to propertyValue (string). Check the section below for more information.

LinkProxyMedia(propertyName)

Return: Bool

Links proxy media (absolute path) with the current clip.

UnlinkProxyMedia()

Return: Bool

Unlinks any proxy media associated with clip.

### ReplaceClip(filePath)

Return: Bool

Replaces the underlying asset and metadata of MediaPoolItem with the specified absolute clip path.

Last update:
Contributors: muyanru