why don’t you just add a hash to the name which auto-numerates nodes without name collision?
import maya.cmds as mc blah = mc.polyCube(n="someBaseName#") # the hash inside the string is legal and will resolve to the next unique int On Mon, Sep 19, 2016 at 3:45 PM, likage <dissidia....@gmail.com> wrote: > ah... I am still trying to get my head around this... > > -- > 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 python_inside_maya+unsubscr...@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/python_inside_maya/1088c21f-6557-4ea2-9904- > dda0477ab32e%40googlegroups.com > <https://groups.google.com/d/msgid/python_inside_maya/1088c21f-6557-4ea2-9904-dda0477ab32e%40googlegroups.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 python_inside_maya+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CABPXW4g4ZVifT7iZXfF7dXb2440VP%3D49A4-Mpm1QibDVyvGA%2Bg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.