forked from bartvdbraak/blender
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.
This commit is contained in:
parent
1ca2a6f24f
commit
0adad30e3f
@ -114,7 +114,11 @@ class SEQUENCER_MT_view(bpy.types.Menu):
|
||||
|
||||
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")
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user