MArgList Class Reference
[OpenMaya - API module for common classes]

#include <MArgList.h>

List of all members.


Detailed Description

Create and retreive argument lists.

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

Examples:

animFileExport.h, animFileUtils.h, animImportExport.h, animInfoCmd.cpp, apiMeshData.cpp, apiMeshData.h, blindComplexDataCmd.cpp, blindDoubleDataCmd.cpp, blindShortDataCmd.cpp, cgfxShaderCmd.cpp, cgfxShaderCmd.h, cleanPerFaceAssignmentCmd.cpp, cleanPerFaceAssignmentCmd.h, closestPointCmd.cpp, closestPointOnCurveCmd.cpp, closestPointOnCurveCmd.h, closestPointOnNurbsSurfaceCmd.cpp, closestPointOnNurbsSurfaceCmd.h, clothPaintAttrCmd.cpp, clothPaintAttrCmd.h, clusterWeightFunction.cpp, conditionTest.cpp, convertBumpCmd.cpp, convertEdgesToFacesCmd.cpp, convertVerticesToEdgesCmd.cpp, convertVerticesToFacesCmd.cpp, createClipCmd.cpp, cvExpandCmd.cpp, cvPosCmd.cpp, dagMessageCmd.cpp, dagPoseInfoCmd.cpp, deletedMsgCmd.cpp, eventTest.cpp, exportJointClusterDataCmd.cpp, exportSkinClusterDataCmd.cpp, fileIOMsgCmd.cpp, filteredAsciiFile.cpp, findFileTexturesCmd.cpp, findTexturesPerPolygonCmd.cpp, fluidInfoCmd.cpp, fxManagerCmd.cpp, fxManagerCmd.h, geometryCacheConverter.cpp, geometrySurfaceConstraint.cpp, geometrySurfaceConstraint.h, getAttrAffectsCmd.cpp, helix2Cmd.cpp, helixCmd.cpp, helixTool.cpp, helloCmd.cpp, helloWorldCmd.cpp, iffInfoCmd.cpp, iffPixelCmd.cpp, iffPpmCmd.cpp, instanceCallbackCmd.cpp, instancerListCmd.cpp, intersectCmd.cpp, intersectOnNurbsSurfaceCmd.cpp, intersectOnNurbsSurfaceCmd.h, latticeNoise.h, latticeNoiseCmd.cpp, listLightLinksCmd.cpp, listPolyHolesCmd.cpp, lockEvent.cpp, meshOpCmd.cpp, meshOpCmd.h, meshRemapCmd.cpp, meshRemapCmd.h, meshReorderCmd.cpp, meshReorderCmd.h, motionPathCmd.cpp, motionTraceCmd.cpp, moveCurveCVsCmd.cpp, moveNumericTool.cpp, moveTool.cpp, nodeCreatedCBCmd.cpp, nodeCreatedCBCmd.h, nodeInfoCmd.cpp, nodeMessageCmd.cpp, particlePathsCmd.cpp, particleSystemInfoCmd.cpp, peltOverlapCmd.cpp, pfxInfoCmd.cpp, pickCmd.cpp, pointOnMeshCmd.cpp, pointOnMeshCmd.h, polyMessageCmd.cpp, polyPrimitiveCmd.cpp, progressWindowCmd.cpp, referenceQueryCmd.cpp, renderViewInteractiveRenderCmd.cpp, renderViewRenderCmd.cpp, renderViewRenderRegionCmd.cpp, sampleCmd.cpp, sampleParticles.cpp, scanDagCmd.cpp, scanDagSyntax.cpp, spiralAnimCurveCmd.cpp, splitUVCmd.cpp, splitUVCmd.h, surfaceCreateCmd.cpp, surfaceTwistCmd.cpp, threadTestCmd.cpp, threadTestWithLocksCmd.cpp, translateCmd.cpp, undoRedoMsgCmd.cpp, userMsgCmd.cpp, viewCallbackTest.cpp, viewCaptureCmd.cpp, volumeLightCmd.cpp, whatisCmd.cpp, and zoomCameraCmd.cpp.


Public Member Functions

  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.

Constructor & Destructor Documentation

MArgList::MArgList (  ) 

The default class constructor.

MArgList::MArgList ( const MArgList other  ) 

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

Parameters:
[in]  other  the arglist to copy from.

MArgList::~MArgList (  ) 

The class destructor.


Member Function Documentation

unsigned int MArgList::length ( MStatus ReturnStatus = NULL  )  const

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

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

Parameters:
[in]  index  the index of the desired argument
[out]  ReturnStatus  the return status
Returns:
The bool value of the indicated argument.
Status Codes:
Examples:

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

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

Parameters:
[in]  index  the index of the desired argument
[out]  ReturnStatus  the return status
Returns:
The integer value of the indicated argument.
Status Codes:
Examples:

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

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

Parameters:
[in]  index  the index of the desired argument
[out]  ReturnStatus  the return status
Returns:
The double value of the indicated argument.
Status Codes:
Examples:

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

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

Parameters:
[in]  index  the index of the desired argument
[out]  ReturnStatus  the return status
Returns:
The MString value of the indicated argument.
Status Codes:
Examples:

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

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

Parameters:
[in]  index  the index of the desired argument
[out]  ReturnStatus  the return status
Returns:
The MDistance value of the indicated argument.
Status Codes:

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

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

Parameters:
[in]  index  the index of the desired argument
[out]  ReturnStatus  the return status
Returns:
The MAngle value of the indicated argument.
Status Codes:

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

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

