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

Static Public Member Functions

def addUserEventCallback ()
 
def deregisterUserEvent ()
 
def isUserEvent ()
 
def postUserEvent ()
 
def registerUserEvent ()
 
- 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 user event messages.

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

Member Function Documentation

def OpenMaya.MUserEventMessage.addUserEventCallback ( )
static
addUserEventCallback(eventName, function, clientData=None) -> id

This method registers a callback for user-defined messages.

The parameter clientData will be passed to callbacks registered for this
event whenever the event is triggered.  To override the data that is passed
to the callback whenever the event is posted, you can supply a clientData
pointer to postUserEvent()..

 * eventName (string) - the event name 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.MUserEventMessage.deregisterUserEvent ( )
static
deregisterUserEvent(eventName)

Removes the event type with the given event name.  If callbacks have been
registered with this event type, they will become invalid after a
successful call to this method.

 * eventName (string) - the name of the new event to deregister.
def OpenMaya.MUserEventMessage.isUserEvent ( )
static
isUserEvent(eventName) -> bool

Checks if an event type exists with the given event name.

 * eventName (string) - the name of the new event to check.
def OpenMaya.MUserEventMessage.postUserEvent ( )
static
postUserEvent(eventName, clientData=None)

Notifies all callbacks attached to the given event type of the occurence
of the event.

If clientData is specified, this data will be passed to all callbacks that
receive the event.  If clientData is None (the default), the clientData
registered with addUserEventCallback will be passed to the callbacks.


 * eventName (string) - the name of the new event.
 * clientData - User defined data.
def OpenMaya.MUserEventMessage.registerUserEvent ( )
static
registerUserEvent(eventName)

Adds a new event type with the given string identifier.  The string
identifier can then be used in all other MUserEventMessage methods to operate
on the new event type.

 * eventName (string) - the name of the new event to register.  Any
   non-empty string may be used as an event name.