diff options
author | Thomas Dinges <blender@dingto.org> | 2009-10-15 21:18:47 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2009-10-15 21:18:47 +0400 |
commit | bd0fee9a4c9212c74619cdfbf4e524f0a57297fd (patch) | |
tree | bfff13e8e776851e2afd1e780115df40cfb92e37 | |
parent | c102cedbf523e063a4849c011ddf8b6479dd95d9 (diff) |
Network Render:
* Some code cleanups to match layout file code guidelines.
* Ported Operator Labels to op file itself.
* Added some Tooltips, theeth: Feel free to change/improve them as you like. :)
-rw-r--r-- | release/scripts/io/netrender/operators.py | 42 | ||||
-rw-r--r-- | release/scripts/io/netrender/ui.py | 47 |
2 files changed, 37 insertions, 52 deletions
diff --git a/release/scripts/io/netrender/operators.py b/release/scripts/io/netrender/operators.py index 42d1f6a0b86..e46b0c7b888 100644 --- a/release/scripts/io/netrender/operators.py +++ b/release/scripts/io/netrender/operators.py @@ -9,11 +9,9 @@ import netrender.model @rnaOperator class RENDER_OT_netclientanim(bpy.types.Operator): - ''' - Operator documentation text, will be used for the operator tooltip and python docs. - ''' + '''Start rendering an animation on network''' __idname__ = "render.netclientanim" - __label__ = "Net Render Client Anim" + __label__ = "Animation on network" # List of operator properties, the attributes will be assigned # to the class instance from the operator settings before calling. @@ -42,11 +40,9 @@ class RENDER_OT_netclientanim(bpy.types.Operator): @rnaOperator class RENDER_OT_netclientsend(bpy.types.Operator): - ''' - Operator documentation text, will be used for the operator tooltip and python docs. - ''' + '''Send Render Job to the Network''' __idname__ = "render.netclientsend" - __label__ = "Net Render Client Send" + __label__ = "Send job" # List of operator properties, the attributes will be assigned # to the class instance from the operator settings before calling. @@ -73,9 +69,9 @@ class RENDER_OT_netclientsend(bpy.types.Operator): @rnaOperator class RENDER_OT_netclientstatus(bpy.types.Operator): - '''Operator documentation text, will be used for the operator tooltip and python docs.''' + '''Refresh the status of the current jobs''' __idname__ = "render.netclientstatus" - __label__ = "Net Render Client Status" + __label__ = "Client Status" # List of operator properties, the attributes will be assigned # to the class instance from the operator settings before calling. @@ -120,7 +116,7 @@ class RENDER_OT_netclientstatus(bpy.types.Operator): class RENDER_OT_netclientblacklistslave(bpy.types.Operator): '''Operator documentation text, will be used for the operator tooltip and python docs.''' __idname__ = "render.netclientblacklistslave" - __label__ = "Net Render Client Blacklist Slave" + __label__ = "Client Blacklist Slave" # List of operator properties, the attributes will be assigned # to the class instance from the operator settings before calling. @@ -155,7 +151,7 @@ class RENDER_OT_netclientblacklistslave(bpy.types.Operator): class RENDER_OT_netclientwhitelistslave(bpy.types.Operator): '''Operator documentation text, will be used for the operator tooltip and python docs.''' __idname__ = "render.netclientwhitelistslave" - __label__ = "Net Render Client Whitelist Slave" + __label__ = "Client Whitelist Slave" # List of operator properties, the attributes will be assigned # to the class instance from the operator settings before calling. @@ -189,9 +185,9 @@ class RENDER_OT_netclientwhitelistslave(bpy.types.Operator): @rnaOperator class RENDER_OT_netclientslaves(bpy.types.Operator): - '''Operator documentation text, will be used for the operator tooltip and python docs.''' + '''Refresh status about available Render slaves''' __idname__ = "render.netclientslaves" - __label__ = "Net Render Client Slaves" + __label__ = "Client Slaves" # List of operator properties, the attributes will be assigned # to the class instance from the operator settings before calling. @@ -239,9 +235,9 @@ class RENDER_OT_netclientslaves(bpy.types.Operator): @rnaOperator class RENDER_OT_netclientcancel(bpy.types.Operator): - '''Operator documentation text, will be used for the operator tooltip and python docs.''' + '''Cancel the selected network rendering job.''' __idname__ = "render.netclientcancel" - __label__ = "Net Render Client Cancel" + __label__ = "Client Cancel" # List of operator properties, the attributes will be assigned # to the class instance from the operator settings before calling. @@ -273,9 +269,9 @@ class RENDER_OT_netclientcancel(bpy.types.Operator): @rnaOperator class RENDER_OT_netclientcancelall(bpy.types.Operator): - '''Operator documentation text, will be used for the operator tooltip and python docs.''' + '''Cancel all running network rendering jobs.''' __idname__ = "render.netclientcancelall" - __label__ = "Net Render Client Cancel All" + __label__ = "Client Cancel All" # List of operator properties, the attributes will be assigned # to the class instance from the operator settings before calling. @@ -305,9 +301,9 @@ class RENDER_OT_netclientcancelall(bpy.types.Operator): @rnaOperator class netclientdownload(bpy.types.Operator): - '''Operator documentation text, will be used for the operator tooltip and python docs.''' + '''Download render results from the network''' __idname__ = "render.netclientdownload" - __label__ = "Net Render Client Download" + __label__ = "Client Download" # List of operator properties, the attributes will be assigned # to the class instance from the operator settings before calling. @@ -357,7 +353,7 @@ class netclientdownload(bpy.types.Operator): class netclientscan(bpy.types.Operator): '''Operator documentation text, will be used for the operator tooltip and python docs.''' __idname__ = "render.netclientscan" - __label__ = "Net Render Client Scan" + __label__ = "Client Scan" # List of operator properties, the attributes will be assigned # to the class instance from the operator settings before calling. @@ -393,9 +389,9 @@ class netclientscan(bpy.types.Operator): @rnaOperator class netclientweb(bpy.types.Operator): - '''Operator documentation text, will be used for the operator tooltip and python docs.''' + '''Open new window with information about running rendering jobs''' __idname__ = "render.netclientweb" - __label__ = "Net Render Client Web" + __label__ = "Open Master Monitor" # List of operator properties, the attributes will be assigned # to the class instance from the operator settings before calling. diff --git a/release/scripts/io/netrender/ui.py b/release/scripts/io/netrender/ui.py index 638f46318af..7d7f3c29630 100644 --- a/release/scripts/io/netrender/ui.py +++ b/release/scripts/io/netrender/ui.py @@ -33,10 +33,6 @@ class RENDER_PT_network_settings(RenderButtonsPanel): __label__ = "Network Settings" COMPAT_ENGINES = set(['NET_RENDER']) - def draw_header(self, context): - layout = self.layout - scene = context.scene - def draw(self, context): layout = self.layout @@ -48,7 +44,6 @@ class RENDER_PT_network_settings(RenderButtonsPanel): split = layout.split() col = split.column() - col.itemR(scene.network_render, "mode") col.itemR(scene.network_render, "path") col.itemR(scene.network_render, "server_address") @@ -79,13 +74,13 @@ class RENDER_PT_network_job(RenderButtonsPanel): split = layout.split() col = split.column() - - col.itemO("render.netclientanim", icon='ICON_RENDER_ANIMATION', text="Animation on network") - col.itemO("render.netclientsend", icon="ICON_FILE_BLEND", text="Send job") - col.itemO("render.netclientweb", icon="ICON_QUESTION", text="Open Master Monitor") + col.itemO("render.netclientanim", icon='ICON_RENDER_ANIMATION') + col.itemO("render.netclientsend", icon="ICON_FILE_BLEND") + col.itemO("render.netclientweb", icon="ICON_QUESTION") col.itemR(scene.network_render, "job_name") - col.itemR(scene.network_render, "priority") - col.itemR(scene.network_render, "chunks") + row = col.row() + row.itemR(scene.network_render, "priority") + row.itemR(scene.network_render, "chunks") @rnaType class RENDER_PT_network_slaves(RenderButtonsPanel): @@ -105,11 +100,9 @@ class RENDER_PT_network_slaves(RenderButtonsPanel): row = layout.row() row.template_list(netsettings, "slaves", netsettings, "active_slave_index", rows=2) - col = row.column() - - subcol = col.column(align=True) - subcol.itemO("render.netclientslaves", icon="ICON_FILE_REFRESH", text="") - subcol.itemO("render.netclientblacklistslave", icon="ICON_ZOOMOUT", text="") + sub = row.column(align=True) + sub.itemO("render.netclientslaves", icon="ICON_FILE_REFRESH", text="") + sub.itemO("render.netclientblacklistslave", icon="ICON_ZOOMOUT", text="") if len(bpy.data.netrender_slaves) == 0 and len(netsettings.slaves) > 0: while(len(netsettings.slaves) > 0): @@ -143,10 +136,8 @@ class RENDER_PT_network_slaves_blacklist(RenderButtonsPanel): row = layout.row() row.template_list(netsettings, "slaves_blacklist", netsettings, "active_blacklisted_slave_index", rows=2) - col = row.column() - - subcol = col.column(align=True) - subcol.itemO("render.netclientwhitelistslave", icon="ICON_ZOOMOUT", text="") + sub = row.column(align=True) + sub.itemO("render.netclientwhitelistslave", icon="ICON_ZOOMOUT", text="") if len(bpy.data.netrender_blacklist) == 0 and len(netsettings.slaves_blacklist) > 0: while(len(netsettings.slaves_blacklist) > 0): @@ -180,13 +171,11 @@ class RENDER_PT_network_jobs(RenderButtonsPanel): row = layout.row() row.template_list(netsettings, "jobs", netsettings, "active_job_index", rows=2) - col = row.column() - - subcol = col.column(align=True) - subcol.itemO("render.netclientstatus", icon="ICON_FILE_REFRESH", text="") - subcol.itemO("render.netclientcancel", icon="ICON_ZOOMOUT", text="") - subcol.itemO("render.netclientcancelall", icon="ICON_PANEL_CLOSE", text="") - subcol.itemO("render.netclientdownload", icon='ICON_RENDER_ANIMATION', text="") + sub = row.column(align=True) + sub.itemO("render.netclientstatus", icon="ICON_FILE_REFRESH", text="") + sub.itemO("render.netclientcancel", icon="ICON_ZOOMOUT", text="") + sub.itemO("render.netclientcancelall", icon="ICON_PANEL_CLOSE", text="") + sub.itemO("render.netclientdownload", icon='ICON_RENDER_ANIMATION', text="") if len(bpy.data.netrender_jobs) == 0 and len(netsettings.jobs) > 0: while(len(netsettings.jobs) > 0): @@ -303,8 +292,8 @@ NetRenderSettings.EnumProperty(attr="mode", ("RENDER_MASTER", "Master", "Act as render master"), ("RENDER_SLAVE", "Slave", "Act as render slave"), ), - name="network mode", - description="mode of operation of this instance", + name="Network mode", + description="Mode of operation of this instance", default="RENDER_CLIENT") NetRenderSettings.CollectionProperty(attr="slaves", type=NetRenderSlave, name="Slaves", description="") |