Created
September 21, 2016 02:58
-
-
Save patwooky/e571c08f7ec17e81e7c61d30c8eb9c12 to your computer and use it in GitHub Desktop.
to reference a file into the Maya scene for 20 times
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
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