diff options
author | Martin Poirier <theeth@yahoo.com> | 2012-01-30 05:17:06 +0400 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2012-01-30 05:17:06 +0400 |
commit | 8b56ce969db281579bf35000ef7b20a8d9590dbb (patch) | |
tree | e830df98ba261b4d4133036a653310a10c0afcfc /netrender/client.py | |
parent | 88085b624c2c128710051e3ffc70dc3ab9d53acc (diff) |
netrender (features coded by Philippe van Hecke)
Support for secure connections between Master/client/slave using SSL/HTTPS
Fixed a bug with total job time on web interface (wrong value)
Diffstat (limited to 'netrender/client.py')
-rw-r--r-- | netrender/client.py | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/netrender/client.py b/netrender/client.py index b5f8c31b..069d5bdb 100644 --- a/netrender/client.py +++ b/netrender/client.py @@ -112,10 +112,10 @@ def fillCommonJobSettings(job, job_name, netsettings): elif netsettings.job_type == "JOB_VCS": job.type = netrender.model.JOB_VCS -def sendJob(conn, scene, anim = False): +def sendJob(conn, scene, anim = False, can_save = True): netsettings = scene.network_render if netsettings.job_type == "JOB_BLENDER": - return sendJobBlender(conn, scene, anim) + return sendJobBlender(conn, scene, anim, can_save) elif netsettings.job_type == "JOB_VCS": return sendJobVCS(conn, scene, anim) @@ -171,7 +171,7 @@ def sendJobVCS(conn, scene, anim = False): return job_id -def sendJobBaking(conn, scene): +def sendJobBaking(conn, scene, can_save = True): netsettings = scene.network_render job = netrender.model.RenderJob() @@ -179,6 +179,9 @@ def sendJobBaking(conn, scene): if not os.path.exists(filename): raise RuntimeError("Current file path not defined\nSave your file before sending a job") + + if can_save and netsettings.save_before_job: + bpy.ops.wm.save_mainfile(filepath=filename, check_existing=False) job.addFile(filename) @@ -248,7 +251,7 @@ def sendJobBaking(conn, scene): return job_id -def sendJobBlender(conn, scene, anim = False): +def sendJobBlender(conn, scene, anim = False, can_save = True): netsettings = scene.network_render job = netrender.model.RenderJob() @@ -263,7 +266,7 @@ def sendJobBlender(conn, scene, anim = False): if not os.path.exists(filename): raise RuntimeError("Current file path not defined\nSave your file before sending a job") - if netsettings.save_before_job: + if can_save and netsettings.save_before_job: bpy.ops.wm.save_mainfile(filepath=filename, check_existing=False) job.addFile(filename) @@ -371,7 +374,10 @@ class NetworkRenderEngine(bpy.types.RenderEngine): force = netsettings.use_master_force_upload, path = bpy.path.abspath(netsettings.path), update_stats = self.update_stats, - test_break = self.test_break) + test_break = self.test_break, + use_ssl=netsettings.use_ssl, + cert_path=netsettings.cert_path, + key_path=netsettings.key_path) def render_slave(self, scene): @@ -382,7 +388,7 @@ class NetworkRenderEngine(bpy.types.RenderEngine): self.update_stats("", "Network render client initiation") - conn = clientConnection(netsettings.server_address, netsettings.server_port) + conn = clientConnection(netsettings) if conn: # Sending file @@ -404,7 +410,7 @@ class NetworkRenderEngine(bpy.types.RenderEngine): if response.status == http.client.NO_CONTENT: new_job = True - netsettings.job_id = sendJob(conn, scene) + netsettings.job_id = sendJob(conn, scene, can_save = False) job_id = netsettings.job_id requestResult(conn, job_id, scene.frame_current) |