Fix for [#18697] 2.49RC1: Keyed Particles fine in viewport but give me a crash during render

This commit is contained in:
2009-05-06 08:33:40 +00:00
parent 899c669557
commit 25b415f310

View File

@@ -2007,7 +2007,6 @@ static void set_keyed_keys(Object *ob, ParticleSystem *psys)
Object *kob = ob;
ParticleSystem *kpsys = psys;
ParticleData *pa;
ParticleKey state;
int totpart = psys->totpart, i, k, totkeys = psys->totkeyed + 1;
float prevtime, nexttime, keyedtime;
@@ -2031,10 +2030,11 @@ static void set_keyed_keys(Object *ob, ParticleSystem *psys)
}
psys->flag &= ~PSYS_KEYED;
state.time=-1.0;
for(k=0; k<totkeys; k++) {
for(i=0,pa=psys->particles; i<totpart; i++, pa++) {
(pa->keys + k)->time = -1.0; /* use current time */
if(kpsys->totpart > 0)
psys_get_particle_state(kob, kpsys, i%kpsys->totpart, pa->keys + k, 1);