Fix: Merging mesh and non-empty BMesh creates "flag" attributes

We need to use the custom data copy function that skips mesh-only
attributes like the hide status attributes, the generic material index
attribute, etc. Otherwise the BMesh has those attributes which
conflict with their builtin counterparts.
This commit is contained in:
Hans Goudey
2022-09-15 12:37:34 -05:00
parent 8b26349d57
commit 0945ae338b

View File

@@ -3751,7 +3751,7 @@ bool CustomData_bmesh_merge(const CustomData *source,
destold.layers = static_cast<CustomDataLayer *>(MEM_dupallocN(destold.layers));
}
if (CustomData_merge(source, dest, mask, alloctype, 0) == false) {
if (CustomData_merge_mesh_to_bmesh(source, dest, mask, alloctype, 0) == false) {
if (destold.layers) {
MEM_freeN(destold.layers);
}