MDagPath Class Reference
 
 
 

#include <MDagPath.h>


Class Description

DAG Path.

Provides methods for obtaining one or all Paths to a specified DAG Node, determining if a Path is valid and if two Paths are equivalent, obtaining the length, transform, and inclusive and exclusive matrices of a Path, as well as performing Path to Path assignment.

DAG Paths may be used as parameters to some methods in the DAG Node Function Set (MFnDagNode).

It is often useful to combine DAG Paths into DAG Path arrays (MDagPathArray).

Use this DAG Path Class to obtain and query Paths to DAG Nodes. A DAG path is a path from the world node to a particular object in the DAG.

If a DAG object is instanced, then an MDagPath is required to identify a particular instance. DAG paths are also required when doing world space transformations.

Use this class in conjunction with the DAG Iterator (MItDag), DAG Node Function Set (MFnDagNode) and DAG Path Array class (MDagPathArray) to query and edit the DAG.

Examples:

AbcExport/AbcExport.cpp, AbcExport/AbcWriteJob.cpp, AbcExport/AbcWriteJob.h, AbcExport/MayaCameraWriter.cpp, AbcExport/MayaCameraWriter.h, AbcExport/MayaLocatorWriter.cpp, AbcExport/MayaLocatorWriter.h, AbcExport/MayaMeshWriter.cpp, AbcExport/MayaMeshWriter.h, AbcExport/MayaNurbsCurveWriter.cpp, AbcExport/MayaNurbsCurveWriter.h, AbcExport/MayaNurbsSurfaceWriter.cpp, AbcExport/MayaNurbsSurfaceWriter.h, AbcExport/MayaPointPrimitiveWriter.cpp, AbcExport/MayaPointPrimitiveWriter.h, AbcExport/MayaTransformWriter.cpp, AbcExport/MayaTransformWriter.h, AbcExport/MayaUtility.cpp, AbcExport/MayaUtility.h, AbcImport/AbcImport.cpp, AbcImport/CameraHelper.cpp, AbcImport/CreateSceneHelper.cpp, AbcImport/CreateSceneHelper.h, AbcImport/LocatorHelper.h, AbcImport/util.cpp, AbcImport/util.h, animExportUtil/animExportUtil.cpp, animExportUtil/animExportUtil.h, animInfoCmd/animInfoCmd.cpp, apiMeshShape/apiMeshGeometryOverride.cpp, apiMeshShape/apiMeshGeometryOverride.h, apiMeshShape/apiMeshShape.cpp, apiMeshShape/apiMeshShapeUI.cpp, apiMeshShape/apiMeshSubSceneOverride.cpp, apiSimpleShape/apiSimpleShapeUI.cpp, AshliShader/GLSLShaderNode.cpp, atomImportExport/atomFileUtils.cpp, atomImportExport/atomImportExport.cpp, atomImportExport/atomNodeNameReplacer.cpp, cameraSetSubclass/testExCameraSetCmd.cpp, cgfxEffectDef.cpp, cgfxEffectDef.h, cgfxShaderCmd.cpp, cgfxShaderNode.cpp, cgfxShaderNode.h, cleanPerFaceAssignment/cleanPerFaceAssignmentCmd.cpp, closestPointCmd/closestPointCmd.cpp, closestPointOnCurve/closestPointOnCurveCmd.cpp, closestPointOnCurve/closestPointOnCurveNode.cpp, closestPointOnCurve/closestTangentUAndDistance.cpp, closestPointOnCurve/closestTangentUAndDistance.h, closestPointOnNurbsSurfaceCmd/closestPointOnNurbsSurfaceCmd.cpp, clusterWeightFunction/clusterWeightFunction.cpp, componentScaleManip/componentScaleManip.cpp, convertEdgesToFacesCmd/convertEdgesToFacesCmd.cpp, convertVerticesToEdgesCmd/convertVerticesToEdgesCmd.cpp, convertVerticesToFacesCmd/convertVerticesToFacesCmd.cpp, curvedArrowsNode/curvedArrowsNode.cpp, customAttrManip/customAttrManip.cpp, cvColorNode/cvColorNode.cpp, cvColorShader/cvColorShader.cpp, cvExpandCmd/cvExpandCmd.cpp, cvPosCmd/cvPosCmd.cpp, D3DViewportRenderer/D3DGeometryItem.cpp, D3DViewportRenderer/D3DGeometryItem.h, D3DViewportRenderer/D3DResourceManager.cpp, D3DViewportRenderer/D3DResourceManager.h, D3DViewportRenderer/D3DViewportRenderer.cpp, D3DViewportRenderer/D3DViewportRenderer.h, dagMessageCmd/dagMessageCmd.cpp, dx11Shader/crackFreePrimitiveGenerator.h, dx11Shader/dx11Shader.cpp, dx11Shader/dx11Shader.h, dx11Shader/dx11ShaderCmd.cpp, DX11ViewportRenderer/DX11GeometryItem.cpp, DX11ViewportRenderer/DX11GeometryItem.h, DX11ViewportRenderer/DX11ResourceManager.cpp, DX11ViewportRenderer/DX11ResourceManager.h, DX11ViewportRenderer/DX11ViewportRenderer.cpp, DX11ViewportRenderer/DX11ViewportRenderer.h, exampleCameraSetView/exampleCameraSetViewCmd.cpp, exampleCameraSetView/exampleCameraSetViewCmd.h, exportJointClusterDataCmd/exportJointClusterDataCmd.cpp, exportSkinClusterDataCmd/exportSkinClusterDataCmd.cpp, findTexturesPerPolygonCmd/findTexturesPerPolygonCmd.cpp, footPrintManip/footPrintManip.cpp, footPrintNode/footPrintNode.cpp, geometryReplicator/geometryReplicator.cpp, GLSLShaderNode.h, gpuCache/CacheWriter.cpp, gpuCache/gpuCacheCmd.cpp, gpuCache/gpuCacheCmd.h, gpuCache/gpuCacheDrawOverride.cpp, gpuCache/gpuCacheDrawOverride.h, gpuCache/gpuCacheGeometryOverride.cpp, gpuCache/gpuCacheGeometryOverride.h, gpuCache/gpuCacheMaterialBakers.cpp, gpuCache/gpuCacheMaterialBakers.h, gpuCache/gpuCacheShapeNode.cpp, gpuCache/gpuCacheSubSceneOverride.cpp, gpuCache/gpuCacheUtil.cpp, gpuCache/gpuCacheUtil.h, hairCollisionSolver/hairCollisionSolver.cpp, helix2Cmd/helix2Cmd.cpp, helixTool/helixTool.cpp, hlslShader/hlslShader.cpp, hwAnisotropicShader_NV20/hwAnisotropicShader_NV20.cpp, hwColorPerVertexShader/hwColorPerVertexShader.cpp, hwDecalBumpShader_NV20/hwDecalBumpShader_NV20.cpp, hwManagedTextureShader/hwManagedTextureShader.cpp, hwPhongShader/hwPhongShader.cpp, hwPhongShader/hwPhongShader.h, hwReflectBumpShader_NV20/hwReflectBumpShader_NV20.cpp, hwRefractReflectShader_NV20/hwRefractReflectShader_NV20.cpp, hwToonShader_NV20/hwToonShader_NV20.cpp, hwUnlitShader/hwUnlitShader.h, instanceCallbackCmd/instanceCallbackCmd.cpp, instancerListCmd/instancerListCmd.cpp, intersectCmd/intersectCmd.cpp, intersectOnNurbsSurfaceCmd/intersectOnNurbsSurfaceCmd.cpp, lassoTool/lassoTool.cpp, lensDistortionCallback/lensDistortionCallback.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, maTranslator/maTranslator.cpp, meshOpCmd/meshOpCmd.cpp, meshOpCmd/polyModifierCmd.cpp, meshOpCmd/polyModifierCmd.h, meshReorder/meshMapUtils.cpp, meshReorder/meshMapUtils.h, meshReorder/meshRemapCmd.h, meshReorder/meshRemapTool.cpp, meshReorder/meshRemapTool.h, meshReorder/meshReorderCmd.h, meshReorder/meshReorderTool.cpp, MetadataSample/metadataBase.cpp, motionPathCmd/motionPathCmd.cpp, moveCurveCVsCmd/moveCurveCVsCmd.cpp, moveManip/moveManip.cpp, moveNumericTool/moveNumericTool.cpp, moveTool/moveTool.cpp, narrowPolyViewer/narrowPolyViewer.cpp, narrowPolyViewer/narrowPolyViewer.h, narrowPolyViewer/narrowPolyViewerCmd.cpp, narrowPolyViewer/narrowPolyViewerCmd.h, objExport/objExport.cpp, OpenGLViewportRenderer/OpenGLViewportRenderer.cpp, OpenGLViewportRenderer/OpenGLViewportRenderer.h, peltOverlapCmd/peltOverlapCmd.cpp, pnTriangles/pnTrianglesNode.cpp, pointOnMeshInfo/getPointAndNormal.cpp, pointOnMeshInfo/getPointAndNormal.h, pointOnMeshInfo/pointOnMeshCmd.cpp, pointOnMeshInfo/pointOnMeshInfoNode.cpp, polyMessageCmd/polyMessageCmd.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, polyX3DExporter/polyExporter.cpp, polyX3DExporter/polyExporter.h, polyX3DExporter/polyWriter.cpp, polyX3DExporter/polyWriter.h, polyX3DExporter/polyX3DExporter.cpp, polyX3DExporter/polyX3DExporter.h, polyX3DExporter/polyX3DWriter.cpp, polyX3DExporter/polyX3DWriter.h, quadricShape/quadricShape.cpp, renderViewRenderCmd/renderViewRenderCmd.cpp, renderViewRenderRegionCmd/renderViewRenderRegionCmd.cpp, richMoveCmd/richMoveCmd.cpp, rotateManip/rotateManip.cpp, sampleCmd/sampleCmd.cpp, sampleParticles/sampleParticles.cpp, scanDagCmd/scanDagCmd.cpp, scanDagSyntax/scanDagSyntax.cpp, selectClosestPointLocator/selectClosestPointLocator.cpp, selectClosestPointLocator/selectClosestPointLocator.h, ShapeMonitor/ShapeMonitor.cpp, simpleEmitter/simpleEmitter.cpp, simpleEmitter/simpleEmitter.h, simpleSolverNode/simpleSolverNode.cpp, skinClusterWeights/skinClusterWeights.cpp, spiralAnimCurveCmd/spiralAnimCurveCmd.cpp, splitUVCmd/polyModifierCmd.cpp, splitUVCmd/polyModifierCmd.h, splitUVCmd/splitUVCmd.cpp, squareScaleManip/squareScaleManip.cpp, squareScaleManip/squareScaleManip.h, squareScaleManipContext/squareScaleManipContext.cpp, squareScaleManipContext/squareScaleManipContext.h, surfaceBumpManip/surfaceBumpManip.cpp, surfaceTwistCmd/surfaceTwistCmd.cpp, swissArmyManip/swissArmyManip.cpp, template/zoomCameraTemplate/zoomCameraTemplate.cpp, testCameraSetCmd/testCameraSetCmd.cpp, threadedBoundingBox/threadedBoundingBox.cpp, torusField/torusField.cpp, torusField/torusField.h, translateCmd/translateCmd.cpp, uiDrawManager/uiDrawManager.cpp, viewDX11DeviceAccess/viewDX11DeviceAccess.cpp, viewObjectFilter/viewObjectFilter.cpp, viewRenderOverride/viewRenderOverride.h, viewRenderOverride/viewRenderOverrideOperations.cpp, viewRenderOverride/viewRenderOverrideUserOperation.cpp, viewRenderOverrideShadows/viewRenderOverrideShadows.cpp, xmlAssembly/AssemblyCommand.cpp, xmlAssembly/AssemblyExporter.cpp, xmlAssembly/AssemblyPreloader.cpp, xmlAssembly/AssemblySceneLoader.cpp, xmlAssembly/BBoxesRep.cpp, xmlAssembly/FnAssetInstanceUtil.cpp, and zoomCameraCmd/zoomCameraCmd.cpp.

