Project#

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

Bases: object

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.

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

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

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.

save_as_new_render_preset(preset_name)

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

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

start_rendering(job_ids[, is_interactive_mode])

Start rendering.

stop_rendering()

Stops rendering.

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.

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

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.

Parameters:

preset_name (str)

Return type:

bool

set_render_settings(render_setting: RenderSetting) bool[source]

Sets given settings for rendering.

Parameters:

render_setting (RenderSetting) – RenderSetting object

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_

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.

Return type:

str

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

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

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 succssful, False otherwise.

Return type:

bool

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]

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

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]