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

P: SDK: photo:getDevelopSettings() sometimes returns nil for Temperature and Tint

LEGEND ,
Mar 02, 2023 Mar 02, 2023

Copy link to clipboard

Copied

photo:getDevelopSettings() sometimes returns nil for Temperature and Tint.   Tested in LR 12.2 and 10.4 on Mac OS 12.6.1.


To reproduce:

 

1. Download and unzip this catalog folder ("Temperature"):

https://www.dropbox.com/s/z527z9to4ie46vx/Temperature.2023.03.02.zip?dl=0

 

2. Copy the file "get-temperature.lua" from the catalog folder to the User Scripts folder.

 

3. Open the Temperature catalog.

 

4. Select the one photo and go to Develop.

 

5. Go to Library and do Scripts > get-temperature. Observe the temperature and tint are correctly displayed:

johnrellis_0-1677805472559.png

 

6. Do Quick Develop > Reset All.

 

7. Do Scripts > get-temperature and observe that temperature and tint are incorrectly nil:

johnrellis_1-1677805535275.png

 

 

Bug Fixed
TOPICS
SDK

Views

1.4K

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 2 Pinned Replies

Adobe Employee , Sep 08, 2023 Sep 08, 2023

I am moving this thread back to discussions.

The engineers have provided this script to illustrate how this should be called.

import "LrTasks".startAsyncTask (function ()
     --local s = import "LrApplication".activeCatalog ():
     --getTargetPhoto ():getDevelopSettings ()

 

local s = import "LrDevelopController"
local temp = s.getValue( "Temperature" )
local tint = s.getValue( "Tint" )

 

    import "LrDialogs".message (
          --tostring (s.Temperature) .. ", " .. tostring (s.Tint))
          tos

...

Votes

Translate

Translate
Adobe Employee , Oct 27, 2023 Oct 27, 2023

Marking fixed as requested in the thread. 

Status Fixed

Votes

Translate

Translate
33 Comments
Advocate ,
Oct 26, 2023 Oct 26, 2023

Copy link to clipboard

Copied

@johnrellis 

 

Apologies John.

I have now check the DNGs effected in my test catalog and they all originate form a JPEG or a non RAW file which explains the lack of Temperature and Tint.

 

So no actual RAW file is affected.

.

Votes

Translate

Translate

Report

Report
LEGEND ,
Oct 26, 2023 Oct 26, 2023

Copy link to clipboard

Copied

This is all fairly new to me too. I hadn't really looked into DNGs much until Denoise and the recent use of JPEG XL compression instead of JPEG.

Votes

Translate

Translate

Report

Report
Adobe Employee ,
Oct 27, 2023 Oct 27, 2023

Copy link to clipboard

Copied

Marking fixed as requested in the thread. 

Rikk Flohr: Adobe Photography Org
Status Fixed

Votes

Translate

Translate

Report

Report
LEGEND ,
Sep 20, 2024 Sep 20, 2024

Copy link to clipboard

Copied

[This post contains formatting and embedded images that don't appear in email. View the post in your Web browser.]

 

This misbehavior has reappeared and can be reproduced again in LR 13.5.1 / Mac OS 14.6.1 -- photo:getDevelopSettings() sometimes returns nil for Temperature and Tint.

 

1. Download and unzip this small catalog:

https://www.dropbox.com/scl/fi/nmh89jdu83e34vyhdgcj9/Temperature.2024.09.20.zip?rlkey=iib53zohs7ugef... 

 

2. Copy the file "get-temperature.lua" from the catalog folder to the User Scripts folder.

 

3. Open the catalog.

 

4. In the Folders panel, right click the folder Temperature and do Synchronize Folder and import the one photo.

 

5. Select the one photo and do Scripts > get-temperature and observe the correct output:

JohnREllis_0-1726856096448.png

 

6. Do Quick Develop > Reset All.

 

7. Do Scripts > get-temperature and observe the incorrect output:

JohnREllis_1-1726856227388.png

 

8. In Quick Develop, click Exposure > Increase Exposure 1/3 Stop.

 

9. Do Scripts > get-temperature and observe the correct output:

JohnREllis_2-1726856313220.png

 

* * *

 

I've successfully tested this workaround on about 500 photos that were originally reporting nil:

 

    if nil == photo:getDevelopSettings ().Temperature then
        photo:quickDevelopAdjustWhiteBalance ("Temperature", 0)
        end
    assert (nil ~= photo:getDevelopSettings ().Temperature)

 

 

Votes

Translate

Translate

Report

Report
LEGEND ,
Sep 20, 2024 Sep 20, 2024

Copy link to clipboard

Copied

@Rikk Flohr: Photography, this bug was originally reported with LR 12.2 and 10.4, but I could no longer reproduce it in LR 13.0.1, so I asked that the issue be closed. It can now be reliably reproduced in LR 13.5.1, as I determined responding to the developer of the Power Keys plugin.  Should this be posted as a new report or would you prefer it left here?

Votes

Translate

Translate

Report

Report
Community Beginner ,
Sep 20, 2024 Sep 20, 2024

Copy link to clipboard

Copied

Seeing your post @johnrellis, I ran tests in my code and can confirm I'm also seeing this issue in Lightroom Classic 13.5.1.

Votes

Translate

Translate

Report

Report
Adobe Employee ,
Sep 23, 2024 Sep 23, 2024

Copy link to clipboard

Copied

I am checking with the team to see if they want to reopen the bug fixed in 13.1 or have a new bug. 

Rikk Flohr: Adobe Photography Org

Votes

Translate

Translate

Report

Report
Adobe Employee ,
Sep 26, 2024 Sep 26, 2024

Copy link to clipboard

Copied

LATEST

@johnrellis 

Let's do a fresh report for this one. I will watch for it. 

Rikk Flohr: Adobe Photography Org

Votes

Translate

Translate

Report

Report