Python API 2.0 Reference
OpenMayaRender.MRenderOverride Class Reference
+ Inheritance diagram for OpenMayaRender.MRenderOverride:

Public Member Functions

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

Static Public Member Functions

def __new__ ()
 

Detailed Description

Class which defines a 2d geometry quad render.

Constructor & Destructor Documentation

def OpenMayaRender.MRenderOverride.__init__ ( )
Initialize self.  See help(type(self)) for accurate signature.

Member Function Documentation

def OpenMayaRender.MRenderOverride.__new__ ( )
static
Create and return a new object.  See help(type) for accurate signature.
def OpenMayaRender.MRenderOverride.cleanup ( )
cleanup() -> self

Perform any cleanup required following the execution of render operations.
def 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.
def OpenMayaRender.MRenderOverride.name ( )
name() -> string

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

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

Return the current operation being iterated over.
def 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
def OpenMayaRender.MRenderOverride.setup ( )
setup(destination) -> self

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

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

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

Returns the user interface name for the override.