Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/gpencil/gpencil_paint.c
| Show First 20 Lines • Show All 2,083 Lines • ▼ Show 20 Lines | static void gp_session_free(tGPsdata *p) | ||||
| MEM_freeN(p); | MEM_freeN(p); | ||||
| } | } | ||||
| /* init new stroke */ | /* init new stroke */ | ||||
| static void gp_paint_initstroke(tGPsdata *p, eGPencil_PaintModes paintmode, Depsgraph *depsgraph) | static void gp_paint_initstroke(tGPsdata *p, eGPencil_PaintModes paintmode, Depsgraph *depsgraph) | ||||
| { | { | ||||
| Scene *scene = p->scene; | Scene *scene = p->scene; | ||||
| ToolSettings *ts = scene->toolsettings; | ToolSettings *ts = scene->toolsettings; | ||||
| int cfra_eval = (int)DEG_get_ctime(p->depsgraph); | int cfra_eval = CFRA; | ||||
| /* get active layer (or add a new one if non-existent) */ | /* get active layer (or add a new one if non-existent) */ | ||||
| p->gpl = BKE_gpencil_layer_getactive(p->gpd); | p->gpl = BKE_gpencil_layer_getactive(p->gpd); | ||||
| if (p->gpl == NULL) { | if (p->gpl == NULL) { | ||||
| p->gpl = BKE_gpencil_layer_addnew(p->gpd, DATA_("GP_Layer"), true); | p->gpl = BKE_gpencil_layer_addnew(p->gpd, DATA_("GP_Layer"), true); | ||||
| if (p->custom_color[3]) { | if (p->custom_color[3]) { | ||||
| copy_v3_v3(p->gpl->color, p->custom_color); | copy_v3_v3(p->gpl->color, p->custom_color); | ||||
| ▲ Show 20 Lines • Show All 1,827 Lines • Show Last 20 Lines | |||||