rob_cole_2221866's profile

4.5K Messages

 • 

76.3K Points

Wed, Oct 19, 2011 3:54 AM

Closed

Lightroom SDK: collection set shows photos, but child collections do not

This happens when add-photos collection method is called after remove-all-photos in the same with-write-access-do call, for example - the Changed Photos collection has 3 photos, but none are shown unless I select the parent collection set:


If I select RC xEmP (Dev) collection set then all photos are displayed.
(there is only the one collection in the collection set)

If remove-all-photos and add-photos are wrapped separately ( separate with-write-access-do calls ), then this problem does not happen.

This works:

local s, m = cat:withRetries( 20, catalog.withWriteAccessDo, "Remove photos from collection", function( context )
coll:removeAllPhotos()
end )
if s then
local s, m = cat:withRetries( 20, catalog.withWriteAccessDo, "Add photos to collection", function( context )
coll:addPhotos( call.collPhotos )
end )


This results in the aforementioned problem:

local s, m = cat:withRetries( 20, catalog.withWriteAccessDo, "Remove photos from collection", function( context )
coll:removeAllPhotos()
coll:addPhotos( call.collPhotos )
end )
No Responses!