Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Set pick/rejected flag in catalog?

Explorer ,
May 14, 2015 May 14, 2015

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.

Wolfgang

TOPICS
SDK
610
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , May 14, 2015 May 14, 2015

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.

Translate
LEGEND ,
May 14, 2015 May 14, 2015

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 15, 2015 May 15, 2015
LATEST

Thanks! This code does exactly, what I wanted:

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

    table.remove(listMark, #listMark)

   

    local mySelection = import "LrSelection"

    mySelection:selectAll()

    mySelection:removeFlag()

   

    myCatalog:setSelectedPhotos(mostSelected, listMark)

   

    mySelection:flagAsPick()

    mySelection:selectNone()

Kind regards,

Wolfgang

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines