Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPorteries Tristan <republicthunderbolt9@gmail.com>2015-08-23 15:30:44 +0300
committerPorteries Tristan <republicthunderbolt9@gmail.com>2015-08-23 15:34:04 +0300
commit8444f7ba2b2bbcc465b4890e2fe4d473181c0ef1 (patch)
treedc08cb1215704ad9e0f50f44560730a4168caa77 /source/gameengine/BlenderRoutines
parent2672ee77a0f9b3334ccd348ff3618b8df98798b6 (diff)
BGE: Fix T42679: Python physics environment not setted for python control script.
Diffstat (limited to 'source/gameengine/BlenderRoutines')
-rw-r--r--source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
index 4e07af9f3d8..41011cdee38 100644
--- a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
+++ b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
@@ -544,6 +544,10 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c
if (python_main) {
char *python_code = KX_GetPythonCode(blenderdata, python_main);
if (python_code) {
+ // Set python environement variable.
+ KX_SetActiveScene(startscene);
+ PHY_SetActiveEnvironment(startscene->GetPhysicsEnvironment());
+
ketsjinextframestate.ketsjiengine = ketsjiengine;
ketsjinextframestate.C = C;
ketsjinextframestate.win = win;