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:
authorJeroen Bakker <j.bakker@atmind.nl>2019-05-21 13:00:48 +0300
committerJeroen Bakker <j.bakker@atmind.nl>2019-05-31 13:44:18 +0300
commit23064248d7a08d01061e108972985a11997f046c (patch)
treee64356ca66a809b64b716bca535fb09e86dbaaa4 /source/blender/draw/engines/gpencil/gpencil_engine.c
parentd0fb602e2c365025131c782c1bc9b7d60013a678 (diff)
DrawManager: Color Management
The draw manager used to determine if the view transform should be applied by checking if the scene was not rendered to an offscreen image. As the sequencer and texture painting needs to render to an offscreen image with the view transform applied we need to separate the `do_color_management` from the `is_image_render`. Reviewed By: fclem Maniphest Tasks: T64849 Differential Revision: https://developer.blender.org/D4909
Diffstat (limited to 'source/blender/draw/engines/gpencil/gpencil_engine.c')
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_engine.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index f78f7295d24..07588467ae2 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -976,7 +976,7 @@ void GPENCIL_draw_scene(void *ved)
stl->storage->blend_mode = array_elm->mode;
stl->storage->clamp_layer = (int)array_elm->clamp_layer;
stl->storage->blend_opacity = array_elm->blend_opacity;
- stl->storage->tonemapping = stl->storage->is_render ? 1 : 0;
+ stl->storage->tonemapping = DRW_state_do_color_management() ? 0 : 1;
DRW_draw_pass(psl->blend_pass);
stl->storage->tonemapping = 0;
@@ -1018,7 +1018,8 @@ void GPENCIL_draw_scene(void *ved)
GPU_framebuffer_bind(fbl->main);
}
/* tonemapping */
- stl->storage->tonemapping = is_render ? 1 : 0;
+ stl->storage->tonemapping = DRW_state_do_color_management() ? 0 : 1;
+
/* active select flag and selection color */
if (!is_render) {
UI_GetThemeColorShadeAlpha4fv(