Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_action/space_action.c
| Show First 20 Lines • Show All 175 Lines • ▼ Show 20 Lines | |||||
| static void action_main_region_draw(const bContext *C, ARegion *region) | static void action_main_region_draw(const bContext *C, ARegion *region) | ||||
| { | { | ||||
| /* draw entirely, view changes should be handled here */ | /* draw entirely, view changes should be handled here */ | ||||
| SpaceAction *saction = CTX_wm_space_action(C); | SpaceAction *saction = CTX_wm_space_action(C); | ||||
| Scene *scene = CTX_data_scene(C); | Scene *scene = CTX_data_scene(C); | ||||
| Object *obact = CTX_data_active_object(C); | Object *obact = CTX_data_active_object(C); | ||||
| bAnimContext ac; | bAnimContext ac; | ||||
| View2D *v2d = ®ion->v2d; | View2D *v2d = ®ion->v2d; | ||||
| View2DScrollers *scrollers; | |||||
| short marker_flag = 0; | short marker_flag = 0; | ||||
| short cfra_flag = 0; | short cfra_flag = 0; | ||||
| /* clear and setup matrix */ | /* clear and setup matrix */ | ||||
| UI_ThemeClearColor(TH_BACK); | UI_ThemeClearColor(TH_BACK); | ||||
| GPU_clear(GPU_COLOR_BIT); | GPU_clear(GPU_COLOR_BIT); | ||||
| UI_view2d_view_ortho(v2d); | UI_view2d_view_ortho(v2d); | ||||
| ▲ Show 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | static void action_main_region_draw(const bContext *C, ARegion *region) | ||||
| /* reset view matrix */ | /* reset view matrix */ | ||||
| UI_view2d_view_restore(C); | UI_view2d_view_restore(C); | ||||
| /* scrubbing region */ | /* scrubbing region */ | ||||
| ED_time_scrub_draw(region, scene, saction->flag & SACTION_DRAWTIME, true); | ED_time_scrub_draw(region, scene, saction->flag & SACTION_DRAWTIME, true); | ||||
| /* scrollers */ | /* scrollers */ | ||||
| scrollers = UI_view2d_scrollers_calc(v2d, NULL); | UI_view2d_scrollers_draw(v2d, NULL); | ||||
| UI_view2d_scrollers_draw(v2d, scrollers); | |||||
| UI_view2d_scrollers_free(scrollers); | |||||
| } | } | ||||
| /* add handlers, stuff you only do once or on area/region changes */ | /* add handlers, stuff you only do once or on area/region changes */ | ||||
| static void action_channel_region_init(wmWindowManager *wm, ARegion *region) | static void action_channel_region_init(wmWindowManager *wm, ARegion *region) | ||||
| { | { | ||||
| wmKeyMap *keymap; | wmKeyMap *keymap; | ||||
| /* ensure the 2d view sync works - main region has bottom scroller */ | /* ensure the 2d view sync works - main region has bottom scroller */ | ||||
| ▲ Show 20 Lines • Show All 669 Lines • Show Last 20 Lines | |||||