Adobe 65007312 Programming Guide - Page 52
Customizing the Export and Publishing Manager dialogs, Customizing the export destination
UPC - 883919154398
View all Adobe 65007312 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 52 highlights
CHAPTER 3: Creating Export and Publish Services Customizing the Export and Publishing Manager dialogs 52 X Use the export-context object to gain access to the setting chosen by the user (in exportContext.propertyTable), and the list of photos to be exported. X Use the export-context object to configure the progress indicator to update as photos are displayed. This would look like this example adapted from the Flickr plug-in: local progressScope = exportContext:configureProgress { title = nPhotos > 1 and LOC( "$$$/Flickr/Publish/Progress=Publishing ^1 photos to Flickr", nPhotos ) or LOC "$$$/Flickr/Publish/Progress/One=Publishing one photo to Flickr", } The function that you define typically contains a loop of this form: for i, rendition in exportContext:renditions() do -- Wait until Lightroom has finished rendering this photo. local success, pathOrMessage = rendition:waitForRender() -- Do something with the rendered photo. if success then -- when success is true, pathOrMessage contains path of rendered file local uploadStatus, uploadMessage = uploadToSomewhere( pathOrMessage ) if not uploadStatus then rendition:uploadFailed( uploadMessage ) end else -- Report waitForRender failure rendition:uploadFailed( pathOrMessage ) end end end X Lightroom renders the photos in a separate background thread, so it is likely that your upload processing will overlap subsequent rendering operations to some extent. X The function exportContext:renditions() automatically updates the progress indicator in the upper-left corner of the Lightroom catalog window, using a text message that you set by calling exportContext:configureProgress(). Customizing the Export and Publishing Manager dialogs Customizing the export destination After Lightroom has completed the rendering of an individual photo for export, and also completed any post-processing of that rendered photo by any selected actions, it completes the export operation by sending the resulting image file to the export-service code, which handles the actual export to the user-selected destination. By default, Lightroom provides export services for a user-selected location in the local file system, or the CD/DVD drive.