Copy link to clipboard
Copied
Hi everyone, this thread is a copy pasta of this thread i wrote on this forum : https://feedback.photoshop.com/photoshop_family/topics/sdk-lightroom-is-it-possible-to-retrieve-phot...
Il don't know which forum is the good one for this question.
I am trying to make a plugin in order to apply a batch treatment on photos that are actually viewed in lightroom depending on the current view in the library tab.
So i wanted to use the catalog:getActiveSources() function in order to get the right folder or collection and get photos in them.
This function work very well with directory or classic collections, but when the current view in Lightroom is the Previous import one, the function returns to me : "previous_import" that is the value of the kPreviousImport constant.
Is there any possibilities to retreive photos contained in this "collection" ?
We can't reach it with the different collection functions : catalog:getChildCollections(), catalog:getChildCollectionSets()
I even tried to find this "collection" using a loop and catalog:getCollectionByLocalIdentifier() function but with no result 😞
The documentation of getActiveSources say :"
catalog:getActiveSources()
Retrieves currently viewed collections, collection sets, or folders.
First supported in version 3.0 of the Lightroom SDK.
Return value(table) Array of the currently viewed objects as LrCollection, LrCollectionSet, LrPublishedCollection, LrPublishedCollectionSet, LrFolder or one of the string constants defined in these LrCatalog properties:
Thank you for your help
Copy link to clipboard
Copied
See my reply in the other forum: