LIGHTROOM SDK: photo:getDevelopSettings() returning inconsistent results for new fields

  • 2
  • Problem
  • Updated 3 years ago
  • (Edited)
photo:getDevelopSettings() is returning inconsistent results for fields like “Blacks 2012” that were introduced in later versions of LR. First it returns nil, and then over many successive invocations, it will start returning 0 for the same photo. Details:

The problem appears to affect photos that were added to the catalog by an earlier version of LR and which may not have any edits. (The catalog was then upgraded to a later version of LR.) The fields affected are those that were introduced in a later version of LR -- I have tested Auto Lateral CA, Blacks 2012, and Contrast 2012.

For the first many invocations of getDevelopSettings() on the photo, the values returned for these fields are nil. Then on some later invocation, it returns 0 instead of nil, and then it will continue to return 0 for subsequent invocations.

The situation in which I observed this was with the plugin Any Filter scanning the entire catalog for photos with a develop setting such as Blacks 2012 that is nil. Of 21K photos, it initially found 4546 such photos. But then rescanning the catalog, it found somewhat fewer, 4372. Scanning again found 4299, and then 4082, and then 4045, etc. Here's a log entry from successive scans showing how the value changes:

*** 22966,22968 ****
C:\Users\Ellis\Pictures\2004\2004.06.20\p 029.jpg
! AutoLateralCA = nil

--- 22966,22968 ----
C:\Users\Ellis\Pictures\2004\2004.06.20\p 029.jpg
! AutoLateralCA = 0

It appears that LR decides to change all the nil fields in a photo to 0 all at once, e.g. either Auto Lateral CA, Blacks 2012, Contrast 2012, etc are all nil, or they are all 0. The change to 0 is persistent across restarts of Lightroom.

I wonder if this bug is caused by LR doing a "lazy" on-the-fly conversion of older catalog entries to a new format, and not getting that on-the-fly conversion correct?

Configuration: LR 5.2 Windows 7 64-bit. Catalog originally created with LR 3, upgraded through all versions of 3, 4 and 5.
Photo of John R. Ellis

John R. Ellis, Champion

  • 3895 Posts
  • 1035 Reply Likes

Posted 5 years ago

  • 2
Photo of Todd Shaner

Todd Shaner

  • 130 Posts
  • 10 Reply Likes
I can confirm this issue using the AnyFilter plugin when trying to find images with 'Auto Lateral CA' enabled (i.e. Lens Corrections> Color> Remove Chromatic Aberration).

It pulls up numerous movie files, JPEGs, TIFFs, and PSDs that do NOT have 'Remove Chromatic Aberration' checked in LR5.2. I have images in my catalog with edits (or simply Import) that span all version of LR 1.0 through 5.2.
Photo of John R. Ellis

John R. Ellis, Champion

  • 3895 Posts
  • 1035 Reply Likes
See http://feedback.photoshop.com/photosh... for a somewhat similar bug that may or may not have the same root cause.