diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-11-19 05:58:48 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-11-19 05:58:48 +0300 |
commit | bb3afc81fcce276f9f4a41893116394ac87a966a (patch) | |
tree | 9b77f8d4aa5be0695e5f12a4c0b89b6e149a47f6 /source/blender | |
parent | abe6b4c0c48093bbe4d3d0b769b2e73816b283f9 (diff) |
Sequencer UI: Sequencer now uses the standard timeline cursor instead of a hacky custom one that used a hardcoded colour
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_draw.c | 25 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_space_types.h | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 5 |
3 files changed, 15 insertions, 16 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index 56c9165c6a1..c16e328d8dd 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -77,18 +77,6 @@ int no_rightbox=0, no_leftbox= 0; static void draw_shadedstrip(Sequence *seq, char *col, float x1, float y1, float x2, float y2); - -static void draw_cfra_seq(View2D *v2d, int cfra) -{ - glColor3ub(0x30, 0x90, 0x50); - glLineWidth(2.0); - glBegin(GL_LINES); - glVertex2f(cfra, v2d->cur.ymin); - glVertex2f(cfra, v2d->cur.ymax); - glEnd(); - glLineWidth(1.0); -} - static void get_seq_color3ubv(Scene *curscene, Sequence *seq, char *col) { char blendcol[3]; @@ -884,7 +872,7 @@ void drawseqspace(const bContext *C, ARegion *ar) Editing *ed= seq_give_editing(scene, FALSE); Sequence *seq; float col[3]; - int i; + int i, flag=0; if(sseq->mainb != SEQ_DRAW_SEQUENCE) { draw_image_seq(scene, ar, sseq); @@ -936,8 +924,6 @@ void drawseqspace(const bContext *C, ARegion *ar) UI_view2d_constant_grid_draw(C, v2d); - draw_cfra_seq(v2d, scene->r.cfra); - /* sequences: first deselect */ if(ed) { Sequence *last_seq = active_seq_get(scene); @@ -974,7 +960,14 @@ void drawseqspace(const bContext *C, ARegion *ar) /* text draw cached, in pixelspace now */ UI_view2d_text_cache_draw(ar); - + + /* current frame */ + UI_view2d_view_ortho(C, v2d); + + if ((sseq->flag & SEQ_DRAWFRAMES)==0) flag |= DRAWCFRA_UNIT_SECONDS; + if ((sseq->flag & SEQ_NO_DRAW_CFRANUM)==0) flag |= DRAWCFRA_SHOW_NUMBOX; + ANIM_draw_cfra(C, v2d, flag); + /* Draw markers */ // draw_markers_timespace(SCE_MARKERS, DRAW_MARKERS_LINES); diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index d2beab5daba..fd2e03e173e 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -853,6 +853,7 @@ enum { #define SEQ_DRAW_COLOR_SEPERATED 4 #define SEQ_DRAW_SAFE_MARGINS 8 #define SEQ_DRAW_GPENCIL 16 +#define SEQ_NO_DRAW_CFRANUM 32 /* space types, moved from DNA_screen_types.h */ enum { diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index c77dabe5e4d..ac93f75156f 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -991,6 +991,11 @@ static void rna_def_space_sequencer(BlenderRNA *brna) RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL); /* flag's */ + prop= RNA_def_property(srna, "show_cframe_indicator", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SEQ_NO_DRAW_CFRANUM); + RNA_def_property_ui_text(prop, "Show Frame Number Indicator", "Show frame number beside the current frame indicator line."); + RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL); + prop= RNA_def_property(srna, "draw_frames", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_DRAWFRAMES); RNA_def_property_ui_text(prop, "Draw Frames", "Draw frames rather then seconds."); |