x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Member Function Documentation
OpenMayaUI.MHWShaderSwatchGenerator.createObj
(
)
static
createObj(obj, renderObj, res) -> MSwatchRenderBase
Class constructor.
Saves the Node object and image resolution as data members for future use.
* obj (MObject) - The node object for which the swatch needs to be generated.
* renderObj (MObject) - The node used to actually compute the swatch. In most situations, this can be the same as <b>obj</b>. This parameter can be used to request the computation of the swatch on another node, and display the swatch on the obj node.* resolution (int) - The expected resolution of the swatch image.
OpenMayaUI.MHWShaderSwatchGenerator.doIteration
(
)
doIteration() -> bool
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 overridden in derived classes which can compute the swatches in several steps.
Returns False as long as the swatch computation is not completed.
getSwatchBackgroundColor() -> MColor
Returns the default background color for the hardware rendered swatch.
OpenMayaUI.MHWShaderSwatchGenerator.initialize
(
)
static
initialize() -> string
This method sets a swatch name, and registers a new swatch generator creation function for the swatch name.
The string returned from this method can be used for node classification purpose.