# Access to Lightroom History from Plugin (Lua)



## Slartbartfast (Feb 10, 2013)

Hallo together,

I've got a serious problem with my library.
I don't know when it happened but it was too long ago to apply a backup.

The development settings for a large number of Pictures (1000+) were reset (as if "Reset All Settings" has been applied to all pictures).
Unfortunately this happened without my recognition as I did only manipulate the underwater-pictures extensively.

What I'm about to do now is to write a simple plugin, which should do the following:


```
For each selected picture:
   Check the history
   If the last history step is "Reset all Settings"  / "Einstellungen zurücksetzen" (in German)
    --> remove the history step
```

Unfortunately I could not find a way to access the develop history from a LrPhoto?
Does anybody know how to do this?

Thanks in advance,
  Chris


----------



## Jim Wilde (Feb 10, 2013)

You could try this:

http://lightroomsolutions.com/oh-xxxx/

Welcome to the forum, BTW.


----------



## Slartbartfast (Feb 10, 2013)

Hi Jim,

thanks very much for the quick response.
I've also been looking at the sql db and I think this will be the way to go.
Hope that adobe will provide a way to access the history in some future version without database hacks )

Cheers,
  Chris


----------



## Jim Wilde (Feb 10, 2013)

I think Rob Cole took this idea and turned it into a plug-in (called ScrewAutosync, I believe)....you'll probably find it on his web-site (just Google his name), but if you are comfortable the SQL hack should suffice.


----------



## areohbee (Feb 10, 2013)

*Indeed, and...*



TNG said:


> I think Rob Cole took this idea and turned it into a plug-in (called ScrewAutosync, I believe)....you'll probably find it on his web-site (just Google his name), but if you are comfortable the SQL hack should suffice.



Yes, the quirky-named ScrewAutoSync will roll back edit history by a specified number of steps (targets all photos in a special collection). What it *won't* do is help you figure out which photos need to be rolled back by how much. If you need to add intelligence and have the where-with-all to do so, the source code is included. - if you come up with something reusable, please contact me so it can be folded back in to ScrewAutoSync for others to benefit from too.

http://www.robcole.com/Rob/ProductsAndServices/MiscLrPlugins/#ScrewAutoSync


----------



## Slartbartfast (Feb 11, 2013)

areohbee said:


> if you come up with something reusable, please contact me so it can be folded back in to ScrewAutoSync for others to benefit from too.
> 
> http://www.robcole.com/Rob/ProductsAndServices/MiscLrPlugins/#ScrewAutoSync



Hi Rob, 

wow, and thanks - that´s really great to get such a good feedback so fast 
The idea to make something reusable is very good. As I don't have time pressure (published my important pics before my accident), I'm thinking about a small, nice command-line utility written in the language im most familiar with (Java). I'm thinking about something like 
- "Scan all files and retrieve the name and date of the last history step"
- offer additional filter by modification timestamp (adobe_libraryimagedevelophistorystep.dateCreated), 
- offer additional filter by collection name
- offer filter by name of the modification to be undone (in case you have edited some pictures after the accident)
- ...

When I have something I will definitely provide it to the public as I think this problem is something many users share...

Cheers, 
 Chris


----------



## Brad Snyder (Feb 12, 2013)

In the meantime, can you whip us up some fjords?


----------

