Marker Collection
Attributes
markers.all -> List['Marker']
property
Returns a list with all Marker's
Returns:
| Type | Description |
|---|---|
List['Marker']
|
(List[Marker]) |
Functions
markers.add(frameid: int, color: COLORS, name: str, *, note: str = '', duration: int = 1, customdata: str = '', overwrite: bool = False) -> 'Marker'
Adds a marker.
customdata is a str that can be used for programatically
setting and searching for markers. It's not exposed to the GUI.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
frameid |
int
|
frame for marker to be inserted at |
required |
color |
str
|
marker color |
required |
name |
str
|
marker name |
required |
note |
str
|
marker note. Defaults to empty. |
''
|
duration |
int
|
marker duration. Defaults to 1 frame. |
1
|
customdata |
str
|
custom user data. Defaults to empty. |
''
|
overwrite |
bool
|
set to |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
bool |
'Marker'
|
|
markers.find(needle: str) -> Optional['Marker']
Finds the first marker that matches needle for the Marker's note, name or customdata
Returns:
| Type | Description |
|---|---|
Marker
|
first marker found with matching query |
markers.find_all(needle: str) -> Optional[List['Marker']]
Finds all markers that match needle for the Marker's note, name or customdata
Returns:
| Type | Description |
|---|---|
Optional[List[Marker]]
|
all markers found or if none found, returns |
markers.get_custom(customdata: str) -> Dict[Any, Any]
Gets custom marker by customdata
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
customdata |
str
|
custom data string |
required |
Returns:
| Name | Type | Description |
|---|---|---|
dict |
Dict[Any, Any]
|
dict with marker data |
markers.delete(*, frameid: int = 0, color: COLORS = '', customdata: str = '') -> bool
Deletes marker using frameid, color or customdata
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
frameid |
int
|
frameid to use for choosing which markers to delete |
0
|
color |
str
|
color to use for choosing which markers to delete |
''
|
customdata |
str
|
custom data to use for choosing which markers to delete |
''
|
Raises:
| Type | Description |
|---|---|
ValueError
|
no valid params provided |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
|
Deleting Markers
When selecting by frameid, will delete single marker
When selecting by color, will delete all markers with provided color
When selecting by customdata, will delete first marker with matching custom data
markers.delete_all() -> None
Deletes all markers
markers.fetch() -> None
Fetch all markers from Davinci Resolve and updates MarkerCollections internal cache. You probably won't need to use this.
Why not
You would only use this if during the middle of the script execution a user manually added a marker. Otherwise, a MarkerCollection knows about all the markers
it has deleted, added or updated, and .fetch() is run on the class initialization.