Cycles: Change several default values (first batch).
authorThomas Dinges <blender@dingto.org>
Fri, 22 Jan 2016 22:19:23 +0000 (23:19 +0100)
committerThomas Dinges <blender@dingto.org>
Fri, 22 Jan 2016 22:19:23 +0000 (23:19 +0100)
This changes the following defaults:

- Render settings:

  * Samples: 100
  * Preview Samples: 50
  * Filter: Blackmann-Harris
  * Tile Order: Hilbert Spiral

- Lamp settings:

  * Use MIS: On

- Material settings:

  * Volume Sampling: Multiple Importance

Old files are not affected, I tested the versioning code back and forth.
More changes are to come (World, BVH...) but that needs a bit more work.

intern/cycles/blender/addon/properties.py
intern/cycles/blender/addon/version_update.py
source/blender/blenkernel/BKE_blender.h

index d8084fa5014f4d33e23748cede8b6b321bec6c60..fddc2a6a01a49f4e0852d7f9ef11480f4eee87ac 100644 (file)
@@ -165,13 +165,13 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
                 name="Samples",
                 description="Number of samples to render for each pixel",
                 min=1, max=2147483647,
-                default=10,
+                default=100,
                 )
         cls.preview_samples = IntProperty(
                 name="Preview Samples",
                 description="Number of samples to render in the viewport, unlimited if 0",
                 min=0, max=2147483647,
-                default=10,
+                default=50,
                 )
         cls.preview_pause = BoolProperty(
                 name="Pause Preview",
@@ -380,7 +380,7 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
                 name="Filter Type",
                 description="Pixel filter type",
                 items=enum_filter_types,
-                default='GAUSSIAN',
+                default='BLACKMAN_HARRIS',
                 )
         cls.filter_width = FloatProperty(
                 name="Filter Width",
@@ -469,7 +469,7 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
                 name="Tile Order",
                 description="Tile order for rendering",
                 items=enum_tile_order,
-                default='CENTER',
+                default='HILBERT_SPIRAL',
                 options=set(),  # Not animatable!
                 )
         cls.use_progressive_refine = BoolProperty(
@@ -726,7 +726,7 @@ class CyclesMaterialSettings(bpy.types.PropertyGroup):
                 name="Volume Sampling",
                 description="Sampling method to use for volumes",
                 items=enum_volume_sampling,
-                default='DISTANCE',
+                default='MULTIPLE_IMPORTANCE',
                 )
 
         cls.volume_interpolation = EnumProperty(
@@ -770,7 +770,7 @@ class CyclesLampSettings(bpy.types.PropertyGroup):
                 name="Multiple Importance Sample",
                 description="Use multiple importance sampling for the lamp, "
                             "reduces noise for area lamps and sharp glossy materials",
-                default=False,
+                default=True,
                 )
         cls.is_portal = BoolProperty(
                 name="Is Portal",
index d8b3f5bc6724f772dbf8ca1843020beaa9554e7b..17b86261383cbbbe4b7e076317f402f0d548f856 100644 (file)
@@ -219,3 +219,38 @@ def do_versions(self):
     if bpy.data.version <= (2, 76, 6):
         for scene in bpy.data.scenes:
             custom_bake_remap(scene)
+
+    # Several default changes for 2.77
+    if bpy.data.version <= (2, 76, 8):
+        for scene in bpy.data.scenes:
+            cscene = scene.cycles
+
+            # Samples
+            if not cscene.is_property_set("samples"):
+                cscene.samples = 10
+
+            # Preview Samples
+            if not cscene.is_property_set("preview_samples"):
+                cscene.preview_samples = 10
+
+            # Filter
+            if not cscene.is_property_set("filter_type"):
+                cscene.filter_type = 'GAUSSIAN'
+
+            # Tile Order
+            if not cscene.is_property_set("tile_order"):
+                cscene.tile_order = 'CENTER'
+
+        for lamp in bpy.data.lamps:
+            clamp = lamp.cycles
+
+            # MIS
+            if not clamp.is_property_set("use_multiple_importance_sampling"):
+                clamp.use_multiple_importance_sampling = False
+
+        for mat in bpy.data.materials:
+            cmat = mat.cycles
+
+            # Volume Sampling
+            if not cmat.is_property_set("volume_sampling"):
+                cmat.volume_sampling = 'DISTANCE'
index 97d1a89afdb277ee990aad8381050aa0bf8e69c8..965affa85568bfd46c9f5421e6ac20ebf9e6b4c2 100644 (file)
@@ -42,7 +42,7 @@ extern "C" {
  * and keep comment above the defines.
  * Use STRINGIFY() rather than defining with quotes */
 #define BLENDER_VERSION         276
-#define BLENDER_SUBVERSION      8
+#define BLENDER_SUBVERSION      9
 /* Several breakages with 270, e.g. constraint deg vs rad */
 #define BLENDER_MINVERSION      270
 #define BLENDER_MINSUBVERSION   6