Skip to main content
danielm49702136
Participant
March 6, 2026
Question

SDK: Export filter renditions ignore filteredSettings when using "export with previous"

  • March 6, 2026
  • 1 reply
  • 5 views

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)

    1 reply

    danielm49702136
    Participant
    March 6, 2026

    I have used  filterSettings  inside postProcessRenderedPhotos since the creatorFilter example in that comes with the sdk manual uses that. I have also tryed using  updateExportSettings as it is mentioned in the manual and adding it to the returned table in the LrExportFilterProvider file:

    updateExportSettings = function( exportSettings )
    exportSettings.LR_size_maxWidth = 100 --enc_ancho-2*enc_tamanoBorde
    exportSettings.LR_size_maxHeight = 100
    exportSettings.LR_size_doConstrain = true
    exportSettings.LR_size_resizeType = "wh"
    end


    return {
    sectionForFilterInDialog = sectionForFilterInDialog,
    postProcessRenderedPhotos = postProcessRenderedPhotos,
    updateExportSettings = updateExportSettings,
    }

    But this updateExportSettings function has no effect, no matter if I call the export process with the "Export..." button or the “Export from previous” button.
    I guess this updateExportSettings is just for exports and not for filters