- Main Page
- Related Pages
- Modules
- Classes
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions

# MDagPath Class Reference

# OpenMaya - API module for common classes

This reference page is linked to from the following overview topics: Overview of hardware shading node plug-ins.

Search for all occurrences

## Detailed 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:

  animExportUtil.cpp, animExportUtil.h, animInfoCmd.cpp, apiMeshShape.cpp, apiMeshShapeUI.cpp, apiSimpleShapeUI.cpp, cgfxEffectDef.cpp, cgfxEffectDef.h, cgfxShaderCmd.cpp, cgfxShaderNode.cpp, cgfxShaderNode.h, cleanPerFaceAssignmentCmd.cpp, closestPointCmd.cpp, closestPointOnCurveCmd.cpp, closestPointOnCurveNode.cpp, closestPointOnNurbsSurfaceCmd.cpp, closestTangentUAndDistance.cpp, closestTangentUAndDistance.h, clusterWeightFunction.cpp, componentScaleManip.cpp, convertEdgesToFacesCmd.cpp, convertVerticesToEdgesCmd.cpp, convertVerticesToFacesCmd.cpp, curvedArrowsNode.cpp, customAttrManip.cpp, cvColorNode.cpp, cvColorShader.cpp, cvExpandCmd.cpp, cvPosCmd.cpp, D3DGeometryItem.cpp, D3DGeometryItem.h, D3DResourceManager.cpp, D3DResourceManager.h, D3DViewportRenderer.cpp, D3DViewportRenderer.h, dagMessageCmd.cpp, exportJointClusterDataCmd.cpp, exportSkinClusterDataCmd.cpp, findTexturesPerPolygonCmd.cpp, footPrintManip.cpp, footPrintNode.cpp, getPointAndNormal.cpp, getPointAndNormal.h, GLSLShaderNode.cpp, GLSLShaderNode.h, hairCollisionSolver.cpp, helix2Cmd.cpp, helixTool.cpp, hlslShader.cpp, hwAnisotropicShader_NV20.cpp, hwColorPerVertexShader.cpp, hwDecalBumpShader_NV20.cpp, hwManagedTextureShader.cpp, hwPhongShader.cpp, hwPhongShader.h, hwReflectBumpShader_NV20.cpp, hwRefractReflectShader_NV20.cpp, hwToonShader_NV20.cpp, hwUnlitShader.h, instanceCallbackCmd.cpp, instancerListCmd.cpp, intersectCmd.cpp, intersectOnNurbsSurfaceCmd.cpp, lassoTool.cpp, lineManip.cpp, lineManip.h, lineManipContainer.cpp, lineManipContainer.h, listLightLinksCmd.cpp, listPolyHolesCmd.cpp, lockEvent.cpp, maTranslator.cpp, meshMapUtils.cpp, meshMapUtils.h, meshOpCmd.cpp, meshRemapCmd.h, meshRemapTool.cpp, meshReorderCmd.h, meshReorderTool.cpp, motionPathCmd.cpp, moveCurveCVsCmd.cpp, moveManip.cpp, moveNumericTool.cpp, moveTool.cpp, narrowPolyViewer.cpp, narrowPolyViewer.h, narrowPolyViewerCmd.cpp, narrowPolyViewerCmd.h, objExport.cpp, OpenGLViewportRenderer.cpp, OpenGLViewportRenderer.h, peltOverlapCmd.cpp, pnTrianglesNode.cpp, pointOnMeshCmd.cpp, pointOnMeshInfoNode.cpp, polyExporter.cpp, polyExporter.h, polyMessageCmd.cpp, polyModifierCmd.cpp, polyModifierCmd.h, polyRawExporter.cpp, polyRawExporter.h, polyRawWriter.cpp, polyRawWriter.h, polyWriter.cpp, polyWriter.h, polyX3DExporter.cpp, polyX3DExporter.h, polyX3DWriter.cpp, polyX3DWriter.h, quadricShape.cpp, renderViewRenderCmd.cpp, renderViewRenderRegionCmd.cpp, rotateManip.cpp, sampleCmd.cpp, sampleParticles.cpp, scanDagCmd.cpp, scanDagSyntax.cpp, ShapeMonitor.cpp, simpleEmitter.cpp, simpleEmitter.h, simpleSolverNode.cpp, spiralAnimCurveCmd.cpp, splitUVCmd.cpp, squareScaleManip.cpp, squareScaleManip.h, squareScaleManipContext.cpp, squareScaleManipContext.h, surfaceBumpManip.cpp, surfaceTwist.cpp, surfaceTwistCmd.cpp, swissArmyManip.cpp, torusField.cpp, torusField.h, translateCmd.cpp, and zoomCameraCmd.cpp.

