Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonioya <blendergit@gmail.com>2018-08-28 09:17:53 +0300
committerAntonioya <blendergit@gmail.com>2018-08-28 09:18:09 +0300
commit71007dc1d65d6fff9410030f3610b141628de078 (patch)
treee7488730f466195482f5573cc362922dcb5cf974 /source/blender/editors/gpencil/gpencil_data.c
parent9a9b1e98849131358041cf2bb83bf7b7c9828119 (diff)
GP: Use custom api to get material
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_data.c')
-rw-r--r--source/blender/editors/gpencil/gpencil_data.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c
index 84706966c60..548294df388 100644
--- a/source/blender/editors/gpencil/gpencil_data.c
+++ b/source/blender/editors/gpencil/gpencil_data.c
@@ -507,7 +507,7 @@ static int gp_layer_duplicate_object_exec(bContext *C, wmOperator *op)
* otherwise add the slot with the material
*/
Material *ma_src = give_current_material(ob_src, gps_src->mat_nr + 1);
- int idx = BKE_object_material_slot_find_index(ob_dst, ma_src);
+ int idx = BKE_gpencil_get_material_index(ob_dst, ma_src);
if (idx == 0) {
BKE_object_material_slot_add(bmain, ob_dst);
assign_material(bmain, ob_dst, ma_src, ob_dst->totcol, BKE_MAT_ASSIGN_USERPREF);