MediaStorage#

class pybmd.media_storage.MediaStorage(media_storage)[source]

Bases: object

MediaStorage.

Methods

__init__(media_storage)

add_clip_mattes_to_media_pool(...[, stero_eye])

Adds specified media files as mattes for the specified MediaPoolItem

add_item_list_to_meida_pool(items)

Adds specified file/folder paths from Media Storage into current Media Pool folder.

add_timeline_mattes_to_media_pool(paths)

Adds specified media files as timeline mattes in current media pool folder.

get_file_list(folder_path)

Returns list of media and file listings in the given absolute folder path.

get_mounted_volume_list()

Returns list of folder paths corresponding to mounted volumes displayed in Resolve’s Media Storage.

get_sub_folder_list(folder_path)

Returns list of folder paths in the given absolute folder path.

reveal_in_storage(path)

Expands and displays given file/folder path in Resolve’s Media Storage.

add_clip_mattes_to_media_pool(media_pool_item: MediaPoolItem, paths: List[str], stero_eye: str = None) bool[source]

Adds specified media files as mattes for the specified MediaPoolItem

Parameters:
  • media_pool_item (MediaPoolItem) – MediaPoolItem to add mattes to

  • paths (List[str]) – file paths to add as mattes

  • stero_eye (str, optional) – specifying which eye to add the matte to for stereo clips (“left” or “right”). Defaults to None.

Returns:

True if success, False if fail

Return type:

bool

add_item_list_to_meida_pool(items: List[str] | List[Item_Info]) List[MediaPoolItem][source]

Adds specified file/folder paths from Media Storage into current Media Pool folder.

Parameters:
  • items (List[Item_Info]) – an array of file/folder paths

  • items – an array of Item_info

Returns:

a list of MediaPoolItem objects created from the added items

Return type:

List[MediaPoolItem]

add_timeline_mattes_to_media_pool(paths) List[MediaPoolItem][source]

Adds specified media files as timeline mattes in current media pool folder.

Parameters:

paths (_type_) – one or more file/folder paths.

Returns:

a list of created MediaPoolItem

Return type:

List[MediaPoolItem]

get_file_list(folder_path: str) List[str][source]

Returns list of media and file listings in the given absolute folder path.

Parameters:

folder_path (str) – absolute folder path

Returns:

file listings in the given absolute folder path NOTE:media listings may be logically consolidated entries

Return type:

List[str]

get_mounted_volume_list() List[str][source]

Returns list of folder paths corresponding to mounted volumes displayed in Resolve’s Media Storage.

Return type:

List[str]

get_sub_folder_list(folder_path: str) List[str][source]

Returns list of folder paths in the given absolute folder path.

Parameters:

folder_path (str)

Return type:

List[str]

reveal_in_storage(path: str) bool[source]

Expands and displays given file/folder path in Resolve’s Media Storage.

Parameters:

path (str)

Return type:

bool