diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-02-01 04:44:19 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-02-01 04:46:39 +0300 |
commit | 552b2287db86ed6e77565672fbccff1d553f823f (patch) | |
tree | 235ad970599910d52c822bb89d23fb467f44f1bd /source/blender/blenkernel/intern/material.c | |
parent | 8a51af7d1c98500022b1ff789284f9e0a3c038cd (diff) |
Logging: Use CLOG for blenkernel
Part of D4277 by @sobakasu
Diffstat (limited to 'source/blender/blenkernel/intern/material.c')
-rw-r--r-- | source/blender/blenkernel/intern/material.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c index f4b82448f46..13204b21d43 100644 --- a/source/blender/blenkernel/intern/material.c +++ b/source/blender/blenkernel/intern/material.c @@ -34,6 +34,8 @@ #include <math.h> #include <stddef.h> +#include "CLG_log.h" + #include "MEM_guardedalloc.h" #include "DNA_anim_types.h" @@ -79,6 +81,8 @@ /* used in UI and render */ Material defmaterial; +static CLG_LogRef LOG = {"bke.material"}; + /* called on startup, creator.c */ void init_def_material(void) { @@ -524,7 +528,7 @@ Material **give_current_material_p(Object *ob, short act) return NULL; else if (act <= 0) { if (act < 0) { - printf("Negative material index!\n"); + CLOG_ERROR(&LOG, "Negative material index!"); } return NULL; } @@ -938,7 +942,7 @@ bool BKE_object_material_slot_remove(Main *bmain, Object *ob) /* this should never happen and used to crash */ if (ob->actcol <= 0) { - printf("%s: invalid material index %d, report a bug!\n", __func__, ob->actcol); + CLOG_ERROR(&LOG, "invalid material index %d, report a bug!", ob->actcol); BLI_assert(0); return false; } |