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/blenkernel/BKE_global.h | |
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/blenkernel/BKE_global.h')
-rw-r--r-- | source/blender/blenkernel/BKE_global.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_global.h b/source/blender/blenkernel/BKE_global.h index 80c9244d232..5f230e5fad9 100644 --- a/source/blender/blenkernel/BKE_global.h +++ b/source/blender/blenkernel/BKE_global.h @@ -69,6 +69,7 @@ typedef struct Global { short rt; int f; + int debug; /* Used for BMesh transformations */ struct BME_Glob *editBMesh; @@ -104,16 +105,26 @@ typedef struct Global { /* #define G_FACESELECT (1 << 8) use (mesh->editflag & ME_EDIT_PAINT_MASK) */ -#define G_DEBUG (1 << 12) #define G_SCRIPT_AUTOEXEC (1 << 13) #define G_SCRIPT_OVERRIDE_PREF (1 << 14) /* when this flag is set ignore the userprefs */ -#define G_DEBUG_FFMPEG (1 << 15) /* #define G_NOFROZEN (1 << 17) also removed */ /* #define G_GREASEPENCIL (1 << 17) also removed */ /* #define G_AUTOMATKEYS (1 << 30) also removed */ +/* G.debug */ +enum { + G_DEBUG = (1 << 0), /* general debug flag, print more info in unexpected cases */ + G_DEBUG_FFMPEG = (1 << 1), + G_DEBUG_PYTHON = (1 << 2), /* extra python info */ + G_DEBUG_EVENTS = (1 << 3), /* input/window/screen events */ + G_DEBUG_WM = (1 << 4) /* operator, undo */ +}; + +#define G_DEBUG_ALL (G_DEBUG | G_DEBUG_FFMPEG | G_DEBUG_PYTHON | G_DEBUG_EVENTS | G_DEBUG_WM) + + /* G.fileflags */ #define G_AUTOPACK (1 << 0) |