Merge branch 'blender-v4.2-release'

This commit is contained in:
Campbell Barton
2024-06-11 22:40:57 +10:00
6 changed files with 30 additions and 35 deletions

View File

@@ -3554,7 +3554,7 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain)
EEVEE_GET_BOOL(props, gtao_use_bent_normals, SCE_EEVEE_GTAO_BENT_NORMALS);
EEVEE_GET_BOOL(props, gtao_bounce, SCE_EEVEE_GTAO_BOUNCE);
EEVEE_GET_BOOL(props, dof_enable, SCE_EEVEE_DOF_ENABLED);
EEVEE_GET_BOOL(props, bloom_enable, SCE_EEVEE_BLOOM_ENABLED);
// EEVEE_GET_BOOL(props, bloom_enable, SCE_EEVEE_BLOOM_ENABLED);
EEVEE_GET_BOOL(props, motion_blur_enable, SCE_EEVEE_MOTION_BLUR_ENABLED_DEPRECATED);
EEVEE_GET_BOOL(props, shadow_high_bitdepth, SCE_EEVEE_SHADOW_HIGH_BITDEPTH);
EEVEE_GET_BOOL(props, taa_reprojection, SCE_EEVEE_TAA_REPROJECTION);

View File

@@ -234,7 +234,7 @@ void Film::init(const int2 &extent, const rcti *output_rect)
}
/* Filter obsolete passes. */
enabled_passes_ &= ~(EEVEE_RENDER_PASS_UNUSED_8 | EEVEE_RENDER_PASS_BLOOM);
enabled_passes_ &= ~(EEVEE_RENDER_PASS_UNUSED_8 | EEVEE_RENDER_PASS_UNUSED_14);
if (scene.r.mode & R_MBLUR) {
/* Disable motion vector pass if motion blur is enabled. */

View File

@@ -32,7 +32,7 @@ typedef enum eViewLayerEEVEEPassType {
EEVEE_RENDER_PASS_ENVIRONMENT = (1 << 11),
EEVEE_RENDER_PASS_SHADOW = (1 << 12),
EEVEE_RENDER_PASS_AO = (1 << 13),
EEVEE_RENDER_PASS_BLOOM = (1 << 14),
EEVEE_RENDER_PASS_UNUSED_14 = (1 << 14), /* EEVEE_RENDER_PASS_BLOOM */
EEVEE_RENDER_PASS_AOV = (1 << 15),
/*
* TODO(@jbakker): Clean up conflicting bits after EEVEE has been removed.

View File

@@ -2823,7 +2823,7 @@ enum {
SCE_EEVEE_GTAO_BENT_NORMALS = (1 << 5),
SCE_EEVEE_GTAO_BOUNCE = (1 << 6),
// SCE_EEVEE_DOF_ENABLED = (1 << 7), /* Moved to camera->dof.flag */
SCE_EEVEE_BLOOM_ENABLED = (1 << 8),
// SCE_EEVEE_BLOOM_ENABLED = (1 << 8), /* Unused */
SCE_EEVEE_MOTION_BLUR_ENABLED_DEPRECATED = (1 << 9), /* Moved to scene->r.mode */
SCE_EEVEE_SHADOW_HIGH_BITDEPTH = (1 << 10),
SCE_EEVEE_TAA_REPROJECTION = (1 << 11),

View File

@@ -4705,10 +4705,14 @@ static void rna_def_view_layer_eevee(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Volume Light", "Deliver volume direct light pass");
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
# if 1
/* Bloom is deprecated since Blender 4.2, is kept for add-on compatibility reasons and needs to
* be removed in a future release. */
prop = RNA_def_property(srna, "use_pass_bloom", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, nullptr, "render_passes", EEVEE_RENDER_PASS_BLOOM);
RNA_def_property_ui_text(prop, "Bloom", "Deliver bloom pass");
RNA_def_property_boolean_sdna(prop, nullptr, "render_passes", 0 /*EEVEE_RENDER_PASS_BLOOM*/);
RNA_def_property_ui_text(prop, "Bloom", "Deliver bloom pass (deprecated)");
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
# endif
prop = RNA_def_property(srna, "use_pass_transparent", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, nullptr, "render_passes", EEVEE_RENDER_PASS_TRANSPARENT);
@@ -8423,15 +8427,19 @@ static void rna_def_scene_eevee(BlenderRNA *brna)
RNA_def_property_ui_range(prop, 0.0f, 20.0f, 1, 1);
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
/* Bloom */
/* Bloom is deprecated since Blender 4.2, is kept for add-on compatibility reasons and needs to
* be removed in a future release. */
# if 1
prop = RNA_def_property(srna, "use_bloom", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, nullptr, "flag", SCE_EEVEE_BLOOM_ENABLED);
RNA_def_property_ui_text(prop, "Bloom", "High brightness pixels generate a glowing effect");
RNA_def_property_boolean_sdna(prop, nullptr, "flag", 0 /*SCE_EEVEE_BLOOM_ENABLED*/);
RNA_def_property_ui_text(
prop, "Bloom", "High brightness pixels generate a glowing effect (deprecated)");
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
prop = RNA_def_property(srna, "bloom_threshold", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_ui_text(prop, "Threshold", "Filters out pixels under this level of brightness");
RNA_def_property_ui_text(
prop, "Threshold", "Filters out pixels under this level of brightness (deprecated)");
RNA_def_property_range(prop, 0.0f, 100000.0f);
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3);
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
@@ -8439,18 +8447,19 @@ static void rna_def_scene_eevee(BlenderRNA *brna)
prop = RNA_def_property(srna, "bloom_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Color", "Color applied to the bloom effect");
RNA_def_property_ui_text(prop, "Color", "Color applied to the bloom effect (deprecated)");
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
prop = RNA_def_property(srna, "bloom_knee", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_ui_text(prop, "Knee", "Makes transition between under/over-threshold gradual");
RNA_def_property_ui_text(
prop, "Knee", "Makes transition between under/over-threshold gradual (deprecated)");
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, nullptr);
prop = RNA_def_property(srna, "bloom_radius", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_ui_text(prop, "Radius", "Bloom spread distance");
RNA_def_property_ui_text(prop, "Radius", "Bloom spread distance (deprecated)");
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3);
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
@@ -8458,19 +8467,19 @@ static void rna_def_scene_eevee(BlenderRNA *brna)
prop = RNA_def_property(srna, "bloom_clamp", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_ui_text(
prop, "Clamp", "Maximum intensity a bloom pixel can have (0 to disable)");
prop, "Clamp", "Maximum intensity a bloom pixel can have (0 to disable) (deprecated)");
RNA_def_property_range(prop, 0.0f, 100000.0f);
RNA_def_property_ui_range(prop, 0.0f, 1000.0f, 1, 3);
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
prop = RNA_def_property(srna, "bloom_intensity", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_ui_text(prop, "Intensity", "Blend factor");
RNA_def_property_ui_text(prop, "Intensity", "Blend factor (deprecated)");
RNA_def_property_range(prop, 0.0f, 10000.0f);
RNA_def_property_ui_range(prop, 0.0f, 0.1f, 1, 3);
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
# endif
/* Motion blur */
prop = RNA_def_property(srna, "motion_blur_depth_scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_ui_text(prop,

View File

@@ -462,9 +462,6 @@ static const EnumPropertyItem rna_enum_view3dshading_render_pass_type_items[] =
{EEVEE_RENDER_PASS_SPECULAR_COLOR, "SPECULAR_COLOR", 0, "Specular Color", ""},
{EEVEE_RENDER_PASS_VOLUME_LIGHT, "VOLUME_LIGHT", 0, "Volume Light", ""},
RNA_ENUM_ITEM_HEADING(N_("Effects"), nullptr),
{EEVEE_RENDER_PASS_BLOOM, "BLOOM", 0, "Bloom", ""},
RNA_ENUM_ITEM_HEADING(N_("Data"), nullptr),
{EEVEE_RENDER_PASS_NORMAL, "NORMAL", 0, "Normal", ""},
{EEVEE_RENDER_PASS_MIST, "MIST", 0, "Mist", ""},
@@ -1438,7 +1435,6 @@ static const EnumPropertyItem *rna_3DViewShading_render_pass_itemf(bContext *C,
Scene *scene = CTX_data_scene(C);
ViewLayer *view_layer = CTX_data_view_layer(C);
const bool bloom_enabled = scene->eevee.flag & SCE_EEVEE_BLOOM_ENABLED;
const bool aov_available = BKE_view_layer_has_valid_aov(view_layer);
const bool eevee_next_active = STREQ(scene->r.engine, "BLENDER_EEVEE_NEXT");
@@ -1468,10 +1464,10 @@ static const EnumPropertyItem *rna_3DViewShading_render_pass_itemf(bContext *C,
!eevee_next_active)
{
}
else if (!((!bloom_enabled &&
(item->value == EEVEE_RENDER_PASS_BLOOM || STREQ(item->name, "Effects"))) ||
(!aov_available && STREQ(item->name, "Shader AOV"))))
{
else if (!aov_available && STREQ(item->name, "Shader AOV")) {
/* Don't add Shader AOV submenu when there are no AOVs defined. */
}
else {
RNA_enum_item_add(&result, &totitem, item);
}
}
@@ -1484,13 +1480,9 @@ static int rna_3DViewShading_render_pass_get(PointerRNA *ptr)
{
View3DShading *shading = (View3DShading *)ptr->data;
eViewLayerEEVEEPassType result = eViewLayerEEVEEPassType(shading->render_pass);
Scene *scene = rna_3DViewShading_scene(ptr);
ViewLayer *view_layer = rna_3DViewShading_view_layer(ptr);
if (result == EEVEE_RENDER_PASS_BLOOM && ((scene->eevee.flag & SCE_EEVEE_BLOOM_ENABLED) == 0)) {
return EEVEE_RENDER_PASS_COMBINED;
}
else if (result == EEVEE_RENDER_PASS_AOV) {
if (result == EEVEE_RENDER_PASS_AOV) {
if (!view_layer) {
return EEVEE_RENDER_PASS_COMBINED;
}
@@ -1508,7 +1500,6 @@ static int rna_3DViewShading_render_pass_get(PointerRNA *ptr)
static void rna_3DViewShading_render_pass_set(PointerRNA *ptr, int value)
{
View3DShading *shading = (View3DShading *)ptr->data;
Scene *scene = rna_3DViewShading_scene(ptr);
ViewLayer *view_layer = rna_3DViewShading_view_layer(ptr);
shading->aov_name[0] = 0;
@@ -1528,11 +1519,6 @@ static void rna_3DViewShading_render_pass_set(PointerRNA *ptr, int value)
shading->render_pass = EEVEE_RENDER_PASS_AOV;
STRNCPY(shading->aov_name, aov->name);
}
else if (value == EEVEE_RENDER_PASS_BLOOM &&
((scene->eevee.flag & SCE_EEVEE_BLOOM_ENABLED) == 0))
{
shading->render_pass = EEVEE_RENDER_PASS_COMBINED;
}
else {
shading->render_pass = value;
}