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:
authorCampbell Barton <ideasman42@gmail.com>2012-06-04 20:42:58 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-06-04 20:42:58 +0400
commit68a9dd54ec909d8e56da0da487c6ec3559551edd (patch)
tree9b0949fdc65604fe3e39b765b4085a714b8e7471 /source/blender/editors/space_clip/clip_draw.c
parent2230f3346e8a7ac2191690627856a1a8745bd8e9 (diff)
mask mode for clip editor developed by Sergey Sharybin, Pete Larabell and myself.
see: http://wiki.blender.org/index.php/User:Nazg-gul/MaskEditor note - mask editing tools need continued development, feather option is not working 100%
Diffstat (limited to 'source/blender/editors/space_clip/clip_draw.c')
-rw-r--r--source/blender/editors/space_clip/clip_draw.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c
index c00359f0f32..6ac5ec59742 100644
--- a/source/blender/editors/space_clip/clip_draw.c
+++ b/source/blender/editors/space_clip/clip_draw.c
@@ -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 @@ static void draw_movieclip_cache(SpaceClip *sc, ARegion *ar, MovieClip *clip, Sc
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) {
+ MaskLayer *masklay = BKE_mask_layer_active(sc->mask);
+ if (masklay) {
+ MaskLayerShape *masklay_shape;
+
+ glColor4ub(255, 175, 0, 255);
+ glBegin(GL_LINES);
+
+ for (masklay_shape = masklay->splines_shapes.first;
+ masklay_shape;
+ masklay_shape = masklay_shape->next)
+ {
+ i = masklay_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, (i == CFRA) ? 22 : 10);
+ }
+
+ glEnd();
+ }
+ }
}
static void draw_movieclip_notes(SpaceClip *sc, ARegion *ar)