Timeline
Timeline.markers
property
Returns the Marker Collection
for this Timeline
.
Returns the Marker Collection
for this Timeline
.
Attributes
Timeline.settings -> 'TimelineSettings'
property
Returns the TimelineSettings
interface.
Timeline.custom_settings(True)
must be called first.
Timeline.name -> str
writable
property
Gets or sets timeline name
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
new timeline name |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
str
|
|
Timeline.start_frame -> int
property
Gets timeline start frame
Returns:
Name | Type | Description |
---|---|---|
int |
int
|
start frame |
Timeline.end_frame -> int
property
Gets timeline end frame
Returns:
Name | Type | Description |
---|---|---|
int |
int
|
end frame |
Timeline.timecode -> str
property
Gets current timecode
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
timecode |
Timeline.current_video_item -> 'TimelineItem'
property
Returns current video TimelineItem
Returns:
Name | Type | Description |
---|---|---|
TimelineItem |
'TimelineItem'
|
current |
Timeline.current_clip_thumbnail -> Dict[Any, Any]
property
Returns a dict with data containing metadata + raw thumbnail image data (RGB 8-bit image data encoded in base64 format) for current media in the Color Page.
Returns:
Name | Type | Description |
---|---|---|
dict |
Dict[Any, Any]
|
(keys "width", "height", "format" and "data") |
Functions
Timeline.custom_settings(use: bool) -> bool
Allows this timeline to have settings independent from the project settings. See Quickstart on Settings for more details.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
use |
bool
|
|
required |
Timeline.activate() -> bool
Makes this timeline active
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
Timeline.track_count(track_type: str) -> int
Gets track count on track_type
Parameters:
Name | Type | Description | Default |
---|---|---|---|
track_type |
str
|
valid |
required |
Raises:
Type | Description |
---|---|
ValueError
|
Not a valid track type |
Returns:
Name | Type | Description |
---|---|---|
int |
int
|
number of tracks |
Timeline.items(track_type: str, track_index: int) -> List['TimelineItem']
Gets TimelineItem
s from a track
Parameters:
Name | Type | Description | Default |
---|---|---|---|
track_type |
str
|
valid |
required |
track_index |
int
|
track index. Starts at |
required |
Raises:
Type | Description |
---|---|
ValueError
|
Not a valid track type |
Returns:
Type | Description |
---|---|
List[TimelineItem]
|
list of items at specified track |
Timeline.apply_grade_from_DRX(drx_path: str, grade_mode: int, timeline_items: List['TimelineItem']) -> bool
Applies drx grade on a list of
TimelineItem
s
Parameters:
Name | Type | Description | Default |
---|---|---|---|
drx_path |
str
|
path to a |
required |
grade_mode |
int
|
grade mode to use. |
required |
timeline_items |
List[TimelineItem]
|
timeline items to apply grade to |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
Timeline.get_track_name(track_type: str, track_index: int) -> str
Gets track name
Parameters:
Name | Type | Description | Default |
---|---|---|---|
track_type |
str
|
valid track_type: |
required |
track_index |
int
|
track index. Starts at |
required |
Raises:
Type | Description |
---|---|
ValueError
|
Not a valid track type |
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
track name |
Timeline.set_track_name(track_type: str, track_index: int, new_name: str) -> bool
Sets track name
Parameters:
Name | Type | Description | Default |
---|---|---|---|
track_type |
str
|
valid track_type: |
required |
track_index |
int
|
track index. Starts at |
required |
new_name |
str
|
new name |
required |
Raises:
Type | Description |
---|---|
ValueError
|
Not a valid track type |
Returns:
Type | Description |
---|---|
bool
|
|
Timeline.duplicate_timeline(timeline_name: Optional[str] = None) -> 'Timeline'
Duplicates this timeline
Parameters:
Name | Type | Description | Default |
---|---|---|---|
timeline_name |
str
|
New timeline name. If not provided, appends "Copy" to timeline name. |
None
|
Returns:
Type | Description |
---|---|
Timeline
|
new duplicated timeline |
Timeline.create_compound_clip(timeline_items: List['TimelineItem'], clip_info: Optional[Dict[Any, Any]] = None) -> 'TimelineItem'
Creates a compound clip using timeline_items
Parameters:
Name | Type | Description | Default |
---|---|---|---|
timeline_items |
List[TimelineItem]
|
list of |
required |
clip_info |
dict
|
optional compound clip settings. Valid dict:
|
None
|
Returns:
Type | Description |
---|---|
TimelineItem
|
compound clip |
Timeline.create_fusion_clip(timeline_items: List['TimelineItem']) -> 'TimelineItem'
Creates a Fusion clip with timeline_items
Parameters:
Name | Type | Description | Default |
---|---|---|---|
timeline_items |
List[TimelineItem]
|
timeline items to be used as input in the Fusion clip |
required |
Returns:
Type | Description |
---|---|
TimelineItem
|
resulting fusion clip |
Timeline.import_aaf_into_timeline(file_path: str, import_options: Optional[Dict[Any, Any]] = None) -> bool
Imports an aaf into the timeline
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file_path |
str
|
path to |
required |
import_options |
dict
|
optional import options. See description above. Defaults to {}. |
None
|
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
Timeline.export(file_name: str, export_type: str, export_subtype: Optional[str] = None) -> bool
Exports timeline file (.aaf, .xml, etc)
Supported export_type
:
"AAF"
"DRT"
"EDL"
"FCP_7_XML"
"FCPXML_1_3"
"FCPXML_1_4"
"FCPXML_1_5"
"FCPXML_1_6"
"FCPXML_1_7"
"FCPXML_1_8"
"HDR_10_PROFILE_A"
"HDR_10_PROFILE_B"
"TEXT_CSV"
"TEXT_TAB"
"DOLBY_VISION_VER_2_9"
"DOLBY_VISION_VER_4_0"
Supported export_subtype
:
"NONE"
"AAF_NEW"
"AAF_EXISTING"
"CDL"
"SDL"
"MISSING_CLIPS"
Export types and subtypes
Please note that export_subtype
is a required parameter for AAF
and EDL
. For rest of the export_type
, export_subtype
is ignored.
When export_type
is AAF
, valid export_subtype
values are AAF_NEW
and AAF_EXISTING
.
When export_type
is EXPORT_EDL
, valid export_dubtype values are EXPORT_CDL
, EXPORT_SDL
, EXPORT_MISSING_CLIPS
and EXPORT_NONE
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file_name |
str
|
full filepath to export to including file name |
required |
export_type |
_type_
|
supported export type |
required |
export_subtype |
_type_
|
supported export subtype |
None
|
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
Timeline.get_setting(settingname: Optional[str] = None) -> Union[str, int, float, Dict[Any, Any]]
This function is a fallback if using Timeline.settings
doesn't work.
Get timeline setting. If no setting provided, returns a dict with all settings.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
settingname |
str
|
setting name. |
None
|
Returns:
Type | Description |
---|---|
Union[str, int, float, Dict[Any, Any]]
|
Union[str, Dict]: setting(s) |
Timeline.set_setting(setting_name: str, value: Union[str, int, float, Dict[Any, Any]]) -> bool
This function is a fallback if using Timeline.settings
doesn't work.
Sets Timeline
setting seting_name
to value
Parameters:
Name | Type | Description | Default |
---|---|---|---|
setting_name |
str
|
setting name |
required |
value |
Union[str, int, Dict[Any, Any]
|
setting value |
required |
Returns:
Type | Description |
---|---|
bool
|
|
Timeline.insert_generator(generator_name: str) -> 'TimelineItem'
Inserts a generator in the timeline
Parameters:
Name | Type | Description | Default |
---|---|---|---|
generator_name |
str
|
generator name to be inserted |
required |
Returns:
Type | Description |
---|---|
TimelineItem
|
generator |
Timeline.insert_fusion_generator(generator_name: str) -> 'TimelineItem'
Inserts a fusion generator in the timeline
Parameters:
Name | Type | Description | Default |
---|---|---|---|
generator_name |
str
|
fusion generator name |
required |
Returns:
Type | Description |
---|---|
TimelineItem
|
fusion generator |
Timeline.insert_ofx_generator(generator_name: str) -> 'TimelineItem'
Inserts an OFX generator in the timeline
Parameters:
Name | Type | Description | Default |
---|---|---|---|
generator_name |
str
|
OFX generator name |
required |
Returns:
Type | Description |
---|---|
TimelineItem
|
OFX generator |
Timeline.insert_title(title_name: str) -> 'TimelineItem'
Inserts a title in the timeline
Parameters:
Name | Type | Description | Default |
---|---|---|---|
title_name |
str
|
title name |
required |
Returns:
Type | Description |
---|---|
TimelineItem
|
title |
Timeline.insert_fusion_title(title_name: str) -> 'TimelineItem'
Inserts a fusion title in the timeline
Parameters:
Name | Type | Description | Default |
---|---|---|---|
title_name |
str
|
fusion title name |
required |
Returns:
Type | Description |
---|---|
TimelineItem
|
fusion title |