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
path: root/intern
diff options
context:
space:
mode:
authorThomas Dinges <blender@dingto.org>2014-09-20 00:25:17 +0400
committerThomas Dinges <blender@dingto.org>2014-09-20 00:25:36 +0400
commit31da72545ed014e7f91dc945e693d5d7e65a3bf2 (patch)
tree5eefaee9834310d5015e069438e7043b5752fed7 /intern
parent054244231026cdcc913df268101cfd06488ecde9 (diff)
Cycles: Backward compatibility code for the Clamp splitting in 2.70.
If an older file (< 270) had clamp enabled, with e.g. a value of 2.0, Direct and Indirect clamp are now automatically set to 2.0 as well.
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/blender/addon/version_update.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/intern/cycles/blender/addon/version_update.py b/intern/cycles/blender/addon/version_update.py
index 6f9509e7d99..6c592f89a76 100644
--- a/intern/cycles/blender/addon/version_update.py
+++ b/intern/cycles/blender/addon/version_update.py
@@ -28,12 +28,26 @@ def do_versions(self):
if not bpy.data.is_saved:
return
+ # Clamp Direct/Indirect separation in 270
+ if bpy.data.version <= (2, 70, 0):
+ for scene in bpy.data.scenes:
+ cscene = scene.cycles
+ sample_clamp = cscene.get("sample_clamp", False)
+ if (sample_clamp and
+ not cscene.is_property_set("sample_clamp_direct") and
+ not cscene.is_property_set("sample_clamp_indirect")):
+
+ cscene.sample_clamp_direct = sample_clamp
+ cscene.sample_clamp_indirect = sample_clamp
+
+ # Change of Volume Bounces in 271
if bpy.data.version <= (2, 71, 0):
for scene in bpy.data.scenes:
cscene = scene.cycles
if not cscene.is_property_set("volume_bounces"):
cscene.volume_bounces = 1
+ # Caustics Reflective/Refractive separation in 272
for scene in bpy.data.scenes:
cscene = scene.cycles
if (cscene.get("no_caustics", False) and