C++ API Reference

Manipulate Maya Status codes. More...

#include <MStatus.h>

Public Types

enum  MStatusCode {
  kSuccess = 0, kFailure, kInsufficientMemory, kInvalidParameter,
  kLicenseFailure, kUnknownParameter, kNotImplemented, kNotFound,
  kEndOfFile
}
 Available Status Codes. More...
 

Public Member Functions

 MStatus ()
 The default class constructor. More...
 
 MStatus (MStatusCode)
 The constructor that takes a MStatus::MStatusCode. More...
 
 MStatus (const MStatus &)
 The copy constructor of the class. More...
 
MStatusoperator= (const MStatus &rhs)
 The copy operator of the class. More...
 
bool operator== (const MStatus &rhs) const
 The equivalence operator that takes another MStatus object. More...
 
bool operator== (const MStatusCode rhs) const
 The equivalence operator that takes a MStatus::MStatusCode. More...
 
bool operator!= (const MStatus &rhs) const
 The not equal operator for MStatus. More...
 
bool operator!= (const MStatusCode rhs) const
 The not equal operator that takes a MStatus::MStatusCode. More...
 
bool error () const
 Determines whether there is an error. More...
 
void clear ()
 Clear error codes from the MStatus instance. More...
 
MStatusCode statusCode () const
 Retrieve the type of error that occurred, as specified in the MStatusCode enumeration. More...
 
MString errorString () const
 This method returns the internal error message as a MString object. More...
 
void perror (const char *) const
 This method prints the error string preceded by a string supplied by the user to the standard error stream. More...
 
void pAPIerror (const char *file, int line) const
 This method prints the API error string to the standard error stream. More...
 
void perror (const MString &) const
 The second version of the perror() method. More...
 
void set (bool status, unsigned char statusCode, unsigned char internalStatusCode)
 Internal use only. More...
 
void setSuccess ()
 The method is called interally by Maya to set the status as success. More...
 
 operator bool () const
 NO SCRIPT SUPPORT. More...
 

Friends

OPENMAYA_EXPORT std::ostream & operator<< (std::ostream &, MStatus &)
 NO SCRIPT SUPPORT. More...
 
OPENMAYA_EXPORT bool operator== (const MStatus::MStatusCode code, const MStatus &status)
 NO SCRIPT SUPPORT.
 
OPENMAYA_EXPORT bool operator!= (const MStatus::MStatusCode code, const MStatus &status)
 NO SCRIPT SUPPORT.
 

Detailed Description

Manipulate Maya Status codes.

This class facilitates API level error handling. It encapsulates the status code and the internal MAYA error code as return by API functions. The user can query, set, print the error code along with the error description.

