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).
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.
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.
Finalizes take selection.
Returns the item color.
Gets clip enabled status.
Returns the clip's color group if one exists.
Checks if color output cache is enabled for this timeline item.
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.
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.
Returns number of Fusion compositions associated with the timeline item.
Returns a list of Fusion composition names associated with the timeline item.
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.
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.
Returns a dict (frameId -> {information}) of all markers and dicts with their information.
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.
Returns the index of the currently selected take, or 0 if the clip is not a take selector.
Returns a string with TimelineItem's audio mapping information.
Returns the end frame position of the media pool clip in the timeline clip.
Returns the end time position of the media pool clip in the timeline clip.
Returns the start frame position of the media pool clip in the timeline clip.
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.
Returns a dict (offset -> value) of keyframe offsets and respective convergence values.
For the LEFT eye -> returns a dict (offset -> dict) of keyframe offsets and respective 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.
Returns the number of takes in take selector, or 0 if the clip is not a take selector.
Returns a list of two values that correspond to the TimelineItem's trackType (string) and trackIndex (int) respectively.
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.
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.
Returns True if magic mask was regenerated successfully, False otherwise.
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.
Performs Smart Reframe.
Returns True if stabilization was successful, False otherwise
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:
- 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:
- Returns:
True if successful, False otherwise.
- Return type:
- 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.
- add_version(version_name: str, version_type: VersionType) bool [source]
Adds a new color version for a video clip based on versionType
- clear_flags(color) bool [source]
Clears all flags of a given color.if color is empty, all flags are cleared.
- Return type:
- 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.
- delet_marker_at_frame(fram_num: int) bool [source]
Delete marker at frameNum from the timeline item.
- delete_marker_by_custom_data(custom_data) bool [source]
Delete first matching marker with specified customData.
- Return type:
- 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.
- delete_take_by_index(index: int) bool [source]
Deletes a take by index, 1 <= idx <= number of takes.
- delete_version_by_name(version_name: str, version_type: VersionType) bool [source]
Deletes a color version by name and versionType
- export_fusion_comp(path: str, comp_index: int) bool [source]
Exports the Fusion composition based on given compIndex to the path provided.
- get_end(subframe_precision: bool = False) int | float [source]
Returns the end frame position on the timeline.
- 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:
- get_fusion_comp_name_list() list [source]
Returns a list of Fusion composition names associated with the timeline item.
- Return type:
- get_left_offset(subframe_precision: bool = False) int | float [source]
Returns the maximum extension by frame for clip from left side.
- get_marker_by_custom_data(custom_data: str) dict [source]
Returns marker {information} for the first matching marker with specified customData.
- get_marker_custom_data(frame_id: int) str [source]
Returns customData string for the marker at given frameId position.
- 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_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.
- 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:
- get_start(subframe_precision: bool = False) int | float [source]
Returns the start frame position on the timeline.
- get_stereo_convergence_values() dict [source]
Returns a dict (offset -> value) of keyframe offsets and respective convergence values.
- Return type:
- 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:
- 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:
- get_take_by_index(index) dict [source]
Returns a dict (keys “startFrame”, “endFrame” and “mediaPoolItem”) with take info for specified index.
- Return type:
- 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:
- 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:
- 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.
- rename_fusion_comp_by_name(old_name: str, new_name: str) bool [source]
Renames the Fusion composition identified by oldName.
- rename_version_by_name(old_name: str, new_name: str, version_type: VersionType) bool [source]
Renames the color version identified by oldName and versionType
- select_take_by_index(index: int) bool [source]
Selects a take by index, 1 <= idx <= number of takes.
- 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:
- update_sidecar() bool [source]
Updates sidecar file for BRAW clips or RMD file for R3D clips.
- Return type:
- get_clip_enabled() bool [source]
Gets clip enabled status.
- Returns:
clip enabled status
- Return type:
- 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.
- 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:
- 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:
- stabilize() bool [source]
Returns True if stabilization was successful, False otherwise
- Returns:
Returns True if stabilization was successful, False otherwise
- Return type:
- smart_reframe() bool [source]
Performs Smart Reframe.
- Returns:
_descriReturns True if successful, False otherwise.
- Return type:
- 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:
- 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:
- 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:
- 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.
- get_source_audio_channel_mapping() str [source]
Returns a string with TimelineItem’s audio mapping information.
- Returns:
json formatted string
- Return type:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- set_color_output_cache(cache_value: str) bool [source]
Sets color output caching state. Equivalent to clip context menu action ‘Render Cache Color Output’.
- set_fusion_output_cache(cache_value: str) bool [source]
Sets fusion output caching state. Equivalent to clip context menu action ‘Render Cache Fusion Output’.
- 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: