[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [22206] branches/blender2.5/blender/source /gameengine: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/ blender -r22130:22205

Campbell Barton ideasman42 at gmail.com
Tue Aug 4 07:34:21 CEST 2009


Revision: 22206
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=22206
Author:   campbellbarton
Date:     2009-08-04 07:34:21 +0200 (Tue, 04 Aug 2009)

Log Message:
-----------
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r22130:22205

Modified Paths:
--------------
    branches/blender2.5/blender/source/gameengine/Converter/BL_BlenderDataConversion.cpp
    branches/blender2.5/blender/source/gameengine/Ketsji/KX_ConstraintActuator.cpp
    branches/blender2.5/blender/source/gameengine/Ketsji/KX_GameObject.cpp
    branches/blender2.5/blender/source/gameengine/Ketsji/KX_GameObject.h
    branches/blender2.5/blender/source/gameengine/Ketsji/KX_Scene.cpp
    branches/blender2.5/blender/source/gameengine/Ketsji/KX_Scene.h
    branches/blender2.5/blender/source/gameengine/Rasterizer/RAS_BucketManager.cpp

Modified: branches/blender2.5/blender/source/gameengine/Converter/BL_BlenderDataConversion.cpp
===================================================================
--- branches/blender2.5/blender/source/gameengine/Converter/BL_BlenderDataConversion.cpp	2009-08-04 05:14:10 UTC (rev 22205)
+++ branches/blender2.5/blender/source/gameengine/Converter/BL_BlenderDataConversion.cpp	2009-08-04 05:34:21 UTC (rev 22206)
@@ -1794,7 +1794,6 @@
 	}
 	if (gameobj) 
 	{
-		gameobj->SetPhysicsEnvironment(kxscene->GetPhysicsEnvironment());
 		gameobj->SetLayer(ob->lay);
 		gameobj->SetBlenderObject(ob);
 		/* set the visibility state based on the objects render option in the outliner */

Modified: branches/blender2.5/blender/source/gameengine/Ketsji/KX_ConstraintActuator.cpp
===================================================================
--- branches/blender2.5/blender/source/gameengine/Ketsji/KX_ConstraintActuator.cpp	2009-08-04 05:14:10 UTC (rev 22205)
+++ branches/blender2.5/blender/source/gameengine/Ketsji/KX_ConstraintActuator.cpp	2009-08-04 05:34:21 UTC (rev 22206)
@@ -36,6 +36,7 @@
 #include "MT_Matrix3x3.h"
 #include "KX_GameObject.h"
 #include "KX_RayCast.h"
+#include "KX_PythonInit.h" // KX_GetActiveScene
 
 #ifdef HAVE_CONFIG_H
 #include <config.h>
@@ -327,7 +328,7 @@
 			}
 			{
 				MT_Point3 topoint = position + (m_maximumBound) * direction;
-				PHY_IPhysicsEnvironment* pe = obj->GetPhysicsEnvironment();
+				PHY_IPhysicsEnvironment* pe = KX_GetActiveScene()->GetPhysicsEnvironment();
 				KX_IPhysicsController *spc = obj->GetPhysicsController();
 
 				if (!pe) {
@@ -440,7 +441,7 @@
 			}
 			normal.normalize();
 			{
-				PHY_IPhysicsEnvironment* pe = obj->GetPhysicsEnvironment();
+				PHY_IPhysicsEnvironment* pe = KX_GetActiveScene()->GetPhysicsEnvironment();
 				KX_IPhysicsController *spc = obj->GetPhysicsController();
 
 				if (!pe) {

Modified: branches/blender2.5/blender/source/gameengine/Ketsji/KX_GameObject.cpp
===================================================================
--- branches/blender2.5/blender/source/gameengine/Ketsji/KX_GameObject.cpp	2009-08-04 05:14:10 UTC (rev 22205)
+++ branches/blender2.5/blender/source/gameengine/Ketsji/KX_GameObject.cpp	2009-08-04 05:34:21 UTC (rev 22206)
@@ -101,7 +101,6 @@
 	m_bOccluder(false),
 	m_pPhysicsController1(NULL),
 	m_pGraphicController(NULL),
-	m_pPhysicsEnvironment(NULL),
 	m_xray(false),
 	m_pHitObject(NULL),
 	m_isDeformable(false),
@@ -2693,8 +2692,7 @@
 		toDir.normalize();
 		toPoint = fromPoint + (dist) * toDir;
 	}
-
-	PHY_IPhysicsEnvironment* pe = GetPhysicsEnvironment();
+	PHY_IPhysicsEnvironment* pe = KX_GetActiveScene()->GetPhysicsEnvironment();
 	KX_IPhysicsController *spc = GetPhysicsController();
 	KX_GameObject *parent = GetParent();
 	if (!spc && parent)
@@ -2821,7 +2819,7 @@
 		return none_tuple_3();
 	}
 	
-	PHY_IPhysicsEnvironment* pe = GetPhysicsEnvironment();
+	PHY_IPhysicsEnvironment* pe = KX_GetActiveScene()->GetPhysicsEnvironment();
 	KX_IPhysicsController *spc = GetPhysicsController();
 	KX_GameObject *parent = GetParent();
 	if (!spc && parent)

Modified: branches/blender2.5/blender/source/gameengine/Ketsji/KX_GameObject.h
===================================================================
--- branches/blender2.5/blender/source/gameengine/Ketsji/KX_GameObject.h	2009-08-04 05:14:10 UTC (rev 22205)
+++ branches/blender2.5/blender/source/gameengine/Ketsji/KX_GameObject.h	2009-08-04 05:34:21 UTC (rev 22206)
@@ -98,8 +98,6 @@
 
 	KX_IPhysicsController*				m_pPhysicsController1;
 	PHY_IGraphicController*				m_pGraphicController;
-	// used for ray casting
-	PHY_IPhysicsEnvironment*			m_pPhysicsEnvironment;
 	STR_String							m_testPropName;
 	bool								m_xray;
 	KX_GameObject*						m_pHitObject;
@@ -337,21 +335,7 @@
 		bool ang_vel_local
 	);
 
