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:
authorJanne Karhu <jhkarh@gmail.com>2010-12-08 14:02:56 +0300
committerJanne Karhu <jhkarh@gmail.com>2010-12-08 14:02:56 +0300
commit40af167b0986edb02a5c151dfe785e8ab0aa6548 (patch)
tree24b08af6d2caf77e672f503c35fec6f37efc0c58 /source/blender/blenkernel/intern/pointcache.c
parente29ac3fc76e4c20d632c9d82e0a72002752f4722 (diff)
Bug fix: normal (from particles) child particles didn't use the rough parameters properly
* Also child particles didn't do particle trail properly.
Diffstat (limited to 'source/blender/blenkernel/intern/pointcache.c')
-rw-r--r--source/blender/blenkernel/intern/pointcache.c10
1 files changed, 9 insertions, 1 deletions
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;
}