[Bf-blender-cvs] [71007dc1d65] blender2.8: GP: Use custom api to get material
Antonioya
noreply at git.blender.org
Tue Aug 28 08:20:55 CEST 2018
Commit: 71007dc1d65d6fff9410030f3610b141628de078
Author: Antonioya
Date: Tue Aug 28 08:17:53 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB71007dc1d65d6fff9410030f3610b141628de078
GP: Use custom api to get material
===================================================================
M source/blender/editors/gpencil/gpencil_data.c
===================================================================
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);
More information about the Bf-blender-cvs
mailing list