Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/gpencil/gpencil_primitive.c
| Context not available. | |||||
| if (tgpi->flag == IN_CURVE_EDIT) { | if (tgpi->flag == IN_CURVE_EDIT) { | ||||
| if ((a < BIG_SIZE_CTL && tgpi->tot_stored_edges == 0) || b < BIG_SIZE_CTL) { | if ((a < BIG_SIZE_CTL && tgpi->tot_stored_edges == 0) || b < BIG_SIZE_CTL) { | ||||
| move = MOVE_ENDS; | move = MOVE_ENDS; | ||||
| WM_cursor_modal_set(win, WM_CURSOR_NSEW_SCROLL); | WM_cursor_modal_set(win, U.movement_cursor); | ||||
| } | } | ||||
| else if (tgpi->curve) { | else if (tgpi->curve) { | ||||
| move = MOVE_CP; | move = MOVE_CP; | ||||
| Context not available. | |||||
| } | } | ||||
| } | } | ||||
| else if (tgpi->flag == IN_PROGRESS) { | else if (tgpi->flag == IN_PROGRESS) { | ||||
| WM_cursor_modal_set(win, WM_CURSOR_NSEW_SCROLL); | WM_cursor_modal_set(win, U.movement_cursor); | ||||
| } | } | ||||
| switch (event->type) { | switch (event->type) { | ||||
| Context not available. | |||||
| case EKEY: { | case EKEY: { | ||||
| if (tgpi->flag == IN_CURVE_EDIT && !ELEM(tgpi->type, GP_STROKE_BOX, GP_STROKE_CIRCLE)) { | if (tgpi->flag == IN_CURVE_EDIT && !ELEM(tgpi->type, GP_STROKE_BOX, GP_STROKE_CIRCLE)) { | ||||
| tgpi->flag = IN_PROGRESS; | tgpi->flag = IN_PROGRESS; | ||||
| WM_cursor_modal_set(win, WM_CURSOR_NSEW_SCROLL); | WM_cursor_modal_set(win, U.movement_cursor); | ||||
| gpencil_primitive_add_segment(tgpi); | gpencil_primitive_add_segment(tgpi); | ||||
| copy_v2_v2(tgpi->start, tgpi->end); | copy_v2_v2(tgpi->start, tgpi->end); | ||||
| copy_v2_v2(tgpi->origin, tgpi->start); | copy_v2_v2(tgpi->origin, tgpi->start); | ||||
| Context not available. | |||||
| break; | break; | ||||
| } | } | ||||
| case MOUSEMOVE: { | case MOUSEMOVE: { | ||||
| WM_cursor_modal_set(win, WM_CURSOR_NSEW_SCROLL); | WM_cursor_modal_set(win, U.movement_cursor); | ||||
| copy_v2_v2(tgpi->end, tgpi->mval); | copy_v2_v2(tgpi->end, tgpi->mval); | ||||
| if (event->shift) { | if (event->shift) { | ||||
| Context not available. | |||||
| { | { | ||||
| if ((event->val == KM_PRESS)) { | if ((event->val == KM_PRESS)) { | ||||
| tgpi->flag = IN_MOVE; | tgpi->flag = IN_MOVE; | ||||
| WM_cursor_modal_set(win, WM_CURSOR_NSEW_SCROLL); | WM_cursor_modal_set(win, U.movement_cursor); | ||||
| } | } | ||||
| break; | break; | ||||
| } | } | ||||
| Context not available. | |||||
| case TABKEY: { | case TABKEY: { | ||||
| if (tgpi->flag == IN_CURVE_EDIT) { | if (tgpi->flag == IN_CURVE_EDIT) { | ||||
| tgpi->flag = IN_PROGRESS; | tgpi->flag = IN_PROGRESS; | ||||
| WM_cursor_modal_set(win, WM_CURSOR_NSEW_SCROLL); | WM_cursor_modal_set(win, U.movement_cursor); | ||||
| gp_primitive_update_cps(tgpi); | gp_primitive_update_cps(tgpi); | ||||
| gpencil_primitive_update(C, op, tgpi); | gpencil_primitive_update(C, op, tgpi); | ||||
| } | } | ||||
| Context not available. | |||||