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/editors/physics | |
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/editors/physics')
-rw-r--r-- | source/blender/editors/physics/particle_edit.c | 4 | ||||
-rw-r--r-- | source/blender/editors/physics/particle_object.c | 2 | ||||
-rw-r--r-- | source/blender/editors/physics/physics_fluid.c | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index bf3a9fff4e2..53e0e2b4056 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -3937,7 +3937,7 @@ void PE_undo_step(Scene *scene, int step) if (edit->curundo==NULL || edit->curundo->prev==NULL); else { - if (G.f & G_DEBUG) printf("undo %s\n", edit->curundo->name); + if (G.debug & G_DEBUG) printf("undo %s\n", edit->curundo->name); edit->curundo= edit->curundo->prev; get_PTCacheUndo(edit, edit->curundo); } @@ -3949,7 +3949,7 @@ void PE_undo_step(Scene *scene, int step) else { get_PTCacheUndo(edit, edit->curundo->next); edit->curundo= edit->curundo->next; - if (G.f & G_DEBUG) printf("redo %s\n", edit->curundo->name); + if (G.debug & G_DEBUG) printf("redo %s\n", edit->curundo->name); } } diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c index 1e71cf61817..3d50ec26a40 100644 --- a/source/blender/editors/physics/particle_object.c +++ b/source/blender/editors/physics/particle_object.c @@ -670,7 +670,7 @@ static void connect_hair(Scene *scene, Object *ob, ParticleSystem *psys) BLI_bvhtree_find_nearest(bvhtree.tree, key->co, &nearest, bvhtree.nearest_callback, &bvhtree); if (nearest.index == -1) { - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("No nearest point found for hair root!"); continue; } diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c index 23765b03d35..6a074a542c3 100644 --- a/source/blender/editors/physics/physics_fluid.c +++ b/source/blender/editors/physics/physics_fluid.c @@ -224,17 +224,17 @@ static void fluidsimPrintChannel(FILE *file, float *channel, int paramsize, char // invalid, cant happen? } - fprintf(file, " CHANNEL %s = \n", str); + fprintf(file, " CHANNEL %s =\n", str); for (i=0; i<channelSize;i++) { fprintf(file," "); for (j=0;j<=entries;j++) { // also print time value fprintf(file," %f ", channel[i*(entries+1)+j] ); if (j==entries-1) { fprintf(file," "); } } - fprintf(file," \n"); + fprintf(file,"\n"); } - fprintf(file, " ; \n" ); + fprintf(file, " ;\n" ); } #endif @@ -805,7 +805,7 @@ int runSimulationCallback(void *data, int status, int frame) if (status == FLUIDSIM_CBSTATUS_NEWFRAME) { fluidbake_updatejob(fb, frame / (float)settings->noOfFrames); - //printf("elbeem blender cb s%d, f%d, domainid:%d noOfFrames: %d \n", status,frame, settings->domainId, settings->noOfFrames ); // DEBUG + //printf("elbeem blender cb s%d, f%d, domainid:%d noOfFrames: %d\n", status,frame, settings->domainId, settings->noOfFrames ); // DEBUG } if (fluidbake_breakjob(fb)) { |