TimelineItem

鬼猫猫大约 6 分钟

TimelineItem

基本信息 Basic Info

GetName()

返回值:string

Returns a name of the item.

GetDuration()

返回值:int

Returns a duration of item.

GetStart()

返回值:int

Returns a position of first frame.

GetEnd()

返回值:int

Returns a position of end frame.

GetLeftOffset()

返回值:int

Returns a maximum extension by frame for clip from left side.

GetRightOffset()

返回值:int

Returns a maximum extension by frame for clip from right side.

GetMediaPoolItem()

返回值:MediaPoolItem

Returns a corresponding to the timeline item media pool item if it exists.

SetLUT(nodeIndex, lutPath)

返回值:Bool

注意

16.2之后,nodeIndex 由原来的从 0 开始,改为了从 1 开始

Sets LUT on the node mapping the node index provided.

The lutPath can be a relative path or absolute path.

The operation will be successful for valid lut paths that Resolve has already discovered.

SetCDL([CDL map])

返回值:Bool

Keys of map are:

  • "NodeIndex"
  • "Slope"
  • "Offset"
  • "Power"
  • "Saturation"

注意

16.2之后,nodeIndex 由原来的从  0 开始,改为了从 1 开始

Example python code :

SetCDL({"NodeIndex" : "0", # 16.2 之后从 1 开始
        "Slope" : "0.5 0.4 0.2",
        "Offset" : "0.4 0.3 0.2",
        "Power" : "0.6 0.7 0.8",
        "Saturation" : "0.65"})

CopyGrades([tgtTimelineItems])

返回值:Bool

Copies grade to all the items in tgtTimelineItems list.

Returns true on success and false if any error occured.

GetStereoConvergenceValues()

返回值: {keyframes...}

Returns a table of keyframe offsets and respective convergence values

注意

版本 16.2之前,返回值为 [offset, value]

GetStereoLeftFloatingWindowParams()

返回值:{keyframes...}

For the LEFT eye -> returns a dict (offset -> dict) of keyframe offsets and respective floating window params.

Value at particular offset includes the left, right, top and bottom floating window values.

注意

在版本 16.2之前,返回值:[offset, value]

For the LEFT eye returns a table of keyframe offsets and respective floating window params.

Value at particular offset includes the left, right, top and bottom floating window values

GetStereoRightFloatingWindowParams()

版本:16.2

返回值:{keyframes...}

For the RIGHT eye -> returns a dict (offset -> dict) of keyframe offsets and respective floating window params.

Value at particular offset includes the left, right, top and bottom floating window values

注意

在版本:16.2 及之前,返回值:[offset, value]

For the RIGHT eye returns a table of keyframe offsets and respective floating window params.

Value at particular offset includes the left, right, top and bottom floating window values.

Maker 相关

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.

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.

DeleteMarkersByColor(color)

返回值:Bool

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

DeleteMarkerAtFrame(frameNum)

返回值:Bool

Delete marker at frame number from the timeline item.

DeleteMarkerByCustomData(customData)

返回值:Bool

Delete first matching marker with specified customData.

Flag 相关

AddFlag(color)

返回值:Bool

Adds a flag with given color (text).

GetFlagList()

返回值:[colors...]

Returns a list of flag colors assigned to the item.

注意

旧版本 GetFlags() 已弃用

ClearFlags(color)

返回值:Bool

Clears the flag of specified color from an item. If "All" argument is provided, all flags will be cleared.

Clip Color 相关

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 clip color of an item.

Version 相关

AddVersion(versionName, versionType)

返回值:Bool

Adds a new Version associated with the timeline item. versionType:

  • 0 - local
  • 1 - remote.

DeleteVersionByName(versionName, versionType)

返回值:Bool

Deletes Version by provided name. versionType:

  • 0 - local
  • 1 - remote.

LoadVersionByName(versionName, versionType)

返回值:Bool

Loads Version by provided name and sets it as active Version. versionType:

  • 0 - local
  • 1 - remote.

RenameVersionByName(oldName, newName, versionType)

返回值:Bool

Renames Version by provided name with new given name. versionType:

  • 0 - local
  • 1 - remote.

GetVersionNameList(versionType)

返回值:[names...]

Returns a list of version names by provided versionType:

  • 0 - local
  • 1 - remote.

注意

旧版本 GetVersionNames(versionType) 已弃用

Take 相关

AddTake(mediaPoolItem, startFrame, endFrame)

返回值:Bool

Adds a new take to take selector. It will initialise this timeline item as take selector if it's not already one.

Arguments startFrame and endFrame are optional, and if not specified the entire clip will be added.

GetSelectedTakeIndex()

返回值:int

Returns the index of currently selected take, or 0 if the clip is not a take selector.

GetTakesCount()

返回值:int

Returns the number of takes in take selector, or 0 if the clip is not a take selector.

GetTakeByIndex(idx)

返回值:map

Returns a map with take info for specified index, with keys:

  • "mediaPoolItem"
  • "startFrame"
  • "endFrame"

DeleteTakeByIndex(idx)

返回值:Bool

Deletes a take by index, 1 <= idx <= number of takes.

SelectTakeByIndex(idx)

返回值:Bool

Selects a take by index, 1 <= idx <= number of takes.

FinalizeTake()

返回值:Bool

Finalizes take selection.

Fusion 相关

GetFusionCompCount()

返回值:int

Returns the number of Fusion compositions associated with the timeline item.

GetFusionCompByIndex(compIndex)

返回值:fusionComp

Returns Fusion composition object based on given index.

1 <= compIndex <= timelineItem.GetFusionCompCount()

GetFusionCompNameList()

返回值:[names...]

Returns a list of Fusion composition names associated with the timeline item.

注意

旧版本 GetFusionCompNames() 已弃用

GetFusionCompByName(compName)

返回值:fusionComp

Returns Fusion composition object based on given name.

AddFusionComp()

返回值:fusionComp

Adds a new Fusion composition associated with the timeline item.

ImportFusionComp(path)

返回值:fusionComp

Imports Fusion composition from given file path by creating and adding a new composition for the item.

ExportFusionComp(path, compIndex)

返回值:fusionComp

Exports Fusion composition based on given index into provided file name path.

DeleteFusionCompByName(compName)

返回值:Bool

Deletes Fusion composition by provided name.

LoadFusionCompByName(compName)

返回值:fusionComp

Loads Fusion composition by provided name and sets it as active composition.

RenameFusionCompByName(oldName, newName)

返回值:Bool

Renames Fusion composition by provided name with new given name.

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