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.
This commit is contained in:
Dalai Felinto
2018-05-16 19:34:24 +02:00
parent d8dca3c3b0
commit 15c2801aac
21 changed files with 765 additions and 737 deletions

View File

@@ -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);
}