Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/view2d_ops.c
| Context not available. | |||||
| vzd = op->customdata; | vzd = op->customdata; | ||||
| v2d = vzd->v2d; | v2d = vzd->v2d; | ||||
| if (U.uiflag & USER_ZOOM_TO_MOUSEPOS) { | |||||
| ARegion *region = CTX_wm_region(C); | |||||
| /* Store initial mouse position (in view space). */ | |||||
| UI_view2d_region_to_view( | |||||
| ®ion->v2d, event->mval[0], event->mval[1], &vzd->mx_2d, &vzd->my_2d); | |||||
| } | |||||
| if (event->type == MOUSEZOOM || event->type == MOUSEPAN) { | if (event->type == MOUSEZOOM || event->type == MOUSEPAN) { | ||||
| float dx, dy, fac; | float dx, dy, fac; | ||||
| Context not available. | |||||
| /* for modal exit test */ | /* for modal exit test */ | ||||
| vzd->invoke_event = event->type; | vzd->invoke_event = event->type; | ||||
| if (U.uiflag & USER_ZOOM_TO_MOUSEPOS) { | |||||
| ARegion *region = CTX_wm_region(C); | |||||
| /* store initial mouse position (in view space) */ | |||||
| UI_view2d_region_to_view( | |||||
| ®ion->v2d, event->mval[0], event->mval[1], &vzd->mx_2d, &vzd->my_2d); | |||||
| } | |||||
| if (v2d->keepofs & V2D_LOCKOFS_X) { | if (v2d->keepofs & V2D_LOCKOFS_X) { | ||||
| WM_cursor_modal_set(window, WM_CURSOR_NS_SCROLL); | WM_cursor_modal_set(window, WM_CURSOR_NS_SCROLL); | ||||
| } | } | ||||
| Context not available. | |||||