remove / comment unused code, patch by nico_ga on IRC with some edits.
This commit is contained in:
		@@ -1206,7 +1206,7 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
 | 
				
			|||||||
	float tmat[4][4], mat[4][4], pamat[4][4], vec[3], size=0.0;
 | 
						float tmat[4][4], mat[4][4], pamat[4][4], vec[3], size=0.0;
 | 
				
			||||||
	float (*obmat)[4], (*oldobmat)[4];
 | 
						float (*obmat)[4], (*oldobmat)[4];
 | 
				
			||||||
	int a, b, counter, hair = 0;
 | 
						int a, b, counter, hair = 0;
 | 
				
			||||||
	int totpart, totchild, totgroup=0, pa_num;
 | 
						int totpart, totchild, totgroup=0 /*, pa_num */;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	int no_draw_flag = PARS_UNEXIST;
 | 
						int no_draw_flag = PARS_UNEXIST;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -1323,7 +1323,7 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
 | 
				
			|||||||
				if(pa->flag & no_draw_flag)
 | 
									if(pa->flag & no_draw_flag)
 | 
				
			||||||
					continue;
 | 
										continue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				pa_num = pa->num;
 | 
									/* pa_num = pa->num; */ /* UNUSED */
 | 
				
			||||||
				pa_time = pa->time;
 | 
									pa_time = pa->time;
 | 
				
			||||||
				size = pa->size;
 | 
									size = pa->size;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
@@ -1331,7 +1331,7 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
 | 
				
			|||||||
				/* handle child particle */
 | 
									/* handle child particle */
 | 
				
			||||||
				cpa = &psys->child[a - totpart];
 | 
									cpa = &psys->child[a - totpart];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				pa_num = a;
 | 
									/* pa_num = a; */ /* UNUSED */
 | 
				
			||||||
				pa_time = psys->particles[cpa->parent].time;
 | 
									pa_time = psys->particles[cpa->parent].time;
 | 
				
			||||||
				size = psys_get_child_size(psys, cpa, ctime, NULL);
 | 
									size = psys_get_child_size(psys, cpa, ctime, NULL);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1189,7 +1189,7 @@ DagNodeQueue * graph_dfs(void)
 | 
				
			|||||||
	int skip = 0;
 | 
						int skip = 0;
 | 
				
			||||||
	int minheight;
 | 
						int minheight;
 | 
				
			||||||
	int maxpos=0;
 | 
						int maxpos=0;
 | 
				
			||||||
	int	is_cycle = 0;
 | 
						/* int	is_cycle = 0; */ /* UNUSED */
 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 *fprintf(stderr,"starting DFS \n ------------\n");
 | 
						 *fprintf(stderr,"starting DFS \n ------------\n");
 | 
				
			||||||
	 */	
 | 
						 */	
 | 
				
			||||||
