39 lines
1.4 KiB
Python
39 lines
1.4 KiB
Python
import bpy
|
|
|
|
|
|
class SCENERENDERER_PT_panel(bpy.types.Panel):
|
|
bl_label = "Scene Renderer"
|
|
bl_idname = "SCENERENDERER_PT_panel"
|
|
bl_space_type = 'VIEW_3D'
|
|
bl_region_type = 'UI'
|
|
bl_category = "Scene Renderer"
|
|
|
|
def draw(self, context):
|
|
layout = self.layout
|
|
settings = context.scene.scene_renderer
|
|
|
|
row = layout.row(align=True)
|
|
row.prop(settings, "test_mode", toggle=True)
|
|
row.prop(settings, "skip_existing", toggle=True)
|
|
|
|
layout.prop(settings, "use_cpu")
|
|
layout.prop(settings, "samples")
|
|
|
|
box = layout.box()
|
|
box.label(text="Color", icon='SHADING_RENDERED')
|
|
box.prop(settings, "exposure", slider=True)
|
|
box.prop(settings, "look")
|
|
|
|
layout.separator()
|
|
row = layout.row(align=True)
|
|
row.scale_y = 2.0
|
|
|
|
# Check if rendering is running by accessing the timer on the operator
|
|
from .operators import SCENERENDERER_OT_render_all
|
|
is_running = getattr(SCENERENDERER_OT_render_all, "_timer", None) is not None
|
|
|
|
if is_running:
|
|
row.operator("scenerenderer.cancel_batch", text="Cancel Batch Render", icon='CANCEL')
|
|
layout.label(text="Press ESC to force stop the active frame.", icon='INFO')
|
|
else:
|
|
row.operator("scenerenderer.render_all", text="Render All Scenes", icon='RENDER_STILL') |