| 
									
										
										
										
											2009-11-01 15:21:20 +00:00
										 |  |  | # ##### BEGIN GPL LICENSE BLOCK ##### | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | #  This program is free software; you can redistribute it and/or | 
					
						
							|  |  |  | #  modify it under the terms of the GNU General Public License | 
					
						
							|  |  |  | #  as published by the Free Software Foundation; either version 2 | 
					
						
							|  |  |  | #  of the License, or (at your option) any later version. | 
					
						
							|  |  |  | #  | 
					
						
							|  |  |  | #  This program is distributed in the hope that it will be useful, | 
					
						
							|  |  |  | #  but WITHOUT ANY WARRANTY; without even the implied warranty of | 
					
						
							|  |  |  | #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
					
						
							|  |  |  | #  GNU General Public License for more details. | 
					
						
							|  |  |  | #  | 
					
						
							|  |  |  | #  You should have received a copy of the GNU General Public License | 
					
						
							|  |  |  | #  along with this program; if not, write to the Free Software Foundation, | 
					
						
							|  |  |  | #  Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | # ##### END GPL LICENSE BLOCK ##### | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-08-29 17:25:22 +00:00
										 |  |  | import bpy | 
					
						
							|  |  |  | import sys, os | 
					
						
							|  |  |  | import http, http.client, http.server, urllib | 
					
						
							|  |  |  | import subprocess, shutil, time, hashlib | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-18 18:00:46 +00:00
										 |  |  | import netrender | 
					
						
							| 
									
										
										
										
											2009-08-29 17:25:22 +00:00
										 |  |  | import netrender.slave as slave | 
					
						
							|  |  |  | import netrender.master as master | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-08 01:18:06 +00:00
										 |  |  | from netrender.utils import * | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-08-29 17:25:22 +00:00
										 |  |  | VERSION = b"0.3" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | PATH_PREFIX = "/tmp/" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | QUEUED = 0 | 
					
						
							|  |  |  | DISPATCHED = 1 | 
					
						
							|  |  |  | DONE = 2 | 
					
						
							|  |  |  | ERROR = 3 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class RenderButtonsPanel(bpy.types.Panel): | 
					
						
							| 
									
										
										
										
											2009-10-31 13:31:23 +00:00
										 |  |  | 	bl_space_type = "PROPERTIES" | 
					
						
							|  |  |  | 	bl_region_type = "WINDOW" | 
					
						
							|  |  |  | 	bl_context = "render" | 
					
						
							| 
									
										
										
										
											2009-08-29 17:25:22 +00:00
										 |  |  | 	# COMPAT_ENGINES must be defined in each subclass, external engines can add themselves here | 
					
						
							|  |  |  | 	 | 
					
						
							|  |  |  | 	def poll(self, context): | 
					
						
							|  |  |  | 		rd = context.scene.render_data | 
					
						
							|  |  |  | 		return (rd.use_game_engine==False) and (rd.engine in self.COMPAT_ENGINES) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Setting panel, use in the scene for now. | 
					
						
							| 
									
										
										
										
											2009-09-10 20:41:18 +00:00
										 |  |  | @rnaType | 
					
						
							| 
									
										
										
										
											2009-10-14 14:45:58 +00:00
										 |  |  | class RENDER_PT_network_settings(RenderButtonsPanel): | 
					
						
							| 
									
										
										
										
											2009-10-31 13:31:23 +00:00
										 |  |  | 	bl_label = "Network Settings" | 
					
						
							| 
									
										
										
										
											2009-08-29 17:25:22 +00:00
										 |  |  | 	COMPAT_ENGINES = set(['NET_RENDER']) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	def draw(self, context): | 
					
						
							|  |  |  | 		layout = self.layout | 
					
						
							| 
									
										
										
										
											2009-09-27 11:00:35 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-08-29 17:25:22 +00:00
										 |  |  | 		scene = context.scene | 
					
						
							|  |  |  | 		rd = scene.render_data | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		layout.active = True | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		split = layout.split() | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  | 		col.prop(scene.network_render, "mode") | 
					
						
							|  |  |  | 		col.prop(scene.network_render, "path") | 
					
						
							|  |  |  | 		col.prop(scene.network_render, "server_address") | 
					
						
							|  |  |  | 		col.prop(scene.network_render, "server_port") | 
					
						
							| 
									
										
										
										
											2009-09-15 19:53:18 +00:00
										 |  |  | 		 | 
					
						
							|  |  |  | 		if scene.network_render.mode == "RENDER_MASTER": | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  | 			col.prop(scene.network_render, "server_broadcast") | 
					
						
							| 
									
										
										
										
											2009-09-15 19:53:18 +00:00
										 |  |  | 		else: | 
					
						
							| 
									
										
										
										
											2009-12-10 10:23:53 +00:00
										 |  |  | 			col.operator("render.netclientscan", icon='FILE_REFRESH', text="") | 
					
						
							| 
									
										
										
										
											2009-09-26 19:50:59 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | @rnaType | 
					
						
							| 
									
										
										
										
											2009-10-14 14:45:58 +00:00
										 |  |  | class RENDER_PT_network_job(RenderButtonsPanel): | 
					
						
							| 
									
										
										
										
											2009-10-31 13:31:23 +00:00
										 |  |  | 	bl_label = "Job Settings" | 
					
						
							| 
									
										
										
										
											2009-09-26 19:50:59 +00:00
										 |  |  | 	COMPAT_ENGINES = set(['NET_RENDER']) | 
					
						
							|  |  |  | 	 | 
					
						
							|  |  |  | 	def poll(self, context): | 
					
						
							|  |  |  | 		scene = context.scene | 
					
						
							|  |  |  | 		return super().poll(context) and scene.network_render.mode == "RENDER_CLIENT" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	def draw(self, context): | 
					
						
							|  |  |  | 		layout = self.layout | 
					
						
							| 
									
										
										
										
											2009-09-27 11:00:35 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-26 19:50:59 +00:00
										 |  |  | 		scene = context.scene | 
					
						
							|  |  |  | 		rd = scene.render_data | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		layout.active = True | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		split = layout.split() | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		col = split.column() | 
					
						
							| 
									
										
										
										
											2009-12-10 10:23:53 +00:00
										 |  |  | 		col.operator("render.netclientanim", icon='RENDER_ANIMATION') | 
					
						
							|  |  |  | 		col.operator("render.netclientsend", icon='FILE_BLEND') | 
					
						
							|  |  |  | 		col.operator("render.netclientweb", icon='QUESTION') | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  | 		col.prop(scene.network_render, "job_name") | 
					
						
							| 
									
										
										
										
											2009-12-10 18:56:21 +00:00
										 |  |  | 		col.prop(scene.network_render, "job_category") | 
					
						
							| 
									
										
										
										
											2009-10-15 17:18:47 +00:00
										 |  |  | 		row = col.row() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  | 		row.prop(scene.network_render, "priority") | 
					
						
							|  |  |  | 		row.prop(scene.network_render, "chunks") | 
					
						
							| 
									
										
										
										
											2009-08-29 17:25:22 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-10 20:41:18 +00:00
										 |  |  | @rnaType | 
					
						
							| 
									
										
										
										
											2009-10-14 14:45:58 +00:00
										 |  |  | class RENDER_PT_network_slaves(RenderButtonsPanel): | 
					
						
							| 
									
										
										
										
											2009-10-31 13:31:23 +00:00
										 |  |  | 	bl_label = "Slaves Status" | 
					
						
							| 
									
										
										
										
											2009-08-29 17:25:22 +00:00
										 |  |  | 	COMPAT_ENGINES = set(['NET_RENDER']) | 
					
						
							|  |  |  | 	 | 
					
						
							|  |  |  | 	def poll(self, context): | 
					
						
							|  |  |  | 		scene = context.scene | 
					
						
							|  |  |  | 		return super().poll(context) and scene.network_render.mode == "RENDER_CLIENT" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	def draw(self, context): | 
					
						
							|  |  |  | 		layout = self.layout | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		scene = context.scene | 
					
						
							| 
									
										
										
										
											2009-09-08 01:18:06 +00:00
										 |  |  | 		netsettings = scene.network_render | 
					
						
							| 
									
										
										
										
											2009-08-29 17:25:22 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 		row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-09-08 01:18:06 +00:00
										 |  |  | 		row.template_list(netsettings, "slaves", netsettings, "active_slave_index", rows=2) | 
					
						
							| 
									
										
										
										
											2009-08-29 17:25:22 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-15 17:18:47 +00:00
										 |  |  | 		sub = row.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-12-10 10:23:53 +00:00
										 |  |  | 		sub.operator("render.netclientslaves", icon='FILE_REFRESH', text="") | 
					
						
							|  |  |  | 		sub.operator("render.netclientblacklistslave", icon='ZOOMOUT', text="") | 
					
						
							| 
									
										
										
										
											2009-08-29 17:25:22 +00:00
										 |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-11-18 18:00:46 +00:00
										 |  |  | 		if len(netrender.slaves) == 0 and len(netsettings.slaves) > 0: | 
					
						
							| 
									
										
										
										
											2009-09-08 01:18:06 +00:00
										 |  |  | 			while(len(netsettings.slaves) > 0): | 
					
						
							|  |  |  | 				netsettings.slaves.remove(0) | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		if netsettings.active_slave_index >= 0 and len(netsettings.slaves) > 0: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  | 			layout.separator() | 
					
						
							| 
									
										
										
										
											2009-08-29 17:25:22 +00:00
										 |  |  | 			 | 
					
						
							| 
									
										
										
										
											2009-11-18 18:00:46 +00:00
										 |  |  | 			slave = netrender.slaves[netsettings.active_slave_index] | 
					
						
							| 
									
										
										
										
											2009-08-29 17:25:22 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  | 			layout.label(text="Name: " + slave.name) | 
					
						
							|  |  |  | 			layout.label(text="Address: " + slave.address[0]) | 
					
						
							|  |  |  | 			layout.label(text="Seen: " + time.ctime(slave.last_seen)) | 
					
						
							|  |  |  | 			layout.label(text="Stats: " + slave.stats) | 
					
						
							| 
									
										
										
										
											2009-08-29 17:25:22 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-10 20:41:18 +00:00
										 |  |  | @rnaType | 
					
						
							| 
									
										
										
										
											2009-10-14 14:45:58 +00:00
										 |  |  | class RENDER_PT_network_slaves_blacklist(RenderButtonsPanel): | 
					
						
							| 
									
										
										
										
											2009-10-31 13:31:23 +00:00
										 |  |  | 	bl_label = "Slaves Blacklist" | 
					
						
							| 
									
										
										
										
											2009-08-29 17:25:22 +00:00
										 |  |  | 	COMPAT_ENGINES = set(['NET_RENDER']) | 
					
						
							|  |  |  | 	 | 
					
						
							|  |  |  | 	def poll(self, context): | 
					
						
							|  |  |  | 		scene = context.scene | 
					
						
							|  |  |  | 		return super().poll(context) and scene.network_render.mode == "RENDER_CLIENT" | 
					
						
							|  |  |  | 	 | 
					
						
							|  |  |  | 	def draw(self, context): | 
					
						
							|  |  |  | 		layout = self.layout | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		scene = context.scene | 
					
						
							| 
									
										
										
										
											2009-09-08 01:18:06 +00:00
										 |  |  | 		netsettings = scene.network_render | 
					
						
							| 
									
										
										
										
											2009-08-29 17:25:22 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 		row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-09-08 01:18:06 +00:00
										 |  |  | 		row.template_list(netsettings, "slaves_blacklist", netsettings, "active_blacklisted_slave_index", rows=2) | 
					
						
							| 
									
										
										
										
											2009-08-29 17:25:22 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-15 17:18:47 +00:00
										 |  |  | 		sub = row.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-12-10 10:23:53 +00:00
										 |  |  | 		sub.operator("render.netclientwhitelistslave", icon='ZOOMOUT', text="") | 
					
						
							| 
									
										
										
										
											2009-08-29 17:25:22 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-18 18:00:46 +00:00
										 |  |  | 		if len(netrender.blacklist) == 0 and len(netsettings.slaves_blacklist) > 0: | 
					
						
							| 
									
										
										
										
											2009-09-08 01:18:06 +00:00
										 |  |  | 			while(len(netsettings.slaves_blacklist) > 0): | 
					
						
							|  |  |  | 				netsettings.slaves_blacklist.remove(0) | 
					
						
							| 
									
										
										
										
											2009-08-29 17:25:22 +00:00
										 |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-09-08 01:18:06 +00:00
										 |  |  | 		if netsettings.active_blacklisted_slave_index >= 0 and len(netsettings.slaves_blacklist) > 0: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  | 			layout.separator() | 
					
						
							| 
									
										
										
										
											2009-08-29 17:25:22 +00:00
										 |  |  | 			 | 
					
						
							| 
									
										
										
										
											2009-11-18 18:00:46 +00:00
										 |  |  | 			slave = netrender.blacklist[netsettings.active_blacklisted_slave_index] | 
					
						
							| 
									
										
										
										
											2009-08-29 17:25:22 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  | 			layout.label(text="Name: " + slave.name) | 
					
						
							|  |  |  | 			layout.label(text="Address: " + slave.address[0]) | 
					
						
							|  |  |  | 			layout.label(text="Seen: " + time.ctime(slave.last_seen)) | 
					
						
							|  |  |  | 			layout.label(text="Stats: " + slave.stats) | 
					
						
							| 
									
										
										
										
											2009-08-29 17:25:22 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-10 20:41:18 +00:00
										 |  |  | @rnaType | 
					
						
							| 
									
										
										
										
											2009-10-14 14:45:58 +00:00
										 |  |  | class RENDER_PT_network_jobs(RenderButtonsPanel): | 
					
						
							| 
									
										
										
										
											2009-10-31 13:31:23 +00:00
										 |  |  | 	bl_label = "Jobs" | 
					
						
							| 
									
										
										
										
											2009-08-29 17:25:22 +00:00
										 |  |  | 	COMPAT_ENGINES = set(['NET_RENDER']) | 
					
						
							|  |  |  | 	 | 
					
						
							|  |  |  | 	def poll(self, context): | 
					
						
							|  |  |  | 		scene = context.scene | 
					
						
							|  |  |  | 		return super().poll(context) and scene.network_render.mode == "RENDER_CLIENT" | 
					
						
							|  |  |  | 	 | 
					
						
							|  |  |  | 	def draw(self, context): | 
					
						
							|  |  |  | 		layout = self.layout | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		scene = context.scene | 
					
						
							| 
									
										
										
										
											2009-09-08 01:18:06 +00:00
										 |  |  | 		netsettings = scene.network_render | 
					
						
							| 
									
										
										
										
											2009-08-29 17:25:22 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 		row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-09-08 01:18:06 +00:00
										 |  |  | 		row.template_list(netsettings, "jobs", netsettings, "active_job_index", rows=2) | 
					
						
							| 
									
										
										
										
											2009-08-29 17:25:22 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-15 17:18:47 +00:00
										 |  |  | 		sub = row.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-12-10 10:23:53 +00:00
										 |  |  | 		sub.operator("render.netclientstatus", icon='FILE_REFRESH', text="") | 
					
						
							|  |  |  | 		sub.operator("render.netclientcancel", icon='ZOOMOUT', text="") | 
					
						
							|  |  |  | 		sub.operator("render.netclientcancelall", icon='PANEL_CLOSE', text="") | 
					
						
							|  |  |  | 		sub.operator("render.netclientdownload", icon='RENDER_ANIMATION', text="") | 
					
						
							| 
									
										
										
										
											2009-08-29 17:25:22 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-18 18:00:46 +00:00
										 |  |  | 		if len(netrender.jobs) == 0 and len(netsettings.jobs) > 0: | 
					
						
							| 
									
										
										
										
											2009-09-08 01:18:06 +00:00
										 |  |  | 			while(len(netsettings.jobs) > 0): | 
					
						
							|  |  |  | 				netsettings.jobs.remove(0) | 
					
						
							| 
									
										
										
										
											2009-08-29 17:25:22 +00:00
										 |  |  | 		 | 
					
						
							| 
									
										
										
										
											2009-09-08 01:18:06 +00:00
										 |  |  | 		if netsettings.active_job_index >= 0 and len(netsettings.jobs) > 0: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  | 			layout.separator() | 
					
						
							| 
									
										
										
										
											2009-08-29 17:25:22 +00:00
										 |  |  | 			 | 
					
						
							| 
									
										
										
										
											2009-11-18 18:00:46 +00:00
										 |  |  | 			job = netrender.jobs[netsettings.active_job_index] | 
					
						
							| 
									
										
										
										
											2009-08-29 17:25:22 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  | 			layout.label(text="Name: %s" % job.name) | 
					
						
							|  |  |  | 			layout.label(text="Length: %04i" % len(job)) | 
					
						
							|  |  |  | 			layout.label(text="Done: %04i" % job.results[DONE]) | 
					
						
							|  |  |  | 			layout.label(text="Error: %04i" % job.results[ERROR]) | 
					
						
							| 
									
										
										
										
											2009-08-29 17:25:22 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-10 20:41:18 +00:00
										 |  |  | @rnaType | 
					
						
							| 
									
										
										
										
											2009-08-29 17:25:22 +00:00
										 |  |  | class NetRenderSettings(bpy.types.IDPropertyGroup): | 
					
						
							|  |  |  | 	pass | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-10 20:41:18 +00:00
										 |  |  | @rnaType | 
					
						
							| 
									
										
										
										
											2009-08-29 17:25:22 +00:00
										 |  |  | class NetRenderSlave(bpy.types.IDPropertyGroup): | 
					
						
							|  |  |  | 	pass | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-10 20:41:18 +00:00
										 |  |  | @rnaType | 
					
						
							| 
									
										
										
										
											2009-08-29 17:25:22 +00:00
										 |  |  | class NetRenderJob(bpy.types.IDPropertyGroup): | 
					
						
							|  |  |  | 	pass | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | bpy.types.Scene.PointerProperty(attr="network_render", type=NetRenderSettings, name="Network Render", description="Network Render Settings") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | NetRenderSettings.StringProperty( attr="server_address", | 
					
						
							|  |  |  | 				name="Server address", | 
					
						
							|  |  |  | 				description="IP or name of the master render server", | 
					
						
							|  |  |  | 				maxlen = 128, | 
					
						
							| 
									
										
										
										
											2009-09-15 19:53:18 +00:00
										 |  |  | 				default = "[default]") | 
					
						
							| 
									
										
										
										
											2009-08-29 17:25:22 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | NetRenderSettings.IntProperty( attr="server_port", | 
					
						
							|  |  |  | 				name="Server port", | 
					
						
							|  |  |  | 				description="port of the master render server", | 
					
						
							|  |  |  | 				default = 8000, | 
					
						
							|  |  |  | 				min=1, | 
					
						
							|  |  |  | 				max=65535) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-15 19:53:18 +00:00
										 |  |  | NetRenderSettings.BoolProperty( attr="server_broadcast", | 
					
						
							|  |  |  | 				name="Broadcast server address", | 
					
						
							|  |  |  | 				description="broadcast server address on local network", | 
					
						
							|  |  |  | 				default = True) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-06 21:28:45 +00:00
										 |  |  | default_path = os.environ.get("TEMP", None) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if not default_path: | 
					
						
							|  |  |  | 	if os.name == 'nt': | 
					
						
							|  |  |  | 		default_path = "c:/tmp/" | 
					
						
							|  |  |  | 	else: | 
					
						
							|  |  |  | 		default_path = "/tmp/" | 
					
						
							|  |  |  | elif not default_path.endswith(os.sep): | 
					
						
							|  |  |  | 	default_path += os.sep | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | NetRenderSettings.StringProperty( attr="path", | 
					
						
							|  |  |  | 				name="Path", | 
					
						
							|  |  |  | 				description="Path for temporary files", | 
					
						
							|  |  |  | 				maxlen = 128, | 
					
						
							|  |  |  | 				default = default_path) | 
					
						
							| 
									
										
										
										
											2009-09-01 01:09:05 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-08-29 17:25:22 +00:00
										 |  |  | NetRenderSettings.StringProperty( attr="job_name", | 
					
						
							|  |  |  | 				name="Job name", | 
					
						
							|  |  |  | 				description="Name of the job", | 
					
						
							|  |  |  | 				maxlen = 128, | 
					
						
							|  |  |  | 				default = "[default]") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-10 18:56:21 +00:00
										 |  |  | NetRenderSettings.StringProperty( attr="job_category", | 
					
						
							|  |  |  | 				name="Job category", | 
					
						
							|  |  |  | 				description="Category of the job", | 
					
						
							|  |  |  | 				maxlen = 128, | 
					
						
							|  |  |  | 				default = "") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-08-29 17:25:22 +00:00
										 |  |  | NetRenderSettings.IntProperty( attr="chunks", | 
					
						
							|  |  |  | 				name="Chunks", | 
					
						
							|  |  |  | 				description="Number of frame to dispatch to each slave in one chunk", | 
					
						
							|  |  |  | 				default = 5, | 
					
						
							|  |  |  | 				min=1, | 
					
						
							|  |  |  | 				max=65535) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-01 01:09:05 +00:00
										 |  |  | NetRenderSettings.IntProperty( attr="priority", | 
					
						
							|  |  |  | 				name="Priority", | 
					
						
							|  |  |  | 				description="Priority of the job", | 
					
						
							|  |  |  | 				default = 1, | 
					
						
							|  |  |  | 				min=1, | 
					
						
							|  |  |  | 				max=10) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-08-29 17:25:22 +00:00
										 |  |  | NetRenderSettings.StringProperty( attr="job_id", | 
					
						
							|  |  |  | 				name="Network job id", | 
					
						
							|  |  |  | 				description="id of the last sent render job", | 
					
						
							|  |  |  | 				maxlen = 64, | 
					
						
							|  |  |  | 				default = "") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | NetRenderSettings.IntProperty( attr="active_slave_index", | 
					
						
							|  |  |  | 				name="Index of the active slave", | 
					
						
							|  |  |  | 				description="", | 
					
						
							|  |  |  | 				default = -1, | 
					
						
							|  |  |  | 				min= -1, | 
					
						
							|  |  |  | 				max=65535) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | NetRenderSettings.IntProperty( attr="active_blacklisted_slave_index", | 
					
						
							|  |  |  | 				name="Index of the active slave", | 
					
						
							|  |  |  | 				description="", | 
					
						
							|  |  |  | 				default = -1, | 
					
						
							|  |  |  | 				min= -1, | 
					
						
							|  |  |  | 				max=65535) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | NetRenderSettings.IntProperty( attr="active_job_index", | 
					
						
							|  |  |  | 				name="Index of the active job", | 
					
						
							|  |  |  | 				description="", | 
					
						
							|  |  |  | 				default = -1, | 
					
						
							|  |  |  | 				min= -1, | 
					
						
							|  |  |  | 				max=65535) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | NetRenderSettings.EnumProperty(attr="mode", | 
					
						
							|  |  |  | 						items=( | 
					
						
							|  |  |  | 										("RENDER_CLIENT", "Client", "Act as render client"), | 
					
						
							|  |  |  | 										("RENDER_MASTER", "Master", "Act as render master"), | 
					
						
							|  |  |  | 										("RENDER_SLAVE", "Slave", "Act as render slave"), | 
					
						
							|  |  |  | 									), | 
					
						
							| 
									
										
										
										
											2009-10-15 17:18:47 +00:00
										 |  |  | 						name="Network mode", | 
					
						
							|  |  |  | 						description="Mode of operation of this instance", | 
					
						
							| 
									
										
										
										
											2009-08-29 17:25:22 +00:00
										 |  |  | 						default="RENDER_CLIENT") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | NetRenderSettings.CollectionProperty(attr="slaves", type=NetRenderSlave, name="Slaves", description="") | 
					
						
							|  |  |  | NetRenderSettings.CollectionProperty(attr="slaves_blacklist", type=NetRenderSlave, name="Slaves Blacklist", description="") | 
					
						
							|  |  |  | NetRenderSettings.CollectionProperty(attr="jobs", type=NetRenderJob, name="Job List", description="") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | NetRenderSlave.StringProperty( attr="name", | 
					
						
							|  |  |  | 				name="Name of the slave", | 
					
						
							|  |  |  | 				description="", | 
					
						
							|  |  |  | 				maxlen = 64, | 
					
						
							|  |  |  | 				default = "") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | NetRenderJob.StringProperty( attr="name", | 
					
						
							|  |  |  | 				name="Name of the job", | 
					
						
							|  |  |  | 				description="", | 
					
						
							|  |  |  | 				maxlen = 128, | 
					
						
							|  |  |  | 				default = "") |