Evgeniy Zaitsev Technical Artist

11Jan/16Off

get MDagPath() from MObject()

Quick example

 
import maya.OpenMaya as OpenMaya

m_obj       = OpenMaya.MObject() # should get from any code above
m_dagPath   = OpenMaya.MDagPath()
if m_obj.hasFn( OpenMaya.MFn.kDagNode ):
    OpenMaya.MDagPath.getAPathTo( m_obj, m_dagPath )
    print( m_dagPath.fullPathName() )
Comments (0) Trackbacks (0)

Sorry, the comment form is closed at this time.

Trackbacks are disabled.