@@ -1245,7 +1245,7 @@ DagNodeQueue * graph_dfs(void)
 | 
				
			|||||||
				} else { 
 | 
									} else { 
 | 
				
			||||||
					if (itA->node->color == DAG_GRAY) { // back edge
 | 
										if (itA->node->color == DAG_GRAY) { // back edge
 | 
				
			||||||
						fprintf(stderr,"dfs back edge :%15s %15s \n",((ID *) node->ob)->name, ((ID *) itA->node->ob)->name);
 | 
											fprintf(stderr,"dfs back edge :%15s %15s \n",((ID *) node->ob)->name, ((ID *) itA->node->ob)->name);
 | 
				
			||||||
						is_cycle = 1;
 | 
											/* is_cycle = 1; */ /* UNUSED */
 | 
				
			||||||
					} else if (itA->node->color == DAG_BLACK) {
 | 
										} else if (itA->node->color == DAG_BLACK) {
 | 
				
			||||||
						;
 | 
											;
 | 
				
			||||||
						/* already processed node but we may want later to change distance either to shorter to longer.
 | 
											/* already processed node but we may want later to change distance either to shorter to longer.
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -332,19 +332,12 @@ void fastshade_free_render(void)
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int fastshade_customdata_layer_num(int n, int active)
 | 
					 | 
				
			||||||
{   
 | 
					 | 
				
			||||||
	/* make the active layer the first */
 | 
					 | 
				
			||||||
	if (n == active) return 0;
 | 
					 | 
				
			||||||
	else if (n < active) return n+1;
 | 
					 | 
				
			||||||
	else return n;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void fastshade_customdata(CustomData *fdata, int a, int j, Material *ma)
 | 
					static void fastshade_customdata(CustomData *fdata, int a, int j, Material *ma)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	CustomDataLayer *layer;
 | 
						CustomDataLayer *layer;
 | 
				
			||||||
	MTFace *mtface;
 | 
						MTFace *mtface;
 | 
				
			||||||
	int index, n, needuv= ma->texco & TEXCO_UV;
 | 
						int index, needuv= ma->texco & TEXCO_UV;
 | 
				
			||||||
	char *vertcol;
 | 
						char *vertcol;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	shi.totuv= 0;
 | 
						shi.totuv= 0;
 | 
				
			||||||
@@ -354,7 +347,6 @@ static void fastshade_customdata(CustomData *fdata, int a, int j, Material *ma)
 | 
				
			|||||||
		layer= &fdata->layers[index];
 | 
							layer= &fdata->layers[index];
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
		if(needuv && layer->type == CD_MTFACE && shi.totuv < MAX_MTFACE) {
 | 
							if(needuv && layer->type == CD_MTFACE && shi.totuv < MAX_MTFACE) {
 | 
				
			||||||
			n= fastshade_customdata_layer_num(shi.totuv, layer->active_rnd);
 | 
					 | 
				
			||||||
			mtface= &((MTFace*)layer->data)[a];
 | 
								mtface= &((MTFace*)layer->data)[a];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			shi.uv[shi.totuv].uv[0]= 2.0f*mtface->uv[j][0]-1.0f;
 | 
								shi.uv[shi.totuv].uv[0]= 2.0f*mtface->uv[j][0]-1.0f;
 | 
				
			||||||
@@ -365,7 +357,6 @@ static void fastshade_customdata(CustomData *fdata, int a, int j, Material *ma)
 | 
				
			|||||||
			shi.totuv++;
 | 
								shi.totuv++;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		else if(layer->type == CD_MCOL && shi.totcol < MAX_MCOL) {
 | 
							else if(layer->type == CD_MCOL && shi.totcol < MAX_MCOL) {
 | 
				
			||||||
			n= fastshade_customdata_layer_num(shi.totcol, layer->active_rnd);
 | 
					 | 
				
			||||||
			vertcol= (char*)&((MCol*)layer->data)[a*4 + j];
 | 
								vertcol= (char*)&((MCol*)layer->data)[a*4 + j];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			shi.col[shi.totcol].col[0]= ((float)vertcol[3])/255.0f;
 | 
								shi.col[shi.totcol].col[0]= ((float)vertcol[3])/255.0f;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1648,12 +1648,6 @@ void object_make_proxy(Object *ob, Object *target, Object *gob)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
/* there is also a timing calculation in drawobject() */
 | 
					/* there is also a timing calculation in drawobject() */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int no_speed_curve= 0;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void disable_speed_curve(int val)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	no_speed_curve= val;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
// XXX THIS CRUFT NEEDS SERIOUS RECODING ASAP!
 | 
					// XXX THIS CRUFT NEEDS SERIOUS RECODING ASAP!
 | 
				
			||||||
/* ob can be NULL */
 | 
					/* ob can be NULL */
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3057,7 +3057,7 @@ void psys_cache_edit_paths(Scene *scene, Object *ob, PTCacheEdit *edit, float cf
 | 
				
			|||||||
	ParticleKey result;
 | 
						ParticleKey result;
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	float birthtime = 0.0f, dietime = 0.0f;
 | 
						float birthtime = 0.0f, dietime = 0.0f;
 | 
				
			||||||
	float t, time = 0.0f, keytime = 0.0f, frs_sec;
 | 
						float t, time = 0.0f, keytime = 0.0f /*, frs_sec */;
 | 
				
			||||||
	float hairmat[4][4], rotmat[3][3], prev_tangent[3] = {0.0f, 0.0f, 0.0f};
 | 
						float hairmat[4][4], rotmat[3][3], prev_tangent[3] = {0.0f, 0.0f, 0.0f};
 | 
				
			||||||
	int k, i;
 | 
						int k, i;
 | 
				
			||||||
	int steps = (int)pow(2.0, (double)pset->draw_step);
 | 
						int steps = (int)pow(2.0, (double)pset->draw_step);
 | 
				
			||||||
@@ -3078,7 +3078,7 @@ void psys_cache_edit_paths(Scene *scene, Object *ob, PTCacheEdit *edit, float cf
 | 
				
			|||||||
		recalc_set = 1;
 | 
							recalc_set = 1;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	frs_sec = (psys || edit->pid.flag & PTCACHE_VEL_PER_SEC) ? 25.0f : 1.0f;
 | 
						/* frs_sec = (psys || edit->pid.flag & PTCACHE_VEL_PER_SEC) ? 25.0f : 1.0f; */ /* UNUSED */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if(pset->brushtype == PE_BRUSH_WEIGHT) {
 | 
						if(pset->brushtype == PE_BRUSH_WEIGHT) {
 | 
				
			||||||
		;/* use weight painting colors now... */
 | 
							;/* use weight painting colors now... */
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -890,7 +890,7 @@ static void distribute_threads_exec(ParticleThread *thread, ParticleData *pa, Ch
 | 
				
			|||||||
		if(ctx->tree){
 | 
							if(ctx->tree){
 | 
				
			||||||
			KDTreeNearest ptn[10];
 | 
								KDTreeNearest ptn[10];
 | 
				
			||||||
			int w,maxw;//, do_seams;
 | 
								int w,maxw;//, do_seams;
 | 
				
			||||||
			float maxd,mind,/*dd,*/totw= 0.0f;
 | 
								float maxd /*, mind,dd */, totw= 0.0f;
 | 
				
			||||||
			int parent[10];
 | 
								int parent[10];
 | 
				
			||||||
			float pweight[10];
 | 
								float pweight[10];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -899,7 +899,7 @@ static void distribute_threads_exec(ParticleThread *thread, ParticleData *pa, Ch
 | 
				
			|||||||
			maxw = BLI_kdtree_find_n_nearest(ctx->tree,4,orco1,NULL,ptn);
 | 
								maxw = BLI_kdtree_find_n_nearest(ctx->tree,4,orco1,NULL,ptn);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			maxd=ptn[maxw-1].dist;
 | 
								maxd=ptn[maxw-1].dist;
 | 
				
			||||||
			mind=ptn[0].dist;
 | 
								/* mind=ptn[0].dist; */ /* UNUSED */
 | 
				
			||||||
			
 | 
								
 | 
				
			||||||
			/* the weights here could be done better */
 | 
								/* the weights here could be done better */
 | 
				
			||||||
			for(w=0; w<maxw; w++){
 | 
								for(w=0; w<maxw; w++){
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -640,7 +640,7 @@ static void add_mesh_quad_diag_springs(Object *ob)
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
	Mesh *me= ob->data;
 | 
						Mesh *me= ob->data;
 | 
				
			||||||
	MFace *mface= me->mface;
 | 
						MFace *mface= me->mface;
 | 
				
			||||||
	BodyPoint *bp;
 | 
						/*BodyPoint *bp;*/ /*UNUSED*/
 | 
				
			||||||
	BodySpring *bs, *bs_new;
 | 
						BodySpring *bs, *bs_new;
 | 
				
			||||||
	int a ;
 | 
						int a ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -661,7 +661,7 @@ static void add_mesh_quad_diag_springs(Object *ob)
 | 
				
			|||||||
			/* fill the tail */
 | 
								/* fill the tail */
 | 
				
			||||||
			a = 0;
 | 
								a = 0;
 | 
				
			||||||
			bs = bs_new+ob->soft->totspring;
 | 
								bs = bs_new+ob->soft->totspring;
 | 
				
			||||||
			bp= ob->soft->bpoint;
 | 
								/*bp= ob->soft->bpoint; */ /*UNUSED*/
 | 
				
			||||||
			if(mface ) {
 | 
								if(mface ) {
 | 
				
			||||||
				for(a=me->totface; a>0; a--, mface++) {
 | 
									for(a=me->totface; a>0; a--, mface++) {
 | 
				
			||||||
					if(mface->v4) {
 | 
										if(mface->v4) {
 | 
				
			||||||
@@ -1042,7 +1042,10 @@ static int sb_detect_aabb_collisionCached(	float UNUSED(force[3]), unsigned int
 | 
				
			|||||||
	GHash *hash;
 | 
						GHash *hash;
 | 
				
			||||||
	GHashIterator *ihash;
 | 
						GHashIterator *ihash;
 | 
				
			||||||
	float  aabbmin[3],aabbmax[3];
 | 
						float  aabbmin[3],aabbmax[3];
 | 
				
			||||||
	int a, deflected=0;
 | 
						int deflected=0;
 | 
				
			||||||
 | 
					#if 0
 | 
				
			||||||
 | 
						int a;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if ((sb == NULL) || (sb->scratch ==NULL)) return 0;
 | 
						if ((sb == NULL) || (sb->scratch ==NULL)) return 0;
 | 
				
			||||||
	VECCOPY(aabbmin,sb->scratch->aabbmin);
 | 
						VECCOPY(aabbmin,sb->scratch->aabbmin);
 | 
				
			||||||
@@ -1056,17 +1059,20 @@ static int sb_detect_aabb_collisionCached(	float UNUSED(force[3]), unsigned int
 | 
				
			|||||||
		ob             = BLI_ghashIterator_getKey	(ihash);
 | 
							ob             = BLI_ghashIterator_getKey	(ihash);
 | 
				
			||||||
			/* only with deflecting set */
 | 
								/* only with deflecting set */
 | 
				
			||||||
			if(ob->pd && ob->pd->deflect) {
 | 
								if(ob->pd && ob->pd->deflect) {
 | 
				
			||||||
 | 
					#if 0			/* UNUSED */
 | 
				
			||||||
				MFace *mface= NULL;
 | 
									MFace *mface= NULL;
 | 
				
			||||||
				MVert *mvert= NULL;
 | 
									MVert *mvert= NULL;
 | 
				
			||||||
				MVert *mprevvert= NULL;
 | 
									MVert *mprevvert= NULL;
 | 
				
			||||||
				ccdf_minmax *mima= NULL;
 | 
									ccdf_minmax *mima= NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
				if(ccdm){
 | 
									if(ccdm){
 | 
				
			||||||
 | 
					#if 0				/* UNUSED */
 | 
				
			||||||
					mface= ccdm->mface;
 | 
										mface= ccdm->mface;
 | 
				
			||||||
					mvert= ccdm->mvert;
 | 
										mvert= ccdm->mvert;
 | 
				
			||||||
					mprevvert= ccdm->mprevvert;
 | 
										mprevvert= ccdm->mprevvert;
 | 
				
			||||||
					mima= ccdm->mima;
 | 
										mima= ccdm->mima;
 | 
				
			||||||
					a = ccdm->totface;
 | 
										a = ccdm->totface;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
					if ((aabbmax[0] < ccdm->bbmin[0]) ||
 | 
										if ((aabbmax[0] < ccdm->bbmin[0]) ||
 | 
				
			||||||
						(aabbmax[1] < ccdm->bbmin[1]) ||
 | 
											(aabbmax[1] < ccdm->bbmin[1]) ||
 | 
				
			||||||
						(aabbmax[2] < ccdm->bbmin[2]) ||
 | 
											(aabbmax[2] < ccdm->bbmin[2]) ||
 | 
				
			||||||
@@ -2095,19 +2101,25 @@ static void sb_spring_force(Object *ob,int bpi,BodySpring *bs,float iks,float UN
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	float dir[3],dvel[3];
 | 
						float dir[3],dvel[3];
 | 
				
			||||||
	float distance,forcefactor,kd,absvel,projvel,kw;
 | 
						float distance,forcefactor,kd,absvel,projvel,kw;
 | 
				
			||||||
 | 
					#if 0	/* UNUSED */
 | 
				
			||||||
	int ia,ic;
 | 
						int ia,ic;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
	/* prepare depending on which side of the spring we are on */
 | 
						/* prepare depending on which side of the spring we are on */
 | 
				
			||||||
	if (bpi == bs->v1){
 | 
						if (bpi == bs->v1){
 | 
				
			||||||
		bp1 = &sb->bpoint[bs->v1];
 | 
							bp1 = &sb->bpoint[bs->v1];
 | 
				
			||||||
		bp2 = &sb->bpoint[bs->v2];
 | 
							bp2 = &sb->bpoint[bs->v2];
 | 
				
			||||||
 | 
					#if 0	/* UNUSED */
 | 
				
			||||||
		ia =3*bs->v1;
 | 
							ia =3*bs->v1;
 | 
				
			||||||
		ic =3*bs->v2;
 | 
							ic =3*bs->v2;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	else if (bpi == bs->v2){
 | 
						else if (bpi == bs->v2){
 | 
				
			||||||
		bp1 = &sb->bpoint[bs->v2];
 | 
							bp1 = &sb->bpoint[bs->v2];
 | 
				
			||||||
		bp2 = &sb->bpoint[bs->v1];
 | 
							bp2 = &sb->bpoint[bs->v1];
 | 
				
			||||||
 | 
					#if 0	/* UNUSED */
 | 
				
			||||||
		ia =3*bs->v2;
 | 
							ia =3*bs->v2;
 | 
				
			||||||
		ic =3*bs->v1;
 | 
							ic =3*bs->v1;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	else{
 | 
						else{
 | 
				
			||||||
		/* TODO make this debug option */
 | 
							/* TODO make this debug option */
 | 
				
			||||||
@@ -2454,23 +2466,23 @@ static void softbody_calc_forcesEx(Scene *scene, Object *ob, float forcetime, fl
 | 
				
			|||||||
 * this will ruin adaptive stepsize AKA heun! (BM)
 | 
					 * this will ruin adaptive stepsize AKA heun! (BM)
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
	SoftBody *sb= ob->soft;	/* is supposed to be there */
 | 
						SoftBody *sb= ob->soft;	/* is supposed to be there */
 | 
				
			||||||
	BodyPoint *bproot;
 | 
						/*BodyPoint *bproot;*/ /* UNUSED */
 | 
				
			||||||
	ListBase *do_effector = NULL;
 | 
						ListBase *do_effector = NULL;
 | 
				
			||||||
	float gravity;
 | 
						/* float gravity; */ /* UNUSED */
 | 
				
			||||||
	/* float iks; */
 | 
						/* float iks; */
 | 
				
			||||||
	float fieldfactor = -1.0f, windfactor  = 0.25;
 | 
						float fieldfactor = -1.0f, windfactor  = 0.25;
 | 
				
			||||||
	int   do_deflector,do_selfcollision,do_springcollision,do_aero;
 | 
						int   do_deflector /*,do_selfcollision*/ ,do_springcollision,do_aero;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	gravity = sb->grav * sb_grav_force_scale(ob);
 | 
						/* gravity = sb->grav * sb_grav_force_scale(ob); */ /* UNUSED */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* check conditions for various options */
 | 
						/* check conditions for various options */
 | 
				
			||||||
	do_deflector= query_external_colliders(scene, ob);
 | 
						do_deflector= query_external_colliders(scene, ob);
 | 
				
			||||||
	do_selfcollision=((ob->softflag & OB_SB_EDGES) && (sb->bspring)&& (ob->softflag & OB_SB_SELF));
 | 
						/* do_selfcollision=((ob->softflag & OB_SB_EDGES) && (sb->bspring)&& (ob->softflag & OB_SB_SELF)); */ /* UNUSED */
 | 
				
			||||||
	do_springcollision=do_deflector && (ob->softflag & OB_SB_EDGES) &&(ob->softflag & OB_SB_EDGECOLL);
 | 
						do_springcollision=do_deflector && (ob->softflag & OB_SB_EDGES) &&(ob->softflag & OB_SB_EDGECOLL);
 | 
				
			||||||
	do_aero=((sb->aeroedge)&& (ob->softflag & OB_SB_EDGES));
 | 
						do_aero=((sb->aeroedge)&& (ob->softflag & OB_SB_EDGES));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* iks  = 1.0f/(1.0f-sb->inspring)-1.0f; */ /* inner spring constants function */ /* UNUSED */
 | 
						/* iks  = 1.0f/(1.0f-sb->inspring)-1.0f; */ /* inner spring constants function */ /* UNUSED */
 | 
				
			||||||
	bproot= sb->bpoint; /* need this for proper spring addressing */
 | 
						/* bproot= sb->bpoint; */ /* need this for proper spring addressing */ /* UNUSED */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (do_springcollision || do_aero)
 | 
						if (do_springcollision || do_aero)
 | 
				
			||||||
	sb_sfesf_threads_run(scene, ob, timenow,sb->totspring,NULL);
 | 
						sb_sfesf_threads_run(scene, ob, timenow,sb->totspring,NULL);
 | 
				
			||||||
@@ -2516,7 +2528,7 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa
 | 
				
			|||||||
		*/
 | 
							*/
 | 
				
			||||||
		SoftBody *sb= ob->soft;	/* is supposed to be there */
 | 
							SoftBody *sb= ob->soft;	/* is supposed to be there */
 | 
				
			||||||
		BodyPoint  *bp;
 | 
							BodyPoint  *bp;
 | 
				
			||||||
		BodyPoint *bproot;
 | 
							/* BodyPoint *bproot; */ /* UNUSED */
 | 
				
			||||||
		BodySpring *bs;
 | 
							BodySpring *bs;
 | 
				
			||||||
		ListBase *do_effector = NULL;
 | 
							ListBase *do_effector = NULL;
 | 
				
			||||||
		float iks, ks, kd, gravity[3] = {0.0f,0.0f,0.0f};
 | 
							float iks, ks, kd, gravity[3] = {0.0f,0.0f,0.0f};
 | 
				
			||||||
@@ -2547,7 +2559,7 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa
 | 
				
			|||||||
		do_aero=((sb->aeroedge)&& (ob->softflag & OB_SB_EDGES));
 | 
							do_aero=((sb->aeroedge)&& (ob->softflag & OB_SB_EDGES));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		iks  = 1.0f/(1.0f-sb->inspring)-1.0f ;/* inner spring constants function */
 | 
							iks  = 1.0f/(1.0f-sb->inspring)-1.0f ;/* inner spring constants function */
 | 
				
			||||||
		bproot= sb->bpoint; /* need this for proper spring addressing */
 | 
							/* bproot= sb->bpoint; */ /* need this for proper spring addressing */ /* UNUSED */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (do_springcollision || do_aero)  scan_for_ext_spring_forces(scene, ob, timenow);
 | 
							if (do_springcollision || do_aero)  scan_for_ext_spring_forces(scene, ob, timenow);
 | 
				
			||||||
		/* after spring scan because it uses Effoctors too */
 | 
							/* after spring scan because it uses Effoctors too */
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user