Lightroom SDK: make original filename metadata available

  • 5
  • Idea
  • Updated 4 years ago
Please make original filename available in raw or formatted metadata - thanks.
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 372 Reply Likes

Posted 7 years ago

  • 5
Photo of Victoria Bampton - Lightroom Queen

Victoria Bampton - Lightroom Queen, Champion

  • 3831 Posts
  • 1270 Reply Likes
While we're talking about original filename, I'd like to see it written to xmp. Bridge does, and it's a handy feature at times.
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 372 Reply Likes
There is a way to access original filename via SDK/plugin, by taking advantage of the fact that you can rename a photo using the original filename token.

So, all you have to do is:
1. make sure there is a filenaming template (preset) which includes the original filename token.
2. invoke photo:getNameViaPreset( originalFilenamePreset )

#1 is tricky business, since Lr does not include such a filenaming preset by default. In a nutshell, to assure the requisite filenaming preset:
* include a Original Filename.lrtemplate file with the plugin
* Figure out where to write it to, then do so, and prompt user to restart Lightroom.

Once Lr is re-opened, original filename is simply accessible ala #2.

Adobe: one way for an easy fix is to include a built-in preset:

Original Filename
(.lrtemplate)

PS - To be clear: this does not allow one to get original filename extension, but still - it may be a big help..

Bonus idea: include token for getting original extension, and corresponding built-in preset:

Original Filename (with extension)

Rob