Examples:
AbcBullet/AbcBullet.cpp, AbcBullet/AbcBullet.h, AbcBullet/AbcWriteJob.cpp, AbcBullet/AttributesWriter.cpp, AbcBullet/MayaTransformCollectionWriter.cpp, AbcBullet/MayaTransformWriter.cpp, AbcBullet/MayaUtility.cpp, AbcBullet/MayaUtility.h, AbcExport/AbcExport.cpp, AbcExport/AbcExport.h, AbcExport/AbcWriteJob.cpp, AbcExport/AttributesWriter.cpp, AbcExport/MayaCameraWriter.cpp, AbcExport/MayaLocatorWriter.cpp, AbcExport/MayaMeshWriter.cpp, AbcExport/MayaNurbsCurveWriter.cpp, AbcExport/MayaNurbsSurfaceWriter.cpp, AbcExport/MayaUtility.cpp, AbcExport/MayaUtility.h, AbcImport/AbcImport.cpp, AbcImport/AbcImport.h, AbcImport/AbcImportStrings.cpp, AbcImport/AbcImportStrings.h, AbcImport/AlembicImportFileTranslator.cpp, AbcImport/AlembicImportFileTranslator.h, AbcImport/AlembicNode.cpp, AbcImport/AlembicNode.h, AbcImport/CreateSceneHelper.cpp, AbcImport/CreateSceneHelper.h, AbcImport/LocatorHelper.cpp, AbcImport/main.cpp, AbcImport/MeshHelper.cpp, AbcImport/NodeIteratorVisitorHelper.cpp, AbcImport/NurbsCurveHelper.cpp, AbcImport/NurbsCurveHelper.h, AbcImport/NurbsSurfaceHelper.cpp, AbcImport/PointHelper.cpp, AbcImport/PointHelper.h, AbcImport/util.cpp, AbcImport/util.h, AbcImport/XformHelper.cpp, AbcImport/XformHelper.h, affectsNode/affectsNode.cpp, animCubeNode/animCubeNode.cpp, animExportUtil/animExportUtil.cpp, animExportUtil/animExportUtil.h, animExportUtil/animFileExport.cpp, animImportExport/animFileUtils.cpp, animImportExport/animFileUtils.h, animImportExport/animImportExport.cpp, animImportExport/animImportExport.h, animInfoCmd/animInfoCmd.cpp, anisotropicShader/anisotropicShader.cpp, apiDirectionalLightShape/apiDirectionalLightShape.cpp, apiDirectionalLightShape/apiDirectionalLightShape.h, apiMeshShape/apiMeshCreator.cpp, apiMeshShape/apiMeshCreator.h, apiMeshShape/apiMeshData.cpp, apiMeshShape/apiMeshData.h, apiMeshShape/apiMeshGeometryOverride.cpp, apiMeshShape/apiMeshGeometryOverride.h, apiMeshShape/apiMeshShape.cpp, apiMeshShape/apiMeshShape.h, apiMeshShape/apiMeshSubSceneOverride.cpp, apiMeshShape/apiMeshSubSceneOverride.h, arcLenNode/arcLenNode.cpp, atomImportExport/atomAnimLayers.cpp, atomImportExport/atomAnimLayers.h, atomImportExport/atomFileUtils.cpp, atomImportExport/atomFileUtils.h, atomImportExport/atomImportExport.cpp, atomImportExport/atomImportExport.h, atomImportExport/atomNodeNameReplacer.cpp, autoLoader/autoLoader.cpp, autoLoader/moduleLogic.cpp, autoLoader/moduleLogicCmd.cpp, autoLoader/moduleLogicCmd.h, autoLoader/threadData.cpp, autoLoader/threadData.h, backfillShader/backfillShader.cpp, basicBlendShape/basicBlendShape.cpp, basicBlendShapeDeformer/basicBlendShapeDeformer.cpp, basicMorphNode/basicMorphNode.cpp, basicSkinCluster/basicSkinCluster.cpp, blast2Cmd/blast2Cmd.cpp, blindComplexDataCmd/blindComplexDataCmd.cpp, blindDataShader/blindDataMesh.cpp, blindDataShader/blindDataMesh.h, blindDataShader/blindDataMeshVertexBufferGenerator.cpp, blindDataShader/blindDataPluginMain.cpp, blindDataShader/blindDataShader.cpp, blindDataShader/blindDataShader.h, blindDoubleDataCmd/blindDoubleDataCmd.cpp, blindShortDataCmd/blindShortDataCmd.cpp, brickShader/brickShader.cpp, buildRotationNode/buildRotationNode.cpp, cameraMessageCmd/cameraMessageCmd.cpp, cameraSetSubclass/exCameraSet.cpp, cameraSetSubclass/exCameraSet.h, cameraSetSubclass/testExCameraSetCmd.cpp, cameraSetSubclass/testExCameraSetCmd.h, captureViewRenderCmd/captureViewRenderCmd.cpp, cellShader/cellShader.cpp, cgFx/cgfxAttrDef.cpp, cgFx/cgfxFindImage.cpp, cgFx/cgfxProfile.cpp, cgFx/cgfxShaderCmd.cpp, cgFx/cgfxShaderCmd.h, cgFx/cgfxShaderNode.cpp, cgFx/cgfxShaderNode.h, cgFx/cgfxTextureCache.cpp, cgFx/cgfxVector.cpp, cgFx/cgfxVector.h, cgFx/pluginMain.cpp, checkerShader/checkerShader.cpp, circleNode/circleNode.cpp, cleanPerFaceAssignment/cleanPerFaceAssignmentCmd.cpp, cleanPerFaceAssignment/cleanPerFaceAssignmentCmd.h, cleanPerFaceAssignment/cleanPerFaceAssignmentPluginMain.cpp, clearcoat.cpp, closestPointCmd/closestPointCmd.cpp, closestPointOnCurve/closestPointOnCurveCmd.cpp, closestPointOnCurve/closestPointOnCurveCmd.h, closestPointOnCurve/closestPointOnCurveNode.cpp, closestPointOnCurve/closestPointOnCurveNode.h, closestPointOnCurve/closestPointOnCurvePlugin.cpp, closestPointOnNurbsSurfaceCmd/closestPointOnNurbsSurfaceCmd.cpp, closestPointOnNurbsSurfaceCmd/closestPointOnNurbsSurfaceCmd.h, clusterWeightFunction/clusterWeightFunction.cpp, colorTransformData/colorTransformData.cpp, componentScaleManip/componentScaleManip.cpp, compositingShader/compositingShader.cpp, conditionTest/conditionTest.cpp, constraintEvaluator/constraintEvaluator.cpp, contrastShader/contrastShader.cpp, convertBumpCmd/convertBumpCmd.cpp, convertEdgesToFacesCmd/convertEdgesToFacesCmd.cpp, convertVerticesToEdgesCmd/convertVerticesToEdgesCmd.cpp, convertVerticesToFacesCmd/convertVerticesToFacesCmd.cpp, createClipCmd/createClipCmd.cpp, customAttrManip/customAttrManip.cpp, customComponentTagNode/customComponentTagNode.cpp, customImagePlane/customImagePlane.cpp, customPrimitiveGenerator/customPrimitiveGenerator.cpp, customSpriteShader/customSpriteShader.cpp, customTextureShader/customTextureShader.cpp, customTextureShader/customTextureShader.h, customTextureShader/customTextureShaderMainMaya.cpp, cvColorNode/cvColorNode.cpp, cvExpandCmd/cvExpandCmd.cpp, cvPosCmd/cvPosCmd.cpp, dagMessageCmd/dagMessageCmd.cpp, dagPoseInfoCmd/dagPoseInfoCmd.cpp, ddsFloatReader.cpp, deletedMsgCmd/deletedMsgCmd.cpp, depthShader/depthShader.cpp, displacementShader/displacementShader.cpp, dx11Shader/dx11ConeAngleToHotspotConverter.cpp, dx11Shader/dx11ConeAngleToHotspotConverter.h, dx11Shader/dx11Shader.cpp, dx11Shader/dx11Shader.h, dx11Shader/dx11ShaderCmd.cpp, dx11Shader/dx11ShaderCmd.h, dx11Shader/dx11ShaderCompileHelper.cpp, dx11Shader/dx11ShaderPluginMain.cpp, dx11Shader/dx11ShaderStrings.cpp, dx11Shader/dx11ShaderStrings.h, dynExprField/dynExprField.cpp, dynExprField/dynExprField.h, evaluationPruningEvaluator/evaluationPruningEvaluator.cpp, eventTest/eventTest.cpp, exampleFalloff/falloffsplugin.cpp, exampleFalloff/smoothFalloffNode.cpp, exampleFalloff/smoothFalloffNode.h, exampleRampAttribute/exampleMRampAttribute.cpp, exportJointClusterDataCmd/exportJointClusterDataCmd.cpp, exportSkinClusterDataCmd/exportSkinClusterDataCmd.cpp, externalDropCallback/externalDropCallback.cpp, fileIOMsgCmd/fileIOMsgCmd.cpp, fileTexture/fileTexture.cpp, filteredAsciiFile/filteredAsciiFile.cpp, findFileTexturesCmd/findFileTexturesCmd.cpp, findTexturesPerPolygonCmd/findTexturesPerPolygonCmd.cpp, flameShader/flameShader.cpp, flipUVCmd/flipUVCmd.cpp, flipUVCmd/flipUVCmd.h, flipUVCmd/flipUVMain.cpp, fluidInfoCmd/fluidInfoCmd.cpp, footPrintManip/footPrintManip.cpp, footPrintNode/footPrintNode.cpp, footPrintNode_AnimatedMaterial/footPrintNode_GeometryOverride_AnimatedMaterial.cpp, footPrintNode_GeometryOverride/footPrintNode_GeometryOverride.cpp, footPrintNode_SubSceneOverride/footPrintNode_SubSceneOverride.cpp, fragmentDumper/fragmentDumper.cpp, fullLoftNode/fullLoftNode.cpp, gameInputDevice/gameInputDevice.cpp, gammaShader/gammaShader.cpp, genericAttributeNode/genericAttributeNode.cpp, geometryCacheConverter/geometryCacheConverter.cpp, geometryCacheConverter/geometryCacheFile.cpp, geometryCacheConverter/geometryCacheFile.h, geometryOverrideExample1/geometryOverrideExample1.cpp, geometryOverrideExample1/geometryOverrideExample1.h, geometryOverrideExample2/geometryOverrideExample2.cpp, geometryOverrideExample2/geometryOverrideExample2.h, geometryReplicator/geometryReplicator.cpp, geometrySurfaceConstraint/geometrySurfaceConstraint.cpp, geometrySurfaceConstraint/geometrySurfaceConstraint.h, geometrytools.cpp, geomShader/geomShader.cpp, getAttrAffectsCmd/getAttrAffectsCmd.cpp, glslShader/GLSLShader.cpp, glslShader/GLSLShader.h, glslShader/GLSLShaderCmd.cpp, glslShader/GLSLShaderCmd.h, glslShader/GLSLShaderMainMaya.cpp, glslShader/GLSLShaderStrings.cpp, glslShader/GLSLShaderStrings.h, gpuCache/CacheReaderAlembic.cpp, gpuCache/CacheWriter.cpp, gpuCache/CacheWriterAlembic.cpp, gpuCache/gpuCacheCmd.cpp, gpuCache/gpuCacheCmd.h, gpuCache/gpuCacheDrawOverride.cpp, gpuCache/gpuCacheMaterialBakers.cpp, gpuCache/gpuCacheMaterialBakers.h, gpuCache/gpuCachePluginMain.cpp, gpuCache/gpuCacheShapeNode.cpp, gpuCache/gpuCacheShapeNode.h, gpuCache/gpuCacheSpatialSubdivision.cpp, gpuCache/gpuCacheSpatialSubdivision.h, gpuCache/gpuCacheSubSceneOverride.cpp, gpuCache/gpuCacheUtil.cpp, gpuCache/gpuCacheUtil.h, grabUVMain.cpp, hairCollisionSolver/hairCollisionSolver.cpp, helix2Cmd/helix2Cmd.cpp, helixCmd/helixCmd.cpp, helixQtCmd.cpp, helixQtCmd.h, helixTool/helixTool.cpp, helloCmd/helloCmd.cpp, helloWorldCmd/helloWorldCmd.cpp, hlslShader/hlslPluginMain.cpp, hlslShader/hlslShader.cpp, hlslShader/hlslShader.h, hwApiTextureTest/hwApiTextureTest.cpp, hwApiTextureTest/hwApiTextureTestStrings.cpp, hwApiTextureTest/hwApiTextureTestStrings.h, hwPhongShader/hwPhongShader.cpp, hwPhongShader/hwPhongShader.h, hwPhongShader/hwPhongShaderBehavior.cpp, hwPhongShader/hwPhongShaderBehavior.h, identityGeomFilter/identityGeomFilter.cpp, identityNode/identityNode.cpp, iffInfoCmd/iffInfoCmd.cpp, iffInfoCmd/iffreader.cpp, iffInfoCmd/iffreader.h, iffPixelCmd/iffPixelCmd.cpp, iffPixelCmd/iffreader.cpp, iffPixelCmd/iffreader.h, iffPpmCmd/iffPpmCmd.cpp, iffPpmCmd/iffreader.cpp, iffPpmCmd/iffreader.h, ik2Bsolver/ik2Bsolver.cpp, instanceCallbackCmd/instanceCallbackCmd.cpp, instancerListCmd/instancerListCmd.cpp, interpPlugins/interpPlugins.cpp, interpShader/interpShader.cpp, interpZero/interpZero.cpp, intersectCmd/intersectCmd.cpp, intersectOnNurbsSurfaceCmd/intersectOnNurbsSurfaceCmd.cpp, intersectOnNurbsSurfaceCmd/intersectOnNurbsSurfaceCmd.h, jitterNode/jitterNode.cpp, lambertShader/lambertShader.cpp, lassoTool/lassoTool.cpp, latticeNoise/latticeNoise.cpp, latticeNoise/latticeNoise.h, latticeNoise/latticeNoiseCmd.cpp, latticeNoise/latticeNoiseNode.cpp, lavaShader/lavaShader.cpp, lensDistortionCallback/lensDistortionCallback.cpp, lensDistortionCallback/lensDistortionCallback.h, lepTranslator/lepTranslator.cpp, lightShader/lightShader.cpp, lineManip/lineManip.cpp, lineManip/lineManip.h, lineManipContainer/lineManipContainer.cpp, lineManipContainer/lineManipContainer.h, listLightLinksCmd/listLightLinksCmd.cpp, listPolyHolesCmd/listPolyHolesCmd.cpp, listRichSelectionCmd/listRichSelectionCmd.cpp, lockEvent/lockEvent.cpp, manipOverride/customTriadManip.cpp, manipOverride/customTriadManip.h, manipOverride/manipOverride.cpp, manipOverride/rockingTransform2.cpp, manipOverride/rockingTransform2.h, marqueeTool/marqueeTool.cpp, maTranslator/maTranslator.cpp, MayaPluginForSpreticle/spReticleLoc.cpp, MayaPluginForSpreticle/spReticleLoc.h, meshOpCmd/meshOpCmd.cpp, meshOpCmd/meshOpCmd.h, meshOpCmd/meshOpFty.h, meshOpCmd/meshOpFtyAction.cpp, meshOpCmd/meshOpMain.cpp, meshOpCmd/meshOpNode.cpp, meshOpCmd/meshOpNode.h, meshOpCmd/polyModifierCmd.cpp, meshOpCmd/polyModifierCmd.h, meshOpCmd/polyModifierFty.h, MetadataSample/cmdUtils.h, MetadataSample/createMetadataCmd.cpp, MetadataSample/createMetadataCmd.h, MetadataSample/exportMetadataCmd.cpp, MetadataSample/exportMetadataCmd.h, MetadataSample/importMetadataCmd.cpp, MetadataSample/importMetadataCmd.h, MetadataSample/metadataBase.cpp, MetadataSample/metadataBase.h, MetadataSample/metadataPlugin.cpp, MetadataSample/tweakMetadataNode.cpp, MetadataSample/tweakMetadataNode.h, MetadataXML/associationsSerializerXML.cpp, MetadataXML/channelSerializerXML.cpp, MetadataXML/metadataXMLPlugin.cpp, MetadataXML/streamSerializerXML.cpp, MetadataXML/structureSerializerXML.cpp, mixtureShader/mixtureShader.cpp, motionPathCmd/motionPathCmd.cpp, motionPathNode/motionPathNode.cpp, motionTraceCmd/motionTraceCmd.cpp, moveCurveCVsCmd/moveCurveCVsCmd.cpp, moveManip/moveManip.cpp, moveNumericTool/moveNumericTool.cpp, moveTool/moveTool.cpp, multiCurveNode/multiCurveNode.cpp, multiPlugInfoCmd/multiPlugInfoCmd.cpp, nameFilter/NameFilter.cpp, narrowPolyRenderOverride/narrowPolyRenderOverride.cpp, narrowPolyRenderOverride/narrowPolyRenderOverride.h, narrowPolyRenderOverride/narrowPolyRenderOverrideMain.cpp, nodeCreatedCBCmd/nodeCreatedCBCmd.cpp, nodeCreatedCBCmd/nodeCreatedCBCmd.h, nodeIconCmd/nodeIconCmd.cpp, nodeInfoCmd/nodeInfoCmd.cpp, nodeMessageCmd/nodeMessageCmd.cpp, noiseShader/noiseShader.cpp, objExport/objExport.cpp, offsetNode/offsetNode.cpp, onbShader/onbShader.cpp, onbShader/onbShaderOverride.cpp, onbShader/onbShaderOverride.h, OpenEXR.cpp, ownerEmitter/ownerEmitter.cpp, ownerEmitter/ownerEmitter.h, paintCallback/paintCallback.cpp, particleAttrNode/particleAttrNode.cpp, particleAttrNode/particleAttrNode.h, particleAttrNode/particleAttrNodeMain.cpp, particlePathsCmd/particlePathsCmd.cpp, particleSystemInfoCmd/particleSystemInfoCmd.cpp, peltOverlapCmd/peltOverlapCmd.cpp, pfxInfoCmd/pfxInfoCmd.cpp, phongShader/phongShader.cpp, phongShader/phongShaderOverride.cpp, pickCmd/pickCmd.cpp, pluginCallbacks/pluginCallbacks.cpp, pointManip/pointManip.cpp, pointManip/pointManip.h, pointOnMeshInfo/pointOnMeshCmd.cpp, pointOnMeshInfo/pointOnMeshCmd.h, pointOnMeshInfo/pointOnMeshInfoNode.cpp, pointOnMeshInfo/pointOnMeshInfoNode.h, pointOnMeshInfo/pointOnMeshInfoPlugin.cpp, pointOnSubdNode/pointOnSubdNode.cpp, pointOnSubdNode/pointOnSubdNode.h, polyMessageCmd/polyMessageCmd.cpp, polyPrimitiveCmd/polyPrimitiveCmd.cpp, polyRawExporter/polyExporter.cpp, polyRawExporter/polyExporter.h, polyRawExporter/polyRawExporter.cpp, polyRawExporter/polyRawExporter.h, polyRawExporter/polyRawWriter.cpp, polyRawExporter/polyRawWriter.h, polyRawExporter/polyWriter.cpp, polyRawExporter/polyWriter.h, polyTrgNode/polyTrgNode.cpp, polyX3DExporter/polyExporter.cpp, polyX3DExporter/polyExporter.h, polyX3DExporter/polyWriter.cpp, polyX3DExporter/polyWriter.h, polyX3DExporter/polyX3DExporter.cpp, polyX3DExporter/polyX3DExporter.h, polyX3DExporter/polyX3DWriter.cpp, polyX3DExporter/polyX3DWriter.h, progressWindowCmd/progressWindowCmd.cpp, qtForms.cpp, qtForms.h, randomizerDevice/randomizerDevice.cpp, rawfootPrintNode/rawfootPrintNode.cpp, referenceQueryCmd/referenceQueryCmd.cpp, renderAccessNode/renderAccessNode.cpp, renderViewInteractiveRenderCmd/renderViewInteractiveRenderCmd.cpp, renderViewRenderCmd/renderViewRenderCmd.cpp, renderViewRenderRegionCmd/renderViewRenderRegionCmd.cpp, richMoveCmd/richMoveCmd.cpp, richSelectionTool/richSelectionTool.cpp, rockingTransform/rockingTransform.cpp, rockingTransform/rockingTransform.h, rockingTransform/rockingTransformMain.cpp, rockingTransformCheck/rockingTransform.cpp, rockingTransformCheck/rockingTransform.h, rockingTransformCheck/rockingTransformCheck.cpp, rockingTransformCheck/rockingTransformCheck.h, rockingTransformCheck/rockingTransformCheckMain.cpp, rotateManip/rotateManip.cpp, sampleCmd/sampleCmd.cpp, sampleParticles/sampleParticles.cpp, saveSwatchesCmd.cpp, saveSwatchesCmd.h, scanDagCmd/scanDagCmd.cpp, scanDagSyntax/scanDagSyntax.cpp, sceneAssembly/adskPrepareRenderGlobals.cpp, sceneAssembly/adskPrepareRenderGlobals.h, sceneAssembly/adskRepresentationCmd.cpp, sceneAssembly/adskRepresentationCmd.h, sceneAssembly/adskRepresentations.cpp, sceneAssembly/adskSceneMetadataCmd.cpp, sceneAssembly/adskSceneMetadataCmd.h, sceneAssembly/assemblyDefinition.cpp, sceneAssembly/assemblyDefinition.h, sceneAssembly/assemblyReference.cpp, sceneAssembly/assemblyReference.h, sceneAssembly/assemblyReferenceInitialRep.cpp, sceneAssembly/sceneAssemblyPluginMain.cpp, shadowMatteShader/shadowMatteShader.cpp, shellNode/shellNode.cpp, shiftNode/shiftNode.cpp, simpleEmitter/simpleEmitter.cpp, simpleEmitter/simpleEmitter.h, simpleEvaluationDraw/simpleEvaluationDraw.cpp, simpleEvaluationNode/simpleEvaluationNode.cpp, simpleEvaluator/simpleEvaluator.cpp, simpleFluidEmitter/simpleFluidEmitter.cpp, simpleFluidEmitter/simpleFluidEmitter.h, simpleImageFile/simpleImageFile.cpp, simpleLoftNode/simpleLoftNode.cpp, simpleNoiseShader/simpleNoiseShader.cpp, simpleNoiseShader/simpleNoiseShaderOverride.cpp, simpleNoiseShader/simpleNoiseShaderOverride.h, simplePhysicsEngine/simplePhysicsEngine.cpp, simpleSimulationNode/simpleSimulationNode.cpp, simpleSkipNode/simpleSkipNode.cpp, simpleSolverNode/simpleSolverNode.cpp, simpleSpring/simpleSpring.cpp, simpleSpring/simpleSpring.h, sineNode/sineNode.cpp, skinClusterWeights/skinClusterWeights.cpp, slopeShader/slopeShader.cpp, slopeShader/slopeShaderBehavior.cpp, slopeShader/slopeShaderBehavior.h, slopeShader/slopeShaderNode.cpp, slopeShader/slopeShaderNode.h, solidCheckerShader/solidCheckerShader.cpp, spiralAnimCurveCmd/spiralAnimCurveCmd.cpp, splatDeformer/splatDeformer.cpp, splitUVCmd/polyModifierCmd.cpp, splitUVCmd/polyModifierCmd.h, splitUVCmd/polyModifierFty.h, splitUVCmd/splitUVCmd.cpp, splitUVCmd/splitUVCmd.h, splitUVCmd/splitUVFty.h, splitUVCmd/splitUVFtyAction.cpp, splitUVCmd/splitUVMain.cpp, splitUVCmd/splitUVNode.cpp, splitUVCmd/splitUVNode.h, squareScaleManip/squareScaleManip.cpp, squareScaleManip/squareScaleManip.h, squareScaleManipContext/squareScaleManipContext.cpp, squareScaleManipContext/squareScaleManipContext.h, squaresNode_noDepthTest/squaresNode_noDepthTest.cpp, sseDeformer/sseDeformer.cpp, stringFormatNode/stringFormatNode.cpp, surfaceBumpManip/surfaceBumpManip.cpp, surfaceCreateCmd/surfaceCreateCmd.cpp, surfaceTwistCmd/surfaceTwistCmd.cpp, sweptEmitter/sweptEmitter.cpp, sweptEmitter/sweptEmitter.h, swissArmyManip/swissArmyManip.cpp, template/createTransformNodeTemplate/createTransformNodeTemplate.cpp, template/helloTemplateWorld/helloTemplateWorld.cpp, template/zoomCameraTemplate/zoomCameraTemplate.cpp, tessellatedQuad/TessellatedQuadNode.cpp, tessellatedQuad/TessellatedQuadNode.h, testCameraSetCmd/testCameraSetCmd.cpp, testMTopologyEvaluator/testMTopologyEvaluator.cpp, testMTopologyEvaluator/testMTopologyEvaluator.h, testNobjectNode/testNobjectNode.cpp, testNobjectNode/testNobjectNode.h, testNpassiveNode/testNpassiveNode.cpp, testNpassiveNode/testNpassiveNode.h, testNsolverNode/testNsolverNode.cpp, testNsolverNode/testNsolverNode.h, testNucleusNode/testNucleusNode.cpp, testNucleusNode/testNucleusNode.h, threadedBoundingBox/threadedBoundingBox.cpp, threadingLockTests/threadingLockTests.cpp, threadTestCmd/threadTestCmd.cpp, threadTestWithLocksCmd/threadTestWithLocksCmd.cpp, tiffFloatReader.cpp, topologyTrackingNode/topologyTrackingNode.cpp, torusField/torusField.cpp, torusField/torusField.h, transCircleNode/transCircleNode.cpp, transformDrawNode/transformDrawNode.cpp, translateCmd/translateCmd.cpp, udpDevice/udpDevice.cpp, uiDrawManager/uiDrawManager.cpp, undoRedoMsgCmd/undoRedoMsgCmd.cpp, userMsgCmd/userMsgCmd.cpp, vertexBufferGenerator/vertexBufferGenerator.cpp, vertexBufferMutator/vertexBufferMutator.cpp, viewCallbackTest/viewCallbackTest.cpp, viewCaptureCmd/viewCaptureCmd.cpp, viewDX11DeviceAccess/viewDX11DeviceAccess.cpp, viewImageBlitOverride/viewImageBlitOverride.cpp, viewImageBlitOverride/viewImageBlitOverride.h, viewImageBlitOverride/viewImageBlitOverrideMain.cpp, viewMRenderOverride/viewMRenderOverride.cpp, viewObjectFilter/viewObjectFilter.cpp, viewObjectSetOverride/viewObjectSetOverride.cpp, viewOverrideSimple/viewOverrideSimple.cpp, viewOverrideSimple/viewOverrideSimple.h, viewOverrideSimple/viewOverrideSimpleMain.cpp, viewOverrideTrackTexture/viewOverrideTrackTexture.cpp, viewOverrideTrackTexture/viewOverrideTrackTexture.h, viewOverrideTrackTexture/viewOverrideTrackTextureMain.cpp, viewRenderOverride/viewRenderOverride.cpp, viewRenderOverride/viewRenderOverride.h, viewRenderOverride/viewRenderOverrideMain.cpp, viewRenderOverride/viewRenderOverrideOperations.cpp, viewRenderOverride/viewRenderOverrideUserOperation.cpp, viewRenderOverrideFrameCache/viewRenderOverrideFrameCache.cpp, viewRenderOverrideFrameCache/viewRenderOverrideFrameCache.h, viewRenderOverrideFrameCache/viewRenderOverrideFrameCacheMain.cpp, viewRenderOverrideMRT/viewRenderOverrideMRT.cpp, viewRenderOverrideMRT/viewRenderOverrideMRT.h, viewRenderOverrideMRT/viewRenderOverrideMRTMain.cpp, viewRenderOverridePointLightShadows/viewRenderOverridePointLightShadows.cpp, viewRenderOverridePointLightShadows/viewRenderOverridePointLightShadows.h, viewRenderOverridePointLightShadows/viewRenderOverridePointLightShadowsMain.cpp, viewRenderOverridePostColor/viewRenderOverridePostColor.cpp, viewRenderOverridePostColor/viewRenderOverridePostColor.h, viewRenderOverridePostColor/viewRenderOverridePostColorCmd.cpp, viewRenderOverridePostColor/viewRenderOverridePostColorCmd.h, viewRenderOverridePostColor/viewRenderOverridePostColorMain.cpp, viewRenderOverrideShadows/viewRenderOverrideShadows.cpp, viewRenderOverrideShadows/viewRenderOverrideShadows.h, viewRenderOverrideShadows/viewRenderOverrideShadowsMain.cpp, viewRenderOverrideTargets/viewRenderOverrideTargets.cpp, viewRenderOverrideTargets/viewRenderOverrideTargets.h, viewRenderOverrideTargets/viewRenderOverrideTargetsMain.cpp, volumeLightCmd/volumeLightCmd.cpp, volumeShader/volumeShader.cpp, vp2BlinnShader/vp2BlinnShader.cpp, vp2BlinnShader/vp2BlinnShader.h, weightListNode/weightListNode.cpp, whatisCmd/whatisCmd.cpp, workspaceControlCmd.cpp, workspaceControlCmd.h, XmlGeometryCache/XmlGeometryCache.cpp, XmlGeometryCacheDesc/XmlGeometryCacheDesc.cpp, yTwistNode/yTwistNode.cpp, and zoomCameraCmd/zoomCameraCmd.cpp.