`#include <MDagPath.h>`

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.
## 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]`

Search for all occurrences

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:
  - MS::kSuccess Success
  - MS::kInvalidParameter Invalid parameter passed for node - Node is not accessible, does not exist or is not a DAG Node
  - MS::kFailure Unknown failure to determine Paths

MStatus getAPathTo | ( | const MObject & | node,
|  | MDagPath & | path
| ) |  | `[static]`

Search for all occurrences

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:
  - MS::kSuccess Success
  - MS::kInvalidParameter Invalid parameter passed for node - Node is not accessible, does not exist or is not a DAG Node
  - MS::kFailure Unknown failure to determine Path

Examples:
  animInfoCmd.cpp, closestPointCmd.cpp, dagMessageCmd.cpp, intersectCmd.cpp, maTranslator.cpp, polyMessageCmd.cpp, polyModifierCmd.cpp, and simpleSolverNode.cpp.

bool hasFn | ( | MFn::Type | type,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  | const

Search for all occurrences

Returns true if the object at the end of this DAG path supports the given function set.

If the object at the end of this DAG path is a transform node and has a child that is a shape, then that node will be checked as well. All function sets that take an MDagPath

Parameters:

  [in] | type | function set type to check
  [out] | ReturnStatus | status code

Returns:
  Boolean value indicating whether the function set is supported

Status Codes:
  - MS::kSuccess Success
  - MS::kFailure Invalid object

Examples:
  closestPointOnCurveCmd.cpp, cvExpandCmd.cpp, D3DResourceManager.cpp, D3DViewportRenderer.cpp, GLSLShaderNode.cpp, hwColorPerVertexShader.cpp, listLightLinksCmd.cpp, meshRemapTool.cpp, meshReorderTool.cpp, narrowPolyViewer.cpp, objExport.cpp, OpenGLViewportRenderer.cpp, pointOnMeshCmd.cpp, scanDagCmd.cpp, scanDagSyntax.cpp, surfaceTwist.cpp, and surfaceTwistCmd.cpp.

MFn::Type apiType | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

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

Parameters:

  [out] | ReturnStatus | status code

Returns:
  Type of the object

Status Codes:
  - MS::kSuccess Success
  - MS::kFailure Invalid object

Examples:
  cleanPerFaceAssignmentCmd.cpp.

bool isValid | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Determines if Path is valid.

Parameters:

  [out] | ReturnStatus | status code

Returns:
  True if valid

Status Codes:
  - MS::kSuccess Success
  - MS::kFailure Invalid object

Examples:
  cgfxShaderNode.cpp, D3DResourceManager.cpp, D3DViewportRenderer.cpp, dagMessageCmd.cpp, GLSLShaderNode.cpp, instanceCallbackCmd.cpp, motionPathCmd.cpp, and OpenGLViewportRenderer.cpp.

MObject node | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Retrieves the DAG Node for this DAG Path.

Parameters:

  [out] | ReturnStatus | Status Code

Returns:
  DAG Node for this DAG Path

Status Codes:
  - MS::kSuccess Success
  - MS::kFailure Invalid object or no node

Examples:
  animExportUtil.cpp, blindDataShader.cpp, cgfxEffectDef.cpp, closestPointCmd.cpp, closestPointOnCurveCmd.cpp, componentScaleManip.cpp, D3DGeometryItem.cpp, dagMessageCmd.cpp, footPrintNode.cpp, GLSLShaderNode.cpp, hwAnisotropicShader_NV20.cpp, hwColorPerVertexShader.cpp, hwManagedTextureShader.cpp, hwToonShader_NV20.cpp, listPolyHolesCmd.cpp, maTranslator.cpp, meshRemapTool.cpp, meshReorderTool.cpp, objExport.cpp, OpenGLViewportRenderer.cpp, pointOnMeshCmd.cpp, polyMessageCmd.cpp, polyModifierCmd.cpp, and splitUVCmd.cpp.

MObject transform | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Retrieves the lowest Transform in the DAG Path.

Parameters:

  [out] | ReturnStatus | Status Code

Returns:
  Lowest Transform for this DAG Path

Status Codes:
  - MS::kSuccess Success
  - MS::kInvalidParameter This object has no transform (i.e. this is the world node)
  - MS::kFailure Invalid object

Examples:
  dagMessageCmd.cpp, scanDagCmd.cpp, scanDagSyntax.cpp, and spiralAnimCurveCmd.cpp.

unsigned int length | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

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:
  - MS::kSuccess Success
  - MS::kFailure Invalid object

Examples:
  maTranslator.cpp, and ShapeMonitor.cpp.

MStatus extendToShape | ( |  | ) |

Search for all occurrences

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.

NOTE: This method will fail if there multiple shapes below the transform.

Returns:
  Status code

Status Codes:
  - MS::kSuccess operation successful
  - MS::kInvalidParameter DAG path does not lead to a transform or there is no geometry below it
  - MS::kFailure the object is invalid

Examples:
  cleanPerFaceAssignmentCmd.cpp, closestPointOnCurveCmd.cpp, findTexturesPerPolygonCmd.cpp, listLightLinksCmd.cpp, listPolyHolesCmd.cpp, meshOpCmd.cpp, meshRemapTool.cpp, pointOnMeshCmd.cpp, polyMessageCmd.cpp, polyModifierCmd.cpp, and splitUVCmd.cpp.

MStatus extendToShapeDirectlyBelow | ( | unsigned int | index | ) |

Search for all occurrences

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:
  - MS::kSuccess operation successful
  - MS::kInvalidParameter DAG path does not lead to a transform or there is no geometry below it
  - MS::kFailure the object is invalid

MStatus numberOfShapesDirectlyBelow | ( | unsigned int & | num | ) | const

Search for all occurrences

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:
  - MS::kSuccess operation successful
  - MS::kInvalidParameter DAG path does not lead to a transform or there is no geometry below it
  - MS::kFailure the object is invalid

MStatus push | ( | const MObject & | child | ) |

Search for all occurrences

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:
  - MS::kSuccess operation successful
  - MS::kFailure unexpected error or invalid object
  - MS::kInvalidParameter child is invalid or is not a child of the object at the end of this path

MStatus pop | ( | unsigned int | num = `1` | ) |

Search for all occurrences

Pop the given number of objects off of the end of the path.

Parameters:

  [in] | num | number of objects to pop off of the path

Returns:
  Status code

Status Codes:
  - MS::kSuccess operation successful
  - MS::kInvalidParameter the number of objects to pop is greater than the length of the path
  - MS::kFailure the object is invalid

Examples:
  footPrintManip.cpp, footPrintNode.cpp, lineManipContainer.cpp, maTranslator.cpp, narrowPolyViewer.cpp, ShapeMonitor.cpp, and swissArmyManip.cpp.

unsigned int childCount | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Return the number of children that the object at the end of the path has.

Parameters:

  [out] | ReturnStatus | status code

Returns:
  The number of children

Status Codes:
  - MS::kSuccess operation successful
  - MS::kFailure invalid object

Examples:
  animExportUtil.cpp, and OpenGLViewportRenderer.cpp.

MObject child | ( | unsigned int | index,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  | const

Search for all occurrences

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:
  - MS::kSuccess operation successful
  - MS::kInvalidParameter the index is out of range
  - MS::kFailure the object is invalid

MMatrix inclusiveMatrix | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Determines the inclusive matrix of the Path.

Parameters:

  [out] | ReturnStatus | status code

Returns:
  The matrix for all Transforms in the Path including the the end Node in the Path if it is a Transform

Status Codes:
  - MS::kSuccess success
  - MS::kFailure the object is invalid or it has a null path

Examples:
  apiMeshShapeUI.cpp, apiSimpleShapeUI.cpp, cgfxShaderNode.cpp, closestPointCmd.cpp, closestPointOnNurbsSurfaceCmd.cpp, D3DResourceManager.cpp, D3DViewportRenderer.cpp, GLSLShaderNode.cpp, hwAnisotropicShader_NV20.cpp, hwReflectBumpShader_NV20.cpp, hwRefractReflectShader_NV20.cpp, hwToonShader_NV20.cpp, instancerListCmd.cpp, intersectOnNurbsSurfaceCmd.cpp, OpenGLViewportRenderer.cpp, sampleCmd.cpp, and sampleParticles.cpp.

MMatrix exclusiveMatrix | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

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:
  - MS::kSuccess success
  - MS::kFailure the object is invalid

Examples:
  moveManip.cpp.

MMatrix inclusiveMatrixInverse | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

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:
  - MS::kSuccess success
  - MS::kFailure the object is invalid

Examples:
  closestPointOnNurbsSurfaceCmd.cpp, hwAnisotropicShader_NV20.cpp, hwDecalBumpShader_NV20.cpp, hwToonShader_NV20.cpp, and intersectOnNurbsSurfaceCmd.cpp.

MMatrix exclusiveMatrixInverse | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

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:
  - MS::kSuccess success
  - MS::kFailure the object is invalid

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

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 | ) |

Search for all occurrences

Sets this DAG Path equal to the specified DAG Path.

Parameters:

  [in] | src | DAG Path to be copied.

Returns:
  Status code

Status Codes:
  - MS::kSuccess success
  - MS::kFailure the object is invalid

unsigned int pathCount | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Return the number of paths which make up this path.

Parameters:

  [out] | ReturnStatus | status code

Returns:
  The path count

Status Codes:
  - MS::kSuccess success
  - MS::kFailure the object is invalid

Examples:
  maTranslator.cpp.

MStatus getPath | ( | MDagPath & | path,
|  | unsigned int | i = `0`
| ) |  | const

Search for all occurrences

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:
  - MS::kSuccess success
  - MS::kFailure the object is invalid
  - MS::kInvalidParameter 'i' is out of range. Must be < pathCount().

Examples:
  customAttrManip.cpp, footPrintManip.cpp, lineManipContainer.cpp, maTranslator.cpp, moveManip.cpp, and swissArmyManip.cpp.

MString fullPathName | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

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:
  - MS::kSuccess success
  - MS::kFailure the object is invalid

Examples:
  cleanPerFaceAssignmentCmd.cpp, convertEdgesToFacesCmd.cpp, convertVerticesToEdgesCmd.cpp, convertVerticesToFacesCmd.cpp, D3DGeometryItem.cpp, dagMessageCmd.cpp, hwColorPerVertexShader.cpp, instanceCallbackCmd.cpp, instancerListCmd.cpp, listLightLinksCmd.cpp, objExport.cpp, OpenGLViewportRenderer.cpp, renderViewRenderCmd.cpp, renderViewRenderRegionCmd.cpp, scanDagCmd.cpp, and scanDagSyntax.cpp.

MString partialPathName | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

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

The partial path is the minimum path that is still unique. This string may contain wildcards.

Parameters:

  [out] | ReturnStatus | status code

Returns:
  The partial path name

Status Codes:
  - MS::kSuccess success
  - MS::kFailure the object is invalid

Examples:
  cgfxShaderCmd.cpp, cgfxShaderNode.cpp, closestPointOnNurbsSurfaceCmd.cpp, exportJointClusterDataCmd.cpp, exportSkinClusterDataCmd.cpp, hwDecalBumpShader_NV20.cpp, hwReflectBumpShader_NV20.cpp, hwRefractReflectShader_NV20.cpp, hwToonShader_NV20.cpp, intersectOnNurbsSurfaceCmd.cpp, maTranslator.cpp, and narrowPolyViewer.cpp.

bool isInstanced | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

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:
  - MS::kSuccess success
  - MS::kFailure the object is invalid

Examples:
  findTexturesPerPolygonCmd.cpp.

unsigned int instanceNumber | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

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:
  - MS::kSuccess success
  - MS::kFailure the object is invalid

Examples:
  cleanPerFaceAssignmentCmd.cpp, closestPointOnCurveCmd.cpp, cvColorShader.cpp, D3DViewportRenderer.cpp, findTexturesPerPolygonCmd.cpp, and pointOnMeshCmd.cpp.

bool isVisible | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

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:
  - MS::kSuccess success
  - MS::kFailure the object is invalid

bool isTemplated | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

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:
  - MS::kSuccess success
  - MS::kFailure the object is invalid

const char * className | ( |  | ) | `[static]`

Search for all occurrences

Returns the name of this class.

Returns:
  The name of this class.

MDagPath getAPathTo | ( | const MObject & | node,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  | `[static]`

Search for all occurrences

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:
  - MS::kSuccess Success
  - MS::kInvalidParameter Invalid parameter passed for object - Node is not accessible, does not exist or is not a DAG Node
  - MS::kFailure Unknown failure to determine Path

MDagPath MDagPath MDagPath MDagPath MDagPath MDagPath MDagPath MDagPath MDagPath MDagPath
MDagPath MDagPath MDagPath MDagPath MDagPath MDagPath MDagPath MDagPath MDagPath MDagPath