Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/animation/anim_markers.c
| Show First 20 Lines • Show All 537 Lines • ▼ Show 20 Lines | void ED_markers_draw(const bContext *C, int flag) | ||||
| if (markers == NULL || BLI_listbase_is_empty(markers)) { | if (markers == NULL || BLI_listbase_is_empty(markers)) { | ||||
| return; | return; | ||||
| } | } | ||||
| ARegion *region = CTX_wm_region(C); | ARegion *region = CTX_wm_region(C); | ||||
| View2D *v2d = UI_view2d_fromcontext(C); | View2D *v2d = UI_view2d_fromcontext(C); | ||||
| int cfra = CTX_data_scene(C)->r.cfra; | int cfra = CTX_data_scene(C)->r.cfra; | ||||
| const float line_width = GPU_line_width_get(); | |||||
| GPU_line_width(1.0f); | |||||
| rctf markers_region_rect; | rctf markers_region_rect; | ||||
| get_marker_region_rect(v2d, &markers_region_rect); | get_marker_region_rect(v2d, &markers_region_rect); | ||||
| draw_markers_background(&markers_region_rect); | draw_markers_background(&markers_region_rect); | ||||
| /* no time correction for framelen! space is drawn with old values */ | /* no time correction for framelen! space is drawn with old values */ | ||||
| float xscale, dummy; | float xscale, dummy; | ||||
| UI_view2d_scale_get(v2d, &xscale, &dummy); | UI_view2d_scale_get(v2d, &xscale, &dummy); | ||||
| Show All 16 Lines | void ED_markers_draw(const bContext *C, int flag) | ||||
| LISTBASE_FOREACH (TimeMarker *, marker, markers) { | LISTBASE_FOREACH (TimeMarker *, marker, markers) { | ||||
| if (marker->flag & SELECT) { | if (marker->flag & SELECT) { | ||||
| if (marker_is_in_frame_range(marker, clip_frame_range)) { | if (marker_is_in_frame_range(marker, clip_frame_range)) { | ||||
| draw_marker(fstyle, marker, cfra, marker->frame * xscale, flag, region->winy); | draw_marker(fstyle, marker, cfra, marker->frame * xscale, flag, region->winy); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| GPU_line_width(line_width); | |||||
| GPU_matrix_pop(); | GPU_matrix_pop(); | ||||
| } | } | ||||
| /** \} */ | /** \} */ | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Marker Wrappers API | /** \name Marker Wrappers API | ||||
| * | * | ||||
| ▲ Show 20 Lines • Show All 1,244 Lines • Show Last 20 Lines | |||||