• 1/3

Getting Backburner status information from MAXScript

Posted by MaxStation, 9 February 2012 12:00 am

A quick look at getting Backburner status information using MAXScript, based on the documentation in the MAXScript help file on NetRender (mainly the examples at the end of the page).

 

Make sure that a job is running before running the code (after the job ended before i finished tested i submitted a 10000 frame job of a box, no output file and task blocking not enabled, that kep it busy logn enough).

 

First we need to connect to the manager, take control (my assumption is that i'm the only one, if the Backburner monitor is running at the same time you'll get an error - so you may want to put some error checking in place) and lock access:

m=netrender.getmanager()
m.connect #manual "bbmanager"
m.getcontrol()
m.Lock
true

 

Then we get a list of jobs and a list of servers (and we make sure that the job and server lists don't get updated whilst we get them):

m.SetUpdates false
j=m.getjobs()
s=m.getservers()
m.SetUpdates
true

 

Then we loop through all servers and print the name and frame index of the current job it's working on (returns undefined if the server isn't working on a job) 

for srv in s do
(
 print srv.name
 print srv.jobFrameIndex
)

 

And finally we disconnect:

m.disconnect()

 

If you want to get more info on jobs you could run this before you disconnect, note that on large jobs it takes a while to get this info!

for job in j do
(
 l=job.GetLog()
 print l
)

 

You can download the file here: backburner-status.zip

3 Comments

jona vark

Posted 9 February 2012 9:25 am

Thank you. This is indeed what the docs state. Have you tested this code?

MaxStation

Posted 10 February 2012 3:22 am

Hi Jona, yes this worked fine for me yesterday (using Backburner 2012.1). But, running the same today it tells me it's rendering frame 268435455 ...

if i call getservers() once with "m.SetUpdates true" instead of "m.SetUpdates false" from then on it does return the correct values, does that work for you?

jona vark

Posted 10 February 2012 8:58 am

Yes.. my results as well! That's a -2. And I could NOT find any documentation on what that means because it isn't in the docs. I wish it were..

Sweet! Let me try that as soon as I can.
I don't consider the status requests updates though.. how does that work?

I am almost overwhelmed to actually get some assistance with this. Thank you so much. I will report my results here so check back in a day or so if you can. ALso, if you get time.. make sure that it still works as I don't understand why these status requests have anything to do with updates.



Add Your Comment

You must be logged in to post a comment. Login here or Register

Please only report comments that are spam or abusive.