I am trying to grab only the group nodes within the hierarchy as shown in the screenshot..
While I use this code: sel = cmds.listRelatives(cmds.ls(transforms=True), ap=True, ni=True) print sel It is giving me the following results: [u'Group_1', u'Group_2', u'Group_2', u'Group_2', u'Group_2', u'Group_2', u 'Group_3', u'Group_4', u'Group_5'] Though it gives me duplicated result of certain groups, is this the best way to approach this? I am using Group_ as a generic naming and hence my reluctance to use Group_*, in case you are wondering... <https://lh3.googleusercontent.com/-CzmSA56LEYo/V8TYu5y1iZI/AAAAAAAAAFY/RZFoiyDPCmAjM08aTpaTns3FwR9yQtz-ACLcB/s1600/grp_hie.jpg> -- 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/a70ebb57-f68c-493f-b84a-ba5a52334697%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
