A class providing an interface through which a plugin can implement a class to provide custom rendered images for swatches which are displayed in hypershade and the Attribute Editor.
By deriving from this class and implementing the doIteration function, swatches for nodes (having the required classification) can be custom rendered by the plugin.
To indicate that swatch for a certain node type will be generated by the plugin the classfication string of the node needs to contain the following string : "swatch/<swatch generator name>" The swatch generator name string should match the name used to register the swatch generator class.
Public Member Functions
|MSwatchRenderBase (MObject obj, MObject renderObj, int res)|
|virtual bool||doIteration ()|
|MObject||swatchNode () const|
|returns the node for which the swatch is required to be generated |
|MObject||node () const|
|returns the node used to compute the swatch |
|int||resolution () const|
|returns the expected resolution of the swatch image |
|MImage &||image ()|
|returns the swatch image |
Class constructor. Saves the Node object and image resolution in members for future use.
|[in]||obj||The node object for which the swatch needs to be generated.|
|[in]||res||The expected resolution of the swatch image.|
Method called to do swatch image generation, derived classes needs to implement this.
Method called from the MSwatchRenderRegister for generation of swatch image. The doIteration function is called repeatedly (during idle events) until it returns true. Using this swatch image can be generated in stages.
This method should be overriden in derived classes which can compute the swatches in several steps.
Reimplemented in MHWShaderSwatchGenerator.
|MObject MSwatchRenderBase::swatchNode||(||)|| const
returns the node for which the swatch is required to be generated
This method returns the node for which the swatch is required to be generated.
|MObject MSwatchRenderBase::node||(||)|| const
returns the node used to compute the swatch
This method returns the node that is used to compute the swatch.
|int MSwatchRenderBase::resolution||(||)|| const
returns the expected resolution of the swatch image
This method returns the expected resolution of the swatch
|MImage & MSwatchRenderBase::image||(||)||
returns the swatch image
This method returns the the render swatch as an image.
|Autodesk® Maya® 2009 © 1997-2008 Autodesk, Inc. All rights reserved.||Generated with 1.5.6|