Highlighted

Publish service custom properties disappear

Dec 05, 2019

Copy link to clipboard

Copied

I'm experimenting with the publish service provider SDK. I'd like to cache some data in the property table for use later, but whenever I try to do so, the data has disappeared the next time I want to use it. Seems like it must be an obvious mistake on my part, but I can't figure out what's wrong.

 

Sample code:

 

    startDialog = function(settings)
        if (settings.foo == nil) then
            -- debug message here
            settings.foo == "a"
        end
    end

 

Every time I do "edit settings" for this publish service in the UI, this function runs, but 'settings.foo' is always nil at that point.

 

What's the right way to store a value in a property table that will persists between calls?

Topics

SDK

Views

95

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Publish service custom properties disappear

Dec 05, 2019

Copy link to clipboard

Copied

I'm experimenting with the publish service provider SDK. I'd like to cache some data in the property table for use later, but whenever I try to do so, the data has disappeared the next time I want to use it. Seems like it must be an obvious mistake on my part, but I can't figure out what's wrong.

 

Sample code:

 

    startDialog = function(settings)
        if (settings.foo == nil) then
            -- debug message here
            settings.foo == "a"
        end
    end

 

Every time I do "edit settings" for this publish service in the UI, this function runs, but 'settings.foo' is always nil at that point.

 

What's the right way to store a value in a property table that will persists between calls?

Topics

SDK

Views

96

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Most Valuable Participant ,
Dec 05, 2019

Copy link to clipboard

Copied

I've never written a publish service, so perhaps someone who has can speak more authoritatively.  But have you read pages 59-60 of the Lightroom Classic Programmers Guide? That appears to explain how to do it.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Most Valuable Participant ,
Dec 10, 2019

Copy link to clipboard

Copied

Another possibility: There was a bug in the LR 9.0 SDK that caused a plugin's custom export settings to be ignored. This was fixed in LR 9.1:

https://feedback.photoshop.com/photoshop_family/topics/lightroom-9-0-sdk-ignores-vaules-set-in-updat...

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...