pymel.core.modeling.showMetadata¶
- showMetadata(*args, **kwargs)¶
This command is used to show metadata values which is in the specified channels vertex, edge, face, and vertexFacein the viewport. You can view the data by three ways: color: draw color on the components. ray: draw a ray on the components. string: draw 2d strings on the components. For example, if the metadata of shape.vtx[1]is (1, 0, 0), you can turn on the visualization with all three modes. On colormode, you can see a red vertex which is on the position of shape.vtx[1]. On raymode, you can see a ray with the direction (1, 0, 0). On stringmode, you can see strings 1 0 0below the vertex in the viewport. To use coloror raymode, you should make the member of the data structure with three or less items, such as float[3]. The three items are mapped to RGBas a color, or XYZas a vector. The structure with two items works similarly. The only difference is that the third value will always be zero. However, if the structure has only one item, the value is mapped to all three variables. That means if the structure is intand its value is 1, the color will be white(1, 1, 1) and the vector will be (1, 1, 1). You can get the current status of the flags on the query mode (using -query). But you can query only the status of one flag in a single command and you cannot set values on the query mode. You can use the command on some specified objects, or run it with no arguments to make changes on all objects in the scene. The object must be a mesh shape. Components are not allowed as the command arguments.
Flags:
Long Name / Short Name Argument Types Properties auto / a bool Similar to the flag -range, but uses the min/max value from the metadata in the same stream and member instead of the specified input value. In query mode, you can use the flag to query if autois on. dataType / dt unicode In create mode, when used with the flags streamand member, specify a member to show. If the flag offis used, specify the member to turn off. In query mode, when used with the flags streamand member, query the visualization state of the specified member. Only one member of each shape can be visualized at a time. In query mode, this flag can accept a value. interpolation / i bool In create mode, enable/disable interpolation for colormethod. When interpolation is on, the components will be displayed in the interpolated color, which is computed by averaging their metadata values. In query mode, query the current state of interpolation flag of the selected objects. isActivated / ia bool Used to check if the given stream is activated. If some shapes are selected, query their states. If no shape is selected, query the states of all shapes in the scene. listAllStreams / las bool Used with object names to list all streams of the specified objects. no matter if they are visible in the viewport. Or you can use the flag individually to list all streams in the scene. Due to the fact that different objects may have the same stream name, the returned list will merge the duplicated stream names automatically. listMembers / lm bool Used with the flag ‘stream’ to get the member list in the specified stream. listValidMethods / lvm bool List the valid visual methods that can be set for the current stream and member. Some data type cannot be displayed by some methods. For example, if the data type is string, it cannot be displayed by coloror by ray. In other words, only the method stringwill be returned when you list the methods. listVisibleStreams / lvs bool Used with object names to list the name of the current visible streams of the specified object. Or you can use the flag with no object name to list all visible streams in the scene. member / mb unicode In create mode, when used with the flags streamand dataType, specify a member to show. If the flag offis on, specify the member to turn off. In query mode, when used with the flags streamand dataType, query the visualization state of the specified member. Only one member of each shape can be visualized at a time. In query mode, this flag can accept a value. method / m unicode Determine the method of visualization: colorconvert metadata to a color value and draw the components with the color rayconvert metadata to a vector and draw this vector line which starts from the center of the component stringdisplay the metadata through 2d string beside the component in the viewport The argument must be a string and must be one of the three words. The default method is color. If the data type is string, you can only show it with stringmethod. In query mode, you can use the flag with no arguments to query the method of a specified stream and member. off / boolean In create mode, turn off the member which is specified by the flags stream, memberand dataType. range / r float, float Specify the range of data to use. The value which is out of the range will be clamped to the min/max value. If the method of visualization is color, the range will be mapped to the color. That means the min value will be displayed in black while the max value will be in white. In query mode, you can use the flag individually to query the current range. rayScale / rs float Specify the scale of the ray to display it with a proper length. stream / s unicode In create mode, when used with the flags memberand dataType, specify a member to show. If the flag offis used, specify the member to turn off. In query mode, when used with the flags memberand dataType, query the visualization state of the specified member. When used with the flag listMembers, query the members in the specified stream. Only one member of each shape can be visualized at a time. In query mode, this flag can accept a value.Flag can have multiple arguments, passed either as a tuple or a list. Derived from mel command maya.cmds.showMetadata