Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-01-18 13:17:43 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2022-01-20 23:11:48 +0300
commitb3fe135854776079353169fc1bbec2eeb8acef00 (patch)
treea09666189d55d128fcb0f2eb41aaa3c5f2acfd35
parent0039432cfcc596d9c97b30db30fd997c750fd0fb (diff)
Fix T94197: Applying boolean with fast solver clears bevel weights
For boolean operations only one of the meshes was checked to determine if bevel weights should be created. Now initialize custom data from both meshes flag. Note that this is a localized fix to be back-ported, further changes will be made so edit-mode conversion accounts for this without the caller needing explicit checks for custom-data flags.
-rw-r--r--source/blender/modifiers/intern/MOD_boolean.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/modifiers/intern/MOD_boolean.cc b/source/blender/modifiers/intern/MOD_boolean.cc
index 1121e30b0ff..e25522a7649 100644
--- a/source/blender/modifiers/intern/MOD_boolean.cc
+++ b/source/blender/modifiers/intern/MOD_boolean.cc
@@ -252,9 +252,13 @@ static BMesh *BMD_mesh_bm_create(
* otherwise the wrong active render layer is used, see T92384. */
BM_mesh_copy_init_customdata_from_mesh(bm, mesh, &allocsize);
- BMeshFromMeshParams params{};
- params.calc_face_normal = true;
- BM_mesh_bm_from_me(bm, mesh_operand_ob, &params);
+ /* NOTE(@campbellbarton): Handle in #BM_mesh_bm_from_me, this is a local fix for T94197. */
+ BM_mesh_cd_flag_apply(bm,
+ mesh->cd_flag | mesh_operand_ob->cd_flag | BM_mesh_cd_flag_from_bmesh(bm));
+
+ BMeshFromMeshParams bmesh_from_mesh_params{};
+ bmesh_from_mesh_params.calc_face_normal = true;
+ BM_mesh_bm_from_me(bm, mesh_operand_ob, &bmesh_from_mesh_params);
if (UNLIKELY(*r_is_flip)) {
const int cd_loop_mdisp_offset = CustomData_get_offset(&bm->ldata, CD_MDISPS);
@@ -265,7 +269,7 @@ static BMesh *BMD_mesh_bm_create(
}
}
- BM_mesh_bm_from_me(bm, mesh, &params);
+ BM_mesh_bm_from_me(bm, mesh, &bmesh_from_mesh_params);
return bm;
}