Lightroom SDK: need catalog:saveMetadata( photos ) and catalog:readMetadata( photos )

  • 3
  • Idea
  • Updated 1 month ago
Yes - jumping the gun here...

the new photo:saveMetadata() and photo:readMetadata() functions (@Lr5.0 undocumented and unreleased) are very welcome and useful - thank you.

However they are slow as molasses if multiple photos need metadata saved/read - we need a batch version.

Sorry if premature, but I was hoping to tip the odds for SDK @5.1.

Thanks,
Rob
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 394 Reply Likes

Posted 7 years ago

  • 3
Photo of John R. Ellis

John R. Ellis, Champion

  • 5165 Posts
  • 1476 Reply Likes
Also, it would be good if readMetadata() had an option to suppress popping up the confirmation dialog to the user.
Photo of Aayush Arora

Aayush Arora

  • 2 Posts
  • 0 Reply Likes
>Also, it would be good if readMetadata() had an option to suppress popping up the confirmation dialog to the user.

Hi, Is this option available today in the SDK?
Photo of John R. Ellis

John R. Ellis, Champion

  • 5164 Posts
  • 1476 Reply Likes
While photo:readMetadata() and photo:saveMetadata() are both available, neither is documented. And there is no option to suppress the confirmation dialog, though the user can check the box that says "Do not show again".
Photo of Aayush Arora

Aayush Arora

  • 2 Posts
  • 0 Reply Likes
Hey John
Is their anyway to get around this?

After our third party app complete the processing, it writes meta files and request Lightroom to read meta data by calling photo:readmeta function

As our app writes metadata about all the files of the catalogue, the dialog appears again and again for every file.

Currently we are looping all the photos, and calling
photo:readmeta for every photo.

If there is no way, to bypass the dialogue, is their to just call the dialogue once and read all the metadata of all files rather than looping the files and getting the dialogue n times.
Photo of john beardsworth

john beardsworth

  • 1356 Posts
  • 374 Reply Likes
Switch the application view to grid - then the message will appear once.
Photo of John R. Ellis

John R. Ellis, Champion

  • 5165 Posts
  • 1476 Reply Likes
Aauush: "If there is no way, to bypass the dialogue, is their to just call the dialogue once and read all the metadata of all files rather than looping the files and getting the dialogue n times."

The only way I know of (documented or undocumented) is to call photo:readMetadata() on every photo. That will pop up a dialog for every photo:



In my tests, that dialog appears for every call to photo:readMetadata() regardless of whether LR is in Grid or Loupe view.

However, once the user clicks Don't Show Again, then LR will never show that dialog again when photo:readMetadata() is called, regardless of the current view.

So I think the best you can do is to advise your users to click Don't Show Again.