[Bf-blender-cvs] [aec90a8] master: Fix wrong display of movie clip cache with mask overlay enabled

Sergey Sharybin noreply at git.blender.org
Fri Dec 20 17:19:00 CET 2013


Commit: aec90a8fafe19dfad110d9473d3f70e3aeeb8771
Author: Sergey Sharybin
Date:   Fri Dec 20 22:16:53 2013 +0600
http://developer.blender.org/rBaec90a8fafe19dfad110d9473d3f70e3aeeb8771

Fix wrong display of movie clip cache with mask overlay enabled

===================================================================

M	source/blender/editors/space_clip/clip_draw.c
M	source/blender/editors/space_clip/clip_intern.h
M	source/blender/editors/space_clip/space_clip.c

===================================================================

diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c
index 7960716..c029ced 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 513014a..af9d8f9 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 adc902b..2cabb59 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);




More information about the Bf-blender-cvs mailing list