Skip to main content
Known Participant
March 14, 2024
Answered

Failure enumerating Develop Presets

  • March 14, 2024
  • 1 reply
  • 418 views

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")

 

Versions:
LR Classic 13.2
SDK 13.2
This topic has been closed for replies.
Correct answer johnrellis

[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:

 

 

1 reply

johnrellis
johnrellisCorrect answer
Legend
March 14, 2024

[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:

 

 

PaulWaldoAuthor
Known Participant
March 15, 2024

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!

johnrellis
Legend
March 15, 2024

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.