Cleanup: indentation
This commit is contained in:
		@@ -332,7 +332,7 @@ static void init_mv_jit(float *jit, int num, int seed2, float amount)
 | 
			
		||||
 | 
			
		||||
	rng = BLI_rng_new(31415926 + num + seed2);
 | 
			
		||||
	x= 0;
 | 
			
		||||
		num2 = 2 * num;
 | 
			
		||||
	num2 = 2 * num;
 | 
			
		||||
	for (i=0; i<num2; i+=2) {
 | 
			
		||||
	
 | 
			
		||||
		jit[i] = x + amount*rad1*(0.5f - BLI_rng_get_float(rng));
 | 
			
		||||
 
 | 
			
		||||
@@ -3354,7 +3354,7 @@ void BKE_ptcache_bake(PTCacheBaker *baker)
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	BLI_end_threads(&threads);
 | 
			
		||||
		BLI_end_threads(&threads);
 | 
			
		||||
	}
 | 
			
		||||
	/* clear baking flag */
 | 
			
		||||
	if (pid) {
 | 
			
		||||
 
 | 
			
		||||
@@ -1035,6 +1035,7 @@ static int sb_detect_aabb_collisionCached(float UNUSED(force[3]), unsigned int U
 | 
			
		||||
 | 
			
		||||
		ccd_Mesh *ccdm = BLI_ghashIterator_getValue	(ihash);
 | 
			
		||||
		ob             = BLI_ghashIterator_getKey	(ihash);
 | 
			
		||||
		{
 | 
			
		||||
			/* only with deflecting set */
 | 
			
		||||
			if (ob->pd && ob->pd->deflect) {
 | 
			
		||||
#if 0			/* UNUSED */
 | 
			
		||||
@@ -1076,6 +1077,7 @@ static int sb_detect_aabb_collisionCached(float UNUSED(force[3]), unsigned int U
 | 
			
		||||
				}
 | 
			
		||||
			} /* if (ob->pd && ob->pd->deflect) */
 | 
			
		||||
			BLI_ghashIterator_step(ihash);
 | 
			
		||||
		}
 | 
			
		||||
	} /* while () */
 | 
			
		||||
	BLI_ghashIterator_free(ihash);
 | 
			
		||||
	return deflected;
 | 
			
		||||
@@ -1114,6 +1116,7 @@ static int sb_detect_face_pointCached(float face_v1[3], float face_v2[3], float
 | 
			
		||||
 | 
			
		||||
		ccd_Mesh *ccdm = BLI_ghashIterator_getValue	(ihash);
 | 
			
		||||
		ob             = BLI_ghashIterator_getKey	(ihash);
 | 
			
		||||
		{
 | 
			
		||||
			/* only with deflecting set */
 | 
			
		||||
			if (ob->pd && ob->pd->deflect) {
 | 
			
		||||
				MVert *mvert= NULL;
 | 
			
		||||
@@ -1177,6 +1180,7 @@ static int sb_detect_face_pointCached(float face_v1[3], float face_v2[3], float
 | 
			
		||||
				} /* if (mvert) */
 | 
			
		||||
			} /* if (ob->pd && ob->pd->deflect) */
 | 
			
		||||
			BLI_ghashIterator_step(ihash);
 | 
			
		||||
		}
 | 
			
		||||
	} /* while () */
 | 
			
		||||
	BLI_ghashIterator_free(ihash);
 | 
			
		||||
	return deflected;
 | 
			
		||||
@@ -1206,6 +1210,7 @@ static int sb_detect_face_collisionCached(float face_v1[3], float face_v2[3], fl
 | 
			
		||||
 | 
			
		||||
		ccd_Mesh *ccdm = BLI_ghashIterator_getValue	(ihash);
 | 
			
		||||
		ob             = BLI_ghashIterator_getKey	(ihash);
 | 
			
		||||
		{
 | 
			
		||||
			/* only with deflecting set */
 | 
			
		||||
			if (ob->pd && ob->pd->deflect) {
 | 
			
		||||
				MFace *mface= NULL;
 | 
			
		||||
@@ -1315,6 +1320,7 @@ static int sb_detect_face_collisionCached(float face_v1[3], float face_v2[3], fl
 | 
			
		||||
				}/* while a */
 | 
			
		||||
			} /* if (ob->pd && ob->pd->deflect) */
 | 
			
		||||
			BLI_ghashIterator_step(ihash);
 | 
			
		||||
		}
 | 
			
		||||
	} /* while () */
 | 
			
		||||
	BLI_ghashIterator_free(ihash);
 | 
			
		||||
	return deflected;
 | 
			
		||||
@@ -1434,6 +1440,7 @@ static int sb_detect_edge_collisionCached(float edge_v1[3], float edge_v2[3], fl
 | 
			
		||||
 | 
			
		||||
		ccd_Mesh *ccdm = BLI_ghashIterator_getValue	(ihash);
 | 
			
		||||
		ob             = BLI_ghashIterator_getKey	(ihash);
 | 
			
		||||
		{
 | 
			
		||||
			/* only with deflecting set */
 | 
			
		||||
			if (ob->pd && ob->pd->deflect) {
 | 
			
		||||
				MFace *mface= NULL;
 | 
			
		||||
@@ -1555,6 +1562,7 @@ static int sb_detect_edge_collisionCached(float edge_v1[3], float edge_v2[3], fl
 | 
			
		||||
				}/* while a */
 | 
			
		||||
			} /* if (ob->pd && ob->pd->deflect) */
 | 
			
		||||
			BLI_ghashIterator_step(ihash);
 | 
			
		||||
		}
 | 
			
		||||
	} /* while () */
 | 
			
		||||
	BLI_ghashIterator_free(ihash);
 | 
			
		||||
	return deflected;
 | 
			
		||||
@@ -1762,6 +1770,7 @@ static int sb_detect_vertex_collisionCached(float opco[3], float facenormal[3],
 | 
			
		||||
 | 
			
		||||
		ccd_Mesh *ccdm = BLI_ghashIterator_getValue	(ihash);
 | 
			
		||||
		ob             = BLI_ghashIterator_getKey	(ihash);
 | 
			
		||||
		{
 | 
			
		||||
			/* only with deflecting set */
 | 
			
		||||
			if (ob->pd && ob->pd->deflect) {
 | 
			
		||||
				MFace *mface= NULL;
 | 
			
		||||
@@ -1799,7 +1808,7 @@ static int sb_detect_vertex_collisionCached(float opco[3], float facenormal[3],
 | 
			
		||||
				else {
 | 
			
		||||
					/*aye that should be cached*/
 | 
			
		||||
					printf("missing cache error\n");
 | 
			
		||||
						BLI_ghashIterator_step(ihash);
 | 
			
		||||
					BLI_ghashIterator_step(ihash);
 | 
			
		||||
					continue;
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
@@ -1917,16 +1926,16 @@ static int sb_detect_vertex_collisionCached(float opco[3], float facenormal[3],
 | 
			
		||||
								if (facedist > outerfacethickness*ff)
 | 
			
		||||
									force_mag_norm =(float)force_mag_norm*fa*(facedist - outerfacethickness)*(facedist - outerfacethickness);
 | 
			
		||||
								*damp=ob->pd->pdef_sbdamp;
 | 
			
		||||
							if (facedist > 0.0f) {
 | 
			
		||||
								*damp *= (1.0f - facedist/outerfacethickness);
 | 
			
		||||
								Vec3PlusStVec(outerforceaccu, force_mag_norm, d_nvect);
 | 
			
		||||
								deflected = 3;
 | 
			
		||||
								if (facedist > 0.0f) {
 | 
			
		||||
									*damp *= (1.0f - facedist/outerfacethickness);
 | 
			
		||||
									Vec3PlusStVec(outerforceaccu, force_mag_norm, d_nvect);
 | 
			
		||||
									deflected = 3;
 | 
			
		||||
 | 
			
		||||
							}
 | 
			
		||||
							else {
 | 
			
		||||
								Vec3PlusStVec(innerforceaccu, force_mag_norm, d_nvect);
 | 
			
		||||
								if (deflected < 2) deflected = 2;
 | 
			
		||||
							}
 | 
			
		||||
								}
 | 
			
		||||
								else {
 | 
			
		||||
									Vec3PlusStVec(innerforceaccu, force_mag_norm, d_nvect);
 | 
			
		||||
									if (deflected < 2) deflected = 2;
 | 
			
		||||
								}
 | 
			
		||||
 | 
			
		||||
								if ((mprevvert) && (*damp > 0.0f)) {
 | 
			
		||||
									choose_winner(ve, opco, nv1, nv3, nv4, vv1, vv3, vv4);
 | 
			
		||||
@@ -1997,6 +2006,7 @@ static int sb_detect_vertex_collisionCached(float opco[3], float facenormal[3],
 | 
			
		||||
				}/* while a */
 | 
			
		||||
			} /* if (ob->pd && ob->pd->deflect) */
 | 
			
		||||
			BLI_ghashIterator_step(ihash);
 | 
			
		||||
		}
 | 
			
		||||
	} /* while () */
 | 
			
		||||
 | 
			
		||||
	if (deflected == 1) { // no face but 'outer' edge cylinder sees vert
 | 
			
		||||
@@ -2335,14 +2345,14 @@ static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, Object *ob, flo
 | 
			
		||||
				float kd = 1.0f;
 | 
			
		||||
 | 
			
		||||
				if (sb_deflect_face(ob, bp->pos, facenormal, defforce, &cf, timenow, vel, &intrusion)) {
 | 
			
		||||
						if (intrusion < 0.0f) {
 | 
			
		||||
							sb->scratch->flag |= SBF_DOFUZZY;
 | 
			
		||||
							bp->loc_flag |= SBF_DOFUZZY;
 | 
			
		||||
							bp->choke = sb->choke*0.01f;
 | 
			
		||||
						}
 | 
			
		||||
					if (intrusion < 0.0f) {
 | 
			
		||||
						sb->scratch->flag |= SBF_DOFUZZY;
 | 
			
		||||
						bp->loc_flag |= SBF_DOFUZZY;
 | 
			
		||||
						bp->choke = sb->choke*0.01f;
 | 
			
		||||
					}
 | 
			
		||||
 | 
			
		||||
							sub_v3_v3v3(cfforce, bp->vec, vel);
 | 
			
		||||
							Vec3PlusStVec(bp->force, -cf*50.0f, cfforce);
 | 
			
		||||
					sub_v3_v3v3(cfforce, bp->vec, vel);
 | 
			
		||||
					Vec3PlusStVec(bp->force, -cf*50.0f, cfforce);
 | 
			
		||||
 | 
			
		||||
					Vec3PlusStVec(bp->force, kd, defforce);
 | 
			
		||||
				}
 | 
			
		||||
@@ -3484,7 +3494,7 @@ static void makelatticesprings(Lattice *lt,	BodySpring *bs, int dostiff, Object
 | 
			
		||||
							bs->v1 = bpc;
 | 
			
		||||
							bs->v2 = bpc+dw+dv-1;
 | 
			
		||||
							bs->springtype=SB_BEND;
 | 
			
		||||
							 bs->len= globallen((bp+dw+dv-1)->vec, bp->vec, ob);
 | 
			
		||||
							bs->len= globallen((bp+dw+dv-1)->vec, bp->vec, ob);
 | 
			
		||||
							bs++;
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
 
 | 
			
		||||
@@ -106,7 +106,7 @@ static int bm_vert_sortval_cb(const void *v_a_v, const void *v_b_v)
 | 
			
		||||
 | 
			
		||||
	if      (val_a > val_b) return  1;
 | 
			
		||||
	else if (val_a < val_b) return -1;
 | 
			
		||||
	                        return  0;
 | 
			
		||||
	else                    return  0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -120,7 +120,8 @@ static float bm_edge_calc_dissolve_error(
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ((delimit & BMO_DELIM_UV) &&
 | 
			
		||||
	    (bm_edge_is_contiguous_loop_cd_all(e, delimit_data) == 0)) {
 | 
			
		||||
	    (bm_edge_is_contiguous_loop_cd_all(e, delimit_data) == 0))
 | 
			
		||||
	{
 | 
			
		||||
		goto fail;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -953,9 +953,9 @@ static void CalcSnapGeometry(TransInfo *t, float *UNUSED(vec))
 | 
			
		||||
//				last_p = LAST_SNAP_POINT;
 | 
			
		||||
//			}
 | 
			
		||||
//			else
 | 
			
		||||
//			{
 | 
			
		||||
			{
 | 
			
		||||
				last_p = t->tsnap.snapPoint;
 | 
			
		||||
//			}
 | 
			
		||||
			}
 | 
			
		||||
			
 | 
			
		||||
			
 | 
			
		||||
			for (p1 = depth_peels.first; p1; p1 = p1->next) {
 | 
			
		||||
 
 | 
			
		||||
@@ -306,22 +306,23 @@ static void makeraytree_single(Render *re)
 | 
			
		||||
	RayObject *raytree;
 | 
			
		||||
	RayFace *face = NULL;
 | 
			
		||||
	VlakPrimitive *vlakprimitive = NULL;
 | 
			
		||||
	int faces = 0, obs = 0, special = 0;
 | 
			
		||||
	int faces = 0, special = 0;
 | 
			
		||||
 | 
			
		||||
	for (obi=re->instancetable.first; obi; obi=obi->next)
 | 
			
		||||
	if (is_raytraceable(re, obi)) {
 | 
			
		||||
		ObjectRen *obr = obi->obr;
 | 
			
		||||
		obs++;
 | 
			
		||||
	for (obi = re->instancetable.first; obi; obi = obi->next) {
 | 
			
		||||
		if (is_raytraceable(re, obi)) {
 | 
			
		||||
			ObjectRen *obr = obi->obr;
 | 
			
		||||
 | 
			
		||||
		if (has_special_rayobject(re, obi)) {
 | 
			
		||||
			special++;
 | 
			
		||||
		}
 | 
			
		||||
		else {
 | 
			
		||||
			int v;
 | 
			
		||||
			for (v=0;v<obr->totvlak;v++) {
 | 
			
		||||
				VlakRen *vlr = obr->vlaknodes[v>>8].vlak + (v&255);
 | 
			
		||||
				if (is_raytraceable_vlr(re, vlr))
 | 
			
		||||
					faces++;
 | 
			
		||||
			if (has_special_rayobject(re, obi)) {
 | 
			
		||||
				special++;
 | 
			
		||||
			}
 | 
			
		||||
			else {
 | 
			
		||||
				int v;
 | 
			
		||||
				for (v = 0;v < obr->totvlak; v++) {
 | 
			
		||||
					VlakRen *vlr = obr->vlaknodes[v >> 8].vlak + (v&255);
 | 
			
		||||
					if (is_raytraceable_vlr(re, vlr)) {
 | 
			
		||||
						faces++;
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user