Point cache was reset in many updates where it shouldn't have been reset.
Preview render crashed with "only render" children.
This commit is contained in:
parent
e893c9d739
commit
04a009b047
|
@ -4271,7 +4271,7 @@ void psys_to_softbody(Object *ob, ParticleSystem *psys, int force_recalc)
|
|||
|
||||
if((psys->softflag&OB_SB_ENABLE)==0) return;
|
||||
|
||||
if(ob->recalc && (ob->recalc&OB_RECALC_TIME)==0)
|
||||
if(psys->recalc || force_recalc)
|
||||
psys->softflag|=OB_SB_REDO;
|
||||
|
||||
/* let's replace the object's own softbody with the particle softbody */
|
||||
|
@ -4284,12 +4284,6 @@ void psys_to_softbody(Object *ob, ParticleSystem *psys, int force_recalc)
|
|||
/* swich to new ones */
|
||||
ob->soft=psys->soft;
|
||||
ob->softflag=psys->softflag;
|
||||
|
||||
/* signal for before/free bake */
|
||||
//if(psys->flag & PSYS_SOFT_BAKE || force_recalc){
|
||||
// sbObjectToSoftbody(ob);
|
||||
// psys->flag &= ~PSYS_SOFT_BAKE;
|
||||
//}
|
||||
|
||||
/* do softbody */
|
||||
sbObjectStep(ob, (float)G.scene->r.cfra, NULL, psys_count_keys(psys));
|
||||
|
|
|
@ -1749,6 +1749,13 @@ static int render_new_particle_system(Render *re, Object *ob, ParticleSystem *ps
|
|||
if(!(psmd->modifier.mode & eModifierMode_Render))
|
||||
return 0;
|
||||
|
||||
if(G.rendering == 0) { /* preview render */
|
||||
if(part->flag & PART_CHILD_RENDER)
|
||||
totchild = 0;
|
||||
else
|
||||
totchild = (int)((float)totchild * (float)part->disp / 100.0f);
|
||||
}
|
||||
|
||||
psys->flag|=PSYS_DRAWING;
|
||||
|
||||
BLI_srandom(psys->seed);
|
||||
|
|
Loading…
Reference in New Issue