From 57de5686048f1eac07985eb2991f0b6f6c4fee22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Wed, 14 Oct 2020 18:18:42 +0200 Subject: Fix T81004 Python: Images drawn in the Sequence Editor have wrong colors This was caused by the sequencer using a sRGB buffer without using the sRGB transform. This patch make it so that the framebuffer is rebound using the sRGB transform before the python draw callbacks. --- source/blender/editors/screen/area.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/editors/screen/area.c') diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 6399778f62b..1a8c74c59b1 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -552,7 +552,10 @@ void ED_region_do_draw(bContext *C, ARegion *region) * for drawing of borders/gestures etc */ ED_region_pixelspace(region); + GPUFrameBuffer *fb = GPU_framebuffer_active_get(); + GPU_framebuffer_bind(fb); ED_region_draw_cb_draw(C, region, REGION_DRAW_POST_PIXEL); + GPU_framebuffer_bind_no_srgb(fb); region_draw_azones(area, region); -- cgit v1.2.3