C++ API Reference

Create and retrieve argument lists. More...

#include <MArgList.h>

Public Member Functions

 MArgList ()
 The default class constructor.
 
 MArgList (const MArgList &other)
 The copy constructor. More...
 
 ~MArgList ()
 The class destructor.
 
unsigned int length (MStatus *ReturnStatus=NULL) const
 Returns the number of arguments in the arglist. More...
 
bool asBool (unsigned int index, MStatus *ret=NULL) const
 Return the value of the argument at a given position in the arglist as an bool. More...
 
int asInt (unsigned int index, MStatus *ret=NULL) const
 Return the value of the argument at a given position in the arglist as an integer. More...
 
double asDouble (unsigned int index, MStatus *ret=NULL) const
 Return the value of the argument at a given position in the arglist as a double. More...
 
MString asString (unsigned int index, MStatus *ret=NULL) const
 Return the value of the argument at a given position in the arglist as an MString. More...
 
MDistance asDistance (unsigned int index, MStatus *ret=NULL) const
 Return the value of the argument at a given position in the arglist as an MDistance. More...
 
MAngle asAngle (unsigned int index, MStatus *ret=NULL) const
 Return the value of the argument at a given position in the arglist as an MAngle. More...
 
MTime asTime (unsigned int index, MStatus *ret=NULL) const
 Return the value of the argument at a given position in the arglist as an MTime. More...
 
MVector 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. More...
 
MPoint 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. More...
 
MMatrix asMatrix (unsigned int &index, MStatus *ret=NULL) const
 Get the value of the MMatrix argument at a given position in the arglist. More...
 
MIntArray asIntArray (unsigned int &index, MStatus *ReturnStatus=NULL) const
 Get the value of the MIntArray argument at a given position in the arglist. More...
 
MDoubleArray asDoubleArray (unsigned int &index, MStatus *ReturnStatus=NULL) const
 Get the value of the MDoubleArray argument at a given position in the arglist. More...
 
const MStringArray asStringArray (unsigned int &index, MStatus *ReturnStatus=NULL) const
 Get the value of the MStringArray argument at a given position in the arglist. More...
 
MArgListoperator= (const MArgList &other)
 The assignment operator. More...
 
unsigned int flagIndex (const char *shortFlag, const char *longFlag=NULL) const
 Return the index entry of the requested flag, if it has been set. More...
 
MStatus addArg (bool arg)
 Add a new bool argument to the arglist. More...
 
MStatus addArg (int arg)
 Add a new integer argument to the arglist. More...
 
MStatus addArg (double arg)
 Add a new double argument to the arglist. More...
 
MStatus addArg (const MString &arg)
 Add a new MString argument to the arglist. More...
 
MStatus addArg (const MDistance &arg)
 Add a new MDistance argument to the arglist. More...
 
MStatus addArg (const MAngle &arg)
 Add a new MAngle argument to the arglist. More...
 
MStatus addArg (const MTime &arg)
 Add a new MTime argument to the arglist. More...
 
MStatus addArg (const MVector &arg)
 Add a new MVector argument to the arglist. More...
 
MStatus addArg (const MPoint &arg)
 Add a new MPoint argument to the arglist. More...
 
MStatus get (unsigned int index, bool &ret) const
 This method is not available in Python. More...
 
MStatus get (unsigned int index, int &ret) const
 This method is not available in Python. More...
 
MStatus get (unsigned int index, double &ret) const
 This method is not available in Python. More...
 
MStatus get (unsigned int index, MString &ret) const
 This method is not available in Python. More...
 
MStatus get (unsigned int index, MDistance &ret) const
 This method is not available in Python. More...
 
MStatus get (unsigned int index, MAngle &ret) const
 This method is not available in Python. More...
 
MStatus get (unsigned int index, MTime &ret) const
 This method is not available in Python. More...
 
MStatus get (unsigned int &index, MVector &ret, unsigned int numElements=3) const
 This method is not available in Python. More...
 
MStatus get (unsigned int &index, MPoint &ret, unsigned int numElements=3) const
 This method is not available in Python. More...
 
MStatus get (unsigned int &index, MMatrix &ret) const
 This method is not available in Python. More...
 
MStatus get (unsigned int &index, MIntArray &ret) const
 This method is not available in Python. More...
 
MStatus get (unsigned int &index, MDoubleArray &ret) const
 This method is not available in Python. More...
 
MStatus get (unsigned int &index, MStringArray &ret) const
 This method is not available in Python. More...
 

Static Public Member Functions

static const char * className ()
 Returns the name of this class. More...
 

Friends

OPENMAYA_EXPORT std::ostream & operator<< (std::ostream &os, const MArgList &args)
 This method is not available in Python. More...
 

Detailed Description

Create and retrieve argument lists.

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

Do not use MArgList to parse flags for a plug-in command as the flags will not work if the command is called from Python. Use MArgParser or MArgDatabase instead.

Examples:
AbcBullet/AbcBullet.cpp, AbcBullet/AbcBullet.h, AbcExport/AbcExport.cpp, AbcExport/AbcExport.h, AbcImport/AbcImport.cpp, AbcImport/AbcImport.h, animImportExport/animImportExport.h, animInfoCmd/animInfoCmd.cpp, apiMeshShape/apiMeshData.cpp, apiMeshShape/apiMeshData.h, atomImportExport/atomImportExport.h, autoLoader/moduleLogicCmd.cpp, autoLoader/moduleLogicCmd.h, blast2Cmd/blast2Cmd.cpp, blindComplexDataCmd/blindComplexDataCmd.cpp, blindDoubleDataCmd/blindDoubleDataCmd.cpp, blindShortDataCmd/blindShortDataCmd.cpp, cameraMessageCmd/cameraMessageCmd.cpp, cameraSetSubclass/testExCameraSetCmd.cpp, cameraSetSubclass/testExCameraSetCmd.h, captureViewRenderCmd/captureViewRenderCmd.cpp, cgFx/cgfxShaderCmd.cpp, cgFx/cgfxShaderCmd.h, cleanPerFaceAssignment/cleanPerFaceAssignmentCmd.cpp, cleanPerFaceAssignment/cleanPerFaceAssignmentCmd.h, closestPointCmd/closestPointCmd.cpp, closestPointOnCurve/closestPointOnCurveCmd.cpp, closestPointOnCurve/closestPointOnCurveCmd.h, closestPointOnNurbsSurfaceCmd/closestPointOnNurbsSurfaceCmd.cpp, closestPointOnNurbsSurfaceCmd/closestPointOnNurbsSurfaceCmd.h, clusterWeightFunction/clusterWeightFunction.cpp, conditionTest/conditionTest.cpp, convertBumpCmd/convertBumpCmd.cpp, convertEdgesToFacesCmd/convertEdgesToFacesCmd.cpp, convertVerticesToEdgesCmd/convertVerticesToEdgesCmd.cpp, convertVerticesToFacesCmd/convertVerticesToFacesCmd.cpp, createClipCmd/createClipCmd.cpp, cvExpandCmd/cvExpandCmd.cpp, cvPosCmd/cvPosCmd.cpp, dagMessageCmd/dagMessageCmd.cpp, dagPoseInfoCmd/dagPoseInfoCmd.cpp, deletedMsgCmd/deletedMsgCmd.cpp, dx11Shader/dx11ShaderCmd.cpp, dx11Shader/dx11ShaderCmd.h, eventTest/eventTest.cpp, exportJointClusterDataCmd/exportJointClusterDataCmd.cpp, exportSkinClusterDataCmd/exportSkinClusterDataCmd.cpp, fileIOMsgCmd/fileIOMsgCmd.cpp, filteredAsciiFile/filteredAsciiFile.cpp, findFileTexturesCmd/findFileTexturesCmd.cpp, findTexturesPerPolygonCmd/findTexturesPerPolygonCmd.cpp, fluidInfoCmd/fluidInfoCmd.cpp, fragmentDumper/fragmentDumper.cpp, geometryCacheConverter/geometryCacheConverter.cpp, geometrySurfaceConstraint/geometrySurfaceConstraint.cpp, geometrySurfaceConstraint/geometrySurfaceConstraint.h, getAttrAffectsCmd/getAttrAffectsCmd.cpp, glslShader/GLSLShaderCmd.cpp, glslShader/GLSLShaderCmd.h, gpuCache/gpuCacheCmd.cpp, gpuCache/gpuCacheCmd.h, helix2Cmd/helix2Cmd.cpp, helixCmd/helixCmd.cpp, helixQtCmd.cpp, helixQtCmd.h, helixTool/helixTool.cpp, helloCmd/helloCmd.cpp, helloWorldCmd/helloWorldCmd.cpp, hlslShader/hlslShader.cpp, hlslShader/hlslShader.h, hwApiTextureTest/hwApiTextureTest.cpp, iffInfoCmd/iffInfoCmd.cpp, iffPixelCmd/iffPixelCmd.cpp, iffPpmCmd/iffPpmCmd.cpp, ik2Bsolver/ik2Bsolver.cpp, instanceCallbackCmd/instanceCallbackCmd.cpp, instancerListCmd/instancerListCmd.cpp, intersectCmd/intersectCmd.cpp, intersectOnNurbsSurfaceCmd/intersectOnNurbsSurfaceCmd.cpp, intersectOnNurbsSurfaceCmd/intersectOnNurbsSurfaceCmd.h, latticeNoise/latticeNoise.h, latticeNoise/latticeNoiseCmd.cpp, lensDistortionCallback/lensDistortionCallback.cpp, lensDistortionCallback/lensDistortionCallback.h, listLightLinksCmd/listLightLinksCmd.cpp, listPolyHolesCmd/listPolyHolesCmd.cpp, listRichSelectionCmd/listRichSelectionCmd.cpp, lockEvent/lockEvent.cpp, manipOverride/manipOverride.cpp, meshOpCmd/meshOpCmd.cpp, meshOpCmd/meshOpCmd.h, MetadataSample/createMetadataCmd.cpp, MetadataSample/createMetadataCmd.h, MetadataSample/metadataBase.cpp, MetadataSample/metadataBase.h, motionPathCmd/motionPathCmd.cpp, motionTraceCmd/motionTraceCmd.cpp, moveCurveCVsCmd/moveCurveCVsCmd.cpp, moveNumericTool/moveNumericTool.cpp, moveTool/moveTool.cpp, multiPlugInfoCmd/multiPlugInfoCmd.cpp, nodeCreatedCBCmd/nodeCreatedCBCmd.cpp, nodeCreatedCBCmd/nodeCreatedCBCmd.h, nodeIconCmd/nodeIconCmd.cpp, nodeInfoCmd/nodeInfoCmd.cpp, nodeMessageCmd/nodeMessageCmd.cpp, paintCallback/paintCallback.cpp, particlePathsCmd/particlePathsCmd.cpp, particleSystemInfoCmd/particleSystemInfoCmd.cpp, peltOverlapCmd/peltOverlapCmd.cpp, pfxInfoCmd/pfxInfoCmd.cpp, pickCmd/pickCmd.cpp, pointOnMeshInfo/pointOnMeshCmd.cpp, pointOnMeshInfo/pointOnMeshCmd.h, polyMessageCmd/polyMessageCmd.cpp, polyPrimitiveCmd/polyPrimitiveCmd.cpp, progressWindowCmd/progressWindowCmd.cpp, qtForms.cpp, qtForms.h, referenceQueryCmd/referenceQueryCmd.cpp, renderViewInteractiveRenderCmd/renderViewInteractiveRenderCmd.cpp, renderViewRenderCmd/renderViewRenderCmd.cpp, renderViewRenderRegionCmd/renderViewRenderRegionCmd.cpp, richMoveCmd/richMoveCmd.cpp, sampleCmd/sampleCmd.cpp, sampleParticles/sampleParticles.cpp, saveSwatchesCmd.cpp, saveSwatchesCmd.h, scanDagCmd/scanDagCmd.cpp, scanDagSyntax/scanDagSyntax.cpp, sceneAssembly/adskRepresentationCmd.cpp, sceneAssembly/adskRepresentationCmd.h, sceneAssembly/adskSceneMetadataCmd.cpp, sceneAssembly/adskSceneMetadataCmd.h, skinClusterWeights/skinClusterWeights.cpp, spiralAnimCurveCmd/spiralAnimCurveCmd.cpp, splitUVCmd/splitUVCmd.cpp, splitUVCmd/splitUVCmd.h, surfaceCreateCmd/surfaceCreateCmd.cpp, surfaceTwistCmd/surfaceTwistCmd.cpp, template/helloTemplateWorld/helloTemplateWorld.cpp, template/zoomCameraTemplate/zoomCameraTemplate.cpp, testCameraSetCmd/testCameraSetCmd.cpp, threadedBoundingBox/threadedBoundingBox.cpp, threadingLockTests/threadingLockTests.cpp, threadTestCmd/threadTestCmd.cpp, threadTestWithLocksCmd/threadTestWithLocksCmd.cpp, translateCmd/translateCmd.cpp, undoRedoMsgCmd/undoRedoMsgCmd.cpp, userMsgCmd/userMsgCmd.cpp, viewCallbackTest/viewCallbackTest.cpp, viewCaptureCmd/viewCaptureCmd.cpp, viewMRenderOverride/viewMRenderOverride.cpp, viewRenderOverrideFrameCache/viewRenderOverrideFrameCacheMain.cpp, viewRenderOverridePostColor/viewRenderOverridePostColorCmd.cpp, viewRenderOverridePostColor/viewRenderOverridePostColorCmd.h, volumeLightCmd/volumeLightCmd.cpp, whatisCmd/whatisCmd.cpp, workspaceControlCmd.cpp, workspaceControlCmd.h, and zoomCameraCmd/zoomCameraCmd.cpp.

