Lightroom SDK: setActiveSources does not work if one source is folder and the other source is collection.

  • 3
  • Problem
  • Updated 1 year ago
catalog:setActiveSources does not work if one source is folder and the other source is collection.

One can set active sources this way using the keyboard/mouse, but not using the API.

Its a problem, if a plugin is to restore sources to the way the user had them before doing something that required changing active sources.
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 379 Reply Likes

Posted 7 years ago

  • 3
Photo of John R. Ellis

John R. Ellis, Champion

  • 3589 Posts
  • 927 Reply Likes
Not fixed in LR 5 Beta :-(
Photo of John R. Ellis

John R. Ellis, Champion

  • 3589 Posts
  • 927 Reply Likes
While not technically a bug, since this restriction is documented, it is surely a design misfeature. Surely it's reasonable to expect that setActiveSources(getActiveSources()) would work and set the sources to their current state?
Photo of john beardsworth

john beardsworth

  • 998 Posts
  • 219 Reply Likes
catalog:setActiveSources( "entire_library" ) seems to work, but is not documented.

catalog:setActiveSources( "kAllPhotos" ) seems to be documented, but does not work.

Is that right?
Photo of John R. Ellis

John R. Ellis, Champion

  • 3589 Posts
  • 927 Reply Likes
The value catalog.kAllPhotos is documented (it is "entire_library").  I.e. 

catalog:setActiveSources (catalog.kAllPhotos)

Some undocumented values for getActiveSources() setActiveSources():

"synced_files"  (shown as "All Synced Photographs" in the UI)
"sync_duplicate_virtual_copies" (shown as "Synced Duplicates")

https://feedback.photoshop.com/photoshop_family/topics/lightroom-sdk-catalog-getactivesources-return...