Fix for bug [#8465] particle children for emitter particles doesn't render

-cached step didn't react to rendering and create child particles
-now emitter particle children can use the render amount too
This commit is contained in:
2008-03-07 23:08:15 +00:00
parent 64e76e7e02
commit 21dd86a159
2 changed files with 7 additions and 2 deletions

View File

@@ -4407,6 +4407,12 @@ static void cached_step(Object *ob, ParticleSystemModifierData *psmd, ParticleSy
else
pa->flag &= ~PARS_NO_DISP;
}
/* make sure that children are up to date */
if(psys->part->childtype && psys->totchild != get_psys_tot_child(psys)) {
alloc_particles(ob, psys, psys->totpart);
distribute_particles(ob, psys, PART_FROM_CHILD);
}
}
/* Calculates the next state for all particles of the system */
/* In particles code most fra-ending are frames, time-ending are fra*timestep (seconds)*/

View File

@@ -3995,7 +3995,6 @@ static void object_panel_particle_children(Object *ob)
buty -= buth/2;
uiDefButI(block, NUM, B_PART_ALLOC_CHILD, "Amount:", butx,(buty-=buth),butw,buth, &part->child_nbr, 0.0, MAX_PART_CHILDREN, 0, 0, "Amount of children/parent");
if(psys->flag & (PSYS_HAIR_DONE|PSYS_KEYED))
uiDefButI(block, NUM, B_DIFF, "Render Amount:", butx,(buty-=buth),butw,buth, &part->ren_child_nbr, 0.0, MAX_PART_CHILDREN, 0, 0, "Amount of children/parent for rendering");
if(part->from!=PART_FROM_PARTICLE && part->childtype==PART_CHILD_FACES) {