Thumbnails#

apsync.attach_thumbnail(file_path: str, local_file: str, is_detail: bool = True) None#

Attaches the local_file as a thumbnail to file_path. Set is_detail = False to specifically set a an image for the Anchorpoint browser preview. Setting a downscaled version of the thumbnail for the preview is a nice optimization to improve browsing performance. Only use image formats such as PNG and JPEG.

Parameters
  • file_path (str) – Path to the file

  • local_file (str) – Path to the local image that should be set as the thumbnail

  • is_detail (bool) – Whether or not the image is for the browser preview

Example

>>> apsync.attach_thumbnail("my_scene.blend", "my_rendering.png")
apsync.get_thumbnail(file_path: str, is_detail: bool) Optional[str]#

Retrieves the thumbnail of file_path (or None). Set is_detail = False to retrieve the preview image - if any.

Parameters
  • file_path (str) – Path to the file

  • is_detail (bool) – Detail or preview image

Returns

The path to the locally cached thumbnail - or None.

Example

>>> detail_thumbnail = apsync.get_thumbnail("my_scene.blend")