Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/overlay/overlay_gpencil.c
| Show First 20 Lines • Show All 376 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| static void overlay_gpencil_draw_stroke_color_name(bGPDlayer *UNUSED(gpl), | static void overlay_gpencil_draw_stroke_color_name(bGPDlayer *UNUSED(gpl), | ||||
| bGPDframe *UNUSED(gpf), | bGPDframe *UNUSED(gpf), | ||||
| bGPDstroke *gps, | bGPDstroke *gps, | ||||
| void *thunk) | void *thunk) | ||||
| { | { | ||||
| Object *ob = (Object *)thunk; | Object *ob = (Object *)thunk; | ||||
| Material *ma = BKE_object_material_get(ob, gps->mat_nr + 1); | Material *ma = BKE_object_material_get_eval(ob, gps->mat_nr + 1); | ||||
| if (ma == NULL) { | if (ma == NULL) { | ||||
| return; | return; | ||||
| } | } | ||||
| MaterialGPencilStyle *gp_style = ma->gp_style; | MaterialGPencilStyle *gp_style = ma->gp_style; | ||||
| /* skip stroke if it doesn't have any valid data */ | /* skip stroke if it doesn't have any valid data */ | ||||
| if ((gps->points == NULL) || (gps->totpoints < 1) || (gp_style == NULL)) { | if ((gps->points == NULL) || (gps->totpoints < 1) || (gp_style == NULL)) { | ||||
| return; | return; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 93 Lines • Show Last 20 Lines | |||||