Python API 2.0 Reference: OpenMayaUI.MDrawInfo Class Reference

+ Inheritance diagram for OpenMayaUI.MDrawInfo:

Public Member Functions

__init__ ()
 
canDrawComponent ()
 
completelyInside ()
 
displayStatus ()
 
displayStyle ()
 
getPrototype ()
 
inSelect ()
 
inUserInteraction ()
 
inclusiveMatrix ()
 
multiPath ()
 
objectDisplayStatus ()
 
pluginObjectDisplayStatus ()
 
projectionMatrix ()
 
setMultiPath ()
 
userChangingViewContext ()
 
view ()
 

Detailed Description

This class is used by the getDrawRequests method of MPxSurfaceShapeUI to specify the current object drawing state for a user defined shape.

Constructor & Destructor Documentation

OpenMayaUI.MDrawInfo.__init__ ( )
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Member Function Documentation

OpenMayaUI.MDrawInfo.canDrawComponent ( )
canDrawComponent(isDisplayOn, compMask) -> bool

Convenience method to test if components specified by the given mask can be drawn.

* isDisplayOn (bool) - component display is on
* mask (MSelectionMask) - component mask to test
OpenMayaUI.MDrawInfo.completelyInside ( )
completelyInside() -> bool

Returns True if the object being drawn is inside the viewing frustum.
OpenMayaUI.MDrawInfo.displayStatus ( )
displayStatus() -> int

Returns the status of the object to draw.
See M3dView.displayStatus() for a list of status.
OpenMayaUI.MDrawInfo.displayStyle ( )
displayStyle() -> int

Returns the display appearance.
See M3dView.displayStyle() for a list of styles.
OpenMayaUI.MDrawInfo.getPrototype ( )
getPrototype(drawHandler) -> MDrawRequest

This method creates a draw request based on the current draw state.

The draw request is placed onto maya's drawing queue (MDrawRequestQueue) where it can be processed in turn. The drawHandler argument is the shape that will be doing the drawing which is the object calling this function.

* drawHandler (MPxSurfaceShapeUI) - the ui object that is doing the drawing
OpenMayaUI.MDrawInfo.inclusiveMatrix ( )
inclusiveMatrix() -> MMatrix

Returns the world space inclusive matrix.
OpenMayaUI.MDrawInfo.inSelect ( )
inSelect() -> bool

Returns True during any interactive refresh, as when user is interacting with the scene in any way including camera changes, object or component TRS changes, etc. Use userChangingViewContext for determining whether user is changing the view using view context tools such as tumble, dolly or track.
OpenMayaUI.MDrawInfo.inUserInteraction ( )
inUserInteraction() -> bool

Returns True during any interactive refresh, as when user is changing the view using view context tools such as tumble, dolly or track.  Useful for changing drawing mode to something simpler to speed up interaction re-draw.  Use inUserInteraction for determining whether user is interacting with the scene in any way.
OpenMayaUI.MDrawInfo.multiPath ( )
multiPath() -> MDagPath

Returns the path to the object to be drawn.
OpenMayaUI.MDrawInfo.objectDisplayStatus ( )
objectDisplayStatus(displayObj) -> bool

Determines whether the specified objects are allowed to be displayed.

* displayObj (int) - display object mask. See M3dView.objectDisplay() for a list of valid masks.
OpenMayaUI.MDrawInfo.pluginObjectDisplayStatus ( )
pluginObjectDisplayStatus(pluginDisplayFilter) -> bool

Determines whether the specified plugin object is allowed to be displayed.

* pluginDisplayFilter (string) - The name of the plugin display filter which is registered by pluginDisplayFilter command.
OpenMayaUI.MDrawInfo.projectionMatrix ( )
projectionMatrix() -> MMatrix

Returns the camera*projection matrix.
OpenMayaUI.MDrawInfo.setMultiPath ( )
setMultiPath(path) -> self

Sets the path of the object to be drawn.

* path (MDagPath) - the path of the object to be drawn
OpenMayaUI.MDrawInfo.userChangingViewContext ( )
userChangingViewContext() -> bool

Returns True during any interactive refresh, as when user is interacting with the scene in any way including camera changes, object or component TRS changes, etc. Use userChangingViewContext for determining whether user is changing the view using view context tools such as tumble, dolly or track.
OpenMayaUI.MDrawInfo.view ( )
view() -> M3dView

Returns the view that the drawing will take place.