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/alembic/intern/abc_mesh.cc | |
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/alembic/intern/abc_mesh.cc')
-rw-r--r-- | source/blender/alembic/intern/abc_mesh.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/alembic/intern/abc_mesh.cc b/source/blender/alembic/intern/abc_mesh.cc index 5d336c599f4..12c59964a8c 100644 --- a/source/blender/alembic/intern/abc_mesh.cc +++ b/source/blender/alembic/intern/abc_mesh.cc @@ -561,7 +561,7 @@ Mesh *AbcGenericMeshWriter::getFinalMesh(bool &r_needsfree) BM_mesh_triangulate(bm, quad_method, ngon_method, 4, tag_only, NULL, NULL, NULL); - Mesh *result = BKE_mesh_from_bmesh_for_eval_nomain(bm, NULL); + Mesh *result = BKE_mesh_from_bmesh_for_eval_nomain(bm, NULL, mesh); BM_mesh_free(bm); if (r_needsfree) { @@ -1192,8 +1192,6 @@ Mesh *AbcMeshReader::read_mesh(Mesh *existing_mesh, existing_mesh, positions->size(), 0, 0, face_indices->size(), face_counts->size()); settings.read_flag |= MOD_MESHSEQ_READ_ALL; - /* XXX fixme after 2.80; mesh->flag isn't copied by BKE_mesh_new_nomain_from_template() */ - new_mesh->flag |= (existing_mesh->flag & ME_AUTOSMOOTH); } else { /* If the face count changed (e.g. by triangulation), only read points. |