I hope someone can help out. I would like to run a maxscript once a task is complete in deadline. Presently I am trying to run a maxscript with callbacks.addscript #postRender filename:'myscript' applied to the maxfile before submitted to deadline. The deadline job renders a 1X1 image but doesn't save the image. The maxscript does run but stops because(I assume) deadline shutsdown the session because the task is complete.
Thats what I thought I saw in the online manual. But we are using 2.0 and now I have to convince the boss to upgrade. Is there any kind of workaround so I can use 2.0? I thought using the callback would work, I guess not!
If for some reason you don’t want to use our Submit Max To Deadline 2.0 script (SMTD 2.0) that ships with 2.5, but want to submit the job using your own code, you could simply add the line
PostFrameScript=“somescript.ms”
to the Job Info file and also provide the file “somescript.ms” as aux. file parameter in the submitter command line.
The script will be sent to the Job folder in the repository and will be run after each frame.
The MAX plugin in Deadline supports the keys
PreLoadScript=
PostLoadScript=
PreFrameScript=
PostFrameScript=
In addition, you can also turn the complete job into a script job (executing scripts on the network instead of rendering!) which is also supported by the new SMTD 2.0 submission script. The key is
MAXScriptJob=1
When this is set to 0, the job will render as usual. When set to 1, the job will not render but just load the scene and then run the script which is passed as second argument to the submitter after the Max file name. Of course, you could call render() inside that script if you ever need anything to be rendered, but in typical cases we use this for assembling scenes, importing data from other 3D apps and saving the result somewhere on the network, spawning other Deadline jobs and so on.
Note that the pre and post scripts should not call UI-related methods unless the job is running in forced Workstation mode as a copy of Max running in slave mode does not have a UI and some MAXScript command might just not work…
When submitting a MAXScript job, a Tile Rendering job or a Batch Render job using SMTD 2.0, the Workstation mode will be automatically enforced to ensure your scripts can execute any commands. This of course requires enough interactive licenses of Max…
I hope someone can help out. I would like to run a maxscript once a task is complete in deadline. Presently I am trying to run a maxscript with callbacks.addscript #postRender filename:‘myscript’ applied to the maxfile before submitted to deadline. The deadline job renders a 1X1 image but doesn’t save the image. The maxscript does run but stops because(I assume) deadline shutsdown the session because the task is complete.