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/source
diff options
context:
space:
mode:
authorLukas Stockner <lukas.stockner@freenet.de>2017-05-04 00:30:58 +0300
committerLukas Stockner <lukas.stockner@freenet.de>2017-05-04 15:19:50 +0300
commit954f201b3e1eab7bda71d318f895e81911c8189b (patch)
treea346f70489511a6043491094fd8a348c2cf075b2 /source
parenta89a260634149aba9458043a98170be216f3657e (diff)
Cycles Denoising: Move denoising properties to the Cycles addon and improve the UI
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/scene.c3
-rw-r--r--source/blender/blenloader/intern/versioning_270.c16
-rw-r--r--source/blender/makesdna/DNA_scene_types.h18
-rw-r--r--source/blender/makesrna/intern/rna_scene.c70
4 files changed, 0 insertions, 107 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index a3f9911eb9d..559531a3d8a 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -2041,9 +2041,6 @@ 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->denoising_flag = SCE_DENOISING_PASS_DIFFDIR|SCE_DENOISING_PASS_GLOSSDIR|SCE_DENOISING_PASS_TRANSDIR|SCE_DENOISING_PASS_SUBDIR|
- SCE_DENOISING_PASS_DIFFIND|SCE_DENOISING_PASS_GLOSSIND|SCE_DENOISING_PASS_TRANSIND|SCE_DENOISING_PASS_SUBIND;
- srl->denoising_radius = 8;
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 3f53f1878b7..c187766b586 100644
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@ -1406,22 +1406,6 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
/* ------- end of grease pencil initialization --------------- */
}
- {
- if (!DNA_struct_elem_find(fd->filesdna, "SceneRenderLayer", "int", "denoising_flag")) {
- 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->denoising_flag = SCE_DENOISING_PASS_DIFFDIR|SCE_DENOISING_PASS_GLOSSDIR|SCE_DENOISING_PASS_TRANSDIR|SCE_DENOISING_PASS_SUBDIR|
- SCE_DENOISING_PASS_DIFFIND|SCE_DENOISING_PASS_GLOSSIND|SCE_DENOISING_PASS_TRANSIND|SCE_DENOISING_PASS_SUBIND;
- rl->denoising_radius = 8;
- }
- }
- }
- }
-
-
if (!MAIN_VERSION_ATLEAST(main, 278, 0)) {
if (!DNA_struct_elem_find(fd->filesdna, "MovieTrackingTrack", "float", "weight_stab")) {
MovieClip *clip;
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index c1e8e8f520f..c2711c465e1 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -227,11 +227,6 @@ typedef struct SceneRenderLayer {
int passflag; /* pass_xor has to be after passflag */
int pass_xor;
- int denoising_flag;
- int denoising_radius;
- float denoising_weighting;
- float denoising_feature_strength;
-
int samples;
float pass_alpha_threshold;
@@ -257,19 +252,6 @@ typedef struct SceneRenderLayer {
#define SCE_LAY_ZMASK 0x40000
#define SCE_LAY_NEG_ZMASK 0x80000
-typedef enum SceneDenoisingFlag {
- SCE_DENOISING_USE = (1 << 0),
- SCE_DENOISING_PASS_DIFFDIR = (1 << 2),
- SCE_DENOISING_PASS_DIFFIND = (1 << 3),
- SCE_DENOISING_PASS_GLOSSDIR = (1 << 4),
- SCE_DENOISING_PASS_GLOSSIND = (1 << 5),
- SCE_DENOISING_PASS_TRANSDIR = (1 << 6),
- SCE_DENOISING_PASS_TRANSIND = (1 << 7),
- SCE_DENOISING_PASS_SUBDIR = (1 << 8),
- SCE_DENOISING_PASS_SUBIND = (1 << 9),
- SCE_DENOISING_RELATIVE_PCA = (1 << 13),
-} SceneDenoisingFlag;
-
/* srl->passflag */
typedef enum ScenePassType {
SCE_PASS_COMBINED = (1 << 0),
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index aadadcf8986..dd30cb0d03f 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -5114,76 +5114,6 @@ static void rna_def_scene_render_layer(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "freestyleConfig");
RNA_def_property_struct_type(prop, "FreestyleSettings");
RNA_def_property_ui_text(prop, "Freestyle Settings", "");
-
- /* Cycles denoising */
- prop = RNA_def_property(srna, "use_denoising", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "denoising_flag", SCE_DENOISING_USE);
- RNA_def_property_ui_text(prop, "Denoise Render Result", "Denoise the rendered image during rendering");
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
-
- prop = RNA_def_property(srna, "denoising_diffuse_direct", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "denoising_flag", SCE_DENOISING_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, "denoising_diffuse_indirect", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "denoising_flag", SCE_DENOISING_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, "denoising_glossy_direct", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "denoising_flag", SCE_DENOISING_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, "denoising_glossy_indirect", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "denoising_flag", SCE_DENOISING_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, "denoising_transmission_direct", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "denoising_flag", SCE_DENOISING_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, "denoising_transmission_indirect", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "denoising_flag", SCE_DENOISING_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, "denoising_subsurface_direct", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "denoising_flag", SCE_DENOISING_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, "denoising_subsurface_indirect", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "denoising_flag", SCE_DENOISING_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);
-
- prop = RNA_def_property(srna, "denoising_strength", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "denoising_weighting");
- RNA_def_property_range(prop, -4.0f, 4.0f);
- RNA_def_property_ui_text(prop, "Denoising Strength Adjust", "Controls neighbor pixel weighting for the denoising filter (lower values preserve more detail, but aren't as smooth)");
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
-
- prop = RNA_def_property(srna, "denoising_feature_strength", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "denoising_feature_strength");
- RNA_def_property_range(prop, -4.0f, 4.0f);
- RNA_def_property_ui_text(prop, "Denoising Feature Strength Adjust", "Controls removal of noisy image feature passes (lower values preserve more detail, but aren't as smooth)");
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
-
- prop = RNA_def_property(srna, "denoising_radius", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "denoising_radius");
- RNA_def_property_range(prop, 1, 50);
- RNA_def_property_ui_text(prop, "Denoising Radius", "Size of the image area that's used to denoise a pixel. Higher values get rid of more noise, but might lose detail and are slower");
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
-
- prop = RNA_def_property(srna, "denoising_relative_pca", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "denoising_flag", SCE_DENOISING_RELATIVE_PCA);
- RNA_def_property_ui_text(prop, "Relative filter",
- "When removing features that don't carry information, use a relative threshold instead of an absolute one. Can help to reduce artifacts, but might cause detail loss around edges");
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
}
/* Render Layers */