Skip to main content
Participant
October 2, 2019
Question

Is it possible to retrieve photo array of kPreviousImport "collection"

  • October 2, 2019
  • 1 reply
  • 340 views

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-photo-array-of-kpreviousimport-collection

 

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 LrCollectionLrCollectionSetLrPublishedCollectionLrPublishedCollectionSetLrFolder or one of the string constants defined in these LrCatalog properties:

  • kAllPhotos
  • kQuickCollectionIdentifier
  • kPreviousImport
  • kTemporaryImages
  • kLastCatalogExport

 

Thank you for your help

This topic has been closed for replies.