-
 	/**
-	 * @return a pointer to the physics environment in use during the game, for rayCasting
-	 */
-	PHY_IPhysicsEnvironment* GetPhysicsEnvironment()
-	{
-		return m_pPhysicsEnvironment;
-	}
-
-	void SetPhysicsEnvironment(PHY_IPhysicsEnvironment* physicsEnvironment)
-	{
-		m_pPhysicsEnvironment = physicsEnvironment;
-	}
-
-	/**
 	 * @return a pointer to the physics controller owned by this class.
 	 */
 

Modified: branches/blender2.5/blender/source/gameengine/Ketsji/KX_Scene.cpp
===================================================================
--- branches/blender2.5/blender/source/gameengine/Ketsji/KX_Scene.cpp	2009-08-04 05:14:10 UTC (rev 22205)
+++ branches/blender2.5/blender/source/gameengine/Ketsji/KX_Scene.cpp	2009-08-04 05:34:21 UTC (rev 22206)
@@ -1579,11 +1579,6 @@
 	GetPhysicsEnvironment()->setGravity(gravity[0],gravity[1],gravity[2]);
 }
 
-void KX_Scene::SetNodeTree(SG_Tree* root)
-{
-	m_objecttree = root;
-}
-
 void KX_Scene::SetSceneConverter(class KX_BlenderSceneConverter* sceneConverter)
 {
 	m_sceneConverter = sceneConverter;

Modified: branches/blender2.5/blender/source/gameengine/Ketsji/KX_Scene.h
===================================================================
--- branches/blender2.5/blender/source/gameengine/Ketsji/KX_Scene.h	2009-08-04 05:14:10 UTC (rev 22205)
+++ branches/blender2.5/blender/source/gameengine/Ketsji/KX_Scene.h	2009-08-04 05:34:21 UTC (rev 22206)
@@ -119,10 +119,6 @@
 										// the Qlist is for objects that needs to be rescheduled
 										// for updates after udpate is over (slow parent, bone parent)
 
-	/**
-	 *  The tree of objects in the scene.
-	 */
-	SG_Tree*			m_objecttree;
 
 	/**
 	 * The set of cameras for this scene

Modified: branches/blender2.5/blender/source/gameengine/Rasterizer/RAS_BucketManager.cpp
===================================================================
--- branches/blender2.5/blender/source/gameengine/Rasterizer/RAS_BucketManager.cpp	2009-08-04 05:14:10 UTC (rev 22205)
+++ branches/blender2.5/blender/source/gameengine/Rasterizer/RAS_BucketManager.cpp	2009-08-04 05:34:21 UTC (rev 22206)
@@ -126,10 +126,7 @@
 		RAS_MaterialBucket* bucket = *bit;
 		RAS_MeshSlot* ms;
 		// remove the mesh slot form the list, it culls them automatically for next frame
-		for(ms = bucket->GetNextActiveMeshSlot();
-			ms!= NULL;
-			ms = bucket->GetNextActiveMeshSlot())
-		{
+		while((ms = bucket->GetNextActiveMeshSlot())) {
 			slots[i++].set(ms, bucket, pnorm);
 		}
 	}
@@ -179,9 +176,7 @@
 		RAS_MaterialBucket* bucket = *bit;
 		RAS_MeshSlot* ms;
 		// remove the mesh slot form the list, it culls them automatically for next frame
-		for(ms = bucket->GetNextActiveMeshSlot();
-			ms!= NULL;
-			ms = bucket->GetNextActiveMeshSlot())
+		while((ms = bucket->GetNextActiveMeshSlot()))
 		{
 			rendertools->SetClientObject(rasty, ms->m_clientObj);
 			while (bucket->ActivateMaterial(cameratrans, rasty, rendertools))





More information about the Bf-blender-cvs mailing list