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 # --- General toggles --- row = layout.row(align=True) row.prop(settings, "test_mode", toggle=True) row.prop(settings, "skip_existing", toggle=True) layout.prop(settings, "use_cpu") # --- Resolution --- box = layout.box() row = box.row() row.prop(settings, "override_resolution") if settings.override_resolution: col = box.column(align=True) col.prop(settings, "resolution_x") col.prop(settings, "resolution_y") col.prop(settings, "resolution_percentage", slider=True) # --- Sampling --- box = layout.box() box.label(text="Sampling", icon='OUTLINER_OB_LIGHT') box.prop(settings, "samples") box.prop(settings, "min_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, "time_limit") # --- Denoising --- box = layout.box() box.label(text="Denoising", icon='MOD_SMOOTH') box.prop(settings, "use_denoising") if settings.use_denoising: box.prop(settings, "denoiser") box.prop(settings, "denoising_input_passes") # --- Light Bounces --- box = layout.box() box.label(text="Light Bounces", icon='LIGHT_SUN') box.prop(settings, "max_bounces") col = box.column(align=True) col.prop(settings, "diffuse_bounces") col.prop(settings, "glossy_bounces") col.prop(settings, "transmission_bounces") col.prop(settings, "transparent_max_bounces") col.prop(settings, "volume_bounces") # --- Clamping --- box = layout.box() row = box.row() row.prop(settings, "use_clamping") if settings.use_clamping: col = box.column(align=True) col.prop(settings, "clamp_direct") col.prop(settings, "clamp_indirect") # --- Film --- box = layout.box() box.label(text="Film", icon='CAMERA_DATA') box.prop(settings, "film_transparent") box.prop(settings, "film_filter_width") # --- Output --- box = layout.box() box.label(text="Output", icon='OUTPUT') box.prop(settings, "output_format") # Color depth only for formats that support it if settings.output_format in ('PNG', 'TIFF', 'OPEN_EXR'): box.prop(settings, "color_depth") # --- Color Management --- box = layout.box() box.label(text="Color", icon='SHADING_RENDERED') box.prop(settings, "exposure", slider=True) box.prop(settings, "look") # --- Render button --- layout.separator() row = layout.row(align=True) row.scale_y = 2.0 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', )