I am working on an export plugin which sends photos to an external app, which creates a new photo. The plugin then imports the new photo into the same folder where the original(s) came from.
However if someone exports photos from within a collection, I would like to be able to add the new photo to the collection.
Is there some way I can tell whether the user exported photos from a collection, and if so, which one?
photo:getContainedCollections will tell me whether they are in any collections, but not if the user exported them from a collection, or which one.
catalog:getActiveSources() looks promising, but I haven't been able to get any information from it, and I gather that it has serious bugs up until late LR4 versions.
Is there some call I'm missing which will do the job?
Thanks in advance
If your plugin is doing the exporting, just record which collections are in active sources upon export.
PS - I'm not aware of any problems with catalog:getActiveSources(), other than differences in what's returned for the special collections (e.g. all-photos and recent-imports collections) vs. non-special collections.
Of course you can't add photos to smart collections, so if collection is smart, consider an option for tagging in such a way that it will be auto-added (food for thought anyway, maybe doesn't apply...).