Member Enumeration Documentation

Available Status Codes.

Enumerator
kSuccess 

The operation was successful.

kFailure 

The operation failed.

kInsufficientMemory 

The operation failed due to insufficient memory.

kInvalidParameter 

An invalid parameter was provided.

kLicenseFailure 

Application is not licensed for the attempted operation.

kUnknownParameter 

Returned by MPxNode::compute for unrecognised plugs.

kNotImplemented 

 

kNotFound 

 

kEndOfFile 

 

Constructor & Destructor Documentation

MStatus ( )
inline

The default class constructor.

It initializes the internal detailed status code to kSuccess.

The constructor that takes a MStatus::MStatusCode.

Initializes the internal detailed status code to status

Parameters
[in]statusThe initial detailed status code.
MStatus ( const MStatus status)
inline

The copy constructor of the class.

Initialize a new MStatus object with the values from another MStatus object.

Parameters
[in]statusThe target MStatus object.

Member Function Documentation

MStatus & operator= ( const MStatus rhs)
inline

The copy operator of the class.

Parameters
[in]rhsThe MStatus object to copy from.
Returns
A reference to the MStatus object that has been initialized.
bool operator== ( const MStatus rhs) const
inline

The equivalence operator that takes another MStatus object.

Parameters
[in]rhsA reference to the target object.
Returns
  • true the two MStatus objects are equal.
  • false the two MStatus objects are not equal.
bool operator== ( const MStatusCode  rhs) const
inline

The equivalence operator that takes a MStatus::MStatusCode.

Parameters
[in]rhsa MStatus::MStatusCode, e.g. MS::kSuccess.
Returns
  • true the object has the given detailed status code.
  • false the object does not have the given detailed status code.
bool operator!= ( const MStatus rhs) const
inline

The not equal operator for MStatus.

Parameters
[in]rhsa reference to the target object for comparison.
Returns
  • true the two MStatus objects are not equal.
  • false the two MStatus objects are equal.
bool operator!= ( const MStatusCode  rhs) const
inline

The not equal operator that takes a MStatus::MStatusCode.

Parameters
[in]rhsa MStatus::MStatusCode, e.g. MS::kSuccess.
Returns
  • true the object does not have the given detailed status code.
  • false the object has the given detailed status code.
bool error ( ) const
inline

Determines whether there is an error.

Returns
  • true an error has occured.
  • false the operation was successful
Examples:
dagMessageCmd/dagMessageCmd.cpp, geometrySurfaceConstraint/geometrySurfaceConstraint.cpp, and nodeCreatedCBCmd/nodeCreatedCBCmd.cpp.
MStatus::MStatusCode statusCode ( ) const
inline

Retrieve the type of error that occurred, as specified in the MStatusCode enumeration.

