Skip to content

TimelineItem

TimelineItem.markers property

Returns the Marker Collection for this TimelineItem.

Attributes

TimelineItem.name -> str property

Gets name of TimelineItem

Returns:

Name Type Description
str str

name

TimelineItem.duration -> int property

Get duration in frames

Returns:

Name Type Description
int int

duration in frames

TimelineItem.start -> int property

Returns the start frame position on the timeline.

Returns:

Name Type Description
int int

start frame position

TimelineItem.end -> int property

Returns the start frame position on the timeline.

Returns:

Name Type Description
int int

end frame position

TimelineItem.left_offset -> int property

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

Returns:

Name Type Description
int int

left offset frame count

TimelineItem.right_offset -> int property

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

Returns:

Name Type Description
int int

right offset frame count

TimelineItem.properties -> Dict[Any, Any] property

Gets all clip properties

Returns:

Name Type Description
dict Dict[Any, Any]

dict with clip properties

TimelineItem.flags -> List[str] property

Gets flag list

Returns:

Type Description
List[str]

List[str]: list of flags

TimelineItem.color -> str writable property

Gets or sets clip color

Parameters:

Name Type Description Default
color str

color to be applied

required

Returns:

Name Type Description
bool str

True if successful, False otherwise

TimelineItem.mediapoolitem -> 'MediaPoolItem' property

Returns the corresponding MediaPoolItem for this TimelineItem

Returns:

Name Type Description
MediaPoolItem 'MediaPoolItem'

MediaPoolItem

TimelineItem.take -> int writable property

Gets or sets current take

Parameters:

Name Type Description Default
takeindex int

take index for selection

required

TimelineItem.takes -> int property

Get total number of takes

Returns:

Name Type Description
int int

total number of takes

Functions

TimelineItem.set_property(key: str, value: Union[str, int, float]) -> bool

Sets property

Parameters:

Name Type Description Default
name str

property name

required
value Union[str, int, float]

property value

required

Returns:

Name Type Description
bool bool

True if successful, False otherwise

TimelineItem.add_flag(color: str) -> bool

Adds flag

Parameters:

Name Type Description Default
color str

valid flag

required

Returns:

Name Type Description
bool bool

True if successful, False otherwise

TimelineItem.clear_flags(color: str = 'All') -> bool

Clears all flags

Parameters:

Name Type Description Default
color str

clears flags by color. If All provided, clear all flags. Defaults to "All".

'All'

Returns:

Name Type Description
bool bool

description

TimelineItem.clear_color() -> bool

Clears clip color

Returns:

Name Type Description
bool bool

True if successful, False otherwise

TimelineItem.add_color_version(name: str, type: Literal['local', 'remote']) -> bool

Adds color version to this TimelineItem

Parameters:

Name Type Description Default
name str

version name

required
type Literal['local', 'remote']

whether to add a local or remote color version

required

Returns:

Name Type Description
bool bool

True if successful, False otherwise

TimelineItem.delete_color_version(name: str, type: Literal['local', 'remote']) -> bool

Adds color version from this TimelineItem

Parameters:

Name Type Description Default
name str

version name

required
type Literal['local', 'remote']

whether to delete a local or remote color version

required

Returns:

Name Type Description
bool bool

True if successful, False otherwise

TimelineItem.load_color_version(name: str, type: Literal['local', 'remote']) -> bool

Loads color version from TimelineItem named name

Parameters:

Name Type Description Default
name str

version name

required
type Literal['local', 'remote']

whether to load a local or remote color version

required

Returns:

Name Type Description
bool bool

True if successful, False otherwise

TimelineItem.rename_version(oldname: str, newname: str, type: Literal['local', 'remote']) -> bool

Renames a color version named oldname to newname on this TimelineItem

Parameters:

Name Type Description Default
oldname str

current version name

required
newname str

new version name

required
type Literal['local', 'remote']

whether to rename a local or remote color version

required

Returns:

Name Type Description
bool bool

True if successful, False otherwise

TimelineItem.set_lut(node_index: int, lut_path: str) -> bool

Sets LUT located on lut_path at node_index

Parameters:

Name Type Description Default
node_index int

node index

required
lut_path str

lut path

required

Returns:

Name Type Description
bool bool

True if successful, False otherwise

TimelineItem.get_lut(node_index: int) -> 'str'

Gets LUT at node_index

Parameters:

Name Type Description Default
node_index int

node index

required

Returns:

Name Type Description
str 'str'

LUT name. Example: 'Sony/SLog3SGamut3.CineToLC-709TypeA.cube'

TimelineItem.set_cdl(cdl: Dict[Any, Any]) -> bool

Sets CDL

Parameters:

Name Type Description Default
cdl dict

valid CDL dict

required
Example
myclip.set_cdl({"NodeIndex" : "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"})

Returns:

Name Type Description
bool bool

True if successful, False otherwise

TimelineItem.add_take(mediapool_item: 'MediaPoolItem', startframe: int = 0, endframe: int = 0) -> bool

Adds mediapool_item as a new take. Initializes a take selector for the timeline item if needed. By default, the full clip extents is added. startframe and endFrame are optional arguments used to specify the extents.

Parameters:

Name Type Description Default
mediapool_item MediaPoolItem

media pool item to add as take

required
startframe int

start frame for new take. Defaults to 0.

0
endframe int

end frame for new take. Defaults to 0.

0

Returns:

Name Type Description
bool bool

description

TimelineItem.take_info(takeindex: int = 0) -> Dict[Any, Any]

Gets take info. If no takeindex provided, uses current selected take.

Parameters:

Name Type Description Default
takeindex int

take index to get info from. Defaults to current take.

0

Returns:

Name Type Description
dict Dict[Any, Any]

description

TimelineItem.delete_take(takeindex: int) -> bool

Deletes take index with index takeindex

Parameters:

Name Type Description Default
takeindex int

take index to be deleted

required

Returns:

Name Type Description
bool bool

True if successful, False otherwise

TimelineItem.finalize_take(takeindex: int = 0) -> bool

Finalizes take at takeindex. If no takeindex provided, finalizes current take.

Parameters:

Name Type Description Default
takeindex int

take index to be finalized. Defaults to current take.

0

Returns:

Name Type Description
bool bool

description

TimelineItem.copy_grade_to(timeline_items: List['TimelineItem']) -> bool

Copies the current grade to all the items in timneline_items list

Parameters:

Name Type Description Default
timeline_items list

list with clips for the grade to be applied

required

Returns:

Name Type Description
bool bool

True if successful, False otherwise