This page shows code with broken formatting. This code is pretty neat and works well too. To use it - run this corrected Python code: # Python codeimport maya.cmds as mcimport maya.OpenMaya as om def getInstances(): instances = [] iterDag = om.MItDag(om.MItDag.kBreadthFirst) while not iterDag.isDone(): instanced =…
Yup, forgot to mention ) Just fixed the code from the link above )) Btw, really handy code, saved it for myself too. It finds ALL instances and tries to make them copies instead. As @Axi5 said, just use getInstances() - but adjust the usage a bit: list( set( mc.listRelatives( getInstances(), ap=1 ) ) ) That's because…