List of all members.

Public Member Functions

  MDagPath ()
  Class Constructor.
  MDagPath (const MDagPath &src)
  Copy constructor.
virtual  ~MDagPath ()
  Class Destructor.
bool  hasFn (MFn::Type type, MStatus *ReturnStatus=NULL) const
  Returns true if the object at the end of this DAG path supports the given function set.
MFn::Type  apiType (MStatus *ReturnStatus=NULL) const
  Returns the type of the object at the end of the path.
bool  isValid (MStatus *ReturnStatus=NULL) const
  Determines if Path is valid.
MObject  node (MStatus *ReturnStatus=NULL) const
  Retrieves the DAG Node for this DAG Path.
MObject  transform (MStatus *ReturnStatus=NULL) const
  Retrieves the lowest Transform in the DAG Path.
unsigned int  length (MStatus *ReturnStatus=NULL) const
  Determines the number of DAG Nodes in the Path not including the root.
MStatus  extendToShape ()
  If the object at the end of this path is a transform and there is a shape node directly beneath it in the hierarchy, then the path is extended to that geometry node.
MStatus  extendToShapeDirectlyBelow (unsigned int)
  This method is used if the end of the path is a transform and there are shapes directly below the transform.
MStatus  numberOfShapesDirectlyBelow (unsigned int &) const
  If the object at the end of this path is a transform, this method will return the number of shapes directly below the transform.
