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:
authorBastien Montagne <montagne29@wanadoo.fr>2016-06-21 17:19:08 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-06-21 17:19:08 +0300
commitdb4a46bc3c97bf9762a472bb8dcd4213b69acf83 (patch)
treee046508463c2cc928e49a8e95bd27d1c980f87f2 /source/blender/blenloader/intern/readfile.c
parente34ade4eb3b28a44d7bb1685a0fba32937c8982f (diff)
Cleanup: hide debug print behind proper debug defines instead of using comments...
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r--source/blender/blenloader/intern/readfile.c28
1 files changed, 21 insertions, 7 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 838179ec0a9..6aa2fc4ac8c 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -7949,16 +7949,22 @@ static BHead *read_libblock(FileData *fd, Main *main, BHead *bhead, const short
if (fd->memfile && ELEM(bhead->code, ID_LI, ID_ID)) {
const char *idname = bhead_id_name(fd, bhead);
- /* printf("Checking %s...\n", idname); */
+#ifdef PRINT_DEBUG
+ printf("Checking %s...\n", idname);
+#endif
if (bhead->code == ID_LI) {
Main *libmain = fd->old_mainlist->first;
/* Skip oldmain itself... */
for (libmain = libmain->next; libmain; libmain = libmain->next) {
- /* printf("... against %s: ", libmain->curlib ? libmain->curlib->id.name : "<NULL>"); */
+#ifdef PRINT_DEBUG
+ printf("... against %s: ", libmain->curlib ? libmain->curlib->id.name : "<NULL>");
+#endif
if (libmain->curlib && STREQ(idname, libmain->curlib->id.name)) {
Main *oldmain = fd->old_mainlist->first;
- /* printf("FOUND!\n"); */
+#ifdef PRINT_DEBUG
+ printf("FOUND!\n");
+#endif
/* In case of a library, we need to re-add its main to fd->mainlist, because if we have later
* a missing ID_ID, we need to get the correct lib it is linked to!
* Order is crucial, we cannot bulk-add it in BLO_read_from_memfile() like it used to be... */
@@ -7972,13 +7978,19 @@ static BHead *read_libblock(FileData *fd, Main *main, BHead *bhead, const short
}
return blo_nextbhead(fd, bhead);
}
- /* printf("nothing...\n"); */
+#ifdef PRINT_DEBUG
+ printf("nothing...\n");
+#endif
}
}
else {
- /* printf("... in %s (%s): ", main->curlib ? main->curlib->id.name : "<NULL>", main->curlib ? main->curlib->name : "<NULL>"); */
+#ifdef PRINT_DEBUG
+ printf("... in %s (%s): ", main->curlib ? main->curlib->id.name : "<NULL>", main->curlib ? main->curlib->name : "<NULL>");
+#endif
if ((id = BKE_libblock_find_name_ex(main, GS(idname), idname + 2))) {
- /* printf("FOUND!\n"); */
+#ifdef PRINT_DEBUG
+ printf("FOUND!\n");
+#endif
/* Even though we found our linked ID, there is no guarantee its address is still the same... */
if (id != bhead->old) {
oldnewmap_insert(fd->libmap, bhead->old, id, GS(id->name));
@@ -7990,7 +8002,9 @@ static BHead *read_libblock(FileData *fd, Main *main, BHead *bhead, const short
}
return blo_nextbhead(fd, bhead);
}
- /* printf("nothing...\n"); */
+#ifdef PRINT_DEBUG
+ printf("nothing...\n");
+#endif
}
}