Fix T42395: Stored "render data" in particles mismatches the particle
amount and crashes after Cycles render. This is a hack to fix this, but at this point the system is hopelessly broken anyway and no good fix other than total rewriting is possible.
This commit is contained in:
parent
26b5fb8f58
commit
5802d4531d
Notes:
blender-bot
2023-02-14 09:54:08 +01:00
Referenced by issue #42395, Object disappears, Blender crashes
|
@ -293,7 +293,7 @@ typedef struct ParticleSystem {
|
|||
short vgroup[12], vg_neg, rt3; /* vertex groups, 0==disable, 1==starting index */
|
||||
|
||||
/* temporary storage during render */
|
||||
void *renderdata;
|
||||
struct ParticleRenderData *renderdata;
|
||||
|
||||
/* point cache */
|
||||
struct PointCache *pointcache;
|
||||
|
|
|
@ -589,8 +589,14 @@ static void rna_ParticleSystem_set_resolution(ParticleSystem *particlesystem, Sc
|
|||
particle_system_update(scene, object, particlesystem);
|
||||
}
|
||||
else {
|
||||
if (particlesystem->renderdata)
|
||||
ParticleSystemModifierData *psmd = psys_get_modifier(object, particlesystem);
|
||||
|
||||
if (particlesystem->renderdata) {
|
||||
psys_render_restore(object, particlesystem);
|
||||
}
|
||||
|
||||
psmd->flag &= ~eParticleSystemFlag_psys_updated;
|
||||
particle_system_update(scene, object, particlesystem);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue