148 verts[
i] = vtable[face_verts[
i]];
149 edges[
i] = etable[face_edges[
i]];
172 std::array<int, CD_NUMTYPES> per_type_index;
173 per_type_index.
fill(0);
177 const int mesh_layer_index =
178 bm_layer.
name[0] ==
'\0' ?
185 info.
mesh_data = (mesh_layer_index == -1) ?
nullptr : mesh_data.
layers[mesh_layer_index].
data;
189 per_type_index[type]++;
196 const int mesh_index,
201 if (info.mesh_data) {
219 const bool is_new = !(
bm->totvert || (
bm->vdata.totlayer ||
bm->edata.totlayer ||
220 bm->pdata.totlayer ||
bm->ldata.totlayer));
222 float(*keyco)[3] =
nullptr;
237 for (
const int layer_index :
247 temporary_layers_to_delete.
append(std::string(name));
256 temporary_layers_to_delete.
append(std::string(name));
265 temporary_layers_to_delete.
append(std::string(name));
271 for (
const std::string &name : temporary_layers_to_delete) {
298 if (
params->calc_vert_normal) {
299 vert_normals = mesh->vert_normals();
321 int tot_shape_keys = 0;
346 if (is_new ==
false) {
349 const float(**shape_key_table)[3] = tot_shape_keys ? (
const float(**)[3])
BLI_array_alloca(
350 shape_key_table, tot_shape_keys) :
353 if ((
params->active_shapekey != 0) && tot_shape_keys > 0) {
361 if (tot_shape_keys ||
params->add_key_index) {
366 if (tot_shape_keys) {
372 "%s had to generate shape key uid's in a situation we shouldn't need to! "
373 "(bmesh internal error)\n",
384 keyco =
params->use_shapekey ?
static_cast<float(*)[3]
>(actkey->
data) :
nullptr;
386 bm->shapenr =
params->active_shapekey;
393 block = block->
next,
i++)
398 bm->vdata.layers[j].uid = block->
uid;
400 shape_key_table[
i] =
static_cast<const float(*)[3]
>(block->
data);
419 const int cd_shape_keyindex_offset = is_new && (tot_shape_keys ||
params->add_key_index) ?
437 for (
const int i : positions.index_range()) {
442 if (!hide_vert.is_empty() && hide_vert[
i]) {
445 if (!select_vert.
is_empty() && select_vert[
i]) {
456 if (cd_shape_keyindex_offset != -1) {
461 if (tot_shape_keys) {
463 for (
int j = 0; j < tot_shape_keys; j++, co_dst++) {
480 if (!uv_seams.is_empty() && uv_seams[
i]) {
483 if (!hide_edge.is_empty() && hide_edge[
i]) {
486 if (!select_edge.is_empty() && select_edge[
i]) {
489 if (!(!sharp_edges.is_empty() && sharp_edges[
i])) {
500 const Span<int> corner_verts = mesh->corner_verts();
501 const Span<int> corner_edges = mesh->corner_edges();
511 for (
const int i :
faces.index_range()) {
514 *
bm, corner_verts.
slice(face), corner_edges.
slice(face), vtable, etable);
521 "%s: Warning! Bad face in mesh"
522 " \"%s\" at index %d!, skipping\n",
533 if (!(!sharp_faces.is_empty() && sharp_faces[
i])) {
536 if (!hide_poly.is_empty() && hide_poly[
i]) {
539 if (!select_poly.is_empty() && select_poly[
i]) {
543 f->
mat_nr = material_indices.is_empty() ? 0 : material_indices[
i];
548 int j = face.
start();
557 }
while ((l_iter = l_iter->
next) != l_first);
561 if (
params->calc_face_normal) {
594 if (*ele_p !=
nullptr) {
611 BMVert **vertMap =
nullptr;
620 if (cd_shape_keyindex_offset != -1) {
627 (vertMap[keyi] ==
nullptr))
635 if (
i < old_verts_num) {
737 for (
i = 0;
i <
bm->vdata.totlayer;
i++) {
739 if (currkey->
uid ==
bm->vdata.layers[
i].uid) {
763 const bool active_shapekey_to_mvert)
768 bool actkey_has_layer =
false;
772 for (
int i = 0;
i <
bm->vdata.totlayer;
i++) {
779 if (currkey->
uid ==
bm->vdata.layers[
i].uid) {
785 if (currkey == actkey) {
786 actkey_has_layer =
true;
791 currkey->
uid =
bm->vdata.layers[
i].uid;
798 float(*ofs)[3] =
nullptr;
799 std::optional<Array<bool>> dependent;
804 (actkey_has_layer ==
true) &&
806 (cd_shape_keyindex_offset != -1) &&
819 ofs =
static_cast<float(*)[3]
>(
MEM_mallocN(
sizeof(
float[3]) *
bm->totvert, __func__));
848 bool update_vertex_coords_from_refkey =
false;
849 int cd_shape_offset_refkey = -1;
850 if (active_shapekey_to_mvert ==
false) {
851 if ((actkey != key->
refkey) && (cd_shape_keyindex_offset != -1)) {
853 if (refkey_uuid != -1) {
855 if (cd_shape_offset_refkey != -1) {
856 update_vertex_coords_from_refkey =
true;
865 float(*currkey_data)[3];
868 const int cd_shape_offset = (currkey_uuid == -1) ?
873 if (cd_shape_offset != -1) {
874 const bool apply_offset = (ofs !=
nullptr) && (currkey != actkey) && (*dependent)[currkey_i];
876 if (currkey->data && (currkey->totelem ==
bm->totvert)) {
881 currkey->totelem =
bm->totvert;
883 currkey_data = (float(*)[3])currkey->data;
889 if (currkey == actkey) {
892 if (update_vertex_coords_from_refkey) {
919 if (currkey->data && (cd_shape_keyindex_offset != -1)) {
921 "Found shape-key but no CD_SHAPEKEY layers to read from, "
922 "using existing shake-key data where possible");
926 "Found shape-key but no CD_SHAPEKEY layers to read from, "
927 "using basis shape-key data");
930 currkey_data =
static_cast<float(*)[3]
>(
936 if ((currkey->data !=
nullptr) && (cd_shape_keyindex_offset != -1) &&
938 (keyi < currkey->totelem))
945 const float(*oldkey)[3] =
static_cast<const float(*)[3]
>(currkey->data);
954 currkey->totelem =
bm->totvert;
958 currkey->data = currkey_data;
987 const int old_totvert)
989 BMVert **vertMap =
nullptr;
995 if (vertMap ==
nullptr) {
999 if (ob->par1 < old_totvert) {
1000 eve = vertMap[ob->par1];
1005 if (ob->par2 < old_totvert) {
1006 eve = vertMap[ob->par2];
1011 if (ob->par3 < old_totvert) {
1012 eve = vertMap[ob->par3];
1018 if (ob->data == &mesh) {
1023 if (vertMap ==
nullptr) {
1028 if (hmd->
indexar[
i] < old_totvert) {
1068 std::array<int, CD_NUMTYPES> per_type_index;
1069 per_type_index.
fill(0);
1073 const int bm_layer_index =
1074 mesh_layer.
name[0] ==
'\0' ?
1080 if (bm_layer_index == -1) {
1095 per_type_index[type]++;
1104 bool &need_select_vert,
1105 bool &need_hide_vert)
1122 bool &need_select_edge,
1123 bool &need_hide_edge,
1124 bool &need_sharp_edge,
1125 bool &need_uv_seams)
1151 bool &need_select_poly,
1152 bool &need_hide_poly,
1153 bool &need_sharp_face,
1154 bool &need_material_index,
1166 if (layer_index != -1) {
1167 layers.
append(layer_index);
1197 face_table[face_i] = face;
1200 need_material_index |= face->
mat_nr != 0;
1205 loop_table[loop_i] = loop;
1208 need_vert_sel[
i] =
true;
1213 need_edge_sel[
i] =
true;
1229 if (!need_vert_sel[
i]) {
1230 loop_layers_not_to_copy.
append(vert_sel_layers[
i]);
1234 if (!need_edge_sel[
i]) {
1235 loop_layers_not_to_copy.
append(edge_sel_layers[
i]);
1240 loop_layers_not_to_copy.
append(pin_layers[
i]);
1246 const int mesh_index,
1268 std::atomic<bool> any_loose_vert =
false;
1270 bool any_loose_vert_local = false;
1271 for (const int vert_i : range) {
1272 const BMVert &src_vert = *bm_verts[vert_i];
1273 copy_v3_v3(dst_vert_positions[vert_i], src_vert.co);
1274 bmesh_block_copy_to_mesh_attributes(info, vert_i, src_vert.head.data);
1275 any_loose_vert_local = any_loose_vert_local || src_vert.e == nullptr;
1277 if (any_loose_vert_local) {
1278 any_loose_vert.store(
true, std::memory_order_relaxed);
1281 for (const int vert_i : range) {
1282 select_vert[vert_i] = BM_elem_flag_test(bm_verts[vert_i], BM_ELEM_SELECT);
1285 if (!hide_vert.is_empty()) {
1286 for (const int vert_i : range) {
1287 hide_vert[vert_i] = BM_elem_flag_test(bm_verts[vert_i], BM_ELEM_HIDDEN);
1292 if (!any_loose_vert) {
1293 mesh.tag_loose_verts_none();
1311 std::atomic<bool> any_loose_edge =
false;
1313 bool any_loose_edge_local = false;
1314 for (const int edge_i : range) {
1315 const BMEdge &src_edge = *bm_edges[edge_i];
1316 dst_edges[edge_i] = int2(BM_elem_index_get(src_edge.v1), BM_elem_index_get(src_edge.v2));
1317 bmesh_block_copy_to_mesh_attributes(info, edge_i, src_edge.head.data);
1318 any_loose_edge_local |= BM_edge_is_wire(&src_edge);
1320 if (any_loose_edge_local) {
1321 any_loose_edge.store(
true, std::memory_order_relaxed);
1324 for (const int edge_i : range) {
1325 select_edge[edge_i] = BM_elem_flag_test(bm_edges[edge_i], BM_ELEM_SELECT);
1328 if (!hide_edge.is_empty()) {
1329 for (const int edge_i : range) {
1330 hide_edge[edge_i] = BM_elem_flag_test(bm_edges[edge_i], BM_ELEM_HIDDEN);
1333 if (!sharp_edge.is_empty()) {
1334 for (const int edge_i : range) {
1335 sharp_edge[edge_i] = !BM_elem_flag_test(bm_edges[edge_i], BM_ELEM_SMOOTH);
1338 if (!uv_seams.is_empty()) {
1339 for (const int edge_i : range) {
1340 uv_seams[edge_i] = BM_elem_flag_test(bm_edges[edge_i], BM_ELEM_SEAM);
1345 if (!any_loose_edge) {
1346 mesh.tag_loose_edges_none();
1362 for (const int face_i : range) {
1363 const BMFace &src_face = *bm_faces[face_i];
1364 dst_face_offsets[face_i] = BM_elem_index_get(BM_FACE_FIRST_LOOP(&src_face));
1365 bmesh_block_copy_to_mesh_attributes(info, face_i, src_face.head.data);
1368 for (const int face_i : range) {
1369 select_poly[face_i] = BM_elem_flag_test(bm_faces[face_i], BM_ELEM_SELECT);
1372 if (!hide_poly.is_empty()) {
1373 for (const int face_i : range) {
1374 hide_poly[face_i] = BM_elem_flag_test(bm_faces[face_i], BM_ELEM_HIDDEN);
1377 if (!material_indices.is_empty()) {
1378 for (const int face_i : range) {
1379 material_indices[face_i] = bm_faces[face_i]->mat_nr;
1382 if (!sharp_faces.is_empty()) {
1383 for (const int face_i : range) {
1384 sharp_faces[face_i] = !BM_elem_flag_test(bm_faces[face_i], BM_ELEM_SMOOTH);
1402 for (const int loop_i : range) {
1403 const BMLoop &src_loop = *bm_loops[loop_i];
1404 dst_corner_verts[loop_i] = BM_elem_index_get(src_loop.v);
1405 dst_corner_edges[loop_i] = BM_elem_index_get(src_loop.e);
1406 bmesh_block_copy_to_mesh_attributes(info, loop_i, src_loop.head.data);
1416 const int old_verts_num = mesh->
verts_num;
1427 bool need_select_vert =
false;
1428 bool need_select_edge =
false;
1429 bool need_select_poly =
false;
1430 bool need_hide_vert =
false;
1431 bool need_hide_edge =
false;
1432 bool need_hide_poly =
false;
1433 bool need_material_index =
false;
1434 bool need_sharp_edge =
false;
1435 bool need_sharp_face =
false;
1436 bool need_uv_seams =
false;
1445 vert_table.reinitialize(bm->totvert);
1446 bm_vert_table_build(*bm, vert_table, need_select_vert, need_hide_vert);
1449 edge_table.reinitialize(bm->totedge);
1450 bm_edge_table_build(
1451 *bm, edge_table, need_select_edge, need_hide_edge, need_sharp_edge, need_uv_seams);
1454 face_table.reinitialize(bm->totface);
1455 loop_table.reinitialize(bm->totloop);
1456 bm_face_loop_table_build(*bm,
1462 need_material_index,
1463 loop_layers_not_to_copy);
1464 for (const int i : loop_layers_not_to_copy) {
1465 bm->ldata.layers[i].flag |= CD_FLAG_NOCOPY;
1496 if (need_select_vert) {
1499 if (need_hide_vert) {
1502 if (need_select_edge) {
1505 if (need_sharp_edge) {
1508 if (need_uv_seams) {
1511 if (need_hide_edge) {
1514 if (need_select_poly) {
1517 if (need_hide_poly) {
1520 if (need_sharp_face) {
1523 if (need_material_index) {
1530 (mesh->faces_num + mesh->edges_num) > 1024,
1532 bm_to_mesh_verts(*bm, vert_table, *mesh, select_vert.span, hide_vert.span);
1535 bm, mesh->key, mesh->vert_positions_for_write(), params->active_shapekey_to_mvert);
1554 material_index.
span);
1563 for (
const int i : loop_layers_not_to_copy) {
1569 if (
params->calc_object_remap && (old_verts_num > 0)) {
1577 if (mesh->totselect != 0) {
1582 if (selected->htype ==
BM_VERT) {
1585 else if (selected->htype ==
BM_EDGE) {
1588 else if (selected->htype ==
BM_FACE) {
1598 if (
params->update_shapekey_indices) {
1603 if (cd_shape_keyindex_offset != -1) {
1629 const bool add_mesh_attributes)
1646 mesh.
runtime->deformed_only =
true;
1653 bool need_select_vert =
false;
1654 bool need_select_edge =
false;
1655 bool need_select_poly =
false;
1656 bool need_hide_vert =
false;
1657 bool need_hide_edge =
false;
1658 bool need_hide_poly =
false;
1659 bool need_material_index =
false;
1660 bool need_sharp_edge =
false;
1661 bool need_sharp_face =
false;
1662 bool need_uv_seams =
false;
1678 bm, edge_table, need_select_edge, need_hide_edge, need_sharp_edge, need_uv_seams);
1689 need_material_index,
1690 loop_layers_not_to_copy);
1691 for (
const int i : loop_layers_not_to_copy) {
1718 if (add_mesh_attributes) {
1720 if (need_select_vert) {
1724 if (need_hide_vert) {
1727 if (need_select_edge) {
1731 if (need_sharp_edge) {
1734 if (need_uv_seams) {
1737 if (need_hide_edge) {
1740 if (need_select_poly) {
1744 if (need_hide_poly) {
1747 if (need_sharp_face) {
1750 if (need_material_index) {
1776 material_index.
span);
1783 for (
const int i : loop_layers_not_to_copy) {
1788 if (add_mesh_attributes) {
1807 if (cd_mask_extra !=
nullptr) {
blender::StringRef BKE_uv_map_pin_name_get(blender::StringRef uv_map_name, char *buffer)
blender::StringRef BKE_uv_map_edge_select_name_get(blender::StringRef uv_map_name, char *buffer)
blender::StringRef BKE_uv_map_vert_select_name_get(blender::StringRef uv_map_name, char *buffer)
CustomData interface, see also DNA_customdata_types.h.
void CustomData_data_set_default_value(eCustomDataType type, void *elem)
int CustomData_get_offset(const CustomData *data, eCustomDataType type)
int CustomData_get_layer_index_n(const CustomData *data, eCustomDataType type, int n)
bool CustomData_bmesh_merge_layout(const CustomData *source, CustomData *dest, eCustomDataMask mask, eCDAllocType alloctype, BMesh *bm, char htype)
int CustomData_get_n_offset(const CustomData *data, eCustomDataType type, int n)
void * CustomData_add_layer_named(CustomData *data, eCustomDataType type, eCDAllocType alloctype, int totelem, blender::StringRef name)
void CustomData_MeshMasks_update(CustomData_MeshMasks *mask_dst, const CustomData_MeshMasks *mask_src)
void CustomData_bmesh_init_pool(CustomData *data, int totelem, char htype)
int CustomData_get_named_layer_index(const CustomData *data, eCustomDataType type, blender::StringRef name)
bool CustomData_has_layer_named(const CustomData *data, eCustomDataType type, blender::StringRef name)
const char * CustomData_get_layer_name(const CustomData *data, eCustomDataType type, int n)
void CustomData_data_copy_value(eCustomDataType type, const void *source, void *dest)
const CustomData_MeshMasks CD_MASK_BMESH
void CustomData_init_layout_from(const CustomData *source, CustomData *dest, eCustomDataMask mask, eCDAllocType alloctype, int totelem)
CustomData CustomData_shallow_copy_remove_non_bmesh_attributes(const CustomData *src, eCustomDataMask mask)
bool CustomData_has_layer(const CustomData *data, eCustomDataType type)
size_t CustomData_get_elem_size(const CustomDataLayer *layer)
void * CustomData_add_layer(CustomData *data, eCustomDataType type, eCDAllocType alloctype, int totelem)
const CustomData_MeshMasks CD_MASK_DERIVEDMESH
bool CustomData_merge_layout(const CustomData *source, CustomData *dest, eCustomDataMask mask, eCDAllocType alloctype, int totelem)
int CustomData_number_of_layers(const CustomData *data, eCustomDataType type)
bool CustomData_free_layer_named(CustomData *data, blender::StringRef name)
void CustomData_bmesh_alloc_block(CustomData *data, void **block)
const CustomData_MeshMasks CD_MASK_MESH
KeyBlock * BKE_keyblock_add(Key *key, const char *name)
std::optional< blender::Array< bool > > BKE_keyblock_get_dependent_keys(const Key *key, int index)
void BKE_mesh_clear_geometry(Mesh *mesh)
void BKE_mesh_face_offsets_ensure_alloc(Mesh *mesh)
void BKE_mesh_runtime_clear_geometry(Mesh *mesh)
void multires_topology_changed(Mesh *mesh)
#define BLI_array_alloca(arr, realsize)
void * BLI_findlink(const ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
#define LISTBASE_FOREACH_INDEX(type, var, list, index_var)
int BLI_listbase_count(const ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE int min_ii(int a, int b)
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void add_v3_v3(float r[3], const float a[3])
#define BLI_SCOPED_DEFER(function_to_defer)
#define POINTER_OFFSET(v, ofs)
#define CLOG_WARN(clg_ref,...)
bool DEG_is_original(const T *id)
Object is a sort of wrapper for general info.
Read Guarded memory(de)allocation.
#define BM_ELEM_CD_GET_BOOL(ele, offset)
#define BM_ELEM_CD_GET_INT(ele, offset)
#define BM_ELEM_CD_SET_INT(ele, offset, f)
#define BM_FACE_FIRST_LOOP(p)
#define BM_ELEM_CD_GET_VOID_P(ele, offset)
BMFace * BM_face_create(BMesh *bm, BMVert *const *verts, BMEdge *const *edges, const int len, const BMFace *f_example, const eBMCreateFlag create_flag)
BMVert * BM_vert_create(BMesh *bm, const float co[3], const BMVert *v_example, const eBMCreateFlag create_flag)
Main function for creating a new vertex.
BMEdge * BM_edge_create(BMesh *bm, BMVert *v1, BMVert *v2, const BMEdge *e_example, const eBMCreateFlag create_flag)
Main function for creating a new edge.
#define BM_elem_index_get(ele)
#define BM_elem_index_set(ele, index)
#define BM_elem_flag_enable(ele, hflag)
#define BM_ITER_MESH_INDEX(ele, iter, bm, itype, indexvar)
BMesh const char void * data
void BM_select_history_clear(BMesh *bm)
void BM_face_select_set(BMesh *bm, BMFace *f, const bool select)
Select Face.
void BM_vert_select_set(BMesh *bm, BMVert *v, const bool select)
Select Vert.
void BM_edge_select_set(BMesh *bm, BMEdge *e, const bool select)
Select Edge.
#define BM_select_history_store_notest(bm, ele)
static Vector< MeshToBMeshLayerInfo > mesh_to_bm_copy_info_calc(const CustomData &mesh_data, CustomData &bm_data)
static int bm_to_mesh_shape_layer_index_from_kb(BMesh *bm, KeyBlock *currkey)
void BM_mesh_bm_from_me(BMesh *bm, const Mesh *mesh, const BMeshFromMeshParams *params)
void BM_mesh_bm_to_me_for_eval(BMesh &bm, Mesh &mesh, const CustomData_MeshMasks *cd_mask_extra)
static void bm_to_mesh_shape(BMesh *bm, Key *key, MutableSpan< float3 > positions, const bool active_shapekey_to_mvert)
static BMFace * bm_face_create_from_mpoly(BMesh &bm, Span< int > face_verts, Span< int > face_edges, Span< BMVert * > vtable, Span< BMEdge * > etable)
static void bmesh_to_mesh_calc_object_remap(Main &bmain, Mesh &mesh, BMesh &bm, const int old_totvert)
void BM_mesh_bm_to_me_compact(BMesh &bm, Mesh &mesh, const CustomData_MeshMasks *mask, const bool add_mesh_attributes)
static BMVert ** bm_to_mesh_vertex_map(BMesh *bm, const int old_verts_num)
BMesh -> Mesh.
static Vector< BMeshToMeshLayerInfo > bm_to_mesh_copy_info_calc(const CustomData &bm_data, CustomData &mesh_data)
void BM_mesh_bm_to_me(Main *bmain, BMesh *bm, Mesh *mesh, const BMeshToMeshParams *params)
static void mesh_attributes_copy_to_bmesh_block(CustomData &data, const Span< MeshToBMeshLayerInfo > copy_info, const int mesh_index, BMHeader &header)
bool BM_attribute_stored_in_bmesh_builtin(const StringRef name)
static void assert_bmesh_has_no_mesh_only_attributes(const BMesh &bm)
void BM_face_normal_update(BMFace *f)
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
ATTR_WARN_UNUSED_RESULT const BMVert * v
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
IndexRange index_range() const
void reinitialize(const int64_t new_size)
constexpr int64_t start() const
constexpr bool is_empty() const
constexpr IndexRange index_range() const
constexpr Span slice(int64_t start, int64_t size) const
constexpr int64_t size() const
constexpr IndexRange index_range() const
constexpr bool is_empty() const
void append(const T &value)
IndexRange index_range() const
void fill(const T &value) const
GAttributeReader lookup(const StringRef attribute_id) const
GSpanAttributeWriter lookup_or_add_for_write_only_span(StringRef attribute_id, AttrDomain domain, eCustomDataType data_type)
#define MAX_CUSTOMDATA_LAYER_NAME
#define MEM_reallocN(vmemh, len)
void * MEM_mallocN(size_t len, const char *str)
void * MEM_calloc_arrayN(size_t len, size_t size, const char *str)
void * MEM_malloc_arrayN(size_t len, size_t size, const char *str)
void MEM_freeN(void *vmemh)
ccl_device_inline float2 mask(const MaskType mask, const float2 a)
void parallel_invoke(Functions &&...functions)
void parallel_for(const IndexRange range, const int64_t grain_size, const Function &function, const TaskSizeHints &size_hints=detail::TaskSizeHints_Static(1))
static void bm_to_mesh_loops(const BMesh &bm, const Span< const BMLoop * > bm_loops, Mesh &mesh)
static void bm_to_mesh_verts(const BMesh &bm, const Span< const BMVert * > bm_verts, Mesh &mesh, MutableSpan< bool > select_vert, MutableSpan< bool > hide_vert)
static void bm_to_mesh_edges(const BMesh &bm, const Span< const BMEdge * > bm_edges, Mesh &mesh, MutableSpan< bool > select_edge, MutableSpan< bool > hide_edge, MutableSpan< bool > sharp_edge, MutableSpan< bool > uv_seams)
static void bm_vert_table_build(BMesh &bm, MutableSpan< const BMVert * > table, bool &need_select_vert, bool &need_hide_vert)
static void bm_edge_table_build(BMesh &bm, MutableSpan< const BMEdge * > table, bool &need_select_edge, bool &need_hide_edge, bool &need_sharp_edge, bool &need_uv_seams)
static void bmesh_block_copy_to_mesh_attributes(const Span< BMeshToMeshLayerInfo > copy_info, const int mesh_index, const void *block)
static void bm_face_loop_table_build(BMesh &bm, MutableSpan< const BMFace * > face_table, MutableSpan< const BMLoop * > loop_table, bool &need_select_poly, bool &need_hide_poly, bool &need_sharp_face, bool &need_material_index, Vector< int > &loop_layers_not_to_copy)
VecBase< float, 3 > float3
static void bm_to_mesh_faces(const BMesh &bm, const Span< const BMFace * > bm_faces, Mesh &mesh, MutableSpan< bool > select_poly, MutableSpan< bool > hide_poly, MutableSpan< bool > sharp_faces, MutableSpan< int > material_indices)
MeshRuntimeHandle * runtime
MutableVArraySpan< T > span