Python API 2.0 Reference
OpenMayaUI.MPanelCanvasInfo Class Reference
+ Inheritance diagram for OpenMayaUI.MPanelCanvasInfo:

Public Member Functions

def __init__ ()
 
def getViewportBounds ()
 
def getViewportSize ()
 
def name ()
 
def setViewportBounds ()
 
def supportsUIDrawing ()
 

Static Public Member Functions

def __new__ ()
 

Detailed Description

Provides API extension to get/set panel canvas information.

__init__()
Initializes a new MPanelCanvasInfo.

Constructor & Destructor Documentation

def OpenMayaUI.MPanelCanvasInfo.__init__ ( )
Initialize self.  See help(type(self)) for accurate signature.

Member Function Documentation

def OpenMayaUI.MPanelCanvasInfo.__new__ ( )
static
Create and return a new object.  See help(type) for accurate signature.
def OpenMayaUI.MPanelCanvasInfo.getViewportBounds ( )
getViewportBounds()

Returns an array of four values representing the corners of the
viewing region: [left, right, bottom, top].
Return: float[]
def OpenMayaUI.MPanelCanvasInfo.getViewportSize ( )
getViewportSize()

Returns an array of two values representing the size of the
viewing region: [width, height].
Return: int[]
def OpenMayaUI.MPanelCanvasInfo.name ( )
name() -> MString

Return the name of the currently attached panel.
Return: MString
def OpenMayaUI.MPanelCanvasInfo.setViewportBounds ( )
setViewportBounds( bounds )

Set the bounds of the editor's viewing region. The passed.
bounds are specified as an array of four values: [left, right,
bottom, top].
Return: None
def OpenMayaUI.MPanelCanvasInfo.supportsUIDrawing ( )
supportsUIDrawing() -> bool

Returns whether the attached panel control supports drawing
primitives in screen space. If such drawing is not supported,
the registerDrawUICallback () method will throw an exception.

Note that the Graph Editor will return false if it exists, but the
panel for drawing has not yet been created (e.g., for the default
Graph Editor when it has not yet been opened, but exists by default).
Return: bool