[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15774] branches/apricot/source: svn merge -r15731:HEAD https://svn.blender.org/svnroot/bf-blender/trunk/ blender

Campbell Barton ideasman42 at gmail.com
Sat Jul 26 06:36:09 CEST 2008


Revision: 15774
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15774
Author:   campbellbarton
Date:     2008-07-26 06:36:09 +0200 (Sat, 26 Jul 2008)

Log Message:
-----------
svn merge -r15731:HEAD https://svn.blender.org/svnroot/bf-blender/trunk/blender

Modified Paths:
--------------
    branches/apricot/source/blender/blenkernel/BKE_idprop.h
    branches/apricot/source/blender/blenkernel/bad_level_call_stubs/stubs.c
    branches/apricot/source/blender/blenkernel/intern/constraint.c
    branches/apricot/source/blender/blenkernel/intern/idprop.c
    branches/apricot/source/blender/blenkernel/intern/softbody.c
    branches/apricot/source/blender/blenlib/intern/arithb.c
    branches/apricot/source/blender/blenloader/intern/readfile.c
    branches/apricot/source/blender/blenloader/intern/writefile.c
    branches/apricot/source/blender/include/BDR_gpencil.h
    branches/apricot/source/blender/makesdna/DNA_ID.h
    branches/apricot/source/blender/makesdna/DNA_gpencil_types.h
    branches/apricot/source/blender/nodes/intern/SHD_nodes/SHD_material.c
    branches/apricot/source/blender/nodes/intern/SHD_util.c
    branches/apricot/source/blender/nodes/intern/SHD_util.h
    branches/apricot/source/blender/python/BPY_interface.c
    branches/apricot/source/blender/python/api2_2x/IDProp.c
    branches/apricot/source/blender/python/api2_2x/doc/IDProp.py
    branches/apricot/source/blender/python/api2_2x/sceneRender.c
    branches/apricot/source/blender/src/drawaction.c
    branches/apricot/source/blender/src/drawgpencil.c
    branches/apricot/source/blender/src/editnode.c
    branches/apricot/source/blender/src/gpencil.c
    branches/apricot/source/blender/src/interface_draw.c
    branches/apricot/source/blender/src/space.c
    branches/apricot/source/gameengine/Converter/BL_BlenderDataConversion.cpp
    branches/apricot/source/gameengine/Converter/KX_IpoConvert.cpp
    branches/apricot/source/gameengine/Converter/KX_IpoConvert.h
    branches/apricot/source/gameengine/Ketsji/KX_GameObject.cpp
    branches/apricot/source/gameengine/Ketsji/KX_GameObject.h
    branches/apricot/source/gameengine/Ketsji/KX_MaterialIpoController.cpp
    branches/apricot/source/gameengine/Ketsji/KX_MaterialIpoController.h
    branches/apricot/source/gameengine/Ketsji/KX_PyMath.h
    branches/apricot/source/gameengine/Ketsji/KX_TrackToActuator.cpp
    branches/apricot/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp
    branches/apricot/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h
    branches/apricot/source/gameengine/Rasterizer/RAS_MeshObject.cpp
    branches/apricot/source/gameengine/Rasterizer/RAS_MeshObject.h

