I’ve always had problems when using the NetRender interface and more importantly it lacks a key feature: job dependencies. The most stable and full featured way to submit jobs to backburner has always been manually via the Network Job Assignment dialog and so of course I have automated it. The tricky part was automating the ListView’s & ListBox’s which required some windows messaging and dealing with unmanaged memory.
The attached .ms file holds a single struct called NetRenderAutomation. Usage is as follows:
nra = NetRenderAutomation() nra.specific_servers = #( "render-07", "render-09" ) nra.dependencies = #( "Existing Job Name A", "Existing_Job_Name_B" ) nra.job_name = "test_job_name" -- required nra.job_priority = 53 nra.critical = false nra.SubmitNetRender()
Only the job_name property needs to be specified. All others use default settings.
I've been using it in production for a good year or so in max 2010 and 2011 without a hitch. (Note: I did just do some cleanup for this release so please report any bugs) Also I have only been using the english version of max so it may or may not work with other versions. There are some things that should be considered in your code when using NetRenderAutomation: 1) This is not a full replacement for the NetRender interface. You can not get jobs or servers from this struct. You still need to use NetRender to GET data. 2) Since we're not using NetRender to send the jobs, you will have to specify your custom frame ranges etc via the appropriate global variables (eg. rendStart, rendEnd etc) 3) You will have to use your own code to provide a unique job name. If you don't the automation process just stops. 4) There is a limit to the length of the job name string. Not sure what it is but i've only come across it once with a very long job name. If your job name is greater than this limit, there won't be any error, the job just wont appear in the queue. 5) The popups saying 'you are about to submit a region - are you sure...' is automated to always press 'OK' so you'll have to do your own checking and/or query the user to make sure this is what you want. Feedback welcome
EDIT: i have updated the attached file with a new property to set a specific manager name as requested by Jon Seagull and as a bonus the options to include maps or submit a suspended job:
nra.manager_name = "manager-name" nra.include_maps = true nra.suspended = true
these new properties are optional. if you don’t specify a manager name it will do an automatic search as usual. Tested on 2011 only. Let me know if there’s any issues