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") box = layout.box() box.label(text="Cycles Render", icon='SCENE_DATA') box.prop(settings, "samples") row = box.row() row.prop(settings, "use_noise_threshold", text="Noise Threshold") sub = row.row() sub.active = settings.use_noise_threshold sub.prop(settings, "noise_threshold", text="") box.prop(settings, "use_denoising") box.prop(settings, "max_bounces") 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')