[Bf-blender-cvs] [62ffc0c2c94] master: DNA: use defaults for SceneEEVEE

Campbell Barton noreply at git.blender.org
Wed Sep 11 22:53:59 CEST 2019


Commit: 62ffc0c2c94ca17ab1985d8ddd0ad06674b6f838
Author: Campbell Barton
Date:   Thu Sep 12 06:53:25 2019 +1000
Branches: master
https://developer.blender.org/rB62ffc0c2c94ca17ab1985d8ddd0ad06674b6f838

DNA: use defaults for SceneEEVEE

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

M	source/blender/makesdna/intern/dna_defaults.c
M	source/blender/makesrna/intern/rna_scene.c

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

diff --git a/source/blender/makesdna/intern/dna_defaults.c b/source/blender/makesdna/intern/dna_defaults.c
index 289b2e1df34..bae0df7e1e6 100644
--- a/source/blender/makesdna/intern/dna_defaults.c
+++ b/source/blender/makesdna/intern/dna_defaults.c
@@ -230,6 +230,7 @@ const void *DNA_default_table[SDNA_TYPE_MAX] = {
     SDNA_DEFAULT_DECL_EX(AudioData, Scene.audio),
     SDNA_DEFAULT_DECL_EX(PhysicsSettings, Scene.physics_settings),
     SDNA_DEFAULT_DECL_EX(SceneDisplay, Scene.display),
+    SDNA_DEFAULT_DECL_EX(SceneEEVEE, Scene.eevee),
 
     SDNA_DEFAULT_DECL(ToolSettings),
     SDNA_DEFAULT_DECL_EX(CurvePaintSettings, ToolSettings.curve_paint_settings),
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index b9776599842..de2a8213f42 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -6653,15 +6653,12 @@ static void rna_def_scene_eevee(BlenderRNA *brna)
       {0, NULL, 0, NULL, NULL},
   };
 
-  static float default_bloom_color[3] = {1.0f, 1.0f, 1.0f};
-
   srna = RNA_def_struct(brna, "SceneEEVEE", NULL);
   RNA_def_struct_path_func(srna, "rna_SceneEEVEE_path");
   RNA_def_struct_ui_text(srna, "Scene Display", "Scene display settings for 3d viewport");
 
   /* Indirect Lighting */
   prop = RNA_def_property(srna, "gi_diffuse_bounces", PROP_INT, PROP_NONE);