Constructor & Destructor Documentation

MArgList ( const MArgList other)

The copy constructor.

Initialize a new arglist with the values from another arglist.

Parameters
[in]otherthe arglist to copy from.

Member Function Documentation

unsigned int length ( MStatus ReturnStatus = NULL) const

Returns the number of arguments in the arglist.

Parameters
[out]ReturnStatusthe return status
Returns
The number of arguments in the arglist.
Status Codes:
  • MS::kSuccess operation successful
Examples:
animInfoCmd/animInfoCmd.cpp, blindComplexDataCmd/blindComplexDataCmd.cpp, blindDoubleDataCmd/blindDoubleDataCmd.cpp, cameraSetSubclass/testExCameraSetCmd.cpp, cgFx/cgfxShaderCmd.cpp, closestPointCmd/closestPointCmd.cpp, convertBumpCmd/convertBumpCmd.cpp, createClipCmd/createClipCmd.cpp, cvPosCmd/cvPosCmd.cpp, dagPoseInfoCmd/dagPoseInfoCmd.cpp, exportJointClusterDataCmd/exportJointClusterDataCmd.cpp, exportSkinClusterDataCmd/exportSkinClusterDataCmd.cpp, findFileTexturesCmd/findFileTexturesCmd.cpp, fluidInfoCmd/fluidInfoCmd.cpp, fragmentDumper/fragmentDumper.cpp, getAttrAffectsCmd/getAttrAffectsCmd.cpp, helix2Cmd/helix2Cmd.cpp, helixCmd/helixCmd.cpp, hwApiTextureTest/hwApiTextureTest.cpp, iffInfoCmd/iffInfoCmd.cpp, iffPixelCmd/iffPixelCmd.cpp, iffPpmCmd/iffPpmCmd.cpp, intersectCmd/intersectCmd.cpp, latticeNoise/latticeNoiseCmd.cpp, lensDistortionCallback/lensDistortionCallback.cpp, listRichSelectionCmd/listRichSelectionCmd.cpp, meshOpCmd/meshOpCmd.cpp, motionTraceCmd/motionTraceCmd.cpp, moveNumericTool/moveNumericTool.cpp, moveTool/moveTool.cpp, particleSystemInfoCmd/particleSystemInfoCmd.cpp, pfxInfoCmd/pfxInfoCmd.cpp, pickCmd/pickCmd.cpp, pointOnMeshInfo/pointOnMeshCmd.cpp, polyPrimitiveCmd/polyPrimitiveCmd.cpp, richMoveCmd/richMoveCmd.cpp, sampleCmd/sampleCmd.cpp, sampleParticles/sampleParticles.cpp, saveSwatchesCmd.cpp, scanDagCmd/scanDagCmd.cpp, skinClusterWeights/skinClusterWeights.cpp, testCameraSetCmd/testCameraSetCmd.cpp, threadingLockTests/threadingLockTests.cpp, threadTestCmd/threadTestCmd.cpp, threadTestWithLocksCmd/threadTestWithLocksCmd.cpp, translateCmd/translateCmd.cpp, undoRedoMsgCmd/undoRedoMsgCmd.cpp, viewCallbackTest/viewCallbackTest.cpp, viewMRenderOverride/viewMRenderOverride.cpp, viewRenderOverrideFrameCache/viewRenderOverrideFrameCacheMain.cpp, volumeLightCmd/volumeLightCmd.cpp, and whatisCmd/whatisCmd.cpp.
bool 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]indexthe index of the desired argument
[out]ReturnStatusthe return status
Returns
The bool value of the indicated argument.
Status Codes:
  • MS::kSuccess operation successful
  • MS::kFailure operation failed
