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
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2018-05-16 20:34:24 +0300
committerDalai Felinto <dfelinto@gmail.com>2018-05-17 00:13:28 +0300
commit15c2801aac333341f0993f53a714a66f9f2384b2 (patch)
tree9ae8f85094dc3128d65225b6e6419b6280379710 /source/blender/makesrna
parentd8dca3c3b05d83b3771b62def041b342fc7d6e93 (diff)
Move EEVEE properties into scene
We handle doversion for the scene properties, but not for the view layer overrides. Overrides will be implemented in a different way via dynamic overrides. For now this data is completely lost.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/RNA_access.h1
-rw-r--r--source/blender/makesrna/intern/rna_layer.c542
-rw-r--r--source/blender/makesrna/intern/rna_scene.c341
3 files changed, 342 insertions, 542 deletions
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index dcfd139a008..0461389ce21 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -503,6 +503,7 @@ extern StructRNA RNA_RigidBodyObject;
extern StructRNA RNA_RigidBodyJointConstraint;
extern StructRNA RNA_SPHFluidSettings;
extern StructRNA RNA_Scene;
+extern StructRNA RNA_SceneEEVEE;
extern StructRNA RNA_SceneRenderLayer;
extern StructRNA RNA_SceneSequence;
extern StructRNA RNA_SceneObjects;
diff --git a/source/blender/makesrna/intern/rna_layer.c b/source/blender/makesrna/intern/rna_layer.c
index cbd93141213..3d6cabe0fa5 100644
--- a/source/blender/makesrna/intern/rna_layer.c
+++ b/source/blender/makesrna/intern/rna_layer.c
@@ -290,18 +290,6 @@ static void rna_LayerEngineSettings_##_ENGINE_##_##_NAME_##_set(PointerRNA *ptr,
#define RNA_LAYER_ENGINE_CLAY_GET_SET_BOOL(_NAME_) \
RNA_LAYER_ENGINE_GET_SET(bool, Clay, _NAME_)
-#define RNA_LAYER_ENGINE_EEVEE_GET_SET_FLOAT(_NAME_) \
- RNA_LAYER_ENGINE_GET_SET(float, Eevee, _NAME_)
-
-#define RNA_LAYER_ENGINE_EEVEE_GET_SET_FLOAT_ARRAY(_NAME_, _LEN_) \
- RNA_LAYER_ENGINE_GET_SET_ARRAY(float, Eevee, _NAME_, _LEN_)
-
-#define RNA_LAYER_ENGINE_EEVEE_GET_SET_INT(_NAME_) \
- RNA_LAYER_ENGINE_GET_SET(int, Eevee, _NAME_)
-
-#define RNA_LAYER_ENGINE_EEVEE_GET_SET_BOOL(_NAME_) \
- RNA_LAYER_ENGINE_GET_SET(bool, Eevee, _NAME_)
-
/* clay engine */
#ifdef WITH_CLAY_ENGINE
/* ViewLayer settings. */
@@ -320,61 +308,6 @@ RNA_LAYER_ENGINE_CLAY_GET_SET_FLOAT(ssao_attenuation)
RNA_LAYER_ENGINE_CLAY_GET_SET_FLOAT(hair_brightness_randomness)
#endif /* WITH_CLAY_ENGINE */
-/* eevee engine */
-/* ViewLayer settings. */
-RNA_LAYER_ENGINE_EEVEE_GET_SET_BOOL(gtao_enable)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_BOOL(gtao_use_bent_normals)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_BOOL(gtao_bounce)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_FLOAT(gtao_factor)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_FLOAT(gtao_quality)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_FLOAT(gtao_distance)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_BOOL(dof_enable)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_FLOAT(bokeh_max_size)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_FLOAT(bokeh_threshold)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_BOOL(bloom_enable)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_FLOAT(bloom_threshold)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_FLOAT_ARRAY(bloom_color, 3)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_FLOAT(bloom_knee)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_FLOAT(bloom_radius)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_FLOAT(bloom_clamp)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_FLOAT(bloom_intensity)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_BOOL(motion_blur_enable)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_INT(motion_blur_samples)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_FLOAT(motion_blur_shutter)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_BOOL(volumetric_enable)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_FLOAT(volumetric_start)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_FLOAT(volumetric_end)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_INT(volumetric_tile_size)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_INT(volumetric_samples)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_FLOAT(volumetric_sample_distribution)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_BOOL(volumetric_lights)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_FLOAT(volumetric_light_clamp)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_BOOL(volumetric_shadows)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_INT(volumetric_shadow_samples)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_BOOL(volumetric_colored_transmittance)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_BOOL(sss_enable)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_INT(sss_samples)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_FLOAT(sss_jitter_threshold)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_BOOL(sss_separate_albedo)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_BOOL(ssr_refraction)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_BOOL(ssr_enable)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_BOOL(ssr_halfres)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_FLOAT(ssr_quality)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_FLOAT(ssr_max_roughness)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_FLOAT(ssr_thickness)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_FLOAT(ssr_border_fade)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_FLOAT(ssr_firefly_fac)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_INT(shadow_method)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_INT(shadow_cube_size)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_INT(shadow_cascade_size)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_BOOL(shadow_high_bitdepth)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_INT(taa_samples)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_INT(taa_render_samples)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_BOOL(taa_reprojection)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_INT(gi_diffuse_bounces)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_INT(gi_cubemap_resolution)
-RNA_LAYER_ENGINE_EEVEE_GET_SET_INT(gi_visibility_resolution)
-
#undef RNA_LAYER_ENGINE_GET_SET
static void rna_ViewLayerEngineSettings_update(bContext *C, PointerRNA *UNUSED(ptr))
@@ -448,9 +381,6 @@ static StructRNA *rna_ViewLayerSettings_refine(PointerRNA *ptr)
return &RNA_ViewLayerEngineSettingsClay;
}
#endif
- if (STREQ(props->name, RE_engine_id_BLENDER_EEVEE)) {
- return &RNA_ViewLayerEngineSettingsEevee;
- }
break;
default:
BLI_assert(!"Mode not fully implemented");
@@ -508,10 +438,6 @@ static StructRNA *rna_LayerCollectionSettings_refine(PointerRNA *ptr)
return &RNA_LayerCollectionEngineSettingsClay;
}
#endif
- if (STREQ(props->name, RE_engine_id_BLENDER_EEVEE)) {
- /* printf("Mode not fully implemented\n"); */
- return &RNA_LayerCollectionSettings;
- }
break;
default:
BLI_assert(!"Mode not fully implemented");
@@ -995,473 +921,6 @@ static void rna_def_view_layer_engine_settings_clay(BlenderRNA *brna)
}
#endif /* WITH_CLAY_ENGINE */
-static void rna_def_view_layer_engine_settings_eevee(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- /* Keep in sync with eevee_private.h */
- static const EnumPropertyItem eevee_shadow_method_items[] = {
- {1, "ESM", 0, "ESM", "Exponential Shadow Mapping"},
- {2, "VSM", 0, "VSM", "Variance Shadow Mapping"},
- {0, NULL, 0, NULL, NULL}
- };
-
- static const EnumPropertyItem eevee_shadow_size_items[] = {
- {64, "64", 0, "64px", ""},
- {128, "128", 0, "128px", ""},
- {256, "256", 0, "256px", ""},
- {512, "512", 0, "512px", ""},
- {1024, "1024", 0, "1024px", ""},
- {2048, "2048", 0, "2048px", ""},
- {4096, "4096", 0, "4096px", ""},
- {0, NULL, 0, NULL, NULL}
- };
-
- static const EnumPropertyItem eevee_gi_visibility_size_items[] = {
- {8, "8", 0, "8px", ""},
- {16, "16", 0, "16px", ""},
- {32, "32", 0, "32px", ""},
- {64, "64", 0, "64px", ""},
- {0, NULL, 0, NULL, NULL}
- };
-
- static const EnumPropertyItem eevee_volumetric_tile_size_items[] = {
- {2, "2", 0, "2px", ""},
- {4, "4", 0, "4px", ""},
- {8, "8", 0, "8px", ""},
- {16, "16", 0, "16px", ""},
- {0, NULL, 0, NULL, NULL}
- };
-
- srna = RNA_def_struct(brna, "ViewLayerEngineSettingsEevee", "ViewLayerSettings");
- RNA_def_struct_ui_text(srna, "Eevee Scene Layer Settings", "Eevee Engine settings");
-
- RNA_define_verify_sdna(0); /* not in sdna */
-
- /* see RNA_LAYER_ENGINE_GET_SET macro */
-
- /* Indirect Lighting */
- prop = RNA_def_property(srna, "gi_diffuse_bounces", PROP_INT, PROP_NONE);
- RNA_def_property_int_funcs(prop, "rna_LayerEngineSettings_Eevee_gi_diffuse_bounces_get",
- "rna_LayerEngineSettings_Eevee_gi_diffuse_bounces_set", NULL);
- RNA_def_property_ui_text(prop, "Diffuse Bounces", "Number of time the light is reinjected inside light grids, "
- "0 disable indirect diffuse light");
- RNA_def_property_range(prop, 0, INT_MAX);
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- prop = RNA_def_property(srna, "gi_cubemap_resolution", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_funcs(prop, "rna_LayerEngineSettings_Eevee_gi_cubemap_resolution_get",
- "rna_LayerEngineSettings_Eevee_gi_cubemap_resolution_set", NULL);
- RNA_def_property_enum_items(prop, eevee_shadow_size_items);
- RNA_def_property_ui_text(prop, "Cubemap Size", "Size of every cubemaps");
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- prop = RNA_def_property(srna, "gi_visibility_resolution", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_funcs(prop, "rna_LayerEngineSettings_Eevee_gi_visibility_resolution_get",
- "rna_LayerEngineSettings_Eevee_gi_visibility_resolution_set", NULL);
- RNA_def_property_enum_items(prop, eevee_gi_visibility_size_items);
- RNA_def_property_ui_text(prop, "Irradiance Visibility Size",
- "Size of the shadow map applied to each irradiance sample");
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- /* Temporal Anti-Aliasing (super sampling) */
- prop = RNA_def_property(srna, "taa_samples", PROP_INT, PROP_NONE);
- RNA_def_property_int_funcs(prop, "rna_LayerEngineSettings_Eevee_taa_samples_get",
- "rna_LayerEngineSettings_Eevee_taa_samples_set", NULL);
- 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_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- prop = RNA_def_property(srna, "taa_render_samples", PROP_INT, PROP_NONE);
- RNA_def_property_int_funcs(prop, "rna_LayerEngineSettings_Eevee_taa_render_samples_get",
- "rna_LayerEngineSettings_Eevee_taa_render_samples_set", NULL);
- 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_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- prop = RNA_def_property(srna, "taa_reprojection", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_LayerEngineSettings_Eevee_taa_reprojection_get",
- "rna_LayerEngineSettings_Eevee_taa_reprojection_set");
- RNA_def_property_ui_text(prop, "Viewport Denoising", "Denoise image using temporal reprojection "
- "(can leave some ghosting)");
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- /* Screen Space Subsurface Scattering */
- prop = RNA_def_property(srna, "sss_enable", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_LayerEngineSettings_Eevee_sss_enable_get",
- "rna_LayerEngineSettings_Eevee_sss_enable_set");
- RNA_def_property_ui_text(prop, "Subsurface Scattering", "Enable screen space subsurface scattering");
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- prop = RNA_def_property(srna, "sss_samples", PROP_INT, PROP_NONE);
- RNA_def_property_int_funcs(prop, "rna_LayerEngineSettings_Eevee_sss_samples_get",
- "rna_LayerEngineSettings_Eevee_sss_samples_set", NULL);
- 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_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- prop = RNA_def_property(srna, "sss_jitter_threshold", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_funcs(prop, "rna_LayerEngineSettings_Eevee_sss_jitter_threshold_get",
- "rna_LayerEngineSettings_Eevee_sss_jitter_threshold_set", NULL);
- RNA_def_property_ui_text(prop, "Jitter Threshold", "Rotate samples that are below this threshold");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- prop = RNA_def_property(srna, "sss_separate_albedo", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_LayerEngineSettings_Eevee_sss_separate_albedo_get",
- "rna_LayerEngineSettings_Eevee_sss_separate_albedo_set");
- RNA_def_property_ui_text(prop, "Separate Albedo", "Avoid albedo being blured by the subsurface scattering "
- "but uses more video memory");
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- /* Screen Space Reflection */
- prop = RNA_def_property(srna, "ssr_enable", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_LayerEngineSettings_Eevee_ssr_enable_get",
- "rna_LayerEngineSettings_Eevee_ssr_enable_set");
- RNA_def_property_ui_text(prop, "Screen Space Reflections", "Enable screen space reflection");
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- prop = RNA_def_property(srna, "ssr_refraction", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_LayerEngineSettings_Eevee_ssr_refraction_get",
- "rna_LayerEngineSettings_Eevee_ssr_refraction_set");
- RNA_def_property_ui_text(prop, "Screen Space Refractions", "Enable screen space Refractions");
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- prop = RNA_def_property(srna, "ssr_halfres", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_LayerEngineSettings_Eevee_ssr_halfres_get",
- "rna_LayerEngineSettings_Eevee_ssr_halfres_set");
- RNA_def_property_ui_text(prop, "Half Res Trace", "Raytrace at a lower resolution");
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- prop = RNA_def_property(srna, "ssr_quality", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_funcs(prop, "rna_LayerEngineSettings_Eevee_ssr_quality_get",
- "rna_LayerEngineSettings_Eevee_ssr_quality_set", NULL);
- RNA_def_property_ui_text(prop, "Trace Quality", "Quality of the screen space raytracing");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- prop = RNA_def_property(srna, "ssr_max_roughness", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_funcs(prop, "rna_LayerEngineSettings_Eevee_ssr_max_roughness_get",
- "rna_LayerEngineSettings_Eevee_ssr_max_roughness_set", NULL);
- RNA_def_property_ui_text(prop, "Max Roughness", "Do not raytrace reflections for roughness above this value");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- prop = RNA_def_property(srna, "ssr_thickness", PROP_FLOAT, PROP_DISTANCE);
- RNA_def_property_float_funcs(prop, "rna_LayerEngineSettings_Eevee_ssr_thickness_get",
- "rna_LayerEngineSettings_Eevee_ssr_thickness_set", NULL);
- RNA_def_property_ui_text(prop, "Thickness", "Pixel thickness used to detect intersection");
- RNA_def_property_range(prop, 1e-6f, FLT_MAX);
- RNA_def_property_ui_range(prop, 0.001f, FLT_MAX, 5, 3);
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- prop = RNA_def_property(srna, "ssr_border_fade", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_funcs(prop, "rna_LayerEngineSettings_Eevee_ssr_border_fade_get",
- "rna_LayerEngineSettings_Eevee_ssr_border_fade_set", NULL);
- RNA_def_property_ui_text(prop, "Edge Fading", "Screen percentage used to fade the SSR");
- RNA_def_property_range(prop, 0.0f, 0.5f);
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- prop = RNA_def_property(srna, "ssr_firefly_fac", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_funcs(prop, "rna_LayerEngineSettings_Eevee_ssr_firefly_fac_get",
- "rna_LayerEngineSettings_Eevee_ssr_firefly_fac_set", NULL);
- RNA_def_property_ui_text(prop, "Clamp", "Clamp pixel intensity to remove noise (0 to disabled)");
- RNA_def_property_range(prop, 0.0f, FLT_MAX);
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- /* Volumetrics */
- prop = RNA_def_property(srna, "volumetric_enable", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_LayerEngineSettings_Eevee_volumetric_enable_get",
- "rna_LayerEngineSettings_Eevee_volumetric_enable_set");
- RNA_def_property_ui_text(prop, "Volumetrics", "Enable scattering and absorbance of volumetric material");
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- prop = RNA_def_property(srna, "volumetric_start", PROP_FLOAT, PROP_DISTANCE);
- RNA_def_property_float_funcs(prop, "rna_LayerEngineSettings_Eevee_volumetric_start_get",
- "rna_LayerEngineSettings_Eevee_volumetric_start_set", NULL);
- RNA_def_property_ui_text(prop, "Start", "Start distance of the volumetric effect");
- RNA_def_property_range(prop, 1e-6f, FLT_MAX);
- RNA_def_property_ui_range(prop, 0.001f, FLT_MAX, 10, 3);
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- prop = RNA_def_property(srna, "volumetric_end", PROP_FLOAT, PROP_DISTANCE);
- RNA_def_property_float_funcs(prop, "rna_LayerEngineSettings_Eevee_volumetric_end_get",
- "rna_LayerEngineSettings_Eevee_volumetric_end_set", NULL);
- RNA_def_property_ui_text(prop, "End", "End distance of the volumetric effect");
- RNA_def_property_range(prop, 1e-6f, FLT_MAX);
- RNA_def_property_ui_range(prop, 0.001f, FLT_MAX, 10, 3);
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- prop = RNA_def_property(srna, "volumetric_tile_size", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_funcs(prop, "rna_LayerEngineSettings_Eevee_volumetric_tile_size_get",
- "rna_LayerEngineSettings_Eevee_volumetric_tile_size_set", NULL);
- RNA_def_property_enum_items(prop, eevee_volumetric_tile_size_items);
- RNA_def_property_ui_text(prop, "Tile Size", "Control the quality of the volumetric effects "
- "(lower size increase vram usage and quality)");
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- prop = RNA_def_property(srna, "volumetric_samples", PROP_INT, PROP_NONE);
- RNA_def_property_int_funcs(prop, "rna_LayerEngineSettings_Eevee_volumetric_samples_get",
- "rna_LayerEngineSettings_Eevee_volumetric_samples_set", NULL);
- RNA_def_property_ui_text(prop, "Samples", "Number of samples to compute volumetric effects");
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_range(prop, 1, 256);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- prop = RNA_def_property(srna, "volumetric_sample_distribution", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_funcs(prop, "rna_LayerEngineSettings_Eevee_volumetric_sample_distribution_get",
- "rna_LayerEngineSettings_Eevee_volumetric_sample_distribution_set", NULL);
- RNA_def_property_ui_text(prop, "Exponential Sampling", "Distribute more samples closer to the camera");
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- prop = RNA_def_property(srna, "volumetric_lights", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_LayerEngineSettings_Eevee_volumetric_lights_get",
- "rna_LayerEngineSettings_Eevee_volumetric_lights_set");
- RNA_def_property_ui_text(prop, "Volumetric Lighting", "Enable scene lamps interactions with volumetrics");
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- prop = RNA_def_property(srna, "volumetric_light_clamp", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_funcs(prop, "rna_LayerEngineSettings_Eevee_volumetric_light_clamp_get",
- "rna_LayerEngineSettings_Eevee_volumetric_light_clamp_set", NULL);
- RNA_def_property_range(prop, 0.0f, FLT_MAX);
- RNA_def_property_ui_text(prop, "Clamp", "Maximum light contribution, reducing noise");
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- prop = RNA_def_property(srna, "volumetric_shadows", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_LayerEngineSettings_Eevee_volumetric_shadows_get",
- "rna_LayerEngineSettings_Eevee_volumetric_shadows_set");
- RNA_def_property_ui_text(prop, "Volumetric Shadows", "Generate shadows from volumetric material (Very expensive)");
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- prop = RNA_def_property(srna, "volumetric_shadow_samples", PROP_INT, PROP_NONE);
- RNA_def_property_int_funcs(prop, "rna_LayerEngineSettings_Eevee_volumetric_shadow_samples_get",
- "rna_LayerEngineSettings_Eevee_volumetric_shadow_samples_set", NULL);
- RNA_def_property_range(prop, 1, 128);
- RNA_def_property_ui_text(prop, "Volumetric Shadow Samples", "Number of samples to compute volumetric shadowing");
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- prop = RNA_def_property(srna, "volumetric_colored_transmittance", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_LayerEngineSettings_Eevee_volumetric_colored_transmittance_get",
- "rna_LayerEngineSettings_Eevee_volumetric_colored_transmittance_set");
- RNA_def_property_ui_text(prop, "Colored Transmittance", "Enable wavelength dependent volumetric transmittance");
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- /* Ambient Occlusion */
- prop = RNA_def_property(srna, "gtao_enable", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_LayerEngineSettings_Eevee_gtao_enable_get",
- "rna_LayerEngineSettings_Eevee_gtao_enable_set");
- RNA_def_property_ui_text(prop, "Ambient Occlusion", "Enable ambient occlusion to simulate medium scale indirect shadowing");
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- prop = RNA_def_property(srna, "gtao_use_bent_normals", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_LayerEngineSettings_Eevee_gtao_use_bent_normals_get",
- "rna_LayerEngineSettings_Eevee_gtao_use_bent_normals_set");
- RNA_def_property_ui_text(prop, "Bent Normals", "Compute main non occluded direction to sample the environment");
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- prop = RNA_def_property(srna, "gtao_bounce", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_LayerEngineSettings_Eevee_gtao_bounce_get",
- "rna_LayerEngineSettings_Eevee_gtao_bounce_set");
- RNA_def_property_ui_text(prop, "Bounces Approximation", "An approximation to simulate light bounces "
- "giving less occlusion on brighter objects");
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- prop = RNA_def_property(srna, "gtao_factor", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_funcs(prop, "rna_LayerEngineSettings_Eevee_gtao_factor_get", "rna_LayerEngineSettings_Eevee_gtao_factor_set", NULL);
- RNA_def_property_ui_text(prop, "Factor", "Factor for ambient occlusion blending");
- RNA_def_property_range(prop, 0.0f, FLT_MAX);
- RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1f, 2);
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, 0, "rna_LayerCollectionEngineSettings_update");
-
- prop = RNA_def_property(srna, "gtao_quality", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_funcs(prop, "rna_LayerEngineSettings_Eevee_gtao_quality_get", "rna_LayerEngineSettings_Eevee_gtao_quality_set", NULL);
- RNA_def_property_ui_text(prop, "Trace Quality", "Quality of the horizon search");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, 0, "rna_LayerCollectionEngineSettings_update");
-
- prop = RNA_def_property(srna, "gtao_distance", PROP_FLOAT, PROP_DISTANCE);
- RNA_def_property_float_funcs(prop, "rna_LayerEngineSettings_Eevee_gtao_distance_get", "rna_LayerEngineSettings_Eevee_gtao_distance_set", NULL);
- RNA_def_property_ui_text(prop, "Distance", "Distance of object that contribute to the ambient occlusion effect");
- RNA_def_property_range(prop, 0.0f, 100000.0f);
- RNA_def_property_ui_range(prop, 0.0f, 100.0f, 1, 3);
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, 0, "rna_LayerCollectionEngineSettings_update");
-
- /* Depth of Field */
- prop = RNA_def_property(srna, "dof_enable", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_LayerEngineSettings_Eevee_dof_enable_get",
- "rna_LayerEngineSettings_Eevee_dof_enable_set");
- RNA_def_property_ui_text(prop, "Depth of Field", "Enable depth of field using the values from the active camera");
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- prop = RNA_def_property(srna, "bokeh_max_size", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_funcs(prop, "rna_LayerEngineSettings_Eevee_bokeh_max_size_get",
- "rna_LayerEngineSettings_Eevee_bokeh_max_size_set", NULL);
- RNA_def_property_ui_text(prop, "Max Size", "Max size of the bokeh shape for the depth of field (lower is faster)");
- RNA_def_property_range(prop, 0.0f, 2000.0f);
- RNA_def_property_ui_range(prop, 2.0f, 200.0f, 1, 3);
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- prop = RNA_def_property(srna, "bokeh_threshold", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_funcs(prop, "rna_LayerEngineSettings_Eevee_bokeh_threshold_get",
- "rna_LayerEngineSettings_Eevee_bokeh_threshold_set", NULL);
- RNA_def_property_ui_text(prop, "Sprite Threshold", "Brightness threshold for using sprite base depth of field");
- RNA_def_property_range(prop, 0.0f, 100000.0f);
- RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3);
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- /* Bloom */
- prop = RNA_def_property(srna, "bloom_enable", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_LayerEngineSettings_Eevee_bloom_enable_get",
- "rna_LayerEngineSettings_Eevee_bloom_enable_set");
- RNA_def_property_ui_text(prop, "Bloom", "High brighness pixels generate a glowing effect");
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- prop = RNA_def_property(srna, "bloom_threshold", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_funcs(prop, "rna_LayerEngineSettings_Eevee_bloom_threshold_get",
- "rna_LayerEngineSettings_Eevee_bloom_threshold_set", NULL);
- RNA_def_property_ui_text(prop, "Threshold", "Filters out pixels under this level of brightness");
- RNA_def_property_range(prop, 0.0f, 100000.0f);
- RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3);
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- prop = RNA_def_property(srna, "bloom_color", PROP_FLOAT, PROP_COLOR);
- RNA_def_property_array(prop, 3);
- RNA_def_property_float_funcs(prop, "rna_LayerEngineSettings_Eevee_bloom_color_get",
- "rna_LayerEngineSettings_Eevee_bloom_color_set", NULL);
- RNA_def_property_ui_text(prop, "Color", "Color applied to the bloom effect");
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- prop = RNA_def_property(srna, "bloom_knee", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_funcs(prop, "rna_LayerEngineSettings_Eevee_bloom_knee_get",
- "rna_LayerEngineSettings_Eevee_bloom_knee_set", NULL);
- RNA_def_property_ui_text(prop, "Knee", "Makes transition between under/over-threshold gradual");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- prop = RNA_def_property(srna, "bloom_radius", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_funcs(prop, "rna_LayerEngineSettings_Eevee_bloom_radius_get",
- "rna_LayerEngineSettings_Eevee_bloom_radius_set", NULL);
- RNA_def_property_ui_text(prop, "Radius", "Bloom spread distance");
- RNA_def_property_range(prop, 0.0f, 100.0f);
- RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3);
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- prop = RNA_def_property(srna, "bloom_clamp", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_funcs(prop, "rna_LayerEngineSettings_Eevee_bloom_clamp_get",
- "rna_LayerEngineSettings_Eevee_bloom_clamp_set", NULL);
- RNA_def_property_ui_text(prop, "Clamp", "Maximum intensity a bloom pixel can have");
- RNA_def_property_range(prop, 0.0f, 1000.0f);
- RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3);
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- prop = RNA_def_property(srna, "bloom_intensity", PROP_FLOAT, PROP_UNSIGNED);
- RNA_def_property_float_funcs(prop, "rna_LayerEngineSettings_Eevee_bloom_intensity_get",
- "rna_LayerEngineSettings_Eevee_bloom_intensity_set", NULL);
- RNA_def_property_ui_text(prop, "Intensity", "Blend factor");
- RNA_def_property_range(prop, 0.0f, 10000.0f);
- RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3);
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- /* Motion blur */
- prop = RNA_def_property(srna, "motion_blur_enable", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_LayerEngineSettings_Eevee_motion_blur_enable_get",
- "rna_LayerEngineSettings_Eevee_motion_blur_enable_set");
- RNA_def_property_ui_text(prop, "Motion Blur", "Enable motion blur effect (only in camera view)");
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- prop = RNA_def_property(srna, "motion_blur_samples", PROP_INT, PROP_UNSIGNED);
- RNA_def_property_int_funcs(prop, "rna_LayerEngineSettings_Eevee_motion_blur_samples_get",
- "rna_LayerEngineSettings_Eevee_motion_blur_samples_set", NULL);
- RNA_def_property_ui_text(prop, "Samples", "Number of samples to take with motion blur");
- RNA_def_property_range(prop, 1, 64);
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- prop = RNA_def_property(srna, "motion_blur_shutter", PROP_FLOAT, PROP_UNSIGNED);
- RNA_def_property_float_funcs(prop, "rna_LayerEngineSettings_Eevee_motion_blur_shutter_get",
- "rna_LayerEngineSettings_Eevee_motion_blur_shutter_set", NULL);
- RNA_def_property_ui_text(prop, "Shutter", "Time taken in frames between shutter open and close");
- RNA_def_property_ui_range(prop, 0.01f, 2.0f, 1, 2);
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- /* Shadows */
- prop = RNA_def_property(srna, "shadow_method", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_funcs(prop, "rna_LayerEngineSettings_Eevee_shadow_method_get", "rna_LayerEngineSettings_Eevee_shadow_method_set", NULL);
- RNA_def_property_enum_items(prop, eevee_shadow_method_items);
- RNA_def_property_ui_text(prop, "Method", "Technique use to compute the shadows");
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- prop = RNA_def_property(srna, "shadow_cube_size", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_funcs(prop, "rna_LayerEngineSettings_Eevee_shadow_cube_size_get", "rna_LayerEngineSettings_Eevee_shadow_cube_size_set", NULL);
- RNA_def_property_enum_items(prop, eevee_shadow_size_items);
- RNA_def_property_ui_text(prop, "Cube Shadows Resolution", "Size of point and area lamps shadow maps");
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- prop = RNA_def_property(srna, "shadow_cascade_size", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_funcs(prop, "rna_LayerEngineSettings_Eevee_shadow_cascade_size_get", "rna_LayerEngineSettings_Eevee_shadow_cascade_size_set", NULL);
- RNA_def_property_enum_items(prop, eevee_shadow_size_items);
- RNA_def_property_ui_text(prop, "Directional Shadows Resolution", "Size of sun lamps shadow maps");
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- prop = RNA_def_property(srna, "shadow_high_bitdepth", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_LayerEngineSettings_Eevee_shadow_high_bitdepth_get", "rna_LayerEngineSettings_Eevee_shadow_high_bitdepth_set");
- RNA_def_property_ui_text(prop, "High Bitdepth", "Use 32bit shadows");
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_ViewLayerEngineSettings_update");
-
- RNA_define_verify_sdna(1); /* not in sdna */
-}
-
#ifdef WITH_CLAY_ENGINE
static void rna_def_layer_collection_engine_settings_clay(BlenderRNA *brna)
{
@@ -1614,7 +1073,6 @@ static void rna_def_view_layer_settings(BlenderRNA *brna)
#ifdef WITH_CLAY_ENGINE
rna_def_view_layer_engine_settings_clay(brna);
#endif
- rna_def_view_layer_engine_settings_eevee(brna);
RNA_define_verify_sdna(1);
}
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 4f26e7d43a6..c6738e82e89 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -948,6 +948,11 @@ static void rna_Scene_all_keyingsets_next(CollectionPropertyIterator *iter)
iter->valid = (internal->link != NULL);
}
+static char *rna_SceneEEVEE_path(PointerRNA *UNUSED(ptr))
+{
+ return BLI_strdup("eevee");
+}
+
static int rna_RenderSettings_stereoViews_skip(CollectionPropertyIterator *iter, void *UNUSED(data))
{
ListBaseIterator *internal = &iter->internal.listbase;
@@ -5695,7 +5700,337 @@ static void rna_def_scene_display(BlenderRNA *brna)
RNA_def_property_ui_range(prop, 0.00f, 1.0f, 1, 2);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_update(prop, NC_SCENE | NA_EDITED, "rna_Scene_set_update");
+}
+
+static void rna_def_scene_eevee(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ static const EnumPropertyItem eevee_shadow_method_items[] = {
+ {SHADOW_ESM, "ESM", 0, "ESM", "Exponential Shadow Mapping"},
+ {SHADOW_VSM, "VSM", 0, "VSM", "Variance Shadow Mapping"},
+ {0, NULL, 0, NULL, NULL}
+ };
+
+ static const EnumPropertyItem eevee_shadow_size_items[] = {
+ {64, "64", 0, "64px", ""},
+ {128, "128", 0, "128px", ""},
+ {256, "256", 0, "256px", ""},
+ {512, "512", 0, "512px", ""},
+ {1024, "1024", 0, "1024px", ""},
+ {2048, "2048", 0, "2048px", ""},
+ {4096, "4096", 0, "4096px", ""},
+ {0, NULL, 0, NULL, NULL}
+ };
+
+ static const EnumPropertyItem eevee_gi_visibility_size_items[] = {
+ {8, "8", 0, "8px", ""},
+ {16, "16", 0, "16px", ""},
+ {32, "32", 0, "32px", ""},
+ {64, "64", 0, "64px", ""},
+ {0, NULL, 0, NULL, NULL}
+ };
+
+ static const EnumPropertyItem eevee_volumetric_tile_size_items[] = {
+ {2, "2", 0, "2px", ""},
+ {4, "4", 0, "4px", ""},
+ {8, "8", 0, "8px", ""},
+ {16, "16", 0, "16px", ""},
+ {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, "
+ "0 disable indirect diffuse light");
+ RNA_def_property_range(prop, 0, INT_MAX);
+
+ 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");
+
+ 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");
+
+ /* 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);
+
+ 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);
+
+ prop = RNA_def_property(srna, "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 "
+ "(can leave some ghosting)");
+
+ /* Screen Space Subsurface Scattering */
+ prop = RNA_def_property(srna, "sss_enable", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", SCE_EEVEE_SSS_ENABLED);
+ RNA_def_property_boolean_default(prop, 0);
+ RNA_def_property_ui_text(prop, "Subsurface Scattering", "Enable 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);
+
+ 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);
+
+ prop = RNA_def_property(srna, "sss_separate_albedo", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", SCE_EEVEE_SSS_SEPARATE_ALBEDO);
+ RNA_def_property_boolean_default(prop, 0);
+ RNA_def_property_ui_text(prop, "Separate Albedo", "Avoid albedo being blured by the subsurface scattering "
+ "but uses more video memory");
+
+ /* Screen Space Reflection */
+ prop = RNA_def_property(srna, "ssr_enable", 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");
+
+ prop = RNA_def_property(srna, "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");
+
+ prop = RNA_def_property(srna, "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");
+
+ 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 Quality", "Quality of the screen space raytracing");
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+
+ 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 for roughness above this value");
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+
+ prop = RNA_def_property(srna, "ssr_thickness", PROP_FLOAT, PROP_DISTANCE);
+ RNA_def_property_float_default(prop, 0.2f);
+ RNA_def_property_ui_text(prop, "Thickness", "Pixel thickness used to detect intersection");
+ RNA_def_property_range(prop, 1e-6f, FLT_MAX);
+ RNA_def_property_ui_range(prop, 0.001f, FLT_MAX, 5, 3);
+
+ prop = RNA_def_property(srna, "ssr_border_fade", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_default(prop, 0.075f);
+ RNA_def_property_ui_text(prop, "Edge Fading", "Screen percentage used to fade the SSR");
+ RNA_def_property_range(prop, 0.0f, 0.5f);
+
+ prop = RNA_def_property(srna, "ssr_firefly_fac", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_default(prop, 10.0f);
+ RNA_def_property_ui_text(prop, "Clamp", "Clamp pixel intensity to remove noise (0 to disabled)");
+ RNA_def_property_range(prop, 0.0f, FLT_MAX);
+
+ /* Volumetrics */
+ prop = RNA_def_property(srna, "volumetric_enable", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", SCE_EEVEE_VOLUMETRIC_ENABLED);
+ RNA_def_property_boolean_default(prop, 0);
+ RNA_def_property_ui_text(prop, "Volumetrics", "Enable scattering and absorbance of volumetric material");
+
+ prop = RNA_def_property(srna, "volumetric_start", PROP_FLOAT, PROP_DISTANCE);
+ RNA_def_property_float_default(prop, 0.1f);
+ RNA_def_property_ui_text(prop, "Start", "Start distance of the volumetric effect");
+ RNA_def_property_range(prop, 1e-6f, FLT_MAX);
+ RNA_def_property_ui_range(prop, 0.001f, FLT_MAX, 10, 3);
+
+ prop = RNA_def_property(srna, "volumetric_end", PROP_FLOAT, PROP_DISTANCE);
+ RNA_def_property_float_default(prop, 100.0f);
+ RNA_def_property_ui_text(prop, "End", "End distance of the volumetric effect");
+ RNA_def_property_range(prop, 1e-6f, FLT_MAX);
+ RNA_def_property_ui_range(prop, 0.001f, FLT_MAX, 10, 3);
+
+ prop = RNA_def_property(srna, "volumetric_tile_size", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_default(prop, 8);
+ RNA_def_property_enum_items(prop, eevee_volumetric_tile_size_items);
+ RNA_def_property_ui_text(prop, "Tile Size", "Control the quality of the volumetric effects "
+ "(lower size increase vram usage and quality)");
+
+ prop = RNA_def_property(srna, "volumetric_samples", PROP_INT, PROP_NONE);
+ RNA_def_property_int_default(prop, 64);
+ RNA_def_property_ui_text(prop, "Samples", "Number of samples to compute volumetric effects");
+ RNA_def_property_range(prop, 1, 256);
+
+ prop = RNA_def_property(srna, "volumetric_sample_distribution", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_default(prop, 0.8f);
+ RNA_def_property_ui_text(prop, "Exponential Sampling", "Distribute more samples closer to the camera");
+
+ prop = RNA_def_property(srna, "volumetric_lights", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", SCE_EEVEE_VOLUMETRIC_LIGHTS);
+ RNA_def_property_boolean_default(prop, 1);
+ RNA_def_property_ui_text(prop, "Volumetric Lighting", "Enable scene lamps interactions with volumetrics");
+
+ prop = RNA_def_property(srna, "volumetric_light_clamp", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_default(prop, 0.0f);
+ RNA_def_property_range(prop, 0.0f, FLT_MAX);
+ RNA_def_property_ui_text(prop, "Clamp", "Maximum light contribution, reducing noise");
+
+ prop = RNA_def_property(srna, "volumetric_shadows", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", SCE_EEVEE_VOLUMETRIC_SHADOWS);
+ RNA_def_property_boolean_default(prop, 0);
+ RNA_def_property_ui_text(prop, "Volumetric Shadows", "Generate shadows from volumetric material (Very expensive)");
+
+ prop = RNA_def_property(srna, "volumetric_shadow_samples", PROP_INT, PROP_NONE);
+ RNA_def_property_int_default(prop, 16);
+ RNA_def_property_range(prop, 1, 128);
+ RNA_def_property_ui_text(prop, "Volumetric Shadow Samples", "Number of samples to compute volumetric shadowing");
+
+ prop = RNA_def_property(srna, "volumetric_colored_transmittance", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", SCE_EEVEE_VOLUMETRIC_COLORED);
+ RNA_def_property_boolean_default(prop, 1);
+ RNA_def_property_ui_text(prop, "Colored Transmittance", "Enable wavelength dependent volumetric transmittance");
+
+ /* Ambient Occlusion */
+ prop = RNA_def_property(srna, "gtao_enable", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", SCE_EEVEE_GTAO_ENABLED);
+ RNA_def_property_boolean_default(prop, 0);
+ RNA_def_property_ui_text(prop, "Ambient Occlusion", "Enable ambient occlusion to simulate medium scale indirect shadowing");
+
+ prop = RNA_def_property(srna, "gtao_use_bent_normals", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", SCE_EEVEE_GTAO_BENT_NORMALS);
+ RNA_def_property_boolean_default(prop, 1);
+ RNA_def_property_ui_text(prop, "Bent Normals", "Compute main non occluded direction to sample the environment");
+
+ prop = RNA_def_property(srna, "gtao_bounce", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", SCE_EEVEE_GTAO_BOUNCE);
+ RNA_def_property_boolean_default(prop, 1);
+ RNA_def_property_ui_text(prop, "Bounces Approximation", "An approximation to simulate light bounces "
+ "giving less occlusion on brighter objects");
+
+ prop = RNA_def_property(srna, "gtao_factor", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_default(prop, 1.0f);
+ RNA_def_property_ui_text(prop, "Factor", "Factor for ambient occlusion blending");
+ RNA_def_property_range(prop, 0.0f, FLT_MAX);
+ RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1f, 2);
+
+ prop = RNA_def_property(srna, "gtao_quality", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_default(prop, 0.25f);
+ RNA_def_property_ui_text(prop, "Trace Quality", "Quality of the horizon search");
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+
+ prop = RNA_def_property(srna, "gtao_distance", PROP_FLOAT, PROP_DISTANCE);
+ RNA_def_property_float_default(prop, 0.2f);
+ RNA_def_property_ui_text(prop, "Distance", "Distance of object that contribute to the ambient occlusion effect");
+ RNA_def_property_range(prop, 0.0f, 100000.0f);
+ RNA_def_property_ui_range(prop, 0.0f, 100.0f, 1, 3);
+
+ /* Depth of Field */
+ prop = RNA_def_property(srna, "dof_enable", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", SCE_EEVEE_DOF_ENABLED);
+ RNA_def_property_boolean_default(prop, 0);
+ RNA_def_property_ui_text(prop, "Depth of Field", "Enable depth of field using the values from the active camera");
+
+ prop = RNA_def_property(srna, "bokeh_max_size", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_default(prop, 100.0f);
+ RNA_def_property_ui_text(prop, "Max Size", "Max size of the bokeh shape for the depth of field (lower is faster)");
+ RNA_def_property_range(prop, 0.0f, 2000.0f);
+ RNA_def_property_ui_range(prop, 2.0f, 200.0f, 1, 3);
+
+ prop = RNA_def_property(srna, "bokeh_threshold", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_default(prop, 1.0f);
+ RNA_def_property_ui_text(prop, "Sprite Threshold", "Brightness threshold for using sprite base depth of field");
+ RNA_def_property_range(prop, 0.0f, 100000.0f);
+ RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3);
+
+ /* Bloom */
+ prop = RNA_def_property(srna, "bloom_enable", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", SCE_EEVEE_BLOOM_ENABLED);
+ RNA_def_property_boolean_default(prop, 0);
+ RNA_def_property_ui_text(prop, "Bloom", "High brighness pixels generate a glowing effect");
+
+ prop = RNA_def_property(srna, "bloom_threshold", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_default(prop, 0.8f);
+ RNA_def_property_ui_text(prop, "Threshold", "Filters out pixels under this level of brightness");
+ RNA_def_property_range(prop, 0.0f, 100000.0f);
+ RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3);
+
+ prop = RNA_def_property(srna, "bloom_color", PROP_FLOAT, PROP_COLOR);
+ RNA_def_property_float_array_default(prop, default_bloom_color);
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Color", "Color applied to the bloom effect");
+
+ prop = RNA_def_property(srna, "bloom_knee", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_default(prop, 0.5f);
+ RNA_def_property_ui_text(prop, "Knee", "Makes transition between under/over-threshold gradual");
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ prop = RNA_def_property(srna, "bloom_radius", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_default(prop, 6.5f);
+ RNA_def_property_ui_text(prop, "Radius", "Bloom spread distance");
+ RNA_def_property_range(prop, 0.0f, 100.0f);
+ RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3);
+
+ prop = RNA_def_property(srna, "bloom_clamp", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_default(prop, 1.0f);
+ RNA_def_property_ui_text(prop, "Clamp", "Maximum intensity a bloom pixel can have");
+ RNA_def_property_range(prop, 0.0f, 1000.0f);
+ RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3);
+
+ prop = RNA_def_property(srna, "bloom_intensity", PROP_FLOAT, PROP_UNSIGNED);
+ RNA_def_property_float_default(prop, 0.8f);
+ RNA_def_property_ui_text(prop, "Intensity", "Blend factor");
+ RNA_def_property_range(prop, 0.0f, 10000.0f);
+ RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3);
+
+ /* Motion blur */
+ prop = RNA_def_property(srna, "motion_blur_enable", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", SCE_EEVEE_MOTION_BLUR_ENABLED);
+ RNA_def_property_boolean_default(prop, 0);
+ RNA_def_property_ui_text(prop, "Motion Blur", "Enable motion blur effect (only in camera view)");
+
+ prop = RNA_def_property(srna, "motion_blur_samples", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_int_default(prop, 8);
+ RNA_def_property_ui_text(prop, "Samples", "Number of samples to take with motion blur");
+ RNA_def_property_range(prop, 1, 64);
+
+ prop = RNA_def_property(srna, "motion_blur_shutter", PROP_FLOAT, PROP_UNSIGNED);
+ RNA_def_property_float_default(prop, 1.0f);
+ RNA_def_property_ui_text(prop, "Shutter", "Time taken in frames between shutter open and close");
+ RNA_def_property_ui_range(prop, 0.01f, 2.0f, 1, 2);
+
+ /* Shadows */
+ prop = RNA_def_property(srna, "shadow_method", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_default(prop, SHADOW_ESM);
+ RNA_def_property_enum_items(prop, eevee_shadow_method_items);
+ RNA_def_property_ui_text(prop, "Method", "Technique use to compute the shadows");
+
+ prop = RNA_def_property(srna, "shadow_cube_size", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_default(prop, 512);
+ RNA_def_property_enum_items(prop, eevee_shadow_size_items);
+ RNA_def_property_ui_text(prop, "Cube Shadows Resolution", "Size of point and area lamps shadow maps");
+
+ prop = RNA_def_property(srna, "shadow_cascade_size", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_default(prop, 1024);
+ RNA_def_property_enum_items(prop, eevee_shadow_size_items);
+ RNA_def_property_ui_text(prop, "Directional Shadows Resolution", "Size of sun lamps shadow maps");
+
+ prop = RNA_def_property(srna, "shadow_high_bitdepth", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", SCE_EEVEE_SHADOW_HIGH_BITDEPTH);
+ RNA_def_property_boolean_default(prop, 0);
+ RNA_def_property_ui_text(prop, "High Bitdepth", "Use 32bit shadows");
}
void RNA_def_scene(BlenderRNA *brna)
@@ -6153,6 +6488,11 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "SceneDisplay");
RNA_def_property_ui_text(prop, "Scene Display", "Scene display settings for 3d viewport");
+ /* EEVEE */
+ prop = RNA_def_property(srna, "eevee", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "SceneEEVEE");
+ RNA_def_property_ui_text(prop, "EEVEE", "EEVEE settings for the scene");
+
/* Nestled Data */
/* *** Non-Animated *** */
RNA_define_animate_sdna(false);
@@ -6168,6 +6508,7 @@ void RNA_def_scene(BlenderRNA *brna)
rna_def_selected_uv_element(brna);
rna_def_display_safe_areas(brna);
rna_def_scene_display(brna);
+ rna_def_scene_eevee(brna);
RNA_define_animate_sdna(true);
/* *** Animated *** */
rna_def_scene_render_data(brna);