Gizmos: enable gizmos for the action space

Support gizmos for the the action space type based on how it is done for
other types of spaces in Blender (e.g: view3d, image).

See patch submission for sample code.

Reviewed By: campbellbarton, sybren

Ref D13999
This commit is contained in:
Yann Lanthony 2022-04-05 17:08:41 +10:00 committed by Campbell Barton
parent c1d461bcbc
commit 7cf3e713f7
1 changed files with 4 additions and 1 deletions

View File

@ -225,6 +225,9 @@ static void action_main_region_draw(const bContext *C, ARegion *region)
/* reset view matrix */
UI_view2d_view_restore(C);
/* gizmos */
WM_gizmomap_draw(region->gizmo_map, C, WM_GIZMOMAP_DRAWSTEP_2D);
/* scrubbing region */
ED_time_scrub_draw(region, scene, saction->flag & SACTION_DRAWTIME, true);
}
@ -861,7 +864,7 @@ void ED_spacetype_action(void)
art->draw_overlay = action_main_region_draw_overlay;
art->listener = action_main_region_listener;
art->message_subscribe = saction_main_region_message_subscribe;
art->keymapflag = ED_KEYMAP_VIEW2D | ED_KEYMAP_ANIMATION | ED_KEYMAP_FRAMES;
art->keymapflag = ED_KEYMAP_GIZMO | ED_KEYMAP_VIEW2D | ED_KEYMAP_ANIMATION | ED_KEYMAP_FRAMES;
BLI_addhead(&st->regiontypes, art);