Fix for bug #10542: changing particle visualisation type from object to

something else didn't work correct.
Fix for bug #10478: particle system point cache problem.
This commit is contained in:
2008-05-05 21:10:32 +00:00
parent 95ed34be4a
commit b6f5679cf5
2 changed files with 13 additions and 0 deletions

View File

@@ -4763,6 +4763,9 @@ static void system_step(Object *ob, ParticleSystem *psys, ParticleSystemModifier
psys_update_path_cache(ob,psmd,psys,framenr);
}
cache->simframe= framenr;
cache->flag |= PTCACHE_SIMULATION_VALID;
return;
}
else if(ob->id.lib || (cache->flag & PTCACHE_BAKED)) {

View File

@@ -3010,6 +3010,16 @@ void do_effects_panels(unsigned short event)
case B_PART_INIT_CHILD:
case B_PART_RECALC_CHILD:
if(psys) {
nr=0;
for(psys=ob->particlesystem.first; psys; psys=psys->next){
if(ELEM(psys->part->draw_as,PART_DRAW_OB,PART_DRAW_GR))
nr++;
}
if(nr)
ob->transflag |= OB_DUPLIPARTS;
else
ob->transflag &= ~OB_DUPLIPARTS;
DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA);
allqueue(REDRAWVIEW3D, 0);
allqueue(REDRAWBUTSOBJECT, 0);