Examples:
cameraSetSubclass/testExCameraSetCmd.cpp, pointOnMeshInfo/pointOnMeshCmd.cpp, testCameraSetCmd/testCameraSetCmd.cpp, and volumeLightCmd/volumeLightCmd.cpp.
int 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]indexthe index of the desired argument
[out]ReturnStatusthe return status
Returns
The integer value of the indicated argument.
Status Codes:
  • MS::kSuccess operation successful
  • MS::kFailure operation failed
Examples:
blindComplexDataCmd/blindComplexDataCmd.cpp, cameraSetSubclass/testExCameraSetCmd.cpp, fluidInfoCmd/fluidInfoCmd.cpp, meshOpCmd/meshOpCmd.cpp, pointOnMeshInfo/pointOnMeshCmd.cpp, polyPrimitiveCmd/polyPrimitiveCmd.cpp, sampleCmd/sampleCmd.cpp, sampleParticles/sampleParticles.cpp, testCameraSetCmd/testCameraSetCmd.cpp, threadingLockTests/threadingLockTests.cpp, threadTestCmd/threadTestCmd.cpp, and threadTestWithLocksCmd/threadTestWithLocksCmd.cpp.
double 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]indexthe index of the desired argument
[out]ReturnStatusthe return status
Returns
The double value of the indicated argument.
Status Codes:
  • MS::kSuccess operation successful
  • MS::kFailure operation failed
