diff options
Diffstat (limited to 'source/gameengine/Converter')
-rw-r--r-- | source/gameengine/Converter/BL_BlenderDataConversion.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index 9c59bf78041..1b7bb61fe79 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -1918,16 +1918,20 @@ static KX_GameObject *gameobject_from_blenderobject( KX_BlenderSceneConverter *converter) { KX_GameObject *gameobj = NULL; + Scene *blenderscene = kxscene->GetBlenderScene(); switch(ob->type) { case OB_LAMP: { - KX_LightObject* gamelight= gamelight_from_blamp(ob, static_cast<Lamp*>(ob->data), ob->lay, kxscene, rendertools, converter); + KX_LightObject* gamelight = gamelight_from_blamp(ob, static_cast<Lamp*>(ob->data), ob->lay, kxscene, rendertools, converter); gameobj = gamelight; - gamelight->AddRef(); - kxscene->GetLightList()->Add(gamelight); + if (blenderscene->lay & ob->lay) + { + gamelight->AddRef(); + kxscene->GetLightList()->Add(gamelight); + } break; } |