Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-08-23 18:08:40 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-08-23 18:08:40 +0400
commit22f48748771a96526c3abcfd6583f7cf86aa88c8 (patch)
tree17e4db1767b5cafc6447efdc21b4053a9f0322a0
parent805cca3903d3ef687163c5eca3602657b629eb14 (diff)
Cycles: change Progressive sampling option in UI to an enum of "Path Tracing"
and "Branched Path Tracing", to try to make it more clear that this is not related to progressive refinement, non-progressive was always a bad name anyway.
-rw-r--r--intern/cycles/blender/addon/properties.py15
-rw-r--r--intern/cycles/blender/addon/ui.py14
-rw-r--r--intern/cycles/blender/blender_sync.cpp4
3 files changed, 21 insertions, 12 deletions
diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py
index 41fb9afbc4e..3b4982eef68 100644
--- a/intern/cycles/blender/addon/properties.py
+++ b/intern/cycles/blender/addon/properties.py
@@ -97,6 +97,11 @@ enum_sampling_pattern = (
('CORRELATED_MUTI_JITTER', "Correlated Multi-Jitter", "Use Correlated Multi-Jitter random sampling pattern"),
)
+enum_integrator = (
+ ('BRANCHED_PATH', "Branched Path Tracing", "Path tracing integrator that branches on the first bounce, giving more control over the number of light and material samples"),
+ ('PATH', "Path Tracing", "Pure path tracing integrator"),
+ )
+
class CyclesRenderSettings(bpy.types.PropertyGroup):
@classmethod
@@ -123,11 +128,13 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
description="Use Open Shading Language (CPU rendering only)",
)
- cls.progressive = BoolProperty(
- name="Progressive",
- description="Use progressive sampling of lighting",
- default=True,
+ cls.integrator = EnumProperty(
+ name="Integrator",
+ description="Method to sample lights and materials",
+ items=enum_integrator,
+ default='PATH',
)
+
cls.use_square_samples = BoolProperty(
name="Square Samples",
description="Square sampling values for easier artist control",
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py
index 38d6480ace4..64633aabbee 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -49,8 +49,10 @@ class CyclesButtonsPanel():
def draw_samples_info(layout, cscene):
+ integrator = cscene.integrator
+
# Calculate sample values
- if cscene.progressive:
+ if integrator == 'PATH':
aa = cscene.samples
if cscene.use_square_samples:
aa = aa * aa
@@ -74,12 +76,12 @@ def draw_samples_info(layout, cscene):
# Draw interface
# Do not draw for progressive, when Square Samples are disabled
- if (not cscene.progressive) or (cscene.use_square_samples and cscene.progressive):
+ if (integrator == 'BRANCHED_PATH') or (cscene.use_square_samples and integrator == 'PATH'):
col = layout.column(align=True)
col.scale_y = 0.6
col.label("Total Samples:")
col.separator()
- if cscene.progressive:
+ if integrator == 'PATH':
col.label("%s AA" % aa)
else:
col.label("%s AA, %s Diffuse, %s Glossy, %s Transmission" %
@@ -106,7 +108,7 @@ class CyclesRender_PT_sampling(CyclesButtonsPanel, Panel):
row.operator("render.cycles_sampling_preset_add", text="", icon="ZOOMOUT").remove_active = True
row = layout.row()
- row.prop(cscene, "progressive")
+ row.prop(cscene, "integrator", text="")
row.prop(cscene, "use_square_samples")
split = layout.split()
@@ -117,7 +119,7 @@ class CyclesRender_PT_sampling(CyclesButtonsPanel, Panel):
sub.prop(cscene, "seed")
sub.prop(cscene, "sample_clamp")
- if cscene.progressive:
+ if cscene.integrator == 'PATH':
col = split.column()
sub = col.column(align=True)
sub.label(text="Samples:")
@@ -713,7 +715,7 @@ class CyclesLamp_PT_lamp(CyclesButtonsPanel, Panel):
sub.prop(lamp, "size", text="Size X")
sub.prop(lamp, "size_y", text="Size Y")
- if not cscene.progressive:
+ if cscene.integrator == 'BRANCHED_PATH':
col.prop(clamp, "samples")
col = split.column()
diff --git a/intern/cycles/blender/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp
index 15bce22f1a0..f6f938b6241 100644
--- a/intern/cycles/blender/blender_sync.cpp
+++ b/intern/cycles/blender/blender_sync.cpp
@@ -189,7 +189,7 @@ void BlenderSync::sync_integrator()
}
#endif
- integrator->progressive = get_boolean(cscene, "progressive");
+ integrator->progressive = get_int(cscene, "integrator") == 1;
int diffuse_samples = get_int(cscene, "diffuse_samples");
int glossy_samples = get_int(cscene, "glossy_samples");
@@ -420,7 +420,7 @@ SessionParams BlenderSync::get_session_params(BL::RenderEngine b_engine, BL::Use
preview_samples = preview_samples * preview_samples;
}
- if(get_boolean(cscene, "progressive") == 0) {
+ if(get_int(cscene, "integrator") == 0) {
if(background) {
params.samples = aa_samples;
}