All names in maya are unique*. However all SHORT names are not, the key is to issue maya to give the long names. Maya programming number 1. Use long names if you want to be sure. Not that many do since USUALLY maya detects the need for a long name in firstplace. However not all scripts are created equal sometimes users try to be too smart for their own good and start prsing the names from long names and life goes stadily downhill from there. (well its sortof valid)
So:
- Yes you can rename all clashes, a bit stupid solution. Works, sure but ight break the reason they have the same names.
- Really catch what maya sets the names to in long format, this will never clash.
Is there a way to add "_##" after the name of the objects without using an UI ?
maya does this automatically if it detects the need to do so. Again long names differe so maya may consider not doing it but themn it would spit the long name. But yes actually setting # into the name does this, its NOT a gui feature by the way. it happens in gui simply because it happens in all places.
there is a problem asociated with this. See naming is a bit top heavy operation because its not really easy to avoid extensive testing of some kind. So if you create 100,000,000 objects, and insist on naming them sphere. Then maya will go and name them sphere-sphere99999999. But alas maya will spend the entire loop renaming them since it cheks sphere exists ok lets try sphere1 dang it exists well sphere2 dang again... And theres really NO SANE way to do this sort of thing without going totally nuts on overegineering things and nevr getting anything usefull done from autodesks point of view.
So if you loop then increment yourslef, its easier.
Also if you have namespaces then maya may limit what you see.
So put the frigging -l flag in your querries.
- at all times, if you can prove otherwise then its a SERIOUS A level bug. Never seen one, tough surely ive seen the short names problem. and dont jump to conclusion youve seen one either, you dont have the experience to acctually gauge the fact.