[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [33170] trunk/blender/source/gameengine/ Ketsji/KX_Scene.cpp: Fixing a crash when dynamically loading a scene that contains a bone parent .

Mitchell Stokes mogurijin at gmail.com
Fri Nov 19 05:06:07 CET 2010


Revision: 33170
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=33170
Author:   moguri
Date:     2010-11-19 05:06:06 +0100 (Fri, 19 Nov 2010)

Log Message:
-----------
Fixing a crash when dynamically loading a scene that contains a bone parent.

Modified Paths:
--------------
    trunk/blender/source/gameengine/Ketsji/KX_Scene.cpp

Modified: trunk/blender/source/gameengine/Ketsji/KX_Scene.cpp
===================================================================
--- trunk/blender/source/gameengine/Ketsji/KX_Scene.cpp	2010-11-19 03:45:45 UTC (rev 33169)
+++ trunk/blender/source/gameengine/Ketsji/KX_Scene.cpp	2010-11-19 04:06:06 UTC (rev 33170)
@@ -1722,6 +1722,11 @@
 	if(sg) {
 		if(sg->GetSGClientInfo() == from) {
 			sg->SetSGClientInfo(to);
+
+			/* Make sure to grab the children too since they might not be tied to a game object */
+			NodeList children = sg->GetSGChildren();
+			for (int i=0; i<children.size(); i++)
+					children[i]->SetSGClientInfo(to);
 		}
 #ifdef USE_BULLET
 		SGControllerList::iterator contit;





More information about the Bf-blender-cvs mailing list