Project#

class pybmd.project.Project(project)[source]

Bases: WrapperBase

Project Object

Methods

__init__(project)

add_color_group(group_name)

Creates a new ColorGroup.

add_render_job()

Adds a render job based on current render settings to the render queue.

apply_fairlight_preset_to_current_timeline(...)

Applies a Fairlight preset to the current timeline.

delete_all_render_jobs()

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.

get_audio_render_codecs(...)

Returns the audio codecs available for the given audio render format.

get_audio_render_formats()

Returns a dict of available audio render formats.

get_color_groups_list()

Returns a list of all group objects in the timeline.

get_current_render_format_and_codec()

Returns a dict with currently selected format 'format' and render codec 'codec'.

get_current_render_mode()

Returns the render mode: 0 - Individual clips, 1 - Single clip.

get_current_timeline()

Returns the currently loaded Timeline.

get_gallery()

Returns the Gallery object.

get_media_pool()

Returns the MediaPool object.

get_name()

Return project name

get_preset_list()

Returns a list of presets and their information.

get_project_settings_preset_list()

Returns a list of project settings presets and their information.

get_quick_export_render_presets()

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.

get_render_formats()

Returns a dict (format -> file extension) of available render formats.

get_render_job_list()

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).

get_render_preset_list()

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_self_project()

get_setting([setting_name])

Returns value of project setting (indicated by setting_name, string).

get_settings()

Returns a dict with all project settings.

get_timeline_by_index(idx)

Returns Timeline at the given index, 1 <= idx <= project.get_timeline_count()

get_timeline_count()

Returns the number of timelines currently present in the project.

get_unique_id()

Returns unique id of the project Object.

import_project_settings_preset(preset_file_path)

Imports a project settings preset from preset_file_path.

insert_audio_to_current_track_at_playhead(...)

Inserts the media specified by mediaPath (string) with startOffsetInSamples (int) and durationInSamples (int) at the playhead on a selected track on the Fairlight page.

is_rendering_in_progress()

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.

refresh_lut_list()

Refreshes LUT List

render_with_quick_export(preset_name, param_dict)

Starts a Quick Export render using the specified preset name and parameter dictionary.

reset_intellisearch_analysis()

Clears Intellisearch analysis data.

save_as_new_render_preset(preset_name)

Creates new render preset by given name if preset_name(string) is unique.

save_current_project_settings_as_new_preset(...)

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.

set_quick_export_enabled_for_render_preset(...)

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.

stop_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:

str

delete_all_render_jobs() → bool[source]

Deletes all render jobs in the render queue.

Return type:

bool

delete_render_job(job_id: str) → bool[source]

Deletes render job for input job id (string).

Parameters:

job_id (str)

Return type:

bool

get_current_render_format_and_codec() → dict[source]

Returns a dict with currently selected format ‘format’ and render codec ‘codec’.

Return type:

dict

get_current_render_mode() → int[source]

Returns the render mode: 0 - Individual clips, 1 - Single clip.

Return type:

int

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_name() → str[source]

Return project name

Return type:

str

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:

list

get_render_codecs(render_format: str) → dict[source]

returns a dict with render codecs for a given render format.

Parameters:

render_format (str) – render format

Returns:

codec description -> codec name

Return type:

dict

get_render_formats() → dict[source]

Returns a dict (format -> file extension) of available render formats.

Return type:

dict

get_render_job_list() → list[source]

Returns a list of render jobs and their information.

Return type:

list

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).

Parameters:

job_id (str)

Return type:

dict

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).

Parameters:
  • format (str) – format

  • codec (str) – codec

Returns:

Returns full list of resolutions if no argument is provided. Each element in the list is a dictionary with 2 keys “Width” and “Height”.

Return type:

RenderResolution

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.

Parameters:

setting_name (str)

Return type:

str

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:

int

is_rendering_in_progress() → bool[source]

Returns True if rendering is in progress.

Return type:

bool

