Skip to content

Instantly share code, notes, and snippets.

@tokejepsen
Created May 6, 2016 11:31
Show Gist options
  • Save tokejepsen/99af3ef3d3f8595af56e665a1b17bbbb to your computer and use it in GitHub Desktop.
Save tokejepsen/99af3ef3d3f8595af56e665a1b17bbbb to your computer and use it in GitHub Desktop.
alembic testing
import os
import pymel.core as pm
pm.loadPlugin('AbcExport.mll', quiet=True)
pm.loadPlugin('AbcImport.mll', quiet=True)
root = r'L:\ethel_and_ernest_0001\sequences\q060\q060c005\fx\cache'
driven = pm.PyNode('driven').members()
re_sim = []
for node in driven[:5]:
f = os.path.join(root, node.name() + '.abc')
if not os.path.exists(f):
re_sim.append(driven.index(node))
continue
try:
pm.system.createReference(f)
pm.system.FileReference(f).remove()
except:
re_sim.append(driven.index(node))
print re_sim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment