class MArgList

Jump to documentation

Create and retreive argument lists. (OpenMaya) (OpenMaya.py)

public members:

static const unsigned int kInvalidArgIndex
MArgList ()
MArgList ( const MArgList & other )
~MArgList ()
unsigned int length ( MStatus * ReturnStatus= NULL ) const
bool asBool ( unsigned int index, MStatus * ret=NULL ) const
int asInt ( unsigned int index, MStatus * ret=NULL ) const
double asDouble ( unsigned int index, MStatus * ret=NULL ) const
MString asString ( unsigned int index, MStatus * ret=NULL ) const
MDistance asDistance ( unsigned int index, MStatus * ret=NULL ) const
MAngle asAngle ( unsigned int index, MStatus * ret=NULL ) const
MTime asTime ( unsigned int index, MStatus * ret=NULL ) const
MVector asVector ( unsigned int& index, unsigned int numElements=3, MStatus * ReturnStatus=NULL ) const
MPoint asPoint ( unsigned int& index, unsigned int numElements=3, MStatus * ReturnStatus=NULL ) const
MMatrix asMatrix ( unsigned int& index, MStatus * ret=NULL ) const
MIntArray asIntArray ( unsigned int& index, MStatus * ReturnStatus=NULL ) const
MDoubleArray asDoubleArray ( unsigned int& index, MStatus *ReturnStatus=NULL ) const
const MStringArray asStringArray ( unsigned int& index, MStatus *ReturnStatus=NULL ) const
MArgList & operator = ( const MArgList & other )
unsigned int flagIndex ( const char *shortFlag, const char *longFlag = NULL ) const
MStatus addArg ( bool arg )
MStatus addArg ( int arg )
MStatus addArg ( double arg )
MStatus addArg ( const MString & arg )
MStatus addArg ( const MDistance & arg )
MStatus addArg ( const MAngle & arg )
MStatus addArg ( const MTime & arg )
MStatus addArg ( const MVector & arg )
MStatus addArg ( const MPoint & arg )
MStatus get ( unsigned int index, bool& ret ) const
NO SCRIPT SUPPORT
MStatus get ( unsigned int index, int& ret ) const
NO SCRIPT SUPPORT
MStatus get ( unsigned int index, double& ret ) const
NO SCRIPT SUPPORT
MStatus get ( unsigned int index, MString & ret ) const
NO SCRIPT SUPPORT
MStatus get ( unsigned int index, MDistance & ret ) const
NO SCRIPT SUPPORT
MStatus get ( unsigned int index, MAngle & ret ) const
NO SCRIPT SUPPORT
MStatus get ( unsigned int index, MTime & ret ) const
NO SCRIPT SUPPORT
MStatus get ( unsigned int& index, MVector & ret, unsigned int numElements=3 ) const
NO SCRIPT SUPPORT
MStatus get ( unsigned int& index, MPoint & ret, unsigned int numElements=3 ) const
NO SCRIPT SUPPORT
MStatus get ( unsigned int& index, MMatrix & ret ) const
NO SCRIPT SUPPORT
MStatus get ( unsigned int& index, MIntArray & ret ) const
NO SCRIPT SUPPORT
MStatus get ( unsigned int& index, MDoubleArray & ret ) const
NO SCRIPT SUPPORT
MStatus get ( unsigned int& index, MStringArray & ret ) const
NO SCRIPT SUPPORT

Documentation

Manipulate argument lists.
Description

This class is used to create and retrieve argument lists that can be passed to API class methods that require arglists.

Functions

MArgList:: MArgList ()

Description

The default class constructor.

MArgList:: MArgList ( const MArgList & other )

Description

The copy constructor. Initialize a new arglist with the values from another arglist.

Arguments

  • other the arglist to copy from.

MArgList:: ~MArgList ()

Description

The class destructor.

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

Description

The assignment operator. Allows assignment between MArgList instances.

Arguments

  • other The object to copy from.

unsigned int MArgList:: length ( MStatus * ReturnStatus ) const

Description

Returns the number of arguments in the arglist.

Arguments

  • ReturnStatus the return status

Return Value

  • the number of arguments in the arglist.

Status Codes

  • MS::kSuccess operation successful

