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:
authorClément Foucault <foucault.clem@gmail.com>2020-10-14 19:18:42 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-10-14 19:53:41 +0300
commit57de5686048f1eac07985eb2991f0b6f6c4fee22 (patch)
treeea4e5b4530444f8e3fb3e260b081c6a3993a04e0 /source/blender/editors/space_sequencer
parent327107412032d075c63427d86e5154a5e37b8d4a (diff)
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.
Diffstat (limited to 'source/blender/editors/space_sequencer')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 38b5ebaf78c..89d6d647ada 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -2299,7 +2299,10 @@ void draw_timeline_seq(const bContext *C, ARegion *region)
}
/* Draw attached callbacks. */
+ GPU_framebuffer_bind(framebuffer_overlay);
ED_region_draw_cb_draw(C, region, REGION_DRAW_PRE_VIEW);
+ GPU_framebuffer_bind_no_srgb(framebuffer_overlay);
+
seq_draw_sfra_efra(scene, v2d);
if (ed) {
@@ -2353,7 +2356,10 @@ void draw_timeline_seq(const bContext *C, ARegion *region)
ANIM_draw_previewrange(C, v2d, 1);
/* Draw registered callbacks. */
+ GPU_framebuffer_bind(framebuffer_overlay);
ED_region_draw_cb_draw(C, region, REGION_DRAW_POST_VIEW);
+ GPU_framebuffer_bind_no_srgb(framebuffer_overlay);
+
UI_view2d_view_restore(C);
ED_time_scrub_draw(region, scene, !(sseq->flag & SEQ_DRAWFRAMES), true);