[Bf-blender-cvs] [9d8c7bc] soc-2016-cycles_denoising: Cycles: Rename Denoising DNA flags for clarity

Lukas Stockner noreply at git.blender.org
Tue Nov 22 04:25:27 CET 2016


Commit: 9d8c7bc9c2fc513be3f4606f7a50b8acef923ff5
Author: Lukas Stockner
Date:   Wed Nov 16 17:27:01 2016 +0100
Branches: soc-2016-cycles_denoising
https://developer.blender.org/rB9d8c7bc9c2fc513be3f4606f7a50b8acef923ff5

Cycles: Rename Denoising DNA flags for clarity

===================================================================

M	source/blender/blenkernel/intern/scene.c
M	source/blender/blenloader/intern/versioning_270.c
M	source/blender/makesdna/DNA_scene_types.h
M	source/blender/makesrna/intern/rna_scene.c

===================================================================

diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 7a14e6c..a440168 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -2024,8 +2024,8 @@ 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->denoiseflag = SCE_DENOISE_PASS_DIFFDIR|SCE_DENOISE_PASS_GLOSSDIR|SCE_DENOISE_PASS_TRANSDIR|SCE_DENOISE_PASS_SUBDIR|
+                           SCE_DENOISE_PASS_DIFFIND|SCE_DENOISE_PASS_GLOSSIND|SCE_DENOISE_PASS_TRANSIND|SCE_DENOISE_PASS_SUBIND;
 	srl->denoise_half_window = 8;
 	srl->denoise_strength = 0.0f;
 	BKE_freestyle_config_init(&srl->freestyleConfig);
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c
index 887a7df..d2f0d62 100644
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@ -1357,8 +1357,8 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
 			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->denoiseflag = SCE_DENOISE_PASS_DIFFDIR|SCE_DENOISE_PASS_GLOSSDIR|SCE_DENOISE_PASS_TRANSDIR|SCE_DENOISE_PASS_SUBDIR|