-  RNA_def_property_int_default(prop, 3);
   RNA_def_property_ui_text(prop,
                            "Diffuse Bounces",
                            "Number of time the light is reinjected inside light grids, "
@@ -6671,13 +6668,11 @@ static void rna_def_scene_eevee(BlenderRNA *brna)
 
   prop = RNA_def_property(srna, "gi_cubemap_resolution", PROP_ENUM, PROP_NONE);
   RNA_def_property_enum_items(prop, eevee_shadow_size_items);
-  RNA_def_property_enum_default(prop, 512);
   RNA_def_property_ui_text(prop, "Cubemap Size", "Size of every cubemaps");
   RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
 
   prop = RNA_def_property(srna, "gi_visibility_resolution", PROP_ENUM, PROP_NONE);
   RNA_def_property_enum_items(prop, eevee_gi_visibility_size_items);
-  RNA_def_property_enum_default(prop, 32);
   RNA_def_property_ui_text(prop,
                            "Irradiance Visibility Size",
                            "Size of the shadow map applied to each irradiance sample");
@@ -6686,7 +6681,6 @@ static void rna_def_scene_eevee(BlenderRNA *brna)
   prop = RNA_def_property(srna, "gi_irradiance_smoothing", PROP_FLOAT, PROP_FACTOR);
   RNA_def_property_range(prop, 0.0f, FLT_MAX);
   RNA_def_property_ui_range(prop, 0.0f, 1.0f, 5, 2);
-  RNA_def_property_float_default(prop, 0.1f);
   RNA_def_property_ui_text(prop,
                            "Irradiance Smoothing",
                            "Smoother irradiance interpolation but introduce light bleeding");
@@ -6694,7 +6688,6 @@ static void rna_def_scene_eevee(BlenderRNA *brna)
   RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
 
   prop = RNA_def_property(srna, "gi_glossy_clamp", PROP_FLOAT, PROP_NONE);
-  RNA_def_property_float_default(prop, 0.0f);
   RNA_def_property_ui_text(prop,
                            "Clamp Glossy",
                            "Clamp pixel intensity to reduce noise inside glossy reflections "
@@ -6703,7 +6696,6 @@ static void rna_def_scene_eevee(BlenderRNA *brna)
   RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
 
   prop = RNA_def_property(srna, "gi_filter_quality", PROP_FLOAT, PROP_NONE);
-  RNA_def_property_float_default(prop, 3.0f);
   RNA_def_property_ui_text(
       prop, "Filter Quality", "Take more samples during cubemap filtering to remove artifacts");
   RNA_def_property_range(prop, 1.0f, 8.0f);
@@ -6711,7 +6703,6 @@ static void rna_def_scene_eevee(BlenderRNA *brna)
 
   prop = RNA_def_property(srna, "gi_show_irradiance", PROP_BOOLEAN, PROP_NONE);
   RNA_def_property_boolean_sdna(prop, NULL, "flag", SCE_EEVEE_SHOW_IRRADIANCE);
-  RNA_def_property_boolean_default(prop, 0);
   RNA_def_property_ui_icon(prop, ICON_HIDE_ON, 1);
   RNA_def_property_ui_text(
       prop, "Show Irradiance Cache", "Display irradiance samples in the viewport");
@@ -6720,7 +6711,6 @@ static void rna_def_scene_eevee(BlenderRNA *brna)
 
   prop = RNA_def_property(srna, "gi_show_cubemaps", PROP_BOOLEAN, PROP_NONE);
   RNA_def_property_boolean_sdna(prop, NULL, "flag", SCE_EEVEE_SHOW_CUBEMAPS);
-  RNA_def_property_boolean_default(prop, 0);
   RNA_def_property_ui_icon(prop, ICON_HIDE_ON, 1);
   RNA_def_property_ui_text(
       prop, "Show Cubemap Cache", "Display captured cubemaps in the viewport");
@@ -6730,7 +6720,6 @@ static void rna_def_scene_eevee(BlenderRNA *brna)
   prop = RNA_def_property(srna, "gi_irradiance_display_size", PROP_FLOAT, PROP_DISTANCE);
   RNA_def_property_float_sdna(prop, NULL, "gi_irradiance_draw_size");
   RNA_def_property_range(prop, 0.05f, 10.0f);
-  RNA_def_property_float_default(prop, 0.1f);
   RNA_def_property_ui_text(prop,
                            "Irradiance Display Size",
                            "Size of the irradiance sample spheres to debug captured light");
@@ -6739,14 +6728,12 @@ static void rna_def_scene_eevee(BlenderRNA *brna)
   prop = RNA_def_property(srna, "gi_cubemap_display_size", PROP_FLOAT, PROP_DISTANCE);
   RNA_def_property_float_sdna(prop, NULL, "gi_cubemap_draw_size");
   RNA_def_property_range(prop, 0.05f, 10.0f);
-  RNA_def_property_float_default(prop, 0.3f);
   RNA_def_property_ui_text(
       prop, "Cubemap Display Size", "Size of the cubemap spheres to debug captured light");
   RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
 
   prop = RNA_def_property(srna, "gi_auto_bake", PROP_BOOLEAN, PROP_NONE);
   RNA_def_property_boolean_sdna(prop, NULL, "flag", SCE_EEVEE_GI_AUTOBAKE);
-  RNA_def_property_boolean_default(prop, 0);
   RNA_def_property_ui_text(prop, "Auto Bake", "Auto bake indirect lighting when editing probes");
 
   prop = RNA_def_property(srna, "gi_cache_info", PROP_STRING, PROP_NONE);
@@ -6756,14 +6743,12 @@ static void rna_def_scene_eevee(BlenderRNA *brna)
 
   /* Temporal Anti-Aliasing (super sampling) */
   prop = RNA_def_property(srna, "taa_samples", PROP_INT, PROP_NONE);
-  RNA_def_property_int_default(prop, 16);
   RNA_def_property_ui_text(prop, "Viewport Samples", "Number of samples, unlimited if 0");
   RNA_def_property_range(prop, 0, INT_MAX);
   RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
   RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
 
   prop = RNA_def_property(srna, "taa_render_samples", PROP_INT, PROP_NONE);
-  RNA_def_property_int_default(prop, 64);
   RNA_def_property_ui_text(prop, "Render Samples", "Number of samples per pixels for rendering");
   RNA_def_property_range(prop, 1, INT_MAX);
   RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
@@ -6771,7 +6756,6 @@ static void rna_def_scene_eevee(BlenderRNA *brna)
 
   prop = RNA_def_property(srna, "use_taa_reprojection", PROP_BOOLEAN, PROP_NONE);
   RNA_def_property_boolean_sdna(prop, NULL, "flag", SCE_EEVEE_TAA_REPROJECTION);
-  RNA_def_property_boolean_default(prop, 1);
   RNA_def_property_ui_text(prop,
                            "Viewport Denoising",
                            "Denoise image using temporal reprojection "
@@ -6781,14 +6765,12 @@ static void rna_def_scene_eevee(BlenderRNA *brna)
 
   /* Screen Space Subsurface Scattering */
   prop = RNA_def_property(srna, "sss_samples", PROP_INT, PROP_NONE);
-  RNA_def_property_int_default(prop, 7);
   RNA_def_property_ui_text(prop, "Samples", "Number of samples to compute the scattering effect");
   RNA_def_property_range(prop, 1, 32);
   RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
   RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
 
   prop = RNA_def_property(srna, "sss_jitter_threshold", PROP_FLOAT, PROP_FACTOR);
-  RNA_def_property_float_default(prop, 0.3f);
   RNA_def_property_ui_text(
       prop, "Jitter Threshold", "Rotate samples that are below this threshold");
   RNA_def_property_range(prop, 0.0f, 1.0f);
@@ -6798,34 +6780,29 @@ static void rna_def_scene_eevee(BlenderRNA *brna)
   /* Screen Space Reflection */
   prop = RNA_def_property(srna, "use_ssr", PROP_BOOLEAN, PROP_NONE);
   RNA_def_property_boolean_sdna(prop, NULL, "flag", SCE_EEVEE_SSR_ENABLED);
-  RNA_def_property_boolean_default(prop, 0);
   RNA_def_property_ui_text(prop, "Screen Space Reflections", "Enable screen space reflection");
   RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
   RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
 
   prop = RNA_def_property(srna, "use_ssr_refraction", PROP_BOOLEAN, PROP_NONE);
   RNA_def_property_boolean_sdna(prop, NULL, "flag", SCE_EEVEE_SSR_REFRACTION);
-  RNA_def_property_boolean_default(prop, 0);
   RNA_def_property_ui_text(prop, "Screen Space Refractions", "Enable screen space Refractions");
   RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
   RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
 
   prop = RNA_def_property(srna, "use_ssr_halfres", PROP_BOOLEAN, PROP_NONE);
   RNA_def_property_boolean_sdna(prop, NULL, "flag", SCE_EEVEE_SSR_HALF_RESOLUTION);
-  RNA_def_property_boolean_default(prop, 1);
   RNA_def_property_ui_text(prop, "Half Res Trace", "Raytrace at a lower resolution");
   RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
   RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
 
   prop = RNA_def_property(srna, "ssr_quality", PROP_FLOAT, PROP_FACTOR);
-  RNA_def_property_float_default(prop, 0.25f);
   RNA_def_property_ui_text(prop, "Trace Precision", "Precision of the screen space raytracing");
   RNA_def_property_range(prop, 0.0f, 1.0f);
   RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
   RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
 
   prop = RNA_def_property(srna, "ssr_max_roughness", PROP_FLOAT, PROP_FACTOR);
-  RNA_def_property_float_default(prop, 0.5f);
   RNA_def_property_ui_text(
       prop, "Max Roughness", "Do not raytrace reflections 

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list