diff options
author | Porteries Tristan <republicthunderbolt9@gmail.com> | 2015-07-26 19:01:56 +0300 |
---|---|---|
committer | Porteries Tristan <republicthunderbolt9@gmail.com> | 2015-07-26 19:01:56 +0300 |
commit | fb7281fb6a43629f2624cee9dae2c7ec530a8aad (patch) | |
tree | dd4e0fdd6cb67c6b1d2f32f60b52672638fcd2c2 /source | |
parent | c27a1cfd637827a3d802707262697fbb64aeb03f (diff) |
Fix T26141: render setting affects only first scene.
Diffstat (limited to 'source')
-rw-r--r-- | source/gameengine/Ketsji/KX_PythonInit.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp index b7ca6248079..95b92a223c5 100644 --- a/source/gameengine/Ketsji/KX_PythonInit.cpp +++ b/source/gameengine/Ketsji/KX_PythonInit.cpp @@ -1138,10 +1138,6 @@ static PyObject *gPySetGLSLMaterialSetting(PyObject *, else gs->glslflag |= flag; - /* temporarily store the glsl settings in the scene for the GLSL materials */ - GameData *gm= &(gp_KetsjiScene->GetBlenderScene()->gm); - gm->flag = gs->glslflag; - /* display lists and GLSL materials need to be remade */ if (sceneflag != gs->glslflag) { GPU_materials_free(); @@ -1149,11 +1145,14 @@ static PyObject *gPySetGLSLMaterialSetting(PyObject *, KX_SceneList *scenes = gp_KetsjiEngine->CurrentScenes(); KX_SceneList::iterator it; - for (it=scenes->begin(); it!=scenes->end(); it++) + for (it=scenes->begin(); it!=scenes->end(); it++) { + // temporarily store the glsl settings in the scene for the GLSL materials + (*it)->GetBlenderScene()->gm.flag = gs->glslflag; if ((*it)->GetBucketManager()) { (*it)->GetBucketManager()->ReleaseDisplayLists(); (*it)->GetBucketManager()->ReleaseMaterials(); } + } } } |