From fded5e5ce5451a10055f615a0d4c83d902aac107 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 11 Jan 2011 07:38:16 +0000 Subject: comment/remove unused vars from particle and multires code. also remove calls to dm->getFaceDataArray() within a loop for particle grid distribution, instead call this once at the start and reuse the result. --- source/blender/blenkernel/intern/particle.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source/blender/blenkernel/intern/particle.c') diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index 279190b9f9c..db826b83864 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -197,7 +197,7 @@ void psys_set_current_num(Object *ob, int index) } Object *psys_find_object(Scene *scene, ParticleSystem *psys) { - Base *base = scene->base.first; + Base *base; ParticleSystem *tpsys; for(base = scene->base.first; base; base = base->next) { @@ -3953,7 +3953,7 @@ void psys_get_particle_on_path(ParticleSimulationData *sim, int p, ParticleKey * float t, frs_sec = sim->scene->r.frs_sec; float co[3], orco[3]; float hairmat[4][4]; - int totparent = 0; + /*int totparent = 0;*/ /*UNUSED*/ int totpart = psys->totpart; int totchild = psys->totchild; short between = 0, edit = 0; @@ -4009,11 +4009,12 @@ void psys_get_particle_on_path(ParticleSimulationData *sim, int p, ParticleKey * t = psys_get_child_time(psys, cpa, -state->time, NULL, NULL); if(totchild && part->from!=PART_FROM_PARTICLE && part->childtype==PART_CHILD_FACES){ +#if 0 /* totparent is UNUSED */ totparent=(int)(totchild*part->parents*0.3); if(G.rendering && part->child_nbr && part->ren_child_nbr) totparent*=(float)part->child_nbr/(float)part->ren_child_nbr; - +#endif /* part->parents could still be 0 so we can't test with totparent */ between=1; } -- cgit v1.2.3