From 9195b5b3b138a8c5c18196bd7b1f421574e46d02 Mon Sep 17 00:00:00 2001 From: Antonioya Date: Mon, 27 Aug 2018 23:16:02 +0200 Subject: GP: Replace custom function by standard API Replace BKE_gpencil_get_material_index by BKE_object_material_slot_find_index --- source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/gpencil_modifiers') diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c b/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c index 610465c4c94..8a57d0c6740 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c @@ -171,7 +171,7 @@ void gpencil_apply_modifier_material( DEG_id_tag_update(&newmat->id, DEG_TAG_COPY_ON_WRITE); } /* reasign color index */ - int idx = BKE_gpencil_get_material_index(ob, newmat); + int idx = BKE_object_material_slot_find_index(ob, newmat); gps->mat_nr = idx - 1; } else { -- cgit v1.2.3