3dsCmd - pre render script logging

I would like to extend the 3dsCmd plugin and add some additional logging to it. So that these messages will be visible in the DL monitor.

I’ve managed to write custom 3dsCmd Pre Render Script, which makes some checking and logging on the scene file before it starts to render and during rendering. I have override 3dsCmd.py and add some additional stdout handler callbacks with custom logic. The problem I have is that I have no idea how to send a message from pre render script to 3dsCmd plugin. The only solution I see is to communicate via stdoutput, but I don’t know how to write to stdout from maxscript.

I’ve tried to write to the stdout from the 3dsCmd Pre Render Script, but messages do not show up in the deadline/slave logs. I have tested these methods:

  1. use print/format function - the message is not displayed anywhere
  2. use DeadlineUtilStruct methods - it is probably not accessible from pre render script
  3. use maxscript systemlog object - the message is written to Max.log, but is not visible in the slave/deadline log,
  4. write to stdout via custom .NetObject - the message is not visible anywhere
  5. use dosCommand to echo message - the message is also not visible anywhere

My question is. How can I write to stdout from 3dsCmd pre render script? Or how can I send a message from 3dsCmd pre render script to the 3dsCmd plugin?

Regards,
tomasz

There isn’t a good way to pass stdout between the scripts as the handlers are only attached the the process we run.

What data do you want to pass over, and why do you want to do it? I can direct you a bit better once I know that.

I want to calculate the progress of the DBR offload job. I know how to do it, but i need to update the job Render Status and Progress in Monitor. This is why I need to know how to pass a message (some king of string value) to the 3dsCmd.py script. So at the end I can call SetProgress and SetRenderStatus functions with that message as a parameter.

My idea was to write message to stdout in the pre render script. Then catch it in the 3dsCmd using custom StdoutHandler. However, it turned out it is not clear how to write message to the stdout, so that it can be catched in the StdoutHandler.

FYI. So, I’ve actually got this on my ToDo list, but other projects have taken priority of late. I’m planning to take a different approach here, where we will stream the entire V-Ray log into the 3dsCmd & 3dsmax plugin logs. Individual Slaves will then have the V-Ray render log per frame as part of the Deadline log report. In the case of off-load DBR, we can then add StdOut handlers as you mentioned to update job progress. Probably get to this in the next month or so.

It would be great if you’ll be able to implement progress for DBR offload jobs. It’s one of the missing features for us.

I’ve checked what is being written to the VRayLog.txt (verbose level 4) file during rendering. I hoped to find some useful information, but I don’t see any data about job progress. Same applies to Max.log file, but maybe I’m missing something. As I wrote in my first post. I was able to write some text to the Max.log using maxscripts systemlog object. Unfortunately these messages do not show up in the slave log and are not caught by StdoutHandler. Maybe this will change after you make the planned modifications.