Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/gpencil/gpencil_fill.c
| Show First 20 Lines • Show All 1,207 Lines • ▼ Show 20 Lines | static tGPDfill *gp_session_init_fill(bContext *C, wmOperator *UNUSED(op)) | ||||
| tgpf->C = C; | tgpf->C = C; | ||||
| tgpf->bmain = CTX_data_main(C); | tgpf->bmain = CTX_data_main(C); | ||||
| tgpf->scene = CTX_data_scene(C); | tgpf->scene = CTX_data_scene(C); | ||||
| tgpf->ob = CTX_data_active_object(C); | tgpf->ob = CTX_data_active_object(C); | ||||
| tgpf->sa = CTX_wm_area(C); | tgpf->sa = CTX_wm_area(C); | ||||
| tgpf->ar = CTX_wm_region(C); | tgpf->ar = CTX_wm_region(C); | ||||
| tgpf->rv3d = tgpf->ar->regiondata; | tgpf->rv3d = tgpf->ar->regiondata; | ||||
| tgpf->v3d = tgpf->sa->spacedata.first; | tgpf->v3d = tgpf->sa->spacedata.first; | ||||
| tgpf->depsgraph = CTX_data_depsgraph(C); | tgpf->depsgraph = CTX_data_ensure_evaluated_depsgraph(C); | ||||
| tgpf->win = CTX_wm_window(C); | tgpf->win = CTX_wm_window(C); | ||||
| /* set GP datablock */ | /* set GP datablock */ | ||||
| tgpf->gpd = gpd; | tgpf->gpd = gpd; | ||||
| tgpf->gpl = BKE_gpencil_layer_getactive(gpd); | tgpf->gpl = BKE_gpencil_layer_getactive(gpd); | ||||
| if (tgpf->gpl == NULL) { | if (tgpf->gpl == NULL) { | ||||
| tgpf->gpl = BKE_gpencil_layer_addnew(tgpf->gpd, DATA_("GP_Layer"), true); | tgpf->gpl = BKE_gpencil_layer_addnew(tgpf->gpd, DATA_("GP_Layer"), true); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 273 Lines • Show Last 20 Lines | |||||