• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

P: SDK: LrDevelopController.getValue() returns nil for crop settings Select Sky/Subject

LEGEND ,
Feb 15, 2022 Feb 15, 2022

Copy link to clipboard

Copied

LrDevelopController.getValue (key) returns nil for all the crop settings (CropLeft, CropRight, CropTop, CropBottom) immediately after a user clicks Select Subject or Sky.  To reproduce:

 

1. Save the following script in the Scripts folder.

 

2. Run the script, which starts a background task calling LrDevelopController.getValue().

 

3. Edit a photo in Develop, open the Masking tool, and click Select Sky.

 

4. Observe this message displayed:

johnrellis_0-1644977410862.png

 

Tested on LR 11.2 / Mac OS 11.6.2.

 

 

 

local LrTasks = import "LrTasks"

local catalog = import "LrApplication".activeCatalog ()
local getCurrentModuleName = import "LrApplicationView".getCurrentModuleName
local getValue = import "LrDevelopController".getValue
local showBezel = import "LrDialogs".showBezel

LrTasks.startAsyncTask (function ()
    while true do
        local photo = catalog:getTargetPhoto ()
        if photo ~= nil and getCurrentModuleName () == "develop" then
            local CropLeft, CropRight, CropTop, CropBottom = 
                getValue ("CropLeft"), getValue ("CropRight"),
                getValue ("CropTop"), getValue ("CropBottom")
            if CropLeft == nil then 
                showBezel (string.format (
                    "CropLeft = %s\nCropRight = %s\nCropTop = %s\n" ..
                    "CropBottom = %s\n", CropLeft, CropRight, CropTop, 
                    CropBottom), 10)
                end
            end
        LrTasks.sleep (0.2)
        end
    end)

 

 

 

Idea No status
TOPICS
SDK

Views

1.2K

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
community guidelines

correct answers 1 Correct answer

Adobe Employee , Feb 18, 2022 Feb 18, 2022

Bug logged.

Engineering has reported this as-designed: 

Comments from an engineer: 

"When a Select Subject or Select Sky detection is running, we don't want user to interact with any develop settings. So during that time most of the LrDevelopController APIs will not work as expected."

Status Started

Votes

Translate

Translate
2 Comments
Adobe Employee ,
Feb 18, 2022 Feb 18, 2022

Copy link to clipboard

Copied

Bug logged.

Engineering has reported this as-designed: 

Comments from an engineer: 

"When a Select Subject or Select Sky detection is running, we don't want user to interact with any develop settings. So during that time most of the LrDevelopController APIs will not work as expected."

Rikk Flohr: Adobe Photography Org
Status Started

Votes

Translate

Translate

Report

Report
LEGEND ,
Mar 18, 2022 Mar 18, 2022

Copy link to clipboard

Copied

LATEST

Thanks, can you please convert this to a request to update the SDK API documentation:

 

While the user is executing Select Subject or Sky, LrDevelopController.getValue () will return nil and LrDevelopController.setValue () will be ignored [Is the latter correct?]

 

Thanks.

Votes

Translate

Translate

Report

Report