diff options
author | Hans Goudey <h.goudey@me.com> | 2022-08-11 19:37:51 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-08-11 19:37:51 +0300 |
commit | 1b3814e33cf22b3b0fd8bec44cba8599cd05c09b (patch) | |
tree | 630c7f135b4774aa931ee6191fa0d2c056fb0288 /source/blender | |
parent | 9b01fc7f2ab998f460dd7ac5bbdd593dca832c38 (diff) |
Rename variables to hide_poly
Diffstat (limited to 'source/blender')
18 files changed, 68 insertions, 68 deletions
diff --git a/source/blender/blenkernel/BKE_mesh_mapping.h b/source/blender/blenkernel/BKE_mesh_mapping.h index 5bc6e8a02af..abe590b6806 100644 --- a/source/blender/blenkernel/BKE_mesh_mapping.h +++ b/source/blender/blenkernel/BKE_mesh_mapping.h @@ -92,7 +92,7 @@ typedef struct MeshElemMap { /* mapping */ UvVertMap *BKE_mesh_uv_vert_map_create(const struct MPoly *mpoly, - const bool *hide_face, + const bool *hide_poly, const struct MLoop *mloop, const struct MLoopUV *mloopuv, unsigned int totpoly, diff --git a/source/blender/blenkernel/intern/bvhutils.cc b/source/blender/blenkernel/intern/bvhutils.cc index ce3a483bfc2..d0b57b45d35 100644 --- a/source/blender/blenkernel/intern/bvhutils.cc +++ b/source/blender/blenkernel/intern/bvhutils.cc @@ -1183,11 +1183,11 @@ static BLI_bitmap *loose_edges_map_get(const MEdge *medge, } static BLI_bitmap *looptri_no_hidden_map_get(const MPoly *mpoly, - const VArray<bool> &hide_face, + const VArray<bool> &hide_poly, const int looptri_len, int *r_looptri_active_len) { - if (hide_face.is_single() && !hide_face.get_internal_single()) { + if (hide_poly.is_single() && !hide_poly.get_internal_single()) { return nullptr; } BLI_bitmap *looptri_mask = BLI_BITMAP_NEW(looptri_len, __func__); @@ -1197,7 +1197,7 @@ static BLI_bitmap *looptri_no_hidden_map_get(const MPoly *mpoly, int i_poly = 0; while (looptri_iter != looptri_len) { int mp_totlooptri = mpoly[i_poly].totloop - 2; - if (hide_face[i_poly]) { + if (hide_poly[i_poly]) { looptri_iter += mp_totlooptri; } else { diff --git a/source/blender/blenkernel/intern/mesh_evaluate.cc b/source/blender/blenkernel/intern/mesh_evaluate.cc index 135edba95db..ebe1f8852e4 100644 --- a/source/blender/blenkernel/intern/mesh_evaluate.cc +++ b/source/blender/blenkernel/intern/mesh_evaluate.cc @@ -762,15 +762,15 @@ void BKE_mesh_flush_hidden_from_verts(Mesh *me) hide_edge.finish(); /* Hide faces when any of their vertices are hidden. */ - 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); for (const int i : polys.index_range()) { const MPoly &poly = polys[i]; const Span<MLoop> loops = loops.slice(poly.loopstart, poly.totloop); - hide_face.span[i] = std::any_of( + hide_poly.span[i] = std::any_of( loops.begin(), loops.end(), [&](const MLoop &loop) { return hide_vert_span[loop.v]; }); } - hide_face.finish(); + hide_poly.finish(); } void BKE_mesh_flush_hidden_from_polys(Mesh *me) @@ -779,14 +779,14 @@ void BKE_mesh_flush_hidden_from_polys(Mesh *me) using namespace blender::bke; MutableAttributeAccessor attributes = mesh_attributes_for_write(*me); - 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); - if (hide_face.is_single() && !hide_face.get_internal_single()) { + if (hide_poly.is_single() && !hide_poly.get_internal_single()) { attributes.remove(".hide_vert"); attributes.remove(".hide_edge"); return; } - const VArraySpan<bool> hide_face_span{hide_face}; + const VArraySpan<bool> hide_face_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>( @@ -865,7 +865,7 @@ void BKE_mesh_flush_select_from_polys(Mesh *me) static void mesh_flush_select_from_verts(const Span<MVert> verts, const Span<MLoop> loops, const VArray<bool> &hide_edge, - const VArray<bool> &hide_face, + const VArray<bool> &hide_poly, MutableSpan<MEdge> edges, MutableSpan<MPoly> polys) { @@ -882,7 +882,7 @@ static void mesh_flush_select_from_verts(const Span<MVert> verts, } for (const int i : polys.index_range()) { - if (hide_face[i]) { + if (hide_poly[i]) { continue; } MPoly &poly = polys[i]; diff --git a/source/blender/blenkernel/intern/mesh_mapping.c b/source/blender/blenkernel/intern/mesh_mapping.c index 80b16045056..798fe087ea8 100644 --- a/source/blender/blenkernel/intern/mesh_mapping.c +++ b/source/blender/blenkernel/intern/mesh_mapping.c @@ -29,7 +29,7 @@ /* ngon version wip, based on BM_uv_vert_map_create */ UvVertMap *BKE_mesh_uv_vert_map_create(const MPoly *mpoly, - const bool *hide_face, + const bool *hide_poly, const MLoop *mloop, const MLoopUV *mloopuv, uint totpoly, @@ -52,7 +52,7 @@ UvVertMap *BKE_mesh_uv_vert_map_create(const MPoly *mpoly, /* generate UvMapVert array */ mp = mpoly; for (a = 0; a < totpoly; a++, mp++) { - if (!selected || (!(hide_face && hide_face[a]) && (mp->flag & ME_FACE_SEL))) { + if (!selected || (!(hide_poly && hide_poly[a]) && (mp->flag & ME_FACE_SEL))) { totuv += mp->totloop; } } @@ -75,7 +75,7 @@ UvVertMap *BKE_mesh_uv_vert_map_create(const MPoly *mpoly, mp = mpoly; for (a = 0; a < totpoly; a++, mp++) { - if (!selected || (!(hide_face && hide_face[a]) && (mp->flag & ME_FACE_SEL))) { + if (!selected || (!(hide_poly && hide_poly[a]) && (mp->flag & ME_FACE_SEL))) { float(*tf_uv)[2] = NULL; if (use_winding) { diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c index f802645cf3a..922ea45703d 100644 --- a/source/blender/blenkernel/intern/paint.c +++ b/source/blender/blenkernel/intern/paint.c @@ -2070,11 +2070,11 @@ 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( + const bool *hide_poly = (const bool *)CustomData_get_layer_named( &mesh->pdata, CD_PROP_BOOL, ".hide_poly"); for (int i = 0; i < mesh->totpoly; i++) { - if (!(hide_face && hide_face[i])) { + if (!(hide_poly && hide_poly[i])) { continue; } @@ -2099,13 +2099,13 @@ 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_poly"); - if (!hide_face) { + bool *hide_poly = (bool *)CustomData_get_layer_named(&mesh->pdata, CD_PROP_BOOL, ".hide_poly"); + if (!hide_poly) { return; } for (int i = 0; i < mesh->totpoly; i++) { - hide_face[i] = face_sets[i] < 0; + hide_poly[i] = face_sets[i] < 0; } BKE_mesh_flush_hidden_from_polys(mesh); diff --git a/source/blender/bmesh/intern/bmesh_mesh_convert.cc b/source/blender/bmesh/intern/bmesh_mesh_convert.cc index 8148a50f106..cdaaabd1f05 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 &me->vdata, CD_PROP_BOOL, ".hide_vert"); 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( + const bool *hide_poly = (const bool *)CustomData_get_layer_named( &me->pdata, CD_PROP_BOOL, ".hide_poly"); Span<MVert> mvert{me->mvert, me->totvert}; @@ -475,7 +475,7 @@ void BM_mesh_bm_from_me(BMesh *bm, const Mesh *me, const struct BMeshFromMeshPar /* Transfer flag. */ f->head.hflag = BM_face_flag_from_mflag(mpoly[i].flag & ~ME_FACE_SEL); - if (hide_face && hide_face[i]) { + if (hide_poly && hide_poly[i]) { BM_elem_flag_enable(f, 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 071421f114a..0159c9fc86e 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 @@ -229,7 +229,7 @@ static void mesh_render_data_polys_sorted_build(MeshRenderData *mr, MeshBufferCa } else { for (int i = 0; i < mr->poly_len; i++) { - if (!(mr->use_hide && mr->hide_face && mr->hide_face[i])) { + if (!(mr->use_hide && mr->hide_poly && mr->hide_poly[i])) { const MPoly *mp = &mr->mpoly[i]; const int mat = min_ii(mp->mat_nr, mat_last); tri_first_index[i] = mat_tri_offs[mat]; @@ -269,7 +269,7 @@ static void mesh_render_data_mat_tri_len_mesh_range_fn(void *__restrict userdata int *mat_tri_len = static_cast<int *>(tls->userdata_chunk); const MPoly *mp = &mr->mpoly[iter]; - if (!(mr->use_hide && mr->hide_face && mr->hide_face[iter])) { + if (!(mr->use_hide && mr->hide_poly && mr->hide_poly[iter])) { int mat = min_ii(mp->mat_nr, mr->mat_len - 1); mat_tri_len[mat] += mp->totloop - 2; } @@ -583,7 +583,7 @@ MeshRenderData *mesh_render_data_create(Object *object, CustomData_get_layer_named(&me->vdata, CD_PROP_BOOL, ".hide_vert")); 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 *>( + mr->hide_poly = static_cast<const bool *>( CustomData_get_layer_named(&me->pdata, CD_PROP_BOOL, ".hide_poly")); } else { diff --git a/source/blender/draw/intern/draw_cache_impl_subdivision.cc b/source/blender/draw/intern/draw_cache_impl_subdivision.cc index 47e82cbd954..075e08eb49f 100644 --- a/source/blender/draw/intern/draw_cache_impl_subdivision.cc +++ b/source/blender/draw/intern/draw_cache_impl_subdivision.cc @@ -680,7 +680,7 @@ static void draw_subdiv_cache_extra_coarse_face_data_mesh(const MeshRenderData * if ((mesh->mpoly[i].flag & ME_FACE_SEL) != 0) { flag |= SUBDIV_COARSE_FACE_FLAG_SELECT; } - if (mr->hide_face && mr->hide_face[i]) { + if (mr->hide_poly && mr->hide_poly[i]) { flag |= SUBDIV_COARSE_FACE_FLAG_HIDDEN; } flags_data[i] = (uint)(mesh->mpoly[i].loopstart) | (flag << SUBDIV_COARSE_FACE_FLAG_OFFSET); diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh.hh b/source/blender/draw/intern/mesh_extractors/extract_mesh.hh index f634d83c783..57abf088c16 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh.hh +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh.hh @@ -85,7 +85,7 @@ struct MeshRenderData { const float (*poly_normals)[3]; const bool *hide_vert; const bool *hide_edge; - const bool *hide_face; + const bool *hide_poly; float (*loop_normals)[3]; int *lverts, *ledges; diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_edituv.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_edituv.cc index b018c848a74..9f82cc56941 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_edituv.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_edituv.cc @@ -61,7 +61,7 @@ static void extract_edituv_tris_iter_looptri_mesh(const MeshRenderData *mr, MeshExtract_EditUvElem_Data *data = static_cast<MeshExtract_EditUvElem_Data *>(_data); const MPoly *mp = &mr->mpoly[mlt->poly]; edituv_tri_add(data, - mr->hide_face && mr->hide_face[mlt->poly], + mr->hide_poly && mr->hide_poly[mlt->poly], (mp->flag & ME_FACE_SEL) != 0, mlt->tri[0], mlt->tri[1], @@ -125,7 +125,7 @@ static void extract_edituv_tris_iter_subdiv_mesh(const DRWSubdivCache *UNUSED(su MeshExtract_EditUvElem_Data *data = static_cast<MeshExtract_EditUvElem_Data *>(_data); const uint loop_idx = subdiv_quad_index * 4; - const bool hidden = mr->hide_face && mr->hide_face[coarse_quad - mr->mpoly]; + const bool hidden = mr->hide_poly && mr->hide_poly[coarse_quad - mr->mpoly]; edituv_tri_add( data, hidden, (coarse_quad->flag & ME_FACE_SEL) != 0, loop_idx, loop_idx + 1, loop_idx + 2); @@ -212,7 +212,7 @@ static void extract_edituv_lines_iter_poly_mesh(const MeshRenderData *mr, void *_data) { MeshExtract_EditUvElem_Data *data = static_cast<MeshExtract_EditUvElem_Data *>(_data); - const bool hidden = mr->hide_face && mr->hide_face[mp - mr->mpoly]; + const bool hidden = mr->hide_poly && mr->hide_poly[mp - mr->mpoly]; const MLoop *mloop = mr->mloop; const int ml_index_end = mp->loopstart + mp->totloop; @@ -281,7 +281,7 @@ static void extract_edituv_lines_iter_subdiv_mesh(const DRWSubdivCache *subdiv_c const MPoly *coarse_poly) { MeshExtract_EditUvElem_Data *data = static_cast<MeshExtract_EditUvElem_Data *>(_data); - const bool hidden = mr->hide_face && mr->hide_face[coarse_poly - mr->mpoly]; + const bool hidden = mr->hide_poly && mr->hide_poly[coarse_poly - mr->mpoly]; int *subdiv_loop_edge_index = (int *)GPU_vertbuf_get_data(subdiv_cache->edges_orig_index); @@ -377,7 +377,7 @@ static void extract_edituv_points_iter_poly_mesh(const MeshRenderData *mr, void *_data) { MeshExtract_EditUvElem_Data *data = static_cast<MeshExtract_EditUvElem_Data *>(_data); - const bool hidden = mr->hide_face && mr->hide_face[mp - mr->mpoly]; + const bool hidden = mr->hide_poly && mr->hide_poly[mp - mr->mpoly]; const MLoop *mloop = mr->mloop; const int ml_index_end = mp->loopstart + mp->totloop; @@ -438,7 +438,7 @@ static void extract_edituv_points_iter_subdiv_mesh(const DRWSubdivCache *subdiv_ const MPoly *coarse_quad) { MeshExtract_EditUvElem_Data *data = static_cast<MeshExtract_EditUvElem_Data *>(_data); - const bool hidden = mr->hide_face && mr->hide_face[coarse_quad - mr->mpoly]; + const bool hidden = mr->hide_poly && mr->hide_poly[coarse_quad - mr->mpoly]; int *subdiv_loop_vert_index = (int *)GPU_vertbuf_get_data(subdiv_cache->verts_orig_index); uint start_loop_idx = subdiv_quad_index * 4; @@ -527,7 +527,7 @@ static void extract_edituv_fdots_iter_poly_mesh(const MeshRenderData *mr, void *_data) { MeshExtract_EditUvElem_Data *data = static_cast<MeshExtract_EditUvElem_Data *>(_data); - const bool hidden = mr->hide_face && mr->hide_face[mp - mr->mpoly]; + const bool hidden = mr->hide_poly && mr->hide_poly[mp - mr->mpoly]; if (mr->use_subsurf_fdots) { const BLI_bitmap *facedot_tags = mr->me->runtime.subsurf_face_dot_tags; diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_fdots.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_fdots.cc index 846f57eef3e..8dc00617039 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_fdots.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_fdots.cc @@ -42,7 +42,7 @@ static void extract_fdots_iter_poly_mesh(const MeshRenderData *mr, const int mp_index, void *_userdata) { - const bool hidden = mr->use_hide && mr->hide_face && mr->hide_face[mp - mr->mpoly]; + const bool hidden = mr->use_hide && mr->hide_poly && mr->hide_poly[mp - mr->mpoly]; GPUIndexBufBuilder *elb = static_cast<GPUIndexBufBuilder *>(_userdata); if (mr->use_subsurf_fdots) { diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines_adjacency.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines_adjacency.cc index 27ad5ecef80..d6c246c51a9 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines_adjacency.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_lines_adjacency.cc @@ -119,7 +119,7 @@ static void extract_lines_adjacency_iter_looptri_mesh(const MeshRenderData *mr, void *_data) { MeshExtract_LineAdjacency_Data *data = static_cast<MeshExtract_LineAdjacency_Data *>(_data); - const bool hidden = mr->use_hide && mr->hide_face && mr->hide_face[mlt->poly]; + const bool hidden = mr->use_hide && mr->hide_poly && mr->hide_poly[mlt->poly]; if (hidden) { return; } diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_tris.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_tris.cc index d35cc4a204b..2e3e6c7b6b1 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_tris.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_tris.cc @@ -189,7 +189,7 @@ static void extract_tris_single_mat_iter_looptri_mesh(const MeshRenderData *mr, void *_data) { GPUIndexBufBuilder *elb = static_cast<GPUIndexBufBuilder *>(_data); - const bool hidden = mr->use_hide && mr->hide_face && mr->hide_face[mlt->poly]; + const bool hidden = mr->use_hide && mr->hide_poly && mr->hide_poly[mlt->poly]; if (hidden) { GPU_indexbuf_set_tri_restart(elb, mlt_index); } diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_lnor.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_lnor.cc index 67246af594d..ef67e1b540d 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_lnor.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_lnor.cc @@ -62,7 +62,7 @@ static void extract_lnor_iter_poly_mesh(const MeshRenderData *mr, const int mp_index, void *data) { - const bool hidden = mr->hide_face && mr->hide_face[mp_index]; + const bool hidden = mr->hide_poly && mr->hide_poly[mp_index]; const MLoop *mloop = mr->mloop; const int ml_index_end = mp->loopstart + mp->totloop; @@ -187,7 +187,7 @@ static void extract_lnor_hq_iter_poly_mesh(const MeshRenderData *mr, const int mp_index, void *data) { - const bool hidden = mr->hide_face && mr->hide_face[mp_index]; + const bool hidden = mr->hide_poly && mr->hide_poly[mp_index]; const MLoop *mloop = mr->mloop; const int ml_index_end = mp->loopstart + mp->totloop; diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_pos_nor.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_pos_nor.cc index 6a9fdf76e2b..4d2a10e83ce 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_pos_nor.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_pos_nor.cc @@ -87,7 +87,7 @@ static void extract_pos_nor_iter_poly_mesh(const MeshRenderData *mr, void *_data) { MeshExtract_PosNor_Data *data = static_cast<MeshExtract_PosNor_Data *>(_data); - const bool face_hidden = mr->hide_face && mr->hide_face[mp_index]; + const bool face_hidden = mr->hide_poly && mr->hide_poly[mp_index]; const MLoop *mloop = mr->mloop; const int ml_index_end = mp->loopstart + mp->totloop; @@ -434,7 +434,7 @@ static void extract_pos_nor_hq_iter_poly_mesh(const MeshRenderData *mr, void *_data) { MeshExtract_PosNorHQ_Data *data = static_cast<MeshExtract_PosNorHQ_Data *>(_data); - const bool face_hidden = mr->hide_face && mr->hide_face[mp - mr->mpoly]; + const bool face_hidden = mr->hide_poly && mr->hide_poly[mp - mr->mpoly]; const MLoop *mloop = mr->mloop; const int ml_index_end = mp->loopstart + mp->totloop; diff --git a/source/blender/editors/mesh/editface.cc b/source/blender/editors/mesh/editface.cc index e3863150a8b..96a493cba49 100644 --- a/source/blender/editors/mesh/editface.cc +++ b/source/blender/editors/mesh/editface.cc @@ -145,23 +145,23 @@ 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>( + bke::SpanAttributeWriter<bool> hide_poly = attributes.lookup_or_add_for_write_span<bool>( ".hide_poly", ATTR_DOMAIN_FACE); for (int i = 0; i < me->totpoly; i++) { MPoly *mpoly = &me->mpoly[i]; - if (!hide_face.span[i]) { + if (!hide_poly.span[i]) { if (((mpoly->flag & ME_FACE_SEL) == 0) == unselected) { - hide_face.span[i] = true; + hide_poly.span[i] = true; } } - if (hide_face.span[i]) { + if (hide_poly.span[i]) { mpoly->flag &= ~ME_FACE_SEL; } } - hide_face.finish(); + hide_poly.finish(); BKE_mesh_flush_hidden_from_polys(me); @@ -179,11 +179,11 @@ void paintface_reveal(bContext *C, Object *ob, const bool select) bke::MutableAttributeAccessor attributes = bke::mesh_attributes_for_write(*me); if (select) { - 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); for (int i = 0; i < me->totpoly; i++) { MPoly *mpoly = &me->mpoly[i]; - if (hide_face[i]) { + if (hide_poly[i]) { mpoly->flag |= ME_FACE_SEL; } } @@ -208,7 +208,7 @@ static void select_linked_tfaces_with_seams(Mesh *me, const uint index, const bo BLI_bitmap *poly_tag = BLI_BITMAP_NEW(me->totpoly, __func__); bke::AttributeAccessor attributes = bke::mesh_attributes(*me); - 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); if (index != (uint)-1) { @@ -221,7 +221,7 @@ static void select_linked_tfaces_with_seams(Mesh *me, const uint index, const bo /* fill array by selection */ for (int i = 0; i < me->totpoly; i++) { MPoly *mp = &me->mpoly[i]; - if (hide_face[i]) { + if (hide_poly[i]) { /* pass */ } else if (mp->flag & ME_FACE_SEL) { @@ -237,7 +237,7 @@ static void select_linked_tfaces_with_seams(Mesh *me, const uint index, const bo /* expand selection */ for (int i = 0; i < me->totpoly; i++) { MPoly *mp = &me->mpoly[i]; - if (hide_face[i]) { + if (hide_poly[i]) { continue; } @@ -304,7 +304,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>( + const VArray<bool> hide_poly = attributes.lookup_or_default<bool>( ".hide_poly", ATTR_DOMAIN_FACE, false); if (action == SEL_TOGGLE) { @@ -312,7 +312,7 @@ bool paintface_deselect_all_visible(bContext *C, Object *ob, int action, bool fl for (int i = 0; i < me->totpoly; i++) { MPoly *mpoly = &me->mpoly[i]; - if (!hide_face[i] && mpoly->flag & ME_FACE_SEL) { + if (!hide_poly[i] && mpoly->flag & ME_FACE_SEL) { action = SEL_DESELECT; break; } @@ -323,7 +323,7 @@ bool paintface_deselect_all_visible(bContext *C, Object *ob, int action, bool fl for (int i = 0; i < me->totpoly; i++) { MPoly *mpoly = &me->mpoly[i]; - if (!hide_face[i]) { + if (!hide_poly[i]) { switch (action) { case SEL_SELECT: if ((mpoly->flag & ME_FACE_SEL) == 0) { @@ -368,12 +368,12 @@ bool paintface_minmax(Object *ob, float r_min[3], float r_max[3]) copy_m3_m4(bmat, ob->obmat); bke::AttributeAccessor attributes = bke::mesh_attributes(*me); - 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); for (int i = 0; i < me->totpoly; i++) { MPoly *mp = &me->mpoly[i]; - if (hide_face[i] || !(mp->flag & ME_FACE_SEL)) { + if (hide_poly[i] || !(mp->flag & ME_FACE_SEL)) { continue; } @@ -405,13 +405,13 @@ bool paintface_mouse_select(bContext *C, Mesh *me = BKE_mesh_from_object(ob); bke::AttributeAccessor attributes = bke::mesh_attributes(*me); - 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); if (ED_mesh_pick_face(C, ob, mval, ED_MESH_PICK_DEFAULT_FACE_DIST, &index)) { if (index < me->totpoly) { mpoly_sel = me->mpoly + index; - if (!hide_face[index]) { + if (!hide_poly[index]) { found = true; } } @@ -530,7 +530,7 @@ bool paintvert_deselect_all_visible(Object *ob, int action, bool flush_flags) bke::AttributeAccessor attributes = bke::mesh_attributes(*me); 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>( + const VArray<bool> hide_poly = attributes.lookup_or_default<bool>( ".hide_poly", ATTR_DOMAIN_FACE, false); if (action == SEL_TOGGLE) { @@ -538,7 +538,7 @@ bool paintvert_deselect_all_visible(Object *ob, int action, bool flush_flags) for (int i = 0; i < me->totvert; i++) { MVert *mvert = &me->mvert[i]; - if (!hide_face[i] && mvert->flag & SELECT) { + if (!hide_poly[i] && mvert->flag & SELECT) { action = SEL_DESELECT; break; } @@ -603,13 +603,13 @@ 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>( + const VArray<bool> hide_poly = attributes.lookup_or_default<bool>( ".hide_poly", ATTR_DOMAIN_FACE, false); for (int i = 0; i < me->totvert; i++) { MVert *mv = &me->mvert[i]; MDeformVert *dv = &me->dvert[i]; - if (!hide_face[i]) { + if (!hide_poly[i]) { if (dv->dw == nullptr) { /* if null weight then not grouped */ mv->flag |= SELECT; diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index fbfd9046112..cd609f7e8cf 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -369,11 +369,11 @@ static bool edbm_backbuf_check_and_select_faces_obmode(Mesh *me, const BLI_bitmap *select_bitmap = esel->select_bitmap; if (mpoly) { - const bool *hide_face = (const bool *)CustomData_get_layer_named( + const bool *hide_poly = (const bool *)CustomData_get_layer_named( &me->vdata, CD_PROP_BOOL, ".hide_poly"); for (int index = 0; index < me->totpoly; index++, mpoly++) { - if (!(hide_face && hide_face[index])) { + if (!(hide_poly && hide_poly[index])) { const bool is_select = mpoly->flag & ME_FACE_SEL; const bool is_inside = BLI_BITMAP_TEST_BOOL(select_bitmap, index); const int sel_op_result = ED_select_op_action_deselected(sel_op, is_select, is_inside); diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index c04d606cacb..bdc96f6dec1 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -488,22 +488,22 @@ static void rna_MeshPolygon_normal_get(PointerRNA *ptr, float *values) static bool rna_MeshPolygon_hide_get(PointerRNA *ptr) { const Mesh *mesh = rna_mesh(ptr); - const bool *hide_face = (const bool *)CustomData_get_layer_named( + const bool *hide_poly = (const 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); - return hide_face[index]; + return hide_poly[index]; } 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_poly"); + bool *hide_poly = (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); - hide_face[index] = value; + hide_poly[index] = value; } static void rna_MeshPolygon_center_get(PointerRNA *ptr, float *values) |