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/softbody.c
parent8a51af7d1c98500022b1ff789284f9e0a3c038cd (diff)
Logging: Use CLOG for blenkernel
Part of D4277 by @sobakasu
Diffstat (limited to 'source/blender/blenkernel/intern/softbody.c')
-rw-r--r--source/blender/blenkernel/intern/softbody.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c
index f3f7eefc01c..55b32f38af6 100644
--- a/source/blender/blenkernel/intern/softbody.c
+++ b/source/blender/blenkernel/intern/softbody.c
@@ -52,6 +52,8 @@
#include <stdlib.h>
#include <string.h>
+#include "CLG_log.h"
+
#include "MEM_guardedalloc.h"
/* types */
@@ -87,6 +89,8 @@
#include "PIL_time.h"
+static CLG_LogRef LOG = {"bke.softbody"};
+
/* callbacks for errors and interrupts and some goo */
static int (*SB_localInterruptCallBack)(void) = NULL;
@@ -235,7 +239,7 @@ static float _final_goal(Object *ob, BodyPoint *bp)/*jow_go_for2_5 */
return (f);
}
}
- printf("_final_goal failed! sb or bp ==NULL\n");
+ CLOG_ERROR(&LOG, "sb or bp == NULL");
return f; /*using crude but spot able values some times helps debuggin */
}
@@ -247,7 +251,7 @@ static float _final_mass(Object *ob, BodyPoint *bp)
return(bp->mass*sb->nodemass);
}
}
- printf("_final_mass failed! sb or bp ==NULL\n");
+ CLOG_ERROR(&LOG, "sb or bp == NULL");
return 1.0f;
}
/* helper functions for everything is animateble jow_go_for2_5 ------*/
@@ -654,7 +658,7 @@ static void add_2nd_order_roller(Object *ob, float UNUSED(stiffness), int *count
notthis = bs->v1;
}
else {
- printf("oops we should not get here - add_2nd_order_springs");
+ CLOG_ERROR(&LOG, "oops we should not get here");
}
}
if (bpo) {/* so now we have a 2nd order humpdidump */
@@ -1010,7 +1014,7 @@ static int sb_detect_aabb_collisionCached(float UNUSED(force[3]), struct Object
}
else {
/*aye that should be cached*/
- printf("missing cache error\n");
+ CLOG_ERROR(&LOG, "missing cache error");
BLI_ghashIterator_step(ihash);
continue;
}
@@ -1080,7 +1084,7 @@ static int sb_detect_face_pointCached(float face_v1[3], float face_v2[3], float
}
else {
/*aye that should be cached*/
- printf("missing cache error\n");
+ CLOG_ERROR(&LOG, "missing cache error");
BLI_ghashIterator_step(ihash);
continue;
}
@@ -1179,7 +1183,7 @@ static int sb_detect_face_collisionCached(float face_v1[3], float face_v2[3], fl
}
else {
/*aye that should be cached*/
- printf("missing cache error\n");
+ CLOG_ERROR(&LOG, "missing cache error");
BLI_ghashIterator_step(ihash);
continue;
}
@@ -1361,7 +1365,7 @@ static int sb_detect_edge_collisionCached(float edge_v1[3], float edge_v2[3], fl
}
else {
/*aye that should be cached*/
- printf("missing cache error\n");
+ CLOG_ERROR(&LOG, "missing cache error");
BLI_ghashIterator_step(ihash);
continue;
}
@@ -1658,7 +1662,7 @@ static int sb_detect_vertex_collisionCached(
}
else {
/*aye that should be cached*/
- printf("missing cache error\n");
+ CLOG_ERROR(&LOG, "missing cache error");
BLI_ghashIterator_step(ihash);
continue;
}
@@ -1867,7 +1871,7 @@ static void sb_spring_force(Object *ob, int bpi, BodySpring *bs, float iks, floa
else {
/* TODO make this debug option */
/**/
- printf("bodypoint <bpi> is not attached to spring <*bs> --> sb_spring_force()\n");
+ CLOG_WARN(&LOG, "bodypoint <bpi> is not attached to spring <*bs>");
return;
}
@@ -1922,7 +1926,7 @@ static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, Object *ob, flo
float iks;
int bb, do_selfcollision, do_springcollision, do_aero;
int number_of_points_here = ilast - ifirst;
- SoftBody *sb= ob->soft; /* is supposed to be there */
+ SoftBody *sb = ob->soft; /* is supposed to be there */
BodyPoint *bp;
/* initialize */
@@ -1935,7 +1939,7 @@ static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, Object *ob, flo
/* --- could be done on object level to squeeze out the last bits of it */
}
else {
- printf("Error expected a SB here\n");
+ CLOG_ERROR(&LOG, "expected a SB here");
return (999);
}
@@ -3336,7 +3340,7 @@ static void softbody_step(struct Depsgraph *depsgraph, Scene *scene, Object *ob,
}/*SOLVER SELECT*/
else {
- printf("softbody no valid solver ID!");
+ CLOG_ERROR(&LOG, "softbody no valid solver ID!");
}/*SOLVER SELECT*/
if (sb->plastic) { apply_spring_memory(ob);}