[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [11352] branches/pyapi_devel: merge from trunk

Campbell Barton cbarton at metavr.com
Mon Jul 23 20:01:40 CEST 2007


Revision: 11352
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11352
Author:   campbellbarton
Date:     2007-07-23 20:01:40 +0200 (Mon, 23 Jul 2007)

Log Message:
-----------
merge from trunk
removed deprecated ipo stuff. more constants

Modified Paths:
--------------
    branches/pyapi_devel/extern/bullet2/make/msvc_7_0/Bullet_vc7.vcproj
    branches/pyapi_devel/extern/bullet2/src/SConscript
    branches/pyapi_devel/projectfiles_vc7/blender/nodes/nodes.vcproj
    branches/pyapi_devel/release/scripts/uv_export.py
    branches/pyapi_devel/source/blender/blenkernel/BKE_action.h
    branches/pyapi_devel/source/blender/blenkernel/intern/action.c
    branches/pyapi_devel/source/blender/blenkernel/intern/anim.c
    branches/pyapi_devel/source/blender/blenkernel/intern/constraint.c
    branches/pyapi_devel/source/blender/blenloader/intern/readfile.c
    branches/pyapi_devel/source/blender/blenloader/intern/writefile.c
    branches/pyapi_devel/source/blender/include/butspace.h
    branches/pyapi_devel/source/blender/makesdna/DNA_action_types.h
    branches/pyapi_devel/source/blender/makesdna/DNA_constraint_types.h
    branches/pyapi_devel/source/blender/makesdna/DNA_curve_types.h
    branches/pyapi_devel/source/blender/makesdna/DNA_group_types.h
    branches/pyapi_devel/source/blender/makesdna/DNA_image_types.h
    branches/pyapi_devel/source/blender/makesdna/DNA_ipo_types.h
    branches/pyapi_devel/source/blender/makesdna/DNA_lamp_types.h
    branches/pyapi_devel/source/blender/makesdna/DNA_mesh_types.h
    branches/pyapi_devel/source/blender/makesdna/DNA_meshdata_types.h
    branches/pyapi_devel/source/blender/makesdna/DNA_nla_types.h
    branches/pyapi_devel/source/blender/makesdna/DNA_object_types.h
    branches/pyapi_devel/source/blender/makesdna/DNA_scene_types.h
    branches/pyapi_devel/source/blender/makesdna/DNA_world_types.h
    branches/pyapi_devel/source/blender/nodes/intern/CMP_nodes/CMP_math.c
    branches/pyapi_devel/source/blender/python/api2_2x/Blender.c
    branches/pyapi_devel/source/blender/python/api2_2x/Const.c
    branches/pyapi_devel/source/blender/python/api2_2x/Const.h
    branches/pyapi_devel/source/blender/python/api2_2x/Ipo.c
    branches/pyapi_devel/source/blender/python/api2_2x/Ipo.h
    branches/pyapi_devel/source/blender/python/api2_2x/Key.c
    branches/pyapi_devel/source/blender/python/api2_2x/Key.h
    branches/pyapi_devel/source/blender/python/api2_2x/Lamp.c
    branches/pyapi_devel/source/blender/python/api2_2x/Lamp.h
    branches/pyapi_devel/source/blender/python/api2_2x/Material.c
    branches/pyapi_devel/source/blender/python/api2_2x/Window.c
    branches/pyapi_devel/source/blender/python/api2_2x/bpy_types.c
    branches/pyapi_devel/source/blender/render/intern/source/pipeline.c
    branches/pyapi_devel/source/blender/render/intern/source/rendercore.c
    branches/pyapi_devel/source/blender/render/intern/source/shadeoutput.c
    branches/pyapi_devel/source/blender/render/intern/source/texture.c
    branches/pyapi_devel/source/blender/src/buttons_object.c
    branches/pyapi_devel/source/blender/src/buttons_shading.c
    branches/pyapi_devel/source/blender/src/drawaction.c
    branches/pyapi_devel/source/blender/src/drawview.c
    branches/pyapi_devel/source/blender/src/editaction.c
    branches/pyapi_devel/source/blender/src/editconstraint.c
    branches/pyapi_devel/source/blender/src/editipo.c
    branches/pyapi_devel/source/blender/src/editkey.c
    branches/pyapi_devel/source/blender/src/editobject.c
    branches/pyapi_devel/source/blender/src/header_view3d.c
    branches/pyapi_devel/source/blender/src/transform.c
    branches/pyapi_devel/source/blender/src/transform_conversions.c
    branches/pyapi_devel/source/gameengine/Converter/BL_ActionActuator.cpp
    branches/pyapi_devel/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
    branches/pyapi_devel/source/gameengine/Physics/common/PHY_DynamicTypes.h

Modified: branches/pyapi_devel/extern/bullet2/make/msvc_7_0/Bullet_vc7.vcproj
===================================================================
--- branches/pyapi_devel/extern/bullet2/make/msvc_7_0/Bullet_vc7.vcproj	2007-07-23 15:22:34 UTC (rev 11351)
+++ branches/pyapi_devel/extern/bullet2/make/msvc_7_0/Bullet_vc7.vcproj	2007-07-23 18:01:40 UTC (rev 11352)
@@ -347,6 +347,12 @@
 					Name="ConstraintSolver"
 					Filter="">
 					<File
+						RelativePath="..\..\src\BulletDynamics\ConstraintSolver\btConeTwistConstraint.cpp">
+					</File>
+					<File
+						RelativePath="..\..\src\BulletDynamics\ConstraintSolver\btConeTwistConstraint.h">
+					</File>
+					<File
 						RelativePath="..\..\src\BulletDynamics\ConstraintSolver\btConstraintSolver.h">
 					</File>
 					<File

Modified: branches/pyapi_devel/extern/bullet2/src/SConscript
===================================================================
--- branches/pyapi_devel/extern/bullet2/src/SConscript	2007-07-23 15:22:34 UTC (rev 11351)
+++ branches/pyapi_devel/extern/bullet2/src/SConscript	2007-07-23 18:01:40 UTC (rev 11352)
@@ -29,6 +29,7 @@
                  "BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp",
                  "BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.cpp",
                  "BulletDynamics/ConstraintSolver/btTypedConstraint.cpp",
+                 "BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp",
                  "BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp",
                  "BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp",
                  "BulletDynamics/Dynamics/btRigidBody.cpp",

Modified: branches/pyapi_devel/projectfiles_vc7/blender/nodes/nodes.vcproj
===================================================================
--- branches/pyapi_devel/projectfiles_vc7/blender/nodes/nodes.vcproj	2007-07-23 15:22:34 UTC (rev 11351)
+++ branches/pyapi_devel/projectfiles_vc7/blender/nodes/nodes.vcproj	2007-07-23 18:01:40 UTC (rev 11352)
@@ -294,6 +294,9 @@
 					RelativePath="..\..\..\source\blender\nodes\intern\CMP_nodes\CMP_normal.c">
 				</File>
 				<File
+					RelativePath="..\..\..\source\blender\nodes\intern\CMP_nodes\CMP_normalize.c">
+				</File>
+				<File
 					RelativePath="..\..\..\source\blender\nodes\intern\CMP_nodes\CMP_outputFile.c">
 				</File>
 				<File

Modified: branches/pyapi_devel/release/scripts/uv_export.py
===================================================================
--- branches/pyapi_devel/release/scripts/uv_export.py	2007-07-23 15:22:34 UTC (rev 11351)
+++ branches/pyapi_devel/release/scripts/uv_export.py	2007-07-23 18:01:40 UTC (rev 11352)
@@ -9,7 +9,7 @@
 
 __author__ = "Martin 'theeth' Poirier"
 __url__ = ("http://www.blender.org", "http://blenderartists.org/")
-__version__ = "2.4"
+__version__ = "2.5"
 
 __bpydoc__ = """\
 This script exports the UV face layout of the selected mesh object to
@@ -96,6 +96,11 @@
 #	Version 2.4
 # Port from NMesh to Mesh by Daniel Salazar (zanqdo)
 # --------------------------
+#	Version 2.5
+# Fixed some old off by one rasterizing errors (didn't render points at 1.0 in the UV scale properly).
+# Fixed wire drawing for non 1 wire size (didn't wrap or stretch properly 
+# and would often raise exceptions)
+# --------------------------
 
 
 FullPython = False
@@ -322,7 +327,7 @@
 	
 	step = 0
 
-	img = Buffer(size+1,size+1)
+	img = Buffer(size,size)
 
 	if wrap:
 		wrapSize = size
@@ -333,15 +338,16 @@
 		for f in vList:
 			for v in f:
 				x = int(v[0] * size)
-				maxx = max (x, maxx)
-				minx = min (x, minx)
+				maxx = max (x + wsize - 1, maxx)
+				minx = min (x - wsize + 1, minx)
 				
 				y = int(v[1] * size)
-				maxy = max (y, maxy)
-				miny = min (y, miny)
+				maxy = max (y + wsize - 1, maxy)
+				miny = min (y - wsize + 1, miny)
 		wrapSize = max (maxx - minx + 1, maxy - miny + 1)
 		scale = float (size) / float (wrapSize)
 
+	max_index = size - 1 # max index of the buffer (height or width)
 	fnum = 0
 	fcnt = len (vList)
 
@@ -361,31 +367,31 @@
 			if step:
 				try:
 					for t in xrange(step):
-							x = int(floor((co1[0] + t*(co2[0]-co1[0])/step) * size))
-							y = int(floor((co1[1] + t*(co2[1]-co1[1])/step) * size))
+							x = int(floor((co1[0] + t*(co2[0]-co1[0])/step) * max_index))
+							y = int(floor((co1[1] + t*(co2[1]-co1[1])/step) * max_index))
 		
-							if wrap:
-								x = x % wrapSize
-								y = y % wrapSize
-							else:
-								x = int ((x - minx) * scale)
-								y = int ((y - miny) * scale)
-								
-							co = x * 1 + y * 1 * size;
-							
-							img[co] = 0
-							if wsize > 1:
-								for x in range(-1*wsize + 1,wsize):
-									for y in range(-1*wsize,wsize):
-										img[co + 1 * x + y * 1 * size] = 0
+							for dx in range(-1*wsize + 1, wsize):
+								if wrap:
+									wx = (x + dx) % wrapSize
+								else:
+									wx = int ((x - minx + dx) * scale)
+									
+								for dy in range(-1*wsize + 1, wsize):
+									if wrap:
+										wy = (y + dy) % wrapSize
+									else:
+										wy = int ((y - miny + dy) * scale)
+									
+									co = wx * 1 + wy * 1 * size
+									img[co] = 0
 				except OverflowError:
 					if not extreme_warning:
 						print "Skipping extremely long UV edges, check your layout for excentric values"
 						extreme_warning = True
 		
 		for v in f:
-			x = int(v[0] * size)
-			y = int(v[1] * size)
+			x = int(v[0] * max_index)
+			y = int(v[1] * max_index)
 
 			if wrap:
 				x = x % wrapSize

Modified: branches/pyapi_devel/source/blender/blenkernel/BKE_action.h
===================================================================
--- branches/pyapi_devel/source/blender/blenkernel/BKE_action.h	2007-07-23 15:22:34 UTC (rev 11351)
+++ branches/pyapi_devel/source/blender/blenkernel/BKE_action.h	2007-07-23 18:01:40 UTC (rev 11352)
@@ -153,11 +153,5 @@
 };
 #endif
 
-/* nla strip->mode, for action blending */
-enum	{
-			POSE_BLEND		= 0,
-			POSE_ADD
-};
-
 #endif
 

Modified: branches/pyapi_devel/source/blender/blenkernel/intern/action.c
===================================================================
--- branches/pyapi_devel/source/blender/blenkernel/intern/action.c	2007-07-23 15:22:34 UTC (rev 11351)
+++ branches/pyapi_devel/source/blender/blenkernel/intern/action.c	2007-07-23 18:01:40 UTC (rev 11352)
@@ -458,10 +458,10 @@
 	float dstweight;
 	
 	switch (mode){
-		case POSE_BLEND:
+		case ACTSTRIPMODE_BLEND:
 			dstweight = 1.0F - srcweight;
 			break;
-		case POSE_ADD:
+		case ACTSTRIPMODE_ADD:
 			dstweight = 1.0F;
 			break;
 		default :
@@ -563,10 +563,10 @@
 	int i;
 	
 	switch (mode){
-	case POSE_BLEND:
+	case ACTSTRIPMODE_BLEND:
 		dstweight = 1.0F - srcweight;
 		break;
-	case POSE_ADD:
+	case ACTSTRIPMODE_ADD:
 		dstweight = 1.0F;
 		break;
 	default :
@@ -582,7 +582,7 @@
 			if (schan->flag & POSE_ROT) {
 				QUATCOPY(dquat, dchan->quat);
 				QUATCOPY(squat, schan->quat);
-				if(mode==POSE_BLEND)
+				if(mode==ACTSTRIPMODE_BLEND)
 					QuatInterpol(dchan->quat, dquat, squat, srcweight);
 				else
 					QuatAdd(dchan->quat, dquat, squat, srcweight);
@@ -825,10 +825,10 @@
 	float dstweight;
 	
 	switch (mode){
-		case POSE_BLEND:
+		case ACTSTRIPMODE_BLEND:
 			dstweight = 1.0F - srcweight;
 			break;
-		case POSE_ADD:
+		case ACTSTRIPMODE_ADD:
 			dstweight = 1.0F;
 			break;
 		default :

Modified: branches/pyapi_devel/source/blender/blenkernel/intern/anim.c
===================================================================
--- branches/pyapi_devel/source/blender/blenkernel/intern/anim.c	2007-07-23 15:22:34 UTC (rev 11351)
+++ branches/pyapi_devel/source/blender/blenkernel/intern/anim.c	2007-07-23 18:01:40 UTC (rev 11352)
@@ -384,9 +384,13 @@
 	VECCOPY(obmat[3], vec);
 	
 	if(vdd->par->transflag & OB_DUPLIROT) {
+		if(no_f) {
+			vec[0]= -no_f[0]; vec[1]= -no_f[1]; vec[2]= -no_f[2];
+		}
+		else if(no_s) {
+			vec[0]= -no_s[0]; vec[1]= -no_s[1]; vec[2]= -no_s[2];
+		}
 		
-		vec[0]= -no_f[0]; vec[1]= -no_f[1]; vec[2]= -no_f[2];
-		
 		q2= vectoquat(vec, vdd->ob->trackflag, vdd->ob->upflag);
 		
 		QuatToMat3(q2, mat);

Modified: branches/pyapi_devel/source/blender/blenkernel/intern/constraint.c
===================================================================
--- branches/pyapi_devel/source/blender/blenkernel/intern/constraint.c	2007-07-23 15:22:34 UTC (rev 11351)
+++ branches/pyapi_devel/source/blender/blenkernel/intern/constraint.c	2007-07-23 18:01:40 UTC (rev 11352)
@@ -267,6 +267,12 @@
 			if (data->tar) return 1;
 		}
 		break;
+	case CONSTRAINT_TYPE_TRANSFORM:
+		{
+			bTransformConstraint *data = con->data;
+			if (data->tar) return 1;
+		}
+		break;
 	}
 	
 	/* Unknown types or CONSTRAINT_TYPE_NULL or no target */
@@ -377,6 +383,13 @@
 			return data->tar;
 		}
 		break;
+	case CONSTRAINT_TYPE_TRANSFORM:	
+		{
+			bTransformConstraint *data = con->data;
+			*subtarget= data->subtarget;
+			return data->tar;
+		}
+		break;
 	default:
 		*subtarget= NULL;
 		break;
@@ -484,6 +497,13 @@
 			if (subtarget) BLI_strncpy(data->subtarget, subtarget, 32);
 		}
 			break;
+		case CONSTRAINT_TYPE_TRANSFORM:
+		{
+			bTransformConstraint *data = con->data;
+			data->tar= ob;
+			if (subtarget) BLI_strncpy(data->subtarget, subtarget, 32);
+		}
+			break;
 	}
 }
 
@@ -714,6 +734,18 @@
 			result = data;
 		}
 		break;
+	case CONSTRAINT_TYPE_TRANSFORM:
+		{
+			bTransformConstraint *data;
+			data = MEM_callocN(sizeof(bTransformConstraint), "TransformationConstraint");
+			
+			data->map[0]= 0;
+			data->map[1]= 1;
+			data->map[2]= 2;
+			
+			result = data;
+		}
+		break;
   
    	default:
 		result = NULL;
@@ -786,7 +818,7 @@
 				cob->type = datatype;
 				
 				/* matrix in world-space */
-				Mat4MulMat4 (cob->matrix, cob->pchan->pose_mat, ob->obmat);
+				Mat4MulMat4(cob->matrix, cob->pchan->pose_mat, ob->obmat);
 				Mat4CpyMat4(cob->startmat, cob->matrix);
 			}
 			else
@@ -1504,6 +1536,19 @@
 				Mat4One(mat);
 		}
 		break;
+	case CONSTRAINT_TYPE_TRANSFORM:
+		{
+			bTransformConstraint *data;
+			data= (bTransformConstraint *)con->data;
+			
+			if (data->tar) {
+				constraint_target_to_mat4(data->tar, data->subtarget, mat, CONSTRAINT_SPACE_WORLD, con->tarspace);
+				valid = 1;
+			}
+			else
+				Mat4One(mat);
+		}
+		break;
 
 	default:
 		Mat4One(mat);
@@ -2466,8 +2511,114 @@
 			}
 		}
 		break;
+	case CONSTRAINT_TYPE_TRANSFORM:
+		{
+			bTransformConstraint *data;
+			
+			data = constraint->data;
+			
+			/* only work if there is a target */
+			if (data->tar) {
+				float loc[3], eul[3], size[3];
+				float dvec[3], sval[3];
+				short i;
+				

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list