Is there a way to get output directories/files of jobs?

And by that I mean the actual folders or files that were generated by say 3ds Max or Nuke jobs.

Because when I try to get the “JobOutputDirectories” job property in my Event Plugin, I get an empty tuple. Same with “JobOutputFileNames”.

What I’m trying to do is to collect the rendered files after the Nuke or 3ds Max jobs have finished. But I don’t see any way to actually access the actual rendered files or at least their directories.

What I was thinking of doing would require modifying the Plugin scripts in a way that I’d add an STDOUT handler and write the file outputs into a job info file, or some other variable that’d be available
after the job is finished in the Event Plugin.

Thanks a lot in advance.

In order for the JobOutputDirectories and JobOutputFileNames properties to contain data, the tool that is submitting the jobs in the first place needs to specify the output paths. This can be done by setting the OutputDirectory# or the OutputFilename# properties in the job info file. Scroll down to the Output Options section here for more info:
thinkboxsoftware.com/deadlin … _Info_File

Deadline doesn’t automatically know where the output is going, which is why you need to set these properties.

Cheers,

  • Ryan

Hmm… I thought it wouldn’t be so easy.

Thanks for the info.

The problem I see with this is especially with 3ds Max as when I’m submitting a 3ds Max job via the Monitor, I have no means of accessing the output dir. I’d have to set that property when Max is already open and the file is loaded. Can this be done? Modifying the job info file when a job is actually running?

With Nuke, I can go through the script file and search for write nodes. The only possible issue is with TCL dynamic outputs (I use them as well).

Ah man, that’s something I didn’t really count with. I’ll have to work around this issue. :frowning:

 Can this be done? Modifying the job info file when a job is actually running?

It could be done, but it require modifying the job xml file since there isn’t an API function to do this. Of course, we always discourage editing files in the repository directly.

Do you know if you can run maxscripts with 3dsmaxcmd.exe? I’m wondering if you could write a script that simply prints the output path to stdout, and you could use that at submission time to get the output path.

Actually, I think I can. Not sure about STDOUT output, but I can use Lightning.dlx methods, can’t I?

But what to do wiht it? I mean, if I print out the save path to the log, what then? How can I pick that up in the Event Plugin?

I guess, it’s not possible then… :cry:

Ok, I’ll modify the SMTD scripts to make them work properly remotely in my pipeline, which could be a potential solution to all this.

Sorry for not getting back to you yesterday. It was a holiday here on Monday.

I was thinking that if 3dsmaxcmd.exe could be used to output a scene’s output path to stdout, you could run it from either the Monitor submitter or the event plugin script as part of the job’s submission process. So Lightning wouldn’t be involved.

I was suggesting this because another client of ours recently did something similar with Softimage. They wrote their own custom submitter that launched xsibatch during submission to run a script that pulled information from the scene file being submitted and then dumped it to stdout so that the submission script could read it back in.

We haven’t done this ourselves mainly because it requires that the software (ie: 3dsmax, Softimage) be installed on the machine that you’re submitting from, which isn’t always the case if someone is using the Monitor submitters.

Cheers,

  • Ryan

Thanks for the tip, but as far as I know, 3dsmaxcmd.exe simply renders out files. It cannot process a script without rendering, for example. Unless, maybe, forcefully exiting in a preRenderScript? Not really sure.

So, possibly the only option left for me would be: this, which seems like too much hassle. :neutral_face:

I’ll see what I can do with IronPython and the IStorage Interface. Otherwise I’ll just use dirty hacks to get my render paths off Max jobs. :smiley:

Just tested the 3dsmaxcmd.exe way and as I suspected. Max renders out the scene immediately and besides I didn’t manage to print anything into the STDOUT. :cry:

I’ll have to improvise…

3dsmax.exe -U maxscript.ms would allow you to fire up 3dsmax and use MXS to get any information you require:
kxcad.net/autodesk/3ds_max/A … _line.html

But this is a bit inefficient :frowning:
Hopefully, eventually the .max file format will be properly readable in the future:-)

Thanks! At least something can be done! :slight_smile:

I agree that this is extremely inefficient (especially when Max 2011 is so slow to start up), but at least there is a way of achieving this.

I hope they’ll open the .max format sooner than later. I really don’t get why Max, such a popular package, is so terrible when it comes to pipeline integrations etc…