MediaPool
Attributes
MediaPool.root_folder -> 'Folder'
property
Gets media pool root folder
Returns:
Type | Description |
---|---|
Folder
|
media pool root folder |
MediaPool.current_folder -> 'Folder'
property
Gets current mediapool folder
Returns:
Type | Description |
---|---|
Folder
|
current mediapool folder |
Functions
MediaPool.add_subfolder(folder_name: str, parent_folder: 'Folder') -> 'Folder'
Adds subfolder folder_name
into parent_folder
Parameters:
Name | Type | Description | Default |
---|---|---|---|
folder_name |
str
|
subfolder name |
required |
parent_folder |
Folder
|
parent folder object |
required |
Returns:
Type | Description |
---|---|
Folder
|
created subfolder |
MediaPool.create_empty_timeline(timeline_name: str) -> 'Timeline'
Creates empty timeline in current folder
Parameters:
Name | Type | Description | Default |
---|---|---|---|
timeline_name |
str
|
timeline name |
required |
Returns:
Type | Description |
---|---|
Timeline
|
created timeline |
MediaPool.append_to_timeline(clips: List['MediaPoolItem']) -> List['TimelineItem']
Appends a list of MediaPoolItem
s to current active timeline
Parameters:
Name | Type | Description | Default |
---|---|---|---|
clips |
List[MediaPoolItem]
|
list of |
required |
Returns:
Type | Description |
---|---|
List[TimelineItem]
|
list of inserted |
MediaPool.create_timeline_from_clips(name: str, clips: List['MediaPoolItem']) -> 'Timeline'
Creates timeline name
from clips
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
new timeline name |
required |
clips |
List[MediaPoolItem]
|
list of |
required |
Returns:
Type | Description |
---|---|
Timeline
|
created timeline |
MediaPool.import_timeline_fromfile(path: str, options: Optional[Dict[Any, Any]] = None) -> 'Timeline'
Imports a timeline from path
with options
:
options = {
"timelineName": str,
# specifies the name of the timeline to be created
"importSourceClips": bool,
# specifies whether source clips should be imported, True by default
"sourceClipsPath": str,
# specifies a filesystem path to search for source clips if the media
# is inaccessible in their original path and if "importSourceClips" is True
"sourceClipsFolders": List[Folder]
# to search for source clips if the media is not present in current folder
# and if "importSourceClips" is False
"interlaceProcessing": bool,
# specifies whether to enable interlace processing on the imported
# timeline being created. valid only for AAF import
}
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
timeline file path |
required |
options |
dict
|
Dict with import options. Defaults to |
None
|
Returns:
Type | Description |
---|---|
Timeline
|
created timeline |
MediaPool.delete_timelines(timelines: List['Timeline']) -> bool
Deletes timelines
Parameters:
Name | Type | Description | Default |
---|---|---|---|
timelines |
List[Timeline]
|
list of timelines to be deleted |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
Info
If you want to delete only one timeline, you can wrap it in a single element list.
MediaPool.set_current_folder(folder: 'Folder') -> bool
Sets current mediapool folder
Parameters:
Name | Type | Description | Default |
---|---|---|---|
folder |
Folder
|
desired |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
MediaPool.delete_clips(clips: List['MediaPoolItem']) -> bool
Delete clips
Parameters:
Name | Type | Description | Default |
---|---|---|---|
clips |
List[MediaPoolItem]
|
list of |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
MediaPool.delete_folders(folders: List['Folder']) -> bool
Delete folders
Parameters:
Name | Type | Description | Default |
---|---|---|---|
folders |
List[Folder]
|
list of |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
MediaPool.move_clips(clips: List['MediaPoolItem'], folder: 'Folder') -> bool
Moves clips
inside current active folder to folder
Parameters:
Name | Type | Description | Default |
---|---|---|---|
clips |
List[MediaPoolItem]
|
list of |
required |
folder |
Folder
|
destination folder |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
MediaPool.move_folders(folders: List['Folder'], target_folder: 'Folder') -> bool
Move folders
to target_folder
Parameters:
Name | Type | Description | Default |
---|---|---|---|
folders |
List[Folder]
|
List of folders to be moved. If you want to only use one folder, wrap it in a list. |
required |
target_folder |
Folder
|
target |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
MediaPool.clip_mattes(clip: 'MediaPoolItem') -> List[str]
Gets paths of clip mattes from clip
Parameters:
Name | Type | Description | Default |
---|---|---|---|
clip |
MediaPoolItem
|
clip to get mattes from |
required |
Returns:
Type | Description |
---|---|
List[str]
|
list of file paths associated with |
MediaPool.timeline_mattes(folder: 'Folder') -> List['MediaPoolItem']
Gets timeline mattes inside folder
Parameters:
Name | Type | Description | Default |
---|---|---|---|
folder |
Folder
|
folder to get timeline mattes from |
required |
Returns:
Type | Description |
---|---|
List[MediaPoolItem]
|
list of timeline mattes |
MediaPool.delete_mattes_by_path(clip: 'MediaPoolItem', path: List[str]) -> bool
Delete mattes based on their file paths.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
clip |
MediaPoolItem
|
clip to have mattes deleted |
required |
path |
List[str]
|
list of matte paths |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
description |
MediaPool.relink_clips(clips: List['MediaPoolItem'], parent_folder: str) -> bool
Update the folder location of specified media pool clips with the specified folder path.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
clips |
List[MediaPoolItem]
|
|
required |
parent_folder |
str
|
new parent folder |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
MediaPool.unlink_clips(clips: List['MediaPoolItem']) -> bool
Unlink clips
Parameters:
Name | Type | Description | Default |
---|---|---|---|
clips |
List[MediaPoolItem]
|
clips to be made offline |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
MediaPool.import_media(paths: List[str]) -> List['MediaPoolItem']
Import media from paths
Parameters:
Name | Type | Description | Default |
---|---|---|---|
paths |
List[str]
|
list of paths containing the media |
required |
Returns:
Type | Description |
---|---|
List[MediaPoolItem]
|
list of imported |
Image Sequences
Doesn't support image sequences yet.
MediaPool.export_metadata(file_name: str, clips: Optional[List['MediaPoolItem']] = None) -> bool
Exports metadata of specified clips to file_name.csv
.
If no clips are specified, all clips from MediaPool
will be used.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file_name |
str
|
description |
required |
clips |
List[MediaPoolItem]
|
list of clips to be processed, defaults to |
None
|
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|