Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_event_system.c
| Show First 20 Lines • Show All 2,513 Lines • ▼ Show 20 Lines | static int wm_handlers_do_gizmo_handler(bContext *C, | ||||
| int action = WM_HANDLER_CONTINUE; | int action = WM_HANDLER_CONTINUE; | ||||
| ScrArea *area = CTX_wm_area(C); | ScrArea *area = CTX_wm_area(C); | ||||
| ARegion *region = CTX_wm_region(C); | ARegion *region = CTX_wm_region(C); | ||||
| wmGizmoMap *gzmap = handler->gizmo_map; | wmGizmoMap *gzmap = handler->gizmo_map; | ||||
| BLI_assert(gzmap != NULL); | BLI_assert(gzmap != NULL); | ||||
| wmGizmo *gz = wm_gizmomap_highlight_get(gzmap); | wmGizmo *gz = wm_gizmomap_highlight_get(gzmap); | ||||
| /* Needed so UI blocks over gizmos don't let events fall through to the gizmos, | /* Needed so UI blocks over gizmos don't let events fall through to the gizmos, | ||||
| * noticeable for the node editor - where dragging on a node should move it, see: T73212. */ | * noticeable for the node editor - where dragging on a node should move it, see: T73212. | ||||
| * note we still allow for starting the gizmo drag outside, then travel 'inside' the node */ | |||||
| if (region->type->clip_gizmo_events_by_ui) { | if (region->type->clip_gizmo_events_by_ui) { | ||||
| if (UI_region_block_find_mouse_over(region, &event->x, true)) { | if (UI_region_block_find_mouse_over(region, &event->x, true)) { | ||||
| if (gz != NULL) { | if (gz != NULL && event->type != EVT_GIZMO_UPDATE) { | ||||
| WM_tooltip_clear(C, CTX_wm_window(C)); | WM_tooltip_clear(C, CTX_wm_window(C)); | ||||
| wm_gizmomap_highlight_set(gzmap, C, NULL, 0); | wm_gizmomap_highlight_set(gzmap, C, NULL, 0); | ||||
| } | } | ||||
| return action; | return action; | ||||
| } | } | ||||
| } | } | ||||
| if (region->gizmo_map != handler->gizmo_map) { | if (region->gizmo_map != handler->gizmo_map) { | ||||
| ▲ Show 20 Lines • Show All 2,592 Lines • Show Last 20 Lines | |||||