Lightroom Classic 9.0: SDK ignores values set in updateExportSettings function (Timelapse plugin)

  • 7
  • Problem
  • Updated 2 months ago
  • Solved
  • (Edited)
A bug seems to be introduced with version 9.0 of Lightroom that when a plugin designer sets exports settings using the "updateExportSettings" of the Lightroom SDK all these settings are ignored and default settings are sent for the export job.

When the following code is used, the files are NOT renamed on export. The exported file have the same name as the original files.


updateExportSettings = function( settings )

    settings.LR_collisionHandling = "rename"

    -- Rename settings
    settings.LR_renamingTokensOn = true
    settings.LR_tokenCustomString = ""
    settings.LR_tokens = "{{naming_sequenceNumber_5Digits}}"

end


I do not know if this is the best place to put this, Adobe seems to have deleted the Lightroom SDK forum.
Photo of Allen Gambrell

Allen Gambrell

  • 1 Post
  • 0 Reply Likes

Posted 8 months ago

  • 7
Photo of Bhargav

Bhargav, Official Rep

  • 84 Posts
  • 20 Reply Likes
Hi Allen,

Thanks for reporting the issue.
We'll investigate and get back to you.

Meanwhile, Can you provide a sample script to replicate the issue?

Thanks,
Bhargav

Photo of Gunther Wegner

Gunther Wegner

  • 36 Posts
  • 17 Reply Likes
I can confirm this problem, it's a big issue for me and the users of my software who rely on my Custom Export Plugin for Lightroom.

Here is a sample ServiceProvider script:
local LrDialogs = import 'LrDialogs'
return {
showSections =
{ 'fileNaming', 'imageSettings', 'exportLocation' },

updateExportSettings = function( exportSettings )
LrDialogs.message("Called") -- this will be called,
-- but still the exportSettings
-- won't be changed
-- export will happen in JPG.
exportSettings.LR_format = "TIFF"
end,

processRenderedPhotos = function( functionContext, exportContext )
local exportSession = exportContext.exportSession
local renditions = exportSession:renditions{ stopIfCanceled = true }
for i, rendition in renditions do
success, pathOrMessage = rendition:waitForRender()
end
end
}

If the Plugin is being called by a preset, which sets format = "TIFF", it will show the right format (tiff) in the dialog, but then still export jpgs.

I'd really appreciate if a fix could be provided asap! Thank you!

(Edited)
Photo of Rikk Flohr

Rikk Flohr, Official Rep

  • 7529 Posts
  • 1724 Reply Likes
This should be resolved by the 9.1 update released earlier today. Please give it a try and let us know if you still see the issue after updating.  Thank you for your patience!
Photo of John R. Ellis

John R. Ellis, Champion

  • 5109 Posts
  • 1445 Reply Likes
"Adobe seems to have deleted the Lightroom SDK forum."

Unfortunately, all of the scripting and SDK forums were merged into their parent forums as part of the ugly migration from the Jive platform to Khoros.   Most of the old LR SDK forum content is still there, though it's much harder to search, and it's much harder for a plugin developer to monitor just SDK content.

Regardless, this forum (the official feedback forum) is the place to post bug reports.
Photo of Oliver Salzburg

Oliver Salzburg

  • 5 Posts
  • 2 Reply Likes
Is it possible that there has been a regression on this? Because I'm seeing the exact behavior where I'm requesting a TIFF to be exported, but I'm receiving a .jpg file after the export. Although I'm only seeing that behavior on OSX, not on Windows.
(Edited)
Photo of John R. Ellis

John R. Ellis, Champion

  • 5109 Posts
  • 1445 Reply Likes
Oliver, are you seeing this problem with a plugin you wrote or using the LR user interface?
Photo of Oliver Salzburg

Oliver Salzburg

  • 5 Posts
  • 2 Reply Likes
