diff options
author | Campbell Barton <campbell@blender.org> | 2022-08-12 01:57:38 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-08-12 01:57:38 +0300 |
commit | 62d1ed0120b26cd0860aa430ba2a03da74968556 (patch) | |
tree | 9b7c75f71f5e7d31b1f26cadd96da900c8aeedb3 /source/blender/blenkernel/intern | |
parent | 344919240c8bd9ad2457f1775596bf0a1bd7560f (diff) |
Cleanup: replace term face with poly
Be consistent with naming to avoid mixing MPoly/MFace.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/mesh_evaluate.cc | 12 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/mesh_legacy_convert.cc | 10 |
2 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/blenkernel/intern/mesh_evaluate.cc b/source/blender/blenkernel/intern/mesh_evaluate.cc index ebd9798be7b..9dba8eab340 100644 --- a/source/blender/blenkernel/intern/mesh_evaluate.cc +++ b/source/blender/blenkernel/intern/mesh_evaluate.cc @@ -761,7 +761,7 @@ void BKE_mesh_flush_hidden_from_verts(Mesh *me) } hide_edge.finish(); - /* Hide faces when any of their vertices are hidden. */ + /* Hide polygons when any of their vertices are hidden. */ SpanAttributeWriter<bool> hide_poly = attributes.lookup_or_add_for_write_only_span<bool>( ".hide_poly", ATTR_DOMAIN_FACE); for (const int i : polys.index_range()) { @@ -787,7 +787,7 @@ void BKE_mesh_flush_hidden_from_polys(Mesh *me) attributes.remove(".hide_edge"); return; } - const VArraySpan<bool> hide_face_span{hide_poly}; + const VArraySpan<bool> hide_poly_span{hide_poly}; const Span<MPoly> polys(me->mpoly, me->totpoly); const Span<MLoop> loops(me->mloop, me->totloop); SpanAttributeWriter<bool> hide_vert = attributes.lookup_or_add_for_write_only_span<bool>( @@ -795,9 +795,9 @@ void BKE_mesh_flush_hidden_from_polys(Mesh *me) SpanAttributeWriter<bool> hide_edge = attributes.lookup_or_add_for_write_only_span<bool>( ".hide_edge", ATTR_DOMAIN_EDGE); - /* Hide all edges or vertices connected to hidden faces. */ + /* Hide all edges or vertices connected to hidden polygons. */ for (const int i : polys.index_range()) { - if (hide_face_span[i]) { + if (hide_poly_span[i]) { const MPoly &poly = polys[i]; for (const MLoop &loop : loops.slice(poly.loopstart, poly.totloop)) { hide_vert.span[loop.v] = true; @@ -805,9 +805,9 @@ void BKE_mesh_flush_hidden_from_polys(Mesh *me) } } } - /* Unhide vertices and edges connected to visible faces. */ + /* Unhide vertices and edges connected to visible polygons. */ for (const int i : polys.index_range()) { - if (!hide_face_span[i]) { + if (!hide_poly_span[i]) { const MPoly &poly = polys[i]; for (const MLoop &loop : loops.slice(poly.loopstart, poly.totloop)) { hide_vert.span[loop.v] = false; diff --git a/source/blender/blenkernel/intern/mesh_legacy_convert.cc b/source/blender/blenkernel/intern/mesh_legacy_convert.cc index 04c1850f4ae..975197a7d58 100644 --- a/source/blender/blenkernel/intern/mesh_legacy_convert.cc +++ b/source/blender/blenkernel/intern/mesh_legacy_convert.cc @@ -906,11 +906,11 @@ void BKE_mesh_legacy_convert_hide_layers_to_flags(Mesh *mesh) }); MutableSpan<MPoly> polygons(mesh->mpoly, mesh->totpoly); - const VArray<bool> hide_face = attributes.lookup_or_default<bool>( + const VArray<bool> hide_poly = attributes.lookup_or_default<bool>( ".hide_poly", ATTR_DOMAIN_FACE, false); threading::parallel_for(polygons.index_range(), 4096, [&](IndexRange range) { for (const int i : range) { - SET_FLAG_FROM_TEST(polygons[i].flag, hide_face[i], ME_HIDE); + SET_FLAG_FROM_TEST(polygons[i].flag, hide_poly[i], ME_HIDE); } }); } @@ -952,14 +952,14 @@ void BKE_mesh_legacy_convert_flags_to_hide_layers(Mesh *mesh) if (std::any_of(polygons.begin(), polygons.end(), [](const MPoly &poly) { return poly.flag & ME_HIDE; })) { - SpanAttributeWriter<bool> hide_face = attributes.lookup_or_add_for_write_only_span<bool>( + SpanAttributeWriter<bool> hide_poly = attributes.lookup_or_add_for_write_only_span<bool>( ".hide_poly", ATTR_DOMAIN_FACE); threading::parallel_for(polygons.index_range(), 4096, [&](IndexRange range) { for (const int i : range) { - hide_face.span[i] = polygons[i].flag & ME_HIDE; + hide_poly.span[i] = polygons[i].flag & ME_HIDE; } }); - hide_face.finish(); + hide_poly.finish(); } } |