Hi, I need to traverse the dependency graph in search of input node of a specified api type (let it be skinCluster). Most of the tutorials online show a methot that goes like this (api 2.0):
s_list = OpenMaya.MGlobal.getActiveSelectionList()
d_node = s_list.getDependNode(0)
it = OpenMaya.MItDependencyGraph(
d_node, OpenMaya.MItDependencyGraph.kDownstream)
while not it.isDone():
current_item = it.currentNode()
print(current_item.apiType())
it.next()
As far as I know this should be the way to print out all api types of input nodes down the line (at least the shape node), however, when ran with a mesh selected (object mode) it prints out 110, which is the apiType of a transform node. And that’s it, like there was nothing more there. Am I missing something here? It looks like the method either doesn’t work like it used to, or I forgot to pass some sort of parameter. I’m using Maya 2022 btw.
Now the important thing - i need to solve it without cmds and PyMel.