Age | Commit message (Collapse) | Author |
|
|
|
http://markmail.org/message/fp7ozcywxum3ar7n
|
|
the new if/else nesting introduced in the previous commit makes no sense.
(since I was here I add a comment for extrainfo and did some small cleanup)
|
|
|
|
|
|
+ some changes in rst
I named all the BGE modules with their actual names (e.g. Rasterizer, Video Texture, ...). so in the API index.html page they look more like the other Blender modules.
I did the same for the bgl module.
For bge.constraints this patch exposes the constants values for debug mode and createConstraints (they were hardcoded innts before).
+ making all the "todo" and #comments into rst comments (.. comments)
Thanks Solano, it's great to get help to those tasks :)
|
|
[the problem also affected OSX]
PhysicsId are Long, not ints (see PyObject* KX_GameObject::PyGetPhysicsId() )
There is a reference in the code to use PyCapsule instead of int. I'm not sure
about that. This patch at least stops the crashes
(update: I talked with Campbell and he repeated that PyCapsule are better, but if long is working it's fine for now).
|
|
|
|
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.
|
|
|
|
|
|
|
|
124-126 but isnt used by any build systems now.
|
|
|
|
|
|
and scons)
when python is disabled videotextures are not built.
|
|
|
|
|
|
* Removed modules Expression and CValue, neither were ever available.
* Added GameLogic.EvalExpression(exp) from the Expression module, evaluates an expression like the expression controller (not sure if this is really that useful since python is far more advanced).
* resetting the original blend file path didint work (own fault == -> =)
* Py3.x PyModule_Create didnt allow importing since it didn't add to sys.modules,
Looks like they want us to use init-tab array, but this doesn't suit us since
it needs to be setup before python is initialized.
* Documented GameLogic.globalDict
|
|
allow to dynamically create rigid body constraints while disable collision detection between connected bodies, pass as 10th argument the flag 128
PhysiPython KX_ConstraintWrapper, setParam
export setParam(paramIndex,paramValue0,paramValue1) for Physics constraints
paramIndex 0,1,2 are linear limits, 3,4,5 are angular limits, 6,7,8 are linear motors, 9,10,11 are angular motors
For example:
disableConnectedBodies=128
cons = PhysicsConstraints.createConstraint(oid,rid,generic6dof,pivotInAx,pivotInAy,pivotInAz,angleX,angleY,angleZ,disableConnectedBodies)
#params 0,1,2 are linear limits, low,high value. if low > high then disable limit
cons.setParam(0,0,0)
I will provide an example .blend for Blender 2.49
|
|
and convert those into a full constraint frame
(same values as Rigid Body constraint Generic 6DOF values), and add 'setLimit' support for generic 6DOF constraint. todo: enableMotor
|
|
GameLogic that was cleared.
I added module clearing before there was checks for invalid python objects, so now its not needed for BGE Builtin types at least.
also made the builtin modules get re-used if they already exist and clear all user modules when the game engine finishes so with Module-Py-Controllers the referenced modules are at least up to date when pressing Pkey.
|
|
with defines or batch renaming funcs (with the exception of CListValue slicing)
.
No changes for py2.x.
|
|
This changes how the BGE classes and Python work together, which hasnt changed since blender went opensource.
The main difference is PyObjectPlus - the base class for most game engine classes, no longer inherit from PyObject, and cannot be cast to a PyObject.
This has the advantage that the BGE does not have to keep 2 reference counts valid for C++ and Python.
Previously C++ classes would never be freed while python held a reference, however this reference could be problematic eg: a GameObject that isnt in a scene anymore should not be used by python, doing so could even crash blender in some cases.
Instead PyObjectPlus has a member "PyObject *m_proxy" which is lazily initialized when python needs it. m_proxy reference counts are managed by python, though it should never be freed while the C++ class exists since it holds a reference to avoid making and freeing it all the time.
When the C++ class is free'd it sets the m_proxy reference to NULL, If python accesses this variable it will raise a RuntimeError, (check the isValid attribute to see if its valid without raising an error).
- This replaces the m_zombie bool and IsZombie() tests added recently.
In python return values that used to be..
return value->AddRef();
Are now
return value->GetProxy();
or...
return value->NewProxy(true); // true means python owns this C++ value which will be deleted when the PyObject is freed
|
|
|
|
add 'Collision' button to disable collisions between bodies, linked between constraint.
|
|
switching from char to const char
|
|
Also added a fix for PyMarshal_WriteObjectToString
Now I just need to figure out linking of the gameengine on my imac.
Kent
|
|
I'm getting this error now:
GPG_Application.cpp: In member function 'void GPG_Application::stopEngine()':
/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3/marshal.h:12: error: too many arguments to function 'PyObject* PyMarshal_WriteObjectToString(PyObject*)'
GPG_Application.cpp:720: error: at this point in file
Are we offically not supporint older versions of python now? :)
Kent
|
|
* removed macros that were not used much, some misleading.
* removed error string setting calls that overwrote the error set by PyArg_ParseTuple with a less useful one.
* use python macros Py_RETURN_NONE, Py_RETURN_TRUE, Py_RETURN_FALSE
|
|
made sure all will raise errors when called with invalid args.
|
|
blocks that were previously missed; and b) greatly increase my
ohloh stats!
|
|
|
|
broken, just load file into memory and load blend from memory.
-near sensor support
- python binding for PhysicsConstraints.setNumTimeSubSteps (dividing the physics timestep to tradeoff quality for performance)
|
|
fixed a python related bug with physics contraints
fixed some line-ending problem with blenderbuttons.c
makefile/scons/projectfiles need to add source/gameengine/Ketsji/KX_VehicleWrapper.cpp
|
|
remove constraint fixed,
Bullet timestep now subdivides Blender game engine timestep, so it runs 60 hertz,
SphereShape reverted to old style, so no support for non-uniform scaled spheres for now,
|
|
|
|
fixed some copy/paste bug in inertia/inverse inertia.
colors in deactivation debug
|
|
exposed those tresholds to python (more 'expert' settings)
|
|
tweaked friction, some more preparations but no real functionality added yet
|
|
Erwin Coumans: Abstract the physics engine
Charlie C: Joystick fixes
Me: Moved the ray cast (shadows, mouse sensor & ray sensor)
|
|
Kent
Index: gameengine/Ketsji/KX_PyConstraintBinding.cpp
===================================================================
RCS file: /cvs01/blender/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp,v
retrieving revision 1.3
diff -u -r1.3 KX_PyConstraintBinding.cpp
--- gameengine/Ketsji/KX_PyConstraintBinding.cpp 25 Nov 2002 15:29:49 -0000 1.3
+++ gameengine/Ketsji/KX_PyConstraintBinding.cpp 30 Dec 2002 07:08:18 -0000
@@ -128,7 +128,6 @@
{
int constraintid;
- int len = PyTuple_Size(args);
if (PyArg_ParseTuple(args,"i",&constraintid))
{
if (g_physics_env)
|
|
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
added to these files.
Kent
--
mein@cs.umn.edu
|
|
|