class MModelMessage

Jump to documentation

: public MMessage Scene messages. (OpenMaya) (OpenMaya.py)

Inheritance:

MModelMessage < MMessage

public members:

enum Message
kActiveListModified
static MCallbackId addCallback ( Message , MMessage::MBasicFunction, void * clientData = NULL, MStatus * ReturnStatus = NULL )
static MCallbackId addBeforeDuplicateCallback ( MMessage::MBasicFunction, void * clientData = NULL, MStatus * ReturnStatus = NULL )
Before duplicate callback
static MCallbackId addAfterDuplicateCallback ( MMessage::MBasicFunction, void * clientData = NULL, MStatus * ReturnStatus = NULL )
After duplicate callback

Inherited from 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 )
static MStatus nodeCallbacks ( MObject & node, MIntArray & ids )

Documentation

Scene messages. (OpenMaya) (OpenMaya.py)
Description

This class is used to register callbacks for model related messages.

The addCallback method registers a function that will be executed whenever the specified message occurs. An id is returned and is used to remove the callback.

To remove a callback use 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.

Functions

MCallbackId MModelMessage:: addCallback ( MModelMessage::Message msg, MMessage::MBasicFunction func, void * clientData, MStatus * ReturnStatus )

Description

Adds a new callback for the specified model message.

Arguments

  • msg the model message that will trigger the callback
  • func the callback function
    • clientData User defined data passed to the callback function
  • clientData user data that will be passed to the callback function
  • ReturnStatus Status code

Return Value

  • identifier used for removing the callback.

Status Codes

  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback

MCallbackId MModelMessage:: addBeforeDuplicateCallback ( MMessage::MBasicFunction func, void * clientData, MStatus * ReturnStatus )

Description

This method registers a callback that is called whenever a duplicate command is made. The callback will be called before anything is duplicated.

Arguments

  • func the callback function
    • clientData User defined data passed to the callback function
  • clientData User defined data passed to the callback function
  • ReturnStatus status code

Return Value

  • identifier used for removing the callback.

Status Codes

  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback

MCallbackId MModelMessage:: addAfterDuplicateCallback ( MMessage::MBasicFunction func, void * clientData, MStatus * ReturnStatus )

Description

This method registers a callback that is called after a duplicate command is made. The callback will be called after everything is duplicated.

Arguments

  • func the callback function
    • clientData User defined data passed to the callback function
  • clientData User defined data passed to the callback function
  • ReturnStatus status code

Return Value

  • identifier used for removing the callback.

Status Codes

  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback

This class has no child classes.


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