Revision: 38601
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38601
Author: aligorith
Date: 2011-07-22 11:20:14 +0000 (Fri, 22 Jul 2011)
Log Message:
-----------
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.
Modified Paths:
--------------
branches/soc-2011-pepper/release/scripts/startup/bl_ui/space_sequencer.py
branches/soc-2011-pepper/source/blender/editors/space_sequencer/sequencer_draw.c
Modified:
branches/soc-2011-pepper/release/scripts/startup/bl_ui/space_sequencer.py
===================================================================
--- branches/soc-2011-pepper/release/scripts/startup/bl_ui/space_sequencer.py
2011-07-22 07:25:52 UTC (rev 38600)
+++ branches/soc-2011-pepper/release/scripts/startup/bl_ui/space_sequencer.py
2011-07-22 11:20:14 UTC (rev 38601)
@@ -114,7 +114,11 @@
layout.operator("sequencer.view_selected")
- layout.prop(st, "show_frames")
+ if st.show_frames:
+ layout.operator("anim.time_toggle", text="Show Seconds")
+ else:
+ layout.operator("anim.time_toggle", text="Show Frames")
+
layout.prop(st, "show_frame_indicator")
if st.display_mode == 'IMAGE':
layout.prop(st, "show_safe_margin")
Modified:
branches/soc-2011-pepper/source/blender/editors/space_sequencer/sequencer_draw.c
===================================================================
---
branches/soc-2011-pepper/source/blender/editors/space_sequencer/sequencer_draw.c
2011-07-22 07:25:52 UTC (rev 38600)
+++
branches/soc-2011-pepper/source/blender/editors/space_sequencer/sequencer_draw.c
2011-07-22 11:20:14 UTC (rev 38601)
@@ -1024,8 +1024,8 @@
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 @@
/* 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 @@
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);
}
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs