On 06/01/2015 at 21:54, xxxxxxxx wrote:
Hi there. It is possible.
There are a few issues you'll need to address to make this happen:
- regex to split up the file name so you can get the multipass type ( object buffer, diffuse, etc ) I would use http://regex101.com to help you get that all figured out. From there, you can isolate the multipass name and create the directories based on those names.
- How you're going to move/overwrite the files ( new directory or a re-render ). I would recommend shutil.copy2 for both moving and overwriting files. I had issues with shutil.move. Also, you'll want the files that you're going to move in a list and move that list only. Rinse and repeat until the render is done.
try:
if path.exists( existingFile ) :
print " Overwriting " + existingFile
shutil.copy2( fullPath, newDir )
os.remove( fullPath )
else:
print " Moving " + f
shutil.copy2( fullPath, newDir )
os.remove( fullPath )
except IOError as e:
print " File may have already been moved"
except WindowsError as f:
print " File may have already been moved or permission denied"
- I would recommend moving files every so many seconds during the render to avoid a massive pileup of transferring 10000+ files once the render is complete.
while renderCheck == True:
time.sleep ( 5 )
renderCheck = c4d.CheckIsRunning ( c4d.CHECKISRUNNING_EXTERNALRENDERING )
Hopefully this is enough to get you going. 
Have fun!