forked from bartvdbraak/blender
netrender: show web interface button in all modes. use rna decorator all the time (no need for special operator decorator)
This commit is contained in:
parent
d64834a6ce
commit
54d64c4763
@ -26,7 +26,7 @@ from netrender.utils import *
|
||||
import netrender.client as client
|
||||
import netrender.model
|
||||
|
||||
@rnaOperator
|
||||
@rnaType
|
||||
class RENDER_OT_netslave_bake(bpy.types.Operator):
|
||||
'''NEED DESCRIPTION'''
|
||||
bl_idname = "render.netslavebake"
|
||||
@ -84,7 +84,7 @@ class RENDER_OT_netslave_bake(bpy.types.Operator):
|
||||
def invoke(self, context, event):
|
||||
return self.execute(context)
|
||||
|
||||
@rnaOperator
|
||||
@rnaType
|
||||
class RENDER_OT_netclientanim(bpy.types.Operator):
|
||||
'''Start rendering an animation on network'''
|
||||
bl_idname = "render.netclientanim"
|
||||
@ -111,7 +111,7 @@ class RENDER_OT_netclientanim(bpy.types.Operator):
|
||||
def invoke(self, context, event):
|
||||
return self.execute(context)
|
||||
|
||||
@rnaOperator
|
||||
@rnaType
|
||||
class RENDER_OT_netclientsend(bpy.types.Operator):
|
||||
'''Send Render Job to the Network'''
|
||||
bl_idname = "render.netclientsend"
|
||||
@ -141,7 +141,7 @@ class RENDER_OT_netclientsend(bpy.types.Operator):
|
||||
def invoke(self, context, event):
|
||||
return self.execute(context)
|
||||
|
||||
@rnaOperator
|
||||
@rnaType
|
||||
class RENDER_OT_netclientstatus(bpy.types.Operator):
|
||||
'''Refresh the status of the current jobs'''
|
||||
bl_idname = "render.netclientstatus"
|
||||
@ -181,7 +181,7 @@ class RENDER_OT_netclientstatus(bpy.types.Operator):
|
||||
def invoke(self, context, event):
|
||||
return self.execute(context)
|
||||
|
||||
@rnaOperator
|
||||
@rnaType
|
||||
class RENDER_OT_netclientblacklistslave(bpy.types.Operator):
|
||||
'''Operator documentation text, will be used for the operator tooltip and python docs.'''
|
||||
bl_idname = "render.netclientblacklistslave"
|
||||
@ -211,7 +211,7 @@ class RENDER_OT_netclientblacklistslave(bpy.types.Operator):
|
||||
def invoke(self, context, event):
|
||||
return self.execute(context)
|
||||
|
||||
@rnaOperator
|
||||
@rnaType
|
||||
class RENDER_OT_netclientwhitelistslave(bpy.types.Operator):
|
||||
'''Operator documentation text, will be used for the operator tooltip and python docs.'''
|
||||
bl_idname = "render.netclientwhitelistslave"
|
||||
@ -242,7 +242,7 @@ class RENDER_OT_netclientwhitelistslave(bpy.types.Operator):
|
||||
return self.execute(context)
|
||||
|
||||
|
||||
@rnaOperator
|
||||
@rnaType
|
||||
class RENDER_OT_netclientslaves(bpy.types.Operator):
|
||||
'''Refresh status about available Render slaves'''
|
||||
bl_idname = "render.netclientslaves"
|
||||
@ -287,7 +287,7 @@ class RENDER_OT_netclientslaves(bpy.types.Operator):
|
||||
def invoke(self, context, event):
|
||||
return self.execute(context)
|
||||
|
||||
@rnaOperator
|
||||
@rnaType
|
||||
class RENDER_OT_netclientcancel(bpy.types.Operator):
|
||||
'''Cancel the selected network rendering job.'''
|
||||
bl_idname = "render.netclientcancel"
|
||||
@ -316,7 +316,7 @@ class RENDER_OT_netclientcancel(bpy.types.Operator):
|
||||
def invoke(self, context, event):
|
||||
return self.execute(context)
|
||||
|
||||
@rnaOperator
|
||||
@rnaType
|
||||
class RENDER_OT_netclientcancelall(bpy.types.Operator):
|
||||
'''Cancel all running network rendering jobs.'''
|
||||
bl_idname = "render.netclientcancelall"
|
||||
@ -343,7 +343,7 @@ class RENDER_OT_netclientcancelall(bpy.types.Operator):
|
||||
def invoke(self, context, event):
|
||||
return self.execute(context)
|
||||
|
||||
@rnaOperator
|
||||
@rnaType
|
||||
class netclientdownload(bpy.types.Operator):
|
||||
'''Download render results from the network'''
|
||||
bl_idname = "render.netclientdownload"
|
||||
@ -388,8 +388,9 @@ class netclientdownload(bpy.types.Operator):
|
||||
def invoke(self, context, event):
|
||||
return self.execute(context)
|
||||
|
||||
@rnaOperator
|
||||
@rnaType
|
||||
class netclientscan(bpy.types.Operator):
|
||||
__slots__ = []
|
||||
'''Operator documentation text, will be used for the operator tooltip and python docs.'''
|
||||
bl_idname = "render.netclientscan"
|
||||
bl_label = "Client Scan"
|
||||
@ -409,16 +410,18 @@ class netclientscan(bpy.types.Operator):
|
||||
return {'FINISHED'}
|
||||
|
||||
def invoke(self, context, event):
|
||||
print(dir(self))
|
||||
return self.execute(context)
|
||||
|
||||
@rnaOperator
|
||||
@rnaType
|
||||
class netclientweb(bpy.types.Operator):
|
||||
'''Open new window with information about running rendering jobs'''
|
||||
bl_idname = "render.netclientweb"
|
||||
bl_label = "Open Master Monitor"
|
||||
|
||||
def poll(self, context):
|
||||
return True
|
||||
netsettings = context.scene.network_render
|
||||
return netsettings.server_address != "[default]"
|
||||
|
||||
def execute(self, context):
|
||||
netsettings = context.scene.network_render
|
||||
|
@ -78,6 +78,8 @@ class RENDER_PT_network_settings(RenderButtonsPanel):
|
||||
else:
|
||||
col.operator("render.netclientscan", icon='FILE_REFRESH', text="")
|
||||
|
||||
col.operator("render.netclientweb", icon='QUESTION')
|
||||
|
||||
@rnaType
|
||||
class RENDER_PT_network_job(RenderButtonsPanel):
|
||||
bl_label = "Job Settings"
|
||||
@ -104,7 +106,6 @@ class RENDER_PT_network_job(RenderButtonsPanel):
|
||||
col.operator("render.netclientsend", icon='FILE_BLEND')
|
||||
if scene.network_render.job_id:
|
||||
col.operator("screen.render", text="Get Results", icon='RENDER_ANIMATION').animation = True
|
||||
col.operator("render.netclientweb", icon='QUESTION')
|
||||
col.prop(scene.network_render, "job_name")
|
||||
col.prop(scene.network_render, "job_category")
|
||||
row = col.row()
|
||||
|
@ -61,10 +61,6 @@ def rnaType(rna_type):
|
||||
if bpy: bpy.types.register(rna_type)
|
||||
return rna_type
|
||||
|
||||
def rnaOperator(rna_op):
|
||||
if bpy: bpy.types.register(rna_op)
|
||||
return rna_op
|
||||
|
||||
def reporting(report, message, errorType = None):
|
||||
if errorType:
|
||||
t = 'ERROR'
|
||||
|
Loading…
Reference in New Issue
Block a user