Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorJanne Karhu <jhkarh@gmail.com>2008-03-08 02:08:15 +0300
committerJanne Karhu <jhkarh@gmail.com>2008-03-08 02:08:15 +0300
commit21dd86a159faf0ee3eb0f4629caf434034ff549c (patch)
tree5e9ebaba4ec809216dcd9e3ead1047813fc803c9 /source
parent64e76e7e024f60c2ddd1abca3d80f49984949e7d (diff)
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
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/particle_system.c6
-rw-r--r--source/blender/src/buttons_object.c3
2 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index 64e04b1752c..568a3a34d91 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -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)*/
diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c
index 9c7aa01f30c..00c456cd429 100644
--- a/source/blender/src/buttons_object.c
+++ b/source/blender/src/buttons_object.c
@@ -3995,8 +3995,7 @@ 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");
+ 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) {
uiDefButF(block, NUMSLI, B_PART_DISTR_CHILD, "VParents:", butx,(buty-=buth),butw,buth, &part->parents, 0.0, 1.0, 1, 3, "Relative amount of virtual parents");