python modules in the game engine could point to builtin modules like 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.
This commit is contained in:
Campbell Barton
2009-04-29 23:39:27 +00:00
parent 537b080379
commit 1e7df58519
7 changed files with 122 additions and 35 deletions

View File

@@ -37,7 +37,7 @@
PyObject* bpy_text_import( char *name, int *found );
PyObject* bpy_text_reimport( PyObject *module, int *found );
void bpy_text_clear_modules( void ); /* Clear user modules */
void bpy_text_clear_modules( int clear_all ); /* Clear user modules */
extern PyMethodDef bpy_import_meth[];
extern PyMethodDef bpy_reload_meth[];