4 Replies Latest reply on Jan 29, 2016 8:57 AM by johnrellis

    Access to the development history of a photo from Plugin

    herrclich

      Hi,

       

      my intention is to reduce the history of development steps.

      Some time ago there was a plugin that is not available anymore. Because of that I want to challenge myself a little bit and write it by myself.

       

      Unfortunately I have not found any access to the history. My best guess was the LrDevelopmentController and LrPhoto.

       

      Some ideas?

        • 1. Re: Access to the development history of a photo from Plugin
          johnrellis Most Valuable Participant

          You're probably referring to one of Rob Cole's plugins.   I believe his history plugin accessed the catalog database directly using SQL.  As discussed in this recent thread, the plugin needs to do a song-and-dance routine to access the catalog: exit LR, run a script to access the catalog with SQL, restart LR.

          • 2. Re: Access to the development history of a photo from Plugin
            johnrellis Most Valuable Participant

            Of course, accessing the catalog directly with SQL is not at all documented or supported by Adobe, so you have to do your own reverse engineering of the database schema for each new release.

            • 3. Re: Access to the development history of a photo from Plugin
              herrclich Level 1

              Dear John,

               

              thanks for your information and your guess is right regarding Rob Cole and his missing plugin. I have seen the conversation and it seems to be that there is now other way beside the reengineering path.

              I have started already and it looks like the SQLite file is not a real issue (by now). My plan is to use C# to access the file and to avoid the usage of lua completely.

              The first queries are functional and the most relevant tables are identified. The access works, which is quite satisfying for me. Nevertheless this was the easy part. Next challenge will be to tie the things together and find all foreign keys in the relevant tables.

               

              Unfortunately I am not a community guy and maybe I will bring it not to a final success (time is limited), but I try to give some information back.

               

              What I have done so far:

              - access to the lrcat file throught C# with this tutorial: Getting started with SQLite in C# – Tigran's Blog

              - root folders for images -> table "AgLibraryRootFolder"

              - image files on the disk -> table "AgLibraryFile"  ->  folder seems to be the foreign key from AgLibraryRootFolder

              - images in the catalog -> table "Adobe_images"  -> rootfile seems to be the foreign key from AgLibraryFile

              - history steps for all images -> table "Adobe_libraryImageDevelopHistoryStep"  ->  image seems to be the foreign key from Adobe_images

               

              All quite interesting, but working directly on a database beside an application is always risky.

               

              Let me know, if you are interested in more details or the progress. Normally I will not extend a topic in forums and this forum is not on my regular visit list.

               

               

              Thanks to you John for the fast response.

              • 4. Re: Access to the development history of a photo from Plugin
                johnrellis Most Valuable Participant

                If you learn enough of the database schema to access the history, I think it would be useful to post the schema back here. Over the years others have asked how to access the history.