cancelCurrentSwatchRender() -> None
The method cancels the swatch which is being rendered in parallel, and push the swatch render item back to the render queue after.
The render plugins should make sure that MSwatchRenderBase.cancelParallelRendering() is implemented acoordingly.
cancelParallelRendering() -> self
Method to cancel the parallel rendering.
The derived classes should provide the implementation accordingly if required.
OpenMayaRender.MSwatchRenderBase.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.
finishParallelRender() -> self
Method to update the swatch image when the parallel rendering is finished.
If swatch is rendered parallel, this method must be called after parallel rendering finished.
OpenMayaRender.MSwatchRenderBase.image
(
)
image() -> MImage
This method returns the render swatch as an image.
OpenMayaRender.MSwatchRenderBase.node
(
)
node() -> MObject
This method returns the node that is used to compute the swatch.
OpenMayaRender.MSwatchRenderBase.renderParallel
(
)
renderParallel() -> bool
Method indicates if the swatch is rendered parallel.
Default is False.
OpenMayaRender.MSwatchRenderBase.resolution
(
)
resolution() -> int
This method returns the expected resolution of the swatch.
OpenMayaRender.MSwatchRenderBase.swatchNode
(
)
swatchNode() -> MObject
This method returns the node for which the swatch is required to be generated.
Property Documentation
OpenMayaRender.MSwatchRenderBase.renderQuality
static
The quality in which the swatch will be rendered (the larger the number is set, the better quality is applied).