MediaStorage#
- class pybmd.media_storage.MediaStorage(media_storage)[source]
Bases:
WrapperBaseMediaStorage.
Methods
__init__(media_storage)Adds specified media files as mattes for the specified MediaPoolItem
add_item_list_to_media_pool(items)Adds specified file/folder paths from Media Storage into current Media Pool folder.
Adds specified media files as timeline mattes in current media pool folder.
Returns the status of the current (or most recently started) clone job.
get_file_list(folder_path)Returns list of media and file listings in the given absolute folder path.
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.
set_clone_tool_settings([clone_tool_settings])Sets the options used by subsequent
start_clone_media()calls, and by the Clone Tool in the UI.start_clone_media(source_dir, target_dirs)Starts cloning media from 'source_dir' to 'target_dirs'.
Stops the clone job currently in progress, started via
start_clone_media().- add_clip_mattes_to_media_pool(media_pool_item: MediaPoolItem, paths: List[str], stereo_eye: str) bool[source]
Adds specified media files as mattes for the specified MediaPoolItem
- Parameters:
- Returns:
True if success, False if fail
- Return type:
- add_item_list_to_media_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]
- Deprecated:
Passing a list of plain paths is a deprecated calling convention since DaVinci Resolve 21.1.0. Pass a list of
Item_Infoinstead.
- 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.
- get_mounted_volume_list() List[str][source]
Returns list of folder paths corresponding to mounted volumes displayed in Resolve’s Media Storage.
- get_sub_folder_list(folder_path: str) List[str][source]
Returns list of folder paths in the given absolute folder path.
- reveal_in_storage(path: str) bool[source]
Expands and displays given file/folder path in Resolve’s Media Storage.
- start_clone_media(source_dir: str, target_dirs: str | List[str]) bool[source]
Starts cloning media from ‘source_dir’ to ‘target_dirs’.
Use
set_clone_tool_settings()to configurePreserveFolderNameandChecksumTypebeforehand.Note
Every target folder has to exist already - DaVinci Resolve returns False instead of creating it.
- Parameters:
- Returns:
Returns True if the clone job was started, False otherwise
- Return type:
- Raises:
APIVersionError – If Resolve version < 21.1.0
- Version:
Added in DaVinci Resolve 21.1.0
- stop_clone_media() bool[source]
Stops the clone job currently in progress, started via
start_clone_media().- Returns:
Returns True if successful, False if no clone job is in progress
- Return type:
- Raises:
APIVersionError – If Resolve version < 21.1.0
- Version:
Added in DaVinci Resolve 21.1.0
- get_clone_status() CloneStatus | dict[source]
Returns the status of the current (or most recently started) clone job.
- Returns:
- Clone job status, an empty dict if no status was returned.
JobStatusis “Complete” when no clone job has been started yet. Refer to ‘Clone Tool Settings’ section for details.
- Return type:
CloneStatus | dict
- Raises:
APIVersionError – If Resolve version < 21.1.0
- Version:
Added in DaVinci Resolve 21.1.0
- set_clone_tool_settings(clone_tool_settings: CloneToolSettings | dict | None = None) bool[source]
Sets the options used by subsequent
start_clone_media()calls, and by the Clone Tool in the UI.- Parameters:
clone_tool_settings (CloneToolSettings | dict, optional) – Clone tool settings. Resets to defaults when omitted. Refer to ‘Clone Tool Settings’ section for details. Defaults to None.
- Returns:
Returns True if successful, False otherwise
- Return type:
- Raises:
APIVersionError – If Resolve version < 21.1.0
- Version:
Added in DaVinci Resolve 21.1.0