Parameters:
[in]  index  the index of the desired argument
[out]  ReturnStatus  the return status
Returns:
The MTime value of the indicated argument.
Status Codes:

MVector MArgList::asVector ( unsigned int &  index,
unsigned int  numElements = 3,
MStatus ReturnStatus = NULL  
) const

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

Parameters:
[in]  index  the index of the desired argument
[in]  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.
[out]  ReturnStatus  the return status
Returns:
The MVector value of the indicated argument.
Status Codes:
Examples:

MPoint MArgList::asPoint ( unsigned int &  index,
unsigned int  numElements = 3,
MStatus ReturnStatus = NULL  
) const

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

Parameters:
[in]  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;
[in]  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.
[out]  ReturnStatus  the return status
Returns:
The MPoint value of the indicated argument.
Status Codes:

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

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

Parameters:
[in]  index  the index of the desired argument
[out]  ret  the return status
Returns:
The MMatrix value of the indicated argument.
Status Codes:

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

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

Parameters:
[in]  index  the index of the desired argument
[out]  ReturnStatus  API status code
Returns:
MIntArray

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

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

Parameters:
[in]  index  the index of the desired argument
[out]  ReturnStatus  API status code
Returns:
MDoubleArray

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

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

Parameters:
[in]  index  the index of the desired argument
[out]  ReturnStatus  API status code
Returns:
MStringArray

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

The assignment operator. Allows assignment between MArgList instances.

Parameters:
[in]  other  The object to copy from.

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

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

Parameters:
[in]  shortFlag  the short version of the flag
[in]  longFlag  the int version of the flag (if any)
Returns:
The unsigned int index of the indicated argument if it has been set, kInvalidArgIndex otherwise.

MStatus MArgList::addArg ( bool  arg  ) 

Add a new bool argument to the arglist.

Parameters:
[in]  arg  the new bool argument
Returns:
Examples:

MStatus MArgList::addArg ( int  arg  ) 

Add a new integer argument to the arglist.

Parameters:
[in]  arg  the new integer argument
Returns:

MStatus MArgList::addArg ( double  arg  ) 

Add a new double argument to the arglist.

Parameters:
[in]  arg  the new double argument
Returns:

MStatus MArgList::addArg ( const MString arg  ) 

Add a new MString argument to the arglist.

Parameters:
[in]  arg  the new MString argument
Returns:

MStatus MArgList::addArg ( const MDistance arg  ) 

Add a new MDistance argument to the arglist.

Parameters:
[in]  arg  the new MDistance argument
Returns:

MStatus MArgList::addArg ( const MAngle arg  ) 

Add a new MAngle argument to the arglist.

Parameters:
[in]  arg  the new MAngle argument
Returns:

MStatus MArgList::addArg ( const MTime arg  ) 

Add a new MTime argument to the arglist.

Parameters:
[in]  arg  the new MTime argument
Returns:

MStatus MArgList::addArg ( const MVector arg  ) 

Add a new MVector argument to the arglist.

Parameters:
[in]  arg  the new MVector argument
Returns:

MStatus MArgList::addArg ( const MPoint arg  ) 

Add a new MPoint argument to the arglist.

Parameters:
[in]  arg  the new MPoint argument
Returns:

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

NO SCRIPT SUPPORT.

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.

Parameters:
[in]  index  the index of the desired argument
[out]  ret  the bool value is returned in this argument.
Returns:
Examples:

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

NO SCRIPT SUPPORT.

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.

Parameters:
[in]  index  the index of the desired argument
[out]  ret  the integer value is returned in this argument.
Returns:

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

NO SCRIPT SUPPORT.

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.

Parameters:
[in]  index  the index of the desired argument
[out]  ret  the double value is returned in this argument.
Returns:

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

NO SCRIPT SUPPORT.

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.

Parameters:
[in]  index  the index of the desired argument
[out]  ret  the MString value is returned in this argument.
Returns:

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

NO SCRIPT SUPPORT.

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.

Parameters:
[in]  index  the index of the desired argument
[out]  ret  the MDistance value is returned in this argument.
Returns:

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

NO SCRIPT SUPPORT.

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.

Parameters:
[in]  index  the index of the desired argument
[out]  ret  the MAngle value is returned in this argument.
Returns:

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

NO SCRIPT SUPPORT.

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.

Parameters:
[in]  index  the index of the desired argument
[out]  ret  the MTime value is returned in this argument.
Returns:

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

NO SCRIPT SUPPORT.

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.

Parameters:
[in]  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;
[in]  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.
[out]  ret  the MVector value is returned in this argument.
Returns:

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

NO SCRIPT SUPPORT.

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.

Parameters:
[in]  index  the index of the desired argument
[out]  ret  the MPoint value is returned in this argument.
[in]  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.
Returns:

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

NO SCRIPT SUPPORT.

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.

Parameters:
[in]  index  the index of the desired argument
[out]  ret  the MMatrix value is returned in this argument.
Returns:

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

NO SCRIPT SUPPORT.

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.

Parameters:
[in]  index  the index of the desired argument
[out]  ret  the MIntArray value is returned in this argument.
Returns:

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

NO SCRIPT SUPPORT.

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.

Parameters:
[in]  index  the index of the desired argument
[out]  ret  the MDoubleArray value is returned in this argument.
Returns:

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

NO SCRIPT SUPPORT.

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.

Parameters:
[in]  index  the index of the desired argument
[out]  ret  the MStringArray value is returned in this argument.
Returns:

Autodesk® Maya® 2011 © 1997-2010 Autodesk, Inc. All rights reserved. Generated with doxygen 1.5.6