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:
Diffstat (limited to 'source/gameengine/Converter')
-rw-r--r--source/gameengine/Converter/KX_BlenderSceneConverter.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
index 75c0e54eb68..44e62f1601a 100644
--- a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
+++ b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
@@ -43,6 +43,7 @@
#include "KX_KetsjiEngine.h"
#include "KX_IPhysicsController.h"
#include "BL_Material.h"
+#include "SYS_System.h"
#include "DummyPhysicsEnvironment.h"
@@ -305,6 +306,11 @@ void KX_BlenderSceneConverter::ConvertScene(const STR_String& scenename,
ccdPhysEnv->setDeactivationLinearTreshold(0.8f); // default, can be overridden by Python
ccdPhysEnv->setDeactivationAngularTreshold(1.0f); // default, can be overridden by Python
+ SYS_SystemHandle syshandle = SYS_GetSystem(); /*unused*/
+ int visualizePhysics = SYS_GetCommandLineInt(syshandle,"show_physics",0);
+ if (visualizePhysics)
+ ccdPhysEnv->setDebugMode(btIDebugDraw::DBG_DrawWireframe|btIDebugDraw::DBG_DrawAabb|btIDebugDraw::DBG_DrawContactPoints|btIDebugDraw::DBG_DrawText);
+
//todo: get a button in blender ?
//disable / enable debug drawing (contact points, aabb's etc)
//ccdPhysEnv->setDebugMode(1);