Returns
The type of error that occurred.
Examples:
dx11Shader/dx11Shader.cpp, glslShader/GLSLShader.cpp, scanDagCmd/scanDagCmd.cpp, and scanDagSyntax/scanDagSyntax.cpp.
void perror ( const char *  preString) const

This method prints the error string preceded by a string supplied by the user to the standard error stream.

Parameters
[in]preStringA pointer to char that points to a null terminated string.
Examples:
AbcBullet/AbcBullet.cpp, AbcExport/AbcExport.cpp, AbcImport/main.cpp, affectsNode/affectsNode.cpp, animCubeNode/animCubeNode.cpp, animImportExport/animImportExport.cpp, animInfoCmd/animInfoCmd.cpp, arcLenNode/arcLenNode.cpp, blast2Cmd/blast2Cmd.cpp, blindComplexDataCmd/blindComplexDataCmd.cpp, blindDataShader/blindDataPluginMain.cpp, blindDoubleDataCmd/blindDoubleDataCmd.cpp, blindShortDataCmd/blindShortDataCmd.cpp, buildRotationNode/buildRotationNode.cpp, cameraMessageCmd/cameraMessageCmd.cpp, cameraSetSubclass/exCameraSet.cpp, captureViewRenderCmd/captureViewRenderCmd.cpp, cgFx/cgfxVector.cpp, circleNode/circleNode.cpp, cleanPerFaceAssignment/cleanPerFaceAssignmentPluginMain.cpp, closestPointOnCurve/closestPointOnCurvePlugin.cpp, closestPointOnNurbsSurfaceCmd/closestPointOnNurbsSurfaceCmd.cpp, clusterWeightFunction/clusterWeightFunction.cpp, conditionTest/conditionTest.cpp, constraintEvaluator/constraintEvaluator.cpp, convertBumpCmd/convertBumpCmd.cpp, convertEdgesToFacesCmd/convertEdgesToFacesCmd.cpp, convertVerticesToEdgesCmd/convertVerticesToEdgesCmd.cpp, convertVerticesToFacesCmd/convertVerticesToFacesCmd.cpp, createClipCmd/createClipCmd.cpp, customAttrManip/customAttrManip.cpp, customComponentTagNode/customComponentTagNode.cpp, customImagePlane/customImagePlane.cpp, customSpriteShader/customSpriteShader.cpp, customTextureShader/customTextureShaderMainMaya.cpp, cvColorNode/cvColorNode.cpp, cvPosCmd/cvPosCmd.cpp, dagPoseInfoCmd/dagPoseInfoCmd.cpp, deletedMsgCmd/deletedMsgCmd.cpp, dx11Shader/dx11ConeAngleToHotspotConverter.cpp, dynExprField/dynExprField.cpp, evaluationPruningEvaluator/evaluationPruningEvaluator.cpp, eventTest/eventTest.cpp, exampleRampAttribute/exampleMRampAttribute.cpp, exportJointClusterDataCmd/exportJointClusterDataCmd.cpp, exportSkinClusterDataCmd/exportSkinClusterDataCmd.cpp, fileIOMsgCmd/fileIOMsgCmd.cpp, filteredAsciiFile/filteredAsciiFile.cpp, findFileTexturesCmd/findFileTexturesCmd.cpp, fluidInfoCmd/fluidInfoCmd.cpp, footPrintManip/footPrintManip.cpp, footPrintNode/footPrintNode.cpp, footPrintNode_AnimatedMaterial/footPrintNode_GeometryOverride_AnimatedMaterial.cpp, footPrintNode_GeometryOverride/footPrintNode_GeometryOverride.cpp, footPrintNode_SubSceneOverride/footPrintNode_SubSceneOverride.cpp, fragmentDumper/fragmentDumper.cpp, fullLoftNode/fullLoftNode.cpp, gameInputDevice/gameInputDevice.cpp, genericAttributeNode/genericAttributeNode.cpp, geometryCacheConverter/geometryCacheConverter.cpp, geometryReplicator/geometryReplicator.cpp, geometrySurfaceConstraint/geometrySurfaceConstraint.cpp, geometrytools.cpp, getAttrAffectsCmd/getAttrAffectsCmd.cpp, glslShader/GLSLShaderMainMaya.cpp, gpuCache/gpuCachePluginMain.cpp, grabUVMain.cpp, helix2Cmd/helix2Cmd.cpp, helixTool/helixTool.cpp, hwApiTextureTest/hwApiTextureTest.cpp, hwPhongShader/hwPhongShader.cpp, iffInfoCmd/iffInfoCmd.cpp, iffPixelCmd/iffPixelCmd.cpp, iffPpmCmd/iffPpmCmd.cpp, ik2Bsolver/ik2Bsolver.cpp, interpPlugins/interpPlugins.cpp, interpZero/interpZero.cpp, intersectOnNurbsSurfaceCmd/intersectOnNurbsSurfaceCmd.cpp, jitterNode/jitterNode.cpp, lassoTool/lassoTool.cpp, latticeNoise/latticeNoise.cpp, latticeNoise/latticeNoiseNode.cpp, lepTranslator/lepTranslator.cpp, lineManip/lineManip.cpp, lineManipContainer/lineManipContainer.cpp, listRichSelectionCmd/listRichSelectionCmd.cpp, lockEvent/lockEvent.cpp, manipOverride/manipOverride.cpp, MayaPluginForSpreticle/spReticleLoc.cpp, meshOpCmd/meshOpMain.cpp, meshOpCmd/meshOpNode.cpp, MetadataSample/metadataPlugin.cpp, motionPathCmd/motionPathCmd.cpp, motionPathNode/motionPathNode.cpp, motionTraceCmd/motionTraceCmd.cpp, moveCurveCVsCmd/moveCurveCVsCmd.cpp, moveNumericTool/moveNumericTool.cpp, moveTool/moveTool.cpp, multiPlugInfoCmd/multiPlugInfoCmd.cpp, narrowPolyRenderOverride/narrowPolyRenderOverrideMain.cpp, nodeCreatedCBCmd/nodeCreatedCBCmd.cpp, nodeInfoCmd/nodeInfoCmd.cpp, ownerEmitter/ownerEmitter.cpp, particleAttrNode/particleAttrNodeMain.cpp, particlePathsCmd/particlePathsCmd.cpp, particleSystemInfoCmd/particleSystemInfoCmd.cpp, peltOverlapCmd/peltOverlapCmd.cpp, pfxInfoCmd/pfxInfoCmd.cpp, pickCmd/pickCmd.cpp, pointManip/pointManip.cpp, pointOnMeshInfo/pointOnMeshInfoPlugin.cpp, pointOnSubdNode/pointOnSubdNode.cpp, polyPrimitiveCmd/polyPrimitiveCmd.cpp, polyRawExporter/polyRawExporter.cpp, polyX3DExporter/polyX3DExporter.cpp, progressWindowCmd/progressWindowCmd.cpp, randomizerDevice/randomizerDevice.cpp, rawfootPrintNode/rawfootPrintNode.cpp, referenceQueryCmd/referenceQueryCmd.cpp, renderViewInteractiveRenderCmd/renderViewInteractiveRenderCmd.cpp, renderViewRenderCmd/renderViewRenderCmd.cpp, renderViewRenderRegionCmd/renderViewRenderRegionCmd.cpp, richMoveCmd/richMoveCmd.cpp, rockingTransform/rockingTransformMain.cpp, rockingTransformCheck/rockingTransformCheckMain.cpp, sampleCmd/sampleCmd.cpp, sampleParticles/sampleParticles.cpp, scanDagCmd/scanDagCmd.cpp, scanDagSyntax/scanDagSyntax.cpp, shellNode/shellNode.cpp, simpleEmitter/simpleEmitter.cpp, simpleEvaluationDraw/simpleEvaluationDraw.cpp, simpleEvaluationNode/simpleEvaluationNode.cpp, simpleEvaluator/simpleEvaluator.cpp, simpleFluidEmitter/simpleFluidEmitter.cpp, simpleLoftNode/simpleLoftNode.cpp, simplePhysicsEngine/simplePhysicsEngine.cpp, simpleSimulationNode/simpleSimulationNode.cpp, simpleSkipNode/simpleSkipNode.cpp, simpleSolverNode/simpleSolverNode.cpp, simpleSpring/simpleSpring.cpp, sineNode/sineNode.cpp, skinClusterWeights/skinClusterWeights.cpp, spiralAnimCurveCmd/spiralAnimCurveCmd.cpp, splitUVCmd/splitUVMain.cpp, splitUVCmd/splitUVNode.cpp, squareScaleManip/squareScaleManip.cpp, squaresNode_noDepthTest/squaresNode_noDepthTest.cpp, surfaceCreateCmd/surfaceCreateCmd.cpp, surfaceTwistCmd/surfaceTwistCmd.cpp, sweptEmitter/sweptEmitter.cpp, swissArmyManip/swissArmyManip.cpp, template/createTransformNodeTemplate/createTransformNodeTemplate.cpp, template/helloTemplateWorld/helloTemplateWorld.cpp, template/zoomCameraTemplate/zoomCameraTemplate.cpp, tessellatedQuad/TessellatedQuadNode.cpp, testMTopologyEvaluator/testMTopologyEvaluator.cpp, testNobjectNode/testNobjectNode.cpp, testNpassiveNode/testNpassiveNode.cpp, testNsolverNode/testNsolverNode.cpp, testNucleusNode/testNucleusNode.cpp, torusField/torusField.cpp, transCircleNode/transCircleNode.cpp, transformDrawNode/transformDrawNode.cpp, translateCmd/translateCmd.cpp, udpDevice/udpDevice.cpp, uiDrawManager/uiDrawManager.cpp, undoRedoMsgCmd/undoRedoMsgCmd.cpp, userMsgCmd/userMsgCmd.cpp, viewCallbackTest/viewCallbackTest.cpp, viewDX11DeviceAccess/viewDX11DeviceAccess.cpp, viewObjectFilter/viewObjectFilter.cpp, viewRenderOverride/viewRenderOverrideMain.cpp, viewRenderOverrideFrameCache/viewRenderOverrideFrameCacheMain.cpp, vp2BlinnShader/vp2BlinnShader.cpp, and zoomCameraCmd/zoomCameraCmd.cpp.
void pAPIerror ( const char *  file,
int  line 
) const

