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.
This commit is contained in:
2012-03-31 00:59:17 +00:00
parent ebb229110e
commit 5b88712ff9
98 changed files with 453 additions and 410 deletions

View File

@@ -6033,7 +6033,7 @@ static PyObject *pyrna_srna_ExternalType(StructRNA *srna)
newclass = NULL;
}
else {
if (G.f & G_DEBUG)
if (G.debug & G_DEBUG_PYTHON)
fprintf(stderr, "SRNA Subclassed: '%s'\n", idname);
}
}
@@ -7145,7 +7145,7 @@ static void bpy_class_free(void *pyob_ptr)
PyErr_Clear();
#if 0 /* needs further investigation, too annoying so quiet for now */
if (G.f & G_DEBUG) {
if (G.debug & G_DEBUG_PYTHON) {
if (self->ob_refcnt > 1) {
PyC_ObSpit("zombie class - ref should be 1", self);
}
@@ -7444,7 +7444,7 @@ static PyObject *pyrna_unregister_class(PyObject *UNUSED(self), PyObject *py_cla
}
/* should happen all the time but very slow */
if (G.f & G_DEBUG) {
if (G.debug & G_DEBUG_PYTHON) {
/* remove all properties using this class */
StructRNA *srna_iter;
PointerRNA ptr_rna;