Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/gpencil/gpencil_utils.c
| Show First 20 Lines • Show All 2,058 Lines • ▼ Show 20 Lines | if (ob->type == OB_GPENCIL) { | ||||
| /* only editable and visible layers are considered */ | /* only editable and visible layers are considered */ | ||||
| if (gpencil_layer_is_editable(gpl)) { | if (gpencil_layer_is_editable(gpl)) { | ||||
| for (bGPDframe *gpf = gpl->frames.first; gpf; gpf = gpf->next) { | for (bGPDframe *gpf = gpl->frames.first; gpf; gpf = gpf->next) { | ||||
| for (bGPDstroke *gps = gpf->strokes.first; gps; gps = gps->next) { | for (bGPDstroke *gps = gpf->strokes.first; gps; gps = gps->next) { | ||||
| /* check if it is editable */ | /* check if it is editable */ | ||||
| if (ED_gpencil_stroke_color_use(ob, gpl, gps) == false) { | if (ED_gpencil_stroke_color_use(ob, gpl, gps) == false) { | ||||
| continue; | continue; | ||||
| } | } | ||||
| gps_ma = give_current_material(ob, gps->mat_nr + 1); | gps_ma = BKE_material_gpencil_get(ob, gps->mat_nr + 1); | ||||
| /* update */ | /* update */ | ||||
| if ((gps_ma) && (gps_ma == mat)) { | if ((gps_ma) && (gps_ma == mat)) { | ||||
| ED_gpencil_calc_stroke_uv(ob, gps); | ED_gpencil_calc_stroke_uv(ob, gps); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 486 Lines • Show Last 20 Lines | |||||