MStatus  push (const MObject &child)
  Push an object onto the end of the path.
MStatus  pop (unsigned int num=1)
  Pop the given number of objects off of the end of the path.
unsigned int  childCount (MStatus *ReturnStatus=NULL) const
  Return the number of children that the object at the end of the path has.
MObject  child (unsigned int i, MStatus *ReturnStatus=NULL) const
  Return the child object at the given index, where the parent is the object at the end of the path.
MMatrix  inclusiveMatrix (MStatus *ReturnStatus=NULL) const
  Determines the inclusive matrix of the Path.
MMatrix  exclusiveMatrix (MStatus *ReturnStatus=NULL) const
  Determines the exclusive matrix of the Path.
MMatrix  inclusiveMatrixInverse (MStatus *ReturnStatus=NULL) const
  Determines the inverse inclusive matrix of the Path.
MMatrix  exclusiveMatrixInverse (MStatus *ReturnStatus=NULL) const
  Determines the inverse exclusive matrix of the Path.
MDagPath operator= (const MDagPath &src)
  Assigns the DAG Path on the RHS of the operator to the DAG Path on the LHS.
bool  operator== (const MDagPath &src) const
  Determines if the DAG Path on the LHS of the operator is equal to the DAG Path on the RHS.
MStatus  set (const MDagPath &src)
  Sets this DAG Path equal to the specified DAG Path.
