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/pointcache.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source/blender/blenkernel/intern/pointcache.c') diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index 10f6cfc4fec..8071c71042f 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -34,6 +34,8 @@ #include #include +#include "CLG_log.h" + #include "MEM_guardedalloc.h" #include "DNA_ID.h" @@ -123,6 +125,8 @@ /* could be made into a pointcache option */ #define DURIAN_POINTCACHE_LIB_OK 1 +static CLG_LogRef LOG = {"bke.pointcache"}; + static int ptcache_data_size[] = { sizeof(unsigned int), // BPHYS_DATA_INDEX 3 * sizeof(float), // BPHYS_DATA_LOCATION @@ -1243,7 +1247,7 @@ static int ptcache_dynamicpaint_read(PTCacheFile *pf, void *dp_v) /* version header */ ptcache_file_read(pf, version, 1, sizeof(char) * 4); if (!STREQLEN(version, DPAINT_CACHE_VERSION, 4)) { - printf("Dynamic Paint: Invalid cache version: '%c%c%c%c'!\n", UNPACK4(version)); + CLOG_ERROR(&LOG, "Dynamic Paint: Invalid cache version: '%c%c%c%c'!", UNPACK4(version)); return 0; } @@ -2479,7 +2483,7 @@ static int ptcache_mem_frame_to_disk(PTCacheID *pid, PTCacheMem *pm) pf = ptcache_file_open(pid, PTCACHE_FILE_WRITE, pm->frame); - if (pf==NULL) { + if (pf == NULL) { if (G.debug & G_DEBUG) printf("Error opening disk cache file for writing\n"); return 0; -- cgit v1.2.3