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

P: Cannot turn off max compatibility programmatically in LrExportSettings

Explorer ,
Oct 23, 2024 Oct 23, 2024

Copy link to clipboard

Copied

Version: 14.0.1

Platform and OS Version: Windows 11 Pro 23H2

 

When exporting an HDR image from a plugin, one cannot turn off the maximum compatibility setting.  This results in overly large files that are not yet widely processed correctly.

 

The following creates a minimal (?) plugin that reproduces the problem.

 

Expected: two exports are created, one with maximum compatibility off ("normal" HDR render) and one with maximum compatibility on (SDR + gainmap(?) render).

Actual: two identical files are rendered.

 

Info.lua:

 

 

 

 

 

 

 

return {
  LrSdkVersion = 14.0,

  -- 13.0: HDR settings
  LrSdkMinimumVersion = 13.0, -- minimum SDK version required by this plug-in
  LrToolkitIdentifier = "name.stolle.martin.max_compat_repro",
  LrPluginName = LOC "$$$/PluginName=Max Compat Repro Plugin",

  -- Add the menu item to the Library menu.
  LrLibraryMenuItems = {
    {
      title = LOC "$$$/CreateNew=Trigger",
      file = "Trigger.lua",
    },
  },

  VERSION = { major=1, minor=1, revision=0, build=200000, },
}

 

 

 

 

 

 

 

 

Trigger.lua:

 

 

 

 

 

 

 

local LrApplication = import 'LrApplication'
local LrDialogs = import 'LrDialogs'
local LrExportSession = import 'LrExportSession'
local LrFunctionContext = import 'LrFunctionContext'
local LrFileUtils = import 'LrFileUtils'
local LrPathUtils = import 'LrPathUtils'
local LrProgressScope = import 'LrProgressScope'
local LrTasks = import 'LrTasks'

local function trigger(functionContext)
  LrDialogs.attachErrorDialogToFunctionContext(functionContext)
  local catalog = LrApplication.activeCatalog()
  local photo = catalog:getTargetPhoto()

  if photo:getDevelopSettings()["HDREditMode"] == null then
    LrDialogs.message( "Photo not HDR", "Please select an HDR photo.", "warn")
  end

  tempDir = os.tmpname()
  LrFileUtils.createDirectory(tempDir)

  local exportSettings = {
    LR_format = 'TIFF',
    LR_export_destinationType = 'tempFolder',
    LR_export_destinationPathPrefix = tempDir,
    LR_export_useSubfolder = false,
    LR_collisionHandling = 'overwrite',
    LR_renamingTokensOn = true,
    LR_extensionCase= 'lowercase',
    LR_export_colorSpace = 'Rec2020_hdr',
    LR_export_bitDepth = 32,
    LR_enableHDRDisplay = true,
  }

  exportSettings["LR_maximumCompatibility"] = false
  exportSettings["LR_tokens"] = "maxCompat_off"
  local exportSession = LrExportSession({
    photosToExport = {photo},
    exportSettings = exportSettings
  })
  exportSession:doExportOnCurrentTask()

  exportSettings["LR_maximumCompatibility"] = true
  exportSettings["LR_tokens"] = "maxCompat_on"
  local exportSession = LrExportSession({
    photosToExport = {photo},
    exportSettings = exportSettings
  })
  exportSession:doExportOnCurrentTask()

  LrDialogs.message( "Done", "Exported to " .. tempDir)
end

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

  if catalog:getTargetPhoto() == nil then
    LrDialogs.message( "No Photo selected", "No photo was selected.  Please select a photo first.", "warn")
  end
  LrFunctionContext.postAsyncTaskWithContext("trigger", trigger)
end

main()

 

 

 

 

 

 

 

 

 

Bug Fixed
TOPICS
macOS , SDK , Windows

Views

158

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 , Oct 24, 2024 Oct 24, 2024

Link to existing internal bug. 
Updating Status

Status Acknowledged

Votes

Translate

Translate
Adobe Employee , 14 hours ago 14 hours ago

Greetings all, 

 

A new update for Adobe Photography Products has been released.  The December update contains an update for this issue. 

If you do not see the update in your Creative Cloud Application, you can refresh it by hitting [Ctrl/Cmd]+[Alt/Opt]+[ R ].

Note: It may take up to 24 hours for your update to be available in your Creative Cloud app.

 

Thank you for being so patient.

Status Fixed

Votes

Translate

Translate
2 Comments
Adobe Employee ,
Oct 24, 2024 Oct 24, 2024

Copy link to clipboard

Copied

Link to existing internal bug. 
Updating Status

Rikk Flohr: Adobe Photography Org
Status Acknowledged

Votes

Translate

Translate

Report

Report
Adobe Employee ,
14 hours ago 14 hours ago

Copy link to clipboard

Copied

LATEST

Greetings all, 

 

A new update for Adobe Photography Products has been released.  The December update contains an update for this issue. 

If you do not see the update in your Creative Cloud Application, you can refresh it by hitting [Ctrl/Cmd]+[Alt/Opt]+[ R ].

Note: It may take up to 24 hours for your update to be available in your Creative Cloud app.

 

Thank you for being so patient.

Rikk Flohr: Adobe Photography Org
Status Fixed

Votes

Translate

Translate

Report

Report