Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UPBGE: Fix deletion of mathutils types in blenderplayer python.
The blenderplayer was not calling explicit initialization of mathutils and other modules and let the user calls the initialization when importing them. But some of the types defined on these modules can be returned by a python function without requering to import the module, for example KX_GameObject.worldPosition return a mathutils.Vector and some scripts don't import mathutils. To solve this issue the initialization of the modules are explicitly called into initPlayerPython by looping over bge_internal_modules and calling PyImport_ImportModuleLevel. It fix a major issue in blenderplayer scripts.
- Loading branch information