Adobe 65007312 Programming Guide - Page 189
Define a tagset, Adding custom metadata tagsets
UPC - 883919154398
View all Adobe 65007312 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 189 highlights
CHAPTER 10: Defining Metadata: A Walkthrough Adding custom metadata 189 Setting searchable to true allows you to search for images using this custom metadata field. 9. Add another entry to the table to define a Boolean field. To do this, we will use the enumerated-value data type. { id = 'myboolean', title = LOC "$$$/MyMetadataSample/Fields/Display=My Boolean", dataType = 'enum', values = { -- add valid-value entries }, }, 10. Now we will limit the possible values to the strings "true" and "false". { id = 'myboolean', title = LOC "$$$/MyMetadataSample/Fields/Display=My Boolean", dataType = 'enum', values = { { value = 'true', title = LOC "$$$/MyMetadataSample/Fields/Display/True=True", }, { value = 'false', title = LOC "$$$/MyMetadataSample/Fields/Display/False=False", }, }, }, Because we have declared the value type as enum, the Metadata panel displays this field with a pop-up menu of valid values. Each value has a localizable display string, which appear in the menu. When the user chooses the menu item, the field is assigned the corresponding string value. 11. Save this file. Define a tagset The drop-down menu at the top left of the Metadata panel allows users to filter what is shown in the panel, by selecting a metadata tagset to be displayed. There are predefined tagsets, and you can also create your own. See "Adding custom metadata tagsets" on page 73. Now that we have defined a set of metadata fields, we will create a tagset for them, so that they can be selected for display, and displayed together in a labeled section of the Metadata panel. Our tagset will also include some predefined sets. 1. Open the file MyMetadataTagset.lua. 2. Edit the file to add this initial code structure: return { title = LOC "$$$/MyMetadataSample/Tagset/Title=My Metadata", id = 'MyMetadataTagset',