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

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions

# MItDependencyNodes Class Reference

# OpenMaya - API module for common classes

Search for all occurrences

## Detailed Description

Dependency Node iterator.

Use the dependency node iterator to traverse all the nodes in Maya's Dependency Graph.

With filtering enabled, the iterator checks to see if the node is compatible with the type specified by the filter. See MFn::Type for a list of all valid types.

Since MObjects may be compatible with more than one type (nodes are organised in a hierarchy) the MObject::hasFn() method can be used to further check for compatible types.

Any compatible Function Set can be attached to the retrieved object to query or or edit it. Often you will want to use the dependency node function set (MFnDependencyNode), which is compatible with all dependency nodes, to perform queries on each node as the iterator Traverses the Dependency Graph.

Examples:

  animExportUtil.cpp, exportJointClusterDataCmd.cpp, exportSkinClusterDataCmd.cpp, instanceCallbackCmd.cpp, maTranslator.cpp, and pluginMain.cpp.

`#include <MItDependencyNodes.h>`

List of all members.

## Public Member Functions
| MItDependencyNodes (MFn::Type filter=MFn::kInvalid, MStatus *ReturnStatus=NULL)
| Class Constructor.
| MItDependencyNodes (MIteratorType &infoObject, MStatus *ReturnStatus=NULL)
| Class Constructor.
virtual | ~MItDependencyNodes ()
| Class Destructor.
MStatus | reset (MFn::Type filter=MFn::kInvalid)
| Resets the iterator and reinitializes the filter.
MStatus | reset (MIteratorType &infoObject)
| Resets the iterator and reinitializes the filter list.
MObject | thisNode (MStatus *ReturnStatus=NULL) const
| Retrieves the dependency node to which the iterator points.
MStatus | next ()
| Moves to the next node matching the filter.
bool | isDone (MStatus *ReturnStatus=NULL) const
| Indicates end of the iteration.
MObject | item (MStatus *ReturnStatus=NULL) const
| This method is obsolete.
## Static Public Member Functions
static const char * | className ()
| Returns the name of this class.

## Constructor & Destructor Documentation

MItDependencyNodes | ( | MFn::Type | filter = `MFn::kInvalid`,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  |

Class Constructor.

Initializes the iterator and establishes the filter.

Parameters:

  [in] | filter | Function set type (MFn::Type)

- kInvalid - Filtering disabled
- See MFn::Type for other values

Parameters:

  [out] | ReturnStatus | Status Code (see below)

Status Codes:
  - MS::kSuccess Success
  - MS::kFailure Failure creating iterator

MItDependencyNodes | ( | MIteratorType & | infoObject,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  |

Class Constructor.

Initializes the iterator and the filter list.

Parameters:

  [in] | infoObject | List of function set type (MFn::Type)

- See MFn::Type

Parameters:

  [out] | ReturnStatus | Status Code (see below)

Status Codes:
  - MS::kSuccess Success
  - MS::kFailure Failure creating iterator

## Member Function Documentation

MStatus reset | ( | MFn::Type | filter = `MFn::kInvalid` | ) |

Search for all occurrences

Resets the iterator and reinitializes the filter.

Parameters:

  [in] | filter | Function set type (MFn::Type)

- kInvalid - Filtering disabled
- See MFn::Type for other values

Returns:
  Status code

Status Codes:
  - MS::kSuccess Success
  - MS::kFailure Failure resetting iterator

Examples:
  pluginMain.cpp.

MStatus reset | ( | MIteratorType & | infoObject | ) |

Search for all occurrences

Resets the iterator and reinitializes the filter list.

The filter list is specified through MIteratorType object.

Parameters:

  [in] | infoObject | MIterator object, which has filter list information.

Returns:
  Status code

Status Codes:
  - MS::kSuccess Success
  - MS::kFailure Failure resetting iterator

MObject thisNode | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Retrieves the dependency node to which the iterator points.

Parameters:

  [out] | ReturnStatus | Status Code (see below).

Returns:
  The dependency node. A null MObject indicates failure.

Status Codes:
  - MS::kSuccess Success
  - MS::kInvalidParameter null MObject - end of iteration
  - MS::kFailure Object error

MStatus next | ( |  | ) |

Search for all occurrences

Moves to the next node matching the filter.

If the filter is set to kInvalid, this method advances to the next DG node without doing any filtering.

Returns:
  Status code

Status Codes:
  - MS::kSuccess Success
  - MS::kFailure Object error

Examples:
  animExportUtil.cpp, maTranslator.cpp, and pluginMain.cpp.

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

Search for all occurrences

Indicates end of the iteration.

Parameters:

  [out] | ReturnStatus | Status Code (see below)

Returns:
  Bool: true if the iteration is done, false otherwise

Status Codes:
  - MS::kSuccess Success
  - MS::kFailure Object error

Examples:
  animExportUtil.cpp, maTranslator.cpp, and pluginMain.cpp.

MObject item | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

This method is obsolete.

Deprecated:
  Use the method MItDependencyNodes::thisNode instead.

Retrieves the dependency node to which the iterator points.

Parameters:

  [out] | ReturnStatus | Status Code (see below).

Returns:
  The dependency node. A null MObject indicates failure.

Status Codes:
  - MS::kSuccess Success
  - MS::kInvalidParameter null MObject - end of iteration
  - MS::kFailure Object error

Examples:
  animExportUtil.cpp, maTranslator.cpp, and pluginMain.cpp.

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

Search for all occurrences

Returns the name of this class.

Returns:
  The name of this class.

MItDependencyNodes MItDependencyNodes MItDependencyNodes MItDependencyNodes MItDependencyNodes MItDependencyNodes MItDependencyNodes MItDependencyNodes MItDependencyNodes MItDependencyNodes
MItDependencyNodes MItDependencyNodes MItDependencyNodes MItDependencyNodes MItDependencyNodes MItDependencyNodes MItDependencyNodes MItDependencyNodes MItDependencyNodes MItDependencyNodes