AWS Thinkbox Discussion Forums

Lightning.dlx - Suppress STDout from 3rd party plugin?

Hi,
Could I just check…does the Lightning.dlx plugin suppress any STDout that might be generated by a 3dsMax 3rd party plugin during network rendering under Deadline?
If so, could you tell me what lines it’s looking for?
Thanks,
Mike

We don’t suppress any stdout coming from the 3dsmax.exe process. Do you know if the plugin writes to stdout, or to 3dsmax’s Max.log file? We currently only pull information from the Max.log file if the render fails.

Thanks Ryan. Good to know. All sorted now. Plugin developer was outputting unicode characters in Max2013 and std::cout doesn’t work with unicode it would seem :slight_smile:

Is it possible for deadline to also capture the stdout btw?

It does already. Any stdout that max prints out should already be showing up in the log.

I see this in the slave logs:

0: INFO: Starting monitored managed process 3dsmaxProcess
0: INFO: Stdout Handling Enabled: False

What does that mean? We have some error logging to std out, which would be nice if deadline picked up on and could fail the task with

Actually, some of the errors are logged into max.log as well as stdout, so this might be all fine. Deadline catches those for sure :slight_smile:

Hi Laszlo,

You would set in the 3dsMax py plugin file towards the bottom of the file, circa line: #1572:

self.StdoutHandling = True

if you wanted to then build functions via RegEx callbacks to handle specific STDout coming from the 3dsMax process. The Maya plugin file has many examples of this. :slight_smile:

Yeah we have been heavily customizing the mayabatch regex functions. Thanks for the pointer to self.StdoutHandling in the 3dsmax.py.

Turned out the lack of stdout was due to our internal implementation of blurpython. I was redirecting the stdout so that we could print it to the mxs listener window…
I turned that off on the slaves now, and i get the std out prints into the deadline log.

Sadly, they come out of sync…

For example, on a 5 frame render, this is the first frame’s entry:

0: INFO: Render Tasks called
0: INFO: STARTED
0: INFO: Lightning: Render frame 1000
0: INFO: Lightning: Overriding save file option to 1
0: INFO: Lightning: Rendering frame \inferno2\projects\test\scenes\TST_000_0000\images\render3d\publishTest2\v0084_lse_test\beautyJPG_qhdx_rlin\TST_000_0000_publishTest2_beautyJPG_v0084_l.1000.jpg
0: INFO: Lightning: Rendering 1 render elements
0: INFO: Lightning: Setting up render parameters
0: INFO: Lightning: Rendering camera node Camera001
0: INFO: Lightning: Checking multipass info for frame 1000
0: INFO: Lightning: Opening renderer
0: INFO: scLog: info !!!
0: INFO: importing scl
0: INFO: creating log
0: INFO: calling log
0: INFO: done
0: INFO: scLog: info IFL flicker fix <---- these messages all print to the std out

Then comes a bunch of render related logs:


0: INFO: Lightning: TYPE_MISSING_EXTERNAL_FILES = FAIL
0: INFO: Lightning: TYPE_MISSING_UVWS = IGNORE
0: INFO: Lightning: TYPE_MISSING_DLL_FILES = FAIL
0: INFO: Lightning: TYPE_MISSING_XREF_FILES = IGNORE
0: INFO: Lightning: Calling renderer
0: INFO: Preparing tone operator.
0: INFO: Preparing camera sampler…
0: INFO: Preparing objects
0: INFO: Loading bitmaps…
0: INFO: Updating objects
0: INFO: Updating instances
0: INFO: Preparing lights
0: INFO: Preparing lights
0: INFO: Preparing lights
etc
etc
etc
The logs of all the other frames:
0: INFO: Lightning: Saved image to \inferno2\projects\test\scenes\TST_000_0000\images\render3d\publishTest2\v0084_lse_test\alphaJPG_qhdx_rlin\TST_000_0000_publishTest2_alphaJPG_v0084_l.1002.jpg
0: INFO: STARTED
0: INFO: Lightning: Render frame 1003
0: INFO: Lightning: Overriding save file option to 1



Then at the very end of the log, the printouts i expected to see at the beginning:

0: INFO: Lightning: CallCurRendererRenderFrame returned code 1
0: INFO: Lightning: Render done
0: STDOUT: (3dsmax): !!!
0: STDOUT: scLog test initializing in farm mode (printing to stdout)
0: STDOUT: (test): debug : New log file created using scLog v0.10
0: STDOUT: (test): debug : Farm mode: True stdout: <open file ‘’, mode ‘w’ at 0x0000000052DC5140>
0: STDOUT: (test): Hello world!
0: STDOUT: (3dsmax): IFL flicker fix

Probably a flushing issue? Hm…

Yeah force flushing after every print is definitely better, but they are still a bit out of order. Seems like we have to keep the DeadlineUtil.LogMessage code in there, instead of just using our regular logging libraries and printing to stdout.

Yeah, I found a similar issue recently when using simple print commands such as:

print "debug: %s" % self.value

in the 3dsMax py plugin. I found the best way was not to force a flush but use the Deadline built in “LogInfo” function to write out the STDout that I wanted. This seems to always be reliable in terms of where it appears in the STDout.

However, I understand what your saying about wanting to keep functions standard within your setup…

Yeah, the problem is i cant call the deadline function from a standalone pythonscript thats running in its own context

Privacy | Site terms | Cookie preferences