Examples:
animInfoCmd/animInfoCmd.cpp, blindComplexDataCmd/blindComplexDataCmd.cpp, blindDoubleDataCmd/blindDoubleDataCmd.cpp, helix2Cmd/helix2Cmd.cpp, helixCmd/helixCmd.cpp, listRichSelectionCmd/listRichSelectionCmd.cpp, manipOverride/manipOverride.cpp, motionTraceCmd/motionTraceCmd.cpp, moveNumericTool/moveNumericTool.cpp, moveTool/moveTool.cpp, pointOnMeshInfo/pointOnMeshCmd.cpp, richMoveCmd/richMoveCmd.cpp, sampleCmd/sampleCmd.cpp, sampleParticles/sampleParticles.cpp, and volumeLightCmd/volumeLightCmd.cpp.
MString asString ( unsigned int  index,
MStatus ReturnStatus = NULL 
) const
MDistance 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]indexthe index of the desired argument
[out]ReturnStatusthe return status
Returns
The MDistance value of the indicated argument.
Status Codes:
  • MS::kSuccess operation successful
  • MS::kFailure operation failed
MAngle 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]indexthe index of the desired argument
[out]ReturnStatusthe return status
Returns
The MAngle value of the indicated argument.
Status Codes:
  • MS::kSuccess operation successful
  • MS::kFailure operation failed
MTime 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]indexthe index of the desired argument
[out]ReturnStatusthe return status
Returns
The MTime value of the indicated argument.
Status Codes:
  • MS::kSuccess operation successful
  • MS::kFailure operation failed
