diff options
author | Daniel Genrich <daniel.genrich@gmx.net> | 2009-08-12 15:12:20 +0400 |
---|---|---|
committer | Daniel Genrich <daniel.genrich@gmx.net> | 2009-08-12 15:12:20 +0400 |
commit | 64dba1596d1b31de57311990df96478e638825d2 (patch) | |
tree | 31385fb1afe97a2fba8904a8f0d3bfeee6068a2c /source/blender/blenkernel/intern/pointcache.c | |
parent | 65a54eedd46a806611a1061b52d9c9c88df46a07 (diff) |
Particles: should fix crash on startup
Diffstat (limited to 'source/blender/blenkernel/intern/pointcache.c')
-rw-r--r-- | source/blender/blenkernel/intern/pointcache.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index 7aa01de71d0..649c26242ce 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -443,18 +443,21 @@ void BKE_ptcache_id_from_particles(PTCacheID *pid, Object *ob, ParticleSystem *p pid->data_types= (1<<BPHYS_DATA_LOCATION) | (1<<BPHYS_DATA_VELOCITY); - /* TODO for later */ - //if((psys->part->flag & (PART_UNBORN|PART_DIED))==0) - // pid->data_types|= (1<<BPHYS_DATA_INDEX); + if(psys->part) + { + /* TODO for later */ + //if((psys->part->flag & (PART_UNBORN|PART_DIED))==0) + // pid->data_types|= (1<<BPHYS_DATA_INDEX); - if(psys->part->phystype == PART_PHYS_BOIDS) - pid->data_types|= (1<<BPHYS_DATA_AVELOCITY) | (1<<BPHYS_DATA_ROTATION) | (1<<BPHYS_DATA_BOIDS); + if(psys->part->phystype == PART_PHYS_BOIDS) + pid->data_types|= (1<<BPHYS_DATA_AVELOCITY) | (1<<BPHYS_DATA_ROTATION) | (1<<BPHYS_DATA_BOIDS); - if(psys->part->rotmode || psys->part->avemode) - pid->data_types|= (1<<BPHYS_DATA_AVELOCITY) | (1<<BPHYS_DATA_ROTATION); + if(psys->part->rotmode || psys->part->avemode) + pid->data_types|= (1<<BPHYS_DATA_AVELOCITY) | (1<<BPHYS_DATA_ROTATION); - if(psys->part->flag & PART_ROT_DYN) - pid->data_types|= (1<<BPHYS_DATA_ROTATION); + if(psys->part->flag & PART_ROT_DYN) + pid->data_types|= (1<<BPHYS_DATA_ROTATION); + } pid->info_types= (1<<BPHYS_DATA_TIMES); } |