Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_clip/space_clip.c
| Show First 20 Lines • Show All 89 Lines • ▼ Show 20 Lines | if (sc->view == SC_VIEW_DOPESHEET) { | ||||
| ar->v2d.min[0] = 0.0f; | ar->v2d.min[0] = 0.0f; | ||||
| ar->v2d.min[1] = 0.0f; | ar->v2d.min[1] = 0.0f; | ||||
| ar->v2d.max[0] = MAXFRAMEF; | ar->v2d.max[0] = MAXFRAMEF; | ||||
| ar->v2d.max[1] = FLT_MAX; | ar->v2d.max[1] = FLT_MAX; | ||||
| ar->v2d.minzoom = 0.01f; | ar->v2d.minzoom = 0.01f; | ||||
| ar->v2d.maxzoom = 50; | ar->v2d.maxzoom = 50; | ||||
| ar->v2d.scroll = (V2D_SCROLL_BOTTOM | V2D_SCROLL_SCALE_HORIZONTAL); | ar->v2d.scroll = (V2D_SCROLL_BOTTOM | V2D_SCROLL_HORIZONTAL_HANDLES); | ||||
| ar->v2d.scroll |= (V2D_SCROLL_RIGHT); | ar->v2d.scroll |= (V2D_SCROLL_RIGHT); | ||||
| ar->v2d.keepzoom = V2D_LOCKZOOM_Y; | ar->v2d.keepzoom = V2D_LOCKZOOM_Y; | ||||
| ar->v2d.keepofs = V2D_KEEPOFS_Y; | ar->v2d.keepofs = V2D_KEEPOFS_Y; | ||||
| ar->v2d.align = V2D_ALIGN_NO_POS_Y; | ar->v2d.align = V2D_ALIGN_NO_POS_Y; | ||||
| ar->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL; | ar->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL; | ||||
| } | } | ||||
| else { | else { | ||||
| ar->v2d.tot.xmin = 0.0f; | ar->v2d.tot.xmin = 0.0f; | ||||
| ar->v2d.tot.ymin = -10.0f; | ar->v2d.tot.ymin = -10.0f; | ||||
| ar->v2d.tot.xmax = (float)scene->r.efra; | ar->v2d.tot.xmax = (float)scene->r.efra; | ||||
| ar->v2d.tot.ymax = 10.0f; | ar->v2d.tot.ymax = 10.0f; | ||||
| ar->v2d.cur = ar->v2d.tot; | ar->v2d.cur = ar->v2d.tot; | ||||
| ar->v2d.min[0] = FLT_MIN; | ar->v2d.min[0] = FLT_MIN; | ||||
| ar->v2d.min[1] = FLT_MIN; | ar->v2d.min[1] = FLT_MIN; | ||||
| ar->v2d.max[0] = MAXFRAMEF; | ar->v2d.max[0] = MAXFRAMEF; | ||||
| ar->v2d.max[1] = FLT_MAX; | ar->v2d.max[1] = FLT_MAX; | ||||
| ar->v2d.scroll = (V2D_SCROLL_BOTTOM | V2D_SCROLL_SCALE_HORIZONTAL); | ar->v2d.scroll = (V2D_SCROLL_BOTTOM | V2D_SCROLL_HORIZONTAL_HANDLES); | ||||
| ar->v2d.scroll |= (V2D_SCROLL_LEFT | V2D_SCROLL_SCALE_VERTICAL); | ar->v2d.scroll |= (V2D_SCROLL_RIGHT | V2D_SCROLL_VERTICAL_HANDLES); | ||||
| ar->v2d.minzoom = 0.0f; | ar->v2d.minzoom = 0.0f; | ||||
| ar->v2d.maxzoom = 0.0f; | ar->v2d.maxzoom = 0.0f; | ||||
| ar->v2d.keepzoom = 0; | ar->v2d.keepzoom = 0; | ||||
| ar->v2d.keepofs = 0; | ar->v2d.keepofs = 0; | ||||
| ar->v2d.align = 0; | ar->v2d.align = 0; | ||||
| ar->v2d.flag = 0; | ar->v2d.flag = 0; | ||||
| ▲ Show 20 Lines • Show All 921 Lines • ▼ Show 20 Lines | static void graph_region_draw(const bContext *C, ARegion *ar) | ||||
| ED_scrubbing_draw(ar, scene, sc->flag & SC_SHOW_SECONDS, true); | ED_scrubbing_draw(ar, scene, sc->flag & SC_SHOW_SECONDS, true); | ||||
| /* scrollers */ | /* scrollers */ | ||||
| scrollers = UI_view2d_scrollers_calc(v2d, NULL); | scrollers = UI_view2d_scrollers_calc(v2d, NULL); | ||||
| UI_view2d_scrollers_draw(v2d, scrollers); | UI_view2d_scrollers_draw(v2d, scrollers); | ||||
| UI_view2d_scrollers_free(scrollers); | UI_view2d_scrollers_free(scrollers); | ||||
| /* scale indicators */ | /* scale indicators */ | ||||
| UI_view2d_draw_scale_y__values(ar, v2d, &v2d->vert, TH_TEXT); | { | ||||
| rcti rect; | |||||
| BLI_rcti_init(&rect, | |||||
| 0, | |||||
| 15 * UI_DPI_FAC, | |||||
| 15 * UI_DPI_FAC, | |||||
| UI_DPI_FAC * ar->sizey - UI_SCRUBBING_MARGIN_Y); | |||||
| UI_view2d_draw_scale_y__values(ar, v2d, &rect, TH_TEXT); | |||||
| } | |||||
| } | } | ||||
| static void dopesheet_region_draw(const bContext *C, ARegion *ar) | static void dopesheet_region_draw(const bContext *C, ARegion *ar) | ||||
| { | { | ||||
| Scene *scene = CTX_data_scene(C); | Scene *scene = CTX_data_scene(C); | ||||
| SpaceClip *sc = CTX_wm_space_clip(C); | SpaceClip *sc = CTX_wm_space_clip(C); | ||||
| MovieClip *clip = ED_space_clip_get_clip(sc); | MovieClip *clip = ED_space_clip_get_clip(sc); | ||||
| View2D *v2d = &ar->v2d; | View2D *v2d = &ar->v2d; | ||||
| ▲ Show 20 Lines • Show All 347 Lines • Show Last 20 Lines | |||||