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