Skip to content

Instantly share code, notes, and snippets.

@patwooky
Created September 21, 2016 02:58
Show Gist options
  • Save patwooky/e571c08f7ec17e81e7c61d30c8eb9c12 to your computer and use it in GitHub Desktop.
Save patwooky/e571c08f7ec17e81e7c61d30c8eb9c12 to your computer and use it in GitHub Desktop.
to reference a file into the Maya scene for 20 times
'''
to reference a file into the Maya scene for 20 times
'''
from pymel.core import *
sourceFile = r'E:\myTestReference.ma' # provide a full path to your reference file
for x in range(20):
refNode = createReference(sourceFile, namespace='')
# refNode is a FileReference node
print 'created refNode:', repr(refNode)
# Result: FileReference(u'E:/myTestReference.ma', refnode=u'myTestReferneceRN')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment