2.1 Render Items (MRenderItem)


The formal interface presented for a render item is the class MRenderItem.

Figure 14

MRenderItem has various properties. Depending on whether a render item is involved in the update phase or the rendering phase, the interfaces to these properties may or may not be writeable.

The main properties are as follows:

Figure 15

With these proprieties this class can represent any or all of the following Maya options:

As a single render item does not represent all possibilities a collection of render items (MRenderItemList) is main­tained per renderable object. However, depending on what needs to be rendered, it is possible that zero or more of these items are “enabled” (passed down the pipeline) for drawing.

Figure 16

As an example a renderable object may have 4 items: 2 for shaded sub-regions, 1 for wireframe and 1 for vertex dis­play. Pruning may occur at update time leaving only the wireframe and vertex display items. Further pruning may remove the “wireframe” render item leaving only the vertex display item. Pruning generally reflects internal requirements such as viewport display modes.

MRenderItem objects are assumed to be transient and as such plug-ins should not hold on to references of instances of this class.