Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/mesh/editmesh_loopcut.c
| Show First 20 Lines • Show All 266 Lines • ▼ Show 20 Lines | static int ringsel_init(bContext *C, wmOperator *op, bool do_cut) | ||||
| RingSelOpData *lcd; | RingSelOpData *lcd; | ||||
| Scene *scene = CTX_data_scene(C); | Scene *scene = CTX_data_scene(C); | ||||
| /* alloc new customdata */ | /* alloc new customdata */ | ||||
| lcd = op->customdata = MEM_callocN(sizeof(RingSelOpData), "ringsel Modal Op Data"); | lcd = op->customdata = MEM_callocN(sizeof(RingSelOpData), "ringsel Modal Op Data"); | ||||
| em_setup_viewcontext(C, &lcd->vc); | em_setup_viewcontext(C, &lcd->vc); | ||||
| lcd->depsgraph = CTX_data_depsgraph(C); | lcd->depsgraph = CTX_data_ensure_evaluated_depsgraph(C); | ||||
| /* assign the drawing handle for drawing preview line... */ | /* assign the drawing handle for drawing preview line... */ | ||||
| lcd->ar = CTX_wm_region(C); | lcd->ar = CTX_wm_region(C); | ||||
| lcd->draw_handle = ED_region_draw_cb_activate( | lcd->draw_handle = ED_region_draw_cb_activate( | ||||
| lcd->ar->type, ringsel_draw, lcd, REGION_DRAW_POST_VIEW); | lcd->ar->type, ringsel_draw, lcd, REGION_DRAW_POST_VIEW); | ||||
| lcd->presel_edgering = EDBM_preselect_edgering_create(); | lcd->presel_edgering = EDBM_preselect_edgering_create(); | ||||
| /* Initialize once the cursor is over a mesh. */ | /* Initialize once the cursor is over a mesh. */ | ||||
| lcd->ob = NULL; | lcd->ob = NULL; | ||||
| ▲ Show 20 Lines • Show All 474 Lines • Show Last 20 Lines | |||||