feat: extend render options with resolution, bounces, clamping, denoiser, output format
Added properties: - Resolution override (width, height, percentage) - Min samples + time limit for adaptive sampling - Denoiser type (OIDN / OptiX) + denoise input passes - Individual light bounces (diffuse, glossy, transmission, transparent, volume) - Clamping (direct, indirect) - Film transparent toggle + pixel filter width - Output format (PNG, JPEG, TIFF, EXR, EXR Multilayer) - Color depth (8/16 bit) Version bump to 2.0.0
This commit is contained in:
89
panel.py
89
panel.py
@@ -12,39 +12,106 @@ class SCENERENDERER_PT_panel(bpy.types.Panel):
|
||||
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()
|
||||
box.label(text="Cycles Render", icon='SCENE_DATA')
|
||||
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, "use_denoising")
|
||||
box.prop(settings, "max_bounces")
|
||||
|
||||
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
|
||||
|
||||
# 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')
|
||||
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')
|
||||
row.operator(
|
||||
"scenerenderer.render_all",
|
||||
text="Render All Scenes",
|
||||
icon='RENDER_STILL',
|
||||
)
|
||||
Reference in New Issue
Block a user