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:
authorErwin Coumans <blender@erwincoumans.com>2011-03-12 23:34:17 +0300
committerErwin Coumans <blender@erwincoumans.com>2011-03-12 23:34:17 +0300
commit5e374328a87c1b418f8454d5ef38470484804961 (patch)
tree1d6de85165175c5192f74dbd423e1d5cb48f8ff6 /source/gameengine/Ketsji/KX_PyConstraintBinding.cpp
parent8c526e79e31d40d56a6fecce9343c74bd9fe62d8 (diff)
update Bullet physics sdk to latest trunk/version 2.78
add PhysicsConstraints.exportBulletFile(char* fileName) python command I'll be checking the bf-committers mailing list, in case this commit broke stuff scons needs to be updated, I'll do that in a second.
Diffstat (limited to 'source/gameengine/Ketsji/KX_PyConstraintBinding.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_PyConstraintBinding.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp b/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp
index f08fc14c29c..8776bf6fe88 100644
--- a/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp
+++ b/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp
@@ -542,6 +542,18 @@ static PyObject* gPyRemoveConstraint(PyObject* self,
Py_RETURN_NONE;
}
+static PyObject* gPyExportBulletFile(PyObject*, PyObject* args)
+{
+ char* filename;
+ if (!PyArg_ParseTuple(args,"s:exportBulletFile",&filename))
+ return NULL;
+
+ if (PHY_GetActiveEnvironment())
+ {
+ PHY_GetActiveEnvironment()->exportFile(filename);
+ }
+ Py_RETURN_NONE;
+}
static struct PyMethodDef physicsconstraints_methods[] = {
{"setGravity",(PyCFunction) gPySetGravity,
@@ -594,6 +606,9 @@ static struct PyMethodDef physicsconstraints_methods[] = {
{"getAppliedImpulse",(PyCFunction) gPyGetAppliedImpulse,
METH_VARARGS, (const char *)gPyGetAppliedImpulse__doc__},
+ {"exportBulletFile",(PyCFunction)gPyExportBulletFile,
+ METH_VARARGS, "export a .bullet file"},
+
//sentinel
{ NULL, (PyCFunction) NULL, 0, NULL }
@@ -664,5 +679,7 @@ PHY_IPhysicsEnvironment* PHY_GetActiveEnvironment()
return g_CurrentActivePhysicsEnvironment;
}
+
+
#endif // WITH_PYTHON