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/rigidbody.c | |
parent | 8a51af7d1c98500022b1ff789284f9e0a3c038cd (diff) |
Logging: Use CLOG for blenkernel
Part of D4277 by @sobakasu
Diffstat (limited to 'source/blender/blenkernel/intern/rigidbody.c')
-rw-r--r-- | source/blender/blenkernel/intern/rigidbody.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c index ee9c9be6e7f..e965e6cc78e 100644 --- a/source/blender/blenkernel/intern/rigidbody.c +++ b/source/blender/blenkernel/intern/rigidbody.c @@ -37,6 +37,8 @@ #include <math.h> #include <limits.h> +#include "CLG_log.h" + #include "MEM_guardedalloc.h" #include "BLI_math.h" @@ -73,6 +75,10 @@ #include "DEG_depsgraph.h" #include "DEG_depsgraph_query.h" +#ifdef WITH_BULLET +static CLG_LogRef LOG = {"bke.rigidbody"}; +#endif + /* ************************************** */ /* Memory Management */ @@ -291,14 +297,14 @@ static rbCollisionShape *rigidbody_get_shape_convexhull_from_mesh(Object *ob, fl totvert = (mesh) ? mesh->totvert : 0; } else { - printf("ERROR: cannot make Convex Hull collision shape for non-Mesh object\n"); + CLOG_ERROR(&LOG, "cannot make Convex Hull collision shape for non-Mesh object"); } if (totvert) { shape = RB_shape_new_convex_hull((float *)mvert, sizeof(MVert), totvert, margin, can_embed); } else { - printf("ERROR: no vertices to define Convex Hull collision shape with\n"); + CLOG_ERROR(&LOG, "no vertices to define Convex Hull collision shape with"); } return shape; @@ -333,7 +339,7 @@ static rbCollisionShape *rigidbody_get_shape_trimesh_from_mesh(Object *ob) /* sanity checking - potential case when no data will be present */ if ((totvert == 0) || (tottri == 0)) { - printf("WARNING: no geometry data converted for Mesh Collision Shape (ob = %s)\n", ob->id.name + 2); + CLOG_WARN(&LOG, "no geometry data converted for Mesh Collision Shape (ob = %s)", ob->id.name + 2); } else { rbMeshData *mdata; @@ -381,7 +387,7 @@ static rbCollisionShape *rigidbody_get_shape_trimesh_from_mesh(Object *ob) } } else { - printf("ERROR: cannot make Triangular Mesh collision shape for non-Mesh object\n"); + CLOG_ERROR(&LOG, "cannot make Triangular Mesh collision shape for non-Mesh object"); } return shape; |