ProjectManager#
- class pybmd.project_manager.ProjectManager(project_manager)[source]
Bases:
WrapperBaseMethods
__init__(project_manager)archive_project(project_name, file_path[, ...])Archives project to provided filePath with the configuration as provided by the optional arguments
close_project(project)close project
create_cloud_project(cloud_setting)Creates and returns a cloud project.
create_folder(folder_name)Creates a folder if folderName(string) is unique.
create_project(project_name[, ...])Creates and returns a project if projectName(string) is unique, and None if it is not.
database_info(_DbType, _DbName[, _IpAddress])database_info(DbType, DbName, IpAddress) generated for the database connection
delete_folder(folder_name)Deletes the specified folder if it exists
delete_project(project_name)Delete project in the current folder if not currently loaded
export_project(project_name, file_path[, ...])Exports project to provided file path
Returns a dictionary (with keys DbType, DbName and optional IpAddress) corresponding to the current database connection
Returns the name of the current project folder, an empty string at the root.
Returns the current project
return database list
Returns a list of folder names in current folder.
Returns the attributes of every project in the current folder.
get_project_last_modified_time(project_name)Returns the last modified time of the given project.
Returns a list of project names in current folder.
Opens parent folder of current folder in database if current folder has parent.
Opens root folder in database.
import_cloud_project(file_path, cloud_setting)import_project(file_path, project_name)Imports a project from the file path provided with given project name.
load_cloud_project(cloud_setting)Loads and returns a cloud project with the following cloud settings if there is a match found, and None if there is no matching cloud project
load_project(project_name)Loads and returns the@Project with name = project_name (string) if there is a match found, and None if there is no matching Project.
open_folder(folder_name)Opens folder under given name.
restore_cloud_project(folder_path, cloud_setting)restore_project(file_path, project_name)Restores a project from the file path provided with given project name.
Saves the current project and closes it
Saves the currently loaded project with its own name.
set_current_database(database_info)Switches current database connection to the database specified by the keys below, and closes any open project.
- close_project(project: Project) bool[source]
close project
- Parameters:
project (Project) – project to close
- Returns:
true if project was closed, false otherwise
- Return type:
- create_project(project_name: str, media_location_path: str | None = None) Project[source]
Creates and returns a project if projectName(string) is unique, and None if it is not.
- delete_project(project_name: str) bool[source]
Delete project in the current folder if not currently loaded
- export_project(project_name: str, file_path: Path, with_stills_and_luts: bool = True) bool[source]
Exports project to provided file path
- get_current_database() dict[source]
Returns a dictionary (with keys DbType, DbName and optional IpAddress) corresponding to the current database connection
- Returns:
database infomation with keys DbType, DbName and optional IpAddress
- Return type:
- get_current_project() Project[source]
Returns the current project
- Return type:
Project
- get_folder_list_in_current_folder() List[str][source]
Returns a list of folder names in current folder.
- get_project_list_in_current_folder() List[str][source]
Returns a list of project names in current folder.
- goto_parent_folder() bool[source]
Opens parent folder of current folder in database if current folder has parent.
- Return type:
- get_current_folder() str[source]
Returns the name of the current project folder, an empty string at the root.
- Return type:
- import_project(file_path: Path, project_name: str) bool[source]
Imports a project from the file path provided with given project name. Returns True if successful.
- load_project(project_name) pybmd.project.Project[source]
Loads and returns the@Project with name = project_name (string) if there is a match found, and None if there is no matching Project.
- Return type:
pybmd.project.Project
- restore_project(file_path: Path, project_name: str) bool[source]
Restores a project from the file path provided with given project name. Returns True if successful.
- save_project() bool[source]
Saves the currently loaded project with its own name. Returns True if successful.
- Return type:
- set_current_database(database_info: dict) bool[source]
Switches current database connection to the database specified by the keys below, and closes any open project.
- archive_project(project_name, file_path, is_archive_src_media: bool = True, is_archive_render_cache: bool = True, is_archive_proxy_media: bool = False) bool[source]
Archives project to provided filePath with the configuration as provided by the optional arguments
- Parameters:
project_name (str) – project to archive
file_path (path) – file path to archive to
is_archive_src_media (bool, optional) – archive project with source media. Defaults to True.
is_archive_render_cache (bool, optional) – archive project with render cache. Defaults to True.
is_archive_proxy_media (bool, optional) – archive project with proxy media. Defaults to False.
- Returns:
Returns true if archive project is successful; false otherwise
- Return type:
- create_cloud_project(cloud_setting: CloudProjectsSetting) Project[source]
Creates and returns a cloud project.
- Parameters:
cloud_setting (CloudProjectsSetting) – settings for the cloud project
- Returns:
returns a cloud project
- Return type:
Project
- load_cloud_project(cloud_setting: CloudProjectsSetting) Project[source]
Loads and returns a cloud project with the following cloud settings if there is a match found, and None if there is no matching cloud project
- Parameters:
cloud_setting (CloudProjectsSetting) – cloud project settings
- Returns:
returns a cloud project
- Return type:
Project
- get_project_attributes_in_current_folder() Dict[str, ProjectAttributes][source]
Returns the attributes of every project in the current folder.
Companion to
get_project_list_in_current_folder(), which only returns the project names.- Returns:
- project name -> its attributes
(
lastModifiedDate,creationDate,notes,liveCollaborationMode)
- Return type:
Dict[str, ProjectAttributes]
- Raises:
APIVersionError – If Resolve version < 21.0.3
- Version:
Added in DaVinci Resolve 21.0.3
- get_project_last_modified_time(project_name: str) int[source]
Returns the last modified time of the given project.