MVector 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,out]indexindex of the first argument to be used as an element of the vector. On success it will be updated to point to the last argument used to build the vector (i.e. incremented by numElements-1). On failure it will be updated to point to the argument where the failure occurred.
[in]numElementsdimension of the vector to be returned. This should not exceed 3, which is the maximum number of dimensions that an MVector can hold.
[out]ReturnStatusthe return status
Returns
The MVector value of the indicated argument.
Status Codes:
  • MS::kSuccess operation successful
  • MS::kFailure operation failed
Examples:
listRichSelectionCmd/listRichSelectionCmd.cpp, moveNumericTool/moveNumericTool.cpp, moveTool/moveTool.cpp, richMoveCmd/richMoveCmd.cpp, and translateCmd/translateCmd.cpp.
MPoint 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,out]indexindex of the first argument to be used as an element of the point. On success it will be updated to point to the last argument used to build the point (i.e. incremented by numElements-1). On failure it will be updated to point to the argument where the failure occurred.
[in]numElementsdimension of the point to be returned. This should not exceed 4, which is the maximum number of dimensions that an MPoint can hold.
[out]ReturnStatusthe return status
Returns
The MPoint value of the indicated argument.
Status Codes:
  • MS::kSuccess operation successful
  • MS::kFailure operation failed
MMatrix asMatrix ( unsigned int &  index,
MStatus ret = NULL 
) const

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

Parameters
[in,out]indexindex of the first argument to be used in building the matrix. On success it will be updated to point to the last argument used to build the matrix (i.e. it will be incremented by 15). On failure it will be updated to point to the argument where the failure occurred.
[out]retthe return status
Returns
The MMatrix value of the indicated argument.
Status Codes:
  • MS::kSuccess operation successful
  • MS::kFailure operation failed
MIntArray asIntArray ( unsigned int &  index,
MStatus ReturnStatus = NULL 
) const

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

Parameters
[in,out]indexindex of the first argument to be used in building the array. That argument will be taken as an integer count of the number of array elements which follow it. On success the index will be updated to point to the argument for the last array element (i.e. incremented by the number of elements). On failure it will be updated to point to the argument where the failure occurred.
[out]ReturnStatusAPI status code
Returns
MIntArray
MDoubleArray asDoubleArray ( unsigned int &  index,
MStatus ReturnStatus = NULL 
) const

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

Parameters
[in,out]indexindex of the first argument to be used in building the array. That argument will be taken as an integer count of the number of array elements which follow it. On success the index will be updated to point to the argument for the last array element (i.e. incremented by the number of elements). On failure it will be updated to point to the argument where the failure occurred.
[out]ReturnStatusAPI status code
Returns
MDoubleArray
Examples:
skinClusterWeights/skinClusterWeights.cpp.
const MStringArray asStringArray ( unsigned int &  index,
MStatus ReturnStatus = NULL 
) const

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

Parameters
[in,out]indexindex of the first argument to be used in building the array. That argument will be taken as an integer count of the number of array elements which follow it. On success the index will be updated to point to the argument for the last array element (i.e. incremented by the number of elements). On failure it will be updated to point to the argument where the failure occurred.
[out]ReturnStatusAPI status code
Returns
MStringArray
Examples:
skinClusterWeights/skinClusterWeights.cpp.
MArgList & operator= ( const MArgList other)

The assignment operator.

Allows assignment between MArgList instances.

Parameters
[in]otherThe object to copy from.
unsigned int flagIndex ( const char *  shortFlag,
const char *  longFlag = NULL 
) const

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

Parameters
[in]shortFlagthe short version of the flag
[in]longFlagthe int version of the flag (if any)
Returns
The unsigned int index of the indicated argument if it has been set, kInvalidArgIndex otherwise.
Examples:
cameraSetSubclass/testExCameraSetCmd.cpp, and testCameraSetCmd/testCameraSetCmd.cpp.
MStatus addArg ( bool  arg)

Add a new bool argument to the arglist.

Parameters
[in]argthe new bool argument
Returns
  • MS::kSuccess operation successful
  • MS::kInvalidParameter object is not writable
  • MS::kFailure operation failed
