Archive for November, 2008

Customizing Metadata UI in CS4

The File Info UI in CS4 can be customized in 2 basic ways:

1. Creating a Flex project and programing a new UI
2. Using the “Generic Panel” and modifying an XML file

The FileInfo SDK provides sample code and guidance for both approaches.  I will focus on how to tweak the Generic Panel as a simple example of how to transition from the pre-CS4 custom panels to the new UI.

Step 1: Download the SDK and unpackage the contents
In the SDK in the “tools” directory you will find a folder called “Generic”.

Step 2: Copy the the “Generic” folder
Copy the Generic folder and sub folders to the following locations (requires Admin access):

IN WINDOWS XP: C:\Program Files\Common Files\Adobe\XMP\Custom File Info Panels\2.0\panels\<PANEL_ROOT>

IN WINDOWS VISTA: C:\Program Files (x86)\Common Files\Adobe\XMP\Custom File Info Panels\2.0\panels\<PANEL_ROOT>

IN MAC OS: /Library/Application Support/Adobe/XMP/Custom File Info Panels/2.0/panels/<PANEL_ROOT>

Launch Bridge and check. If you don’t see content in the panel then you may need to modify you Flash settings to add the location as a trusted location – see page 49 in the File Info Programmer’s Guide in the SDK.

Step 3: Modify the manifest.xml file
This file is in the Generic folder and controls the name of the panel and the tooltip description. The label value appears in the tab for this panel, and the description is the tool tip.  The name value is a unique identifying name for the panel. It must not contain spaces. More info on page 36 of the Guide.

Step 4: Modify the properties.xml file
This file defines the custom properties, how they are displayed and stored in the XMP.

The structure of the XML file is different from the old File Info definition file. Most of the layout and UI definitions are NOT in the XML file because they are defined in the SWF.  So for example, single text fields are defined as 1 line entries, date fields use the built in date picker, etc.

The structure is also organized linearly – meaning that properties defined first will be displayed first.

The definition of properties requires the definition of the namespace and then listing the property within that definition – in an XML hierarchical fashion.

Here is a snippet to give you a flavor…

<xmp_schema prefix=”my” namespace=”http://ns.adobe.com/MyNamespace/”>

<!– simple properties –>

<xmp_property name=”mytext” category=”external”
label=”$$$/Custom/Property/TextInputLabel=Text Field:” type=”text” />

</xmp_schema>

Since the property is defined within the XML structure of the namespace, it belongs within that namespace.

  • mytext” is the property name, within the namespace “http://ns.adobe.com/MyNamespace/”
  • external” category means that it can be modified
  • Text Field:” is the UI label that will be displayed beside the input box
  • text” is the type of property – the SWF will display this type as a single line input field

Step 5: Save file and relaunch the File Info dialog
Check out your new custom panel and test if it works as expected.  The Guide has many more examples for other property types such as date, time, arrays – and UI elements such as drop downs, check boxes, etc.

One advantage of moving to an XML based file is that you can use one of many XML editors that are available.  Most will check your syntax and let you know if you are missing a bracket – the File Info definition language didn’t have any special tools to assist in creating new panels.

The Programmer’s Guide has a lot of great info on how to tweak the files. Let us know how successful you were.

Technorati Tags: , , , ,