Skip to main content
Inspiring
April 23, 2026
Answered

Help with a export plugin

  • April 23, 2026
  • 1 reply
  • 21 views

Context : SDK 6.0, lightroom classic 6.4, lua plugin

I’m stuck with a LrExportSession:init error : params table must have export setttings
 

    local settings = getExportSettings()

local exportSession = LrExportSession( {
photos = photos,
settings = settings
} )

I read the post

I did create a template for export 
I read it with dofile()
I check with a dialog that I have parameters I tryed with and with “LR_” .. replacement :
 

-- Main helper function defining all export parameters
local function getExportSettings()

-- 1. Build the absolute path to the file inside your plugin folder
local templatePath = LrPathUtils.child(_PLUGIN.path, "export_linux.lrtemplate")

-- 2. Load the .lrtemplate file
dofile(templatePath)
local preset = s.value

local settings = {}
for k, v in pairs(preset) do
settings["LR_" .. k] = v
end

-- debug info
local settingsText = "Export Settings:\n\n"
for k, v in pairs(settings) do
if type(v) == 'table' then
settingsText = settingsText .. k .. " = {\n"
for subk, subv in pairs(v) do
settingsText = settingsText .. " " .. subk .. " = " .. tostring(subv) .. "\n"
end
settingsText = settingsText .. "}\n"
else
settingsText = settingsText .. k .. " = " .. tostring(v) .. "\n"
end
end
LrDialogs.message( "VERIF", settingsText, "info" )

return settings
end

But I don’t get export session to start

thanks for any help

Correct answer ppphotos

[solved]
with a short list of carefully chosen exports params 
````

local function exportCollectionPhotos(photos, absoluteFolderPath)
    if #photos == 0 then return end
 
    mkdirs(absoluteFolderPath)
 
    local settings = {
        LR_exportServiceProvider        = "com.adobe.ag.export.file",
        LR_exportServiceProviderTitle   = "Disque dur",
        LR_export_destinationType       = "specificFolder",
        LR_export_destinationPathPrefix = absoluteFolderPath,
        LR_export_useSubfolder          = false,
        LR_format                       = "TIFF",
        LR_tiff_compressionMethod       = "compressionMethod_ZIP",
        LR_export_bitDepth              = 16,
        LR_collisionHandling            = "rename",
        LR_reimportExportedPhoto        = false,
        LR_outputSharpeningOn           = false,
    }
 
    local exportSession = LrExportSession {
        photosToExport = photos,
        exportSettings = settings,
    }
 
    for _, rendition in exportSession:renditions({ stopIfCanceled = true }) do
        local success, pathOrMessage = rendition:waitForRender()
        if not success then
            LrDialogs.message("Render failed", tostring(pathOrMessage), "critical")
            return
        end
    end    
end

````
i have my export !

1 reply

ppphotosAuthorCorrect answer
Inspiring
April 23, 2026

[solved]
with a short list of carefully chosen exports params 
````

local function exportCollectionPhotos(photos, absoluteFolderPath)
    if #photos == 0 then return end
 
    mkdirs(absoluteFolderPath)
 
    local settings = {
        LR_exportServiceProvider        = "com.adobe.ag.export.file",
        LR_exportServiceProviderTitle   = "Disque dur",
        LR_export_destinationType       = "specificFolder",
        LR_export_destinationPathPrefix = absoluteFolderPath,
        LR_export_useSubfolder          = false,
        LR_format                       = "TIFF",
        LR_tiff_compressionMethod       = "compressionMethod_ZIP",
        LR_export_bitDepth              = 16,
        LR_collisionHandling            = "rename",
        LR_reimportExportedPhoto        = false,
        LR_outputSharpeningOn           = false,
    }
 
    local exportSession = LrExportSession {
        photosToExport = photos,
        exportSettings = settings,
    }
 
    for _, rendition in exportSession:renditions({ stopIfCanceled = true }) do
        local success, pathOrMessage = rendition:waitForRender()
        if not success then
            LrDialogs.message("Render failed", tostring(pathOrMessage), "critical")
            return
        end
    end    
end

````
i have my export !