Fix T26141: render setting affects only first scene.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user