Hi Guys,

I run into an issue. The MItDependencyGraph doesn't give all the nodes.
I want the same result as using cmds.listHistory().
I tried many different settings, and flags but it didn't work.
Any idea?


import maya.api.OpenMaya as om2

cmds.polySphere()
cmds.polySphere()
cmds.blendShape('pSphere2', 'pSphere1')

sel = om2.MSelectionList()
sel.add('pSphereShape1')
mobj = sel.getDependNode(0)
it = om2.MItDependencyGraph(mobj, om2.MFn.kInvalid)
it.traversingOverWorldSpaceDependents = True
it.pruningOnFilter = False
fnNode = om2.MFnDependencyNode()

while not it.isDone():
    currItem = it.currentNode()
    fnNode.setObject(currItem)
    print fnNode.name()
    it.next()

# Result:
# pSphereShape1
# initialShadingGroup
# blendShape1Set
# tweakSet1
# Where is the blendshape, origin, etc node??

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/0588ceda-696b-486e-b6da-a7fdee819348%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to