From 62d1ed0120b26cd0860aa430ba2a03da74968556 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 12 Aug 2022 08:57:38 +1000 Subject: Cleanup: replace term face with poly Be consistent with naming to avoid mixing MPoly/MFace. --- source/blender/bmesh/intern/bmesh_mesh_convert.cc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'source/blender/bmesh/intern/bmesh_mesh_convert.cc') diff --git a/source/blender/bmesh/intern/bmesh_mesh_convert.cc b/source/blender/bmesh/intern/bmesh_mesh_convert.cc index cdaaabd1f05..b9c004b5392 100644 --- a/source/blender/bmesh/intern/bmesh_mesh_convert.cc +++ b/source/blender/bmesh/intern/bmesh_mesh_convert.cc @@ -950,7 +950,7 @@ static void write_elem_flag_to_attribute(blender::bke::MutableAttributeAccessor static void convert_bmesh_hide_flags_to_mesh_attributes(BMesh &bm, const bool need_hide_vert, const bool need_hide_edge, - const bool need_hide_face, + const bool need_hide_poly, Mesh &mesh) { using namespace blender; @@ -959,7 +959,7 @@ static void convert_bmesh_hide_flags_to_mesh_attributes(BMesh &bm, BLI_assert(CustomData_get_layer_named(&bm.edata, CD_PROP_BOOL, ".hide_edge") == nullptr); BLI_assert(CustomData_get_layer_named(&bm.pdata, CD_PROP_BOOL, ".hide_poly") == nullptr); - if (!(need_hide_vert || need_hide_edge || need_hide_face)) { + if (!(need_hide_vert || need_hide_edge || need_hide_poly)) { return; } @@ -975,7 +975,7 @@ static void convert_bmesh_hide_flags_to_mesh_attributes(BMesh &bm, return BM_elem_flag_test(BM_edge_at_index(&bm, i), BM_ELEM_HIDDEN); }); write_elem_flag_to_attribute( - attributes, ".hide_poly", ATTR_DOMAIN_FACE, need_hide_face, [&](const int i) { + attributes, ".hide_poly", ATTR_DOMAIN_FACE, need_hide_poly, [&](const int i) { return BM_elem_flag_test(BM_face_at_index(&bm, i), BM_ELEM_HIDDEN); }); } @@ -1038,7 +1038,7 @@ void BM_mesh_bm_to_me(Main *bmain, BMesh *bm, Mesh *me, const struct BMeshToMesh bool need_hide_vert = false; bool need_hide_edge = false; - bool need_hide_face = false; + bool need_hide_poly = false; /* Clear normals on the mesh completely, since the original vertex and polygon count might be * different than the BMesh's. */ @@ -1114,7 +1114,7 @@ void BM_mesh_bm_to_me(Main *bmain, BMesh *bm, Mesh *me, const struct BMeshToMesh mpoly->mat_nr = f->mat_nr; mpoly->flag = BM_face_flag_to_mflag(f); if (BM_elem_flag_test(f, BM_ELEM_HIDDEN)) { - need_hide_face = true; + need_hide_poly = true; } l_iter = l_first = BM_FACE_FIRST_LOOP(f); @@ -1209,7 +1209,7 @@ void BM_mesh_bm_to_me(Main *bmain, BMesh *bm, Mesh *me, const struct BMeshToMesh } convert_bmesh_hide_flags_to_mesh_attributes( - *bm, need_hide_vert, need_hide_edge, need_hide_face, *me); + *bm, need_hide_vert, need_hide_edge, need_hide_poly, *me); BKE_mesh_update_customdata_pointers(me, false); @@ -1306,7 +1306,7 @@ void BM_mesh_bm_to_me_for_eval(BMesh *bm, Mesh *me, const CustomData_MeshMasks * bool need_hide_vert = false; bool need_hide_edge = false; - bool need_hide_face = false; + bool need_hide_poly = false; /* Clear normals on the mesh completely, since the original vertex and polygon count might be * different than the BMesh's. */ @@ -1381,7 +1381,7 @@ void BM_mesh_bm_to_me_for_eval(BMesh *bm, Mesh *me, const CustomData_MeshMasks * mp->totloop = efa->len; mp->flag = BM_face_flag_to_mflag(efa); if (BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) { - need_hide_face = true; + need_hide_poly = true; } mp->loopstart = j; @@ -1404,7 +1404,7 @@ void BM_mesh_bm_to_me_for_eval(BMesh *bm, Mesh *me, const CustomData_MeshMasks * bm->elem_index_dirty &= ~(BM_FACE | BM_LOOP); convert_bmesh_hide_flags_to_mesh_attributes( - *bm, need_hide_vert, need_hide_edge, need_hide_face, *me); + *bm, need_hide_vert, need_hide_edge, need_hide_poly, *me); me->cd_flag = BM_mesh_cd_flag_from_bmesh(bm); } -- cgit v1.2.3