[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [20503] trunk/blender/source/gameengine/ Converter/BL_BlenderDataConversion.cpp: BGE: small performance problem: object set invisible at startup were still put in the DBVT, causing unnecessary culling.

Benoit Bolsee benoit.bolsee at online.be
Fri May 29 19:09:20 CEST 2009


Revision: 20503
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20503
Author:   ben2610
Date:     2009-05-29 19:09:20 +0200 (Fri, 29 May 2009)

Log Message:
-----------
BGE: small performance problem: object set invisible at startup were still put in the DBVT, causing unnecessary culling.

Modified Paths:
--------------
    trunk/blender/source/gameengine/Converter/BL_BlenderDataConversion.cpp

Modified: trunk/blender/source/gameengine/Converter/BL_BlenderDataConversion.cpp
===================================================================
--- trunk/blender/source/gameengine/Converter/BL_BlenderDataConversion.cpp	2009-05-29 16:55:22 UTC (rev 20502)
+++ trunk/blender/source/gameengine/Converter/BL_BlenderDataConversion.cpp	2009-05-29 17:09:20 UTC (rev 20503)
@@ -1338,8 +1338,9 @@
 				ctrl->setNewClientInfo(gameobj->getClientInfo());
 				ctrl->setLocalAabb(localAabbMin, localAabbMax);
 				if (isActive) {
-					// add first, this will create the proxy handle
-					env->addCcdGraphicController(ctrl);
+					// add first, this will create the proxy handle, only if the object is visible
+					if (gameobj->GetVisible())
+						env->addCcdGraphicController(ctrl);
 					// update the mesh if there is a deformer, this will also update the bounding box for modifiers
 					RAS_Deformer* deformer = gameobj->GetDeformer();
 					if (deformer)





More information about the Bf-blender-cvs mailing list