Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-02-01 04:44:19 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-02-01 04:46:39 +0300
commit552b2287db86ed6e77565672fbccff1d553f823f (patch)
tree235ad970599910d52c822bb89d23fb467f44f1bd /source/blender/blenkernel/intern/dynamicpaint.c
parent8a51af7d1c98500022b1ff789284f9e0a3c038cd (diff)
Logging: Use CLOG for blenkernel
Part of D4277 by @sobakasu
Diffstat (limited to 'source/blender/blenkernel/intern/dynamicpaint.c')
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index 74f8f27b601..a93ed7461c3 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -89,11 +89,15 @@
#include "atomic_ops.h"
+#include "CLG_log.h"
+
/* could enable at some point but for now there are far too many conversions */
#ifdef __GNUC__
//# pragma GCC diagnostic ignored "-Wdouble-promotion"
#endif
+static CLG_LogRef LOG = {"bke.dynamicpaint"};
+
/* precalculated gaussian factors for 5x super sampling */
static const float gaussianFactors[5] = {
0.996849f,
@@ -240,6 +244,7 @@ static int setError(DynamicPaintCanvasSettings *canvas, const char *string)
{
/* Add error to canvas ui info label */
BLI_strncpy(canvas->error, string, sizeof(canvas->error));
+ CLOG_STR_ERROR(&LOG, string);
return 0;
}
@@ -2810,7 +2815,7 @@ int dynamicPaint_createUVSurface(Scene *scene, DynamicPaintSurface *surface, flo
/*
* Start generating the surface
*/
- printf("DynamicPaint: Preparing UV surface of %ix%i pixels and %i tris.\n", w, h, tottri);
+ CLOG_INFO(&LOG, 1, "Preparing UV surface of %ix%i pixels and %i tris.", w, h, tottri);
/* Init data struct */
if (surface->data)
@@ -4448,7 +4453,7 @@ static int dynamicPaint_paintParticles(DynamicPaintSurface *surface,
particlesAdded++;
}
if (invalidParticles)
- printf("Warning: Invalid particle(s) found!\n");
+ CLOG_WARN(&LOG, "Invalid particle(s) found!");
/* If no suitable particles were found, exit */
if (particlesAdded < 1) {