Notifications
Clear all

[Closed] setting batchrender outputfile

I’m in process of writing script to automate adding views to batchrender. Locally everything works fine, but when I submit network rendering it doesn’t work.
It seems that setting output file for batchrender job doesn’t work as it should.
But the strangest thing is that locally this code works well.

Here’s the test code:


batch_view = batchRenderMgr.CreateView undefined
batch_view.outputFilename = "d:\picture.jpg"
batchRenderMgr.netRender = true
batchRenderMgr.Render()

I even tried to make bitmap file manually and use its .filename to assign to job’s filename but with no luck.


batch_view = batchRenderMgr.CreateView undefined
batch_view.outputFilename = ""
temp_bitmap=Bitmap 10 10 fileName:temp_path
save temp_bitmap
close temp_bitmap
batch_view.outputFilename = temp_bitmap.fileName
batchRenderMgr.netRender = true
batchRenderMgr.Render()

Any ideas?

Thank you.

1 Reply

I’ve tried to use rendOutputFilename property as an intermediate variable and it leaded to interesting result – when I open new max session and run the script it still fails, saying “Unexpected exception has occured” in backburner, but when I run script once more it works well. And all sequent commits also work. Is there some way to make it work right from the start? I don’t understand what’s happening, it seems like a bug in batchrender. Am I doing something wrong?

test code:


 batch_view = batchRenderMgr.CreateView undefined
rendOutputFilename =  "d:\picture.jpg"
 batch_view.outputFilename = rendOutputFilename
 batchRenderMgr.netRender = true
 batchRenderMgr.Render()