TimelineItem#

class pybmd.timeline_item.TimelineItem(timeline_item)[source]

Bases: object

TimelineItem Object

Methods

__init__(timeline_item)

add_flag(color)

Adds a flag with given color (string).

add_fusion_comp()

Adds a new Fusion composition associated with the timeline item.

add_marker(frame_id, color, name, note, ...)

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

add_take(media_pool_item, start_frame, end_frame)

Adds mediaPoolItem as a new take.

add_version(version_name, version_type)

Adds a new color version for a video clip based on versionType

assign_to_color_group(color_group)

Returns True if TiItem to successfully assigned to given ColorGroup.

clear_clip_color()

Clears the item color.

clear_flags(color)

Clears all flags of a given color.if color is empty, all flags are cleared.

copy_grades(target_timeline_items)

Copies the current node stack layer grade to the same layer for each item in target_timeline_items.

create_magic_mask(mode)

Returns True if magic mask was created successfully, False otherwise.

delet_marker_at_frame(fram_num)

Delete marker at frameNum from the timeline item.

delete_fusion_comp_by_name(comp_name)

Deletes the named Fusion composition.

delete_marker_by_color(color)

Delete all markers of the specified color from the timeline item.

delete_marker_by_custom_data(custom_data)

Delete first matching marker with specified customData.

delete_take_by_index(index)

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

delete_version_by_name(version_name, ...)

Deletes a color version by name and versionType

export_LUT(export_type, export_path)

Exports LUTs from tiItem

export_fusion_comp(path, comp_index)

Exports the Fusion composition based on given compIndex to the path provided.

finalize_take()

Finalizes take selection.

get_clip_color()

Returns the item color.

get_clip_enabled()

Gets clip enabled status.

get_color_group()

Returns the clip's color group if one exists.

get_color_output_cache_enabled()

Checks if color output cache is enabled for this timeline item.

get_current_version()

returns the current version of the timeline item

get_duration([subframe_precision])

Returns the item duration.

get_end([subframe_precision])

Returns the end frame position on the timeline.

get_flag_list()

Returns the end frame position on the timeline.

get_fusion_comp_by_index(comp_index)

Returns the Fusion composition object based on given compIndex.

get_fusion_comp_by_name(comp_name)

Returns the Fusion composition object based on given comp_name.

get_fusion_comp_count()

Returns number of Fusion compositions associated with the timeline item.

get_fusion_comp_name_list()

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

get_fusion_output_cache_enabled()

Checks if fusion output cache is enabled for this timeline item.

get_left_offset([subframe_precision])

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

get_linked_items()

Returns a list of linked timeline items.

get_marker_by_custom_data(custom_data)

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

get_marker_custom_data(frame_id)

Returns customData string for the marker at given frameId position.

get_markers()

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

get_media_pool_item()

Returns the media pool item corresponding to the timeline item if one exists.

get_name()

Returns the item name.

get_node_graph(layer_index)

Returns the clip's node graph object

get_property(property_key)

returns the value of the specified key.

get_right_offset([subframe_precision])

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

get_selected_take_index()

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

get_source_audio_channel_mapping()

Returns a string with TimelineItem's audio mapping information.

get_source_end_frame()

Returns the end frame position of the media pool clip in the timeline clip.

get_source_end_time()

Returns the end time position of the media pool clip in the timeline clip.

get_source_start_frame()

Returns the start frame position of the media pool clip in the timeline clip.

get_source_start_time()

Returns the start time position of the media pool clip in the timeline clip.

get_start([subframe_precision])

Returns the start frame position on the timeline.

get_stereo_convergence_values()

Returns a dict (offset -> value) of keyframe offsets and respective convergence values.

get_stereo_left_floating_window_params()

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

get_stereo_right_floating_window_params()

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

get_take_by_index(index)

Returns a dict (keys "startFrame", "endFrame" and "mediaPoolItem") with take info for specified index.

