Uh, I can see that "delete" also takes forever, so please take this into account as well
On Dec 8, 3:16 pm, Sune <[email protected]> wrote: > Hi, > > I need to look at a bunch of nodes and check if they have more than > one connections. Alternatively I can check if a specific attrubte has > an outgoing connection. The problem if that there are 200000+ of these > nodes in some scenes, so "listConnections" on all of them just takes a > bit too long :-) > > Current code: > > for g in ls(type='groupId'): > if 2 > len(listConnections(g, destination=True, source=False)): > delete(g) > > So any input on some optimised code to do this would be great! Maybe > some openmaya? I have pymel installed. > > Thanks, > Sune -- http://groups.google.com/group/python_inside_maya
