[Bf-blender-cvs] [0945ae338b4] master: Fix: Merging mesh and non-empty BMesh creates "flag" attributes

Hans Goudey noreply at git.blender.org
Thu Sep 15 19:52:44 CEST 2022


Commit: 0945ae338b4e7752baaea445ac193c24ff2f4d57
Author: Hans Goudey
Date:   Thu Sep 15 12:37:34 2022 -0500
Branches: master
https://developer.blender.org/rB0945ae338b4e7752baaea445ac193c24ff2f4d57

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.

===================================================================

M	source/blender/blenkernel/intern/customdata.cc

===================================================================

diff --git a/source/blender/blenkernel/intern/customdata.cc b/source/blender/blenkernel/intern/customdata.cc
index 82a1a2aa8f6..64e2d00dc1b 100644
--- a/source/blender/blenkernel/intern/customdata.cc
+++ b/source/blender/blenkernel/intern/customdata.cc
@@ -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);
     }



More information about the Bf-blender-cvs mailing list