Added GameLogic.Mathutils so Mathutils and its types can be accessed from blenderplayer.
also changed importText so it dosnt do a malloc
This commit is contained in:
@@ -62,6 +62,10 @@
|
||||
|
||||
#include "KX_PyMath.h"
|
||||
|
||||
extern "C" {
|
||||
#include "Mathutils.h" // Blender.Mathutils module copied here so the blenderlayer can use.
|
||||
}
|
||||
|
||||
#include "PHY_IPhysicsEnvironment.h"
|
||||
// FIXME: Enable for access to blender python modules. This is disabled because
|
||||
// python has dependencies on a lot of other modules and is a pain to link.
|
||||
@@ -733,7 +737,10 @@ PyObject* initGameLogic(KX_Scene* scene) // quick hack to get gravity hook
|
||||
|
||||
ErrorObject = PyString_FromString("GameLogic.error");
|
||||
PyDict_SetItemString(d, "error", ErrorObject);
|
||||
|
||||
|
||||
// Add Blender.Mathutils module, duplicate code :/
|
||||
PyDict_SetItemString(d, "Mathutils", Mathutils_Init("GameLogic.Mathutils"));
|
||||
|
||||
// XXXX Add constants here
|
||||
/* To use logic bricks, we need some sort of constants. Here, we associate */
|
||||
/* constants and sumbolic names. Add them to dictionary d. */
|
||||
|
||||
Reference in New Issue
Block a user