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

Why doesn't the Temperature and Tint be reflected?

New Here ,
May 28, 2024 May 28, 2024

Copy link to clipboard

Copied

It's a very simple piece of code.

For some reason, it is not reflected when the Temperature or Tnt value is 0.

Please let me know if there are any mistakes.

 

 

local LrApplication = import 'LrApplication'
local LrDialogs = import 'LrDialogs'
local LrTasks = import 'LrTasks'

local function applyFixedTemperature()
local catalog = LrApplication.activeCatalog()

LrTasks.startAsyncTask(function()
local photos = catalog:getTargetPhotos()
local numSelectedPhotos = #photos

catalog:withWriteAccessDo("Apply Temperature", function()
for i, photo in ipairs(photos) do
local settings = photo:getDevelopSettings()
settings.IncrementalTemperature = 5
photo:applyDevelopSettings(settings)
end
end)

LrDialogs.message("Message", tostring(numSelectedPhotos) .. " photos temperature adjustment completed", "info")
end)
end

applyFixedTemperature()

TOPICS
SDK , Windows

Views

127

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

LEGEND , May 28, 2024 May 28, 2024

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

 

When run on non-raw files, that script does nothing, and @未来330400669qk1 was probably running it on non-raws.

 

Some experimentation shows that to change IncrementalTint and/or IncrementalTemperature, you must also do:

 

settings.WhiteBalance = "Custom"

 

With raws, if a plugin sets Temperature or Tint without also setting WhiteBalance = "Custom", the slider in the Basic panel changes and

...

Votes

Translate

Translate
Community Expert ,
May 28, 2024 May 28, 2024

Copy link to clipboard

Copied

Temperature and Tint are zero for RGB files, because RGB files already have a 'baked in' white balance. You cannot apply a white balance (like Temperature in Kelvin) to such images, you can only apply a white balance to raw files.

 

-- Johan W. Elzenga

Votes

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
New Here ,
May 29, 2024 May 29, 2024

Copy link to clipboard

Copied

Thanks for the info.

I see! The processing of RAW files and non-RAW files is different. It's very informative.

Votes

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
Community Expert ,
May 28, 2024 May 28, 2024

Copy link to clipboard

Copied

Another way to look at that is for raw files, white balance is absolute (As Shot = specific Temperature and Tint values, and adjustments are along their scales), while for non-raw files, white balance is relative (As Shot = Temperature and Tint of 0, and adjustments are relative to 0).

Votes

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
New Here ,
May 29, 2024 May 29, 2024

Copy link to clipboard

Copied

Thanks for the info.

That's certainly true.The original values were different between the RAW and non-RAW files.

It was a blind spot. It's very informative.

Votes

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
LEGEND ,
May 28, 2024 May 28, 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.]

 

When run on non-raw files, that script does nothing, and @未来330400669qk1 was probably running it on non-raws.

 

Some experimentation shows that to change IncrementalTint and/or IncrementalTemperature, you must also do:

 

settings.WhiteBalance = "Custom"

 

With raws, if a plugin sets Temperature or Tint without also setting WhiteBalance = "Custom", the slider in the Basic panel changes and the photo changes, but the WB: menu still shows "As Shot", which is incorrect, and that may confuse other parts of LR:

johnrellis_0-1716922407623.png

 

So the rule is: If the plugin changes IncrementalTint, IncrementalTemperature, Tint, or Temperature, it should also set WhiteBalance = "Custom".

Votes

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
New Here ,
May 29, 2024 May 29, 2024

Copy link to clipboard

Copied

LATEST

Thanks for the info.

Thanks to your kind message, I was able to understand.

I tried the code and it worked.

Thank you so much. I can't find the words to thank you enough.

Votes

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