Examples:
helixTool/helixTool.cpp, listRichSelectionCmd/listRichSelectionCmd.cpp, manipOverride/manipOverride.cpp, moveNumericTool/moveNumericTool.cpp, moveTool/moveTool.cpp, and richMoveCmd/richMoveCmd.cpp.
MStatus addArg ( int  arg)

Add a new integer argument to the arglist.

Parameters
[in]argthe new integer argument
Returns
  • MS::kSuccess operation successful
  • MS::kInvalidParameter object is not writable
  • MS::kFailure operation failed
MStatus addArg ( double  arg)

Add a new double argument to the arglist.

Parameters
[in]argthe new double argument
Returns
  • MS::kSuccess operation successful
  • MS::kInvalidParameter object is not writable
  • MS::kFailure operation failed
MStatus addArg ( const MString arg)

Add a new MString argument to the arglist.

Parameters
[in]argthe new MString argument
Returns
  • MS::kSuccess operation successful
  • MS::kInvalidParameter object is not writable
  • MS::kFailure operation failed
MStatus addArg ( const MDistance arg)

Add a new MDistance argument to the arglist.

Parameters
[in]argthe new MDistance argument
Returns
  • MS::kSuccess operation successful
  • MS::kInvalidParameter object is not writable
  • MS::kFailure operation failed
MStatus addArg ( const MAngle arg)

Add a new MAngle argument to the arglist.

Parameters
[in]argthe new MAngle argument
Returns
  • MS::kSuccess operation successful
  • MS::kInvalidParameter object is not writable
  • MS::kFailure operation failed
MStatus addArg ( const MTime arg)

Add a new MTime argument to the arglist.

Parameters
[in]argthe new MTime argument
Returns
  • MS::kSuccess operation successful
  • MS::kInvalidParameter object is not writable
  • MS::kFailure operation failed
MStatus addArg ( const MVector arg)

Add a new MVector argument to the arglist.

Parameters
[in]argthe new MVector argument
Returns
  • MS::kSuccess operation successful
  • MS::kInvalidParameter object is not writable
  • MS::kFailure operation failed
MStatus addArg ( const MPoint arg)

Add a new MPoint argument to the arglist.

Parameters
[in]argthe new MPoint argument
Returns
  • MS::kSuccess operation successful
  • MS::kInvalidParameter object is not writable
  • MS::kFailure operation failed
MStatus get ( unsigned int  index,
int &  ret 
) const

This method is not available in Python.

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

Python Notes

Use asInt() instead.

Parameters
[in]indexthe index of the desired argument
[out]retthe integer value is returned in this argument.
Returns
  • MS::kSuccess operation successful
  • MS::kFailure operation failed
MStatus get ( unsigned int  index,
double &  ret 
) const

This method is not available in Python.

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

Python Notes

Use asDouble() instead.

Parameters
[in]indexthe index of the desired argument
[out]retthe double value is returned in this argument.
Returns
  • MS::kSuccess operation successful
  • MS::kFailure operation failed
MStatus get ( unsigned int  index,
MString ret 
) const

This method is not available in Python.

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

Python Notes

Use asString() instead.

Parameters
[in]indexthe index of the desired argument
[out]retthe MString value is returned in this argument.
Returns
  • MS::kSuccess operation successful
  • MS::kFailure operation failed
MStatus get ( unsigned int  index,
MDistance ret 
) const

This method is not available in Python.

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

Python Notes

Use asDistance() instead.

Parameters
[in]indexthe index of the desired argument
[out]retthe MDistance value is returned in this argument.
Returns
  • MS::kSuccess operation successful
  • MS::kFailure operation failed
MStatus get ( unsigned int  index,
MAngle ret 
) const

This method is not available in Python.

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

Python Notes

Use asAngle() instead.

Parameters
[in]indexthe index of the desired argument
[out]retthe MAngle value is returned in this argument.
Returns
  • MS::kSuccess operation successful
  • MS::kFailure operation failed
MStatus get ( unsigned int  index,
MTime ret 
) const

This method is not available in Python.

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

Python Notes

Use asTime() instead.