unsigned int  pathCount (MStatus *ReturnStatus=NULL) const
  Return the number of paths which make up this path.
MStatus  getPath (MDagPath &path, unsigned int i=0) const
  Return the i'th path.
MString  fullPathName (MStatus *ReturnStatus=NULL) const
  Return a string representing the full path from the root of the dag to this object.
MString  partialPathName (MStatus *ReturnStatus=NULL) const
  Return a string representing the partial path from the root of the dag to this object.
bool  isInstanced (MStatus *ReturnStatus=NULL) const
  Returns true if the object at the end of the DAG path is instanced.
unsigned int  instanceNumber (MStatus *ReturnStatus=NULL) const
  For an instanced object, this returns the instance number that this path represents in the DAG.
bool  isVisible (MStatus *ReturnStatus=NULL) const
  Returns true if the DAG Node at the end of the path is visible to the viewport.
bool  isTemplated (MStatus *ReturnStatus=NULL) const
  Returns true if the DAG Node at the end of the path is templated.
MDAGDrawOverrideInfo  getDrawOverrideInfo () const
  Get the draw override information for the given path.

Static Public Member Functions

static MStatus  getAllPathsTo (const MObject &node, MDagPathArray &pathArray)
  Determines all Paths to the specified DAG Node.
static MStatus  getAPathTo (const MObject &node, MDagPath &path)
  Determines the Path to the specified DAG Node.
static const char *  className ()
  Returns the name of this class.
static MDagPath  getAPathTo (const MObject &node, MStatus *ReturnStatus=NULL)
  Obsolete.

Constructor & Destructor Documentation

MDagPath ( )

Class Constructor.

Creates a DAG Path

MDagPath ( const MDagPath src )

Copy constructor.

Duplicate the given path.

Parameters:
[in] src the path to be copied
~MDagPath ( ) [virtual]

Class Destructor.

No additional action.


Member Function Documentation

MStatus getAllPathsTo ( const MObject node,
MDagPathArray pathArray 
) [static]

Determines all Paths to the specified DAG Node.

Parameters:
[in] node DAG Node for which Paths are determined
[out] pathArray Array containing all DAG Paths to the specified Node (implicit return)
Returns:
Status Code
Status Codes:
Examples:
gpuCache/gpuCacheSubSceneOverride.cpp.
MStatus getAPathTo ( const MObject node,
MDagPath path 
) [static]

Determines the Path to the specified DAG Node.

The Path returned is rooted at the World. If the object is instanced and has multiple paths, then the first one that is found is returned.

Parameters:
[in] node DAG Node for which Paths are determined
[out] path reference to the path of the specified DAG Node
Returns:
Status Code
Status Codes:
Examples:
animInfoCmd/animInfoCmd.cpp, closestPointCmd/closestPointCmd.cpp, dagMessageCmd/dagMessageCmd.cpp, dx11Shader/dx11Shader.cpp, geometryReplicator/geometryReplicator.cpp, gpuCache/gpuCacheSubSceneOverride.cpp, intersectCmd/intersectCmd.cpp, maTranslator/maTranslator.cpp, meshOpCmd/polyModifierCmd.cpp, polyMessageCmd/polyMessageCmd.cpp, simpleSolverNode/simpleSolverNode.cpp, splitUVCmd/polyModifierCmd.cpp, xmlAssembly/AssemblyCommand.cpp, xmlAssembly/AssemblyExporter.cpp, xmlAssembly/AssemblyPreloader.cpp, xmlAssembly/AssemblySceneLoader.cpp, xmlAssembly/BBoxesRep.cpp, and xmlAssembly/FnAssetInstanceUtil.cpp.
bool hasFn ( MFn::Type  type,
MStatus ReturnStatus = NULL 
) const
MFn::Type apiType ( MStatus ReturnStatus = NULL ) const

Returns the type of the object at the end of the path.

Parameters:
[out] ReturnStatus status code
Returns:
Type of the object
Status Codes:
Examples:
cleanPerFaceAssignment/cleanPerFaceAssignmentCmd.cpp, and geometryReplicator/geometryReplicator.cpp.
MObject node ( MStatus ReturnStatus = NULL ) const

Retrieves the DAG Node for this DAG Path.

Parameters:
[out] ReturnStatus Status Code
Returns:
DAG Node for this DAG Path
Status Codes:
Examples:
AbcExport/AbcWriteJob.cpp, AbcExport/MayaCameraWriter.cpp, AbcExport/MayaLocatorWriter.cpp, AbcExport/MayaMeshWriter.cpp, AbcExport/MayaNurbsCurveWriter.cpp, AbcExport/MayaNurbsSurfaceWriter.cpp, AbcExport/MayaPointPrimitiveWriter.cpp, AbcImport/AbcImport.cpp, AbcImport/CameraHelper.cpp, AbcImport/util.cpp, animExportUtil/animExportUtil.cpp, AshliShader/GLSLShaderNode.cpp, atomImportExport/atomFileUtils.cpp, atomImportExport/atomImportExport.cpp, atomImportExport/atomNodeNameReplacer.cpp, blindDataShader/blindDataShader.cpp, cameraSetSubclass/testExCameraSetCmd.cpp, cgfxEffectDef.cpp, closestPointCmd/closestPointCmd.cpp, closestPointOnCurve/closestPointOnCurveCmd.cpp, componentScaleManip/componentScaleManip.cpp, D3DViewportRenderer/D3DGeometryItem.cpp, dagMessageCmd/dagMessageCmd.cpp, dx11Shader/dx11Shader.cpp, DX11ViewportRenderer/DX11GeometryItem.cpp, footPrintNode/footPrintNode.cpp, gpuCache/gpuCacheCmd.cpp, gpuCache/gpuCacheDrawOverride.cpp, gpuCache/gpuCacheMaterialBakers.cpp, gpuCache/gpuCacheSubSceneOverride.cpp, gpuCache/gpuCacheUtil.cpp, hwAnisotropicShader_NV20/hwAnisotropicShader_NV20.cpp, hwColorPerVertexShader/hwColorPerVertexShader.cpp, hwManagedTextureShader/hwManagedTextureShader.cpp, hwToonShader_NV20/hwToonShader_NV20.cpp, lensDistortionCallback/lensDistortionCallback.cpp, listPolyHolesCmd/listPolyHolesCmd.cpp, maTranslator/maTranslator.cpp, meshOpCmd/polyModifierCmd.cpp, meshReorder/meshRemapTool.cpp, meshReorder/meshReorderTool.cpp, MetadataSample/metadataBase.cpp, objExport/objExport.cpp, OpenGLViewportRenderer/OpenGLViewportRenderer.cpp, pointOnMeshInfo/pointOnMeshCmd.cpp, polyMessageCmd/polyMessageCmd.cpp, skinClusterWeights/skinClusterWeights.cpp, splitUVCmd/polyModifierCmd.cpp, splitUVCmd/splitUVCmd.cpp, squareScaleManip/squareScaleManip.cpp, swissArmyManip/swissArmyManip.cpp, testCameraSetCmd/testCameraSetCmd.cpp, threadedBoundingBox/threadedBoundingBox.cpp, uiDrawManager/uiDrawManager.cpp, viewRenderOverrideShadows/viewRenderOverrideShadows.cpp, and xmlAssembly/AssemblyExporter.cpp.
MObject transform ( MStatus ReturnStatus = NULL ) const

