Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_sequencer/sequencer_draw.c
| Show First 20 Lines • Show All 2,483 Lines • ▼ Show 20 Lines | if (scene->ed && scene->ed->over_flag & SEQ_EDIT_OVERLAY_SHOW) { | ||||
| draw_cache_view(C); | draw_cache_view(C); | ||||
| draw_overlap_frame_indicator(scene, v2d); | draw_overlap_frame_indicator(scene, v2d); | ||||
| UI_view2d_view_restore(C); | UI_view2d_view_restore(C); | ||||
| } | } | ||||
| ED_time_scrub_draw_current_frame(region, scene, !(sseq->flag & SEQ_DRAWFRAMES), true); | ED_time_scrub_draw_current_frame(region, scene, !(sseq->flag & SEQ_DRAWFRAMES), true); | ||||
| UI_view2d_scrollers_draw(v2d, NULL); | UI_view2d_scrollers_draw(v2d, NULL); | ||||
| } | } | ||||
| void ED_sequencer_draw_snap(const View2D *v2d, const float snap_point[2]) | |||||
| { | |||||
| GPU_blend(GPU_BLEND_ALPHA); | |||||
| uint pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); | |||||
| immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); | |||||
| immBegin(GPU_PRIM_LINES, 2); | |||||
| immVertex2f(pos, snap_point[0], v2d->cur.ymin); | |||||
| immVertex2f(pos, snap_point[0], v2d->cur.ymax); | |||||
| immEnd(); | |||||
| immUnbindProgram(); | |||||
| GPU_blend(GPU_BLEND_NONE); | |||||
| } | |||||
mano-wii: Making a generic drawing function is useful if you intend to use it in more than one place… | |||||
Making a generic drawing function is useful if you intend to use it in more than one place (like gizmos for example). Otherwise I don't see the problem is to leave the code in the transform operator.
(That's more personal taste)