[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16486] branches/sim_physics: svn merge -r 16453:16485 https://svn.blender.org/svnroot/bf-blender/trunk/ blender

Daniel Genrich daniel.genrich at gmx.net
Fri Sep 12 14:58:08 CEST 2008


Revision: 16486
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16486
Author:   genscher
Date:     2008-09-12 14:58:08 +0200 (Fri, 12 Sep 2008)

Log Message:
-----------
svn merge -r 16453:16485 https://svn.blender.org/svnroot/bf-blender/trunk/blender

Modified Paths:
--------------
    branches/sim_physics/release/scripts/bpymodules/BPyTextPlugin.py
    branches/sim_physics/source/blender/blenkernel/intern/anim.c
    branches/sim_physics/source/blender/blenkernel/intern/depsgraph.c
    branches/sim_physics/source/blender/blenkernel/intern/exotic.c
    branches/sim_physics/source/blender/blenkernel/intern/modifier.c
    branches/sim_physics/source/blender/blenkernel/intern/node.c
    branches/sim_physics/source/blender/blenkernel/intern/particle.c
    branches/sim_physics/source/blender/blenkernel/intern/particle_system.c
    branches/sim_physics/source/blender/blenkernel/intern/subsurf_ccg.c
    branches/sim_physics/source/blender/blenloader/BLO_readfile.h
    branches/sim_physics/source/blender/blenloader/intern/readfile.c
    branches/sim_physics/source/blender/imbuf/intern/bmp.c
    branches/sim_physics/source/blender/imbuf/intern/dds/ColorBlock.cpp
    branches/sim_physics/source/blender/imbuf/intern/dds/ColorBlock.h
    branches/sim_physics/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp
    branches/sim_physics/source/blender/imbuf/intern/dds/DirectDrawSurface.h
    branches/sim_physics/source/blender/imbuf/intern/dds/dds_api.cpp
    branches/sim_physics/source/blender/include/BIF_editaction.h
    branches/sim_physics/source/blender/include/BIF_glutil.h
    branches/sim_physics/source/blender/makesdna/DNA_actuator_types.h
    branches/sim_physics/source/blender/python/api2_2x/Lamp.c
    branches/sim_physics/source/blender/python/api2_2x/MTex.c
    branches/sim_physics/source/blender/python/api2_2x/Material.c
    branches/sim_physics/source/blender/python/api2_2x/Texture.c
    branches/sim_physics/source/blender/python/api2_2x/World.c
    branches/sim_physics/source/blender/python/api2_2x/doc/Material.py
    branches/sim_physics/source/blender/python/api2_2x/doc/Mesh.py
    branches/sim_physics/source/blender/python/api2_2x/doc/Texture.py
    branches/sim_physics/source/blender/readblenfile/intern/BLO_readblenfile.c
    branches/sim_physics/source/blender/render/intern/source/imagetexture.c
    branches/sim_physics/source/blender/render/intern/source/pipeline.c
    branches/sim_physics/source/blender/src/buttons_logic.c
    branches/sim_physics/source/blender/src/buttons_object.c
    branches/sim_physics/source/blender/src/editipo.c
    branches/sim_physics/source/blender/src/editipo_mods.c
    branches/sim_physics/source/blender/src/editmesh_tools.c
    branches/sim_physics/source/blender/src/glutil.c
    branches/sim_physics/source/blender/src/header_ipo.c
    branches/sim_physics/source/blender/src/mywindow.c
    branches/sim_physics/source/blender/src/sequence.c
    branches/sim_physics/source/blender/src/space.c
    branches/sim_physics/source/blender/src/transform_conversions.c
    branches/sim_physics/source/gameengine/Converter/KX_ConvertActuators.cpp
    branches/sim_physics/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
    branches/sim_physics/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
    branches/sim_physics/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp
    branches/sim_physics/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h
    branches/sim_physics/source/gameengine/Ketsji/KX_GameActuator.cpp
    branches/sim_physics/source/gameengine/Ketsji/KX_GameActuator.h
    branches/sim_physics/source/gameengine/Ketsji/KX_PythonInit.cpp
    branches/sim_physics/source/gameengine/Ketsji/KX_PythonInit.h

