Lightroom SDK: photo:getDevelopSettings() returns incorrect value after Sync Settings

  • 5
  • Problem
  • Updated 3 years ago
After you synchronize Lens Profile Corrections from one photo to many other photos, photo:getDevelopSettings() will incorrectly return a nil value for "LensProfileName". Only after you scroll Library grid view to show a photo's thumbnail will photo:getDevelopSettings() return the correct value. (Tested on LR CC 2015.1.1 / OS X 10.10.4.)

To reproduce:

1. Download this folder of 50 test pics: https://dl.dropboxusercontent.com/u/2....

2. Make a new catalog.

3. Turn off Automatically Write Changes Into XMP.

4. Import the 50 test pics.

5. Arrange LR's window and thumbnail size so that Library grid view shows about 6 thumbnails.

6. Select the first pic.

7. Go to Develop, set Lens Corrections > Enable Profile Corrections, and make sure the profile is "Adobe (iPhone 6...)".

8. Go back to grid view.

9. Do Edit > Select All and then Sync Settings, with only Lens Profile Corrections and Process Version selected.

10. Run the script "countlensprofile.lua" (in the same folder as the test pics).

11. Observe that the script reports only 6 or so pics with non-nil LensProfileName.

12. Scroll down one screenful of thumbnails. Wait until the metadata status badge in the upper-right corner has been updated (changes from "..." to a down-arrow).

13. Re-run the script, and observe that it reports 6 more or so pics with non-nil LensProfileName.

14. Repeat steps 12 and 13 until the script reports all 50 pics have non-nil LensProfileName.

Note that there was a similar bug with Process Version 2012 develop settings in a catalog converted from an older version of LR: http://feedback.photoshop.com/photosh.... With that bug, however, it wasn't necessary to scroll grid view to force getDevelopSettings() to return the correct value -- you just had to invoke it multiple times. But perhaps they have similar architectural roots in some kind of on-demand transformation of the representation of develop settings.
Photo of John R. Ellis

John R. Ellis, Champion

  • 3895 Posts
  • 1035 Reply Likes

Posted 3 years ago

  • 5
Photo of Nick Crossley

Nick Crossley

  • 3 Posts
  • 0 Reply Likes
Adobe, please fix this issue. Automation, including the use of plug-ins and syncing settings across many photos, is one of the most powerful features of Lightroom, and this defect negatively impacts my workflow.
Photo of Todd Shaner

Todd Shaner, Champion

  • 1131 Posts
  • 366 Reply Likes
John, I ran a similar search on my Windows 7 system yesterday with LR CC 2015.1.1 and AnyFilter Plugin 1.20. I used 'Lens Profile Filename' = with no issues. I followed your procedure today using 163 CR2 files and AnyFilter Plugin 1.23 with no issues.

Would that reveal the issue?
Photo of John R. Ellis

John R. Ellis, Champion

  • 3895 Posts
  • 1035 Reply Likes
I think the problem, when it strikes, would be revealed by Any Filter (that's how Nick Crossley originally found it). Raw files and JPEG files may behave differently with respect to this bug -- I could imagine that there are different code paths for accessing metadata when refreshing thumbnails in Library view. Another factor could be whether the files being synced already had a lens profile enabled and assigned -- I couldn't reproduce the problem until Nick sent me a sample pic (an iPhone 6 JPEG) and described his workflow. That's why I put together a sample set of pics that reliably reproduce the problem (at least on my Mac).
Photo of Todd Shaner

Todd Shaner, Champion

  • 1131 Posts
  • 366 Reply Likes
Good to know–At least you've got something Adobe can use to troubleshoot the issue.
Photo of Nick Crossley

Nick Crossley

  • 3 Posts
  • 0 Reply Likes
I have seen this problem with a variety of develop setting searches, and with both DNG and JPEG files, all after the use of Sync to copy a setting across large numbers of photos. The work-around of scrolling through the grid view until the metadata status change indicator is updated has worked for me in all cases - but it can be very slow for many hundreds of photos!
Photo of Todd Shaner

Todd Shaner, Champion

  • 1131 Posts
  • 366 Reply Likes
Mac or Windows system?
Photo of Nick Crossley

Nick Crossley

  • 3 Posts
  • 0 Reply Likes
Mac. Early 2009 17" MacBook Pro, 2.93 GHz Core 2 Duo, 8Gb ram, running 10.10.5.
Photo of John R. Ellis

John R. Ellis, Champion

  • 3894 Posts
  • 1034 Reply Likes
"with both DNG and JPEG files"

I wasn't able to reproduce the problem with raws and .xmp sidecars (but I didn't try that hard). The metadata format between DNG and JPEGs is very similar, and LR sometimes ends up rewriting an entire JPEG or DNG, causing much more i/o than updating a .xmp sidecar. So it is possible that sidecars involve a different code path or behavior and don't trigger the problem.
Photo of LighroomStatistics

LighroomStatistics

  • 9 Posts
  • 1 Reply Like
See thread on Lightroom SDK forum: https://forums.adobe.com/message/8512793#8512793
Probably the same error.
(Edited)