• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
3

Failure enumerating Develop Presets

Explorer ,
Mar 14, 2024 Mar 14, 2024

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

 

Versions:
LR Classic 13.2
SDK 13.2
TOPICS
macOS , SDK

Views

219

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Mar 14, 2024 Mar 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:

 

johnrellis_0-1710460309028.png

 

Votes

Translate

Translate
LEGEND ,
Mar 14, 2024 Mar 14, 2024

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:

 

johnrellis_0-1710460309028.png

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 15, 2024 Mar 15, 2024

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!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 15, 2024 Mar 15, 2024

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines