netrender: bugfix to make thumbnails work correctly when running master through the UI (not in background) [context is borked in that case]. Also show number of threads settings in slave settings (reusing render setting) and force that setting when rendering jobs.

This commit is contained in:
Martin Poirier
2010-01-08 17:52:21 +00:00
parent 1f1245a92a
commit eb2e64afa5
4 changed files with 11 additions and 6 deletions

View File

@@ -88,7 +88,7 @@ def testFile(conn, job_id, slave_id, file_index, JOB_PREFIX, file_path, main_pat
return job_full_path
def render_slave(engine, netsettings):
def render_slave(engine, netsettings, threads):
timeout = 1
engine.update_stats("", "Network render node initiation")
@@ -151,7 +151,7 @@ def render_slave(engine, netsettings):
frame_args += ["-f", str(frame.number)]
val = SetErrorMode()
process = subprocess.Popen([BLENDER_PATH, "-b", "-noaudio", job_full_path, "-o", JOB_PREFIX + "######", "-E", "BLENDER_RENDER", "-F", "MULTILAYER"] + frame_args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
process = subprocess.Popen([BLENDER_PATH, "-b", "-noaudio", job_full_path, "-t", str(threads), "-o", JOB_PREFIX + "######", "-E", "BLENDER_RENDER", "-F", "MULTILAYER"] + frame_args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
RestoreErrorMode(val)
elif job.type == netrender.model.JOB_PROCESS:
command = job.frames[0].command
@@ -165,7 +165,7 @@ def render_slave(engine, netsettings):
stdout = bytes()
run_t = time.time()
while not cancelled and process.poll() == None:
stdout += process.stdout.read(32)
stdout += process.stdout.read(1024)
current_t = time.time()
cancelled = engine.test_break()
if current_t - run_t > CANCEL_POLL_SPEED: