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

Static Public Member Functions

def addVertexColorCallback ()
 
- Static Public Member Functions inherited from OpenMaya.MMessage
def currentCallbackId ()
 
def nodeCallbacks ()
 
def removeCallback ()
 
def removeCallbacks ()
 

Additional Inherited Members

- Static Public Attributes inherited from OpenMaya.MMessage
int kDefaultAction = 0
 
int kDoAction = 2
 
int kDoNotDoAction = 1
 

Detailed Description

Class used to register callbacks for paint related messages.

Method resolution order:
-   MPaintMessage
-   OpenMaya.MMessage
-   builtins.object

Member Function Documentation

def OpenMayaUI.MPaintMessage.addVertexColorCallback ( )
static
addVertexColorCallback(function, clientData=None) -> id

Adds a new callback on vertex color paint.

Note: the 'colors' parameter supplied to the callback function contains a color per vertex, even if the type of the component being painted is faces. To interpret the colors when faces are being painted, it will be necessary to query the vertex count of each face and step over that many vertices while iterating the array.

The callback function will be passed any client data that was
provided when the callback was registered.

 * function - callable which will be passed:
   The DAG path of the object being painted (MDagPath)
   The components (e.g. vertices, faces) being painted (MObject)
   The plug being painted (MPlug)
   The colors that were applied to the components (MColorArray)
 * clientData - User defined data passed to the callback function

 * return: Identifier used for removing the callback.