- Create a directory with
.lrpluginextension anywhere on your disk, e.g.LightroomPluginTemplate.lrplugin. - Copy there attached
Info.luafile (don't change its name). - Copy there attached
LightroomPluginTemplate.luafile. - Start or switch to Lightroom.
- Click
Filemenu and thenPLug-in Managermenu item. - Click
Addbutton in bottom left of theLightroom Plug-in Managerdialog. - Find and select
LightroomPluginTemplate.lrpluginfolder and clickSelectt Folderbutton. - Click
Donebutton to click the dialog. Now your plugin is installed. - Click
Filemenu, thenPLug-in Extrasmenu item and thenShow Lightroom versionmenu item underLightroom Plugin Templatesection. - You will see a message box reposting Lightroom detailed version number.
Created
March 8, 2018 09:27
-
-
Save vurdalakov/6a86e51f643e9ad300824cb184988bb3 to your computer and use it in GitHub Desktop.
Lightroom plugin template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| return { | |
| LrSdkVersion = 6.0, | |
| LrSdkMinimumVersion = 6.0, | |
| LrToolkitIdentifier = 'net.vurdalakov.lightroomplugintemplate', | |
| LrPluginName = 'Lightroom Plugin Template', | |
| LrExportMenuItems = { | |
| title = "Show Lightroom &version", | |
| file = "LightroomPluginTemplate.lua", | |
| enabledWhen = "photosSelected" | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local LrApplication = import 'LrApplication' | |
| local LrTasks = import 'LrTasks' | |
| local LrDialogs = import 'LrDialogs' | |
| -- enable logging (in Documents folder) | |
| local LrLogger = import 'LrLogger' | |
| local logger = LrLogger('LightroomPluginTemplate') | |
| --logger:enable("logfile") -- log to LightroomPluginTemplate.log file in Documents folder | |
| logger:enable("print") -- log to debug output | |
| logger:trace("This is LightroomPluginTemplate plugin") | |
| -- async task | |
| LrTasks.startAsyncTask (function() | |
| logger:trace("Async task") | |
| end) | |
| local version = LrApplication.versionTable() | |
| local versionString = string.format("Lightroom version %d.%d revision %d build %d", version.major, version.minor, version.revision, version.build) | |
| logger:trace(versionString) | |
| LrDialogs.message(versionString) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment