diff options
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_global.h | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/effect.c | 10 |
2 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_global.h b/source/blender/blenkernel/BKE_global.h index e70689b4c4e..57003ffc3aa 100644 --- a/source/blender/blenkernel/BKE_global.h +++ b/source/blender/blenkernel/BKE_global.h @@ -126,6 +126,7 @@ enum { G_DEBUG_JOBS = (1 << 6), /* jobs time profiling */ G_DEBUG_FREESTYLE = (1 << 7), /* freestyle messages */ G_DEBUG_DEPSGRAPH = (1 << 8), /* depsgraph messages */ + G_DEBUG_SIMDATA = (1 << 9), /* sim debug data display */ }; #define G_DEBUG_ALL (G_DEBUG | G_DEBUG_FFMPEG | G_DEBUG_PYTHON | G_DEBUG_EVENTS | G_DEBUG_WM | G_DEBUG_JOBS | \ diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c index c896fa2bbcf..9c3e78d7bb3 100644 --- a/source/blender/blenkernel/intern/effect.c +++ b/source/blender/blenkernel/intern/effect.c @@ -63,6 +63,7 @@ #include "BKE_DerivedMesh.h" #include "BKE_cdderivedmesh.h" #include "BKE_effect.h" +#include "BKE_global.h" #include "BKE_modifier.h" #include "BKE_object.h" #include "BKE_particle.h" @@ -1124,8 +1125,13 @@ void BKE_sim_debug_data_add_element(int type, const float v1[3], const float v2[ { unsigned int category_hash = BLI_ghashutil_strhash_p(category); SimDebugElement *elem; - if (!_sim_debug_data) - return; + + if (!_sim_debug_data) { + if (G.debug & G_DEBUG_SIMDATA) + BKE_sim_debug_data_set_enabled(true); + else + return; + } elem = MEM_callocN(sizeof(SimDebugElement), "sim debug data element"); elem->type = type; |