load_render_preset(preset_name) → bool[source]

Sets a preset as current preset for rendering if preset_name (string) exists.

Return type:

bool

refresh_lut_list() → bool[source]

Refreshes LUT List

Return type:

bool

save_as_new_render_preset(preset_name) → bool[source]

Creates new render preset by given name if preset_name(string) is unique.

Return type:

bool

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.

Parameters:
Return type:

bool

set_current_render_mode(render_mode: int) → bool[source]

Sets the render mode.

Parameters:

render_mode (int) – Specify renderMode = 0 for Individual clips, 1 for Single clip.

Returns:

True if successful.

Return type:

bool

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:

bool

set_name(project_name) → bool[source]

Sets project name if given project_name (string) is unique.

Return type:

bool

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.

Parameters:

preset_name (str)

Return type:

bool

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).

Parameters:

render_setting (RenderSetting | dict) – A RenderSetting object or a dict of setting overrides.

Returns:

True if successful.

Return type:

bool

set_setting(setting_name: str, setting_value: str)[source]

Sets value of project setting (indicated by setting_name, string).

Parameters:
  • setting_name (str) – Setting name

  • setting_value (str) – Setting value

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.

Parameters:

job_ids (list)

Return type:

bool

stop_rendering()[source]

Stops rendering.

get_unique_id() → str[source]

Returns unique id of the project Object.

Returns:

Unique project ID

Return type:

str

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:
  • media_path (str)

  • start_offset_in_samples (int)

  • duration_in_samples (int)

Returns:

Returns True if successful, otherwise False.

Return type:

bool

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:

bool

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:

bool

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:

bool

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:

bool

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.

Return type:

List[str]

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:
  • preset_name (str) – The name of the Quick Export render preset.

  • param_dict (Dict[str, Any]) – Dictionary of render settings, supported keys include “TargetDir”, “CustomName”, “VideoQuality”, and “EnableUpload”.(“EnableUpload” key enables direct upload for supported web presets.)

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:

bool

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:

bool

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 timecode when the settings’ AddToTimeline is True. Studio-only (requires the AI Speech Generator Extras download); returns the API’s result unwrapped if requirements are not met.

Parameters:
  • speech_generation_settings (SpeechGenerationSettings | dict) – Speech generation settings. A SpeechGenerationSettings model or a raw dict.

  • timecode (str) – Timecode at which to add the generated clip to the timeline.

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:

bool

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)

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:

bool

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:

bool

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:

bool

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:
  • preset_file_path (str) – path of the preset file

  • preset_name (str, optional) – how the preset shall be named. If not specified, the preset is named based on the file base name.

Returns:

True if successful, False otherwise.

Return type:

bool

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:
  • preset_name (str) – name of the project settings preset

  • export_path (str) – path to export to

Returns:

True if successful, False otherwise.

Return type:

bool

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:

bool

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:

bool

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:
  • preset_name (str) – name of the render preset

  • is_enabled (bool) – True to enable quick export, False to disable it

Returns:

True if successful, False otherwise.

Return type:

bool

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:

Dict[str, str]

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:

Dict[str, str]

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-argument SetSetting("superScale", 2, sharpness, noiseReduction) calling convention, which is the only SetSetting convention DaVinci Resolve 21.1.0 did not deprecate, precisely because it has no SetSettings equivalent.

Every other Super Scale multiplier goes through set_settings({"superScale": value}) with 0=Auto, 1=none, 2=2x, 3=3x, 4=4x.

Parameters:
  • sharpness (float) – sharpness strength, in the range [0.0, 1.0]

  • noise_reduction (float) – noise reduction strength, in the range [0.0, 1.0]

Returns:

True if successful, False otherwise

Return type:

bool

Note

Read the applied strengths back with the read-only settings superScaleSharpnessStrength and superScaleNoiseReductionStrength. Both strengths persist until this method changes them again - selecting another multiplier through set_settings() leaves them untouched.