class MDagPathArray

Jump to documentation

Indexable Array of DAG Paths. (OpenMaya) (OpenMaya.py)

public members:

MDagPathArray ()
MDagPathArray (const MDagPathArray & other)
~MDagPathArray ()
const MDagPath & operator[] ( unsigned int index ) const
MDagPathArray & operator= (const MDagPathArray & other )
MStatus setLength ( unsigned int length )
unsigned int length () const
MStatus remove ( unsigned int index )
MStatus insert ( const MDagPath & element, unsigned int index )
MStatus append ( const MDagPath & element )
MStatus clear ()
MDagPath & operator[] ( unsigned int index )
friend std::ostream &operator<< (std::ostream &os, const MDagPathArray &array)
NO SCRIPT SUPPORT

Documentation

Provides methods for manipulating arrays of DAG Paths.

Arrays of DAG Paths are useful for storing and manipluating multiple Paths to a particular DAG Node. The DAG Path method MDagPath::getAllPathsTo() and DAG Node Function Set method MFnDagNode::getAllPaths() implicitly return an array of DAG Paths.

These arrays may also be used to manage Paths for a number of different Nodes.

DAG Path arrays are used in conjunction with DAG Paths (MDagPath) and individual elements of the arrays can be parameters to some methods of the DAG Node Function Set (MFnDagNode).

Description

Use this DAG Path Array Class to create and manipulate arrays of DAG Paths, for either a particular DAG Node or a number of different DAG Nodes.

The length of the array adjusts automatically.

Functions

MDagPathArray:: MDagPathArray ( )

Description

Class Constructor

Creates a DAG Path Array

Arguments

  • Nil

Status Codes

  • Nil

MDagPathArray:: MDagPathArray (const MDagPathArray & other)

Description

Copy Constructor.

Arguments

  • other the array with which to initialize this instance

MDagPathArray:: ~MDagPathArray ()

Description

Class Destructor

No additional action.

const MDagPath & MDagPathArray:: operator[] ( unsigned int index ) const

Retrieves the read-only DAG Path which is at the specified index in the array.

Arguments

  • index Zero-based index to the array

Return Value

  • DAG Path at the specified index

Status Codes

  • Nil

MDagPath & MDagPathArray:: operator[] ( unsigned int index )

Retrieves the DAG Path which is at the specified index in the array.

Arguments

  • index Zero-based index to the array

Return Value

  • DAG Path at the specified index

Status Codes

  • Nil

MDagPathArray & MDagPathArray:: operator= ( const MDagPathArray & other )

Description

Assignment operator copies all of the elements of the other array into this one.

If the other array was returned as a reference to internal data then this array will also become a reference rather than doing a full copy.

Arguments

  • other the array being copied

Return Value

  • a reference to this array

MStatus MDagPathArray:: setLength ( unsigned int length )

Description

Set the length of the array. This will grow and shrink the array as desired. Elements that are grown have uninitialized values, while those which are shrunk will lose the data contained in the deleted elements (ie. it will release the memory).

Arguments

  • size the new size of the array

unsigned int MDagPathArray:: length () const

Determines the number of elements in the array.

Arguments

  • Nil

Return Value

  • Number of elements in the array

Status Codes

  • Nil

MStatus MDagPathArray:: remove ( unsigned int index )

Removes the DAG Path which is at the specified index in the array.

Arguments

  • index Zero-based index to the array

Return Value

  • MS::kSuccess on success, otherwise MS::kFailure

MStatus MDagPathArray:: insert ( const MDagPath & element, unsigned int index )

Inserts the given DAG Path at the specified index in the array.

Arguments

  • element DAG Path to be inserted
  • index Zero-based index to the array

Return Value

  • MS::kSuccess on success, otherwise MS::kFailure

MStatus MDagPathArray:: append ( const MDagPath & element )

Appends the given DAG Path to the end of the array.

Arguments

  • element DAG Path to be appended

Return Value

  • MS::kSuccess on success, otherwise MS::kFailure

Status Codes

  • Nil

MStatus MDagPathArray:: clear ()

Clears this array. Length of the array becomes zero.

Arguments

  • Nil

Return Value

  • MS::kSuccess on success, otherwise MS::kFailure

Status Codes

  • Nil

std::ostream& operator<< (std::ostream &os, const MDagPathArray &array)

Description

Print the contents of the given MDagPathArray on the given ostream. The format used is [fullPathName, fullPathName, fullPathName, ... fullPathName].

Arguments

  • os the ostream to print to
  • array the MDagPathArray whose value is to be printed

Return Value

  • the ostream reference, s, provided as the first parameter.

This class has no child classes.


Autodesk® Maya® 2008 © 1997-2007 Autodesk, Inc. All rights reserved. doc++ Copyright