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
diff options
context:
space:
mode:
authorLukas Tönne <lukas.toenne@gmail.com>2014-01-22 19:26:09 +0400
committerLukas Tönne <lukas.toenne@gmail.com>2014-01-22 19:28:45 +0400
commitc24a23f264d2c7001c61ca6e11c66b8c372e1d2a (patch)
tree2a464d3ace81ea22c69418e0a746aa6980272666 /source/blender/blenkernel/intern/particle_system.c
parent51c32ac1996f3e6794b1fe29d4e03b10360f9455 (diff)
Fix for particle emission bug, reported on IRC by Thomas Beck
(@plasmasolutions): When the particle emitter is parented to a fast moving object, the emission locations will not be interpolated over subframes. This works if the particle emitter is animated itself. Particle system evaluates the emitter location for each subframe, but has to do this for the parent objects as well to get reliable results.
Diffstat (limited to 'source/blender/blenkernel/intern/particle_system.c')
-rw-r--r--source/blender/blenkernel/intern/particle_system.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index 37ca502970d..6c2a42daa2d 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -1974,10 +1974,10 @@ void reset_particle(ParticleSimulationData *sim, ParticleData *pa, float dtime,
/* we have to force RECALC_ANIM here since where_is_objec_time only does drivers */
while (ob) {
BKE_animsys_evaluate_animdata(sim->scene, &ob->id, ob->adt, pa->time, ADT_RECALC_ANIM);
+ BKE_object_where_is_calc_time(sim->scene, ob, pa->time);
ob = ob->parent;
}
ob = sim->ob;
- BKE_object_where_is_calc_time(sim->scene, ob, pa->time);
psys->flag |= PSYS_OB_ANIM_RESTORE;
}
@@ -5076,10 +5076,10 @@ void particle_system_update(Scene *scene, Object *ob, ParticleSystem *psys)
if (psys->flag & PSYS_OB_ANIM_RESTORE) {
while (ob) {
BKE_animsys_evaluate_animdata(scene, &ob->id, ob->adt, cfra, ADT_RECALC_ANIM);
+ BKE_object_where_is_calc_time(scene, ob, cfra);
ob = ob->parent;
}
ob = sim.ob;
- BKE_object_where_is_calc_time(scene, ob, cfra);
psys->flag &= ~PSYS_OB_ANIM_RESTORE;
}