diff options
author | Hans Goudey <h.goudey@me.com> | 2022-09-27 22:04:18 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-09-27 22:50:07 +0300 |
commit | aa58f58e46c39750fd0bcc695ff2f70007de380c (patch) | |
tree | c1c702f0d1a89d60228422d2c9639c6df38a2b32 /source/blender/blenkernel/intern/mesh.cc | |
parent | 2f0c40c7a27066755f29b2fb3960052ba4587b1f (diff) |
Fix: Assert in legacy mesh conversion
When setting the old face set custom data type, do it in the
"layers to write" vector instead of the mesh's poly custom
data layers, which weren't "prepared" yet. Otherwise this
could make the mesh's custom data typemap invalid.
Diffstat (limited to 'source/blender/blenkernel/intern/mesh.cc')
-rw-r--r-- | source/blender/blenkernel/intern/mesh.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/mesh.cc b/source/blender/blenkernel/intern/mesh.cc index dfd023b548b..4d98efde5f9 100644 --- a/source/blender/blenkernel/intern/mesh.cc +++ b/source/blender/blenkernel/intern/mesh.cc @@ -252,7 +252,7 @@ static void mesh_blend_write(BlendWriter *writer, ID *id, const void *id_address BKE_mesh_legacy_convert_selection_layers_to_flags(mesh); BKE_mesh_legacy_convert_material_indices_to_mpoly(mesh); BKE_mesh_legacy_bevel_weight_from_layers(mesh); - BKE_mesh_legacy_face_set_from_generic(mesh); + BKE_mesh_legacy_face_set_from_generic(mesh, poly_layers); BKE_mesh_legacy_edge_crease_from_layers(mesh); /* When converting to the old mesh format, don't save redundant attributes. */ names_to_skip.add_multiple_new({".hide_vert", |