Changeset View
Changeset View
Standalone View
Standalone View
netrender/ui.py
| Context not available. | |||||
| PATH_PREFIX = "/tmp/" | PATH_PREFIX = "/tmp/" | ||||
| RENDER_CLIENT = "RENDER_CLIENT" | |||||
| RENDER_MASTER = "RENDER_MASTER" | |||||
| RENDER_SLAVE = "RENDER_SLAVE" | |||||
| LAST_ADDRESS_TEST = 0 | LAST_ADDRESS_TEST = 0 | ||||
| ADDRESS_TEST_TIMEOUT = 30 | ADDRESS_TEST_TIMEOUT = 30 | ||||
| Context not available. | |||||
| return netrender.valid_address | return netrender.valid_address | ||||
| def is_mode(context, mode): | |||||
| return (hasattr(context.scene, 'network_render') and | |||||
| context.scene.network_render.mode == mode) | |||||
| def default_temp_path(): | |||||
| temp_path = os.environ.get("TEMP") | |||||
| if not temp_path: | |||||
| if os.name == 'nt': | |||||
| temp_path = "c:/tmp/" | |||||
| else: | |||||
| temp_path = "/tmp/" | |||||
| elif not temp_path.endswith(os.sep): | |||||
| temp_path += os.sep | |||||
| return temp_path | |||||
| class NeedValidAddress(): | class NeedValidAddress(): | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| Context not available. | |||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| netsettings = context.scene.network_render | netsettings = context.scene.network_render | ||||
| verify_address(netsettings) | verify_address(netsettings) | ||||
| layout.prop(netsettings, "mode", expand=True) | layout.prop(netsettings, "mode", expand=True) | ||||
| if netsettings.mode in {'RENDER_MASTER', 'RENDER_SLAVE'}: | if netsettings.mode in {RENDER_MASTER, RENDER_SLAVE}: | ||||
| layout.operator("render.netclientstart", icon='PLAY') | layout.operator("render.netclientstart", icon='PLAY') | ||||
| layout.prop(netsettings, "path") | layout.prop(netsettings, "path") | ||||
| row = layout.row() | split = layout.split(factor = 0.25) | ||||
| split = layout.split(percentage=0.5) | |||||
| col = split.column() | col = split.column() | ||||
| col.prop(netsettings, "server_address", text="Address") | col.label(text = "Address") | ||||
| col = split.column() | col = split.column() | ||||
| row = col.row() | row = col.row() | ||||
| row.prop(netsettings, "server_address", text="") | |||||
| row = col.row() | |||||
| row.prop(netsettings, "server_port", text="Port") | row.prop(netsettings, "server_port", text="Port") | ||||
| row.prop(netsettings, "use_ssl", text="SSL") | row.prop(netsettings, "use_ssl", text="SSL") | ||||
| if netsettings.mode != "RENDER_MASTER": | if netsettings.mode != RENDER_MASTER: | ||||
| layout.operator("render.netclientscan", icon='FILE_REFRESH', text="") | layout.operator("render.netclientscan", icon='FILE_REFRESH', text="") | ||||
| if not netrender.valid_address: | if not netrender.valid_address: | ||||
| layout.label(text="No master at specified address") | layout.label(text="No master at specified address") | ||||
| if netsettings.use_ssl and netsettings.mode == RENDER_MASTER: | |||||
| if netsettings.use_ssl and netsettings.mode == "RENDER_MASTER": | |||||
| layout.prop(netsettings, "cert_path", text="Certificate") | layout.prop(netsettings, "cert_path", text="Certificate") | ||||
| layout.prop(netsettings, "key_path", text="Key") | layout.prop(netsettings, "key_path", text="Key") | ||||
| layout.operator("render.netclientweb", icon='QUESTION') | layout.operator("render.netclientweb", icon='QUESTION') | ||||
| class RENDER_PT_network_slave_settings(NetRenderButtonsPanel, bpy.types.Panel): | class RENDER_PT_network_slave_settings(NetRenderButtonsPanel, bpy.types.Panel): | ||||
| bl_label = "Slave Settings" | bl_label = "Slave Settings" | ||||
| COMPAT_ENGINES = {'NET_RENDER'} | COMPAT_ENGINES = {'NET_RENDER'} | ||||
| Context not available. | |||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| scene = context.scene | scene = context.scene | ||||
| return super().poll(context) and scene.network_render.mode == "RENDER_SLAVE" | return super().poll(context) and is_mode(context, RENDER_SLAVE) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| Context not available. | |||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| scene = context.scene | scene = context.scene | ||||
| return super().poll(context) and scene.network_render.mode == "RENDER_MASTER" | return super().poll(context) and is_mode(context, RENDER_MASTER) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| Context not available. | |||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| scene = context.scene | scene = context.scene | ||||
| return super().poll(context) and scene.network_render.mode == "RENDER_CLIENT" | return super().poll(context) and is_mode(context, RENDER_CLIENT) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| Context not available. | |||||
| def poll(cls, context): | def poll(cls, context): | ||||
| scene = context.scene | scene = context.scene | ||||
| return (super().poll(context) | return (super().poll(context) | ||||
| and scene.network_render.mode == "RENDER_CLIENT" | and is_mode(context, RENDER_CLIENT) | ||||
| and scene.network_render.job_type == "JOB_VCS") | and context.scene.network_render.job_type == "JOB_VCS") | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| Context not available. | |||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| netsettings = context.scene.network_render | return super().poll(context) and is_mode(context, RENDER_CLIENT) | ||||
| return super().poll(context) and netsettings.mode == "RENDER_CLIENT" | |||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| Context not available. | |||||
| sub = row.column(align=True) | sub = row.column(align=True) | ||||
| sub.operator("render.netclientslaves", icon='FILE_REFRESH', text="") | sub.operator("render.netclientslaves", icon='FILE_REFRESH', text="") | ||||
| sub.operator("render.netclientblacklistslave", icon='ZOOMOUT', text="") | sub.operator("render.netclientblacklistslave", icon='ZOOM_OUT', text="") | ||||
| if len(netrender.slaves) > netsettings.active_slave_index >= 0: | if len(netrender.slaves) > netsettings.active_slave_index >= 0: | ||||
| layout.separator() | layout.separator() | ||||
| Context not available. | |||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| netsettings = context.scene.network_render | return super().poll(context) and is_mode(context, RENDER_CLIENT) | ||||
| return super().poll(context) and netsettings.mode == "RENDER_CLIENT" | |||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| Context not available. | |||||
| netsettings, "active_blacklisted_slave_index", rows=2) | netsettings, "active_blacklisted_slave_index", rows=2) | ||||
| sub = row.column(align=True) | sub = row.column(align=True) | ||||
| sub.operator("render.netclientwhitelistslave", icon='ZOOMOUT', text="") | sub.operator("render.netclientwhitelistslave", icon='ZOOM_OUT', text="") | ||||
| if len(netrender.blacklist) > netsettings.active_blacklisted_slave_index >= 0: | if len(netrender.blacklist) > netsettings.active_blacklisted_slave_index >= 0: | ||||
| layout.separator() | layout.separator() | ||||
| Context not available. | |||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| netsettings = context.scene.network_render | return super().poll(context) and is_mode(context, RENDER_CLIENT) | ||||
| return super().poll(context) and netsettings.mode == "RENDER_CLIENT" | |||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| Context not available. | |||||
| sub = row.column(align=True) | sub = row.column(align=True) | ||||
| sub.operator("render.netclientstatus", icon='FILE_REFRESH', text="") | sub.operator("render.netclientstatus", icon='FILE_REFRESH', text="") | ||||
| sub.operator("render.netclientcancel", icon='ZOOMOUT', text="") | sub.operator("render.netclientcancel", icon='CANCEL', text="") | ||||
| sub.operator("render.netclientcancelall", icon='PANEL_CLOSE', text="") | sub.operator("render.netclientcancelall", icon='PANEL_CLOSE', text="") | ||||
| sub.operator("render.netclientdownload", icon='RENDER_ANIMATION', text="") | sub.operator("render.netclientdownload", icon='RENDER_ANIMATION', text="") | ||||
| Context not available. | |||||
| layout.label(text="Done: %04i" % job.results[netrender.model.FRAME_DONE]) | layout.label(text="Done: %04i" % job.results[netrender.model.FRAME_DONE]) | ||||
| layout.label(text="Error: %04i" % job.results[netrender.model.FRAME_ERROR]) | layout.label(text="Error: %04i" % job.results[netrender.model.FRAME_ERROR]) | ||||
| import bl_ui.properties_render as properties_render | import bl_ui.properties_output as properties_output | ||||
| class RENDER_PT_network_output(NeedValidAddress, NetRenderButtonsPanel, bpy.types.Panel): | class RENDER_PT_network_output(NeedValidAddress, NetRenderButtonsPanel, bpy.types.Panel): | ||||
| bl_label = "Output" | bl_label = "Output" | ||||
| COMPAT_ENGINES = {'NET_RENDER'} | COMPAT_ENGINES = {'NET_RENDER'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| netsettings = context.scene.network_render | return super().poll(context) and is_mode(context, RENDER_CLIENT) | ||||
| return super().poll(context) and netsettings.mode == "RENDER_CLIENT" | |||||
| draw = properties_render.RENDER_PT_output.draw | |||||
| draw = properties_output.RENDER_PT_output.draw | |||||
| class NetRenderSlave(bpy.types.PropertyGroup): | class NetRenderSlave(bpy.types.PropertyGroup): | ||||
| @classmethod | |||||
| def register(NetRenderSlave): | |||||
| NetRenderSlave.name = StringProperty( | name: StringProperty( | ||||
| name="Name of the slave", | name="Name of the slave", | ||||
| description="", | description="", | ||||
| maxlen = 64, | maxlen = 64, | ||||
| default = "") | default = "") | ||||
| class NetRenderJob(bpy.types.PropertyGroup): | class NetRenderJob(bpy.types.PropertyGroup): | ||||
| @classmethod | |||||
| def register(NetRenderJob): | |||||
| NetRenderJob.name = StringProperty( | name: StringProperty( | ||||
| name="Name of the job", | name="Name of the job", | ||||
| description="", | description="", | ||||
| maxlen = 128, | maxlen = 128, | ||||
| default = "") | default = "") | ||||
| class NetRenderSettings(bpy.types.PropertyGroup): | class NetRenderSettings(bpy.types.PropertyGroup): | ||||
| def _address_update_callback(self, context): | |||||
| netsettings = context.scene.network_render | |||||
| verify_address(netsettings, True) | |||||
| server_address: StringProperty( | |||||
| name="Server address", | |||||
| description="IP or name of the master render server", | |||||
| maxlen = 128, | |||||
| default = "[default]", | |||||
| update = _address_update_callback) | |||||
| server_port: IntProperty( | |||||
| name="Server port", | |||||
| description="port of the master render server", | |||||
| default = 8000, | |||||
| min=1, | |||||
| max=65535) | |||||
| use_master_broadcast: BoolProperty( | |||||
| name="Broadcast", | |||||
| description="broadcast master server address on local network", | |||||
| default = True) | |||||
| use_ssl: BoolProperty( | |||||
| name="use ssl", | |||||
| description="use ssl encryption for communication", | |||||
| default = False) | |||||
| cert_path: StringProperty( | |||||
| name="CertPath", | |||||
| description="Path to ssl certificate", | |||||
| maxlen = 128, | |||||
| default = "", | |||||
| subtype='FILE_PATH') | |||||
| key_path: StringProperty( | |||||
| name="key", | |||||
| description="Path to ssl key file", | |||||
| maxlen = 128, | |||||
| default = "", | |||||
| subtype='FILE_PATH') | |||||
| use_slave_clear: BoolProperty( | |||||
| name="Clear on exit", | |||||
| description="delete downloaded files on exit", | |||||
| default = True) | |||||
| use_slave_thumb: BoolProperty( | |||||
| name="Generate thumbnails", | |||||
| description="Generate thumbnails on slaves instead of master", | |||||
| default = False) | |||||
| slave_tags: StringProperty( | |||||
| name="Tags", | |||||
| description="Tags to associate with the slave (semi-colon separated)", | |||||
| maxlen = 256, | |||||
| default = "") | |||||
| use_slave_output_log: BoolProperty( | |||||
| name="Output render log on console", | |||||
| description="Output render text log to console as well as sending it to the master", | |||||
| default = True) | |||||
| slave_render: BoolProperty( | |||||
| name="Render on slave", | |||||
| description="Use slave for render jobs", | |||||
| default = True) | |||||
| slave_bake: BoolProperty( | |||||
| name="Bake on slave", | |||||
| description="Use slave for baking jobs", | |||||
| default = True) | |||||
| use_master_clear: BoolProperty( | |||||
| name="Clear on exit", | |||||
| description="Delete saved files on exit", | |||||
| default = False) | |||||
| use_master_force_upload: BoolProperty( | |||||
| name="Force Dependency Upload", | |||||
| description="Force client to upload dependency files to master", | |||||
| default = False) | |||||
| path: StringProperty( | |||||
| name="Path", | |||||
| description="Path for temporary files", | |||||
| maxlen = 128, | |||||
| default = default_temp_path(), | |||||
| subtype='FILE_PATH') | |||||
| job_type: EnumProperty( | |||||
| items=( | |||||
| ("JOB_BLENDER", "Blender", "Standard Blender Job"), | |||||
| ("JOB_PROCESS", "Process", "Custom Process Job"), | |||||
| ("JOB_VCS", "VCS", "Version Control System Managed Job"), | |||||
| ), | |||||
| name="Job Type", | |||||
| description="Type of render job", | |||||
| default="JOB_BLENDER") | |||||
| job_name: StringProperty( | |||||
| name="Job name", | |||||
| description="Name of the job", | |||||
| maxlen = 128, | |||||
| default = "[default]") | |||||
| job_category: StringProperty( | |||||
| name="Job category", | |||||
| description="Category of the job", | |||||
| maxlen = 128, | |||||
| default = "") | |||||
| job_tags: StringProperty( | |||||
| name="Tags", | |||||
| description="Tags to associate with the job (semi-colon separated)", | |||||
| maxlen = 256, | |||||
| default = "") | |||||
| job_render_engine: EnumProperty( | |||||
| items = ( | |||||
| ("BLENDER_EEVEE", "EEVEE", "Eeevee Render"), | |||||
| ("BLENDER_CYCLES", "CYCLES", "Cycles Render"), | |||||
| ("OTHER", "OTHER", "Other non-default Render"), | |||||
| ), | |||||
| name="render", | |||||
| description="Render engine used to render this job", | |||||
| default="BLENDER_EEVEE") | |||||
| job_render_engine_other: StringProperty( | |||||
| name="Render engine", | |||||
| description="Render engine other than the builtin defaults (POVRAY_RENDER, ...)", | |||||
| maxlen = 128, | |||||
| default = "") | |||||
| save_before_job: BoolProperty( | |||||
| name="Save Before Job", | |||||
| description="Save current file before sending a job", | |||||
| default = False) | |||||
| chunks: IntProperty( | |||||
| name="Chunks", | |||||
| description="Number of frame to dispatch to each slave in one chunk", | |||||
| default = 5, | |||||
| min=1, | |||||
| max=65535) | |||||
| priority: IntProperty( | |||||
| name="Priority", | |||||
| description="Priority of the job", | |||||
| default = 1, | |||||
| min=1, | |||||
| max=10) | |||||
| vcs_wpath: StringProperty( | |||||
| name="Working Copy", | |||||
| description="Path of the local working copy", | |||||
| maxlen = 1024, | |||||
| default = "") | |||||
| vcs_rpath: StringProperty( | |||||
| name="Remote Path", | |||||
| description="Path of the server copy (protocol specific)", | |||||
| maxlen = 1024, | |||||
| default = "") | |||||
| vcs_revision: StringProperty( | |||||
| name="Revision", | |||||
| description="Revision for this job", | |||||
| maxlen = 256, | |||||
| default = "") | |||||
| vcs_system: EnumProperty( | |||||
| items= netrender.versioning.ITEMS, | |||||
| name="VCS mode", | |||||
| description="Version Control System", | |||||
| default=netrender.versioning.ITEMS[0][0]) | |||||
| job_id: StringProperty( | |||||
| name="Network job id", | |||||
| description="id of the last sent render job", | |||||
| maxlen = 64, | |||||
| default = "") | |||||
| active_slave_index: IntProperty( | |||||
| name="Index of the active slave", | |||||
| description="", | |||||
| default = -1, | |||||
| min= -1, | |||||
| max=65535) | |||||
| active_blacklisted_slave_index: IntProperty( | |||||
| name="Index of the active slave", | |||||
| description="", | |||||
| default = -1, | |||||
| min= -1, | |||||
| max=65535) | |||||
| active_job_index: IntProperty( | |||||
| name="Index of the active job", | |||||
| description="", | |||||
| default = -1, | |||||
| min= -1, | |||||
| max=65535) | |||||
| mode: EnumProperty( | |||||
| items=( | |||||
| (RENDER_CLIENT, "Client", "Act as render client"), | |||||
| (RENDER_MASTER, "Master", "Act as render master"), | |||||
| (RENDER_SLAVE, "Slave", "Act as render slave"), | |||||
| ), | |||||
| name="Network mode", | |||||
| description="Mode of operation of this instance", | |||||
| default=RENDER_CLIENT) | |||||
| @classmethod | @classmethod | ||||
| def register(NetRenderSettings): | def register(cls): | ||||
| cls.slaves = CollectionProperty( | |||||
| def address_update_callback(self, context): | type=NetRenderSlave, name="Slaves" | ||||
| netsettings = context.scene.network_render | ) | ||||
| verify_address(netsettings, True) | cls.slaves_blacklist = CollectionProperty( | ||||
| type=NetRenderSlave, name="Slaves Blacklist" | |||||
| NetRenderSettings.server_address = StringProperty( | ) | ||||
| name="Server address", | cls.jobs = CollectionProperty( | ||||
| description="IP or name of the master render server", | type=NetRenderJob, name="Job List" | ||||
| maxlen = 128, | ) | ||||
| default = "[default]", | |||||
| update = address_update_callback) | bpy.types.Scene.network_render = PointerProperty( | ||||
| type=NetRenderSettings, name="Network Render", | |||||
| NetRenderSettings.server_port = IntProperty( | description="Network Render Settings" | ||||
| name="Server port", | ) | ||||
| description="port of the master render server", | |||||
| default = 8000, | |||||
| min=1, | |||||
| max=65535) | |||||
| NetRenderSettings.use_master_broadcast = BoolProperty( | |||||
| name="Broadcast", | |||||
| description="broadcast master server address on local network", | |||||
| default = True) | |||||
| NetRenderSettings.use_ssl = BoolProperty( | |||||
| name="use ssl", | |||||
| description="use ssl encryption for communication", | |||||
| default = False) | |||||
| NetRenderSettings.cert_path = StringProperty( | |||||
| name="CertPath", | |||||
| description="Path to ssl certificate", | |||||
| maxlen = 128, | |||||
| default = "", | |||||
| subtype='FILE_PATH') | |||||
| NetRenderSettings.key_path = StringProperty( | |||||
| name="key", | |||||
| description="Path to ssl key file", | |||||
| maxlen = 128, | |||||
| default = "", | |||||
| subtype='FILE_PATH') | |||||
| NetRenderSettings.use_slave_clear = BoolProperty( | |||||
| name="Clear on exit", | |||||
| description="delete downloaded files on exit", | |||||
| default = True) | |||||
| NetRenderSettings.use_slave_thumb = BoolProperty( | |||||
| name="Generate thumbnails", | |||||
| description="Generate thumbnails on slaves instead of master", | |||||
| default = False) | |||||
| NetRenderSettings.slave_tags = StringProperty( | |||||
| name="Tags", | |||||
| description="Tags to associate with the slave (semi-colon separated)", | |||||
| maxlen = 256, | |||||
| default = "") | |||||
| NetRenderSettings.use_slave_output_log = BoolProperty( | |||||
| name="Output render log on console", | |||||
| description="Output render text log to console as well as sending it to the master", | |||||
| default = True) | |||||
| NetRenderSettings.slave_render = BoolProperty( | |||||
| name="Render on slave", | |||||
| description="Use slave for render jobs", | |||||
| default = True) | |||||
| NetRenderSettings.slave_bake = BoolProperty( | |||||
| name="Bake on slave", | |||||
| description="Use slave for baking jobs", | |||||
| default = True) | |||||
| NetRenderSettings.use_master_clear = BoolProperty( | |||||
| name="Clear on exit", | |||||
| description="Delete saved files on exit", | |||||
| default = False) | |||||
| NetRenderSettings.use_master_force_upload = BoolProperty( | |||||
| name="Force Dependency Upload", | |||||
| description="Force client to upload dependency files to master", | |||||
| default = False) | |||||
| default_path = os.environ.get("TEMP") | |||||
| 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.path = StringProperty( | |||||
| name="Path", | |||||
| description="Path for temporary files", | |||||
| maxlen = 128, | |||||
| default = default_path, | |||||
| subtype='FILE_PATH') | |||||
| NetRenderSettings.job_type = EnumProperty( | |||||
| items=( | |||||
| ("JOB_BLENDER", "Blender", "Standard Blender Job"), | |||||
| ("JOB_PROCESS", "Process", "Custom Process Job"), | |||||
| ("JOB_VCS", "VCS", "Version Control System Managed Job"), | |||||
| ), | |||||
| name="Job Type", | |||||
| description="Type of render job", | |||||
| default="JOB_BLENDER") | |||||
| NetRenderSettings.job_name = StringProperty( | |||||
| name="Job name", | |||||
| description="Name of the job", | |||||
| maxlen = 128, | |||||
| default = "[default]") | |||||
| NetRenderSettings.job_category = StringProperty( | |||||
| name="Job category", | |||||
| description="Category of the job", | |||||
| maxlen = 128, | |||||
| default = "") | |||||
| NetRenderSettings.job_tags = StringProperty( | |||||
| name="Tags", | |||||
| description="Tags to associate with the job (semi-colon separated)", | |||||
| maxlen = 256, | |||||
| default = "") | |||||
| NetRenderSettings.job_render_engine = EnumProperty( | |||||
| items = ( | |||||
| ("BLENDER_RENDER", "BLENDER", "Standard Blender Render"), | |||||
| ("CYCLES", "CYCLES", "Cycle Render"), | |||||
| ("OTHER", "OTHER", "Other non-default Render"), | |||||
| ), | |||||
| name="render", | |||||
| description="Render engine used to render this job", | |||||
| default="BLENDER_RENDER") | |||||
| NetRenderSettings.job_render_engine_other = StringProperty( | |||||
| name="Render engine", | |||||
| description="Render engine other than the builtin defaults (POVRAY_RENDER, ...)", | |||||
| maxlen = 128, | |||||
| default = "") | |||||
| NetRenderSettings.save_before_job = BoolProperty( | |||||
| name="Save Before Job", | |||||
| description="Save current file before sending a job", | |||||
| default = False) | |||||
| NetRenderSettings.chunks = IntProperty( | |||||
| name="Chunks", | |||||
| description="Number of frame to dispatch to each slave in one chunk", | |||||
| default = 5, | |||||
| min=1, | |||||
| max=65535) | |||||
| NetRenderSettings.priority = IntProperty( | |||||
| name="Priority", | |||||
| description="Priority of the job", | |||||
| default = 1, | |||||
| min=1, | |||||
| max=10) | |||||
| NetRenderSettings.vcs_wpath = StringProperty( | |||||
| name="Working Copy", | |||||
| description="Path of the local working copy", | |||||
| maxlen = 1024, | |||||
| default = "") | |||||
| NetRenderSettings.vcs_rpath = StringProperty( | |||||
| name="Remote Path", | |||||
| description="Path of the server copy (protocol specific)", | |||||
| maxlen = 1024, | |||||
| default = "") | |||||
| NetRenderSettings.vcs_revision = StringProperty( | |||||
| name="Revision", | |||||
| description="Revision for this job", | |||||
| maxlen = 256, | |||||
| default = "") | |||||
| NetRenderSettings.vcs_system = EnumProperty( | |||||
| items= netrender.versioning.ITEMS, | |||||
| name="VCS mode", | |||||
| description="Version Control System", | |||||
| default=netrender.versioning.ITEMS[0][0]) | |||||
| NetRenderSettings.job_id = StringProperty( | |||||
| name="Network job id", | |||||
| description="id of the last sent render job", | |||||
| maxlen = 64, | |||||
| default = "") | |||||
| NetRenderSettings.active_slave_index = IntProperty( | |||||
| name="Index of the active slave", | |||||
| description="", | |||||
| default = -1, | |||||
| min= -1, | |||||
| max=65535) | |||||
| NetRenderSettings.active_blacklisted_slave_index = IntProperty( | |||||
| name="Index of the active slave", | |||||
| description="", | |||||
| default = -1, | |||||
| min= -1, | |||||
| max=65535) | |||||
| NetRenderSettings.active_job_index = IntProperty( | |||||
| name="Index of the active job", | |||||
| description="", | |||||
| default = -1, | |||||
| min= -1, | |||||
| max=65535) | |||||
| NetRenderSettings.mode = EnumProperty( | |||||
| items=( | |||||
| ("RENDER_CLIENT", "Client", "Act as render client"), | |||||
| ("RENDER_MASTER", "Master", "Act as render master"), | |||||
| ("RENDER_SLAVE", "Slave", "Act as render slave"), | |||||
| ), | |||||
| name="Network mode", | |||||
| description="Mode of operation of this instance", | |||||
| default="RENDER_CLIENT") | |||||
| NetRenderSettings.slaves = CollectionProperty(type=NetRenderSlave, name="Slaves", description="") | |||||
| NetRenderSettings.slaves_blacklist = CollectionProperty(type=NetRenderSlave, name="Slaves Blacklist", description="") | |||||
| NetRenderSettings.jobs = CollectionProperty(type=NetRenderJob, name="Job List", description="") | |||||
| bpy.types.Scene.network_render = PointerProperty(type=NetRenderSettings, name="Network Render", description="Network Render Settings") | |||||
| @classmethod | @classmethod | ||||
| def unregister(cls): | def unregister(cls): | ||||
| Context not available. | |||||