diff options
Diffstat (limited to 'source/gameengine')
-rw-r--r-- | source/gameengine/Ketsji/KX_PythonInit.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp index 5d0c6a8bb83..234d03ab618 100644 --- a/source/gameengine/Ketsji/KX_PythonInit.cpp +++ b/source/gameengine/Ketsji/KX_PythonInit.cpp @@ -130,6 +130,7 @@ extern "C" { #include "PHY_IPhysicsEnvironment.h" #include "BKE_main.h" #include "BKE_global.h" +#include "BKE_library.h" #include "BLI_blenlib.h" #include "GPU_material.h" #include "MEM_guardedalloc.h" @@ -752,7 +753,7 @@ static PyObject *gLibNew(PyObject *, PyObject *args) return NULL; } - Main *maggie= (Main *)MEM_callocN( sizeof(Main), "BgeMain"); + Main *maggie=BKE_main_new(); kx_scene->GetSceneConverter()->GetMainDynamic().push_back(maggie); strncpy(maggie->name, path, sizeof(maggie->name)-1); |