MediaPoolItem

鬼猫猫大约 3 分钟

MediaPoolItem

GetName()

返回值: string

Returns the clip name.

GetMetadata(metadataType=None)

返回值: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)

返回值:Bool

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

GetMediaId()

返回值:string

Returns a unique ID name related to MediaPoolItem.

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

返回值: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()

返回值:{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)

注意

在版本16.2之前,返回值为列表 [markers...]

Returns a list of all markers and their information.

GetMarkerByCustomData(customData)

返回值: {markers...}

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

GetMarkerCustomData(frameId)

返回值: string

Returns customData string for the marker at given frameId position.

UpdateMarkerCustomData(frameId, customData)

返回值: 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)

返回值:Bool

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

DeleteMarkerAtFrame(frameNum)

返回值:Bool

Delete marker at frame number from the media pool item.

DeleteMarkerByCustomData(customData)

返回值:Bool

Delete first matching marker with specified customData.

AddFlag(color)

返回值:Bool

Adds a flag with given color (string).

GetFlagList()

返回值:[colors...]

Returns a list of flag colors assigned to the item.

注意

旧版本 GetFlags() 已弃用

ClearFlags(color)

返回值:Bool

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

GetClipColor()

返回值:string

Returns an item color as a string.

SetClipColor(colorName)

返回值:Bool

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

ClearClipColor()

返回值:Bool

Clears the item color.

GetClipProperty(propertyName)

返回值: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)

返回值:Bool

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

LinkProxyMedia(propertyName)

返回值:Bool

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

UnlinkProxyMedia()

返回值:Bool

Unlinks any proxy media associated with clip.

### ReplaceClip(filePath)

返回值:Bool

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

上次编辑于:
贡献者: muyanru,Yanru Mu