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:
authorJoshua Leung <aligorith@gmail.com>2011-07-22 15:20:14 +0400
committerJoshua Leung <aligorith@gmail.com>2011-07-22 15:20:14 +0400
commit0adad30e3f5b914d0a101ba6efb07f3fd2d8669e (patch)
tree3d18ca5af271178c04b4bf9ecfa2a8fd7613b832 /source/blender/editors/space_sequencer
parent1ca2a6f24f5d229e3243314cfd13449eebb12e14 (diff)
Bugfix [#27984] CTRL+T doesn't work in Video Sequencer properly
Time-scale drawing wasn't respecting the time unit setting. While working on this, I tried to tweak the grid drawing to a more common setting. It's hardcoded to show lines at every 25 px = once every 25 frames, which is only really fine when FPS=25. Anyways, this works fine enough for the sequencer for now in general usage.
Diffstat (limited to 'source/blender/editors/space_sequencer')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 1ed262c3e23..42d52536870 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -1024,8 +1024,8 @@ void draw_timeline_seq(const bContext *C, ARegion *ar)
SpaceSeq *sseq= CTX_wm_space_seq(C);
View2D *v2d= &ar->v2d;
View2DScrollers *scrollers;
+ short unit=0, flag=0;
float col[3];
- int flag=0;
/* clear and setup matrix */
UI_GetThemeColor3fv(TH_BACK, col);
@@ -1047,9 +1047,10 @@ void draw_timeline_seq(const bContext *C, ARegion *ar)
/* draw backdrop */
draw_seq_backdrop(v2d);
- /* regular grid-pattern over the rest of the view (i.e. frame grid lines) */
+ /* regular grid-pattern over the rest of the view (i.e. 25-frame grid lines) */
+ // NOTE: the gridlines are currently spaced every 25 frames, which is only fine for 25 fps, but maybe not for 30...
UI_view2d_constant_grid_draw(v2d);
-
+
seq_draw_sfra_efra(scene, v2d);
/* sequence strips (if there is data available to be drawn) */
@@ -1092,7 +1093,8 @@ void draw_timeline_seq(const bContext *C, ARegion *ar)
UI_view2d_view_restore(C);
/* scrollers */
- scrollers= UI_view2d_scrollers_calc(C, v2d, V2D_UNIT_SECONDSSEQ, V2D_GRID_CLAMP, V2D_UNIT_VALUES, V2D_GRID_CLAMP);
+ unit= (sseq->flag & SEQ_DRAWFRAMES)? V2D_UNIT_FRAMES : V2D_UNIT_SECONDSSEQ;
+ scrollers= UI_view2d_scrollers_calc(C, v2d, unit, V2D_GRID_CLAMP, V2D_UNIT_VALUES, V2D_GRID_CLAMP);
UI_view2d_scrollers_draw(C, v2d, scrollers);
UI_view2d_scrollers_free(scrollers);
}