Edit metadata in Maya

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

  1. Right-click an object and select Metadata > Select Stream to select the stream and member for which you want to add or edit metadata.

    Metadata visualization is enabled when you select your stream and member.

  2. In the viewport, select the components on the object that you want to add metadata to, or the components on the object with metadata that you want to edit.
    You can only add metadata to a stream and member that is attached to the object and components that you select. For example, you can only add metadata to StreamOne on the vertices of smcPlaneShape if you have first attached StreamOne to the vertex channel of smcPlaneShape.
    dataStructure -format "raw" -asString "name=ColorStruct:float[3]=Color"; 
    addMetadata -streamName "StreamOne" -channelName "vertex" -structure "ColorStruct" smcPlaneShape;  
  3. Right-click the object and select Metadata > Edit Metadata.

    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.

    Note:

    If you select components on the object for which there is no metadata stream attached, an error appears.

  4. Enter the metadata values.

    Viewport 2.0 now reflects the added/edited metadata values.

Related topics