Skip to main content
Inspiring
May 9, 2018
Question

Plugin: external control of Lightroom (OS X)

  • May 9, 2018
  • 1 reply
  • 948 views

So A while back I started a little project that would allow me to send commands to Lightroom, execute lua code & return stuff back. Basically a Lightroom plugin and a lightweight server that talk to each other, the server sending the plugin Lua code to execute when triggered to do so by shortcut keys. Since then it's grown a bit. I can:

  • Use shortcut keys to trigger execution of Lua code in Lightroom
  • Build HTML pages with sliders & buttons that send Lua code to Lightroom for execution and receive information back.
  • Have Lightroom send events on active source, active photo & module changes to HTML pages, keeping them up to date on user selections
  • Use Alfred, the Spotlight replacement (see here), send Lua code to Lightroom for execution and receive return data

It's become an integral part of my workflow. I have shortcut key driven dev param editing, dev param editing from an HTML page, shortcut driven jumping between sources and active source history stacks that I can jump around in using shortcut keys.

It's extremely powerful this idea of having Lightroom execute code sent from a remote source like this - although not necessarily very friendly if you don't code, which I'm thinking on - and now I'm wondering whether to take it further.

So do people think this is worth pursuing? If so I'll work on release notes and some demo screencasts, maybe think about some kind of test programme.

Thoughts appreciated.

This topic has been closed for replies.

1 reply

Inspiring
May 10, 2018

It sounds technically interesting but I'm curious what the use case is for sending Lua code to Lightroom rather than having the Lua already in the plugin. Is the code being generated dynamically for the circumstances at that moment? Is what you're doing so sophisticated that it calls for that level of complexity? I'm not down on the technique but I'm curious what is driving it.

db

kimaldisAuthor
Inspiring
May 10, 2018

Flexibility. Sending Lua code allows you to have control over that code outside of the plugin. If it was in the plugin you wouldn't be able to alter it without editing the plugin itself and re-starting it. It's not really  complicated; user hits shortcut key combination, code assigned to the shortcut is sent to Lightroom, Lightroom executes it.

The server essentially listens for shortcut key presses. This has to be outside of Lightroom because it can't be done inside Lightroom. It's also runs http server, serving up pages with controls sending commands to Lightroom which again, has to be external to Lightroom.  So something has to be sent to Lightroom, code is easy and powerful.

It has some disadvantages, obviously. Most notably, you have to be fairly skilled to build triggers. I have some thoughts on that.