diff options
author | Hans Goudey <h.goudey@me.com> | 2022-08-10 06:57:05 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-08-10 06:57:05 +0300 |
commit | cd90c54d910b940fb41dc7d846101e37cdf7f917 (patch) | |
tree | 91663916c2ba11fcfac4f8a5cd6f24349bec4c56 | |
parent | 3eef1def7509d2fb91deb4e804dfc8394d4e9951 (diff) |
Rename `.hide_face` to `.hide_poly`
11 files changed, 30 insertions, 30 deletions
diff --git a/source/blender/blenkernel/intern/bvhutils.cc b/source/blender/blenkernel/intern/bvhutils.cc index 38b33bcc43a..ce3a483bfc2 100644 --- a/source/blender/blenkernel/intern/bvhutils.cc +++ b/source/blender/blenkernel/intern/bvhutils.cc @@ -1285,7 +1285,7 @@ BVHTree *BKE_bvhtree_from_mesh_get(struct BVHTreeFromMesh *data, blender::bke::AttributeAccessor attributes = blender::bke::mesh_attributes(*mesh); mask = looptri_no_hidden_map_get( mesh->mpoly, - attributes.lookup_or_default(".hide_face", ATTR_DOMAIN_FACE, false), + attributes.lookup_or_default(".hide_poly", ATTR_DOMAIN_FACE, false), looptri_len, &mask_bits_act_len); ATTR_FALLTHROUGH; diff --git a/source/blender/blenkernel/intern/customdata.cc b/source/blender/blenkernel/intern/customdata.cc index 969b9903a39..117d2958147 100644 --- a/source/blender/blenkernel/intern/customdata.cc +++ b/source/blender/blenkernel/intern/customdata.cc @@ -2344,7 +2344,7 @@ bool CustomData_merge(const CustomData *source, static bool attribute_stored_in_bmesh_flag(const StringRef name) { - return ELEM(name, ".hide_vert", ".hide_edge", ".hide_face"); + return ELEM(name, ".hide_vert", ".hide_edge", ".hide_poly"); } static CustomData shallow_copy_remove_non_bmesh_attributes(const CustomData &src) diff --git a/source/blender/blenkernel/intern/mesh_evaluate.cc b/source/blender/blenkernel/intern/mesh_evaluate.cc index 315c3ef51ab..135edba95db 100644 --- a/source/blender/blenkernel/intern/mesh_evaluate.cc +++ b/source/blender/blenkernel/intern/mesh_evaluate.cc @@ -744,7 +744,7 @@ void BKE_mesh_flush_hidden_from_verts(Mesh *me) ".hide_vert", ATTR_DOMAIN_POINT, false); if (hide_vert.is_single() && !hide_vert.get_internal_single()) { attributes.remove(".hide_edge"); - attributes.remove(".hide_face"); + attributes.remove(".hide_poly"); return; } const VArraySpan<bool> hide_vert_span{hide_vert}; @@ -763,7 +763,7 @@ void BKE_mesh_flush_hidden_from_verts(Mesh *me) /* Hide faces when any of their vertices are hidden. */ SpanAttributeWriter<bool> hide_face = attributes.lookup_or_add_for_write_only_span<bool>( - ".hide_face", ATTR_DOMAIN_FACE); + ".hide_poly", ATTR_DOMAIN_FACE); for (const int i : polys.index_range()) { const MPoly &poly = polys[i]; const Span<MLoop> loops = loops.slice(poly.loopstart, poly.totloop); @@ -780,7 +780,7 @@ void BKE_mesh_flush_hidden_from_polys(Mesh *me) MutableAttributeAccessor attributes = mesh_attributes_for_write(*me); const VArray<bool> hide_face = attributes.lookup_or_default<bool>( - ".hide_face", ATTR_DOMAIN_FACE, false); + ".hide_poly", ATTR_DOMAIN_FACE, false); if (hide_face.is_single() && !hide_face.get_internal_single()) { attributes.remove(".hide_vert"); attributes.remove(".hide_edge"); @@ -908,7 +908,7 @@ void BKE_mesh_flush_select_from_verts(Mesh *me) {me->mvert, me->totvert}, {me->mloop, me->totloop}, attributes.lookup_or_default<bool>(".hide_edge", ATTR_DOMAIN_EDGE, false), - attributes.lookup_or_default<bool>(".hide_face", ATTR_DOMAIN_FACE, false), + attributes.lookup_or_default<bool>(".hide_poly", ATTR_DOMAIN_FACE, false), {me->medge, me->totedge}, {me->mpoly, me->totpoly}); } diff --git a/source/blender/blenkernel/intern/mesh_legacy_convert.cc b/source/blender/blenkernel/intern/mesh_legacy_convert.cc index 601c2675b2b..04c1850f4ae 100644 --- a/source/blender/blenkernel/intern/mesh_legacy_convert.cc +++ b/source/blender/blenkernel/intern/mesh_legacy_convert.cc @@ -907,7 +907,7 @@ 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>( - ".hide_face", ATTR_DOMAIN_FACE, false); + ".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); @@ -953,7 +953,7 @@ void BKE_mesh_legacy_convert_flags_to_hide_layers(Mesh *mesh) return poly.flag & ME_HIDE; })) { SpanAttributeWriter<bool> hide_face = attributes.lookup_or_add_for_write_only_span<bool>( - ".hide_face", ATTR_DOMAIN_FACE); + ".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; diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c index 8f8e300005b..f802645cf3a 100644 --- a/source/blender/blenkernel/intern/paint.c +++ b/source/blender/blenkernel/intern/paint.c @@ -2071,7 +2071,7 @@ void BKE_sculpt_face_sets_ensure_from_base_mesh_visibility(Mesh *mesh) int *face_sets = CustomData_get_layer(&mesh->pdata, CD_SCULPT_FACE_SETS); const bool *hide_face = (const bool *)CustomData_get_layer_named( - &mesh->pdata, CD_PROP_BOOL, ".hide_face"); + &mesh->pdata, CD_PROP_BOOL, ".hide_poly"); for (int i = 0; i < mesh->totpoly; i++) { if (!(hide_face && hide_face[i])) { @@ -2099,7 +2099,7 @@ void BKE_sculpt_sync_face_sets_visibility_to_base_mesh(Mesh *mesh) return; } - bool *hide_face = (bool *)CustomData_get_layer_named(&mesh->pdata, CD_PROP_BOOL, ".hide_face"); + bool *hide_face = (bool *)CustomData_get_layer_named(&mesh->pdata, CD_PROP_BOOL, ".hide_poly"); if (!hide_face) { return; } diff --git a/source/blender/blenkernel/intern/subdiv_converter_mesh.c b/source/blender/blenkernel/intern/subdiv_converter_mesh.c index 557f6a04761..9c6d507d42c 100644 --- a/source/blender/blenkernel/intern/subdiv_converter_mesh.c +++ b/source/blender/blenkernel/intern/subdiv_converter_mesh.c @@ -206,7 +206,7 @@ static void precalc_uv_layer(const OpenSubdiv_Converter *converter, const int la } UvVertMap *uv_vert_map = BKE_mesh_uv_vert_map_create( mpoly, - (const bool *)CustomData_get_layer_named(&mesh->pdata, CD_PROP_BOOL, ".hide_face"), + (const bool *)CustomData_get_layer_named(&mesh->pdata, CD_PROP_BOOL, ".hide_poly"), mloop, mloopuv, num_poly, diff --git a/source/blender/bmesh/intern/bmesh_mesh_convert.cc b/source/blender/bmesh/intern/bmesh_mesh_convert.cc index 682c1ffac08..d7decc28fb6 100644 --- a/source/blender/bmesh/intern/bmesh_mesh_convert.cc +++ b/source/blender/bmesh/intern/bmesh_mesh_convert.cc @@ -361,7 +361,7 @@ void BM_mesh_bm_from_me(BMesh *bm, const Mesh *me, const struct BMeshFromMeshPar const bool *hide_edge = (const bool *)CustomData_get_layer_named( &me->edata, CD_PROP_BOOL, ".hide_edge"); const bool *hide_face = (const bool *)CustomData_get_layer_named( - &me->pdata, CD_PROP_BOOL, ".hide_face"); + &me->pdata, CD_PROP_BOOL, ".hide_poly"); Span<MVert> mvert{me->mvert, me->totvert}; Array<BMVert *> vtable(me->totvert); @@ -972,7 +972,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_face", ATTR_DOMAIN_FACE, need_hide_face, [&](const int i) { + attributes, ".hide_poly", ATTR_DOMAIN_FACE, need_hide_face, [&](const int i) { return BM_elem_flag_test(BM_face_at_index(&bm, i), BM_ELEM_HIDDEN); }); } diff --git a/source/blender/draw/intern/draw_cache_extract_mesh_render_data.cc b/source/blender/draw/intern/draw_cache_extract_mesh_render_data.cc index 5f3f6a9204d..071421f114a 100644 --- a/source/blender/draw/intern/draw_cache_extract_mesh_render_data.cc +++ b/source/blender/draw/intern/draw_cache_extract_mesh_render_data.cc @@ -584,7 +584,7 @@ MeshRenderData *mesh_render_data_create(Object *object, mr->hide_edge = static_cast<const bool *>( CustomData_get_layer_named(&me->edata, CD_PROP_BOOL, ".hide_edge")); mr->hide_face = static_cast<const bool *>( - CustomData_get_layer_named(&me->pdata, CD_PROP_BOOL, ".hide_face")); + CustomData_get_layer_named(&me->pdata, CD_PROP_BOOL, ".hide_poly")); } else { /* #BMesh */ diff --git a/source/blender/editors/mesh/editface.cc b/source/blender/editors/mesh/editface.cc index 88d2fce2933..e3863150a8b 100644 --- a/source/blender/editors/mesh/editface.cc +++ b/source/blender/editors/mesh/editface.cc @@ -83,9 +83,9 @@ void paintface_flush_flags(bContext *C, } if (flush_hidden) { const VArray<bool> hide_face_me = attributes_me.lookup_or_default<bool>( - ".hide_face", ATTR_DOMAIN_FACE, false); + ".hide_poly", ATTR_DOMAIN_FACE, false); bke::SpanAttributeWriter<bool> hide_face_orig = - attributes_orig.lookup_or_add_for_write_only_span<bool>(".hide_face", ATTR_DOMAIN_FACE); + attributes_orig.lookup_or_add_for_write_only_span<bool>(".hide_poly", ATTR_DOMAIN_FACE); hide_face_me.materialize(hide_face_orig.span); hide_face_orig.finish(); } @@ -104,9 +104,9 @@ void paintface_flush_flags(bContext *C, } } const VArray<bool> hide_face_orig = attributes_orig.lookup_or_default<bool>( - ".hide_face", ATTR_DOMAIN_FACE, false); + ".hide_poly", ATTR_DOMAIN_FACE, false); bke::SpanAttributeWriter<bool> hide_face_eval = - attributes_eval.lookup_or_add_for_write_only_span<bool>(".hide_face", ATTR_DOMAIN_FACE); + attributes_eval.lookup_or_add_for_write_only_span<bool>(".hide_poly", ATTR_DOMAIN_FACE); for (const int i : IndexRange(me_eval->totpoly)) { const int orig_face_index = index_array[i]; if (orig_face_index != ORIGINDEX_NONE) { @@ -146,7 +146,7 @@ void paintface_hide(bContext *C, Object *ob, const bool unselected) bke::MutableAttributeAccessor attributes = bke::mesh_attributes_for_write(*me); bke::SpanAttributeWriter<bool> hide_face = attributes.lookup_or_add_for_write_span<bool>( - ".hide_face", ATTR_DOMAIN_FACE); + ".hide_poly", ATTR_DOMAIN_FACE); for (int i = 0; i < me->totpoly; i++) { MPoly *mpoly = &me->mpoly[i]; @@ -180,7 +180,7 @@ void paintface_reveal(bContext *C, Object *ob, const bool select) if (select) { const VArray<bool> hide_face = attributes.lookup_or_default<bool>( - ".hide_face", ATTR_DOMAIN_FACE, false); + ".hide_poly", ATTR_DOMAIN_FACE, false); for (int i = 0; i < me->totpoly; i++) { MPoly *mpoly = &me->mpoly[i]; if (hide_face[i]) { @@ -189,7 +189,7 @@ void paintface_reveal(bContext *C, Object *ob, const bool select) } } - attributes.remove(".hide_face"); + attributes.remove(".hide_poly"); BKE_mesh_flush_hidden_from_polys(me); @@ -209,7 +209,7 @@ static void select_linked_tfaces_with_seams(Mesh *me, const uint index, const bo bke::AttributeAccessor attributes = bke::mesh_attributes(*me); const VArray<bool> hide_face = attributes.lookup_or_default<bool>( - ".hide_face", ATTR_DOMAIN_FACE, false); + ".hide_poly", ATTR_DOMAIN_FACE, false); if (index != (uint)-1) { /* only put face under cursor in array */ @@ -305,7 +305,7 @@ bool paintface_deselect_all_visible(bContext *C, Object *ob, int action, bool fl bke::AttributeAccessor attributes = bke::mesh_attributes(*me); const VArray<bool> hide_face = attributes.lookup_or_default<bool>( - ".hide_face", ATTR_DOMAIN_FACE, false); + ".hide_poly", ATTR_DOMAIN_FACE, false); if (action == SEL_TOGGLE) { action = SEL_SELECT; @@ -369,7 +369,7 @@ bool paintface_minmax(Object *ob, float r_min[3], float r_max[3]) bke::AttributeAccessor attributes = bke::mesh_attributes(*me); const VArray<bool> hide_face = attributes.lookup_or_default<bool>( - ".hide_face", ATTR_DOMAIN_FACE, false); + ".hide_poly", ATTR_DOMAIN_FACE, false); for (int i = 0; i < me->totpoly; i++) { MPoly *mp = &me->mpoly[i]; @@ -406,7 +406,7 @@ bool paintface_mouse_select(bContext *C, bke::AttributeAccessor attributes = bke::mesh_attributes(*me); const VArray<bool> hide_face = attributes.lookup_or_default<bool>( - ".hide_face", ATTR_DOMAIN_FACE, false); + ".hide_poly", ATTR_DOMAIN_FACE, false); if (ED_mesh_pick_face(C, ob, mval, ED_MESH_PICK_DEFAULT_FACE_DIST, &index)) { if (index < me->totpoly) { @@ -531,7 +531,7 @@ bool paintvert_deselect_all_visible(Object *ob, int action, bool flush_flags) const VArray<bool> hide_vert = attributes.lookup_or_default<bool>( ".hide_vert", ATTR_DOMAIN_POINT, false); const VArray<bool> hide_face = attributes.lookup_or_default<bool>( - ".hide_face", ATTR_DOMAIN_FACE, false); + ".hide_poly", ATTR_DOMAIN_FACE, false); if (action == SEL_TOGGLE) { action = SEL_SELECT; @@ -604,7 +604,7 @@ void paintvert_select_ungrouped(Object *ob, bool extend, bool flush_flags) bke::AttributeAccessor attributes = bke::mesh_attributes(*me); const VArray<bool> hide_face = attributes.lookup_or_default<bool>( - ".hide_face", ATTR_DOMAIN_FACE, false); + ".hide_poly", ATTR_DOMAIN_FACE, false); for (int i = 0; i < me->totvert; i++) { MVert *mv = &me->mvert[i]; diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index 0baf7fd0dae..ecbf20cef68 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -370,7 +370,7 @@ static bool edbm_backbuf_check_and_select_faces_obmode(Mesh *me, if (mpoly) { const bool *hide_face = (const bool *)CustomData_get_layer_named( - &me->vdata, CD_PROP_BOOL, ".hide_face"); + &me->vdata, CD_PROP_BOOL, ".hide_poly"); for (int index = 0; index < me->totpoly; index++, mpoly++) { if (!(hide_face && hide_face[index])) { diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index 3557827aca0..c04d606cacb 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -489,7 +489,7 @@ static bool rna_MeshPolygon_hide_get(PointerRNA *ptr) { const Mesh *mesh = rna_mesh(ptr); const bool *hide_face = (const bool *)CustomData_get_layer_named( - &mesh->pdata, CD_PROP_BOOL, ".hide_face"); + &mesh->pdata, CD_PROP_BOOL, ".hide_poly"); const int index = (const MPoly *)ptr->data - mesh->mpoly; BLI_assert(index >= 0); BLI_assert(index < mesh->totpoly); @@ -499,7 +499,7 @@ static bool rna_MeshPolygon_hide_get(PointerRNA *ptr) static void rna_MeshPolygon_hide_set(PointerRNA *ptr, bool value) { Mesh *mesh = rna_mesh(ptr); - bool *hide_face = (bool *)CustomData_get_layer_named(&mesh->pdata, CD_PROP_BOOL, ".hide_face"); + bool *hide_face = (bool *)CustomData_get_layer_named(&mesh->pdata, CD_PROP_BOOL, ".hide_poly"); const int index = (const MPoly *)ptr->data - mesh->mpoly; BLI_assert(index >= 0); BLI_assert(index < mesh->totpoly); |