[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [22936] branches/blender2.5/blender: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r22875 :22935

Campbell Barton ideasman42 at gmail.com
Tue Sep 1 20:49:33 CEST 2009


Revision: 22936
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=22936
Author:   campbellbarton
Date:     2009-09-01 20:49:33 +0200 (Tue, 01 Sep 2009)

Log Message:
-----------
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r22875:22935

Note, missing r22897, schlaile
source/blender/src/hddaudio.c

Modified Paths:
--------------
    branches/blender2.5/blender/release/datafiles/splash.jpg
    branches/blender2.5/blender/source/gameengine/Ketsji/KX_GameObject.cpp
    branches/blender2.5/blender/source/gameengine/Ketsji/KX_PolyProxy.cpp
    branches/blender2.5/blender/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
    branches/blender2.5/blender/source/gameengine/Rasterizer/RAS_MaterialBucket.h
    branches/blender2.5/blender/source/gameengine/Rasterizer/RAS_Polygon.cpp
    branches/blender2.5/blender/source/gameengine/Rasterizer/RAS_Polygon.h

Modified: branches/blender2.5/blender/release/datafiles/splash.jpg
===================================================================
(Binary files differ)

Modified: branches/blender2.5/blender/source/gameengine/Ketsji/KX_GameObject.cpp
===================================================================
--- branches/blender2.5/blender/source/gameengine/Ketsji/KX_GameObject.cpp	2009-09-01 17:31:33 UTC (rev 22935)
+++ branches/blender2.5/blender/source/gameengine/Ketsji/KX_GameObject.cpp	2009-09-01 18:49:33 UTC (rev 22936)
@@ -2716,7 +2716,7 @@
 	char* to = (char *)"";
 	const STR_String& from = GetName();
 
-	if (!PyArg_ParseTuple(args, "s|sss:sendMessage", &subject, &body, &to))
+	if (!PyArg_ParseTuple(args, "s|ss:sendMessage", &subject, &body, &to))
 		return NULL;
 	
 	scene->GetNetworkScene()->SendMessage(to, from, subject, body);

Modified: branches/blender2.5/blender/source/gameengine/Ketsji/KX_PolyProxy.cpp
===================================================================
--- branches/blender2.5/blender/source/gameengine/Ketsji/KX_PolyProxy.cpp	2009-09-01 17:31:33 UTC (rev 22935)
+++ branches/blender2.5/blender/source/gameengine/Ketsji/KX_PolyProxy.cpp	2009-09-01 18:49:33 UTC (rev 22936)
@@ -132,19 +132,19 @@
 	}
 	if (!strcmp(attr_str, "v1"))
 	{
-		return PyLong_FromSsize_t(m_polygon->GetVertexOffset(0));
+		return PyLong_FromSsize_t(m_polygon->GetVertexOffsetAbs(m_mesh, 0));
 	}
 	if (!strcmp(attr_str, "v2"))
 	{
-		return PyLong_FromSsize_t(m_polygon->GetVertexOffset(1));
+		return PyLong_FromSsize_t(m_polygon->GetVertexOffsetAbs(m_mesh, 1));
 	}
 	if (!strcmp(attr_str, "v3"))
 	{
-		return PyLong_FromSsize_t(m_polygon->GetVertexOffset(2));
+		return PyLong_FromSsize_t(m_polygon->GetVertexOffsetAbs(m_mesh, 2));
 	}
 	if (!strcmp(attr_str, "v4"))
 	{
-		return PyLong_FromSsize_t(((m_polygon->VertexCount()>3)?m_polygon->GetVertexOffset(3):0));
+		return PyLong_FromSsize_t(((m_polygon->VertexCount()>3)?m_polygon->GetVertexOffsetAbs(m_mesh, 3):0));
 	}
 	if (!strcmp(attr_str, "visible"))
 	{
@@ -244,7 +244,7 @@
 	}
 	if (index < m_polygon->VertexCount())
 	{
-		return PyLong_FromSsize_t(m_polygon->GetVertexOffset(index));
+		return PyLong_FromSsize_t(m_polygon->GetVertexOffsetAbs(m_mesh, index));
 	}
 	return PyLong_FromSsize_t(0);
 }

