Manages swatch generators.
Provides an interface for plugins to register/unregister swatch generator classes (derived from MSwatchRenderBase) with Maya. Whenever a swatch needs to be generated for a node, it checks the classfication string of the node for the preferred swatch generator. If a match is found, it creates and manages the swatch generator object (that is it deletes the swatch generator object once the image has been generated). The doIteration function is called for generating the swatch. The doIteration function is called repeatedly (during idle events) till it returns true. This allows for generation of the swatch in stages.
|static MStatus||registerSwatchRender (MString swatchGenName, MSwatchRenderCreatorFnPtr fnPtr)|
|registers a new swatch generator creation function by name. More...|
|static MStatus||unregisterSwatchRender (MString swatchGenName)|
|removes the previously registered swatch generator More...|
registers a new swatch generator creation function by name.
Register the swatch rendering object creation function with the swatch render manager.
|[in]||swatchGenName||A name to identify the swatch generator. Should match the name used in the "swatch" classfication string of the nodes|
|[in]||fnPtr||Pointer to a function which takes the node and resolution of the swatch image to be generated and creates the swatch generator object.|
The signature of the function needs to be as follows:
This function needs to allocate the swatch generator object using new and return the pointer. (This is necessary because delete is called on the returned pointer by Maya when work is done.)
removes the previously registered swatch generator
Un-register the swatch rendering object from the swatch render manager.
|[in]||swatchGen||The name which was used for the swatch generator. Should match the name used during registration.|