MStatus MArgList:: get ( unsigned int index, bool& ret ) const

Description

Get the value of the bool argument at a given position in the arglist.

Python Notes

This method is not supported in Python. Please see the asBool() function.

Arguments

  • index the index of the desired argument
  • ret the bool value is returned in this argument.

Return Value

  • MS::kSuccess operation successful
  • MS::kFailure operation failed

MStatus MArgList:: get ( unsigned int index, int& ret ) const

Description

Get the value of the integer argument at a given position in the arglist.

Python Notes

This method is not supported in Python. Please see the asInt() function.

Arguments

  • index the index of the desired argument
  • ret the integer value is returned in this argument.

Return Value

  • MS::kSuccess operation successful
  • MS::kFailure operation failed

MStatus MArgList:: get ( unsigned int index, double& ret ) const

Description

Get the value of the double argument at a given position in the arglist.

Python Notes

This method is not supported in Python. Please see the asDouble() function.

Arguments

  • index the index of the desired argument
  • ret the double value is returned in this argument.

Return Value

  • MS::kSuccess operation successful
  • MS::kFailure operation failed

MStatus MArgList:: get ( unsigned int& index, MVector & ret, unsigned int numElements ) const

Description

Get the value of the MVector argument at a given position in the arglist.

Python Notes

This method is not supported in Python. Please see the asVector() function.

Arguments

  • index the index of the first argument to be used as an element of the vector. On return, this argument is updated to the value of the last argument used which will be the same as incrementing index by numElements-1;
  • numElements the dimension of the vector to be returned. This should always be 3, to add all of the x, y, and z elements to the vector.
  • ret the MVector value is returned in this argument.

Return Value

  • MS::kSuccess operation successful
  • MS::kFailure operation failed

MStatus MArgList:: get ( unsigned int& index, MPoint & ret, unsigned int numElements ) const

Description

Get the value of the MPoint argument at a given position in the arglist.

Python Notes

This method is not supported in Python. Please see the asPoint() function.

Arguments

  • index the index of the desired argument
  • ret the MPoint value is returned in this argument.
  • numElements the dimension of the point to be returned. This should always be 3, to add all of the x, y, and z elements to the point.

Return Value

  • MS::kSuccess operation successful
  • MS::kFailure operation failed

MStatus MArgList:: get ( unsigned int index, MString & ret ) const

Description

Get the value of the MString argument at a given position in the arglist.

Python Notes

This method is not supported in Python. Please see the asString() function.

Arguments

  • index the index of the desired argument
  • ret the MString value is returned in this argument.

Return Value

  • MS::kSuccess operation successful
  • MS::kFailure operation failed

MStatus MArgList:: get ( unsigned int index, MDistance & ret ) const

Description

Get the value of the MDistance argument at a given position in the arglist.

Python Notes

This method is not supported in Python. Please see the asDistance() function.

Arguments

  • index the index of the desired argument
  • ret the MDistance value is returned in this argument.

Return Value

  • MS::kSuccess operation successful
  • MS::kFailure operation failed

MStatus MArgList:: get ( unsigned int index, MAngle & ret ) const

Description

Get the value of the MAngle argument at a given position in the arglist.

Python Notes

This method is not supported in Python. Please see the asAngle() function.

Arguments

  • index the index of the desired argument
  • ret the MAngle value is returned in this argument.

Return Value

  • MS::kSuccess operation successful
  • MS::kFailure operation failed

MStatus MArgList:: get ( unsigned int index, MTime & ret ) const

Description

Get the value of the MTime argument at a given position in the arglist.

Python Notes

This method is not supported in Python. Please see the asTime() function.

Arguments

  • index the index of the desired argument
  • ret the MTime value is returned in this argument.

Return Value

  • MS::kSuccess operation successful
  • MS::kFailure operation failed

MStatus MArgList:: get ( unsigned int& index, MMatrix & ret ) const

Description

Get the value of the MMatrix argument at a given position in the arglist.

Python Notes

This method is not supported in Python. Please see the asMatrix() function.

Arguments

  • index the index of the desired argument
  • ret the MMatrix value is returned in this argument.

Return Value

  • MS::kSuccess operation successful
  • MS::kFailure operation failed

