diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-09-16 11:45:49 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-09-23 17:27:23 +0300 |
commit | a168c3d282083bb4c02078bbd374f5554eeddce3 (patch) | |
tree | 291f6e0a64b09066985013a65abbecfcd96c774c /source/blender/blenkernel/intern/crazyspace.c | |
parent | 69ad44d5b48aa0d2cf00ff6c37be01f7384afe3b (diff) |
Modifiers: every modifier now copies mesh settings, fixing texture space issues
Modifier stack evaluation would copy mesh settings other than mesh topology
automatically, outside of the individual modifier evaluation. This leads to hard
to understand code, and makes it unclear which settings are available in following
modifiers, and which only after the entire stack is evaluated.
Now every modifier is responsible to ensure the mesh it outputs preserves materials,
texture space and other settings, or alters them as needed.
Fixes T64739: incorrect texture space for various modifiers
Differential Revision: https://developer.blender.org/D5808
Diffstat (limited to 'source/blender/blenkernel/intern/crazyspace.c')
-rw-r--r-- | source/blender/blenkernel/intern/crazyspace.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/crazyspace.c b/source/blender/blenkernel/intern/crazyspace.c index af4bd5d2ebd..6740fc985e9 100644 --- a/source/blender/blenkernel/intern/crazyspace.c +++ b/source/blender/blenkernel/intern/crazyspace.c @@ -261,7 +261,8 @@ int BKE_crazyspace_get_first_deform_matrices_editbmesh(struct Depsgraph *depsgra float (**deformcos)[3]) { ModifierData *md; - Mesh *me; + Mesh *me_input = ob->data; + Mesh *me = NULL; int i, a, numleft = 0, numVerts = 0; int cageIndex = modifiers_getCageIndex(scene, ob, NULL, 1); float(*defmats)[3][3] = NULL, (*deformedVerts)[3] = NULL; @@ -270,7 +271,6 @@ int BKE_crazyspace_get_first_deform_matrices_editbmesh(struct Depsgraph *depsgra modifiers_clearErrors(ob); - me = NULL; md = modifiers_getVirtualModifierList(ob, &virtualModifierData); /* compute the deformation matrices and coordinates for the first @@ -292,7 +292,7 @@ int BKE_crazyspace_get_first_deform_matrices_editbmesh(struct Depsgraph *depsgra data_mask = datamasks->mask; BLI_linklist_free((LinkNode *)datamasks, NULL); - me = BKE_mesh_from_editmesh_with_coords_thin_wrap(em, &data_mask, NULL); + me = BKE_mesh_from_editmesh_with_coords_thin_wrap(em, &data_mask, NULL, me_input); deformedVerts = editbmesh_vert_coords_alloc(em, &numVerts); defmats = MEM_mallocN(sizeof(*defmats) * numVerts, "defmats"); |