Merge branch 'blender-v4.2-release'

This commit is contained in:
Miguel Pozo 2024-07-01 13:41:58 +02:00
commit df0ca5382c

@ -4215,6 +4215,23 @@ void blo_do_versions_400(FileData *fd, Library * /*lib*/, Main *bmain)
}
}
if (!MAIN_VERSION_FILE_ATLEAST(bmain, 402, 64)) {
Scene *scene = static_cast<Scene *>(bmain->scenes.first);
bool is_eevee_legacy = scene && STR_ELEM(scene->r.engine, RE_engine_id_BLENDER_EEVEE);
if (is_eevee_legacy) {
/* Re-apply versioning made for EEVEE-Next in 4.1 before it got delayed. */
LISTBASE_FOREACH (Material *, material, &bmain->materials) {
bool transparent_shadows = material->blend_shadow != MA_BS_SOLID;
SET_FLAG_FROM_TEST(material->blend_flag, transparent_shadows, MA_BL_TRANSPARENT_SHADOW);
}
LISTBASE_FOREACH (Material *, mat, &bmain->materials) {
mat->surface_render_method = (mat->blend_method == MA_BM_BLEND) ?
MA_SURFACE_METHOD_FORWARD :
MA_SURFACE_METHOD_DEFERRED;
}
}
}
if (!MAIN_VERSION_FILE_ATLEAST(bmain, 403, 3)) {
LISTBASE_FOREACH (Brush *, brush, &bmain->brushes) {
if (BrushGpencilSettings *settings = brush->gpencil_settings) {