Modified: branches/blender2.5/blender/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
===================================================================
--- branches/blender2.5/blender/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp	2009-09-01 17:31:33 UTC (rev 22935)
+++ branches/blender2.5/blender/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp	2009-09-01 18:49:33 UTC (rev 22936)
@@ -1073,7 +1073,7 @@
 				//workaround for incompatibility between 'DYNAMIC' game object, and angular factor
 				//a DYNAMIC object has some inconsistency: it has no angular effect due to collisions, but still has torque
 				const btVector3& angFac = body->getAngularFactor();
-				btVector3 tmpFac(0,0,1);
+				btVector3 tmpFac(1,1,1);
 				body->setAngularFactor(tmpFac);
 				body->applyTorque(torque);
 				body->setAngularFactor(angFac);

Modified: branches/blender2.5/blender/source/gameengine/Rasterizer/RAS_MaterialBucket.h
===================================================================
--- branches/blender2.5/blender/source/gameengine/Rasterizer/RAS_MaterialBucket.h	2009-09-01 17:31:33 UTC (rev 22935)
+++ branches/blender2.5/blender/source/gameengine/Rasterizer/RAS_MaterialBucket.h	2009-09-01 18:49:33 UTC (rev 22936)
@@ -79,8 +79,11 @@
 public:
 	vector<RAS_TexVert> m_vertex;
 	vector<unsigned short> m_index;
+	/* LINE currently isnt used */
 	enum { LINE = 2, TRIANGLE = 3, QUAD = 4 } m_type;
 	//RAS_MeshSlot *m_origSlot;
+	
+	/* Number of RAS_MeshSlot using this array */
 	int m_users;
 
 	enum { BUCKET_MAX_INDEX = 65535 };

Modified: branches/blender2.5/blender/source/gameengine/Rasterizer/RAS_Polygon.cpp
===================================================================
--- branches/blender2.5/blender/source/gameengine/Rasterizer/RAS_Polygon.cpp	2009-09-01 17:31:33 UTC (rev 22935)
+++ branches/blender2.5/blender/source/gameengine/Rasterizer/RAS_Polygon.cpp	2009-09-01 18:49:33 UTC (rev 22936)
@@ -31,6 +31,7 @@
 #endif
 
 #include "RAS_Polygon.h"
+#include "RAS_MeshObject.h" /* only for GetVertexOffsetAbs */
 
 RAS_Polygon::RAS_Polygon(RAS_MaterialBucket* bucket, RAS_DisplayArray *darray, int numvert)
 {
@@ -63,6 +64,20 @@
 	return m_offset[i];
 }
 
+int RAS_Polygon::GetVertexOffsetAbs(RAS_MeshObject *mesh, int i)
+{
+	/* hack that only works because there can only ever be 2 different
+	 * GetDisplayArray's per mesh. if this uses a different display array to the first
+	 * then its incices are offset.
+	 * if support for edges is added back this would need to be changed. */
+	RAS_DisplayArray* darray= mesh->GetPolygon(0)->GetDisplayArray();
+	
+	if(m_darray != darray)
+		return m_offset[i] + darray->m_vertex.size();
+	
+	return m_offset[i];
+}
+
 /*
 int RAS_Polygon::GetEdgeCode()
 {

Modified: branches/blender2.5/blender/source/gameengine/Rasterizer/RAS_Polygon.h
===================================================================
--- branches/blender2.5/blender/source/gameengine/Rasterizer/RAS_Polygon.h	2009-09-01 17:31:33 UTC (rev 22935)
+++ branches/blender2.5/blender/source/gameengine/Rasterizer/RAS_Polygon.h	2009-09-01 18:49:33 UTC (rev 22936)
@@ -72,6 +72,7 @@
 
 	void				SetVertexOffset(int i, unsigned short offset);
 	int					GetVertexOffset(int i);
+	int					GetVertexOffsetAbs(RAS_MeshObject *mesh, int i); /* accounts for quad and tri arrays, slower, for python */
 	
 	// each bit is for a visible edge, starting with bit 1 for the first edge, bit 2 for second etc.
 	// - Not used yet!





More information about the Bf-blender-cvs mailing list