|
Blender V4.3
|
Go to the source code of this file.
Classes | |
| struct | BMeshFromMeshParams |
| struct | BMeshToMeshParams |
Functions | |
| bool | BM_attribute_stored_in_bmesh_builtin (const blender::StringRef name) |
| void | BM_mesh_bm_from_me (BMesh *bm, const Mesh *mesh, const BMeshFromMeshParams *params) ATTR_NONNULL(1 |
| Mesh -> BMesh. | |
| void | BM_mesh_bm_to_me (struct Main *bmain, BMesh *bm, Mesh *mesh, const BMeshToMeshParams *params) ATTR_NONNULL(2 |
| void void | BM_mesh_bm_to_me_for_eval (BMesh &bm, Mesh &mesh, const CustomData_MeshMasks *cd_mask_extra) |
| void | BM_mesh_bm_to_me_compact (BMesh &bm, Mesh &mesh, const CustomData_MeshMasks *mask, bool add_mesh_attributes) |
| bool BM_attribute_stored_in_bmesh_builtin | ( | const blender::StringRef | name | ) |
Definition at line 120 of file bmesh_mesh_convert.cc.
References ELEM.
Referenced by CustomData_shallow_copy_remove_non_bmesh_attributes(), and blender::ed::sculpt_paint::dyntopo::dyntopo_supports_layer().
| void BM_mesh_bm_from_me | ( | BMesh * | bm, |
| const Mesh * | mesh, | ||
| const BMeshFromMeshParams * | params ) |
| bm | The mesh to write into, while this is typically a newly created BMesh, merging into existing data is supported. Note the custom-data layout isn't used. If more comprehensive merging is needed we should move this into a separate function since this should be kept fast for edit-mode switching and storing undo steps. |
| void BM_mesh_bm_to_me | ( | struct Main * | bmain, |
| BMesh * | bm, | ||
| Mesh * | mesh, | ||
| const BMeshToMeshParams * | params ) |
| bmain | May be NULL in case calc_object_remap parameter option is not set. |
| void BM_mesh_bm_to_me_compact | ( | BMesh & | bm, |
| Mesh & | mesh, | ||
| const CustomData_MeshMasks * | mask, | ||
| bool | add_mesh_attributes ) |
A version of BM_mesh_bm_to_me_for_eval but copying data layers and Mesh attributes is optional. It also allows shape-keys but don't re-assigns shape-key indices.
| mask | Custom data masks to control which layers are copied. If nullptr, no layer data is copied. |
| add_mesh_attributes | If true, adds mesh attributes during the conversion. |
Definition at line 1623 of file bmesh_mesh_convert.cc.
References BMesh::act_face, assert_bmesh_has_no_mesh_only_attributes(), BKE_mesh_runtime_clear_geometry(), BLI_assert, bm, BM_EDGE, BM_elem_index_get, BM_FACE, BM_LOOP, BM_VERT, CD_CONSTRUCT, CD_FLAG_NOCOPY, CustomData_merge_layout(), BMesh::edata, BMesh::elem_index_dirty, blender::bke::SpanAttributeWriter< T >::finish(), CustomDataLayer::flag, CustomData::layers, BMesh::ldata, blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), BMesh::pdata, blender::Array< T, InlineBufferCapacity, Allocator >::reinitialize(), blender::bke::SpanAttributeWriter< T >::span, BMesh::totedge, BMesh::totface, BMesh::totloop, BMesh::totvert, and BMesh::vdata.
Referenced by BM_mesh_bm_to_me_for_eval(), and create_mesh().
| void void BM_mesh_bm_to_me_for_eval | ( | BMesh & | bm, |
| Mesh & | mesh, | ||
| const CustomData_MeshMasks * | cd_mask_extra ) |
A version of BM_mesh_bm_to_me intended for getting the mesh to pass to the modifier stack for evaluation, instead of mode switching (where we make sure all data is kept and do expensive lookups to maintain shape keys).
Key differences:
cddm_from_bmesh_ex in 2.7x, removed MFace support. Definition at line 1799 of file bmesh_mesh_convert.cc.
References bm, BM_mesh_bm_to_me_compact(), CD_MASK_DERIVEDMESH, and CustomData_MeshMasks_update().
Referenced by BKE_mesh_from_bmesh_for_eval_nomain(), BKE_mesh_wrapper_ensure_mdata(), and blender::ed::spreadsheet::spreadsheet_get_display_geometry_set().