From aec90a8fafe19dfad110d9473d3f70e3aeeb8771 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 20 Dec 2013 22:16:53 +0600 Subject: Fix wrong display of movie clip cache with mask overlay enabled --- source/blender/editors/space_clip/clip_draw.c | 9 +++++++++ source/blender/editors/space_clip/clip_intern.h | 1 + source/blender/editors/space_clip/space_clip.c | 2 ++ 3 files changed, 12 insertions(+) (limited to 'source/blender') diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c index 79607163913..c029ced5688 100644 --- a/source/blender/editors/space_clip/clip_draw.c +++ b/source/blender/editors/space_clip/clip_draw.c @@ -180,6 +180,7 @@ static void draw_movieclip_cache(SpaceClip *sc, ARegion *ar, MovieClip *clip, Sc MovieTrackingReconstruction *reconstruction = BKE_tracking_get_active_reconstruction(tracking); glEnable(GL_BLEND); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); /* cache background */ glColor4ub(128, 128, 255, 64); @@ -1799,6 +1800,14 @@ void clip_draw_main(const bContext *C, SpaceClip *sc, ARegion *ar) draw_movieclip_notes(sc, ar); } +void clip_draw_cache_and_notes(const bContext *C, SpaceClip *sc, ARegion *ar) +{ + Scene *scene = CTX_data_scene(C); + MovieClip *clip = ED_space_clip_get_clip(sc); + draw_movieclip_cache(sc, ar, clip, scene); + draw_movieclip_notes(sc, ar); +} + /* draw grease pencil */ void clip_draw_grease_pencil(bContext *C, int onlyv2d) { diff --git a/source/blender/editors/space_clip/clip_intern.h b/source/blender/editors/space_clip/clip_intern.h index 513014a2d0d..af9d8f97138 100644 --- a/source/blender/editors/space_clip/clip_intern.h +++ b/source/blender/editors/space_clip/clip_intern.h @@ -73,6 +73,7 @@ void CLIP_OT_dopesheet_view_all(struct wmOperatorType *ot); void clip_draw_main(const struct bContext *C, struct SpaceClip *sc, struct ARegion *ar); void clip_draw_grease_pencil(struct bContext *C, int onlyv2d); void clip_draw_curfra_label(const int framenr, const float x, const float y); +void clip_draw_cache_and_notes(const bContext *C, SpaceClip *sc, ARegion *ar); /* clip_editor.c */ void clip_start_prefetch_job(const struct bContext *C); diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c index adc902bf4ba..2cabb595fb7 100644 --- a/source/blender/editors/space_clip/space_clip.c +++ b/source/blender/editors/space_clip/space_clip.c @@ -1214,6 +1214,8 @@ static void clip_main_area_draw(const bContext *C, ARegion *ar) glPopMatrix(); } + clip_draw_cache_and_notes(C, sc, ar); + if (sc->flag & SC_SHOW_GPENCIL) { /* Grease Pencil */ clip_draw_grease_pencil((bContext *)C, true); -- cgit v1.2.3