Fix #112645: switching view transform unnecessarily resets look
AgX and Filmic have different looks in the configuration, but the looks share the same UI name and purpose. So we can switch to the corresponding look when switching view transforms. Thanks to Yiming Wu for helping track down the problem. Pull Request: https://projects.blender.org/blender/blender/pulls/112686
This commit is contained in:
committed by
Brecht Van Lommel
parent
c9f44a2f9d
commit
70ac1e5df1
@@ -3376,10 +3376,21 @@ const char *IMB_colormanagement_look_validate_for_view(const char *view_name,
|
||||
return look_name;
|
||||
}
|
||||
|
||||
/* Keep same look if compatible. */
|
||||
if (colormanage_compatible_look(look_descr, view_name)) {
|
||||
return look_name;
|
||||
}
|
||||
|
||||
/* Try to find another compatible look with the same UI name, in case
|
||||
* of looks specialized for view transform, */
|
||||
LISTBASE_FOREACH (ColorManagedLook *, other_look, &global_looks) {
|
||||
if (STREQ(look_descr->ui_name, other_look->ui_name) &&
|
||||
colormanage_compatible_look(other_look, view_name))
|
||||
{
|
||||
return other_look->name;
|
||||
}
|
||||
}
|
||||
|
||||
return IMB_colormanagement_look_get_default_name();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user