diff options
author | Antonioya <blendergit@gmail.com> | 2018-08-28 09:16:30 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2018-08-28 09:18:09 +0300 |
commit | 9a9b1e98849131358041cf2bb83bf7b7c9828119 (patch) | |
tree | 290cba0b98a1c6937670d8f578c189039123700a /source/blender/editors/gpencil/gpencil_paint.c | |
parent | 039b11f3497731572e36904b03550438b706df34 (diff) |
GP: Revert replace custom function by standard API
Using custom api breaks material at object level
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_paint.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_paint.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index 113950075fc..aa163e02cfe 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -1164,7 +1164,7 @@ static void gp_stroke_newfrombuffer(tGPsdata *p) } /* Save material index */ - gps->mat_nr = BKE_object_material_slot_find_index(p->ob, p->material) - 1; + gps->mat_nr = BKE_gpencil_get_material_index(p->ob, p->material) - 1; /* calculate UVs along the stroke */ ED_gpencil_calc_stroke_uv(obact, gps); @@ -1616,7 +1616,7 @@ static void gp_init_colors(tGPsdata *p) } /* check if the material is already on object material slots and add it if missing */ - if (BKE_object_material_slot_find_index(p->ob, p->material) == 0) { + if (BKE_gpencil_get_material_index(p->ob, p->material) == 0) { BKE_object_material_slot_add(p->bmain, p->ob); assign_material(p->bmain, p->ob, ma, p->ob->totcol, BKE_MAT_ASSIGN_USERPREF); } |