HI
Im trying to figure out a way to add all assets present in c4d scenes as aux files on submission. Some of our guys work in Dropbox and the rest of us work from a central server. So i need to get all the scene assets over on the server not just the scene file. The scene file is copied to the server when we submit with “Submit C4D Scene File” checked. Ive poked around in the C4D submitter but im not exactly sure where to tweak it. We are trying to avoid using save project with assets as you have to manually specify the destination folder and file name. Any tips would be appreciated.
Ok. So i figured out how to add asset file paths to the deadlinecommand around line 1808 in the c4d submission script:
args = [ jobInfoFile, pluginInfoFile ]
if submitScene:
#----------Racecar custom---------------#
args.append( sceneFilename )
# Add asset paths here
lastPath = ''
doc = c4d.documents.GetActiveDocument()
assets = c4d.documents.GetAllAssets(doc, False, lastPath, flags=c4d.ASSETDATA_FLAG_NONE)
for asset in assets:
print(asset['filename'])
args.append( asset )
#----------Racecar custom---------------#
But when i try to submit jobs with this tweak i get an error in Cinema saying: “An error occured while submitting the job to Deadline” with no messages in the c4d console. Not sure what im doing wrong.
The error i was getting was due to the render argument becoming too long i think. Not sure though. I havent had time to test this further until now. Ill try some more next week. Ill let you know how it goes.
Thanks for picking up the thread.
Yes, a command line has a maximum length, and having tons of auxiliary files can easily break through the limit.
The trick is to modify the deadlinecommand call to use a text file as the argument, because then you can have an unlimited number of auxiliary files, and no length limit. Basically instead of passing the various arguments to the deadlinecommand, you pass only one argument which is the text file containing all the arguments. Each asset file would then be listed on a separate line of the text file, after you have specified the -submitJob flag, the job info and plugin info files, and the scene file…
It should be rather trivial to modify the script - just create a new text file, dump all the command line arguments into it, and then call deadlinecommand with it as the only argument.