Provides API extension to panel canvas.
__init__()
Initializes a new MPanelCanvas.
Constructor & Destructor Documentation
OpenMayaUI.MPanelCanvas.__init__
(
)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Member Function Documentation
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
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
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
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
OpenMayaUI.MPanelCanvas.destroyPrimitive
(
)
destroyPrimitive( primitiveId )
Destroy the primitive referred to by the given id.
Return: None
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
OpenMayaUI.MPanelCanvas.isLayerVisible
(
)
isLayerVisible( int) -> bool
Return whether the given layer is visible.
Return: bool
OpenMayaUI.MPanelCanvas.isValid
(
)
isValid() -> bool
Returns True if MPanelCanvas has a valid pointer to a Graph
Editor object, False otherwise.
Return: bool
OpenMayaUI.MPanelCanvas.refresh
(
)
refresh()
Force the associated Graph Editor to refresh
Return: None
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
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
OpenMayaUI.MPanelCanvas.setAutoRefresh
(
)
setAutoRefresh()
Set whether the associated editor will be automatically refreshed.
Initially, automatic refresh is enabled.
Return: None
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
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
OpenMayaUI.MPanelCanvas.unregisterDrawUICallback
(
)
unregisterDrawUICallback( callbackId )
Unregister the callback specified by the given id.
Return: None