diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-03-31 04:59:17 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-03-31 04:59:17 +0400 |
commit | 5b88712ff932fcbcd0bb0fb257e8e9c2e247a82a (patch) | |
tree | ca0f15ee78fee5aef80ebf5c0f9f46529b65a9e2 /source/blender/blenloader | |
parent | ebb229110e4af5d2df5613b6345da2f602b90092 (diff) |
move debug flag into its own global var (G.debug), split up debug options.
--debug
--debug-ffmpeg
--debug-python
--debug-events
--debug-wm
This makes debug output easier to read - event debug prints would flood output too much before.
For convenience:
--debug-all turns all debug flags on (works as --debug did before).
also removed some redundant whitespace in debug prints and prefix some prints with __func__ to give some context.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readblenentry.c | 2 | ||||
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/blenloader/intern/readblenentry.c b/source/blender/blenloader/intern/readblenentry.c index 6f138d5df23..ccf0c226570 100644 --- a/source/blender/blenloader/intern/readblenentry.c +++ b/source/blender/blenloader/intern/readblenentry.c @@ -115,7 +115,7 @@ void BLO_blendhandle_print_sizes(BlendHandle *bh, void *fp) buf[2]= buf[2]?buf[2]:' '; buf[3]= buf[3]?buf[3]:' '; - fprintf(fp, "['%.4s', '%s', %d, %ld ], \n", buf, name, bhead->nr, (long int)(bhead->len+sizeof(BHead))); + fprintf(fp, "['%.4s', '%s', %d, %ld ],\n", buf, name, bhead->nr, (long int)(bhead->len+sizeof(BHead))); } } fprintf(fp, "]\n"); diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index d8a874872b4..0780a7b6292 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -544,7 +544,7 @@ static Main *blo_find_main(FileData *fd, ListBase *mainlist, const char *filepat char *libname= (m->curlib)?m->curlib->filepath:m->name; if (BLI_path_cmp(name1, libname) == 0) { - if (G.f & G_DEBUG) printf("blo_find_main: found library %s\n", libname); + if (G.debug & G_DEBUG) printf("blo_find_main: found library %s\n", libname); return m; } } @@ -560,7 +560,7 @@ static Main *blo_find_main(FileData *fd, ListBase *mainlist, const char *filepat read_file_version(fd, m); - if (G.f & G_DEBUG) printf("blo_find_main: added new lib %s\n", filepath); + if (G.debug & G_DEBUG) printf("blo_find_main: added new lib %s\n", filepath); return m; } @@ -7253,7 +7253,7 @@ static void versions_gpencil_add_main(ListBase *lb, ID *id, const char *name) new_id(lb, id, name); /* alphabetic insterion: is in new_id */ - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("Converted GPencil to ID: %s\n", id->name+2); } @@ -7810,7 +7810,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main) { /* WATCH IT!!!: pointers from libdata have not been converted */ - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("read file %s\n Version %d sub %d svn r%d\n", fd->relabase, main->versionfile, main->subversionfile, main->revision); if (main->versionfile == 100) { @@ -13671,7 +13671,7 @@ static void expand_doit(FileData *fd, Main *mainvar, void *old) if (id==NULL) { read_libblock(fd, ptr, bhead, LIB_READ+LIB_INDIRECT, NULL); // commented because this can print way too much - // if (G.f & G_DEBUG) printf("expand_doit: other lib %s\n", lib->name); + // if (G.debug & G_DEBUG) printf("expand_doit: other lib %s\n", lib->name); /* for outliner dependency only */ ptr->curlib->parent= mainvar->curlib; @@ -13691,7 +13691,7 @@ static void expand_doit(FileData *fd, Main *mainvar, void *old) change_idid_adr_fd(fd, bhead->old, id); // commented because this can print way too much - // if (G.f & G_DEBUG) printf("expand_doit: already linked: %s lib: %s\n", id->name, lib->name); + // if (G.debug & G_DEBUG) printf("expand_doit: already linked: %s lib: %s\n", id->name, lib->name); } MEM_freeN(lib); @@ -13707,7 +13707,7 @@ static void expand_doit(FileData *fd, Main *mainvar, void *old) happens which invokes same ID... in that case the lookup table needs this entry */ oldnewmap_insert(fd->libmap, bhead->old, id, 1); // commented because this can print way too much - // if (G.f & G_DEBUG) printf("expand: already read %s\n", id->name); + // if (G.debug & G_DEBUG) printf("expand: already read %s\n", id->name); } } } |