Skip to content

Instantly share code, notes, and snippets.

@JFlynnXYZ
Created December 17, 2015 14:52
Show Gist options
  • Save JFlynnXYZ/d2f47c09e6ea2e51a339 to your computer and use it in GitHub Desktop.
Save JFlynnXYZ/d2f47c09e6ea2e51a339 to your computer and use it in GitHub Desktop.
Find and select all non unique nodes in a Maya scene
allDagNodes = cmds.ls(dag=True, sn=True)
allDagNodesLong = cmds.ls(dag=True, sn=False)
nonUnique = [ node for node in allDagNodes if '|' in node ]
values=[]
for n in nonUnique:
for ln in allDagNodesLong:
if n in ln:
values.append(ln)
print values
cmds.select(values)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment