Fix for [#24409] Particle corruption after rendering with multires
* Also removed some unused flags from the particle modifier.
This commit is contained in:
@@ -548,12 +548,8 @@ typedef struct MeshDeformModifierData {
|
||||
} MeshDeformModifierData;
|
||||
|
||||
typedef enum {
|
||||
eParticleSystemFlag_Loaded = (1<<0),
|
||||
eParticleSystemFlag_Pars = (1<<1),
|
||||
eParticleSystemFlag_FromCurve = (1<<2),
|
||||
eParticleSystemFlag_DM_changed = (1<<3),
|
||||
eParticleSystemFlag_Disabled = (1<<4),
|
||||
eParticleSystemFlag_psys_updated = (1<<5),
|
||||
eParticleSystemFlag_Pars = (1<<0),
|
||||
eParticleSystemFlag_psys_updated = (1<<1),
|
||||
} ParticleSystemModifierFlag;
|
||||
|
||||
typedef struct ParticleSystemModifierData {
|
||||
|
@@ -154,6 +154,10 @@ static void deformVerts(ModifierData *md, Object *ob,
|
||||
psmd->dm->needsFree = 1;
|
||||
psmd->dm->release(psmd->dm);
|
||||
}
|
||||
else {
|
||||
/* no dm before, so recalc particles fully */
|
||||
psys->recalc |= PSYS_RECALC_RESET;
|
||||
}
|
||||
|
||||
/* make new dm */
|
||||
psmd->dm=CDDM_copy(dm);
|
||||
@@ -175,7 +179,6 @@ static void deformVerts(ModifierData *md, Object *ob,
|
||||
/* in file read dm hasn't really changed but just wasn't saved in file */
|
||||
|
||||
psys->recalc |= PSYS_RECALC_RESET;
|
||||
psmd->flag |= eParticleSystemFlag_DM_changed;
|
||||
|
||||
psmd->totdmvert= psmd->dm->getNumVerts(psmd->dm);
|
||||
psmd->totdmedge= psmd->dm->getNumEdges(psmd->dm);
|
||||
@@ -186,7 +189,6 @@ static void deformVerts(ModifierData *md, Object *ob,
|
||||
psmd->flag &= ~eParticleSystemFlag_psys_updated;
|
||||
particle_system_update(md->scene, ob, psys);
|
||||
psmd->flag |= eParticleSystemFlag_psys_updated;
|
||||
psmd->flag &= ~eParticleSystemFlag_DM_changed;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user