Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2019-01-16 21:41:29 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-01-16 21:43:53 +0300
commit81022000063c1fe84d85e8de416d8ab0c2c4c516 (patch)
tree01db45c9a9f3e87b107b2d61904080261cecf730 /source/blender/blenkernel/BKE_global.h
parentfeaf846f93913840b523843c63ef67dfa82379cc (diff)
Cleanup/sanitize usages of G.debug_value.
There was no documentation at all, some very bad practices (like using G.debug_value > 0 as some sort of global debug print switch), and even an overlapping use of '1' value... Also, python setter did not check for valid range (since this is a short, not an int).
Diffstat (limited to 'source/blender/blenkernel/BKE_global.h')
-rw-r--r--source/blender/blenkernel/BKE_global.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_global.h b/source/blender/blenkernel/BKE_global.h
index b2991679775..97e23a952db 100644
--- a/source/blender/blenkernel/BKE_global.h
+++ b/source/blender/blenkernel/BKE_global.h
@@ -73,7 +73,21 @@ typedef struct Global {
/* to indicate render is busy, prevent renderwindow events etc */
bool is_rendering;
- /* debug value, can be set from the UI and python, used for testing nonstandard features */
+ /* Debug value, can be set from the UI and python, used for testing nonstandard features.
+ * DO NOT abuse it with generic checks like `if (G.debug_value > 0)`. Do not use it as bitflags.
+ * Only precise specific values should be checked for, to avoid unpredictable side-effects.
+ * Please document here the value(s) you are using (or a range of values reserved to some area).
+ * * -16384 and below: Reserved for python (add-ons) usage.
+ * * -1: Disable faster motion paths computation (since 08/2018).
+ * * 1 - 30: EEVEE debug/stats values (01/2018).
+ * * 101: Enable UI debug drawing of fullscreen area's corner widget (10/2014).
+ * * 527: Old mysterious switch in behavior of MeshDeform modifier (before 04/2010).
+ * * 777: Enable UI node panel's sockets polling (11/2011).
+ * * 799: Enable some mysterious new depsgraph behavior (05/2015).
+ * * 1112: Disable new Cloth internal springs hanlding (09/2014).
+ * * 1234: Disable new dyntopo code fixing skinny faces generation (04/2015).
+ * * 16384 and above: Reserved for python (add-ons) usage.
+ */
short debug_value;
/* saved to the blend file as FileGlobal.globalf,