Lightroom: SDK plugin programming: limitations about collection

  • 1
  • Idea
  • Updated 4 years ago
  • (Edited)
In plugin SDK Programming,
Some useful functions (addPhoto,removePhotos ...) to manage collection are limited.

"This call can be used within the same catalog:with___WriteAccessDo call that created this collection."

Managing photos in pre-exists collection from plugin ,are not permitted.

Ahh..
Photo of Jun48

Jun48

  • 78 Posts
  • 11 Reply Likes
  • frustrated

Posted 4 years ago

  • 1
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 382 Reply Likes
Yeah - you have to be diligent: many items which are created in one catalog with..do call can not be used until the with..do method returns. For example you can't use freshly created keywords either..

I use a "recursive" catalog update method which works around this problem, which you can find in the framework folder of any of my plugins, but without such a method you just have to call with..do twice.

+1 vote for less of these limitations, but also I wouldn't hold breath for big changes in this area any time soon - I assume it's something very entrenched in database access methodology.. - hope I'm wrong.

PS - the documentation is pretty good about letting you know when you can expect problems like this, so if unsure: read the doc; and of course check return codes religiously..

Cheers,
Rob