Python API 2.0 Reference
OpenMaya.MEventMessage Class Reference
+ Inheritance diagram for OpenMaya.MEventMessage:

Static Public Member Functions

def addEventCallback ()
 
def getEventNames ()
 
- 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 event related messages.

The first parameter passed to the add callback method is the name
of the event that will trigger the callback.  The list of
available event names can be retrieved by calling the
getEventNames method or by using the -listEvents flag on the
scriptJob command.
The addEventCallback method returns an id which is used to remove the
callback.

To remove a callback use OpenMaya.MMessage.removeCallback.

All callbacks that are registered by a plug-in must be removed by
that plug-in when it is unloaded.  Failure to do so will result in
a fatal error.

Idle event callbacks should be removed immediately after running.
Otherwise they will continue to use up CPU resources. They will also
prevent idleVeryLow event callbacks from running - which are required
for Maya to function properly.

Method resolution order:
-   MEventMessage
-   MMessage
-   builtins.object

Member Function Documentation

def OpenMaya.MEventMessage.addEventCallback ( )
static
addEventCallback(eventName, function, clientData=None) -> id

This method registers a callback for event occurred messages.
The callback function will be passed the any client data that
was provided when the callback was registered.

 * eventName (string) - the event to register the 
callback for
 * function - callable which will be passed the clientData object
 * clientData - User defined data passed to the callback function

 * return: Identifier used for removing the callback.
def OpenMaya.MEventMessage.getEventNames ( )
static
getEventNames() -> (string, string, ...)

This method returns the list of available event names.

 * return: tuple of available event names.