MStatus MArgList:: get ( unsigned int& index, MDoubleArray & ret ) const

Description

Get the value of the MDoubleArray argument at a given position in the arglist.

Python Notes

This method is not supported in Python. Please see the asDoubleArray() function.

Arguments

  • index the index of the desired argument
  • ret the MDoubleArray value is returned in this argument.

Return Value

  • MS::kSuccess operation successful
  • MS::kFailure operation failed

MStatus MArgList:: get ( unsigned int& index, MIntArray & ret ) const

Description

Get the value of the MIntArray argument at a given position in the arglist.

Python Notes

This method is not supported in Python. Please see the asIntArray() function.

Arguments

  • index the index of the desired argument
  • ret the MIntArray value is returned in this argument.

Return Value

  • MS::kSuccess operation successful
  • MS::kFailure operation failed

MStatus MArgList:: get ( unsigned int& index, MStringArray & ret ) const

Description

Get the value of the MStringArray argument at a given position in the arglist.

Python Notes

This method is not supported in Python. Please see the asStringArray() function.

Arguments

  • index the index of the desired argument
  • ret the MStringArray value is returned in this argument.

Return Value

  • MS::kSuccess operation successful
  • MS::kFailure operation failed

bool MArgList:: asBool ( unsigned int index, MStatus * ReturnStatus ) const

Description

Return the value of the argument at a given position in the arglist as an bool.

Arguments

  • index the index of the desired argument
  • ReturnStatus the return status

Return Value

  • the bool value of the indicated argument.

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure operation failed

int MArgList:: asInt ( unsigned int index, MStatus * ReturnStatus ) const

Description

Return the value of the argument at a given position in the arglist as an integer.

Arguments

  • index the index of the desired argument
  • ReturnStatus the return status

Return Value

  • the integer value of the indicated argument.

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure operation failed

double MArgList:: asDouble ( unsigned int index, MStatus * ReturnStatus ) const

Description

Return the value of the argument at a given position in the arglist as a double.

Arguments

  • index the index of the desired argument
  • ReturnStatus the return status

Return Value

  • the double value of the indicated argument.

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure operation failed

MVector MArgList:: asVector ( unsigned int& index, unsigned int numElements, MStatus * ReturnStatus ) const

Description

Return the value of the argument at a given position in the arglist as an MVector.

Arguments

  • index the index of the desired argument
  • numElements the dimension of the vector to be returned. This should always be 3, to add all of the x, y, and z elements to the vector.
  • ReturnStatus the return status

Return Value

  • the MVector value of the indicated argument.

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure operation failed

MPoint MArgList:: asPoint ( unsigned int& index, unsigned int numElements, MStatus * ReturnStatus ) const

Description

Return the value of the argument at a given position in the arglist as an MPoint.

Arguments

  • index the index of the first argument to be used as an element of the point. On return, this argument is updated to the value of the last argument used which will be the same as incrementing index by numElements-1;
  • numElements the dimension of the point to be returned. This should always be 3, to add all of the x, y, and z elements to the point.
  • ReturnStatus the return status

Return Value

  • the MPoint value of the indicated argument.

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure operation failed

MString MArgList:: asString ( unsigned int index, MStatus * ReturnStatus ) const

Description

Return the value of the argument at a given position in the arglist as an MString.

Arguments

  • index the index of the desired argument
  • ReturnStatus the return status

Return Value

  • the MString value of the indicated argument.

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure operation failed

MDistance MArgList:: asDistance ( unsigned int index, MStatus * ReturnStatus ) const

Description

Return the value of the argument at a given position in the arglist as an MDistance.

Arguments

  • index the index of the desired argument
  • ReturnStatus the return status

Return Value

  • the MDistance value of the indicated argument.

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure operation failed

MAngle MArgList:: asAngle ( unsigned int index, MStatus * ReturnStatus ) const

Description

Return the value of the argument at a given position in the arglist as an MAngle.

Arguments

  • index the index of the desired argument
  • ReturnStatus the return status

Return Value

  • the MAngle value of the indicated argument.

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure operation failed

MTime MArgList:: asTime ( unsigned int index, MStatus * ReturnStatus ) const

Description

Return the value of the argument at a given position in the arglist as an MTime.

