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

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions

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

Search for all occurrences

## Detailed Description

Function set for partitions of objects.

MFnPartition is the function set that is used for manipulating partitions of objects.

A partition is a list of dependency nodes and dag nodes. Partitions are useful for keeping track of lists of objects for many purposes such as selection or applying common rendering parameters. Partitions in Maya are also dependency nodes, so it is possible for one partition to contain others.

`#include <MFnPartition.h>`

Inheritance diagram for MFnPartition:
[legend]

List of all members.

## Public Member Functions
virtual MFn::Type | type () const
| Function set type.
virtual | ~MFnPartition ()
| Destructor.
| MFnPartition ()
| Default constructor.
| MFnPartition (MObject &object, MStatus *ReturnStatus=NULL)
| Constructor.
MObject | create (bool isRenderPartition=false, MStatus *ReturnStatus=NULL)
| Creates a new partition dependency node and puts it in the dependency graph.
bool | isRenderPartition (MStatus *ReturnStatus=NULL) const
| Returns true if this partition is a render partition.
MStatus | addMember (const MObject &set)
| Add a set to this partition.
MStatus | removeMember (const MObject &set)
| Remove a set from this partition.
| MFnPartition (const MObject &object, MStatus *ReturnStatus=NULL)
| Constructor.
## Protected Member Functions
virtual const char * | className () const
| Class name.

## Constructor & Destructor Documentation

MFnPartition | ( | 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

MFnPartition | ( | 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::kPartition.

Reimplemented from MFnDependencyNode.

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

Search for all occurrences

Class name.

Return the class name : "MFnPartition".

Reimplemented from MFnDependencyNode.

MObject create | ( | bool | isRenderPartition = `false`,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  |

Search for all occurrences

Creates a new partition dependency node and puts it in the dependency graph.

Parameters:

  [in] | isRenderPartition | determines whether this partition is a render partition
  [out] | ReturnStatus | return status

Returns:
  A handle for the new partition object

Status Codes:
  - MS::kSuccess operation successful
  - MS::kInsufficientMemory out of memory
  - MS::kLicenseFailure application not licensed for attempted operation

bool isRenderPartition | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns true if this partition is a render partition.

Parameters:

  [out] | ReturnStatus | return status

Returns:
  A boolean value indicating whether the object is a member

Status Codes:
  - MS::kSuccess operation successful
  - MS::kFailure this function partition does not have a valid partition object

MStatus addMember | ( | const MObject & | set | ) |

Search for all occurrences

Add a set to this partition.

To be added to a partition, a set must be mutually exclusive with all of the other sets in the partition. If there are any conflicting elements, then the add will fail.

Parameters:

  [in] | set | new set to be added to this partiton.

Returns:
  Return status

Status Codes:
  - MS::kSuccess operation successful
  - MS::kFailure addition failed due to conflicting set member or that this function set does not have a valid object
  - MS::kInvalidParameter argument is not a set
  - MS::kInsufficientMemory out of memory

MStatus removeMember | ( | const MObject & | set | ) |

Search for all occurrences

Remove a set from this partition.

Parameters:

  [in] | set | old set to be removed from this partiton.

Returns:
  Return status

Status Codes:
  - MS::kSuccess operation successful
  - MS::kFailure removal failed due to set not being in the partition or because this function set does not have a valid object
  - MS::kInvalidParameter argument is not a set
  - MS::kInsufficientMemory out of memory

MFnPartition MFnPartition MFnPartition MFnPartition MFnPartition MFnPartition MFnPartition MFnPartition MFnPartition MFnPartition
MFnPartition MFnPartition MFnPartition MFnPartition MFnPartition MFnPartition MFnPartition MFnPartition MFnPartition MFnPartition