diff options
author | Sybren A. Stüvel <sybren@stuvel.eu> | 2018-05-22 18:36:58 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2018-05-22 18:38:27 +0300 |
commit | 3c44c67e96da881dd60a6c6a88c9dd43dcb94245 (patch) | |
tree | 591a5894e709c4bfbe50515d23f5f13bda261c4a /source/blender/blenkernel | |
parent | 66d18d93c484e36f7ca0e70220adad19cbe2abc3 (diff) |
Removed no-longer-required workaround for doubly-deformed meshes
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/DerivedMesh.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index 602dd4c965b..c9ff25c4e0c 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -1183,10 +1183,7 @@ DerivedMesh *mesh_create_derived_for_modifier( if (mti->type == eModifierTypeType_OnlyDeform) { int numVerts; - /* Always get the vertex coordinates from the original mesh. Otherwise - * there is the risk of deforming already-deformed coordinates. */ - Mesh *mesh_orig_id = (Mesh *)DEG_get_original_id(&me->id); - float (*deformedVerts)[3] = BKE_mesh_vertexCos_get(mesh_orig_id, &numVerts); + float (*deformedVerts)[3] = BKE_mesh_vertexCos_get(me, &numVerts); modwrap_deformVerts(md, &mectx, NULL, deformedVerts, numVerts); dm = mesh_create_derived(me, deformedVerts); @@ -2014,9 +2011,6 @@ static void mesh_calc_modifiers( Mesh **r_deform_mesh, Mesh **r_final_mesh) { Mesh *me = ob->data; - /* Always get the vertex coordinates from the original mesh. Otherwise - * there is the risk of deforming already-deformed coordinates. */ - Mesh *mesh_orig_id = (Mesh *)DEG_get_original_id(&me->id); ModifierData *firstmd, *md, *previewmd = NULL; CDMaskLink *datamasks, *curr; /* XXX Always copying POLYINDEX, else tessellated data are no more valid! */ @@ -2110,7 +2104,7 @@ static void mesh_calc_modifiers( if (mti->type == eModifierTypeType_OnlyDeform && !sculpt_dyntopo) { if (!deformedVerts) - deformedVerts = BKE_mesh_vertexCos_get(mesh_orig_id, &numVerts); + deformedVerts = BKE_mesh_vertexCos_get(me, &numVerts); modifier_deformVerts_ensure_normals(md, &mectx_deform, NULL, deformedVerts, numVerts); } @@ -2147,7 +2141,7 @@ static void mesh_calc_modifiers( if (inputVertexCos) deformedVerts = inputVertexCos; else - deformedVerts = BKE_mesh_vertexCos_get(mesh_orig_id, &numVerts); + deformedVerts = BKE_mesh_vertexCos_get(me, &numVerts); } @@ -2242,7 +2236,7 @@ static void mesh_calc_modifiers( deformedVerts = BKE_mesh_vertexCos_get(mesh, &numVerts); } else { - deformedVerts = BKE_mesh_vertexCos_get(mesh_orig_id, &numVerts); + deformedVerts = BKE_mesh_vertexCos_get(me, &numVerts); } } |