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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user