Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-05-05 18:20:19 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-05-20 17:35:34 +0300
commitd2e139e44e0a3b70ae3b517c7b8f2449d3d1620c (patch)
tree8c5adc607e02db5975d96d7510e629c71e3a3b56 /source/blender/imbuf
parentb9ce1fee42291b174f1bdee2ae1fded8e9579937 (diff)
Color Management: update configuration, remove legacy transforms
* Replace Log view transform with Filmic Log. * Remove Rec.709, DCI-P3 displays that were incomplete and outdated. * Remove outdated RRT and Film transforms, replaced by Filmic. * Remove camera responsive curves that don't work with HDR colors. * Rename Default view transform to Standard. We're breaking compatibility now for 2.80, so that we can add future improvements on a clean config. Part of the code was contributed by George Vogiatzis in D4782. Differential Revision: https://developer.blender.org/D4900
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r--source/blender/imbuf/intern/colormanagement.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/source/blender/imbuf/intern/colormanagement.c b/source/blender/imbuf/intern/colormanagement.c
index 8a10af7e184..583a3be8168 100644
--- a/source/blender/imbuf/intern/colormanagement.c
+++ b/source/blender/imbuf/intern/colormanagement.c
@@ -747,6 +747,16 @@ void colormanagement_exit(void)
/*********************** Internal functions *************************/
+static bool colormanage_compatible_look(ColorManagedLook *look, const char *view_name)
+{
+ if (look->is_noop) {
+ return true;
+ }
+
+ /* Skip looks only relevant to specific view transforms. */
+ return (look->view[0] == 0 || (view_name && STREQ(look->view, view_name)));
+}
+
void colormanage_cache_free(ImBuf *ibuf)
{
if (ibuf->display_buffer_flags) {
@@ -840,7 +850,7 @@ static OCIO_ConstProcessorRcPtr *create_display_buffer_processor(const char *loo
OCIO_displayTransformSetView(dt, view_transform);
OCIO_displayTransformSetDisplay(dt, display);
- if (look_descr->is_noop == false) {
+ if (look_descr->is_noop == false && colormanage_compatible_look(look_descr, view_transform)) {
OCIO_displayTransformSetLooksOverrideEnabled(dt, true);
OCIO_displayTransformSetLooksOverride(dt, look);
}
@@ -989,9 +999,9 @@ static OCIO_ConstProcessorRcPtr *display_to_scene_linear_processor(ColorManagedD
void IMB_colormanagement_init_default_view_settings(
ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings)
{
- /* First, try use "Default" view transform of the requested device. */
+ /* First, try use "Standard" view transform of the requested device. */
ColorManagedView *default_view = colormanage_view_get_named_for_display(
- display_settings->display_device, "Default");
+ display_settings->display_device, "Standard");
/* If that fails, we fall back to the default view transform of the display
* as per OCIO configuration. */
if (default_view == NULL) {
@@ -3215,17 +3225,9 @@ void IMB_colormanagement_look_items_add(struct EnumPropertyItem **items,
const char *view_name)
{
ColorManagedLook *look;
- const char *view_filter = NULL;
-
- /* Test if this view transform is limited to specific looks. */
- for (look = global_looks.first; look; look = look->next) {
- if (STREQ(look->view, view_name)) {
- view_filter = view_name;
- }
- }
for (look = global_looks.first; look; look = look->next) {
- if (!look->is_noop && view_filter && !STREQ(look->view, view_filter)) {
+ if (!colormanage_compatible_look(look, view_name)) {
continue;
}