Retrieves the lowest Transform in the DAG Path.

Parameters:
[out] ReturnStatus Status Code
Returns:
Lowest Transform for this DAG Path
Status Codes:
Examples:
dagMessageCmd/dagMessageCmd.cpp, dx11Shader/dx11Shader.cpp, gpuCache/gpuCacheDrawOverride.cpp, scanDagCmd/scanDagCmd.cpp, scanDagSyntax/scanDagSyntax.cpp, and spiralAnimCurveCmd/spiralAnimCurveCmd.cpp.
unsigned int length ( MStatus ReturnStatus = NULL ) const

Determines the number of DAG Nodes in the Path not including the root.

Parameters:
[out] ReturnStatus status code
Returns:
Number of DAG Nodes not including the root
Status Codes:
Examples:
AbcExport/AbcWriteJob.cpp, AbcExport/MayaUtility.cpp, gpuCache/gpuCacheCmd.cpp, gpuCache/gpuCacheSubSceneOverride.cpp, maTranslator/maTranslator.cpp, ShapeMonitor/ShapeMonitor.cpp, and xmlAssembly/AssemblyCommand.cpp.
MStatus extendToShapeDirectlyBelow ( unsigned int  index )

This method is used if the end of the path is a transform and there are shapes directly below the transform.

The shape to extend to is set by passing in an appropriate index parameter.

Use the numberOfShapesDirectlyBelow() method to determine how many shapes are below

Parameters:
[in] index contains the index of the shape to extend the path to
Returns:
Status code
Status Codes:
MStatus numberOfShapesDirectlyBelow ( unsigned int &  num ) const

If the object at the end of this path is a transform, this method will return the number of shapes directly below the transform.

Parameters:
[in] num on success, this parameter will be set to the number of shapes directly underneath the transform
Returns:
Status code
Status Codes:
Examples:
dx11Shader/dx11ShaderCmd.cpp.
MStatus push ( const MObject child )

Push an object onto the end of the path.

The object must be a child of the object that is currently at the end of the path.

Parameters:
[in] child child object to push onto the path
Returns:
Status code
Status Codes:
Examples:
AbcImport/util.cpp, and gpuCache/gpuCacheCmd.cpp.
MStatus pop ( unsigned int  num = 1 )
unsigned int childCount ( MStatus ReturnStatus = NULL ) const
MObject child ( unsigned int  index,
MStatus ReturnStatus = NULL 
) const

Return the child object at the given index, where the parent is the object at the end of the path.

Parameters:
[in] index child's index
[out] ReturnStatus status code
Returns:
A handle to the child
Status Codes:
Examples:
AbcImport/util.cpp, and gpuCache/gpuCacheCmd.cpp.
MMatrix exclusiveMatrix ( MStatus ReturnStatus = NULL ) const

Determines the exclusive matrix of the Path.

Parameters:
[out] ReturnStatus status code
Returns:
The matrix for all transforms in the Path excluding the end Node in the Path if it is Transform
Status Codes:
Examples:
AbcExport/AbcWriteJob.cpp, and moveManip/moveManip.cpp.
MMatrix inclusiveMatrixInverse ( MStatus ReturnStatus = NULL ) const

