[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59423] trunk/blender/intern/cycles/ blender: Cycles: change Progressive sampling option in UI to an enum of " Path Tracing"

Brecht Van Lommel brechtvanlommel at pandora.be
Fri Aug 23 16:08:41 CEST 2013


Revision: 59423
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59423
Author:   blendix
Date:     2013-08-23 14:08:40 +0000 (Fri, 23 Aug 2013)
Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/blender/intern/cycles/blender/addon/properties.py
    trunk/blender/intern/cycles/blender/addon/ui.py
    trunk/blender/intern/cycles/blender/blender_sync.cpp

Modified: trunk/blender/intern/cycles/blender/addon/properties.py
===================================================================
--- trunk/blender/intern/cycles/blender/addon/properties.py	2013-08-23 14:08:39 UTC (rev 59422)
+++ trunk/blender/intern/cycles/blender/addon/properties.py	2013-08-23 14:08:40 UTC (rev 59423)
@@ -97,7 +97,12 @@
     ('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
     def register(cls):
@@ -123,11 +128,13 @@
                 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",

Modified: trunk/blender/intern/cycles/blender/addon/ui.py
===================================================================
--- trunk/blender/intern/cycles/blender/addon/ui.py	2013-08-23 14:08:39 UTC (rev 59422)
+++ trunk/blender/intern/cycles/blender/addon/ui.py	2013-08-23 14:08:40 UTC (rev 59423)
@@ -49,8 +49,10 @@
 
 
 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 @@
 
     # 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 @@
         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 @@
         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 @@
                 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()

Modified: trunk/blender/intern/cycles/blender/blender_sync.cpp
===================================================================
--- trunk/blender/intern/cycles/blender/blender_sync.cpp	2013-08-23 14:08:39 UTC (rev 59422)
+++ trunk/blender/intern/cycles/blender/blender_sync.cpp	2013-08-23 14:08:40 UTC (rev 59423)
@@ -189,7 +189,7 @@
 	}
 #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 @@
 		preview_samples = preview_samples * preview_samples;
 	}
 
-	if(get_boolean(cscene, "progressive") == 0) {
+	if(get_int(cscene, "integrator") == 0) {
 		if(background) {
 			params.samples = aa_samples;
 		}




More information about the Bf-blender-cvs mailing list