Python API 2.0 Reference: OpenMayaRender.MRenderOverride Class Reference

+ Inheritance diagram for OpenMayaRender.MRenderOverride:

Public Member Functions

__init__ ()
 
cleanup ()
 
getFrameContext ()
 
name ()
 
nextRenderOperation ()
 
renderOperation ()
 
select ()
 
setup ()
 
startOperationIterator ()
 
supportedDrawAPIs ()
 
uiName ()
 

Detailed Description

Class which defines a 2d geometry quad render.

Constructor & Destructor Documentation

OpenMayaRender.MRenderOverride.__init__ ( )
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Member Function Documentation

OpenMayaRender.MRenderOverride.cleanup ( )
cleanup() -> self

Perform any cleanup required following the execution of render operations.
OpenMayaRender.MRenderOverride.getFrameContext ( )
getFrameContext() -> MFrameContext

Return a frame context. The context is not available if called before setup() or after cleanup().
The context should never be deleted by the plug-in as it is owned by the render override.
OpenMayaRender.MRenderOverride.name ( )
name() -> string

Returns the name of the override.
OpenMayaRender.MRenderOverride.nextRenderOperation ( )
nextRenderOperation() -> bool

Iterate to the next operation. If there are no more operations then this method should return false.
OpenMayaRender.MRenderOverride.renderOperation ( )
renderOperation() -> MRenderOperation

Return the current operation being iterated over.
OpenMayaRender.MRenderOverride.select ( )
select(frameContext, selectInfo, useDepth, selectionList, worldSpaceHitPts) -> bool

The method is called by Maya to override the default Viewport 2.0 selection. It returns false by default, meaning the default selection will be used. If an implementation returns true, selectionList and worldSpaceHitPts will be used to override the default selection.

A complete implementation requires hit testing and selection interpretation. If an object is hit, the implementation should add its DAG path (and also its component when appropriate) to selectionList and add the world-space hit point between the selected item and selection ray to worldSpaceHitPts. The number of elements in selectionList and worldSpaceHitPts must be the same in any case, a selected item (typically a vertex component) and a hit point at the same array index will be associated.

If the method is triggered for point snapping, the implementation needs to sort the hit points and return the one nearest to the cursor. The state of point snapping can be queried from selectInfo.

When an implementation returns true to override the default behavior, the object-level selection override methods won't be triggered any more:

* MPxGeometryOverride::refineSelectionPath * MPxSubSceneOverride::getInstancedSelectionPath * MPxDrawOverride::userSelect * MPxDrawOverride::refineSelectionPath 

* frameContext [IN] (MFrameContext) - The frame-level context information
* selectInfo [IN] (MSelectionInfo) - The selection info
* useDepth [IN] (bool) - Whether only the objects nearest to camera can be selected
* selectionList [OUT] (MSelectionList) - List of items selected by this method
* worldSpaceHitPts [OUT] (MPointArray) - List of hit points
OpenMayaRender.MRenderOverride.setup ( )
setup(destination) -> self

Perform any setup required before render operations are to be executed.
OpenMayaRender.MRenderOverride.startOperationIterator ( )
startOperationIterator() -> bool

Query if there are any operations to iterate over.
OpenMayaRender.MRenderOverride.supportedDrawAPIs ( )
supportedDrawAPIs() -> int

Returns the draw APIs supported by this override.
See MRenderer.drawAPI() description for the list of draw APIs.
OpenMayaRender.MRenderOverride.uiName ( )
uiName() -> string

Returns the user interface name for the override.