diff options
author | Hans Goudey <h.goudey@me.com> | 2022-09-08 05:42:00 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-09-08 05:42:00 +0300 |
commit | 8ccd26154c63be172db23ab6647c11db7c211e8e (patch) | |
tree | 40740630db9240118b91275a7f190eba4591caba /source/blender/bmesh | |
parent | acbe1e3774ace83d82fda0d39303a1c0e16f81f9 (diff) | |
parent | d5934974219135102f364f57c45a8b1465e2b8d9 (diff) |
Merge branch 'master' into refactor-mesh-bevel-weight-genericrefactor-mesh-bevel-weight-generic
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_mesh_convert.cc | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/source/blender/bmesh/intern/bmesh_mesh_convert.cc b/source/blender/bmesh/intern/bmesh_mesh_convert.cc index 8092fe55cc0..94440916603 100644 --- a/source/blender/bmesh/intern/bmesh_mesh_convert.cc +++ b/source/blender/bmesh/intern/bmesh_mesh_convert.cc @@ -924,7 +924,7 @@ static void convert_bmesh_hide_flags_to_mesh_attributes(BMesh &bm, return; } - bke::MutableAttributeAccessor attributes = bke::mesh_attributes_for_write(mesh); + bke::MutableAttributeAccessor attributes = mesh.attributes_for_write(); BM_mesh_elem_table_ensure(&bm, BM_VERT | BM_EDGE | BM_FACE); write_fn_to_attribute<bool>( @@ -1104,11 +1104,9 @@ void BM_mesh_bm_to_me(Main *bmain, BMesh *bm, Mesh *me, const struct BMeshToMesh if (need_material_index) { BM_mesh_elem_table_ensure(bm, BM_FACE); write_fn_to_attribute<int>( - blender::bke::mesh_attributes_for_write(*me), - "material_index", - ATTR_DOMAIN_FACE, - true, - [&](const int i) { return static_cast<int>(BM_face_at_index(bm, i)->mat_nr); }); + me->attributes_for_write(), "material_index", ATTR_DOMAIN_FACE, true, [&](const int i) { + return static_cast<int>(BM_face_at_index(bm, i)->mat_nr); + }); } /* Patch hook indices and vertex parents. */ @@ -1360,11 +1358,9 @@ void BM_mesh_bm_to_me_for_eval(BMesh *bm, Mesh *me, const CustomData_MeshMasks * if (need_material_index) { BM_mesh_elem_table_ensure(bm, BM_FACE); write_fn_to_attribute<int>( - blender::bke::mesh_attributes_for_write(*me), - "material_index", - ATTR_DOMAIN_FACE, - true, - [&](const int i) { return static_cast<int>(BM_face_at_index(bm, i)->mat_nr); }); + me->attributes_for_write(), "material_index", ATTR_DOMAIN_FACE, true, [&](const int i) { + return static_cast<int>(BM_face_at_index(bm, i)->mat_nr); + }); } convert_bmesh_hide_flags_to_mesh_attributes( |