View Full Version : backburner Error: Duplicate Job Name
cridalab 07-01-2009, 01:44 AM hello,
I've been having trouble using the backburner interface from maxscript. Here is an example script to send a render of each camera to backburner:
n = NetRender.GetManager()
n.connect #automatic "255.255.255.0"
if n.connected then (
for view in views do (
job = n.newJob()
job.renderCamera = view
job.frameOutputName = view + ".jpg"
job.nonSeqFrames = true
job.frames = "0"
job.submit()
)
)
This works for the first loop, but for later loops I get Error: Duplicate Job Name. However if I change the job name manually with job.name = X then backburner can’t find the file. For instance if my file was called test.max, then the default job name would be test. If I changed the job name to test1 then backburner (for some reason) tries to look for test1.max, which causes an error.
Is there a way to properly submit multiple render jobs to backburner from the same max file?
thanks!
|
|
cridalab
07-06-2009, 11:17 PM
My current solution is to save a temporary max file with a unique name, send it to backburner, then delete the temporary file. Hopefully I can find out the a proper way to do it.
Kramsurfer
07-07-2009, 06:37 PM
What you stated should work fine, by appending a number to the end of a new job's .name property..
Are you changing the name property before the submit() command?
perhaps set the name on the creation of the job..
job = n.newJob name:view.name
the loop var too is a little weird... for view in view do... It works fine, but you should avoid using the same var for a loop var and an array value... I'm assuming the "view" being iterated is an array of just cameras?
PiXeL_MoNKeY
07-07-2009, 07:26 PM
As Kramsurfer said you need to create a unique name inside the loop. Currently you aren't setting a name so it tries to submit based on the current scene name. Note: the name of the current max file doesn't matter as Backburner creates a file based on the job name prior to zipping it up and submitting it.
If you are submitting from a single scene you may want to look at Batch Rendering and its network submission.
-Eric
cridalab
07-08-2009, 12:54 AM
hi,
Very sorry about the typo - my code uses view in views but somehow that last 's' was lost. (views is just an array of camera names, as KramServer guessed)
Are you changing the name property before the submit() command?
perhaps set the name on the creation of the job..
job = n.newJob name:view.name
Are you sure that syntax is valid? When I try setting name like that I get *** -- Runtime error: Not a keyword argument: #name ***
So I have had to set it afterwards before submit().
Note: the name of the current max file doesn't matter as Backburner creates a file based on the job name prior to zipping it up and submitting it.
What I find happens is Backburner zips up the max file, transfers it, then unzips it on the server computer. That all works fine. But then if I change the job name it can't find the unzipped max file, which Backburner assumes has the same file name as the job name.
Kramsurfer
07-08-2009, 01:44 AM
Sorry about that.. name:"" thing... It's not valid...
I ran into a string error when setting the .RenderCamera variable....
This code below creates two cameras and sends then to our BackBurner Render Queue with the job names correlating to the camera name.
views = #( TargetCamera(),TargetCamera())
n = NetRender.GetManager()
n.connect #Manual "qmanager2" port:3234
if n.connected then
(
for view in views do
(
job = n.newJob()
job.name = view.name
job.renderCamera = (view as string)
job.frameOutputName = ("D:\\temp\\"+(view as string) + ".jpg")
job.nonSeqFrames = true
job.frames = "0"
job.submit()
)
)
what Max/ Backburner are you using?
cridalab
07-08-2009, 01:48 AM
Sorry about that.. name:"" thing... It's not valid...
ah OK - I'm glad it's not a version problem.
I ran into a string error when setting the .RenderCamera variable....
My views array actually contains strings, so I don't need to cast them.
what Max/ Backburner are you using?
(Copied from my other post (http://forums.cgsociety.org/showthread.php?f=98&t=783024))
I have 3ds 2009 32-bit, release 11.0 educational.
According to the "Add or Remove Programs" dialog I have Hot Fix 2 2008.04.24
The Backburner version is 2008.1.0.270 and doesn't appear to have any "hot fixes".
Kramsurfer
07-08-2009, 02:14 AM
I had to tweek it alittle to get it to go in 2009, but this worked... We're still on BB2007.1
(
Views = #( (TargetCamera()).name, (TargetCamera()).name )
n = NetRender.GetManager()
n.connect #Manual "qmanager2" port:3234
if n.connected do
(
for View in Views do
(
job = n.newJob()
job.name = View
job.renderCamera = View
job.frameOutputName = ("D:\\temp\\"+View+ ".jpg")
job.nonSeqFrames = true
job.frames = "0"
format "Submiting %\n" job.name
job.submit()
)
)
)
Good luck.. I'm going home.. check in tomorrow..
cridalab
07-08-2009, 11:59 PM
I had to tweek it alittle to get it to go in 2009, but this worked... We're still on BB2007.1
(
Views = #( (TargetCamera()).name, (TargetCamera()).name )
n = NetRender.GetManager()
n.connect #Manual "qmanager2" port:3234
if n.connected do
(
for View in Views do
(
job = n.newJob()
job.name = View
job.renderCamera = View
job.frameOutputName = ("D:\\temp\\"+View+ ".jpg")
job.nonSeqFrames = true
job.frames = "0"
format "Submiting %\n" job.name
job.submit()
)
)
)
hmm, that looks the same as my example. What changes did you have to make to get it working?
To clarify, my example works for sending a single render but fails for multiple because either I don't change the job name and then there is a job conflict, or I change the job name and Backburner can't find the unzipped file.
Possibly the new version of Backburner introduced a bug with job names if that example works on an old version of Backburner. Unfortunately I am not in a position to downgrade our installations.
Richard
PiXeL_MoNKeY
07-09-2009, 03:22 PM
He is setting the job.name value in his example, you are not in your example. You must set the name of the job after you create the job.
-Eric
Kramsurfer
07-09-2009, 05:07 PM
2009 has a service pack..with "Network/Command Line Rendering" fixes..
And a hotfix
Hotfix - Autodesk 3ds Max Design 2009 - 2009.01.19 - "Backburner was not working currently with a limited user account. "
Don't know if it'll fix your issue.. but worth a try...
http://usa.autodesk.com/adsk/servlet/ps/dl/item?siteID=123112&id=12554117&linkID=9241178
I've made the assumption your changing the connect information to reflect you manager... Did you do that?
cridalab
07-10-2009, 12:23 AM
He is setting the job.name value in his example, you are not in your example. You must set the name of the job after you create the job.
-Eric
this was discussed earlier - read over the rest of the thread about my problem with setting the job name
Kramsurfer
07-10-2009, 01:25 AM
Okay.. lets get really basic.
Does this work?
(
n = NetRender.GetManager()
n.connect #Manual "qmanager2" port:3234
Job=n.newJob()
Job.name = "Job One"
Job.submit()
Job=n.newJob()
Job.name = "Job Two"
Job.submit()
)
cridalab
07-12-2009, 11:14 PM
I've got jobs working now! It was a 64 bit problem. There are incompatibilities with sending jobs between 32 and 64 bit versions, so all our computers are 32 bit now.
PiXeL_MoNKeY
07-13-2009, 02:49 PM
You can send jobs to either 32bit or 64bit from either version, but you can't mix. In other words 64bit versions of Max will only work on 64bit versions of Max through backburner.
EDIT: There is an undocumented (not documented in the help file prior to 2010, but listed when using showinterface) platform option when connecting to the manager. m = netRender.getManager()
showinterface m <Interface>Connect <enum>connectMode <string>id port:<enum> platform:<enum>
connectMode enums: {#automatic|#manual}
port enums: {#defaultPort}
port default value: #defaultPort
platform enums: {#32|#64|#default}
platform default value: #default#default will be whatever platform the current max session is. Once you have connected to the manager the platform is what all submitted jobs will be until you connect as a different platform. This allows you to use Maxscript to submit jobs from either to platform to the other.
-Eric
Kramsurfer
07-13-2009, 08:00 PM
boy, that would've been handy to know two years ago... we're all 64 now...
cridalab
07-14-2009, 12:03 AM
thanks for the info PiXeL_MoNKeY. I'll stay with my working solution for now but I'll probably need this in the future.
Richard
CGTalk Moderation
07-14-2009, 12:03 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.