Commit: ce137699f9447a63e531631b46e265106cb91c71
Author: Bastien Montagne
Date: Wed Nov 21 21:39:19 2018 +0100
Branches: blender2.8
https://developer.blender.org/rBce137699f9447a63e531631b46e265106cb91c71
Cleanup: Move debug warning message about panels missing category from drawing
code to registering code.
In drawing it was pretty stupid (since we did not know *which* panels were
affected), and really, really annoyingly noisy!
===================================================================
M source/blender/editors/interface/interface_panel.c
M source/blender/makesrna/intern/rna_ui.c
===================================================================
diff --git a/source/blender/editors/interface/interface_panel.c
b/source/blender/editors/interface/interface_panel.c
index 4662d76a5e1..3197c4a2cbf 100644
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@ -1993,12 +1993,6 @@ void UI_panel_category_draw_all(ARegion *ar, const char
*category_id_active)
const bool is_active = STREQ(category_id, category_id_active);
-#ifdef DEBUG
- if (STREQ(category_id, PNL_CATEGORY_FALLBACK)) {
- printf("WARNING: Panel has no 'bl_category', script
needs updating!\n");
- }
-#endif
-
GPU_blend(true);
#ifdef USE_FLAT_INACTIVE
diff --git a/source/blender/makesrna/intern/rna_ui.c
b/source/blender/makesrna/intern/rna_ui.c
index 5f4b6ffc41c..ea39ce72598 100644
--- a/source/blender/makesrna/intern/rna_ui.c
+++ b/source/blender/makesrna/intern/rna_ui.c
@@ -249,6 +249,9 @@ static StructRNA *rna_Panel_register(
if (dummypt.category[0] == '\0') {
/* Use a fallback, otherwise an empty value will draw
the panel in every category. */
strcpy(dummypt.category, PNL_CATEGORY_FALLBACK);
+#ifndef NDEBUG
+ printf("Registering panel class: '%s' misses category,
please update the script\n", dummypt.idname);
+#endif
}
}
else {
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs