Adobe 65007312 - Photoshop Lightroom Programmer's Manual page 193

Mac
Hide thumbs Also See for 65007312 - Photoshop Lightroom:
Table of Contents

Advertisement

C
10: Defining Metadata: A Walkthrough
HAPTER
5. The section definition will use variables defined in an initialization script. In the
LrInitPlugin
return {
LrSdkVersion = 3.0,
LrToolkitIdentifier = 'sample.metadata.mymetadatasample',
LrPluginName = LOC "$$$/MyMetadataSample/PluginName=My Metadata Sample",
LrInitPlugin = 'PluginInit.lua',
LrMetadataProvider = 'MyMetadataDefinitionFile.lua',
LrMetadataTagsetFactory = 'MyMetadataTagset.lua',
LrPluginInfoProvider = 'PluginInfoProvider.lua',
}
6. Create the file
_G.currentDisplayImage = "no"
_G.pluginID = "com.adobe.lightroom.sdk.metadata.custommetadatasample"
_G.URL = "http://www.mycompany.com"
The
_G
7. Edit the file
Notice the use of the variables we defined in the initialization script:
local LrView = import "LrView"
local LrHttp = import "LrHttp"
local bind = import "LrBinding"
local app = import 'LrApplication'
PluginManager = {}
function PluginManager.sectionsForTopOfDialog( f, p )
return {
entry that identifies the plug-in initialization script:
PluginInit.lua
prefix here indicates that these variables are globally available within the plug-in.
PluginManager.lua
-- section for the top of the dialog
{
title = "Custom Metadata Sample",
f:row {
spacing = f:control_spacing(),
f:static_text {
title = 'Click the button to find out more about Adobe',
alignment = 'left',
fill_horizontal = 1,
},
f:push_button {
width = 150,
title = 'Connect to Adobe',
enabled = true,
action = function()
LrHttp.openUrlInBrowser(_G.URL)
end,
},
},
f:row {
f:static_text {
title = 'Global default value for displayImage: ',
alignment = 'left',
},
f:static_text {
in the plug-in folder, and edit it to add these variables:
to define the function that creates the UI content of the new section.
Customizing the Plug-in Manager 193
file, add the
Info.lua

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Photoshop lightroom sdk 3.0

Table of Contents