submit via command line to 3dsmax but not render?

Hello,

I need to submit a 3dsmax scene to deadline but I don’t want it to render just launch a script.

I guess I should give a little more information. We have a 3ds Max c++ plugin to make 4k animation previews and would like to send it to deadline to do the animation preview. We would use a script to start the c++ plugin, but how would we tell deadline we are done and not to render?

Thanks
Si

Can you submit a MAXScript job to Deadline using our 3dsmax plugin and in the MAXScript, execute whatever you want and when it’s done, make sure you exit from this script returning True.

docs.thinkboxsoftware.com/produc … ipt-script

You can use our Lightning c++ interface if you need to grab any info/props from the job:
docs.thinkboxsoftware.com/produc … -interface

Thanks mike,
Do you know what the command line is? To send a job and execute a pre and post script? We need to use deadlinecommandbg to come from c++.

so like below this gets our slave pool…

ShellExecute(NULL, L"open", L"cmd", L" /C deadlinecommandbg -outputFiles C:\output.txt C:\exitcode.txt -getslavenamesinpool 3ds_max Assigned", L"C:\Program Files\Thinkbox\Deadline7\bin\", SW_HIDE);

So I guess what I’m looking for is just this part but for the 2 scripts…

deadlinecommandbg -outputFiles C:\output.txt C:\exitcode.txt -getslavenamesinpool 3ds_max Assigned

thanks

Personally, I wouldn’t use any external files to read in any output data such as “c:\output.txt” but rather use .NET Process object. Here’s a snippet example of how we do it in MAXScript just for reference:

fn CallDeadlineCommandInMemory argument multiLine:false timeOut:3600 = ( --Function supports single line and multiline string return local resultMsg = "" try ( local p = dotnetobject "system.diagnostics.process" p.StartInfo.FileName = SMTDPaths.DeadlineExec --path to deadlinecommandbg resolved by env var DEADLINE_PATH p.StartInfo.Arguments = argument p.StartInfo.RedirectStandardOutput = true p.StartInfo.UseShellExecute = false p.StartInfo.CreateNoWindow = true p.Start() if multiLine then local cmdOutput = p.StandardOutput.ReadToEnd() --multiple line output else local cmdOutput = p.StandardOutput.ReadLine() --single line output p.WaitForExit(timeOut) if p.ExitCode == 0 do resultMsg = cmdOutput p.Dispose() p = undefined )catch() resultMsg )

The advantage here, is with multiple simultaneous calls, you don’t need to worry about file collisions. Essentially you are reading the Stdout and not using any external files which would also need cleanup later.

If I understand the first part of your last reply correctly and you want to submit a 3dsmax job which also includes a pre and post job script (note these could be maxscript or Python based and also be for pre/post JOB or pre/post TASK). In any case, I would recommend just manually submitting the job of your choice via the SMTD GUI in 3dsMax and then via Deadline Monitor, double-click the job to open up the job’s “Properties” and click on “Submission Params” and then click on the “Export” button in top right. You will then have the perfect 2 x .job files which can be used to submit this job again via the command line:

docs.thinkboxsoftware.com/produc … sion-files

All our CLI options for generic Deadline job options can be seen in the link above. For any 3dsMax specific ones, it’s probably easiest to manually submit via the GUI and then explore for yourself in the “Submission Params” which are literally nothing more than KEY=VALUE pairs.

Note, you should “include” any scripts you wish to execute when you submit the job. What we refer to as “Auxiliary Files”, which are simply passed to DeadlineCommand.exe during submission, separated by a space character.

Thanks Mike, I will go though the docs.

I was told a year ago when I was asking about TCP/IP access to deadline that the preferred method from c++ was the command line though files. Is this not true?

Thanks
Si

Going via files works as well.

I was told a year ago when I was asking about TCP/IP access to deadline that the preferred method from c++ was the command line though files. Is this not true?

Who said that?

Sorry for the late reply. I was going a render submission tool and wanted to talk to deadline directly though a port. Just like deadlinecommandbg.exe talks to deadline and I was told here on the forum that I couldn’t have access via port. I was told using command line and files are the only way. I would be great to use TCIP via a port for any c++ development.

An alternative is communication via our RESTful web service:
docs.thinkboxsoftware.com/produc … rview.html

That’s cool, thanks Mike