class MMessage

Jump to documentation

Message base class. (OpenMaya) (OpenMaya.py)

Inheritance:

MMessage

public members:

static MStatus removeCallback ( MCallbackId id )
static MStatus removeCallbacks ( MCallbackIdArray &ids )
static MCallbackId currentCallbackId ( MStatus * ReturnStatus = NULL )
static MStatus nodeCallbacks ( MObject & node, MCallbackIdArray & ids )
static void setRegisteringCallableScript ()
static bool registeringCallableScript ()
static MStatus removeCallbacks ( MIntArray &ids )
OBSOLETE and NO SCRIPT SUPPORT
static MStatus nodeCallbacks ( MObject & node, MIntArray & ids )
OBSOLETE and NO SCRIPT SUPPORT

Documentation

Message base class. (OpenMaya) (OpenMaya.py)
Description

This is the base class for message callbacks. This base class allows the user to remove a message callback. To register a callback, the user must use the addCallback methods in the message classes which inherit from this base class.

When a callback is added a number or id is returned. This id is used to keep track of the callback and is necessary for removing it. A callback id with the value 'NULL' represents an invalid callback. Use the removeCallback member function of this class for removing a callback.

It is the user's responsibility to keep track of the callback id's and remove all callbacks for a plug-in when it is unloaded.

Functions

MStatus MMessage:: removeCallback ( MCallbackId id )

Description

Remove the specified callback from maya.

This method must be called for all callbacks registered by a plug-in before that plug-in is unloaded.

Arguments

  • id identifier of callback to be removed

Return Value

  • Status code

Status Codes

  • MS::kSuccess The callback was successfully removed.
  • MS::kInvalidParameter An invalid callback id was specfied.
  • MS::kFailure Callback has already been removed.

MStatus MMessage:: removeCallbacks ( MIntArray &idList )

Description

THIS IS AN OBSOLETE METHOD

Remove all of the specified callbacks from maya.

This method must be called for all callbacks registered by a plug-in before that plug-in is unloaded.

Arguments

  • id identifier of callback to be removed

Return Value

  • Status code

Status Codes

  • MS::kSuccess The callback was successfully removed.
  • MS::kInvalidParameter An invalid callback id was specfied.
  • MS::kFailure Callback has already been removed.

MStatus MMessage:: removeCallbacks ( MCallbackIdArray &idList )

Description

Remove all of the specified callbacks from maya.

This method must be called for all callbacks registered by a plug-in before that plug-in is unloaded.

Arguments

  • idList identifier list of callbacks to be removed

Return Value

  • Status code

Status Codes

  • MS::kSuccess The callback was successfully removed.
  • MS::kInvalidParameter An invalid callback id was specfied.
  • MS::kFailure Callback has already been removed.

MCallbackId MMessage:: currentCallbackId ( MStatus * ReturnStatus )

Description

Return the callback ID of the currently executing callback. If called outside of a callback, an invalid MCallbackId and failed status will be returned.

Arguments

  • id Status code

Return Value

  • Callback ID of currently executing callback

Status Codes

  • MS::kSuccess The callbackId was successfully retrieved.
  • MS::kFailure This method was executed outside of a user callback.

MStatus MMessage:: nodeCallbacks ( MObject & node, MCallbackIdArray & ids )

Description

Returns a list of callback IDs associated registered to a given node.

Arguments

  • node Node to query for callbacks.
  • ids MCallbackId array to store the list of callback IDs.

Return Value

  • Status Code

Status Codes

  • MS::kSuccess The callback query was successful.
  • MS::kFailure The given node was invalid.

MStatus MMessage:: nodeCallbacks ( MObject & node, MIntArray & ids )

Description

Returns a list of callback IDs associated registered to a given node.

NOTE: this method is obsolete and will be removed in a future release.

Arguments

  • node Node to query for callbacks.
  • ids Integer array to store the list of callback IDs.

Return Value

  • Status Code

Status Codes

  • MS::kSuccess The callback query was successful.
  • MS::kFailure The given node was invalid.

void MMessage:: setRegisteringCallableScript ()

Description

Mark this MMessage object as one that will be passed callbacks defined in script.

bool MMessage:: registeringCallableScript ()

Description

Return true if this MMessage object has its callbacks defined in script.

Direct child classes:

- MUserEventMessage
- MUiMessage
- MTimerMessage
- MSceneMessage
- MPolyMessage
- MObjectSetMessage
- MNodeMessage
- MModelMessage
- MLockMessage
- MEventMessage
- MDagMessage
- MDGMessage
- MConditionMessage
- MCommandMessage
- MAnimMessage

Autodesk® Maya® 8.0 © 1997-2006 Autodesk, Inc. All rights reserved. doc++ Copyright