Class LrExportContext

Provides access to the choices a user has made in the Export dialog, and the list of photos to be exported.

An LrExportContext object is passed to your plug-in as a parameter to your service script's processRenderedPhotos function. You cannot import the namespace or access the properties and functions in any other way.

Summary

Configures a progress scope for the export rendering sequence.
Creates an iterator for all renditions in this export.
Starts the rendering process in a separate task.
(table) The list of photos and renditions to be exported in this session.
(table) The property table containing the Export settings defined for your plug-in, along with any built-in Lightroom Export settings that you have not excluded.
(LrPublishService) (only when published)

First supported in version 3.0 of the Lightroom SDK.

(LrPublishedCollection) (only when published)

First supported in version 3.0 of the Lightroom SDK.

(table) Information about published collection (only when published).

Functions

exportContext:configureProgress( args )
Configures a progress scope for the export rendering sequence. Use in preference to creating a new LrProgressScope object, and call before calling renditions() in this object. This function allows the filenames and thumbnails to be updated properly.

First supported in version 1.3 of the Lightroom SDK.

Parameters

1. args
(table) Arguments in named-argument syntax:
  • title: (string) The display name that identifies the main task; for example, "Exporting files as JPEG". (Note that in the case of publishing, this has no direct effect on the caption displayed.)
  • renderPortion: (optional, number) When all renditions have been processed, the progress scope will be at this percent complete. A percentage value [0..1].

Return value

(LrProgressScope) A progress scope tied specifically to the export rendering pipeline.

See also

LrProgressScope
exportContext:renditions( args )
Creates an iterator for all renditions in this export. Use in preference to LrExportContext.exportSession:renditions(). Calls exportContext:startRendering() if needed, and keeps the progress scope updated properly.

IMPORTANT: You must call configureProgress() on this object before calling renditions().

First supported in version 1.3 of the Lightroom SDK.

Parameters

1. args
(table) Arguments in named-argument syntax:
  • exportContext (LrExportContext): This value is provided.
  • progessScope (LrProgressScope): The progress scope.
  • renderProgressPortion (number): This value is provided.
  • stopIfCanceled (Boolean): True to stop the iterator prematurely if progress scope is canceled.

Return value

An iterator for all export renditions.

See also

LrExportSession
exportContext:startRendering()
Starts the rendering process in a separate task.

First supported in version 1.3 of the Lightroom SDK.

Properties

exportContext.exportSession : (Read-Only)
(table) The list of photos and renditions to be exported in this session.

First supported in version 1.3 of the Lightroom SDK.

See also: LrExportSession
exportContext.propertyTable : (Read-Only)
(table) The property table containing the Export settings defined for your plug-in, along with any built-in Lightroom Export settings that you have not excluded. The settings have the values chosen by the user in the Export dialog.

First supported in version 1.3 of the Lightroom SDK.

exportContext.publishService : (Read-Only)
(LrPublishService) (only when published)

First supported in version 3.0 of the Lightroom SDK.

exportContext.publishedCollection : (Read-Only)
(LrPublishedCollection) (only when published)

First supported in version 3.0 of the Lightroom SDK.

exportContext.publishedCollectionInfo : (Read-Only)
(table) Information about published collection (only when published). Contains the following fields:
  • isDefaultCollection: (Boolean) True if this is the default collection.
  • name: (name) The name of this collection.
  • parents: (table) An array of information about parents of this collection, in which each element contains:
    • name: (string) Name of the collection set.
    • remoteCollectionId: (number of string) The remote collection ID assigned by the server.
  • remoteId: (string or number) The ID for this published collection that was stored via exportSession:recordRemoteCollectionId.
  • remoteUrl: (optional, string) The URL, if any, that was recorded for the published collection via exportSession:recordRemoteCollectionUrl.

First supported in version 3.0 of the Lightroom SDK.