Adobe 65007312 Programming Guide - Page 190

Using the plug-in, File > Plug-in Manager, Choose Selected

Page 190 highlights

CHAPTER 10: Defining Metadata: A Walkthrough Using the plug-in 190 items = { -- add item entries }, } Z The title value is the localizable display string that will show up as the menu item for this tagset. Z The items table provides the specific metadata fields to be included in our tagset. We will add some representative fields. For the complete list of possible field specifiers, see "Defining metadata fields" on page 69. 3. Add the following entries to the items table, to include a labeled section named Standard Metadata, which displays the predefined filename and folder metadata fields, part of the built-in metadata for Lightroom: items = { -- add item entries { 'com.adobe.label', label = LOC "$$$/Metadata/OrigLabel=Standard Metadata" }, 'com.adobe.filename', 'com.adobe.folder', 'com.adobe.separator', }, This labeled section is followed by a separator. 4. Add the entries for the custom metadata defined in this plug-in, in another labeled section: items = { { 'com.adobe.label', label = LOC "$$$/Metadata/OrigLabel=Standard Metadata" }, 'com.adobe.filename', 'com.adobe.folder', 'com.adobe.separator', { 'com.adobe.label', label = LOC "$$$/Metadata/CusLabel=My Metadata" }, 'sample.metadata.mymetadatasample.*', }, The asterisk wild-card character in the field-name part of the path matches all fields defined by this plug-in. The asterisk can appear only at the end of the field name. 5. Save this file. Using the plug-in 1. Open Lightroom and go to File > Plug-in Manager. 2. In the Plug-in Manager dialog, click Add. 3. Navigate to your new plug-in folder. Check that your plug-in is loaded and running, as shown by a green traffic-light icon, and the text "Installed and running". (If it is not, check the Plug-in Author Tools section of the Plug-in Manager for a diagnostic message.) 4. Select your plug-in and click Choose Selected. 5. In the Library module, show the Metadata panel and click the name at the top to see the drop-down menu. Your new tagset, with the label "My Metadata," should appear at the bottom of the list.

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204

C
HAPTER
10: Defining Metadata: A Walkthrough
Using the plug-in
190
items = {
-- add item entries
},
}
Z
The
title
value is the localizable display string that will show up as the menu item for this tagset.
Z
The
items
table provides the specific metadata fields to be included in our tagset. We will add
some representative fields. For the complete list of possible field specifiers, see
“Defining
metadata fields” on page 69
.
3.
Add the following entries to the
items
table, to include a labeled section named Standard Metadata,
which displays the predefined
filename
and
folder
metadata fields, part of the built-in metadata for
Lightroom:
items = {
-- add item entries
{ 'com.adobe.label',
label = LOC "$$$/Metadata/OrigLabel=Standard Metadata" },
'com.adobe.filename',
'com.adobe.folder',
'com.adobe.separator',
},
This labeled section is followed by a separator.
4.
Add the entries for the custom metadata defined in this plug-in, in another labeled section:
items = {
{ 'com.adobe.label',
label = LOC "$$$/Metadata/OrigLabel=Standard Metadata" },
'com.adobe.filename',
'com.adobe.folder',
'com.adobe.separator',
{ 'com.adobe.label', label = LOC "$$$/Metadata/CusLabel=My Metadata" },
'sample.metadata.mymetadatasample.*',
},
The asterisk wild-card character in the field-name part of the path matches all fields defined by this
plug-in. The asterisk can appear only at the end of the field name.
5.
Save this file.
Using the plug-in
1.
Open Lightroom and go to
File > Plug-in Manager
.
2.
In the Plug-in Manager dialog, click
Add
.
3.
Navigate to your new plug-in folder. Check that your plug-in is loaded and running, as shown by a
green traffic-light icon, and the text “Installed and running”. (If it is not, check the Plug-in Author Tools
section of the Plug-in Manager for a diagnostic message.)
4.
Select your plug-in and click
Choose Selected
.
5.
In the Library module, show the Metadata panel and click the name at the top to see the drop-down
menu. Your new tagset, with the label “My Metadata,” should appear at the bottom of the list.