Help with a export plugin
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
endBut I don’t get export session to start
thanks for any help
