Open

by damned truths

submit your photo


Hall of Fame
View past winners from this year

Please participate in Meta
and help us grow.

Take the 2-minute tour ×
Photography Stack Exchange is a question and answer site for professional, enthusiast and amateur photographers. It's 100% free, no registration required.

Can I use a tool like exif2 or exiftool to programatically inspect and manipulate the flag used for "Rejected" in Lightroom? I can't find a field that seems to correspond to it. If not, is there another OSX/Linux/Unix tool that could do that?

share|improve this question
    
Here's a good intro to the LR database earthboundlight.com/phototips/… I've tried manipulating the Pick field directly in a test db using SQLite but the photo shows no flag and no flag options when I reopen the catalog so there's more to it than just the pick field. –  mmesford Oct 30 at 16:22

1 Answer 1

up vote 5 down vote accepted

This is Lightroom-specific metadata, stored in the Lightroom catalog. You can verify this with this command1 in the OS X Terminal:

$ exiftool -b -xmp mypic.dng > orig.xmp

Now go back to Lightroom reject mypic.dng and hit ⌘/Ctrl-S to force Lightroom to sync its copy of the metadata to the photo file on disk.2 Back in the Terminal, say:

$ exiftool -b -xmp mypic.dng > new.xmp
$ diff orig.xmp new.xmp

That will tell you what changes Lightroom made to the photo's embedded metadata. All you'll see are a metadata date change and some UUID changes. You will not see any mention of a "Rejected in Lightroom" type of field, because there isn't one. There is nothing there for exiftool to manipulate.

You'll have to do this in Lua, as a Lightroom plugin. Once you have the LrPhoto reference, you simply say:

photo:getRawMetadata('pickStatus')

to get the current value. It will be 1 if picked, 0 if neutral, and -1 if rejected.

You could then un-reject a photo with:

photo:setRawMetadata('pickStatus', 0)

Footnotes:

  1. If you don't yet have exiftool on your system, the easiest way to get it is to first install Homebrew, then say brew install exiftool.

  2. Even with the Automatically Write Changes into XMP setting enabled, there can be a delay of several seconds between a change and the change hitting the disk.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.