Post your messages that do not fit in the other rooms here.
3 posts • Page 1 of 1
How do I use the Net Job Events to copy frames in an output folder on a server to an identical folder structure on my workstation after a chunk finishes? I'd like to be able to identify who submitted the job, based on username in RenderPal and copy to their workstation for compositing work. I do not have a lot of Python experience but I am well versed using Windows bat commands?
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)
When running a net job Python event on the server side, all prints go to the output window ("Main program").