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:
authorLukas Tönne <lukas.toenne@gmail.com>2015-01-21 16:00:59 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2015-01-21 16:00:59 +0300
commitf087e9930d5b8c876206af117ce085dec0ec4578 (patch)
tree930007bcfbd15d1ec5f8a64b94a55529e6facdea /source/blender/blenkernel/intern/effect.c
parentf23338e107503ea9cddaa1e0155556f750c8c15a (diff)
Added new debug flag which can be used to lazy-init the SimDebug drawing.
A development addon can be used now to enable the debug drawing, without the need to add UI code for this in the release files. The SimDebug feature should also get an overall build flag and use function stubs unless enabled. That way any possibility of overhead in releases is eliminated.
Diffstat (limited to 'source/blender/blenkernel/intern/effect.c')
-rw-r--r--source/blender/blenkernel/intern/effect.c10
1 files changed, 8 insertions, 2 deletions
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;