Actually I started coding using the MitDag, and at the moment I want to find the deepest depth of a hierarchy. But realise that it doenst automatically allow me to do that.
dagIterator= OpenMaya.MItDag( OpenMaya.MItDag.kDepthFirst, OpenMaya.MFn.kInvalid ) selectionList = OpenMaya.MSelectionList() OpenMaya.MGlobal.getActiveSelectionList( selectionList ) dgPath= OpenMaya.MDagPath () selectionList.length() selectionList.getDagPath(0, dgPath) dagIterator.reset(dgPath) dagIterator.depth() On Wednesday, 6 November 2013 16:53:11 UTC+10, Jeremy YeoKhoo wrote: > > Hey guys, > > A relatively easy question for you Maya python API peeps. How would you > traverse down a hierarchy of a DAG node. Essentially if a hierarchy tree > has children of the same appended name, I want to duplicate a single tree > of that child for every children > > > Thanks > -Jeremy > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/70dbafad-5bdd-4e61-80b1-78a97e96a47c%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
