3 Replies Latest reply on Apr 12, 2010 7:31 AM by JW Stephenson

    Iterate over selected images, read/change crop settings?

    radeldudel

      I'd like to write a Lightroom script which iterates through all selected images, read and change the crop settings of (nearly) every image.

       

      Is this possible to achieve in lua? I searched the SDK doc for crop, but found not much which helped me.

       

      Kind regards,

      Sam

        • 1. Re: Iterate over selected images, read/change crop settings?
          JW Stephenson Level 4

          Sam,

           

          It is actually not a lua limitation.  Crop is a development setting and the current SDK doesn't allow you to manipulate those settings.  You are pretty much limited to the getFormattedMetadata, getRawMetadata and setRawMetadata functions under the LrPhoto class.  I am sure the next generation SDK will open up a few more options - hopefully some development settings are included among them.

           

          Jeff

          1 person found this helpful
          • 2. Re: Iterate over selected images, read/change crop settings?
            radeldudel Level 1

            Jeff,

             

            thanks for the reply - so my only bet right now would be to export the development settings to a sidecar file, modify these files and sync them back to Lightroom?

             

            A pity, but at least now I can stop searching for this, thanks!

             

            Sam

            • 3. Re: Iterate over selected images, read/change crop settings?
              JW Stephenson Level 4

              Sam,

               

              Yes, I think that is indeed the only current way to do what you desire.  It is not without faults though as you must remember to save all metadata to the sidecar file from LR before manipulating it outside of LR or you will lose the LR adjustments you have made to the image (unless of course you keep yours in sync automatically - which I doubt).  Also, after syncing with outside changes to images, I find sometimes of the metadata icons seem to never resolve themselves.  Not very often but it does occur and currently there is not way to filter for those images in this state such that one can work to resolve them - you just have to stumble upon them.

               

              In any case, be careful.  It might be worth waiting a few months for the LR3 SDK before integrating this into your workflow.

               

              Jeff