[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47061] branches/soc-2011-tomato/source/ blender/editors/space_clip/clip_draw.c: draw the mask keyframes in the clip view
Campbell Barton
ideasman42 at gmail.com
Sun May 27 01:18:08 CEST 2012
Revision: 47061
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47061
Author: campbellbarton
Date: 2012-05-26 23:18:07 +0000 (Sat, 26 May 2012)
Log Message:
-----------
draw the mask keyframes in the clip view
Modified Paths:
--------------
branches/soc-2011-tomato/source/blender/editors/space_clip/clip_draw.c
Modified: branches/soc-2011-tomato/source/blender/editors/space_clip/clip_draw.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/space_clip/clip_draw.c 2012-05-26 22:46:28 UTC (rev 47060)
+++ branches/soc-2011-tomato/source/blender/editors/space_clip/clip_draw.c 2012-05-26 23:18:07 UTC (rev 47061)
@@ -33,12 +33,14 @@
#include "DNA_movieclip_types.h"
#include "DNA_scene_types.h"
#include "DNA_object_types.h" /* SELECT */
+#include "DNA_mask_types.h"
#include "MEM_guardedalloc.h"
#include "BKE_context.h"
#include "BKE_movieclip.h"
#include "BKE_tracking.h"
+#include "BKE_mask.h"
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
@@ -194,6 +196,32 @@
glRecti(x, 0, x + framelen, 8);
clip_draw_curfra_label(sc, x, 8.0f);
+
+ /* movie clip animation */
+ if ((sc->mode == SC_MODE_MASKEDITING) && sc->mask) {
+ MaskObject *maskobj = BKE_mask_object_active(sc->mask);
+ if (maskobj) {
+ MaskObjectShape *maskobj_shape;
+
+ glColor4ub(255, 255, 0, 96);
+ glBegin(GL_LINES);
+
+ for (maskobj_shape = maskobj->splines_shapes.first;
+ maskobj_shape;
+ maskobj_shape = maskobj_shape->next)
+ {
+ i = maskobj_shape->frame;
+
+ /* glRecti((i - sfra) * framelen, 0, (i - sfra + 1) * framelen, 4); */
+
+ /* use a line so we always see the keyframes */
+ glVertex2i((i - sfra) * framelen, 0);
+ glVertex2i((i - sfra) * framelen, 4);
+ }
+
+ glEnd();
+ }
+ }
}
static void draw_movieclip_notes(SpaceClip *sc, ARegion *ar)
More information about the Bf-blender-cvs
mailing list