MediaPool.import_media#

MediaPool.import_media(self, file_paths: List[str]) → List[pybmd.media_pool_item.MediaPoolItem][source]#

Imports specified file/folder paths into current Media Pool folder.

Args:

file_paths (List[str]): Input is an array of file/folder paths.

Returns:

List[MediaPoolItem]: Returns a list of the MediaPoolItem created.

Deprecated:

Deprecated calling convention since DaVinci Resolve 21.1.0, use import_media([ImportClipInfo(file_path=path), ...]) instead.

import_media(self, clip_info_list: List[ForwardRef(‘ImportClipInfo’)]) -> List[pybmd.media_pool_item.MediaPoolItem]
Imports file path(s) into current Media Pool folder as specified in the

ImportClipInfo list.

Each ImportClipInfo gets imported as one MediaPoolItem unless ‘Show Individual Frames’ is turned on.

Args:
clip_info_list (List[ImportClipInfo]): clip infos to import, e.g.

[ImportClipInfo("file_%03d.dpx", 1, 100)] imports “file_[001-100].dpx”.

Returns:
List[MediaPoolItem]: Returns a list of the MediaPoolItem created. Empty when

DaVinci Resolve imported nothing.

Note:

DaVinci Resolve only accepts this calling convention for image sequences, i.e. entries carrying start_index / end_index. Single media files import nothing and yield an empty list - pass their paths as strings instead.

import_media(self, clip_info_list: List[dict]) -> List[pybmd.media_pool_item.MediaPoolItem]
Imports file path(s) into current Media Pool folder as specified in the

clipInfo dict list.

Args:
clip_info_list (List[dict]): dicts of “FilePath” (str), “StartIndex” (int)

and “EndIndex” (int), e.g. [{"FilePath": "file_%03d.dpx", "StartIndex": 1, "EndIndex": 100}].

Returns:
List[MediaPoolItem]: Returns a list of the MediaPoolItem created. Empty when

DaVinci Resolve imported nothing.

Note:

DaVinci Resolve only accepts this calling convention for image sequences, i.e. dicts carrying “StartIndex” / “EndIndex”. Single media files import nothing and yield an empty list - pass their paths as strings instead.

Parameters:

file_paths (List[str])

Return type:

List[MediaPoolItem]