Fix T59687: Crash when rendering animation

The issue was caused by shape keys datablock from evaluated mesh
being added to the main database.

This commit makes it so shape keys are not copied for the mesh
used as cage.
This commit is contained in:
2018-12-21 14:23:06 +01:00
parent c9df453ce7
commit 494d13115c

View File

@@ -971,8 +971,8 @@ Mesh *BKE_mesh_new_from_object(
/* copies object and modifiers (but not the data) */
if (cage) {
/* copies the data */
tmpmesh = BKE_mesh_copy(bmain, ob->data);
Mesh *mesh = ob->data;
BKE_id_copy_ex(bmain, &mesh->id, (ID **)&tmpmesh, 0, false);
/* XXX BKE_mesh_copy() already handles materials usercount. */
do_mat_id_data_us = false;
}