Parameters
[in]indexthe index of the desired argument
[out]retthe MTime value is returned in this argument.
Returns
  • MS::kSuccess operation successful
  • MS::kFailure operation failed
MStatus get ( unsigned int &  index,
MVector ret,
unsigned int  numElements = 3 
) const

This method is not available in Python.

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

Python Notes

Use asVector() instead.

Parameters
[in,out]indexindex of the first argument to be used as an element of the vector. On success it will be updated to point to the last argument used to build the vector (i.e. incremented by numElements-1). On failure it will be updated to point to the argument where the failure occurred.
[out]retthe MVector value is returned in this argument.
[in]numElementsdimension of the vector to be returned. This should not exceed 3, which is the maximum number of dimensions that an MVector can hold.
Returns
  • MS::kSuccess operation successful
  • MS::kFailure operation failed
MStatus get ( unsigned int &  index,
MPoint ret,
unsigned int  numElements = 3 
) const

This method is not available in Python.

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

Python Notes

Use asPoint() instead.

Parameters
[in,out]indexindex of the first argument to be used as an element of the point. On success it will be updated to point to the last argument used to build the point (i.e. incremented by numElements-1). On failure it will be updated to point to the argument where the failure occurred.
[out]retthe MPoint value is returned in this argument.
[in]numElementsdimension of the point to be returned. This should not exceed 4, which is the maximum number of dimensions that an MPoint can hold.
Returns
  • MS::kSuccess operation successful
  • MS::kFailure operation failed
MStatus get ( unsigned int &  index,
MMatrix ret 
) const

This method is not available in Python.

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

Python Notes

Use asMatrix() instead.

Parameters
[in,out]indexindex of the first argument to be used in building the matrix. On success it will be updated to point to the last argument used to build the matrix (i.e. it will be incremented by 15). On failure it will be updated to point to the argument where the failure occurred.
[out]retthe MMatrix value is returned in this argument.
Returns
  • MS::kSuccess operation successful
  • MS::kFailure operation failed
MStatus get ( unsigned int &  index,
MIntArray ret 
) const

This method is not available in Python.

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

Python Notes

Use asIntArray() instead.

Parameters
[in,out]indexindex of the first argument to be used in building the array. That argument will be taken as an integer count of the number of array elements which follow it. On success the index will be updated to point to the argument for the last array element (i.e. incremented by the number of elements). On failure it will be updated to point to the argument where the failure occurred.
[out]retthe MIntArray value is returned in this argument.
Returns
  • MS::kSuccess operation successful
  • MS::kFailure operation failed
MStatus get ( unsigned int &  index,
MDoubleArray ret 
) const

This method is not available in Python.

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

Python Notes

Use asDoubleArray() instead.

Parameters
[in,out]indexindex of the first argument to be used in building the array. That argument will be taken as an integer count of the number of array elements which follow it. On success the index will be updated to point to the argument for the last array element (i.e. incremented by the number of elements). On failure it will be updated to point to the argument where the failure occurred.
[out]retthe MDoubleArray value is returned in this argument.
Returns
  • MS::kSuccess operation successful
  • MS::kFailure operation failed
MStatus get ( unsigned int &  index,
MStringArray ret 
) const

This method is not available in Python.

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

Python Notes

Use asStringArray() instead.

Parameters
[in,out]indexindex of the first argument to be used in building the array. That argument will be taken as an integer count of the number of array elements which follow it. On success the index will be updated to point to the argument for the last array element (i.e. incremented by the number of elements). On failure it will be updated to point to the argument where the failure occurred.
[out]retthe MStringArray value is returned in this argument.
Returns
  • MS::kSuccess operation successful
  • MS::kFailure operation failed
const char * className ( )
static

Returns the name of this class.

Returns
Name of this class.

Friends And Related Function Documentation

OPENMAYA_EXPORT std::ostream& operator<< ( std::ostream &  os,
const MArgList args 
)
friend

This method is not available in Python.

The output is each string in the list, separated by spaces (and unquoted).

Parameters
[in]osthe ostream to print to
[in]argsthe MArgList whose contents are to be printed
Returns
The ostream reference, s, provided as the first parameter.

The documentation for this class was generated from the following files: