- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Examples

- Class List
- Class Hierarchy
- Class Members

Static Public Member Functions

# MContainerMessage Class Reference
OpenMaya - API module for common classes

Search for all occurrences

## Detailed Description

Container-related messages.

The container node in Maya bundles together a group of related nodes. The user can then publish attribute names to the container, and bind attributes from nodes in the container to the published names.

MContainerMessage class allows the API user to register callbacks that inform them about changes to published attributes on containers.

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.

`#include <MContainerMessage.h>`

Inheritance diagram for MContainerMessage:
[legend]

List of all members.

## Static Public Member Functions
static MCallbackId | addPublishAttrCallback (MMessage::MNodeStringBoolFunction func, void *clientData=NULL, MStatus *ReturnStatus=NULL)
| This method registers a callback that is called whenever an attribute is published or unpublished from a container.
static MCallbackId | addBoundAttrCallback (MMessage::MNodeStringBoolFunction func, void *clientData=NULL, MStatus *ReturnStatus=NULL)
| This method registers a callback that is called whenever an attribute is bound or unbound on a container.
static const char * | className ()
| Returns the name of this class.

## Member Function Documentation

MCallbackId addPublishAttrCallback | ( | MMessage::MNodeStringBoolFunction | func,
|  | void * | clientData = `NULL`,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  | `[static]`

Search for all occurrences

This method registers a callback that is called whenever an attribute is published or unpublished from a container.

Parameters:

  [in] | func | the callback function node The container node publishedName Name of the published attr clientData User defined data passed to the callback function
  [in] | clientData | User defined data passed to the callback function
  [out] | ReturnStatus | status code

Returns:
  Identifier used for removing the callback.

Status Codes:
  - MS::kSuccess Operation succeeded
  - MS::kInsufficientMemory No memory available
  - MS::kFailure Error adding callback

MCallbackId addBoundAttrCallback | ( | MMessage::MNodeStringBoolFunction | func,
|  | void * | clientData = `NULL`,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  | `[static]`

Search for all occurrences

This method registers a callback that is called whenever an attribute is bound or unbound on a container.

Parameters:

  [in] | func | the callback function node The container node publishedName Name of the bound attr clientData User defined data passed to the callback function
  [in] | clientData | User defined data passed to the callback function
  [out] | ReturnStatus | status code

Returns:
  Identifier used for removing the callback.

Status Codes:
  - MS::kSuccess Operation succeeded
  - MS::kInsufficientMemory No memory available
  - MS::kFailure Error adding callback

const char * className | ( |  | ) | `[static]`

Search for all occurrences

Returns the name of this class.

Returns:
  The name of this class.

Reimplemented from MMessage.

MContainerMessage MContainerMessage MContainerMessage MContainerMessage MContainerMessage MContainerMessage MContainerMessage MContainerMessage MContainerMessage MContainerMessage
MContainerMessage MContainerMessage MContainerMessage MContainerMessage MContainerMessage MContainerMessage MContainerMessage MContainerMessage MContainerMessage MContainerMessage