get_takes_count()

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

get_track_type_and_index()

Returns a list of two values that correspond to the TimelineItem's trackType (string) and trackIndex (int) respectively.

get_unique_id()

Returns a unique ID for the timeline item

get_version_name_list(version_type)

Returns a list of all color versions for the given versionType.

get_voice_isolation_state()

Returns the Voice Isolation State of the timeline item.

import_fusion_comp(path)

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

load_burn_in_preset(preset_name)

Loads user defined data burn in preset for clip when supplied presetName (string).

load_fusion_comp_by_name(comp_name)

Loads the named Fusion composition as the active composition.

load_version_by_name(version_name, version_type)

Loads a named color version as the active version.

regenerate_magic_mask()

Returns True if magic mask was regenerated successfully, False otherwise.

remove_from_color_group()

Returns True if the TiItem is successfully removed from the ColorGroup it is in.

rename_fusion_comp_by_name(old_name, new_name)

Renames the Fusion composition identified by oldName.

rename_version_by_name(old_name, new_name, ...)

Renames the color version identified by oldName and versionType

select_take_by_index(index)

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

set_cdl(cdl_map)

Sets the color correction lookup (CDL) for the timeline item.

set_clip_color(color_name)

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

set_clip_enabled(bool_value)

Sets clip enabled based on argument.

set_color_output_cache(cache_value)

Sets color output caching state.

set_fusion_output_cache(cache_value)

Sets fusion output caching state.

set_voice_isolation_state(voice_isolation_state)

Sets Voice Isolation state of the timeline item.

smart_reframe()

Performs Smart Reframe.

stabilize()

Returns True if stabilization was successful, False otherwise

update_sidecar()

Updates sidecar file for BRAW clips or RMD file for R3D clips.

get_markers() dict[source]

Returns a dict (frameId -> {information}) of all markers and dicts with their information. Example: a value of {96.0: {‘color’: ‘Green’, ‘duration’: 1.0, ‘note’: ‘’, ‘name’: ‘Marker 1’, ‘customData’: ‘’}, …} indicates a single green marker at clip offset 96

Return type:

dict

add_flag(color: str) bool[source]

Adds a flag with given color (string).

Parameters:

color (str)

Return type:

bool

add_fusion_comp() FusionComp[source]

Adds a new Fusion composition associated with the timeline item.

Return type:

FusionComp

add_marker(frame_id: str, color: str, name: str, note: str, duration: str, custom_data: str) bool[source]

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

Parameters:
  • frame_id (str) – frame position of the marker

  • color (str) – color of the marker

  • name (str) – name of the marker

  • note (str) – note of the marker

  • duration (str) – duration of the marker

  • custom_data (str) – custom data of the marker helps to attach user specific data to the marker.

Returns:

True if successful, False otherwise.

Return type:

bool

add_take(media_pool_item: MediaPoolItem, start_frame: int, end_frame: int) bool[source]

Adds mediaPoolItem as a new take. Initializes a take selector for the timeline item if needed. By default, the full clip extents is added.

Parameters:
  • media_pool_item (MediaPoolItem) – MeidaPoolItem object to add as a new take.

  • start_frame (int) – start frame of the take.

  • end_frame (int) – end frame of the take.

Returns:

True if successful, False otherwise.

Return type:

bool

add_version(version_name: str, version_type: VersionType) bool[source]

Adds a new color version for a video clip based on versionType

Parameters:
  • version_name (str) – version name

  • version_type (VersionType) – version type object

Returns:

True if successful, False otherwise.

Return type:

bool

clear_clip_color() bool[source]

Clears the item color.

Return type:

bool

clear_flags(color) bool[source]

Clears all flags of a given color.if color is empty, all flags are cleared.

Return type:

bool

copy_grades(target_timeline_items: List[TimelineItem]) bool[source]

Copies the current node stack layer grade to the same layer for each item in target_timeline_items. Returns True if successful.