This method prints the API error string to the standard error stream.

Parameters
[in]fileFilename where the error occured __FILE__.
[in]lineLine number of the error __LINE__.
void perror ( const MString preString) const

The second version of the perror() method.

This method takes a reference to a MString as the parameter. It prints the error string preceded by the string supplied by the user to the standard error stream.

Parameters
[in]preStringa reference to a MString object that contains the prefix string.
void set ( bool  status,
unsigned char  statusCode,
unsigned char  internalStatusCode 
)
inline

Internal use only.

The method is called interally by Maya to construct MStatus objects.

It should not be called from plugins.

Parameters
[in]statustrue or false
[in]statusCodean element of MStatusCode
[in]internalStatusCodean internal Maya error code
Examples:
AbcBullet/AttributesWriter.cpp, AbcExport/AttributesWriter.cpp, AbcExport/MayaMeshWriter.cpp, cvColorNode/cvColorNode.cpp, viewDX11DeviceAccess/viewDX11DeviceAccess.cpp, viewRenderOverride/viewRenderOverride.cpp, and weightListNode/weightListNode.cpp.
void setSuccess ( )
inline

The method is called interally by Maya to set the status as success.

It should not be called from plugins.

operator bool ( ) const
inline

NO SCRIPT SUPPORT.

The conversion operator that converts a MStatus object to bool.

The result it returns will be true if the MStatus does not contain an error, and false if it does.

Friends And Related Function Documentation

OPENMAYA_EXPORT std::ostream& operator<< ( std::ostream &  out,
MStatus status 
)
friend

NO SCRIPT SUPPORT.

This method outputs the detailed status code as well as the internal error description. The format of the output is "(errNumber): errorDescriptiveText".

Parameters
[in]outThe ostream object that the output should be directed to.
[in]statusThe MStatus object.
Returns
A reference to the ostream object.

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