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

P: photo:addOrRemoveFromTargetCollection() adds or remove all selected photos rather than just "phot

LEGEND ,
Jan 04, 2026 Jan 04, 2026

The method photo:addOrRemoveFromTargetCollection() adds or removes all selected photos from the target collection rather than just "photo".   To reproduce in LR 15.1 / Mac OS 15.7.1:

 

1. Save these lines to the file "add-remove-bug.lua" in the Lightroom Scripts folder:

local catalog = import "LrApplication".activeCatalog ()
catalog:getTargetPhoto ():addOrRemoveFromTargetCollection ()

 

2. Restart LR.

 

3. In Library, select three or more photos.

 

4. Do Scripts > add-remove-bug. Observe that all selected photos are added to the current target collection (incorrect), rather than just the most-selected photo.

 

If the developers consider the current behavior "as designed" (which would be very weird), then the documentation should be corrected to explain that behavior clearly.

Bug Unresolved
TOPICS
macOS , SDK , Windows
35
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
no replies

Have something to add?

Join the conversation