+					                  SCE_DENOISE_PASS_DIFFIND|SCE_DENOISE_PASS_GLOSSIND|SCE_DENOISE_PASS_TRANSIND|SCE_DENOISE_PASS_SUBIND;
 					rl->denoise_half_window = 8;
 					rl->denoise_strength = 0.0f;
 				}
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 71bee61..2273d63 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -257,15 +257,15 @@ typedef struct SceneRenderLayer {
 
 typedef enum SceneDenoiseFlag {
 	SCE_DENOISE_RESULT                = (1 << 0),
-	SCE_DENOISE_PASSES                = (1 << 1),
-	SCE_DENOISE_DIFFDIR               = (1 << 2),
-	SCE_DENOISE_DIFFIND               = (1 << 3),
-	SCE_DENOISE_GLOSSDIR              = (1 << 4),
-	SCE_DENOISE_GLOSSIND              = (1 << 5),
-	SCE_DENOISE_TRANSDIR              = (1 << 6),
-	SCE_DENOISE_TRANSIND              = (1 << 7),
-	SCE_DENOISE_SUBDIR                = (1 << 8),
-	SCE_DENOISE_SUBIND                = (1 << 9),
+	SCE_DENOISE_STORE_PASSES          = (1 << 1),
+	SCE_DENOISE_PASS_DIFFDIR          = (1 << 2),
+	SCE_DENOISE_PASS_DIFFIND          = (1 << 3),
+	SCE_DENOISE_PASS_GLOSSDIR         = (1 << 4),
+	SCE_DENOISE_PASS_GLOSSIND         = (1 << 5),
+	SCE_DENOISE_PASS_TRANSDIR         = (1 << 6),
+	SCE_DENOISE_PASS_TRANSIND         = (1 << 7),
+	SCE_DENOISE_PASS_SUBDIR           = (1 << 8),
+	SCE_DENOISE_PASS_SUBIND           = (1 << 9),
 	SCE_DENOISE_NLM_WEIGHTS           = (1 << 10),
 	SCE_DENOISE_COLLABORATIVE         = (1 << 11),
 } SceneDenoiseFlag;
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 90a7ad0..0b79edc 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -4957,47 +4957,47 @@ static void rna_def_scene_render_layer(BlenderRNA *brna)
 	RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
 
 	prop = RNA_def_property(srna, "keep_denoise_data", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_sdna(prop, NULL, "denoiseflag", SCE_DENOISE_PASSES);
+	RNA_def_property_boolean_sdna(prop, NULL, "denoiseflag", SCE_DENOISE_STORE_PASSES);
 	RNA_def_property_ui_text(prop, "Keep denoising data", "Store the denoising data so that the image can be denoised later");
 	RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
 
 	prop = RNA_def_property(srna, "denoise_diffuse_direct", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_sdna(prop, NULL, "denoiseflag", SCE_DENOISE_DIFFDIR);
+	RNA_def_property_boolean_sdna(prop, NULL, "denoiseflag", SCE_DENOISE_PASS_DIFFDIR);
 	RNA_def_property_ui_text(prop, "Diffuse Direct", "Denoise the direct diffuse lighting");
 	RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
 
 	prop = RNA_def_property(srna, "denoise_diffuse_indirect", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_sdna(prop, NULL, "denoiseflag", SCE_DENOISE_DIFFIND);
+	RNA_def_property_boolean_sdna(prop, NULL, "denoiseflag", SCE_DENOISE_PASS_DIFFIND);
 	RNA_def_property_ui_text(prop, "Diffuse Indirect", "Denoise the indirect diffuse lighting");
 	RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
 
 	prop = RNA_def_property(srna, "denoise_glossy_direct", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_sdna(prop, NULL, "denoiseflag", SCE_DENOISE_GLOSSDIR);
+	RNA_def_property_boolean_sdna(prop, NULL, "denoiseflag", SCE_DENOISE_PASS_GLOSSDIR);
 	RNA_def_property_ui_text(prop, "Glossy Direct", "Denoise the direct glossy lighting");
 	RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
 
 	prop = RNA_def_property(srna, "denoise_glossy_indirect", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_sdna(prop, NULL, "denoiseflag", SCE_DENOISE_GLOSSIND);
+	RNA_def_property_boolean_sdna(prop, NULL, "denoiseflag", SCE_DENOISE_PASS_GLOSSIND);
 	RNA_def_property_ui_text(prop, "Glossy Indirect", "Denoise the indirect glossy lighting");
 	RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
 
 	prop = RNA_def_property(srna, "denoise_transmission_direct", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_sdna(prop, NULL, "denoiseflag", SCE_DENOISE_TRANSDIR);
+	RNA_def_property_boolean_sdna(prop, NULL, "denoiseflag", SCE_DENOISE_PASS_TRANSDIR);
 	RNA_def_property_ui_text(prop, "Transmission Direct", "Denoise the direct transmission lighting");
 	RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
 
 	prop = RNA_def_property(srna, "denoise_transmission_indirect", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_sdna(prop, NULL, "denoiseflag", SCE_DENOISE_TRANSIND);
+	RNA_def_property_boolean_sdna(prop, NULL, "denoiseflag", SCE_DENOISE_PASS_TRANSIND);
 	RNA_def_property_ui_text(prop, "Transmission Indirect", "Denoise the indirect transmission lighting");
 	RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
 
 	prop = RNA_def_property(srna, "denoise_subsurface_direct", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_sdna(prop, NULL, "denoiseflag", SCE_DENOISE_SUBDIR);
+	RNA_def_property_boolean_sdna(prop, NULL, "denoiseflag", SCE_DENOISE_PASS_SUBDIR);
 	RNA_def_property_ui_text(prop, "Subsurface Direct", "Denoise the direct subsurface lighting");
 	RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
 
 	prop = RNA_def_property(srna, "denoise_subsurface_indirect", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_sdna(prop, NULL, "denoiseflag", SCE_DENOISE_SUBIND);
+	RNA_def_property_boolean_sdna(prop, NULL, "denoiseflag", SCE_DENOISE_PASS_SUBIND);
 	RNA_def_property_ui_text(prop, "Subsurface Indirect", "Denoise the indirect subsurface lighting");
 	RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);




More information about the Bf-blender-cvs mailing list