From 552b2287db86ed6e77565672fbccff1d553f823f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 1 Feb 2019 12:44:19 +1100 Subject: Logging: Use CLOG for blenkernel Part of D4277 by @sobakasu --- source/blender/blenkernel/intern/mask.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'source/blender/blenkernel/intern/mask.c') diff --git a/source/blender/blenkernel/intern/mask.c b/source/blender/blenkernel/intern/mask.c index f219c225d9d..4b6d8255f5f 100644 --- a/source/blender/blenkernel/intern/mask.c +++ b/source/blender/blenkernel/intern/mask.c @@ -32,6 +32,8 @@ #include #include +#include "CLG_log.h" + #include "MEM_guardedalloc.h" #include "BLI_utildefines.h" @@ -63,6 +65,8 @@ #include "DEG_depsgraph_build.h" +static CLG_LogRef LOG = {"bke.mask"}; + static struct { ListBase splines; struct GHash *id_hash; @@ -1489,8 +1493,8 @@ void BKE_mask_layer_shape_from_mask(MaskLayer *masklay, MaskLayerShape *masklay_ } } else { - printf("%s: vert mismatch %d != %d (frame %d)\n", - __func__, masklay_shape->tot_vert, tot, masklay_shape->frame); + CLOG_ERROR(&LOG, "vert mismatch %d != %d (frame %d)", + masklay_shape->tot_vert, tot, masklay_shape->frame); } } @@ -1511,8 +1515,8 @@ void BKE_mask_layer_shape_to_mask(MaskLayer *masklay, MaskLayerShape *masklay_sh } } else { - printf("%s: vert mismatch %d != %d (frame %d)\n", - __func__, masklay_shape->tot_vert, tot, masklay_shape->frame); + CLOG_ERROR(&LOG, "vert mismatch %d != %d (frame %d)", + masklay_shape->tot_vert, tot, masklay_shape->frame); } } @@ -1550,9 +1554,9 @@ void BKE_mask_layer_shape_to_mask_interp(MaskLayer *masklay, } } else { - printf("%s: vert mismatch %d != %d != %d (frame %d - %d)\n", - __func__, masklay_shape_a->tot_vert, masklay_shape_b->tot_vert, tot, - masklay_shape_a->frame, masklay_shape_b->frame); + CLOG_ERROR(&LOG, "vert mismatch %d != %d != %d (frame %d - %d)", + masklay_shape_a->tot_vert, masklay_shape_b->tot_vert, tot, + masklay_shape_a->frame, masklay_shape_b->frame); } } @@ -1806,8 +1810,8 @@ void BKE_mask_layer_shape_changed_add(MaskLayer *masklay, int index, masklay_shape->data = data_resized; } else { - printf("%s: vert mismatch %d != %d (frame %d)\n", - __func__, masklay_shape->tot_vert, tot, masklay_shape->frame); + CLOG_ERROR(&LOG, "vert mismatch %d != %d (frame %d)", + masklay_shape->tot_vert, tot, masklay_shape->frame); } } } @@ -1847,8 +1851,8 @@ void BKE_mask_layer_shape_changed_remove(MaskLayer *masklay, int index, int coun masklay_shape->data = data_resized; } else { - printf("%s: vert mismatch %d != %d (frame %d)\n", - __func__, masklay_shape->tot_vert - count, tot, masklay_shape->frame); + CLOG_ERROR(&LOG, "vert mismatch %d != %d (frame %d)", + masklay_shape->tot_vert - count, tot, masklay_shape->frame); } } } -- cgit v1.2.3