forked from bartvdbraak/blender
Partial fix [#30744] BMesh: Particle system face/volume emission doesn't work if there is a constructive modifier earlier.
When ORIGSPACE is added, it is now a loop data, so we need to mark tessdata as dirty too. Also fixed DM_ensure_tessface to check DM_DIRTY_TESS_CDLAYERS flag! This fixes problems with subsurf + dynapaint + particles, however, some modifiers, like remesh, seems to create a new dm from scratch, hence loosing completely those CD layers… Note this bug already existed in 2.62, so this is not a regression.
This commit is contained in:
parent
b1951ac1ba
commit
e0ead26312
@ -382,6 +382,13 @@ void DM_ensure_tessface(DerivedMesh *dm)
|
||||
__func__, numPolys, dm->type);
|
||||
}
|
||||
}
|
||||
|
||||
else if (dm->dirty && DM_DIRTY_TESS_CDLAYERS) {
|
||||
BLI_assert(CustomData_has_layer(&dm->faceData, CD_POLYINDEX));
|
||||
DM_update_tessface_data(dm);
|
||||
}
|
||||
|
||||
dm->dirty &= ~DM_DIRTY_TESS_CDLAYERS;
|
||||
}
|
||||
|
||||
/* Update tessface CD data from loop/poly ones. Needed when not retessellating after modstack evaluation. */
|
||||
@ -1629,7 +1636,7 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
|
||||
|
||||
deformedVerts = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* create an orco derivedmesh in parallel */
|
||||
if (nextmask & CD_MASK_ORCO) {
|
||||
@ -3061,6 +3068,8 @@ void DM_init_origspace(DerivedMesh *dm)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dm->dirty |= DM_DIRTY_TESS_CDLAYERS;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user