Determines the inverse inclusive matrix of the Path.

Parameters:
[out] ReturnStatus status code
Returns:
The inverse of the matrix for all Transforms in the Path including the end Node in the Path if it is a Transform
Status Codes:
Examples:
closestPointOnNurbsSurfaceCmd/closestPointOnNurbsSurfaceCmd.cpp, hwAnisotropicShader_NV20/hwAnisotropicShader_NV20.cpp, hwDecalBumpShader_NV20/hwDecalBumpShader_NV20.cpp, hwToonShader_NV20/hwToonShader_NV20.cpp, and intersectOnNurbsSurfaceCmd/intersectOnNurbsSurfaceCmd.cpp.
MMatrix exclusiveMatrixInverse ( MStatus ReturnStatus = NULL ) const

Determines the inverse exclusive matrix of the Path.

Parameters:
[out] ReturnStatus status code
Returns:
The inverse of the matrix for all transforms in the Path excluding the end Node in the Path if it is Transform
Status Codes:
MDagPath & operator= ( const MDagPath src )

Assigns the DAG Path on the RHS of the operator to the DAG Path on the LHS.

Parameters:
[in] src the path to be copied
Returns:
A bitwise copy of the the DAG Path on the LHS
Examples:
AbcImport/NodeIteratorVisitorHelper.cpp.
bool operator== ( const MDagPath src ) const

Determines if the DAG Path on the LHS of the operator is equal to the DAG Path on the RHS.

Parameters:
[in] src The path to be compared.
Returns:
True is the objects are equal
MStatus set ( const MDagPath src )

Sets this DAG Path equal to the specified DAG Path.

Parameters:
[in] src DAG Path to be copied.
Returns:
Status code
Status Codes:
unsigned int pathCount ( MStatus ReturnStatus = NULL ) const

Return the number of paths which make up this path.

Parameters:
[out] ReturnStatus status code
Returns:
The path count
Status Codes:
Examples:
maTranslator/maTranslator.cpp.
MStatus getPath ( MDagPath path,
unsigned int  i = 0 
) const

Return the i'th path.

The zero'th path is the top-most path and must be rooted by the world. Additional paths are paths in the underworld of the object at the end of the previous path (path i-1).

Parameters:
[out] path reference to the destination path
[in] i the index of the path to retrieve
Returns:
Status code
Status Codes:
Examples:
AbcImport/CameraHelper.cpp, customAttrManip/customAttrManip.cpp, footPrintManip/footPrintManip.cpp, lineManipContainer/lineManipContainer.cpp, manipOverride/customTriadManip.cpp, manipOverride/manipOverride.cpp, maTranslator/maTranslator.cpp, moveManip/moveManip.cpp, and swissArmyManip/swissArmyManip.cpp.
MString fullPathName ( MStatus ReturnStatus = NULL ) const

Return a string representing the full path from the root of the dag to this object.

Parameters:
[out] ReturnStatus status code
Returns:
The full path name
Status Codes:
Examples:
AbcExport/AbcExport.cpp, AbcExport/MayaUtility.cpp, AbcExport/MayaUtility.h, apiMeshShape/apiMeshGeometryOverride.cpp, atomImportExport/atomFileUtils.cpp, cleanPerFaceAssignment/cleanPerFaceAssignmentCmd.cpp, convertEdgesToFacesCmd/convertEdgesToFacesCmd.cpp, convertVerticesToEdgesCmd/convertVerticesToEdgesCmd.cpp, convertVerticesToFacesCmd/convertVerticesToFacesCmd.cpp, D3DViewportRenderer/D3DGeometryItem.cpp, dagMessageCmd/dagMessageCmd.cpp, dx11Shader/dx11Shader.cpp, DX11ViewportRenderer/DX11GeometryItem.cpp, exampleCameraSetView/exampleCameraSetViewCmd.cpp, gpuCache/CacheWriter.cpp, gpuCache/gpuCacheCmd.cpp, hwColorPerVertexShader/hwColorPerVertexShader.cpp, instanceCallbackCmd/instanceCallbackCmd.cpp, instancerListCmd/instancerListCmd.cpp, listLightLinksCmd/listLightLinksCmd.cpp, listRichSelectionCmd/listRichSelectionCmd.cpp, MetadataSample/metadataBase.cpp, objExport/objExport.cpp, OpenGLViewportRenderer/OpenGLViewportRenderer.cpp, renderViewRenderCmd/renderViewRenderCmd.cpp, renderViewRenderRegionCmd/renderViewRenderRegionCmd.cpp, scanDagCmd/scanDagCmd.cpp, scanDagSyntax/scanDagSyntax.cpp, viewRenderOverride/viewRenderOverrideOperations.cpp, viewRenderOverrideShadows/viewRenderOverrideShadows.cpp, xmlAssembly/AssemblyPreloader.cpp, xmlAssembly/AssemblySceneLoader.cpp, and xmlAssembly/FnAssetInstanceUtil.cpp.
bool isInstanced ( MStatus ReturnStatus = NULL ) const

