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_add_stroke.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_add_stroke.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_add_stroke.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/gpencil/gpencil_add_stroke.c b/source/blender/editors/gpencil/gpencil_add_stroke.c index c99c93d4ac7..310abbe60f1 100644 --- a/source/blender/editors/gpencil/gpencil_add_stroke.c +++ b/source/blender/editors/gpencil/gpencil_add_stroke.c @@ -72,7 +72,7 @@ static int gp_stroke_material(Main *bmain, Object *ob, const ColorTemplate *pct) copy_v4_v4(ma->gp_style->stroke_rgba, pct->line); copy_v4_v4(ma->gp_style->fill_rgba, pct->fill); - return BKE_object_material_slot_find_index(ob, ma) - 1; + return BKE_gpencil_get_material_index(ob, ma) - 1; } /* ***************************************************************** */ |