Parameters:

target_timeline_items (List[TimelineItem])

Return type:

bool

delete_fusion_comp_by_name(comp_name: str) bool[source]

Deletes the named Fusion composition.

Parameters:

comp_name (str)

Return type:

bool

delet_marker_at_frame(fram_num: int) bool[source]

Delete marker at frameNum from the timeline item.

Parameters:

fram_num (int)

Return type:

bool

delete_marker_by_custom_data(custom_data) bool[source]

Delete first matching marker with specified customData.

Return type:

bool

delete_marker_by_color(color: str) bool[source]

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

Parameters:

color (str)

Return type:

bool

delete_take_by_index(index: int) bool[source]

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

Parameters:

index (int)

Return type:

bool

delete_version_by_name(version_name: str, version_type: VersionType) bool[source]

Deletes a color version by name and versionType

Parameters:
  • version_name (str) – version name to delete

  • version_type (VersionType) – VersionType object

Returns:

true if successful, false otherwise.

Return type:

bool

export_fusion_comp(path: str, comp_index: int) bool[source]

Exports the Fusion composition based on given compIndex to the path provided.

Parameters:
Return type:

bool

finalize_take() bool[source]

Finalizes take selection.

Return type:

bool

get_clip_color() str[source]

Returns the item color.

Return type:

str

get_current_version() dict[source]

returns the current version of the timeline item

Return type:

dict

get_duration(subframe_precision: bool = False) int | float[source]

Returns the item duration.

Parameters:

subframe_precision (bool)

Return type:

int | float

get_end(subframe_precision: bool = False) int | float[source]

Returns the end frame position on the timeline.

Parameters:

subframe_precision (bool)

Return type:

int | float

get_flag_list() list[source]

Returns the end frame position on the timeline.

Return type:

list

get_fusion_comp_by_index(comp_index: int) FusionComp[source]

Returns the Fusion composition object based on given compIndex. 1 <= compIndex <= timelineItem.get_fusion_comp_count()

Parameters:

comp_index (int)

Return type:

FusionComp

get_fusion_comp_by_name(comp_name: str) FusionComp[source]

Returns the Fusion composition object based on given comp_name.

Parameters:

comp_name (str)

Return type:

FusionComp

get_fusion_comp_count() int[source]

Returns number of Fusion compositions associated with the timeline item.

Return type:

int

get_fusion_comp_name_list() list[source]

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

Return type:

list

get_left_offset(subframe_precision: bool = False) int | float[source]

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

Parameters:

subframe_precision (bool)

Return type:

int | float

get_marker_by_custom_data(custom_data: str) dict[source]

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

Parameters:

custom_data (str)

Return type:

dict

get_marker_custom_data(frame_id: int) str[source]

Returns customData string for the marker at given frameId position.

Parameters:

frame_id (int)

Return type:

str

get_media_pool_item() MediaPoolItem[source]

Returns the media pool item corresponding to the timeline item if one exists.

Returns:

meida pool item object

Return type:

MediaPoolItem

get_name() str[source]

Returns the item name.

Return type:

str

get_property(property_key)[source]

returns the value of the specified key.

if no key is specified, the method returns a dictionary(python) or table(lua) for all supported keys

get_right_offset(subframe_precision: bool = False) int | float[source]

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

Parameters:

subframe_precision (bool)

Return type:

int | float

get_selected_take_index() int[source]

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

Return type:

int

get_start(subframe_precision: bool = False) int | float[source]

Returns the start frame position on the timeline.

Parameters:

subframe_precision (bool)

Return type:

int | float

get_stereo_convergence_values() dict[source]

Returns a dict (offset -> value) of keyframe offsets and respective convergence values.

Return type:

dict

get_stereo_left_floating_window_params() dict[source]

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.

Return type:

dict

get_stereo_right_floating_window_params() dict[source]

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.

Return type:

dict

get_take_by_index(index) dict[source]