Returns true if the object at the end of the DAG path is instanced.

It is instanced if there is more than one path to the node from the top of the DAG. Each instance of the node will be drawn separately in the view, but the geometry will be shared.

Parameters:
[out] ReturnStatus status code
Returns:
True if the DAG node at the end of the path is instanced
Status Codes:
Examples:
findTexturesPerPolygonCmd/findTexturesPerPolygonCmd.cpp.
unsigned int instanceNumber ( MStatus ReturnStatus = NULL ) const

For an instanced object, this returns the instance number that this path represents in the DAG.

The instance number can be used to determine which element of the world space array attributes of a DAG node to connect to get information regarding this instance.

Parameters:
[out] ReturnStatus status code
Returns:
The instance number represented by this path
Status Codes:
Examples:
cleanPerFaceAssignment/cleanPerFaceAssignmentCmd.cpp, closestPointOnCurve/closestPointOnCurveCmd.cpp, cvColorShader/cvColorShader.cpp, D3DViewportRenderer/D3DViewportRenderer.cpp, DX11ViewportRenderer/DX11ViewportRenderer.cpp, findTexturesPerPolygonCmd/findTexturesPerPolygonCmd.cpp, gpuCache/gpuCacheUtil.cpp, and pointOnMeshInfo/pointOnMeshCmd.cpp.
bool isVisible ( MStatus ReturnStatus = NULL ) const

Returns true if the DAG Node at the end of the path is visible to the viewport.

This method does not account for any viewport specific filtering.

If the object is not in the current render layer then it is not visible.

If the value of the visibility attribute is false for any DAG Node along the path, the object is invisible. Also, the object is invisible if it or its ancestor is in an invisible display layer. Additionally, intermediate objects are considered invisible as are objects which have the display geometry flag toggled to off (see the 'toggle' command).

Parameters:
[out] ReturnStatus status code
Returns:
True if the DAG node at the end of the path is visible
Status Codes:
Examples:
gpuCache/gpuCacheSubSceneOverride.cpp.
bool isTemplated ( MStatus ReturnStatus = NULL ) const

Returns true if the DAG Node at the end of the path is templated.

If the value of the template attribute is true for any DAG Node along the path, this method will return true. If the display override for any DAG node along the path is template, this method will return true. Finally, this method will return true if any DAG node along the path is in a templated display layer.

Parameters:
[out] ReturnStatus status code
Returns:
True if the DAG node at the end of the path is templated
Status Codes:
Examples:
apiMeshShape/apiMeshGeometryOverride.cpp.
MDAGDrawOverrideInfo getDrawOverrideInfo ( ) const

Get the draw override information for the given path.

It will check from the bottom object of this path, then go upwards to find the first enabled draw override and record that information. If no enabled draw override is found, a default draw override information will be given with draw override disabled inside it.

Returns:
Draw override information of this path.
Examples:
footPrintNode/footPrintNode.cpp.
const char * className ( ) [static]

Returns the name of this class.

Returns:
The name of this class.
MDagPath getAPathTo ( const MObject node,
MStatus ReturnStatus = NULL 
) [static]

Obsolete.

This method is obsolete.

Deprecated:
The function signature was inconsistent with the rest of the API.

Please use the other MDagPath::getAPathTo method instead.

Determines the Path to the specified DAG Node. The Path returned is rooted at the World. If the object is instanced and has multiple paths, then the first one that is found is returned.

Parameters:
[in] node DAG Node for which Paths are determined
[out] ReturnStatus Status Code
Returns:
Path to the specified Node
Status Codes:

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