Fix bug in PsychoBlend where render hangs.

This was because it was taking the standard input from Psychopath,
but was buffering it and not reading it.  The percentage complete
printouts would fill the buffer in some cases, and cause the
process to not exit since not all stdout had been handled.
This commit is contained in:
Nathan Vegdahl 2016-07-10 19:31:26 -07:00
parent e2ef44f666
commit c372d485e2

View File

@ -54,7 +54,7 @@ class PsychopathRender(bpy.types.RenderEngine):
# Start Rendering! # Start Rendering!
try: try:
self._process = subprocess.Popen([psy_binary] + args, self._process = subprocess.Popen([psy_binary] + args,
stdout=subprocess.PIPE, stderr=subprocess.STDOUT) stdout=subprocess.DEVNULL, stderr=subprocess.STDOUT)
except OSError: except OSError:
# TODO, report api # TODO, report api
print("Psychopath: could not execute '%s'" % psy_binary) print("Psychopath: could not execute '%s'" % psy_binary)