API Guide > Shapes > 

Shape classes

 
 
 

The following lists the proxy classes you will be deriving from:

MPxSurfaceShape and MPxSurfaceShapeUI are mandatory. The main functionality for shapes is split between these two classes to separate the drawing and selection code from the evaluation code.

MPxSurfaceShape or MPxComponentShape (required)

This class defines the non UI part of a shape. The goal of this class is to represent some user-defined geometry in Maya’s DAG. The MPxComponentShape class derives from MPxSurfaceShape and provides basic functionality for supporting shapes with components.

MPxSurfaceShapeUI (required)

This class defines the drawing and selection part of a shape.

MPxGeometryIterator (optional)

This class provides Maya with a control point iterator for your geometry. The iterator queries and sets points in your geometry generically. Iterators are used when your shape has components associated with its attributes.

MPxGeometryData (optional)

This class is used to provide Maya with a container for your geometry that can be passed through DG connections. It is often more efficient to pass all of the information about your geometry as data than as separate attributes. If you want your shape to work with Maya’s deformers then you must provide a data class as input and output attributes to your shape.

MTextureEditorDrawInfo (optional)

This class is used by the drawUV method of MPxSurfaceShapeUI to specify the current UV drawing state for a user defined shape. API users must override the canDrawUV method on MPxSurfaceShapeUI to receive drawUV calls.