Project#
- class pybmd.project.Project(project)[source]
Bases:
WrapperBaseProject Object
Methods
__init__(project)add_color_group(group_name)Creates a new ColorGroup.
Adds a render job based on current render settings to the render queue.
Applies a Fairlight preset to the current timeline.
Deletes all render jobs in the render queue.
delete_color_group(color_group)Deletes the given color group and sets clips to ungrouped.
delete_project_settings_preset(preset_name)Deletes the project settings preset named preset_name.
delete_render_job(job_id)Deletes render job for input job id (string).
delete_render_preset(preset_name)Delete render preset by provided name
export_current_frame_as_still(file_path)Exports current frame as still to supplied filePath.
export_project_settings_preset(preset_name, ...)Exports the project settings preset named preset_name to export_path.
generate_speech(speech_generation_settings, ...)Generates an audio MediaPoolItem from the given speech generation settings.
Returns the audio codecs available for the given audio render format.
Returns a dict of available audio render formats.
Returns a list of all group objects in the timeline.
Returns a dict with currently selected format 'format' and render codec 'codec'.
Returns the render mode: 0 - Individual clips, 1 - Single clip.
Returns the currently loaded Timeline.
Returns the Gallery object.
Returns the MediaPool object.
get_name()Return project name
Returns a list of presets and their information.
Returns a list of project settings presets and their information.
Returns a list of names of all Quick Export render presets.
get_render_codecs(render_format)returns a dict with render codecs for a given render format.
Returns a dict (format -> file extension) of available render formats.
Returns a list of render jobs and their information.
get_render_job_status(job_id)Returns a dict with job status and completion percentage of the job by given jobId (string).
Returns a list of render presets and their information.
get_render_resolutions(format, codec)Returns list of resolutions applicable for the given render format (string) and render codec (string).
get_setting([setting_name])Returns value of project setting (indicated by setting_name, string).
Returns a dict with all project settings.
Returns Timeline at the given index, 1 <= idx <= project.get_timeline_count()
Returns the number of timelines currently present in the project.
Returns unique id of the project Object.
import_project_settings_preset(preset_file_path)Imports a project settings preset from preset_file_path.
Inserts the media specified by mediaPath (string) with startOffsetInSamples (int) and durationInSamples (int) at the playhead on a selected track on the Fairlight page.
Returns True if rendering is in progress.
load_burn_in_preset(preset_name)Loads user defined data burn in preset for project when supplied presetName (string).
load_render_preset(preset_name)Sets a preset as current preset for rendering if preset_name (string) exists.
Refreshes LUT List
render_with_quick_export(preset_name, param_dict)Starts a Quick Export render using the specified preset name and parameter dictionary.
Clears Intellisearch analysis data.
save_as_new_render_preset(preset_name)Creates new render preset by given name if preset_name(string) is unique.
Saves the current project settings as a new preset named preset_name.
set_current_render_format_and_codec(format, ...)Sets given render format (string) and render codec (string) as options for rendering.
set_current_render_mode(render_mode)Sets the render mode.
set_current_timeline(timeline)Sets given Timeline as current timeline for the project.
set_name(project_name)Sets project name if given project_name (string) is unique.
set_preset(preset_name)Sets preset by given preset_name (string) into project.
set_project_settings_preset(preset_name)Sets the project settings preset named preset_name into the project.
Enables or disables quick export for the render preset named preset_name.
set_render_settings(render_setting)Sets given settings for rendering.
set_setting(setting_name, setting_value)Sets value of project setting (indicated by setting_name, string).
set_settings(settings)Sets the project settings with the specified dict of setting names and values.
set_super_scale_enhanced(sharpness, ...)Sets Super Scale to the "2x Enhanced" multiplier.
start_rendering(job_ids[, is_interactive_mode])Start rendering.
Stops rendering.
update_project_settings_preset(preset_name)Updates the project settings preset named preset_name with the current settings.
update_render_preset(preset_name)Updates the render preset named preset_name with the current render settings.
- add_render_job() str[source]
Adds a render job based on current render settings to the render queue.
- Returns:
A unique job id (string) for the new render job.
- Return type:
- get_current_render_format_and_codec() dict[source]
Returns a dict with currently selected format ‘format’ and render codec ‘codec’.
- Return type:
- get_current_render_mode() int[source]
Returns the render mode: 0 - Individual clips, 1 - Single clip.
- Return type:
- get_current_timeline() Timeline[source]
Returns the currently loaded Timeline.
- Return type:
Timeline
- get_gallery() Gallery[source]
Returns the Gallery object.
- Return type:
Gallery
- get_media_pool() MediaPool[source]
Returns the MediaPool object.
- Return type:
MediaPool
- get_preset_list() list[source]
Returns a list of presets and their information.
- Deprecated:
Deprecated since DaVinci Resolve 21.1.0, use
get_project_settings_preset_list()instead.
- Return type:
- get_render_codecs(render_format: str) dict[source]
returns a dict with render codecs for a given render format.
- get_render_formats() dict[source]
Returns a dict (format -> file extension) of available render formats.
- Return type:
- get_render_job_list() list[source]
Returns a list of render jobs and their information.
- Return type:
- get_render_job_status(job_id: str) dict[source]
Returns a dict with job status and completion percentage of the job by given jobId (string).
- get_render_preset_list()[source]
Returns a list of render presets and their information.
- get_render_resolutions(format: str, codec: str) List[dict][source]
Returns list of resolutions applicable for the given render format (string) and render codec (string).
- get_setting(setting_name: str = '') str[source]
Returns value of project setting (indicated by setting_name, string).
- Deprecated:
Deprecated calling convention since DaVinci Resolve 21.1.0, use
get_settings()and index into the returned dict instead.
- get_timeline_by_index(idx) Timeline[source]
Returns Timeline at the given index, 1 <= idx <= project.get_timeline_count()
- Return type:
Timeline
- get_timeline_count() int[source]
Returns the number of timelines currently present in the project.
- Return type:
- load_render_preset(preset_name) bool[source]
Sets a preset as current preset for rendering if preset_name (string) exists.
- Return type:
- save_as_new_render_preset(preset_name) bool[source]
Creates new render preset by given name if preset_name(string) is unique.
- Return type:
- set_current_render_format_and_codec(format: str, codec: str) bool[source]
Sets given render format (string) and render codec (string) as options for rendering.
- set_current_timeline(timeline: Timeline) bool[source]
Sets given Timeline as current timeline for the project. Returns True if successful.
- Parameters:
timeline (Timeline)
- Return type:
- set_name(project_name) bool[source]
Sets project name if given project_name (string) is unique.
- Return type:
- set_preset(preset_name: str) bool[source]
Sets preset by given preset_name (string) into project.
- Deprecated:
Deprecated since DaVinci Resolve 21.1.0, use
set_project_settings_preset()instead.
- set_render_settings(render_setting: RenderSetting | dict) bool[source]
Sets given settings for rendering.
Only fields explicitly provided by the user are sent to DaVinci Resolve; any unset field keeps its current value in DR (partial update).
- set_setting(setting_name: str, setting_value: str)[source]
Sets value of project setting (indicated by setting_name, string).
- Parameters:
- Returns:
True if successful.
- Return type:
_type_
- Deprecated:
Deprecated calling convention since DaVinci Resolve 21.1.0, use
set_settings({setting_name: setting_value})instead.
- start_rendering(job_ids: list, is_interactive_mode=False) bool[source]
Start rendering. Returns True if successful. if job_ids==None render all queued render jobs.
- stop_rendering()[source]
Stops rendering.
- get_unique_id() str[source]
Returns unique id of the project Object.
- Returns:
Unique project ID
- Return type:
- Raises:
APIVersionError – If Resolve version < 18.0.0
- Version:
Added in DaVinci Resolve 18.0.0
- insert_audio_to_current_track_at_playhead(media_path: str, start_offset_in_samples: int, duration_in_samples: int) bool[source]
Inserts the media specified by mediaPath (string) with startOffsetInSamples (int) and durationInSamples (int) at the playhead on a selected track on the Fairlight page.
- Parameters:
- Returns:
Returns True if successful, otherwise False.
- Return type:
- Raises:
APIVersionError – If Resolve version < 18.1.3
- Version:
Added in DaVinci Resolve 18.1.3
- load_burn_in_preset(preset_name: str) bool[source]
Loads user defined data burn in preset for project when supplied presetName (string).
- Parameters:
preset_name (str) – preset name
- Returns:
Returns true if successful.
- Return type:
- Raises:
APIVersionError – If Resolve version < 18.5.0
- Version:
Added in DaVinci Resolve 18.5.0 Beta
- export_current_frame_as_still(file_path: str) bool[source]
Exports current frame as still to supplied filePath.
- Parameters:
file_path (str) – exported still path.filePath must end in valid export file format.
- Returns:
Returns True if successful, False otherwise.
- Return type:
- Raises:
APIVersionError – If Resolve version < 18.5.0
- Version:
Added in DaVinci Resolve 18.5.0
- get_color_groups_list() List[ColorGroup][source]
Returns a list of all group objects in the timeline.
- Returns:
a list of all group objects
- Return type:
List[ColorGroup]
- Raises:
APIVersionError – If Resolve version < 19.0.0
- Version:
Added in DaVinci Resolve 19.0.0
- add_color_group(group_name: str) ColorGroup[source]
Creates a new ColorGroup.
- Parameters:
group_name (str) – groupName must be a unique string.
- Returns:
ColorGroup object if successful, otherwise None.
- Return type:
ColorGroup
- delete_color_group(color_group: ColorGroup) bool[source]
Deletes the given color group and sets clips to ungrouped.
- Parameters:
color_group (ColorGroup) – color group object to delete
- Returns:
Return True if successful, otherwise False.
- Return type:
- delete_render_preset(preset_name: str) bool[source]
Delete render preset by provided name
- Parameters:
preset_name (str) – preset name
- Returns:
Returns True if successful, otherwise False.
- Return type:
- Raises:
APIVersionError – If Resolve version < 19.1.0
- Version:
Added in DaVinci Resolve 19.1.0
- get_quick_export_render_presets() List[str][source]
Returns a list of names of all Quick Export render presets.
- render_with_quick_export(preset_name: str, param_dict: Dict[str, Any]) Dict[str, Any][source]
Starts a Quick Export render using the specified preset name and parameter dictionary.
- Parameters:
- Returns:
A dictionary containing the job status and render time, or an error string if the render failed or was not attempted.
- Return type:
Dict[str, Any]
- apply_fairlight_preset_to_current_timeline(preset_name: str) bool[source]
Applies a Fairlight preset to the current timeline.
- Parameters:
preset_name (str) – Name of the Fairlight preset to apply.
- Returns:
True if successful, False otherwise.
- Return type:
- Raises:
APIVersionError – If Resolve version < 20.3.0
- Version:
Added in DaVinci Resolve 20.3.0
- reset_intellisearch_analysis() bool[source]
Clears Intellisearch analysis data.
Studio-only. Refer to DaVinci Resolve’s “Studio and AI Scripting APIs” prerequisites; returns False if requirements are not met.
- Returns:
True if successful, False otherwise.
- Return type:
- Raises:
APIVersionError – If Resolve version < 21.0.2
- Version:
Added in DaVinci Resolve 21.0.2
- generate_speech(speech_generation_settings: SpeechGenerationSettings | dict, timecode: str) MediaPoolItem[source]
Generates an audio MediaPoolItem from the given speech generation settings.
Adds the generated clip to the timeline at
timecodewhen the settings’AddToTimelineis True. Studio-only (requires the AI Speech Generator Extras download); returns the API’s result unwrapped if requirements are not met.- Parameters:
- Returns:
The newly generated audio MediaPoolItem.
- Return type:
MediaPoolItem
- Raises:
APIVersionError – If Resolve version < 21.0.2
- Version:
Added in DaVinci Resolve 21.0.2
- get_settings() Dict[source]
Returns a dict with all project settings.
This is the dict-based replacement for the single-key
get_setting(). Refer to DaVinci Resolve’s “Project and Clip Properties” documentation for the supported keys.- Returns:
all project settings
- Return type:
Dict
- Raises:
APIVersionError – If Resolve version < 21.1.0
- Version:
Added in DaVinci Resolve 21.1.0
- set_settings(settings: Dict) bool[source]
Sets the project settings with the specified dict of setting names and values.
This is the dict-based replacement for the single-key
set_setting().- Parameters:
settings (Dict) – dict of setting names and values
- Returns:
True if successful, False otherwise.
- Return type:
- Raises:
APIVersionError – If Resolve version < 21.1.0
- Version:
Added in DaVinci Resolve 21.1.0
- get_project_settings_preset_list() List[ProjectSettingsPresetInfo][source]
Returns a list of project settings presets and their information.
- Returns:
- preset information (
Name,Width, Height)
- preset information (
- Return type:
List[ProjectSettingsPresetInfo]
- Raises:
APIVersionError – If Resolve version < 21.1.0
- Version:
Added in DaVinci Resolve 21.1.0
- set_project_settings_preset(preset_name: str) bool[source]
Sets the project settings preset named preset_name into the project.
- Parameters:
preset_name (str) – name of the project settings preset
- Returns:
True if successful, False otherwise.
- Return type:
- Raises:
APIVersionError – If Resolve version < 21.1.0
- Version:
Added in DaVinci Resolve 21.1.0
- update_project_settings_preset(preset_name: str) bool[source]
Updates the project settings preset named preset_name with the current settings.
- Parameters:
preset_name (str) – name of the project settings preset
- Returns:
True if successful, False otherwise.
- Return type:
- Raises:
APIVersionError – If Resolve version < 21.1.0
- Version:
Added in DaVinci Resolve 21.1.0
- delete_project_settings_preset(preset_name: str) bool[source]
Deletes the project settings preset named preset_name.
- Parameters:
preset_name (str) – name of the project settings preset
- Returns:
True if successful, False otherwise.
- Return type:
- Raises:
APIVersionError – If Resolve version < 21.1.0
- Version:
Added in DaVinci Resolve 21.1.0
- import_project_settings_preset(preset_file_path: str, preset_name: str = '') bool[source]
Imports a project settings preset from preset_file_path.
- Parameters:
- Returns:
True if successful, False otherwise.
- Return type:
- Raises:
APIVersionError – If Resolve version < 21.1.0
- Version:
Added in DaVinci Resolve 21.1.0
- export_project_settings_preset(preset_name: str, export_path: str) bool[source]
Exports the project settings preset named preset_name to export_path.
- Parameters:
- Returns:
True if successful, False otherwise.
- Return type:
- Raises:
APIVersionError – If Resolve version < 21.1.0
- Version:
Added in DaVinci Resolve 21.1.0
- save_current_project_settings_as_new_preset(preset_name: str) bool[source]
Saves the current project settings as a new preset named preset_name.
- Parameters:
preset_name (str) – name of the new project settings preset
- Returns:
True if successful, False otherwise.
- Return type:
- Raises:
APIVersionError – If Resolve version < 21.1.0
- Version:
Added in DaVinci Resolve 21.1.0
- update_render_preset(preset_name: str) bool[source]
Updates the render preset named preset_name with the current render settings.
- Parameters:
preset_name (str) – name of the render preset
- Returns:
True if successful, False otherwise.
- Return type:
- Raises:
APIVersionError – If Resolve version < 21.1.0
- Version:
Added in DaVinci Resolve 21.1.0
- set_quick_export_enabled_for_render_preset(preset_name: str, is_enabled: bool) bool[source]
Enables or disables quick export for the render preset named preset_name.
- Parameters:
- Returns:
True if successful, False otherwise.
- Return type:
- Raises:
APIVersionError – If Resolve version < 21.1.0
- Version:
Added in DaVinci Resolve 21.1.0
- get_audio_render_formats() Dict[str, str][source]
Returns a dict of available audio render formats.
Maps each format description to its file extension, e.g.
{"QuickTime": "mov", "Wave": "wav", ...}.- Returns:
format description -> file extension
- Return type:
- Raises:
APIVersionError – If Resolve version < 21.1.0
- Version:
Added in DaVinci Resolve 21.1.0
- get_audio_render_codecs(audio_render_format_file_extension: str) Dict[str, str][source]
Returns the audio codecs available for the given audio render format.
- Parameters:
audio_render_format_file_extension (str) – file extension of the audio render format, as returned by
get_audio_render_formats(), e.g."mov".- Returns:
codec description -> codec name
- Return type:
- Raises:
APIVersionError – If Resolve version < 21.1.0
- Version:
Added in DaVinci Resolve 21.1.0
- set_super_scale_enhanced(sharpness: float, noise_reduction: float) bool[source]
Sets Super Scale to the “2x Enhanced” multiplier.
“2x Enhanced” is the one Super Scale mode that cannot be selected through
set_settings(): it needs the four-argumentSetSetting("superScale", 2, sharpness, noiseReduction)calling convention, which is the onlySetSettingconvention DaVinci Resolve 21.1.0 did not deprecate, precisely because it has noSetSettingsequivalent.Every other Super Scale multiplier goes through
set_settings({"superScale": value})with 0=Auto, 1=none, 2=2x, 3=3x, 4=4x.- Parameters:
- Returns:
True if successful, False otherwise
- Return type:
Note
Read the applied strengths back with the read-only settings
superScaleSharpnessStrengthandsuperScaleNoiseReductionStrength. Both strengths persist until this method changes them again - selecting another multiplier throughset_settings()leaves them untouched.