Lightroom SDK: add hooks for sorting

  • 4
  • Idea
  • Updated 4 years ago
Please add hooks so plugins can be involved in photo sorting.

Presently, only fixed sorts are supported, e.g. Capture Time ... User Order,

but no way for a plugin to define "sort by pixel count" or "long dimension", or anything like that.
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 379 Reply Likes

Posted 7 years ago

  • 4
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 813 Reply Likes
In other words, you want a way for the plugin to define a new, custom sort order.
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 379 Reply Likes
Yes, I think so. Maybe like a lua table sort - plugin specifies whether photo A should come before or after photo B, then Lightroom feeds all the photos to it...? Or, maybe the plugin just comes up with an array of indices, sorted that includes the whole set - dunno best way to do it, but I think you've got the idea... PS - I think it would need to be dynamic, so if user crops a photo, it would change the sort order, if user is sorting by crop dim, without having to refresh it somehow, although a deferred refresh is an interesting idea too...
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 379 Reply Likes
A work-around for the mean time, a plugin can sort a collection via:

* remove all photos from collection
* add all photos back to collection in prescribed order.

User must change to Sort: Custom Order..

So, if Adobe just put hooks into the sort menu, like there is for lib filter, that would do it, e.g.
* add/remove sort item
* get/set sort item

PS - this would go really well with the ability to read the sort order (not just the sort item selected, but what order the photos are actually in).