This is in a plugin I'm working on. I'm very inexperienced. This is the first plugin I'm writing. So a mistake on my part is definitely possible.

My plugin looks something like this. I hope I didn't leave out anything essential:

local Plugin = {
    hideSections = { "exportLocation", "fileNaming", "metadata", "video" },
    allowFileFormats = { "TIFF" },
    allowColorSpaces = nil,
    exportPresetFields = {}
}
function Plugin.startDialog( propertyTable )
    propertyTable.LR_format = "TIFF"
    propertyTable.LR_tiff_compressionMethod = "compressionMethod_None"
end
function Plugin.processRenderedPhotos( functionContext, exportContext )
    local exportSession = exportContext.exportSession
    local nPhotos = exportSession:countRenditions()

    local failures = {}
    for _, rendition in exportContext:renditions{ stopIfCanceled = true } do
        local success, pathOrMessage = rendition:waitForRender()
    end
end

pathOrMessage will be a path to a file in a temporary location where the name ends in .jpg and testers indicate to me that the file is in fact a JPEG file.

I have not observed this on my own Windows workstation and have limited access to a OSX machine under the current conditions.

Also, thanks for the quick response :)

(Edited)
Photo of John R. Ellis

John R. Ellis, Champion

  • 5109 Posts
  • 1445 Reply Likes
Publish-service plugins is one area of the SDK for which I'm not expert. This forum isn't the best place to get help, especially for plugin development -- it's more for bug reporting and feature requests.  

Unfortunately, Adobe in its wisdom merged the SDK user forum with the main LR Classic user forum last fall, which has reduced participation in the SDK forum. But you might post in the LR Classic forum and see if someone else can help.
Photo of John R. Ellis

John R. Ellis, Champion

  • 5109 Posts
  • 1445 Reply Likes
Also, ask your testers which version of LR they're on (Help > System Info), since the bug of the original post was reportedly fixed in 9.1. Beware that the Creative Cloud app sometimes fools people into thinking they're on "the latest", so insist that your testers do Help > System Info.
Photo of Oliver Salzburg

Oliver Salzburg

  • 5 Posts
  • 2 Reply Likes
I've come across the subject, and a lot of your content, while working on this plugin. Thanks for your contributions by the way.

I came across this post because it sounded very similar to what I was experiencing, but maybe I just need to do more debugging and was just lucky it working on Windows initially.

Thank you for the link, but my first impression is that it wouldn't be very fruitful to bring up such a technical subject there. I feel like you share the impression.
Photo of Oliver Salzburg

Oliver Salzburg

  • 5 Posts
  • 2 Reply Likes
The tester who was most specific with the response was using Lightroom Classic 9.2 and was experiencing the issue.
Photo of John R. Ellis

John R. Ellis, Champion

  • 5109 Posts
  • 1445 Reply Likes
Some other plugin developers do occasionally participate in that forum. You can tag your post with SDK.
Photo of Oliver Salzburg

Oliver Salzburg

  • 8 Posts
  • 0 Reply Likes
Posted https://community.adobe.com/t5/lightroom-classic/exported-tiff-images-are-actually-jpegs/m-p/11112413 over there. Also got additional details by now. It's a Lightroom bug IMHO
Photo of Gunther Wegner

Gunther Wegner

  • 36 Posts
  • 17 Reply Likes
With which version of LR are you experiencing this?
Photo of Oliver Salzburg

Oliver Salzburg

  • 8 Posts
  • 0 Reply Likes
9.2.1 and prior
Photo of Gunther Wegner

Gunther Wegner

  • 36 Posts
  • 17 Reply Likes
I cannot confirm this. With my plugin everything works as expected since this bug was fixed in 9.1.
Photo of Oliver Salzburg

Oliver Salzburg

  • 8 Posts
  • 0 Reply Likes
It just seemed like the issues are related and it could be a good starting point for the engineer who looked into your report. Sorry if I caused confusion. And, thanks for checking :)