- Create a directory with
.lrplugin
extension anywhere on your disk, e.g.LightroomPluginTemplate.lrplugin
. - Copy there attached
Info.lua
file (don't change its name). - Copy there attached
LightroomPluginTemplate.lua
file. - Start or switch to Lightroom.
- Click
File
menu and thenPLug-in Manager
menu item. - Click
Add
button in bottom left of theLightroom Plug-in Manager
dialog. - Find and select
LightroomPluginTemplate.lrplugin
folder and clickSelectt Folder
button. - Click
Done
button to click the dialog. Now your plugin is installed. - Click
File
menu, thenPLug-in Extras
menu item and thenShow Lightroom version
menu item underLightroom Plugin Template
section. - 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 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 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