[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [27380] trunk/blender/source/gameengine/ Ketsji: [#21261] Bugfix for dynamically loaded scenes' lights not mixing in multitexture
Campbell Barton
ideasman42 at gmail.com
Wed Mar 10 08:41:16 CET 2010
Revision: 27380
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=27380
Author: campbellbarton
Date: 2010-03-10 08:41:16 +0100 (Wed, 10 Mar 2010)
Log Message:
-----------
[#21261] Bugfix for dynamically loaded scenes' lights not mixing in multitexture
from Mitchell Stokes (moguri)
Modified Paths:
--------------
trunk/blender/source/gameengine/Ketsji/KX_Light.h
trunk/blender/source/gameengine/Ketsji/KX_Scene.cpp
Modified: trunk/blender/source/gameengine/Ketsji/KX_Light.h
===================================================================
--- trunk/blender/source/gameengine/Ketsji/KX_Light.h 2010-03-10 05:57:03 UTC (rev 27379)
+++ trunk/blender/source/gameengine/Ketsji/KX_Light.h 2010-03-10 07:41:16 UTC (rev 27380)
@@ -65,6 +65,8 @@
void UnbindShadowBuffer(class RAS_IRasterizer *ras);
void Update();
+ void UpdateScene(class KX_Scene *kxscene) {m_lightobj.m_scene = (void*)kxscene;}
+
virtual int GetGameObjectType() { return OBJ_LIGHT; }
#ifndef DISABLE_PYTHON
Modified: trunk/blender/source/gameengine/Ketsji/KX_Scene.cpp
===================================================================
--- trunk/blender/source/gameengine/Ketsji/KX_Scene.cpp 2010-03-10 05:57:03 UTC (rev 27379)
+++ trunk/blender/source/gameengine/Ketsji/KX_Scene.cpp 2010-03-10 07:41:16 UTC (rev 27380)
@@ -1754,6 +1754,9 @@
phys_ctrl->SetPhysicsEnvironment(to->GetPhysicsEnvironment());
}
}
+ /* If the object is a light, update it's scene */
+ if (gameobj->GetGameObjectType() == SCA_IObject::OBJ_LIGHT)
+ ((KX_LightObject*)gameobj)->UpdateScene(to);
/* Add the object to the scene's logic manager */
to->GetLogicManager()->RegisterGameObjectName(gameobj->GetName(), gameobj);
More information about the Bf-blender-cvs
mailing list