2 Replies Latest reply on May 15, 2015 3:24 AM by WDBerlin

    Set pick/rejected flag in catalog?


      Hi there,


      I'm looking for a way to set the pick/rejected flags of photos.


      I know: - LR does it not by metatags but in the catalog.

                  - This has already been discussed in this forum in 2011 without positive result.


      Have there been any changes since 2011? Maybe in LR 6?


      Is there any other way to "mark" photos temporarily without writing metadata?


      Or is there a function collection:addPhoto() for smartcollection in LR 6 (in LR 5 it is not allowed as far as I understand).


      Thanks for your help.



        • 1. Re: Set pick/rejected flag in catalog?
          johnrellis Most Valuable Participant

          The LR 6 APIs include LrSelection, which functions for getting the current flag and changing the flag: Lightroom 6 SDK Changes.  There's no documentation yet, but it appears the functions operate on the currently selected photos.  So if you want to change the flags on other photos, you'd probably have to save the current selection, change it to the photo you want to change, make the flag change, then restore the selection.

          • 2. Re: Set pick/rejected flag in catalog?
            WDBerlin Level 1

            Thanks! This code does exactly, what I wanted:


                 local mostSelected = listMark[#listMark]    --the last one

                table.remove(listMark, #listMark)


                local mySelection = import "LrSelection"




                myCatalog:setSelectedPhotos(mostSelected, listMark)





            Kind regards,