Modified: branches/apricot/source/blender/blenkernel/BKE_idprop.h
===================================================================
--- branches/apricot/source/blender/blenkernel/BKE_idprop.h	2008-07-26 02:33:21 UTC (rev 15773)
+++ branches/apricot/source/blender/blenkernel/BKE_idprop.h	2008-07-26 04:36:09 UTC (rev 15774)
@@ -46,6 +46,7 @@
 typedef union {
 	int i;
 	float f;
+	double d;
 	char *str;
 	struct ID *id;
 	struct {

Modified: branches/apricot/source/blender/blenkernel/bad_level_call_stubs/stubs.c
===================================================================
--- branches/apricot/source/blender/blenkernel/bad_level_call_stubs/stubs.c	2008-07-26 02:33:21 UTC (rev 15773)
+++ branches/apricot/source/blender/blenkernel/bad_level_call_stubs/stubs.c	2008-07-26 04:36:09 UTC (rev 15774)
@@ -1,4 +1,3 @@
-
 /**
  * $Id$
  *
@@ -352,6 +351,8 @@
 /* editseq.c */
 Sequence *get_forground_frame_seq(int frame){return 0;};
 void set_last_seq(Sequence *seq){};
+void clear_last_seq(Sequence *seq){};
+    
 
 /* modifier.c stub */
 void harmonic_coordinates_bind(struct MeshDeformModifierData *mmd,

Modified: branches/apricot/source/blender/blenkernel/intern/constraint.c
===================================================================
--- branches/apricot/source/blender/blenkernel/intern/constraint.c	2008-07-26 02:33:21 UTC (rev 15773)
+++ branches/apricot/source/blender/blenkernel/intern/constraint.c	2008-07-26 04:36:09 UTC (rev 15774)
@@ -558,8 +558,8 @@
 	if (dgroup < 0) return;
 	
 	/* get DerivedMesh */
-	if (G.obedit && G.editMesh) {
-		/* we are in editmode, so get a special derived mesh */
+	if ((G.obedit == ob) && (G.editMesh)) {
+		/* target is in editmode, so get a special derived mesh */
 		dm = CDDM_from_editmesh(G.editMesh, ob->data);
 	}
 	else {

Modified: branches/apricot/source/blender/blenkernel/intern/idprop.c
===================================================================
--- branches/apricot/source/blender/blenkernel/intern/idprop.c	2008-07-26 02:33:21 UTC (rev 15773)
+++ branches/apricot/source/blender/blenkernel/intern/idprop.c	2008-07-26 04:36:09 UTC (rev 15774)
@@ -54,7 +54,8 @@
 	sizeof(float)*16, /*Matrix type, deprecated*/
 	0, /*arrays don't have a fixed size*/
 	sizeof(ListBase), /*Group type*/
-	sizeof(void*)
+	sizeof(void*),
+	sizeof(double)
 };
 
 
@@ -365,10 +366,14 @@
 			prop = MEM_callocN(sizeof(IDProperty), "IDProperty float");
 			*(float*)&prop->data.val = val.f;
 			break;
+		case IDP_DOUBLE:
+			prop = MEM_callocN(sizeof(IDProperty), "IDProperty float");
+			*(double*)&prop->data.val = val.d;
+			break;		
 		case IDP_ARRAY:
 		{
-			/*for now, we only support float and int arrays*/
-			if (val.array.type == IDP_FLOAT || val.array.type == IDP_INT) {
+			/*for now, we only support float and int and double arrays*/
+			if (val.array.type == IDP_FLOAT || val.array.type == IDP_INT || val.array.type == IDP_DOUBLE) {
 				prop = MEM_callocN(sizeof(IDProperty), "IDProperty array");
 				prop->len = prop->totallen = val.array.len;
 				prop->subtype = val.array.type;
@@ -411,6 +416,10 @@
 
 	prop->type = type;
 	strncpy(prop->name, name, MAX_IDPROP_NAME);
+	
+	/*security null byte*/
+	prop->name[MAX_IDPROP_NAME-1] = 0;
+	
 	return prop;
 }
 

Modified: branches/apricot/source/blender/blenkernel/intern/softbody.c
===================================================================
--- branches/apricot/source/blender/blenkernel/intern/softbody.c	2008-07-26 02:33:21 UTC (rev 15773)
+++ branches/apricot/source/blender/blenkernel/intern/softbody.c	2008-07-26 04:36:09 UTC (rev 15774)
@@ -2053,7 +2053,6 @@
 	
 	/* check conditions for various options */
 	do_deflector= query_external_colliders(ob);
-	do_effector= pdInitEffectors(ob,NULL);
 	do_selfcollision=((ob->softflag & OB_SB_EDGES) && (sb->bspring)&& (ob->softflag & OB_SB_SELF));
 	do_springcollision=do_deflector && (ob->softflag & OB_SB_EDGES) &&(ob->softflag & OB_SB_EDGECOLL);
 	do_aero=((sb->aeroedge)&& (ob->softflag & OB_SB_EDGES));
@@ -2061,9 +2060,10 @@
 	iks  = 1.0f/(1.0f-sb->inspring)-1.0f ;/* inner spring constants function */
 	bproot= sb->bpoint; /* need this for proper spring addressing */
 	
+	if (do_springcollision || do_aero)  scan_for_ext_spring_forces(ob,timenow);
+	/* after spring scan because it uses Effoctors too */
+	do_effector= pdInitEffectors(ob,NULL);
 
-	
-	if (do_springcollision || do_aero)  scan_for_ext_spring_forces(ob,timenow);
 	if (do_deflector) {
 		float defforce[3];
 		do_deflector = sb_detect_aabb_collisionCached(defforce,ob->lay,ob,timenow);

Modified: branches/apricot/source/blender/blenlib/intern/arithb.c
===================================================================
--- branches/apricot/source/blender/blenlib/intern/arithb.c	2008-07-26 02:33:21 UTC (rev 15773)
+++ branches/apricot/source/blender/blenlib/intern/arithb.c	2008-07-26 04:36:09 UTC (rev 15774)
@@ -2544,11 +2544,6 @@
 }
 
 
-
-			/* copied from Geometry.c - todo - move to arithb.c or some other generic place we can reuse */
-#define SIDE_OF_LINE(pa,pb,pp)	((pa[0]-pp[0])*(pb[1]-pp[1]))-((pb[0]-pp[0])*(pa[1]-pp[1]))
-#define POINT_IN_TRI(p0,p1,p2,p3)	((SIDE_OF_LINE(p1,p2,p0)>=0) && (SIDE_OF_LINE(p2,p3,p0)>=0) && (SIDE_OF_LINE(p3,p1,p0)>=0))
-
 /**
  * 
  * @param min 

Modified: branches/apricot/source/blender/blenloader/intern/readfile.c
===================================================================
--- branches/apricot/source/blender/blenloader/intern/readfile.c	2008-07-26 02:33:21 UTC (rev 15773)
+++ branches/apricot/source/blender/blenloader/intern/readfile.c	2008-07-26 04:36:09 UTC (rev 15774)
@@ -1356,8 +1356,14 @@
 	prop->data.pointer = newdataadr(fd, prop->data.pointer);
 
 	if (switch_endian) {
-		for (i=0; i<prop->len; i++) {
-			SWITCH_INT(((int*)prop->data.pointer)[i]);
+		if (prop->subtype != IDP_DOUBLE) {
+			for (i=0; i<prop->len; i++) {
+				SWITCH_INT(((int*)prop->data.pointer)[i]);
+			}
+		} else {
+			for (i=0; i<prop->len; i++) {
+				SWITCH_LONGINT(((double*)prop->data.pointer)[i]);
+			}
 		}
 	}
 }
@@ -1394,6 +1400,24 @@
 		case IDP_ARRAY:
 			IDP_DirectLinkArray(prop, switch_endian, fd);
 			break;
+		case IDP_DOUBLE:
+			/*erg, stupid doubles.  since I'm storing them
+			 in the same field as int val; val2 in the
+			 IDPropertyData struct, they have to deal with
+			 endianness specifically
+			 
+			 in theory, val and val2 would've already been swapped
+			 if switch_endian is true, so we have to first unswap
+			 them then reswap them as a single 64-bit entity.
+			 */
+			
+			if (switch_endian) {
+				SWITCH_INT(prop->data.val);
+				SWITCH_INT(prop->data.val2);
+				SWITCH_LONGINT(prop->data.val);
+			}
+			
+			break;
 	}
 }
 

Modified: branches/apricot/source/blender/blenloader/intern/writefile.c
===================================================================
--- branches/apricot/source/blender/blenloader/intern/writefile.c	2008-07-26 02:33:21 UTC (rev 15773)
+++ branches/apricot/source/blender/blenloader/intern/writefile.c	2008-07-26 04:36:09 UTC (rev 15774)
@@ -533,6 +533,7 @@
 		if(part->id.us>0 || wd->current) {
 			/* write LibData */
 			writestruct(wd, ID_PA, "ParticleSettings", 1, part);
+			if (part->id.properties) IDP_WriteProperty(part->id.properties, wd);
 			writestruct(wd, DATA, "PartDeflect", 1, part->pd);
 		}
 		part= part->id.next;

Modified: branches/apricot/source/blender/include/BDR_gpencil.h
===================================================================
--- branches/apricot/source/blender/include/BDR_gpencil.h	2008-07-26 02:33:21 UTC (rev 15773)
+++ branches/apricot/source/blender/include/BDR_gpencil.h	2008-07-26 04:36:09 UTC (rev 15774)
@@ -69,6 +69,6 @@
 void gpencil_delete_menu(void);
 
 //short gpencil_paint(short mousebutton);
-short gpencil_do_paint(struct ScrArea *sa);
+short gpencil_do_paint(struct ScrArea *sa, short mousebutton);
 
 #endif /*  BDR_GPENCIL_H */

Modified: branches/apricot/source/blender/makesdna/DNA_ID.h
===================================================================
--- branches/apricot/source/blender/makesdna/DNA_ID.h	2008-07-26 02:33:21 UTC (rev 15773)
+++ branches/apricot/source/blender/makesdna/DNA_ID.h	2008-07-26 04:36:09 UTC (rev 15774)
@@ -46,7 +46,7 @@
 typedef struct IDPropertyData {
 	void *pointer;
 	ListBase group;
-	int val, pad;
+	int val, val2; /*note, we actually fit a double into these two ints*/
 } IDPropertyData;
 
 typedef struct IDProperty {
@@ -77,6 +77,7 @@
 /*the ID link property type hasn't been implemented yet, this will require
   some cleanup of blenkernel, most likely.*/
 #define IDP_ID		7
+#define IDP_DOUBLE	8
 
 /*add any future new id property types here.*/
 

Modified: branches/apricot/source/blender/makesdna/DNA_gpencil_types.h
===================================================================
--- branches/apricot/source/blender/makesdna/DNA_gpencil_types.h	2008-07-26 02:33:21 UTC (rev 15773)
+++ branches/apricot/source/blender/makesdna/DNA_gpencil_types.h	2008-07-26 04:36:09 UTC (rev 15774)
@@ -59,6 +59,8 @@
 #define GP_STROKE_3DSPACE		(1<<0)
 	/* stroke is in 2d-space */
 #define GP_STROKE_2DSPACE		(1<<1)
+	/* stroke is an "eraser" stroke */
+#define GP_STROKE_ERASER		(1<<2)
 
 
 /* Grease-Pencil Annotations - 'Frame'
@@ -127,12 +129,12 @@
 } bGPdata;
 
 /* bGPdata->flag */
-	/* draw this datablock's data (not used) */
-#define GP_DATA_DISP		(1<<0)
+	/* don't allow painting to occur at all */
+#define GP_DATA_LMBPLOCK	(1<<0)
 	/* show debugging info in viewport (i.e. status print) */
 #define GP_DATA_DISPINFO	(1<<1)
 	/* in Action Editor, show as expanded channel */
-#define GP_DATA_EXPAND	(1<<2)
+#define GP_DATA_EXPAND		(1<<2)
 	/* is the block overriding all clicks? */
 #define GP_DATA_EDITPAINT	(1<<3)
 	/* new strokes are added in viewport space */

Modified: branches/apricot/source/blender/nodes/intern/SHD_nodes/SHD_material.c
===================================================================
--- branches/apricot/source/blender/nodes/intern/SHD_nodes/SHD_material.c	2008-07-26 02:33:21 UTC (rev 15773)
+++ branches/apricot/source/blender/nodes/intern/SHD_nodes/SHD_material.c	2008-07-26 04:36:09 UTC (rev 15774)
@@ -54,7 +54,6 @@
 	{	SOCK_VALUE, 1, "Refl",		0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
 	{	SOCK_VECTOR, 1, "Normal",	0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f},
 	{	SOCK_RGBA, 1, "Mirror",		0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
-	{	SOCK_RGBA, 1, "AmbCol",		0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
 	{	SOCK_VALUE, 1, "Ambient",	0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list