Modified: branches/sim_physics/release/scripts/bpymodules/BPyTextPlugin.py
===================================================================
--- branches/sim_physics/release/scripts/bpymodules/BPyTextPlugin.py	2008-09-12 12:33:55 UTC (rev 16485)
+++ branches/sim_physics/release/scripts/bpymodules/BPyTextPlugin.py	2008-09-12 12:58:08 UTC (rev 16486)
@@ -20,7 +20,7 @@
 from tokenize import generate_tokens, TokenError, \
 		COMMENT, DEDENT, INDENT, NAME, NEWLINE, NL, STRING, NUMBER
 
-class Definition():
+class Definition:
 	"""Describes a definition or defined object through its name, line number
 	and docstring. This is the base class for definition based descriptors.
 	"""
@@ -30,7 +30,7 @@
 		self.lineno = lineno
 		self.doc = doc
 
-class ScriptDesc():
+class ScriptDesc:
 	"""Describes a script through lists of further descriptor objects (classes,
 	defs, vars) and dictionaries to built-in types (imports). If a script has
 	not been fully parsed, its incomplete flag will be set. The time of the last

Modified: branches/sim_physics/source/blender/blenkernel/intern/anim.c
===================================================================
--- branches/sim_physics/source/blender/blenkernel/intern/anim.c	2008-09-12 12:33:55 UTC (rev 16485)
+++ branches/sim_physics/source/blender/blenkernel/intern/anim.c	2008-09-12 12:58:08 UTC (rev 16486)
@@ -783,6 +783,10 @@
 				hair= (totchild == 0 || psys->childcache) && psys->pathcache;
 			if(!hair)
 				return;
+			
+			/* we use cache, update totchild according to cached data */
+			totchild = psys->totchildcache;
+			totpart = psys->totcached;
 		}
 
 		psys->lattice = psys_get_lattice(par, psys);
@@ -865,6 +869,8 @@
 					}
 
 					VECCOPY(pamat[3], cache->co);
+					pamat[3][3]= 1.0f;
+					
 				}
 				else if(step_nbr) {
 					/* other keys */

Modified: branches/sim_physics/source/blender/blenkernel/intern/depsgraph.c
===================================================================
--- branches/sim_physics/source/blender/blenkernel/intern/depsgraph.c	2008-09-12 12:33:55 UTC (rev 16485)
+++ branches/sim_physics/source/blender/blenkernel/intern/depsgraph.c	2008-09-12 12:58:08 UTC (rev 16486)
@@ -1924,8 +1924,10 @@
 			}
 		}
 	}
-	else if(ob->scriptlink.totscript) ob->recalc |= OB_RECALC_OB;
-	else if(ob->parent) {
+	
+	if(ob->scriptlink.totscript) ob->recalc |= OB_RECALC_OB;
+	
+	if(ob->parent) {
 		/* motion path or bone child */
 		if(ob->parent->type==OB_CURVE || ob->parent->type==OB_ARMATURE) ob->recalc |= OB_RECALC_OB;
 	}
@@ -1946,10 +1948,11 @@
 			}
 		}
 	}
-	else if(modifiers_isSoftbodyEnabled(ob)) ob->recalc |= OB_RECALC_DATA;
-	else if(object_modifiers_use_time(ob)) ob->recalc |= OB_RECALC_DATA;
-	else if((ob->pose) && (ob->pose->flag & POSE_CONSTRAINTS_TIMEDEPEND)) ob->recalc |= OB_RECALC_DATA;
-	else {
+	
+	if(object_modifiers_use_time(ob)) ob->recalc |= OB_RECALC_DATA;
+	if((ob->pose) && (ob->pose->flag & POSE_CONSTRAINTS_TIMEDEPEND)) ob->recalc |= OB_RECALC_DATA;
+	
+	{
 		Mesh *me;
 		Curve *cu;
 		Lattice *lt;

Modified: branches/sim_physics/source/blender/blenkernel/intern/exotic.c
===================================================================
--- branches/sim_physics/source/blender/blenkernel/intern/exotic.c	2008-09-12 12:33:55 UTC (rev 16485)
+++ branches/sim_physics/source/blender/blenkernel/intern/exotic.c	2008-09-12 12:58:08 UTC (rev 16486)
@@ -2632,17 +2632,17 @@
 
 			if(evl->v4==0) {
 				fprintf(fp, "3 %ld %ld %ld 0x%x\n", 
-						evl->v1->tmp.l,
-						evl->v2->tmp.l,
-						evl->v3->tmp.l, 
+						(long int) evl->v1->tmp.l,
+						(long int) evl->v2->tmp.l,
+						(long int) evl->v3->tmp.l, 
 						kleur[evl->mat_nr]);
 			}
 			else {
 				fprintf(fp, "4 %ld %ld %ld %ld 0x%x\n", 
-						evl->v1->tmp.l, 
-						evl->v2->tmp.l, 
-						evl->v3->tmp.l, 
-						evl->v4->tmp.l, 
+						(long int) evl->v1->tmp.l, 
+						(long int) evl->v2->tmp.l, 
+						(long int) evl->v3->tmp.l, 
+						(long int) evl->v4->tmp.l, 
 						kleur[evl->mat_nr]);
 			}
 			evl= evl->next;

Modified: branches/sim_physics/source/blender/blenkernel/intern/modifier.c
===================================================================
--- branches/sim_physics/source/blender/blenkernel/intern/modifier.c	2008-09-12 12:33:55 UTC (rev 16485)
+++ branches/sim_physics/source/blender/blenkernel/intern/modifier.c	2008-09-12 12:58:08 UTC (rev 16486)
@@ -5293,7 +5293,12 @@
 	sbObjectStep(ob, (float)G.scene->r.cfra, vertexCos, numVerts);
 }
 
+static int softbodyModifier_dependsOnTime(ModifierData *md)
+{
+	return 1;
+}
 
+
 /* Cloth */
 
 static void clothModifier_initData(ModifierData *md) 
@@ -7580,6 +7585,7 @@
 		mti->flags = eModifierTypeFlag_AcceptsCVs
 				| eModifierTypeFlag_RequiresOriginalData;
 		mti->deformVerts = softbodyModifier_deformVerts;
+		mti->dependsOnTime = softbodyModifier_dependsOnTime;
 	
 		mti = INIT_TYPE(Cloth);
 		mti->type = eModifierTypeType_Nonconstructive;

Modified: branches/sim_physics/source/blender/blenkernel/intern/node.c
===================================================================
--- branches/sim_physics/source/blender/blenkernel/intern/node.c	2008-09-12 12:33:55 UTC (rev 16485)
+++ branches/sim_physics/source/blender/blenkernel/intern/node.c	2008-09-12 12:58:08 UTC (rev 16486)
@@ -2378,8 +2378,8 @@
 			gs[i].type= GPU_NONE;
 
 		gs[i].name = "";
-		gs[i].hasinput= ns[i]->hasinput;
-		gs[i].hasoutput= ns[i]->hasinput;
+		gs[i].hasinput= ns[i]->hasinput && ns[i]->data;
+		gs[i].hasoutput= ns[i]->hasinput && ns[i]->data;
 		gs[i].sockettype= ns[i]->sockettype;
 	}
 
@@ -2393,7 +2393,7 @@
 
 	for (sock=sockets->first, i=0; sock; sock=sock->next, i++) {
 		ns[i]->data= gs[i].link;
-		ns[i]->hasinput= gs[i].hasinput;
+		ns[i]->hasinput= gs[i].hasinput && gs[i].link;
 		ns[i]->hasoutput= gs[i].hasoutput;
 		ns[i]->sockettype= gs[i].sockettype;
 	}

Modified: branches/sim_physics/source/blender/blenkernel/intern/particle.c
===================================================================
--- branches/sim_physics/source/blender/blenkernel/intern/particle.c	2008-09-12 12:33:55 UTC (rev 16485)
+++ branches/sim_physics/source/blender/blenkernel/intern/particle.c	2008-09-12 12:58:08 UTC (rev 16486)
@@ -3841,7 +3841,7 @@
 
 void psys_get_dupli_path_transform(Object *ob, ParticleSystem *psys, ParticleSystemModifierData *psmd, ParticleData *pa, ChildParticle *cpa, ParticleCacheKey *cache, float mat[][4], float *scale)
 {
-	float loc[3], nor[3], vec[3], side[3], len, obrotmat[4][4], qmat[4][4];
+	float loc[3], nor[3], vec[3], len, obrotmat[4][4], qmat[4][4];
 	float xvec[3] = {-1.0, 0.0, 0.0}, q[4];
 
 	VecSubf(vec, (cache+cache->steps-1)->co, cache->co);
@@ -3866,14 +3866,9 @@
 		Mat4MulMat4(mat, obrotmat, qmat);
 	}
 	else {
-		Crossf(side, nor, vec);
-		Normalize(side);
-		Crossf(nor, vec, side);
-
+		Normalize(nor);
 		Mat4One(mat);
-		VECCOPY(mat[0], vec);
-		VECCOPY(mat[1], side);
-		VECCOPY(mat[2], nor);
+		VECCOPY(mat[2], nor); // mat[2] is normal/direction
 	}
 
 	*scale= len;

Modified: branches/sim_physics/source/blender/blenkernel/intern/particle_system.c
===================================================================
--- branches/sim_physics/source/blender/blenkernel/intern/particle_system.c	2008-09-12 12:33:55 UTC (rev 16485)
+++ branches/sim_physics/source/blender/blenkernel/intern/particle_system.c	2008-09-12 12:58:08 UTC (rev 16486)
@@ -3578,7 +3578,7 @@
 							pd= epart->pd;
 							totepart= epsys->totpart;
 
-							if(pd->forcefield==PFIELD_FORCE && pd->f_strength<0.0){
+							if(pd->forcefield==PFIELD_FORCE && pd->f_strength<0.0 && ec->tree){
 								count=BLI_kdtree_find_n_nearest(ec->tree,epart->boidneighbours,pa->state.co,NULL,ptn2);
 								for(p=0; p<count; p++){
 									state.time=-1.0;
@@ -3725,7 +3725,7 @@
 							pd= epart->pd;
 							totepart= epsys->totpart;
 
-							if(pd->forcefield==PFIELD_FORCE && pd->f_strength>0.0){
+							if(pd->forcefield==PFIELD_FORCE && pd->f_strength>0.0 && ec->tree){
 								count=BLI_kdtree_find_n_nearest(ec->tree,epart->boidneighbours,pa->state.co,NULL,ptn2);
 								for(p=0; p<count; p++){
 									state.time=-1.0;

Modified: branches/sim_physics/source/blender/blenkernel/intern/subsurf_ccg.c
===================================================================
--- branches/sim_physics/source/blender/blenkernel/intern/subsurf_ccg.c	2008-09-12 12:33:55 UTC (rev 16485)
+++ branches/sim_physics/source/blender/blenkernel/intern/subsurf_ccg.c	2008-09-12 12:58:08 UTC (rev 16486)
@@ -980,7 +980,7 @@
 
 	memset(mv, 0, sizeof(*mv));
 
-	if(vertNum < ccgdm->edgeMap[0].startVert) {
+	if((vertNum < ccgdm->edgeMap[0].startVert) && (ccgSubSurf_getNumFaces(ss) > 0)) {
 		/* this vert comes from face data */
 		int lastface = ccgSubSurf_getNumFaces(ss) - 1;
 		CCGFace *f;
@@ -1021,7 +1021,7 @@
 			x = offset % gridSideVerts + 1;
 			VecCopyf(mv->co, ccgSubSurf_getFaceGridData(ss, f, grid, x, y));
 		}
-	} else if(vertNum < ccgdm->vertMap[0].startVert) {
+	} else if((vertNum < ccgdm->vertMap[0].startVert) && (ccgSubSurf_getNumEdges(ss) > 0)) {
 		/* this vert comes from edge data */
 		CCGEdge *e;
 		int lastedge = ccgSubSurf_getNumEdges(ss) - 1;

Modified: branches/sim_physics/source/blender/blenloader/BLO_readfile.h
===================================================================
--- branches/sim_physics/source/blender/blenloader/BLO_readfile.h	2008-09-12 12:33:55 UTC (rev 16485)
+++ branches/sim_physics/source/blender/blenloader/BLO_readfile.h	2008-09-12 12:58:08 UTC (rev 16486)
@@ -237,7 +237,7 @@
 void BLO_library_append_(BlendHandle **libfiledata, struct direntry* filelist, int totfile, char *dir, char* file, short flag, int idcode);
 void BLO_script_library_append(BlendHandle **bh, char *dir, char *name, int idcode, short flag, struct Scene *scene);
 
-BlendFileData* blo_read_blendafterruntime(int file, int actualsize, BlendReadError *error_r);
+BlendFileData* blo_read_blendafterruntime(int file, char *name, int actualsize, BlendReadError *error_r);
 
 #ifdef __cplusplus
 } 

Modified: branches/sim_physics/source/blender/blenloader/intern/readfile.c
===================================================================
--- branches/sim_physics/source/blender/blenloader/intern/readfile.c	2008-09-12 12:33:55 UTC (rev 16485)
+++ branches/sim_physics/source/blender/blenloader/intern/readfile.c	2008-09-12 12:58:08 UTC (rev 16486)
@@ -970,9 +970,11 @@
 	} else {
 		FileData *fd = filedata_new();
 		fd->gzfiledes = gzfile;

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list