Returns a dict (keys “startFrame”, “endFrame” and “mediaPoolItem”) with take info for specified index.

Return type:

dict

get_takes_count() int[source]

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

Return type:

int

get_version_name_list(version_type: VersionType) list[source]

Returns a list of all color versions for the given versionType.

Parameters:

version_type (VersionType) – VersionType object

Returns:

list of version names

Return type:

list

import_fusion_comp(path: str) FusionComp[source]

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

Parameters:

path (str) – path to the Fusion composition file

Returns:

Fusion composition object

Return type:

FusionComp

load_fusion_comp_by_name(comp_name: str) FusionComp[source]

Loads the named Fusion composition as the active composition.

Parameters:

comp_name (str)

Return type:

FusionComp

load_version_by_name(version_name: str, version_type: VersionType) bool[source]

Loads a named color version as the active version.

Parameters:
  • version_name (str) – version name to load

  • version_type (VersionType) – VersionType object

Returns:

True if successful, False otherwise

Return type:

bool

rename_fusion_comp_by_name(old_name: str, new_name: str) bool[source]

Renames the Fusion composition identified by oldName.

Parameters:
  • old_name (str)

  • new_name (str)

Return type:

bool

rename_version_by_name(old_name: str, new_name: str, version_type: VersionType) bool[source]

Renames the color version identified by oldName and versionType

Parameters:
  • old_name (str)

  • new_name (str)

  • version_type (VersionType)

Return type:

bool

select_take_by_index(index: int) bool[source]

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

Parameters:

index (int)

Return type:

bool

set_cdl(cdl_map: CDL_Map) bool[source]

Sets the color correction lookup (CDL) for the timeline item.

Parameters:

cdl_map (CDL_Map) – CDL_Map object

Returns:

True if successful, False otherwise

Return type:

bool

set_clip_color(color_name: str) bool[source]

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

Parameters:

color_name (str)

Return type:

bool

update_sidecar() bool[source]

Updates sidecar file for BRAW clips or RMD file for R3D clips.

Return type:

bool

get_unique_id() str[source]

Returns a unique ID for the timeline item

Return type:

str

set_clip_enabled(bool_value: bool) bool[source]

Sets clip enabled based on argument.

Parameters:

bool_value (bool) – Sets clip enabled based on argument.

Returns:

True for clip is enabled

Return type:

bool

get_clip_enabled() bool[source]

Gets clip enabled status.

Returns:

clip enabled status

Return type:

bool

load_burn_in_preset(preset_name: str) bool[source]

Loads user defined data burn in preset for clip when supplied presetName (string). Returns true if successful.

Parameters:

preset_name (str) – burn-in preset name

Returns:

Returns true if successful

Return type:

bool

create_magic_mask(mode: MagicMask_Mode) bool[source]

Returns True if magic mask was created successfully, False otherwise.

Parameters:

mode (MagicMask_Mode) – mode

Returns:

Returns True if magic mask was created successfully, False otherwise.

Return type:

bool

regenerate_magic_mask() bool[source]

Returns True if magic mask was regenerated successfully, False otherwise.

Returns:

Returns True if magic mask was regenerated successfully, False otherwise.

Return type:

bool

stabilize() bool[source]

Returns True if stabilization was successful, False otherwise

Returns:

Returns True if stabilization was successful, False otherwise

Return type:

bool

smart_reframe() bool[source]

Performs Smart Reframe.

Returns:

_descriReturns True if successful, False otherwise.

Return type:

bool

get_node_graph(layer_index: int) Graph[source]

Returns the clip’s node graph object

Parameters:

layer_index (int) – 1 <= layer_index <= project.GetSetting(“nodeStackLayers”).

Returns:

The clip’s node graph object at layer_index. Returns the first layer if layer_index is skipped.

Return type:

Graph

get_color_group() ColorGroup[source]

Returns the clip’s color group if one exists.

Returns:

the clip’s color group

Return type:

ColorGroup

assign_to_color_group(color_group: ColorGroup) bool[source]

Returns True if TiItem to successfully assigned to given ColorGroup.

Parameters:

color_group (ColorGroup) – ColorGroup must be an existing group in the current project.

Returns:

Returns True if TiItem to successfully assigned to given ColorGroup.

Return type:

bool

remove_from_color_group() bool[source]

Returns True if the TiItem is successfully removed from the ColorGroup it is in.

Returns:

Returns True if the TiItem is successfully removed from the ColorGroup it is in.

Return type:

bool

export_LUT(export_type: LUT_Export_Type, export_path: str) bool[source]

Exports LUTs from tiItem

Parameters:
  • export_type (LUT_Export_Type) – export lut type

  • export_path (str) – Saves generated LUT in the provided ‘path’ (string). ‘path’ should include the intended file name.If an empty or incorrect extension is provided, the appropriate extension (.cube/.vlt) will be appended at the end of the path.

Returns:

Returns True if successful, False otherwise.

Return type:

bool

get_linked_items() List[TimelineItem][source]

Returns a list of linked timeline items.

Returns:

a list of linked timeline items.

Return type:

List[TimelineItem]

get_track_type_and_index() Tuple[str, int][source]

Returns a list of two values that correspond to the TimelineItem’s trackType (string) and trackIndex (int) respectively.

Returns:

trackType is one of {“audio”, “video”, “subtitle”},1 <= trackIndex <= Timeline.GetTrackCount(trackType)

Return type:

Tuple[str,int]

get_source_audio_channel_mapping() str[source]

Returns a string with TimelineItem’s audio mapping information.

Returns:

json formatted string

Return type:

str

get_source_end_frame() int[source]

Returns the end frame position of the media pool clip in the timeline clip.

Returns:

end frame position of the media pool clip

Return type:

int

get_source_end_time() float[source]

Returns the end time position of the media pool clip in the timeline clip.

Returns:

end time position of the media pool clip

Return type:

float

get_source_start_frame() int[source]

Returns the start frame position of the media pool clip in the timeline clip.

Returns:

start frame position of the media pool clip

Return type:

int

get_source_start_time() float[source]

Returns the start time position of the media pool clip in the timeline clip.

Returns:

start time position of the media pool clip

Return type:

float

get_color_output_cache_enabled() bool[source]

Checks if color output cache is enabled for this timeline item.

Returns:

True if color output cache is enabled, False otherwise

Return type:

bool

get_fusion_output_cache_enabled() bool[source]

Checks if fusion output cache is enabled for this timeline item.

Returns:

True if fusion output cache is enabled or auto, False otherwise

Return type:

bool

set_color_output_cache(cache_value: str) bool[source]

Sets color output caching state. Equivalent to clip context menu action ‘Render Cache Color Output’.

Parameters:
  • cache_enabled (str) – Auto/ On/ Off

  • cache_value (str)

Returns:

True if successful, False otherwise

Return type:

bool

set_fusion_output_cache(cache_value: str) bool[source]

Sets fusion output caching state. Equivalent to clip context menu action ‘Render Cache Fusion Output’.

Parameters:
  • cache_enabled (str) – Auto/ On/ Off

  • cache_value (str)

Returns:

True if successful, False otherwise

Return type:

bool

get_voice_isolation_state() dict[source]

Returns the Voice Isolation State of the timeline item.

Returns:

Dictionary with keys {‘isEnabled’: bool, ‘amount’: int}.

amount is in range of [0, 100]

Return type:

dict

set_voice_isolation_state(voice_isolation_state: dict) bool[source]

Sets Voice Isolation state of the timeline item.

Parameters:

voice_isolation_state (dict) – Dictionary with keys {‘isEnabled’: bool, ‘amount’: int}. amount must be in range of [0, 100]

Returns:

True if successful, False otherwise

Return type:

bool