Logging: Use CLOG for blenkernel
[blender.git] / source / blender / blenkernel / intern / armature.c
index f591628365360bf11dfda501ec0500909b1f852c..09926733f9f947c97aac1711475c5f234a0c59dd 100644 (file)
 
 #include "atomic_ops.h"
 
+#include "CLG_log.h"
+
+static CLG_LogRef LOG = {"bke.armature"};
+
 /* **************** Generic Functions, data level *************** */
 
 bArmature *BKE_armature_add(Main *bmain, const char *name)
@@ -1153,7 +1157,7 @@ void armature_deform_verts(
        }
 
        if ((armOb->pose->flag & POSE_RECALC) != 0) {
-               printf("ERROR! Trying to evaluate influence of armature '%s' which needs Pose recalc!\n", armOb->id.name);
+               CLOG_ERROR(&LOG, "Trying to evaluate influence of armature '%s' which needs Pose recalc!", armOb->id.name);
                BLI_assert(0);
        }
 
@@ -1169,7 +1173,7 @@ void armature_deform_verts(
        ObjectBBoneDeform *bbone_deform =
                BKE_armature_cached_bbone_deformation_get(armOb);
        if (bbone_deform == NULL || bbone_deform->pdef_info_array == NULL) {
-               fprintf(stderr,
+               CLOG_ERROR(&LOG,
                        "Armature does not have bbone cache %s, "
                        "usually happens due to a dependency cycle.\n",
                        armOb->id.name + 2);
@@ -1997,7 +2001,7 @@ static void pose_proxy_synchronize(Object *ob, Object *from, int layer_protected
        for (pchan = pose->chanbase.first; pchan; pchan = pchan->next) {
                if (pchan->bone->layer & layer_protected) {
                        if (BKE_pose_channel_find_name(frompose, pchan->name) == NULL) {
-                               printf("failed to sync proxy armature because '%s' is missing pose channel '%s'\n",
+                               CLOG_ERROR(&LOG, "failed to sync proxy armature because '%s' is missing pose channel '%s'",
                                       from->id.name, pchan->name);
                                error = 1;
                        }