From 40af167b0986edb02a5c151dfe785e8ab0aa6548 Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Wed, 8 Dec 2010 11:02:56 +0000 Subject: Bug fix: normal (from particles) child particles didn't use the rough parameters properly * Also child particles didn't do particle trail properly. --- source/blender/blenkernel/intern/pointcache.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'source/blender/blenkernel/intern/pointcache.c') diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index 4e804cf14f7..4711e61c767 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -228,7 +228,15 @@ void BKE_ptcache_make_particle_key(ParticleKey *key, int index, void **data, flo { PTCACHE_DATA_TO(data, BPHYS_DATA_LOCATION, index, key->co); PTCACHE_DATA_TO(data, BPHYS_DATA_VELOCITY, index, key->vel); - PTCACHE_DATA_TO(data, BPHYS_DATA_ROTATION, index, key->rot); + + /* no rotation info, so make something nice up */ + if(data[BPHYS_DATA_ROTATION]==NULL) { + vec_to_quat( key->rot, key->vel, OB_NEGX, OB_POSZ); + } + else { + PTCACHE_DATA_TO(data, BPHYS_DATA_ROTATION, index, key->rot); + } + PTCACHE_DATA_TO(data, BPHYS_DATA_AVELOCITY, index, key->ave); key->time = time; } -- cgit v1.2.3