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

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions

# MFnMessageAttribute Class Reference
OpenMaya - API module for common classes | FunctionSet classes

Search for all occurrences

## Detailed Description

Message attribute function set.

Function set for message attributes. A message attribute is a dependency node attribute that does not transmit data. Message attributes only exist to formally declare relationships between nodes. By connecting two nodes via message attributes, a relationship between those nodes is expressed. Message attribute connections can be traversed in the same manner as any other connection in the dependency graph.

`#include <MFnMessageAttribute.h>`

Inheritance diagram for MFnMessageAttribute:
[legend]

List of all members.

## Public Member Functions
virtual MFn::Type | type () const
| Function set type.
virtual | ~MFnMessageAttribute ()
| Destructor.
| MFnMessageAttribute ()
| Default constructor.
| MFnMessageAttribute (MObject &object, MStatus *ReturnStatus=NULL)
| Constructor.
MObject | create (const MString &fullName, const MString &briefName, MStatus *ReturnStatus=NULL)
| Creates a Message attribute object.
| MFnMessageAttribute (const MObject &object, MStatus *ReturnStatus=NULL)
| Constructor.
## Protected Member Functions
virtual const char * | className () const
| Class name.

## Constructor & Destructor Documentation

MFnMessageAttribute | ( | MObject & | object,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  |

Constructor.

Class constructor that initializes the function set to the given MObject.

Parameters:

  [in] | object | The MObject to attach the function set to
  [out] | ReturnStatus | the return status

Status Codes:
  - MS::kSuccess if the function set is successfully attached
  - MS::kInvalidParameter if the MObject does not represent a valid Maya object or if the function set is not allowed to attach to this MObject

MFnMessageAttribute | ( | const MObject & | object,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  |

Constructor.

Class constructor that initializes the function set to the given MObject.

Parameters:

  [in] | object | The MObject to attach the function set to
  [out] | ReturnStatus | the return status

Status Codes:
  - MS::kSuccess if the function set is successfully attached
  - MS::kInvalidParameter if the MObject does not represent a valid Maya object or if the function set is not allowed to attach to this MObject

## Member Function Documentation

MFn::Type type | ( |  | ) | const`[virtual]`

Search for all occurrences

Function set type.

Return the class type : MFn::kMessageAttribute.

Reimplemented from MFnAttribute.

const char * className | ( |  | ) | const`[protected, virtual]`

Search for all occurrences

Class name.

Return the class name : "MFnMessageAttribute".

Reimplemented from MFnAttribute.

MObject create | ( | const MString & | fullName,
|  | const MString & | briefName,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  |

Search for all occurrences

Creates a Message attribute object.

The create method needs to be called on a per node basis. That means if you want to create and add the same attribute to multiple nodes, you need to call the create method for each node to get a unique MObject back. If you call create just once and add the attribute to multiple nodes, Maya will encounter a fatal error.

Parameters:

  [in] | fullName | The full name of the attribute
  [in] | briefName | The brief name of the attribute
  [out] | ReturnStatus | Status code for the operation.

Returns:
  The newly created Message attribute object.

Status Codes:
  - MS::kSuccess The attribute object was successfully created.
  - MS::kFailure Failure during attribute creation.

MFnMessageAttribute MFnMessageAttribute MFnMessageAttribute MFnMessageAttribute MFnMessageAttribute MFnMessageAttribute MFnMessageAttribute MFnMessageAttribute MFnMessageAttribute MFnMessageAttribute
MFnMessageAttribute MFnMessageAttribute MFnMessageAttribute MFnMessageAttribute MFnMessageAttribute MFnMessageAttribute MFnMessageAttribute MFnMessageAttribute MFnMessageAttribute MFnMessageAttribute