Lightroom SDK: rendition:waitForRender returns status "OK" and a path to a non-existent file when source is corrupt.

  • 1
  • Problem
  • Updated 6 years ago
Sample code:

local status, other = rendition:waitForRender()
if status then
local photoPath = other
-- hard to imagine, but status may be OK despite no rendered file, if source photo is corrupt - check added 19/Oct/2012 9:12.
if fso:existsAsFile( photoPath ) then -- ###1 all export/publish plugins could benefit from being re-released with this check added.
self:processRenderedPhoto( rendition, photoPath )
else
self:processRenderingFailure( rendition, str:fmtx( "Lightroom was unable to render photo: ^1", rendition.photo:getRawMetadata( 'path' ) ) )
end
else
local message = other
self:processRenderingFailure( rendition, message )
end
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 384 Reply Likes

Posted 6 years ago

  • 1

Be the first to post a reply!