Fix #31339, Modifying mesh destroys particle system.

The particle system modifier has to ensure tesselation before testing for topology changes. It compares the number of vertices, edges and tesselation faces to the previously stored values.

Note that this test only detects a subset of actual topology changes (where the number of elements differs), but this is a known limitation we have to live with for now.
This commit is contained in:
Lukas Toenne
2012-07-25 11:26:10 +00:00
parent e771e07fe8
commit 1bb491348b

View File

@@ -176,6 +176,7 @@ static void deformVerts(ModifierData *md, Object *ob,
psmd->dm->needsFree = 0;
/* report change in mesh structure */
DM_ensure_tessface(psmd->dm);
if (psmd->dm->getNumVerts(psmd->dm) != psmd->totdmvert ||
psmd->dm->getNumEdges(psmd->dm) != psmd->totdmedge ||
psmd->dm->getNumTessFaces(psmd->dm) != psmd->totdmface)