Reverted copying mesh->runtime.deformed_only in CDDM_from_mesh_ex

Doing that copy is the right thing, but only if the mesh has its own
deformed_only flag set correctly. This isn't generally the case, so
keeping dm->deformedOnly = 1 is better.
This commit is contained in:
Sybren A. Stüvel 2018-05-16 13:06:54 +02:00
parent 1bb9ccf887
commit 7fd44e2498
1 changed files with 4 additions and 1 deletions

View File

@ -608,7 +608,10 @@ DerivedMesh *CDDM_from_mesh_ex(Mesh *mesh, int alloctype)
DM_init(dm, DM_TYPE_CDDM, mesh->totvert, mesh->totedge, 0 /* mesh->totface */,
mesh->totloop, mesh->totpoly);
dm->deformedOnly = mesh->runtime.deformed_only;
/* This should actually be dm->deformedOnly = mesh->runtime.deformed_only,
* but only if the original mesh had its deformed_only flag correctly set
* (which isn't generally the case). */
dm->deformedOnly = 1;
dm->cd_flag = mesh->cd_flag;
if (mesh->runtime.cd_dirty_vert & CD_MASK_NORMAL) {