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>2008-01-20 23:09:06 +0300
committerCampbell Barton <ideasman42@gmail.com>2008-01-20 23:09:06 +0300
commitc11fce1a9fcad3c1e8e80a01c4f3b25afb35dc0e (patch)
tree6819b170d64fef3925da56767ec6102fe193c70f /source/blender/src/drawseq.c
parent053dca1fa954d29251dbe841d287305ec81f4d01 (diff)
draw muted strips faded. hkey added alt+hkey to mute and un-mute strips, Mkey is used for metastrips. would be nice to make this similar to object mode restrict render option.
Diffstat (limited to 'source/blender/src/drawseq.c')
-rw-r--r--source/blender/src/drawseq.c50
1 files changed, 49 insertions, 1 deletions
diff --git a/source/blender/src/drawseq.c b/source/blender/src/drawseq.c
index 75c32524654..abf0f24e892 100644
--- a/source/blender/src/drawseq.c
+++ b/source/blender/src/drawseq.c
@@ -92,6 +92,24 @@
#define SEQ_STRIP_OFSBOTTOM 0.2
#define SEQ_STRIP_OFSTOP 0.8
+static GLubyte halftone[] = {
+ 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55};
+
/* Note, Dont use WHILE_SEQ while drawing! - it messes up transform, - Campbell */
int no_rightbox=0, no_leftbox= 0;
@@ -220,6 +238,14 @@ static void drawmeta_contents(Sequence *seqm, float x1, float y1, float x2, floa
dx= (x2-x1)/nr;
+ if (seqm->flag & SEQ_MUTE) {
+ glEnable(GL_POLYGON_STIPPLE);
+ glPolygonStipple(halftone);
+
+ glEnable(GL_LINE_STIPPLE);
+ glLineStipple(1, 0x8888);
+ }
+
for (seq= seqm->seqbase.first; seq; seq= seq->next) {
get_seq_color3ubv(seq, col);
@@ -234,6 +260,11 @@ static void drawmeta_contents(Sequence *seqm, float x1, float y1, float x2, floa
x1+= dx;
}
+
+ if (seqm->flag & SEQ_MUTE) {
+ glDisable(GL_POLYGON_STIPPLE);
+ glDisable(GL_LINE_STIPPLE);
+ }
}
static void drawseqwave(Sequence *seq, float x1, float y1, float x2, float y2, int winx)
@@ -603,6 +634,11 @@ static void draw_shadedstrip(Sequence *seq, char *col, float x1, float y1, float
{
float ymid1, ymid2;
+ if (seq->flag & SEQ_MUTE) {
+ glEnable(GL_POLYGON_STIPPLE);
+ glPolygonStipple(halftone);
+ }
+
ymid1 = (y2-y1)*0.25 + y1;
ymid2 = (y2-y1)*0.65 + y1;
@@ -644,6 +680,9 @@ static void draw_shadedstrip(Sequence *seq, char *col, float x1, float y1, float
glEnd();
+ if (seq->flag & SEQ_MUTE) {
+ glDisable(GL_POLYGON_STIPPLE);
+ }
}
/*
@@ -701,8 +740,17 @@ static void draw_seq_strip(Sequence *seq, ScrArea *sa, SpaceSeq *sseq, int outli
BIF_GetColorPtrBlendShade3ubv(col, col, col, 0.0, outline_tint);
glColor3ubv((GLubyte *)col);
+
+ if (seq->flag & SEQ_MUTE) {
+ glEnable(GL_LINE_STIPPLE);
+ glLineStipple(1, 0x8888);
+ }
+
gl_round_box_shade(GL_LINE_LOOP, x1, y1, x2, y2, 0.0, 0.1, 0.0);
-
+
+ if (seq->flag & SEQ_MUTE) {
+ glDisable(GL_LINE_STIPPLE);
+ }
/* calculate if seq is long enough to print a name */
x1= seq->startdisp+seq->handsize;