Lightroom: SDK plugin programming: limitations about collection

  • 1
  • Idea
  • Updated 3 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.

Photo of Jun48


  • 70 Posts
  • 7 Reply Likes
  • frustrated

Posted 3 years ago

  • 1
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 370 Reply Likes
Yeah - you have to be diligent: many items which are created in one catalog call can not be used until the 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 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..