Copy link to clipboard
Copied
I am a relative newbie to LR Plugin development, but an experienced software dev. I'm trying to do work with Develop Presets, and am starting by simply trying to enumerate the existing presets. When I try to run the code below, I get the error
The plug-in encountered an error when performing the menu item “Tester”.
Tester.lua:5: attempt to call field 'LrDevelopPresetFolders' (a nil value).
As I read the SDK docs, developPresetFolders is a function, not a field. It looks like the SDK docs are quite thorough, so I assume I'm reading something incorrectly.
local LrDialogs = import 'LrDialogs'
local LrApplication = import 'LrApplication'
LrDialogs.message("LrDevelopPresetFolders()",
LrApplication.LrDevelopPresetFolders(), "info")
[This post contains formatting and embedded images that don't appear in email. View the post in your Web browser.]
Change "LrApplication.LrDevelopPresetFolders()" to "LrApplication.developPresetFolders()", for example:
Copy link to clipboard
Copied
[This post contains formatting and embedded images that don't appear in email. View the post in your Web browser.]
Change "LrApplication.LrDevelopPresetFolders()" to "LrApplication.developPresetFolders()", for example:
Copy link to clipboard
Copied
Thank you @johnrellis! User error reading the docs (plus maybe a little "assistance" from VS Code code completion)
What application is that where you provided the screenshot? It looks like a Lightroom debugger/IDE, which would be very helpful!
Copy link to clipboard
Copied
That's my lightweight Debugging Toolkit.
There's also Zerobrane, a full-fledged IDE for Lua.
Both of them require you to make small annotations to your code. The Debugging Toolkit understands LR's idiosyncratic multi-tasking architecture better and provides a better pretty printer for nested tables. But Zerobrane is more featureful.