Modifier stack: Fix broken 'dirty normals' flag for new mesh-aware modifiers.

Since modifier stack is still primarily based on DM in blender2.8, we
need to copy over 'dirty normals' flag from temp Mesh to DM after
modifier has been evaluated.
This commit is contained in:
Bastien Montagne
2018-05-07 12:24:23 +02:00
parent 68c5503570
commit 4e2125e967

View File

@@ -611,6 +611,11 @@ DerivedMesh *CDDM_from_mesh_ex(Mesh *mesh, int alloctype)
dm->deformedOnly = 1;
dm->cd_flag = mesh->cd_flag;
if (mesh->runtime.cd_dirty_vert & CD_MASK_NORMAL) {
dm->dirty |= DM_DIRTY_NORMALS;
}
/* TODO DM_DIRTY_TESS_CDLAYERS ? Maybe not though, since we probably want to switch to looptris ? */
CustomData_merge(&mesh->vdata, &dm->vertData, mask, alloctype,
mesh->totvert);
CustomData_merge(&mesh->edata, &dm->edgeData, mask, alloctype,