Skip to content

Instantly share code, notes, and snippets.

@tokejepsen
Created July 16, 2013 14:09
Show Gist options
  • Save tokejepsen/6009055 to your computer and use it in GitHub Desktop.
Save tokejepsen/6009055 to your computer and use it in GitHub Desktop.
Maya empty reference flush
import maya.cmds as cmds
for ref in cmds.ls(type='reference'):
try:
cmds.referenceQuery(ref,filename=True)
except:
cmds.lockNode(ref,l=False)
cmds.delete(ref)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment