[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [24666] trunk/blender: Sequencer UI: Sequencer now uses the standard timeline cursor instead of a hacky custom one that used a hardcoded colour
Joshua Leung
aligorith at gmail.com
Thu Nov 19 03:58:51 CET 2009
Revision: 24666
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=24666
Author: aligorith
Date: 2009-11-19 03:58:48 +0100 (Thu, 19 Nov 2009)
Log Message:
-----------
Sequencer UI: Sequencer now uses the standard timeline cursor instead of a hacky custom one that used a hardcoded colour
Modified Paths:
--------------
trunk/blender/release/scripts/ui/space_sequencer.py
trunk/blender/source/blender/editors/space_sequencer/sequencer_draw.c
trunk/blender/source/blender/makesdna/DNA_space_types.h
trunk/blender/source/blender/makesrna/intern/rna_space.c
Modified: trunk/blender/release/scripts/ui/space_sequencer.py
===================================================================
--- trunk/blender/release/scripts/ui/space_sequencer.py 2009-11-19 00:37:47 UTC (rev 24665)
+++ trunk/blender/release/scripts/ui/space_sequencer.py 2009-11-19 02:58:48 UTC (rev 24666)
@@ -115,6 +115,7 @@
"""
layout.itemR(st, "draw_frames")
+ layout.itemR(st, "show_cframe_indicator")
if st.display_mode == 'IMAGE':
layout.itemR(st, "draw_safe_margin")
if st.display_mode == 'WAVEFORM':
Modified: trunk/blender/source/blender/editors/space_sequencer/sequencer_draw.c
===================================================================
--- trunk/blender/source/blender/editors/space_sequencer/sequencer_draw.c 2009-11-19 00:37:47 UTC (rev 24665)
+++ trunk/blender/source/blender/editors/space_sequencer/sequencer_draw.c 2009-11-19 02:58:48 UTC (rev 24666)
@@ -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 @@
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 @@
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 @@
/* 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);
Modified: trunk/blender/source/blender/makesdna/DNA_space_types.h
===================================================================
--- trunk/blender/source/blender/makesdna/DNA_space_types.h 2009-11-19 00:37:47 UTC (rev 24665)
+++ trunk/blender/source/blender/makesdna/DNA_space_types.h 2009-11-19 02:58:48 UTC (rev 24666)
@@ -853,6 +853,7 @@
#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 {
Modified: trunk/blender/source/blender/makesrna/intern/rna_space.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_space.c 2009-11-19 00:37:47 UTC (rev 24665)
+++ trunk/blender/source/blender/makesrna/intern/rna_space.c 2009-11-19 02:58:48 UTC (rev 24666)
@@ -991,6 +991,11 @@
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.");
More information about the Bf-blender-cvs
mailing list