Here is the Python script I came up with... The Python works in Maya to copy the files, however, in RenderPal I get nothing once the job completes. I am running the Python script from Server once netjob completes. I am running the RenderPal Server under my user name so it should have access to my mapped network drives. In this case my workstation folder. Should I get some kind of prompt from RenderPal on my print commands?
- Code: Select all
import os
import shutil
def copytree(src, dst, symlinks=False, ignore=None):
for item in os.listdir(src):
s = os.path.join(src, item)
d = os.path.join(dst, item)
if os.path.isdir(s):
print 'No Folder Exists...Copying Tree'
shutil.copytree(s, d, symlinks, ignore)
else:
print 'Folder Exists...Copying Contents'
shutil.copy2(s, d)
print '...Copying Files...'
#getting the top folder location of my rendered images on this job from RenderPal
networkLoc = '$(RenderSet.outdir)'
#this is mapped to my shared workstation folder that can be accessed by my username
workstationLoc = 'B:\\ImagesLocation\\'
copytree (networkLoc, workstationLoc)