[Bf-blender-cvs] [53aa4193cf3] greasepencil-object: GPencil: Fix errors after merge due function renaming

Antonio Vazquez noreply at git.blender.org
Thu Mar 5 10:31:40 CET 2020


Commit: 53aa4193cf31e4fad0274bd68c443e2209d9db67
Author: Antonio Vazquez
Date:   Thu Mar 5 10:31:26 2020 +0100
Branches: greasepencil-object
https://developer.blender.org/rB53aa4193cf31e4fad0274bd68c443e2209d9db67

GPencil: Fix errors after merge due function renaming

===================================================================

M	source/blender/blenkernel/intern/gpencil.c
M	source/blender/editors/gpencil/gpencil_merge.c
M	source/blender/editors/gpencil/gpencil_vertex_ops.c

===================================================================

diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c
index 81188917018..e9da52a741d 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -2494,7 +2494,7 @@ bool BKE_gpencil_merge_materials_table_get(Object *ob,
   MaterialGPencilStyle *gp_style_primary = NULL;
   MaterialGPencilStyle *gp_style_secondary = NULL;
 
-  short *totcol = BKE_object_material_num(ob);
+  short *totcol = BKE_object_material_len_p(ob);
   if (totcol == 0) {
     return changed;
   }
diff --git a/source/blender/editors/gpencil/gpencil_merge.c b/source/blender/editors/gpencil/gpencil_merge.c
index 4a8b207f54d..9a7ad8d7220 100644
--- a/source/blender/editors/gpencil/gpencil_merge.c
+++ b/source/blender/editors/gpencil/gpencil_merge.c
@@ -592,7 +592,7 @@ static int gp_stroke_merge_material_exec(bContext *C, wmOperator *op)
   /* Review materials. */
   GHash *mat_table = BLI_ghash_int_new(__func__);
 
-  short *totcol = BKE_object_material_num(ob);
+  short *totcol = BKE_object_material_len_p(ob);
   if (totcol == 0) {
     return OPERATOR_CANCELLED;
   }
diff --git a/source/blender/editors/gpencil/gpencil_vertex_ops.c b/source/blender/editors/gpencil/gpencil_vertex_ops.c
index 5737c97a4b4..6a3eebf1baf 100644
--- a/source/blender/editors/gpencil/gpencil_vertex_ops.c
+++ b/source/blender/editors/gpencil/gpencil_vertex_ops.c
@@ -684,7 +684,7 @@ static int gp_material_to_vertex_exec(bContext *C, wmOperator *op)
 
   bool changed = false;
 
-  short *totcol = BKE_object_material_num(ob);
+  short *totcol = BKE_object_material_len_p(ob);
   if (totcol == 0) {
     return OPERATOR_CANCELLED;
   }



More information about the Bf-blender-cvs mailing list