Arguments

  • index the index of the desired argument
  • ReturnStatus the return status

Return Value

  • the MTime value of the indicated argument.

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure operation failed

MMatrix MArgList:: asMatrix ( unsigned int& index, MStatus * ret ) const

Description

Get the value of the MMatrix argument at a given position in the arglist.

Arguments

  • index the index of the desired argument
  • ret the return status

Return Value

  • the MMatrix value of the indicated argument.

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure operation failed

MIntArray MArgList:: asIntArray ( unsigned int& index, MStatus * ReturnStatus ) const

Description

Get the value of the MIntArray argument at a given position in the arglist.

Arguments

  • index the index of the desired argument
  • ReturnStatus API status code

Return Value

  • MIntArray

MDoubleArray MArgList:: asDoubleArray ( unsigned int& index, MStatus * ReturnStatus ) const

Description

Get the value of the MDoubleArray argument at a given position in the arglist.

Arguments

  • index the index of the desired argument
  • ReturnStatus API status code

Return Value

  • MDoubleArray

const MStringArray MArgList:: asStringArray ( unsigned int& index, MStatus *ReturnStatus ) const

Description

Get the value of the MStringArray argument at a given position in the arglist.

Arguments

  • index the index of the desired argument
  • ReturnStatus API status code

Return Value

  • MStringArray

unsigned int MArgList:: flagIndex (const char *shortFlag, const char *longFlag) const

Description

Return the index entry of the requested flag, if it has been set.

Arguments

  • shortFlag the short version of the flag
  • longFlag the int version of the flag (if any)

Return Value

  • the unsigned int index of the indicated argument if it has been set, kInvalidArgIndex otherwise.

MStatus MArgList:: addArg ( bool arg )

Description

Add a new bool argument to the arglist.

Arguments

  • arg the new bool argument

Return Value

  • MS::kSuccess operation successful
  • MS::kInvalidParameter object is not writable
  • MS::kFailure operation failed

MStatus MArgList:: addArg ( int arg )

Description

Add a new integer argument to the arglist.

Arguments

  • arg the new integer argument

Return Value

  • MS::kSuccess operation successful
  • MS::kInvalidParameter object is not writable
  • MS::kFailure operation failed

MStatus MArgList:: addArg ( double arg )

Description

Add a new double argument to the arglist.

Arguments

  • arg the new double argument

Return Value

  • MS::kSuccess operation successful
  • MS::kInvalidParameter object is not writable
  • MS::kFailure operation failed

MStatus MArgList:: addArg ( const MString & arg )

Description

Add a new MString argument to the arglist.

Arguments

  • arg the new MString argument

Return Value

  • MS::kSuccess operation successful
  • MS::kInvalidParameter object is not writable
  • MS::kFailure operation failed

MStatus MArgList:: addArg ( const MDistance & arg )

Description

Add a new MDistance argument to the arglist.

Arguments

  • arg the new MDistance argument

Return Value

  • MS::kSuccess operation successful
  • MS::kInvalidParameter object is not writable
  • MS::kFailure operation failed

MStatus MArgList:: addArg ( const MAngle & arg )

Description

Add a new MAngle argument to the arglist.

Arguments

  • arg the new MAngle argument

Return Value

  • MS::kSuccess operation successful
  • MS::kInvalidParameter object is not writable
  • MS::kFailure operation failed

MStatus MArgList:: addArg ( const MTime & arg )

Description

Add a new MTime argument to the arglist.

Arguments

  • arg the new MTime argument

Return Value

  • MS::kSuccess operation successful
  • MS::kInvalidParameter object is not writable
  • MS::kFailure operation failed

MStatus MArgList:: addArg ( const MVector & arg )

Description

Add a new MVector argument to the arglist.

Arguments

  • arg the new MVector argument

Return Value

  • MS::kSuccess operation successful
  • MS::kInvalidParameter object is not writable
  • MS::kFailure operation failed

MStatus MArgList:: addArg ( const MPoint & arg )

Description

Add a new MPoint argument to the arglist.

Arguments

  • arg the new MPoint argument

Return Value

  • MS::kSuccess operation successful
  • MS::kInvalidParameter object is not writable
  • MS::kFailure operation failed

This class has no child classes.


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