Mist

by Jakub

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 '14 at 16:22

1 Answer 1

up vote 8 down vote accepted

This is Lightroom-specific metadata, stored in the Lightroom catalog. You can verify that with this command¹ 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 save its copy of the metadata to the photo file on disk.² 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 an arbitrarily-long delay between a user action in Lightroom and the XMP update hitting the disk, depending on what else Lightroom has going on.

    I once lost hours of work by changing a core keyword in my catalog, then hours later running exiftool on some files to make a change I couldn't make from within Lightroom. After running that command, I said Metadata → Read Metadata from File, then was dismayed to find that those photos' metadata was reset to a state from many hours before because those XMP updates were batched behind the updates for the core keyword change, still running! (It took about a full day for Lightroom to finish updating all the XMP data on disk.)

    If I'd said Metadata → Save Metadata to File before running exiftool on those files, I wouldn't have lost that work, because it jumps the queue, saving the metadata for the selected photos immediately, even if there are prior metadata changes still being saved in the background.

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.