Color management: Validate look is compatible with view on load

While currently the only way to reproduce the issue is to modify
the default OCIO configuration, change the view (which does yet
validate look on change) and save-reload, it seems to be a good
thing to validate anyway, to be more future-proof.

Pull Request: https://projects.blender.org/blender/blender/pulls/111209
This commit is contained in:
Sergey Sharybin
2023-08-17 14:38:52 +02:00
committed by Sergey Sharybin
parent 241fac09dd
commit 16c44700e9

View File

@@ -1148,6 +1148,17 @@ static void colormanage_check_view_settings(ColorManagedDisplaySettings *display
STRNCPY(view_settings->look, default_look_name);
}
else if (!colormanage_compatible_look(look, view_settings->view_transform)) {
printf(
"Color management: %s look \"%s\" is not compatible with view \"%s\", setting default "
"\"%s\".\n",
what,
view_settings->look,
view_settings->view_transform,
default_look->name);
STRNCPY(view_settings->look, default_look->name);
}
}
/* OCIO_TODO: move to do_versions() */