To add metadata to your object, you must first define a data structure, and create your data streams and attach them to your object. After you have done this, you can add additional metadata to the same stream and member, or edit existing metadata via the Maya marking menu. Alternatively, you can also do this through MEL/Python scripting.
For information on how to define your data structure and create and attach data streams using MEL/Python, see Add metadata to your mesh using MEL scripting.
To add or edit metadata using the marking menu
Metadata visualization is enabled when you select your stream and member.
dataStructure -format "raw" -asString "name=ColorStruct:float[3]=Color"; addMetadata -streamName "StreamOne" -channelName "vertex" -structure "ColorStruct" smcPlaneShape;
The Edit Metadata window appears. Verify the Current Stream to ensure that this is the stream for which you want to add or edit your metadata.
If you select components on the object for which there is no metadata stream attached, an error appears.
Viewport 2.0 now reflects the added/edited metadata values.