Absolutely, my post was about passing the list to a select command... but yeah, you should remove duplicates if you want to use them for anything else.
On Tue, Mar 10, 2015 at 9:18 PM, Marcus Ottosson <[email protected]> wrote: > You may need to remove duplicates, when there are more than one shape > under a transform. > > from maya import cmds > > transform = cmds.createNode("transform") > shape1 = cmds.createNode("nurbsCurve", parent=transform) > shape2 = cmds.createNode("nurbsCurve", parent=transform) > > shapes = cmds.ls(type="nurbsCurve") > transforms = cmds.listRelatives(shapes, parent=True)assert len(transforms) == > 2 # Should be 1 > > > > -- > 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/CAFRtmOBADKuRRWxYxNrmb4xYsEzqMbSbbSGGzW57PG0oW0v9WQ%40mail.gmail.com > <https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOBADKuRRWxYxNrmb4xYsEzqMbSbbSGGzW57PG0oW0v9WQ%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- 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/CAPamJi8wtgXqkM2MnoPTnJdUUG5FmA%3DinONf%2B0Bi0oiMbKoe3Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
