PhotoAlbum#

class pybmd.photo_album.PhotoAlbum(photo_album)[source]

Bases: WrapperBase

A photo album: an ordered set of photos graded together.

The photo counterpart of Timeline. Photo albums are enumerated through Project.get_photo_album_count / get_photo_album_by_index and created through MediaPool.create_empty_photo_album / create_photo_album_from_photos.

Version:

Added in DaVinci Resolve 21.1.2

Methods

__init__(photo_album)

delete_photos(photo_album_items)

Deletes the given photos from the photo album.

export_thumbnails(photo_indices[, ...])

Renders the photos at the given 1-based album positions into a grid image.

get_current_item()

Returns the current photo of the photo album.

get_media_pool_item()

Returns the media pool item of the photo album.

get_name()

Returns the photo album name.

get_node_graph()

Returns the photo album's node graph.

get_photo_list()

Returns the photos in the photo album.

get_unique_id()

Returns a unique ID for the photo album.

grab_all_stills()

Grabs a still from every photo in the photo album.

grab_still()

Grabs a still from the current photo.

set_name(photo_album_name)

Renames the photo album.

get_name() → str[source]

Returns the photo album name.

Version:

Added in DaVinci Resolve 21.1.2

Return type:

str

set_name(photo_album_name: str) → bool[source]

Renames the photo album. The name must be unique.

Parameters:

photo_album_name (str) – new name

Returns:

True if successful, False otherwise

Return type:

bool

Version:

Added in DaVinci Resolve 21.1.2

get_unique_id() → str[source]

Returns a unique ID for the photo album.

Version:

Added in DaVinci Resolve 21.1.2

Return type:

str

get_photo_list() → List[PhotoAlbumItem][source]

Returns the photos in the photo album.

Version:

Added in DaVinci Resolve 21.1.2

Return type:

List[PhotoAlbumItem]

get_current_item() → PhotoAlbumItem | None[source]

Returns the current photo of the photo album.

Returns:

the current photo, None if there is none

Return type:

PhotoAlbumItem | None

Version:

Added in DaVinci Resolve 21.1.2

delete_photos(photo_album_items: List[PhotoAlbumItem]) → bool[source]

Deletes the given photos from the photo album.

Parameters:

photo_album_items (List[PhotoAlbumItem]) – photos to delete

Returns:

True if successful, False otherwise

Return type:

bool

Version:

Added in DaVinci Resolve 21.1.2

get_node_graph() → Graph[source]

Returns the photo album’s node graph.

Version:

Added in DaVinci Resolve 21.1.2

Return type:

Graph

get_media_pool_item() → MediaPoolItem | None[source]

Returns the media pool item of the photo album.

Returns:

the media pool item, None if there is none

Return type:

MediaPoolItem | None

Version:

Added in DaVinci Resolve 21.1.2

grab_still() → GalleryStill[source]

Grabs a still from the current photo.

Version:

Added in DaVinci Resolve 21.1.2

Return type:

GalleryStill

grab_all_stills() → List[GalleryStill][source]

Grabs a still from every photo in the photo album.

Version:

Added in DaVinci Resolve 21.1.2

Return type:

List[GalleryStill]

export_thumbnails(photo_indices: List[int], export_thumbnails_options: ExportThumbnailsOptions | dict | None = None) → ExportThumbnailsResult | dict[source]

Renders the photos at the given 1-based album positions into a grid image.

Parameters:
  • photo_indices (List[int]) – 1-based positions within the album, 1 <= index <= len(get_photo_list())

  • export_thumbnails_options (ExportThumbnailsOptions | dict, optional) – output options. Returns a base64-encoded JPEG sheet when omitted. Defaults to None.

Returns:

the composited sheet result, an empty dict

if nothing was returned. Use ExportThumbnailsResult.decode_data() for the image bytes.

Return type:

ExportThumbnailsResult | dict

Raises:

APIVersionError – If Resolve version < 21.2

Version:

Added in DaVinci Resolve 21.2