-
-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UPBGE: Cleanup python initialization.
Previously python was created and initialized the same way for the blenderplayer through the function setupGamePython. This caused that when reloading the launcher because of game reload (same file or other file) we had to take care to not call anything related to python, and the management of the global dict in blenderplayer was harder. Because of this difficulties the global dict wasn't shared between game reload contrary to the shared behaviour in embedded player. To solve this issue the python initialization and module initialization is split in two functions: initPlayerPython for constructing python and initGamePython to initialize a context with all the modules and the previous global dict. In the same time the prefix bpy_ is removed in BL_BlenderConverter, and python joysticks, keyboard and mouse are now using std::unique_ptr in KX_PythonInit.cpp.
- Loading branch information
1 parent
77464fb
commit c83d50e
Showing
12 changed files
with
97 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.