class MItDependencyNodes

Jump to documentation

Dependency Node iterator. (OpenMaya) (OpenMaya.py)

public members:

MItDependencyNodes ( MFn::Type filter = MFn::kInvalid, MStatus * ReturnStatus = NULL )
MItDependencyNodes ( MIteratorType & infoObject, MStatus * ReturnStatus = NULL )
virtual ~MItDependencyNodes ()
MStatus reset ( MFn::Type filter = MFn::kInvalid )
MStatus reset ( MIteratorType & infoObject)
MObject thisNode ( MStatus * ReturnStatus = NULL ) const
MStatus next ()
bool isDone ( MStatus * ReturnStatus = NULL ) const
MObject item ( MStatus * ReturnStatus = NULL ) const
OBSOLETE

Documentation

Iterate over all nodes in the dependency graph.

Description

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.

Functions

MItDependencyNodes:: MItDependencyNodes ( MFn::Type filter, MStatus * ReturnStatus)

Description

Class Constructor

Initializes the iterator and establishes the filter.

Arguments

  • filter Function set type (MFn::Type)
    • kInvalid - Filtering disabled
    • See MFn::Type for other values
  • ReturnStatus Status Code (see below)

Status Codes

  • MS::kSuccess Success
  • MS::kFailure Failure creating iterator

MItDependencyNodes:: MItDependencyNodes ( MIteratorType & infoObject, MStatus * ReturnStatus)

Description

Class Constructor

Initializes the iterator and the filter list.

Arguments

  • filterList List of function set type (MFn::Type)
    • See MFn::Type
  • ReturnStatus Status Code (see below)

Status Codes

  • MS::kSuccess Success
  • MS::kFailure Failure creating iterator

MItDependencyNodes:: ~MItDependencyNodes ()

Description

Class Destructor

MStatus MItDependencyNodes:: reset ( MFn::Type filter )

Description

Resets the iterator and reinitializes the filter.

Arguments

  • filter Function set type (MFn::Type)
    • kInvalid - Filtering disabled
    • See MFn::Type for other values

Return Value

  • MS::kSuccess Success
  • MS::kFailure Failure resetting iterator

MStatus MItDependencyNodes:: reset ( MIteratorType & infoObject )

Description

Resets the iterator and reinitializes the filter list. The filter list is specified through MIteratorType object.

Arguments

  • infoObjectMIterator object, which has filter list information.

Return Value

  • MS::kSuccess Success
  • MS::kFailure Failure resetting iterator

bool MItDependencyNodes:: isDone ( MStatus * ReturnStatus) const

Description

Indicates end of the iteration.

Arguments

  • ReturnStatus Status Code (see below)

Return Value

  • true Done
  • false Not done

Status Codes

  • MS::kSuccess Success
  • MS::kFailure Object error

MStatus MItDependencyNodes:: next ()

Description

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.

Arguments

  • ReturnStatus Status Code (see below)

Return Value

  • MS::kSuccess Success
  • MS::kFailure Object error

MObject MItDependencyNodes:: item ( MStatus * ReturnStatus) const

Description

THIS IS AN OBSOLETE METHOD

Retrieves the dependency node to which the iterator points. This method has been replaced by MItDependencyNodes::thisNode and will be removed in a future Maya release.

Arguments

  • ReturnStatus Status Code (see below).

Return Value

  • the dependency node. A null MObject indicates failure.

Status Codes

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

MObject MItDependencyNodes:: thisNode ( MStatus * ReturnStatus) const

Description

Retrieves the dependency node to which the iterator points.

Arguments

  • ReturnStatus Status Code (see below).

Return Value

  • the dependency node. A null MObject indicates failure.

Status Codes

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

Description

Checks if the given Mobject has any of the function type given in the filter list.

Arguments

  • ReturnStatus Status Code (see below).

Return Value

  • Boolean indicating whether the object is having the given function type or not.

Status Codes

  • MS::kSuccess Success
  • MS::kFailure Object error

This class has no child classes.


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