From bdf9e023466756b6a75722cfa05ce75150e5ad75 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 7 Jun 2012 18:24:36 +0000 Subject: new sequence strip type for masks. --- source/blender/editors/space_sequencer/sequencer_draw.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/space_sequencer/sequencer_draw.c') diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index cb15eed6a37..eb943451b1f 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -40,6 +40,7 @@ #include "IMB_imbuf_types.h" #include "DNA_scene_types.h" +#include "DNA_mask_types.h" #include "DNA_screen_types.h" #include "DNA_space_types.h" #include "DNA_userdef_types.h" @@ -97,7 +98,11 @@ static void get_seq_color3ubv(Scene *curscene, Sequence *seq, unsigned char col[ case SEQ_TYPE_MOVIECLIP: UI_GetThemeColor3ubv(TH_SEQ_MOVIECLIP, col); break; - + + case SEQ_TYPE_MASK: + UI_GetThemeColor3ubv(TH_SEQ_MASK, col); /* TODO */ + break; + case SEQ_TYPE_SCENE: UI_GetThemeColor3ubv(TH_SEQ_SCENE, col); @@ -550,6 +555,16 @@ static void draw_seq_text(View2D *v2d, Sequence *seq, float x1, float x2, float seq->len, name); } } + else if (seq->type == SEQ_TYPE_MASK) { + if (seq->mask && strcmp(name, seq->mask->id.name + 2) != 0) { + BLI_snprintf(str, sizeof(str), "%d | %s: %s", + seq->len, name, seq->mask->id.name + 2); + } + else { + BLI_snprintf(str, sizeof(str), "%d | %s", + seq->len, name); + } + } else if (seq->type == SEQ_TYPE_MULTICAM) { BLI_snprintf(str, sizeof(str), "Cam | %s: %d", name, seq->multicam_source); -- cgit v1.2.3