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>2011-08-03 13:28:16 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-08-03 13:28:16 +0400
commit461bb17d31cc17c07a4b00437b5b90d58f14a894 (patch)
treee013ce77199b24ba4680ad69c9eb783320cf3abe /source/blender/editors
parentfd35ee8422eee72beacab896e21a6e554a8ba853 (diff)
fix [#27965] VSE: no visual feedback on locked strips
added xpm -> opengl stipple conversion script.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/include/BIF_glutil.h2
-rw-r--r--source/blender/editors/screen/glutil.c38
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c19
3 files changed, 59 insertions, 0 deletions
diff --git a/source/blender/editors/include/BIF_glutil.h b/source/blender/editors/include/BIF_glutil.h
index c9615204607..27bd31c20ff 100644
--- a/source/blender/editors/include/BIF_glutil.h
+++ b/source/blender/editors/include/BIF_glutil.h
@@ -52,6 +52,8 @@ void fdrawXORcirc(float xofs, float yofs, float rad);
/* glStipple defines */
extern unsigned char stipple_halftone[128];
extern unsigned char stipple_quarttone[128];
+extern unsigned char stipple_diag_stripes_pos[128];
+extern unsigned char stipple_diag_stripes_neg[128];
/**
* Draw a lined (non-looping) arc with the given
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c
index 2918c98c84a..f56ae17d366 100644
--- a/source/blender/editors/screen/glutil.c
+++ b/source/blender/editors/screen/glutil.c
@@ -92,6 +92,44 @@ GLubyte stipple_quarttone[128] = {
136,136,136,136,0,0,0,0,34,34,34,34,0,0,0,0};
+GLubyte stipple_diag_stripes_pos[128] = {
+ 0x00, 0xff, 0x00, 0xff, 0x01, 0xfe, 0x01, 0xfe,
+ 0x03, 0xfc, 0x03, 0xfc, 0x07, 0xf8, 0x07, 0xf8,
+ 0x0f, 0xf0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0,
+ 0x3f, 0xc0, 0x3f, 0xc0, 0x7f, 0x80, 0x7f, 0x80,
+ 0xff, 0x00, 0xff, 0x00, 0xfe, 0x01, 0xfe, 0x01,
+ 0xfc, 0x03, 0xfc, 0x03, 0xf8, 0x07, 0xf8, 0x07,
+ 0xf0, 0x0f, 0xf0, 0x0f, 0xe0, 0x1f, 0xe0, 0x1f,
+ 0xc0, 0x3f, 0xc0, 0x3f, 0x80, 0x7f, 0x80, 0x7f,
+ 0x00, 0xff, 0x00, 0xff, 0x01, 0xfe, 0x01, 0xfe,
+ 0x03, 0xfc, 0x03, 0xfc, 0x07, 0xf8, 0x07, 0xf8,
+ 0x0f, 0xf0, 0x0f, 0xf0, 0x1f, 0xe0, 0x1f, 0xe0,
+ 0x3f, 0xc0, 0x3f, 0xc0, 0x7f, 0x80, 0x7f, 0x80};
+
+
void fdrawbezier(float vec[4][3])
{
float dist;
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 594d2942e8f..98687bb90e0 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -639,6 +639,25 @@ static void draw_seq_strip(Scene *scene, ARegion *ar, Sequence *seq, int outline
/* draw sound wave */
if(seq->type == SEQ_SOUND) drawseqwave(scene, seq, x1, y1, x2, y2, (ar->v2d.cur.xmax - ar->v2d.cur.xmin)/ar->winx);
+ /* draw lock */
+ if(seq->flag & SEQ_LOCK) {
+ glEnable(GL_POLYGON_STIPPLE);
+ glEnable(GL_BLEND);
+
+ /* light stripes */
+ glColor4ub(255, 255, 255, 32);
+ glPolygonStipple(stipple_diag_stripes_pos);
+ glRectf(x1, y1, x2, y2);
+
+ /* dark stripes */
+ glColor4ub(0, 0, 0, 32);
+ glPolygonStipple(stipple_diag_stripes_neg);
+ glRectf(x1, y1, x2, y2);
+
+ glDisable(GL_POLYGON_STIPPLE);
+ glDisable(GL_BLEND);
+ }
+
get_seq_color3ubv(scene, seq, col);
if (G.moving && (seq->flag & SELECT)) {
if(seq->flag & SEQ_OVERLAP) {