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:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-10-01 15:14:02 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-10-01 15:14:02 +0400
commit1d7bf727ff50a9dc21de3c002311eb670fc680b4 (patch)
tree049fcb0c54369a739badc8d994390377c915a815 /source/blender/gpu/intern/gpu_material.c
parentc9c76a9a68ff9f0c32c6a1f77d386349ca5abaca (diff)
Fix #32695: Can't disable color management for 3D view
Made it so viewport will disable color management if display device set to None. This solves couple of regressions, mainly related on old BGE files and made None display behave exactly as old color management disabled.
Diffstat (limited to 'source/blender/gpu/intern/gpu_material.c')
-rw-r--r--source/blender/gpu/intern/gpu_material.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index dd92b561235..4732586b912 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -389,10 +389,8 @@ void gpu_material_add_node(GPUMaterial *material, GPUNode *node)
int GPU_material_do_color_management(GPUMaterial *mat)
{
- /* OCIO_TODO: for now assume scene always does color management. probably could be
- * improved in the future to support real display transform
- * also probably we'll need to get rid ofgame engine's color management flag
- */
+ if (!BKE_scene_check_color_management_enabled(mat->scene))
+ return FALSE;
return !((mat->scene->gm.flag & GAME_GLSL_NO_COLOR_MANAGEMENT));
}