Sometimes you can end up in situations where Maya Nodes don't have unique names. Usually this won't cause issues until you are doing global changes (like the hackamazing workaround where you remove namespaces on export)
Shawn Miller put me onto this handy little snippet to identify nodes that don't have Unique names:
string $allDagNodes[] = `ls -sn -dag`;
for ($node in $allDagNodes) if (`gmatch $node "*|*"`) print ($node+" is not uniquely named");
ahhhh! mel! my EYES!
ReplyDelete```
import maya.cmds as cmds
from collections import defaultdict
def non_unique_names():
multiples = defaultdict(list)
for node in iter(cmds.ls(dag=True, l=True)):
multiples[node.rpartition("|")[-1]].append(node)
return (v for v in multiples.values() if len(v) > 1)
for item in non_unique_names():
print item
```
Yes, fair point :P
Delete