OpenMayaUI.MPaintMessage Class Reference

Class Description

Class used to register callbacks for paint related messages.

Method resolution order:
-   MPaintMessage
-   OpenMaya.MMessage
-   __builtin__.object
+ Inheritance diagram for OpenMayaUI.MPaintMessage:

Static Public Member Functions

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

Additional Inherited Members

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

Member Function Documentation

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.

The documentation for this class was generated from the following file:
  • D:/Maya-MD-Merge/input/python/2.0/OpenMayaUI.py