Merged revision(s) 58424-58448 from trunk/blender into soc-2013-dingto
authorThomas Dinges <blender@dingto.org>
Sat, 20 Jul 2013 15:46:49 +0000 (15:46 +0000)
committerThomas Dinges <blender@dingto.org>
Sat, 20 Jul 2013 15:46:49 +0000 (15:46 +0000)
Had to resolve manual conflict in addon/ui.py and blender/blender_sync.cpp due to Non-Progressive integrator, which is enabled in my branch.

1  2 
intern/cycles/blender/addon/ui.py
intern/cycles/blender/blender_sync.cpp
intern/cycles/device/device_cpu.cpp

index 7f6e8d591c27d441b26863dfadf901cf441ff659,1a17675cb71d83084f8318f2c0e689b0ec9399e5..54e31ea4b649bd4bcedef97d3475ef178f5f7c30
@@@ -52,20 -60,30 +60,28 @@@ class CyclesRender_PT_sampling(CyclesBu
          scene = context.scene
          cscene = scene.cycles
          device_type = context.user_preferences.system.compute_device_type
+         
+         row = layout.row(align=True)
+         row.menu("CYCLES_MT_sampling_presets", text=bpy.types.CYCLES_MT_sampling_presets.bl_label)
+         row.operator("render.cycles_sampling_preset_add", text="", icon="ZOOMIN")
+         row.operator("render.cycles_sampling_preset_add", text="", icon="ZOOMOUT").remove_active = True
+         row = layout.row()
 -        sub = row.row()
 -        sub.active = (device_type == 'NONE' or cscene.device == 'CPU')
 -        sub.prop(cscene, "progressive")
++        row.prop(cscene, "progressive")
+         row.prop(cscene, "squared_samples")
+         
          split = layout.split()
+         
          col = split.column()
-         col.prop(cscene, "progressive")
          sub = col.column(align=True)
+         sub.label("Settings:")
          sub.prop(cscene, "seed")
          sub.prop(cscene, "sample_clamp")
  
 -        if cscene.progressive or (device_type != 'NONE' and cscene.device == 'GPU'):
 +        if cscene.progressive:
              col = split.column()
-             col.label(text="Samples:")
              sub = col.column(align=True)
+             sub.label(text="Samples:")
              sub.prop(cscene, "samples", text="Render")
              sub.prop(cscene, "preview_samples", text="Preview")
          else:
index b4f72397ea2389d65d0fa40de72fac8f57c4812b,11e2be5e0fb0cd483f8e7d6540d86297a4979fcc..86a95e337efb960df789c3d6689537963337b131
@@@ -385,14 -409,26 +409,26 @@@ SessionParams BlenderSync::get_session_
        params.background = background;
  
        /* samples */
 -      if(get_boolean(cscene, "progressive") == 0 && params.device.type == DEVICE_CPU) {
+       int samples = get_int(cscene, "samples");
+       int aa_samples = get_int(cscene, "aa_samples");
+       int preview_samples = get_int(cscene, "preview_samples");
+       int preview_aa_samples = get_int(cscene, "preview_aa_samples");
+       
+       if(get_boolean(cscene, "squared_samples")) {
+               samples = samples * samples;
+               aa_samples = aa_samples * aa_samples;
+               preview_samples = preview_samples * preview_samples;
+               preview_aa_samples = preview_aa_samples * preview_aa_samples;
+       }
 +      if(get_boolean(cscene, "progressive") == 0) {
                if(background) {
-                       params.samples = get_int(cscene, "aa_samples");
+                       params.samples = aa_samples;
                }
                else {
-                       params.samples = get_int(cscene, "preview_aa_samples");
+                       params.samples = preview_aa_samples;
                        if(params.samples == 0)
-                               params.samples = 65536;
+                               params.samples = USHRT_MAX;
                }
        }
        else {
Simple merge