Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/gpencil/gpencil_fill.c
| Show First 20 Lines • Show All 2,456 Lines • ▼ Show 20 Lines | if (tgpf) { | ||||
| /* Remove any temp stroke. */ | /* Remove any temp stroke. */ | ||||
| gpencil_delete_temp_stroke_extension(tgpf, true); | gpencil_delete_temp_stroke_extension(tgpf, true); | ||||
| /* remove drawing handler */ | /* remove drawing handler */ | ||||
| if (tgpf->draw_handle_3d) { | if (tgpf->draw_handle_3d) { | ||||
| ED_region_draw_cb_exit(tgpf->region->type, tgpf->draw_handle_3d); | ED_region_draw_cb_exit(tgpf->region->type, tgpf->draw_handle_3d); | ||||
| } | } | ||||
| WM_cursor_set(CTX_wm_window(C), WM_CURSOR_DEFAULT); | WM_cursor_set(CTX_wm_window(C), WM_CURSOR_DOT); | ||||
| /* Remove depth buffer in cache. */ | /* Remove depth buffer in cache. */ | ||||
| if (tgpf->depths) { | if (tgpf->depths) { | ||||
| ED_view3d_depths_free(tgpf->depths); | ED_view3d_depths_free(tgpf->depths); | ||||
| } | } | ||||
| /* finally, free memory used by temp data */ | /* finally, free memory used by temp data */ | ||||
| MEM_freeN(tgpf); | MEM_freeN(tgpf); | ||||
| ▲ Show 20 Lines • Show All 533 Lines • ▼ Show 20 Lines | case MIDDLEMOUSE: { | ||||
| sub_v2_v2v2(mlen, tgpf->mouse_init, tgpf->mouse_center); | sub_v2_v2v2(mlen, tgpf->mouse_init, tgpf->mouse_center); | ||||
| } | } | ||||
| WM_cursor_set(CTX_wm_window(C), WM_CURSOR_EW_ARROW); | WM_cursor_set(CTX_wm_window(C), WM_CURSOR_EW_ARROW); | ||||
| tgpf->initial_length = len_v2(mlen); | tgpf->initial_length = len_v2(mlen); | ||||
| } | } | ||||
| if (event->val == KM_RELEASE) { | if (event->val == KM_RELEASE) { | ||||
| WM_cursor_set(CTX_wm_window(C), WM_CURSOR_DEFAULT); | WM_cursor_modal_set(CTX_wm_window(C), WM_CURSOR_PAINT_BRUSH); | ||||
| tgpf->mouse_init[0] = -1.0f; | tgpf->mouse_init[0] = -1.0f; | ||||
| tgpf->mouse_init[1] = -1.0f; | tgpf->mouse_init[1] = -1.0f; | ||||
| } | } | ||||
| /* Update cursor line. */ | /* Update cursor line. */ | ||||
| WM_main_add_notifier(NC_GEOM | ND_DATA, NULL); | WM_main_add_notifier(NC_GEOM | ND_DATA, NULL); | ||||
| WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL); | WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL); | ||||
| ▲ Show 20 Lines • Show All 65 Lines • Show Last 20 Lines | |||||