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

Public Member Functions

def __init__ ()
 
def addPrimitive ()
 
def createFloatVertexBuffer ()
 
def createPrimitive ()
 
def createTimeVertexBuffer ()
 
def destroyPrimitive ()
 
def destroyVertexBuffer ()
 
def isAutoRefresh ()
 
def isLayerVisible ()
 
def isValid ()
 
def refresh ()
 
def registerDrawUICallback ()
 
def removePrimitive ()
 
def setAutoRefresh ()
 
def setLayerVisible ()
 
def supportsUIDrawing ()
 
def unregisterDrawUICallback ()
 

Static Public Member Functions

def __new__ ()
 

Static Public Attributes

int kGraphEditorAxisLabels = 1000
 
int kGraphEditorBackground = 0
 
int kGraphEditorCurveNames = 3000
 
int kGraphEditorCurves = 2000
 
int kGraphEditorFirstDefaultDraw = 100
 
int kGraphEditorGrid = 100
 
int kGraphEditorLastDefaultDraw = 10000
 
int kGraphEditorOverlayTexture = 10000
 
int kGraphEditorRetimeToolText = 5000
 
int kGraphEditorTimeMarker = 4000
 
int kGraphEditorUndefined = -1
 

Detailed Description

Provides API extension to panel canvas.

__init__()
Initializes a new MPanelCanvas.

Constructor & Destructor Documentation

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

Member Function Documentation

def OpenMayaUI.MPanelCanvas.__new__ ( )
static
Create and return a new object.  See help(type) for accurate signature.
def OpenMayaUI.MPanelCanvas.addPrimitive ( )
addPrimitive( int, int )

Add the primitive referred to by the given id to the list of
primitives to be drawn at the given layer.
Return: None
def OpenMayaUI.MPanelCanvas.createFloatVertexBuffer ( )
createFloatVertexBuffer( tVals, yVals, colors ) -> int

Create a vertex buffer with float values as the x-coordinate.
An id referring to the created buffer is returned. The values
are passed as arrays of float values
Return: int
def OpenMayaUI.MPanelCanvas.createPrimitive ( )
createPrimitive( primType, bufferId, startIndex, numVertices, props ) -> int

Create a primitive of the given type using the vertex buffer
specified by the given id, the range of vertices used from
the buffer, and a drawing style. An id referring to the
created primitive is returned.
Return: int
def OpenMayaUI.MPanelCanvas.createTimeVertexBuffer ( )
createTimeVertexBuffer( tVals, yVals, colors ) -> int

Create a vertex buffer with time values as the x-coordinate.
An id referring to the created buffer is returned. The values
are passed as arrays of OpenMaya.MTime values
Return: int
def OpenMayaUI.MPanelCanvas.destroyPrimitive ( )
destroyPrimitive( primitiveId )

Destroy the primitive referred to by the given id.
Return: None
def OpenMayaUI.MPanelCanvas.destroyVertexBuffer ( )
destroyVertexBuffer( bufferId )

Destroy the vertex buffer referred to by the given id.  If the.
buffer is being used by a primitive, an error will be generated.
Return: None
def OpenMayaUI.MPanelCanvas.isAutoRefresh ( )
isAutoRefresh() -> bool

Returns whether the associated editor will automatically refresh.


Return: bool
def OpenMayaUI.MPanelCanvas.isLayerVisible ( )
isLayerVisible( int) -> bool

Return whether the given layer is visible.
Return: bool
def OpenMayaUI.MPanelCanvas.isValid ( )
isValid() -> bool

Returns True if MPanelCanvas has a valid pointer to a Graph
Editor object, False otherwise.
Return: bool
def OpenMayaUI.MPanelCanvas.refresh ( )
refresh()

Force the associated Graph Editor to refresh
Return: None
def OpenMayaUI.MPanelCanvas.registerDrawUICallback ( )
registerDrawUICallback( layer, cb, clientData ) -> callbackId

Register a callback to be called when the given panel is drawing
the given layer. An id to the callback is returned. The function
takes two parameters, an instance of an OpenMayaRender.MUIDrawManager
and whatever client data was passed to this method.
Return: int
def OpenMayaUI.MPanelCanvas.removePrimitive ( )
removePrimitive( int, int )

Remove the primitive referred to by the given id from the list of
primitives to be drawn at the given layer. The primitive will not
be destroyed.
Return: None
def OpenMayaUI.MPanelCanvas.setAutoRefresh ( )
setAutoRefresh()

Set whether the associated editor will be automatically refreshed.
Initially, automatic refresh is enabled.
Return: None
def OpenMayaUI.MPanelCanvas.setLayerVisible ( )
setLayerVisible( int, bool )

Set whether the given layer will be drawn. All layers are
initially set to be visible. Only user defined layers may have
their visibility set.
Return: None
def OpenMayaUI.MPanelCanvas.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
def OpenMayaUI.MPanelCanvas.unregisterDrawUICallback ( )
unregisterDrawUICallback( callbackId )

 Unregister the callback specified by the given id.
Return: None