Commit: fb7281fb6a43629f2624cee9dae2c7ec530a8aad
Author: Porteries Tristan
Date:   Sun Jul 26 18:01:56 2015 +0200
Branches: master
https://developer.blender.org/rBfb7281fb6a43629f2624cee9dae2c7ec530a8aad

Fix T26141: render setting affects only first scene.

===================================================================

M       source/gameengine/Ketsji/KX_PythonInit.cpp

===================================================================

diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp 
b/source/gameengine/Ketsji/KX_PythonInit.cpp
index b7ca624..95b92a2 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();
                                }
+                       }
                }
        }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to