1 person found this helpful
I don't think it is possible for a plugin to stack photos that are already in the catalog. As you observed, addPhoto() only works for photos not in the catalog, and the SDK provides no way for removing photos from the catalog.
Thanks, that's what I was afraid of..... Time to start playing with PERL, SQLITE, and the lrcat file to manually edit the database. Will just have to try it on a test catalog before trying this!
You are braver than I!
Be aware that by modifying the database directly you can do a lot of damage and Lightroom support might not be able (or even willing) to help you recover from it. Backups are your friend if you go down this path.
Easy to do with an SQLite client, but NOT while Lightroom has the catalog open. Which means you can't do it from a plugin, unless your user's are willing to restart Lightroom.
I'm the type of guy that voids the warrenty on everything i buy . I'm also completely an amature so even if I lost my catalog, it would just be some frustration and swearing on my end. That being said, I do go backup crazy with daily backups through Acronis True Image, and weekly backups through lightroom. Oh and did I mention these backups are copied across 3 different computers?
I did write another plugin that used sql to query the catalog so I did know that you can't use it while Lightroom has the catalog open. In my previous plugin i got around the issue by having it use the latest backup catalog to do the query on (it's only SELECT statements). In this case I think I'll turn it into a launcher so it runs before every time you start lightroom. I'm really working on this just for me, if I end up with something that at least half works and others are interested I would certainly share with the community