2 Replies Latest reply on Dec 24, 2013 12:18 PM by Rik Littlefield

    export plugin: how to learn the source path of exported files?

    Rik Littlefield

      Short version: Can an export plugin determine the source path for an image that was exported as copy to a temporary directory?  If so, how?

       

      Long version...

       

      I'm a newbie SDK user, writing a plugin that exports multiple images to my own external program that blends them together and produces one or more new images that the user probably wants to import back into Lightroom.

       

      I have the plugin working OK with export to a temporary directory. 

       

      Now I'd like to add a feature in which my program gets access to the folder path of the original images, so it can offer the user the option to save the result image(s) back to the same directory. 

       

      Is it possible for the export plugin to get the source path for an exported image, say from a rendition object? 

       

      Alternatively, can the export plugin get the same or similar information some other way, for example by determining the path for the currently selected folder in the Lightroom catalog?

       

      Thanks for any suggestions!

       

      --Rik

        • 1. Re: export plugin: how to learn the source path of exported files?
          areohbee Level 5

          I don't think the source path metadata is in the exported file.

           

          Once upon a time I manually encoded the source path in the jpeg file upon export, but I stopped doing that, now I just save whatever info I need as part of the "remote" ID (assuming publish service).

           

          But maybe I misunderstood. I mean, during export the source path is readily available as rendition.photo:getRawMetadata( 'path' ) - is that what you meant? (I previously thought you meant after export, possibly loooong after export...).

           

          Rob

          • 2. Re: export plugin: how to learn the source path of exported files?
            Rik Littlefield Level 1

            during export the source path is readily available as rendition.photo:getRawMetadata( 'path' ) - is that what you meant?

            I think that's exactly what I was looking for.  In quick test it looks like it will work great. 

             

            Again, I'm a newbie to Lightroom SDK.  I figured that what I wanted was probably simple, but after spending over an hour searching on keywords that didn't find a good answer, I figured it was time to ask a human.

             

            Many thanks for the quick and very helpful reply!

             

            --Rik