Fix (unreported) datatransfer code could still modify source mesh in some cases.

Source (i.e. other) mesh should not be modified in any case in modifier
evaluation case (this is forbidden by design and can lead to all kind of
threaded locks and crashes), and doing so even in operator case was
never a good idea either.

Now that we can specifically request needed data (poly and/or loop
normals) from evaluation code, we can finally get rid of those
computations inside data transfer/mesh remapping area.

This is hopefully the last remaining bit of this 'bad crashing code' in
datatransfer area.
This commit is contained in:
2019-03-08 11:49:49 +01:00
parent cdba2bc0fc
commit 8730984c70
3 changed files with 11 additions and 12 deletions

View File

@@ -85,6 +85,8 @@ static void requiredDataMask(Object *UNUSED(ob), ModifierData *md, CustomData_Me
}
BKE_object_data_transfer_dttypes_to_cdmask(dtmd->data_types, r_cddata_masks);
BKE_mesh_remap_calc_source_cddata_masks_from_map_modes(
dtmd->vmap_mode, dtmd->emap_mode, dtmd->lmap_mode, dtmd->pmap_mode, r_cddata_masks);
}
static bool dependsOnNormals(ModifierData *md)