SDK: Export filter renditions ignore filteredSettings when using "export with previous"
Dear,
I am really confused about this. I have made an export filter that modifies the size settings in the export dialog, waits the rendering and then makes some stuff. It works ok when I click on the photo and then use "Export..." button. The problem happens when I use "Export with previous", in that case it seems to not use the filterSettings function.
This is a dummy code, it just modifies the rendering size and then do nothing. If I export with the "Export..." button, the export dialog appears and the photo is rendered to fit 100x100 pixels as stated in filterSettings. If after that I use "Export with previous" button, the dialog does not appear (this is ok), but the rendering is made without overriding the user settings for the image size; it works as if filterSettings function were empty.
postProcessRenderedPhotos= function ( functionContext, filterContext )
local properties=filterContext.propertyTable
local renditionOptions = {
plugin = _PLUGIN,
renditionsToSatisfy = filterContext.renditionsToSatisfy,
filterSettings = function( renditionToSatisfy, exportSettings )
exportSettings.LR_size_maxWidth = 100
exportSettings.LR_size_maxHeight = 100
exportSettings.LR_size_doConstrain = true
exportSettings.LR_size_resizeType = "wh"
end,
}
for sourceRendition, renditionToSatisfy in filterContext:renditions( renditionOptions ) do
local success, _ = sourceRendition:waitForRender()
if success then
renditionToSatisfy:renditionIsDone( true)
else
renditionToSatisfy:renditionIsDone( false, "Failed to render photo in upstream task" )
end
end
end
This code is an oversimplification of mine. In case setting the filter to not show the image size properties section in the export dialog solves the problem, I will not be able to do that in my scrip, I do need the user set the image size (and then make some calculus and override)
