Commit: bd2831d26ff30eb7dc819bdf615bd0af45e721fe
Author: Sergey Sharybin
Date: Thu Jun 17 15:22:00 2021 +0200
Branches: cycles-x
https://developer.blender.org/rBbd2831d26ff30eb7dc819bdf615bd0af45e721fe
Cycles X: Re-arrange sampling panel
More explicit separate viewport from render settings. Makes it easier
and more clear to add settings which are only for preview or only for
the final render.
| Before | After |
| {F10177700} | {F10177701} |
Among other thngs removed unused CYCLES_RENDER_PT_sampling_total.
Think better would be to call draw_samples_info for both viewport
and render samples.
Differential Revision: https://developer.blender.org/D11633
===================================================================
M intern/cycles/blender/addon/ui.py
===================================================================
diff --git a/intern/cycles/blender/addon/ui.py
b/intern/cycles/blender/addon/ui.py
index 8c8e5792374..140b781d505 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -138,6 +138,47 @@ class CYCLES_RENDER_PT_sampling(CyclesButtonsPanel, Panel):
def draw_header_preset(self, context):
CYCLES_PT_sampling_presets.draw_panel_header(self.layout)
+ def draw(self, context):
+ pass
+
+
+class CYCLES_RENDER_PT_sampling_viewport(CyclesButtonsPanel, Panel):
+ bl_label = "Viewport"
+ bl_parent_id = "CYCLES_RENDER_PT_sampling"
+
+ def draw(self, context):
+ layout = self.layout
+
+ scene = context.scene
+ cscene = scene.cycles
+
+ layout.use_property_split = True
+ layout.use_property_decorate = False
+
+ col = layout.column(align=True)
+ col.prop(cscene, "preview_samples", text="Samples")
+
+ layout.separator()
+
+ heading = layout.column(align=False, heading="Denoising")
+ row = heading.row(align=True)
+ row.prop(cscene, "use_preview_denoising", text="")
+ sub = row.row()
+ sub.active = cscene.use_preview_denoising
+ sub.prop(cscene, "preview_denoiser", text="")
+
+ sub = heading.row(align=True)
+ sub.active = cscene.use_preview_denoising
+ sub.prop(cscene, "preview_denoising_start_sample", text="Start Sample")
+ sub = heading.row(align=True)
+ sub.active = cscene.use_preview_denoising
+ sub.prop(cscene, "preview_denoising_input_passes", text="Input Passes")
+
+
+class CYCLES_RENDER_PT_sampling_render(CyclesButtonsPanel, Panel):
+ bl_label = "Render"
+ bl_parent_id = "CYCLES_RENDER_PT_sampling"
+
def draw(self, context):
layout = self.layout
@@ -148,11 +189,20 @@ class CYCLES_RENDER_PT_sampling(CyclesButtonsPanel,
Panel):
layout.use_property_decorate = False
col = layout.column(align=True)
- col.prop(cscene, "samples", text="Render")
- col.prop(cscene, "preview_samples", text="Viewport")
+ col.prop(cscene, "samples")
draw_samples_info(layout, context)
+ layout.separator()
+
+ heading = layout.column(align=True, heading="Denoising")
+ row = heading.row(align=True)
+ row.prop(cscene, "use_denoising", text="")
+ sub = row.row()
+
+ sub.active = cscene.use_denoising
+ sub.prop(cscene, "denoiser", text="")
+
class CYCLES_RENDER_PT_sampling_adaptive(CyclesButtonsPanel, Panel):
bl_label = "Adaptive Sampling"
@@ -181,44 +231,6 @@ class
CYCLES_RENDER_PT_sampling_adaptive(CyclesButtonsPanel, Panel):
col.prop(cscene, "adaptive_min_samples", text="Min Samples")
-class CYCLES_RENDER_PT_sampling_denoising(CyclesButtonsPanel, Panel):
- bl_label = "Denoising"
- bl_parent_id = "CYCLES_RENDER_PT_sampling"
- bl_options = {'DEFAULT_CLOSED'}
-
- def draw(self, context):
- layout = self.layout
- layout.use_property_split = True
- layout.use_property_decorate = False
-
- scene = context.scene
- cscene = scene.cycles
-
- heading = layout.column(align=True, heading="Render")
- row = heading.row(align=True)
- row.prop(cscene, "use_denoising", text="")
- sub = row.row()
-
- sub.active = cscene.use_denoising
- sub.prop(cscene, "denoiser", text="")
-
- layout.separator()
-
- heading = layout.column(align=False, heading="Viewport")
- row = heading.row(align=True)
- row.prop(cscene, "use_preview_denoising", text="")
- sub = row.row()
- sub.active = cscene.use_preview_denoising
- sub.prop(cscene, "preview_denoiser", text="")
-
- sub = heading.row(align=True)
- sub.active = cscene.use_preview_denoising
- sub.prop(cscene, "preview_denoising_start_sample", text="Start Sample")
- sub = heading.row(align=True)
- sub.active = cscene.use_preview_denoising
- sub.prop(cscene, "preview_denoising_input_passes", text="Input Passes")
-
-
class CYCLES_RENDER_PT_sampling_advanced(CyclesButtonsPanel, Panel):
bl_label = "Advanced"
bl_parent_id = "CYCLES_RENDER_PT_sampling"
@@ -256,31 +268,6 @@ class
CYCLES_RENDER_PT_sampling_advanced(CyclesButtonsPanel, Panel):
break
-class CYCLES_RENDER_PT_sampling_total(CyclesButtonsPanel, Panel):
- bl_label = "Total Samples"
- bl_parent_id = "CYCLES_RENDER_PT_sampling"
-
- @classmethod
- def poll(cls, context):
- scene = context.scene
- cscene = scene.cycles
-
- return cscene.use_square_samples
-
- def draw(self, context):
- layout = self.layout
- cscene = context.scene.cycles
-
- # Calculate sample values
- aa = cscene.samples
- if cscene.use_square_samples:
- aa = aa * aa
-
- col = layout.column(align=True)
- col.scale_y = 0.6
- col.label(text="%s AA" % aa)
-
-
class CYCLES_RENDER_PT_subdivision(CyclesButtonsPanel, Panel):
bl_label = "Subdivision"
bl_options = {'DEFAULT_CLOSED'}
@@ -2055,8 +2042,9 @@ classes = (
CYCLES_PT_sampling_presets,
CYCLES_PT_integrator_presets,
CYCLES_RENDER_PT_sampling,
+ CYCLES_RENDER_PT_sampling_viewport,
+ CYCLES_RENDER_PT_sampling_render,
CYCLES_RENDER_PT_sampling_adaptive,
- CYCLES_RENDER_PT_sampling_denoising,
CYCLES_RENDER_PT_sampling_advanced,
CYCLES_RENDER_PT_light_paths,
CYCLES_RENDER_PT_light_paths_max_bounces,
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs