dav...@image-engine.com
unread,Mar 22, 2019, 3:23:03 PM3/22/19Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Python Programming for Autodesk Maya
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??