[Bf-blender-cvs] [0796161] soc-2016-cycles_denoising: Cycles Denoising: Defaults for the RenderLayer options
Lukas Stockner
noreply at git.blender.org
Fri May 27 21:47:21 CEST 2016
Commit: 079616159fcb1e84fc7b19a901087bd6f605919f
Author: Lukas Stockner
Date: Fri May 27 19:42:12 2016 +0200
Branches: soc-2016-cycles_denoising
https://developer.blender.org/rB079616159fcb1e84fc7b19a901087bd6f605919f
Cycles Denoising: Defaults for the RenderLayer options
===================================================================
M source/blender/blenkernel/intern/scene.c
M source/blender/blenloader/intern/versioning_270.c
===================================================================
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 27abbb6..6fda425 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -2035,6 +2035,10 @@ SceneRenderLayer *BKE_scene_add_render_layer(Scene *sce, const char *name)
srl->layflag = 0x7FFF; /* solid ztra halo edge strand */
srl->passflag = SCE_PASS_COMBINED | SCE_PASS_Z;
srl->pass_alpha_threshold = 0.5f;
+ srl->denoiseflag = SCE_DENOISE_DIFFDIR|SCE_DENOISE_GLOSSDIR|SCE_DENOISE_TRANSDIR|SCE_DENOISE_SUBDIR|
+ SCE_DENOISE_DIFFIND|SCE_DENOISE_GLOSSIND|SCE_DENOISE_TRANSIND|SCE_DENOISE_SUBIND;
+ srl->denoise_half_window = 8;
+ srl->denoise_strength = 0.0f;
BKE_freestyle_config_init(&srl->freestyleConfig);
return srl;
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c
index 58542d0..ad094b4 100644
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@ -1190,4 +1190,20 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
}
}
}
+
+ {
+ if (!DNA_struct_elem_find(fd->filesdna, "SceneRenderLayer", "int", "denoiseflag")) {
+ Scene *sce;
+
+ for (sce = main->scene.first; sce; sce = sce->id.next) {
+ SceneRenderLayer *rl;
+ for (rl = sce->r.layers.first; rl; rl = rl->next) {
+ rl->denoiseflag = SCE_DENOISE_DIFFDIR|SCE_DENOISE_GLOSSDIR|SCE_DENOISE_TRANSDIR|SCE_DENOISE_SUBDIR|
+ SCE_DENOISE_DIFFIND|SCE_DENOISE_GLOSSIND|SCE_DENOISE_TRANSIND|SCE_DENOISE_SUBIND;
+ rl->denoise_half_window = 8;
+ rl->denoise_strength = 0.0f;
+ }
+ }
+ }
+ }
}
More information about the Bf-blender-cvs
mailing list