Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/gpencil/gpencil_add_stroke.c
| Show First 20 Lines • Show All 209 Lines • ▼ Show 20 Lines | |||||
| /* ***************************************************************** */ | /* ***************************************************************** */ | ||||
| /* Stroke API */ | /* Stroke API */ | ||||
| /* Add a Simple stroke with colors | /* Add a Simple stroke with colors | ||||
| * (original design created by Daniel M. Lara and Matias Mendiola). */ | * (original design created by Daniel M. Lara and Matias Mendiola). */ | ||||
| void ED_gpencil_create_stroke(bContext *C, Object *ob, float mat[4][4]) | void ED_gpencil_create_stroke(bContext *C, Object *ob, float mat[4][4]) | ||||
| { | { | ||||
| Main *bmain = CTX_data_main(C); | Main *bmain = CTX_data_main(C); | ||||
| Depsgraph *depsgraph = CTX_data_depsgraph(C); | Scene *scene = CTX_data_scene(C); | ||||
| int cfra_eval = (int)DEG_get_ctime(depsgraph); | int cfra_eval = CFRA; | ||||
| bGPdata *gpd = (bGPdata *)ob->data; | bGPdata *gpd = (bGPdata *)ob->data; | ||||
| bGPDstroke *gps; | bGPDstroke *gps; | ||||
| /* create colors */ | /* create colors */ | ||||
| int color_black = gp_stroke_material(bmain, ob, &gp_stroke_material_black, false); | int color_black = gp_stroke_material(bmain, ob, &gp_stroke_material_black, false); | ||||
| gp_stroke_material(bmain, ob, &gp_stroke_material_white, false); | gp_stroke_material(bmain, ob, &gp_stroke_material_white, false); | ||||
| gp_stroke_material(bmain, ob, &gp_stroke_material_red, false); | gp_stroke_material(bmain, ob, &gp_stroke_material_red, false); | ||||
| gp_stroke_material(bmain, ob, &gp_stroke_material_green, false); | gp_stroke_material(bmain, ob, &gp_stroke_material_green, false); | ||||
| Show All 23 Lines | |||||