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/object.c
parent8a51af7d1c98500022b1ff789284f9e0a3c038cd (diff)
Logging: Use CLOG for blenkernel
Part of D4277 by @sobakasu
Diffstat (limited to 'source/blender/blenkernel/intern/object.c')
-rw-r--r--source/blender/blenkernel/intern/object.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index f3ff601b7e0..70ea516a94b 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -34,6 +34,8 @@
#include <math.h>
#include <stdio.h>
+#include "CLG_log.h"
+
#include "MEM_guardedalloc.h"
#include "DNA_anim_types.h"
@@ -139,6 +141,8 @@
#include "CCGSubSurf.h"
#include "atomic_ops.h"
+static CLG_LogRef LOG = {"bke.object"};
+
/* Vertex parent modifies original BMesh which is not safe for threading.
* Ideally such a modification should be handled as a separate DAG update
* callback for mesh datablock, but for until it is actually supported use
@@ -782,7 +786,7 @@ static const char *get_obdata_defname(int type)
case OB_EMPTY: return DATA_("Empty");
case OB_GPENCIL: return DATA_("GPencil");
default:
- printf("get_obdata_defname: Internal error, bad type: %d\n", type);
+ CLOG_ERROR(&LOG, "Internal error, bad type: %d", type);
return DATA_("Empty");
}
}
@@ -808,7 +812,7 @@ void *BKE_object_obdata_add_from_type(Main *bmain, int type, const char *name)
case OB_GPENCIL: return BKE_gpencil_data_addnew(bmain, name);
case OB_EMPTY: return NULL;
default:
- printf("%s: Internal error, bad type: %d\n", __func__, type);
+ CLOG_ERROR(&LOG, "Internal error, bad type: %d", type);
return NULL;
}
}
@@ -1563,7 +1567,7 @@ void BKE_object_make_proxy(Main *bmain, Object *ob, Object *target, Object *cob)
{
/* paranoia checks */
if (ID_IS_LINKED(ob) || !ID_IS_LINKED(target)) {
- printf("cannot make proxy\n");
+ CLOG_ERROR(&LOG, "cannot make proxy");
return;
}
@@ -1981,7 +1985,7 @@ static void ob_parbone(Object *ob, Object *par, float mat[4][4])
/* Make sure the bone is still valid */
pchan = BKE_pose_channel_find_name(par->pose, ob->parsubstr);
if (!pchan || !pchan->bone) {
- printf("Object %s with Bone parent: bone %s doesn't exist\n", ob->id.name + 2, ob->parsubstr);
+ CLOG_ERROR(&LOG, "Object %s with Bone parent: bone %s doesn't exist", ob->id.name + 2, ob->parsubstr);
unit_m4(mat);
return;
}
@@ -2065,9 +2069,8 @@ static void give_parvert(Object *par, int nr, float vec[3])
}
}
else {
- fprintf(stderr,
- "%s: Evaluated mesh is needed to solve parenting, "
- "object position can be wrong now\n", __func__);
+ CLOG_ERROR(&LOG, "Evaluated mesh is needed to solve parenting, "
+ "object position can be wrong now");
}
}
else if (ELEM(par->type, OB_CURVE, OB_SURF)) {