120 if (
name.is_empty()) {
123 if (
name[0] ==
'.') {
138 return ELEM(
name,
"position",
"uv_seam",
"material_index",
"sharp_face",
"sharp_edge");
152 verts[
i] = vtable[face_verts[
i]];
153 edges[
i] = etable[face_edges[
i]];
176 std::array<int, CD_NUMTYPES> per_type_index;
177 per_type_index.
fill(0);
181 const int mesh_layer_index =
182 bm_layer.
name[0] ==
'\0' ?
189 info.
mesh_data = (mesh_layer_index == -1) ?
nullptr : mesh_data.
layers[mesh_layer_index].
data;
193 per_type_index[type]++;
200 const int mesh_index,
205 if (info.mesh_data) {
223 const bool is_new = !(
bm->totvert || (
bm->vdata.totlayer ||
bm->edata.totlayer ||
224 bm->pdata.totlayer ||
bm->ldata.totlayer));
226 float (*keyco)[3] =
nullptr;
241 for (
const int layer_index :
251 temporary_layers_to_delete.
append(std::string(
name));
257 for (
const std::string &
name : temporary_layers_to_delete) {
284 if (
params->calc_vert_normal) {
285 vert_normals = mesh->vert_normals();
307 int tot_shape_keys = 0;
332 if (is_new ==
false) {
336 shape_key_table, tot_shape_keys) :
339 if ((
params->active_shapekey != 0) && tot_shape_keys > 0) {
347 if (tot_shape_keys ||
params->add_key_index) {
352 if (tot_shape_keys) {
358 "%s had to generate shape key uid's in a situation we shouldn't need to! "
359 "(bmesh internal error)\n",
370 keyco =
params->use_shapekey ?
static_cast<float (*)[3]
>(actkey->
data) :
nullptr;
372 bm->shapenr =
params->active_shapekey;
379 block = block->
next,
i++)
384 bm->vdata.layers[j].uid = block->
uid;
386 shape_key_table[
i] =
static_cast<const float (*)[3]
>(block->
data);
405 const int cd_shape_keyindex_offset = is_new && (tot_shape_keys ||
params->add_key_index) ?
421 const VArraySpan uv_select_vert = *attributes.
lookup<
bool>(
".uv_select_vert",
423 const VArraySpan uv_select_edge = *attributes.
lookup<
bool>(
".uv_select_edge",
427 const bool need_uv_select = is_new && (!uv_select_vert.is_empty() &&
428 !uv_select_edge.is_empty() && !uv_select_face.is_empty());
437 if (!hide_vert.is_empty() && hide_vert[
i]) {
440 if (!select_vert.
is_empty() && select_vert[
i]) {
451 if (cd_shape_keyindex_offset != -1) {
456 if (tot_shape_keys) {
458 for (
int j = 0; j < tot_shape_keys; j++, co_dst++) {
475 if (!uv_seams.is_empty() && uv_seams[
i]) {
478 if (!hide_edge.is_empty() && hide_edge[
i]) {
481 if (!select_edge.is_empty() && select_edge[
i]) {
484 if (!(!sharp_edges.is_empty() && sharp_edges[
i])) {
495 const Span<int> corner_verts = mesh->corner_verts();
496 const Span<int> corner_edges = mesh->corner_edges();
506 for (
const int i :
faces.index_range()) {
509 *
bm, corner_verts.
slice(face), corner_edges.
slice(face), vtable, etable);
516 "%s: Warning! Bad face in mesh"
517 " \"%s\" at index %d!, skipping\n",
528 if (!(!sharp_faces.is_empty() && sharp_faces[
i])) {
531 if (!hide_poly.is_empty() && hide_poly[
i]) {
534 if (!select_poly.is_empty() && select_poly[
i]) {
538 f->
mat_nr = material_indices.is_empty() ? 0 : material_indices[
i];
543 int j = face.
start();
552 if (need_uv_select) {
553 if (uv_select_vert[j]) {
556 if (uv_select_edge[j]) {
562 }
while ((l_iter = l_iter->
next) != l_first);
566 if (need_uv_select) {
567 if (uv_select_face[
i]) {
572 if (
params->calc_face_normal) {
607 if (*ele_p !=
nullptr) {
624 BMVert **vertMap =
nullptr;
633 if (cd_shape_keyindex_offset != -1) {
640 (vertMap[keyi] ==
nullptr))
648 if (
i < old_verts_num) {
750 for (
i = 0;
i <
bm->vdata.totlayer;
i++) {
752 if (currkey->
uid ==
bm->vdata.layers[
i].uid) {
776 const bool active_shapekey_to_mvert)
781 bool actkey_has_layer =
false;
785 for (
int i = 0;
i <
bm->vdata.totlayer;
i++) {
792 if (currkey->
uid ==
bm->vdata.layers[
i].uid) {
798 if (currkey == actkey) {
799 actkey_has_layer =
true;
804 currkey->
uid =
bm->vdata.layers[
i].uid;
811 float (*ofs)[3] =
nullptr;
812 std::optional<Array<bool>> dependent;
817 (actkey_has_layer ==
true) &&
819 (cd_shape_keyindex_offset != -1) &&
832 ofs =
static_cast<float (*)[3]
>(
MEM_mallocN(
sizeof(
float[3]) *
bm->totvert, __func__));
861 bool update_vertex_coords_from_refkey =
false;
862 int cd_shape_offset_refkey = -1;
863 if (active_shapekey_to_mvert ==
false) {
864 if ((actkey != key->
refkey) && (cd_shape_keyindex_offset != -1)) {
866 if (refkey_uuid != -1) {
868 if (cd_shape_offset_refkey != -1) {
869 update_vertex_coords_from_refkey =
true;
878 float (*currkey_data)[3];
881 const int cd_shape_offset = (currkey_uuid == -1) ?
886 if (cd_shape_offset != -1) {
887 const bool apply_offset = (ofs !=
nullptr) && (currkey != actkey) && (*dependent)[currkey_i];
889 if (currkey->data && (currkey->totelem ==
bm->totvert)) {
894 currkey->totelem =
bm->totvert;
896 currkey_data = (
float (*)[3])currkey->data;
902 if (currkey == actkey) {
905 if (update_vertex_coords_from_refkey) {
932 if (currkey->data && (cd_shape_keyindex_offset != -1)) {
934 "Found shape-key but no CD_SHAPEKEY layers to read from, "
935 "using existing shake-key data where possible");
939 "Found shape-key but no CD_SHAPEKEY layers to read from, "
940 "using basis shape-key data");
943 currkey_data =
static_cast<float (*)[3]
>(
949 if ((currkey->data !=
nullptr) && (cd_shape_keyindex_offset != -1) &&
951 (keyi < currkey->totelem))
958 const float (*oldkey)[3] =
static_cast<const float (*)[3]
>(currkey->data);
967 currkey->totelem =
bm->totvert;
971 currkey->data = currkey_data;
1000 const int old_totvert)
1002 BMVert **vertMap =
nullptr;
1008 if (vertMap ==
nullptr) {
1012 if (ob->par1 < old_totvert) {
1013 eve = vertMap[ob->par1];
1018 if (ob->par2 < old_totvert) {
1019 eve = vertMap[ob->par2];
1024 if (ob->par3 < old_totvert) {
1025 eve = vertMap[ob->par3];
1031 if (ob->data == &mesh) {
1036 if (vertMap ==
nullptr) {
1041 if (hmd->
indexar[
i] < old_totvert) {
1081 std::array<int, CD_NUMTYPES> per_type_index;
1082 per_type_index.
fill(0);
1086 const int bm_layer_index =
1087 mesh_layer.
name[0] ==
'\0' ?
1093 if (bm_layer_index == -1) {
1108 per_type_index[type]++;
1117 bool &need_select_vert,
1118 bool &need_hide_vert)
1135 bool &need_select_edge,
1136 bool &need_hide_edge,
1137 bool &need_sharp_edge,
1138 bool &need_uv_seams)
1164 bool &need_select_poly,
1165 bool &need_hide_poly,
1166 bool &need_sharp_face,
1167 bool &need_material_index,
1177 if (layer_index != -1) {
1178 layers.
append(layer_index);
1196 face_table[face_i] = face;
1199 need_material_index |= face->
mat_nr != 0;
1204 loop_table[loop_i] = loop;
1219 loop_layers_not_to_copy.
append(pin_layers[
i]);
1225 const int mesh_index,
1247 std::atomic<bool> any_loose_vert =
false;
1249 bool any_loose_vert_local = false;
1250 for (const int vert_i : range) {
1251 const BMVert &src_vert = *bm_verts[vert_i];
1252 copy_v3_v3(dst_vert_positions[vert_i], src_vert.co);
1253 bmesh_block_copy_to_mesh_attributes(info, vert_i, src_vert.head.data);
1254 any_loose_vert_local = any_loose_vert_local || src_vert.e == nullptr;
1256 if (any_loose_vert_local) {
1257 any_loose_vert.store(
true, std::memory_order_relaxed);
1260 for (const int vert_i : range) {
1261 select_vert[vert_i] = BM_elem_flag_test(bm_verts[vert_i], BM_ELEM_SELECT);
1264 if (!hide_vert.is_empty()) {
1265 for (const int vert_i : range) {
1266 hide_vert[vert_i] = BM_elem_flag_test(bm_verts[vert_i], BM_ELEM_HIDDEN);
1271 if (!any_loose_vert) {
1272 mesh.tag_loose_verts_none();
1290 std::atomic<bool> any_loose_edge =
false;
1292 bool any_loose_edge_local = false;
1293 for (const int edge_i : range) {
1294 const BMEdge &src_edge = *bm_edges[edge_i];
1295 dst_edges[edge_i] = int2(BM_elem_index_get(src_edge.v1), BM_elem_index_get(src_edge.v2));
1296 bmesh_block_copy_to_mesh_attributes(info, edge_i, src_edge.head.data);
1297 any_loose_edge_local |= BM_edge_is_wire(&src_edge);
1299 if (any_loose_edge_local) {
1300 any_loose_edge.store(
true, std::memory_order_relaxed);
1303 for (const int edge_i : range) {
1304 select_edge[edge_i] = BM_elem_flag_test(bm_edges[edge_i], BM_ELEM_SELECT);
1307 if (!hide_edge.is_empty()) {
1308 for (const int edge_i : range) {
1309 hide_edge[edge_i] = BM_elem_flag_test(bm_edges[edge_i], BM_ELEM_HIDDEN);
1312 if (!sharp_edge.is_empty()) {
1313 for (const int edge_i : range) {
1314 sharp_edge[edge_i] = !BM_elem_flag_test(bm_edges[edge_i], BM_ELEM_SMOOTH);
1317 if (!uv_seams.is_empty()) {
1318 for (const int edge_i : range) {
1319 uv_seams[edge_i] = BM_elem_flag_test(bm_edges[edge_i], BM_ELEM_SEAM);
1324 if (!any_loose_edge) {
1325 mesh.tag_loose_edges_none();
1342 for (const int face_i : range) {
1343 const BMFace &src_face = *bm_faces[face_i];
1344 dst_face_offsets[face_i] = BM_elem_index_get(BM_FACE_FIRST_LOOP(&src_face));
1345 bmesh_block_copy_to_mesh_attributes(info, face_i, src_face.head.data);
1348 for (const int face_i : range) {
1349 select_poly[face_i] = BM_elem_flag_test(bm_faces[face_i], BM_ELEM_SELECT);
1352 if (!hide_poly.is_empty()) {
1353 for (const int face_i : range) {
1354 hide_poly[face_i] = BM_elem_flag_test(bm_faces[face_i], BM_ELEM_HIDDEN);
1357 if (!material_indices.is_empty()) {
1358 for (const int face_i : range) {
1359 material_indices[face_i] = bm_faces[face_i]->mat_nr;
1362 if (!sharp_faces.is_empty()) {
1363 for (const int face_i : range) {
1364 sharp_faces[face_i] = !BM_elem_flag_test(bm_faces[face_i], BM_ELEM_SMOOTH);
1367 if (!uv_select_face.is_empty()) {
1368 for (const int face_i : range) {
1369 uv_select_face[face_i] = BM_elem_flag_test(bm_faces[face_i], BM_ELEM_SELECT_UV);
1392 const bool need_uv_select = !uv_select_vert.
is_empty() && !uv_select_edge.
is_empty();
1394 for (const int loop_i : range) {
1395 const BMLoop &src_loop = *bm_loops[loop_i];
1396 dst_corner_verts[loop_i] = BM_elem_index_get(src_loop.v);
1397 dst_corner_edges[loop_i] = BM_elem_index_get(src_loop.e);
1398 bmesh_block_copy_to_mesh_attributes(info, loop_i, src_loop.head.data);
1401 if (need_uv_select) {
1402 for (
const int loop_i : range) {
1403 const BMLoop &src_loop = *bm_loops[loop_i];
1416 const int old_verts_num = mesh->
verts_num;
1429 if (need_uv_select &
bm->uv_select_sync_valid) {
1433 bool need_select_vert =
false;
1434 bool need_select_edge =
false;
1435 bool need_select_poly =
false;
1436 bool need_hide_vert =
false;
1437 bool need_hide_edge =
false;
1438 bool need_hide_poly =
false;
1439 bool need_material_index =
false;
1440 bool need_sharp_edge =
false;
1441 bool need_sharp_face =
false;
1442 bool need_uv_seams =
false;
1451 vert_table.reinitialize(bm->totvert);
1452 bm_vert_table_build(*bm, vert_table, need_select_vert, need_hide_vert);
1455 edge_table.reinitialize(bm->totedge);
1456 bm_edge_table_build(
1457 *bm, edge_table, need_select_edge, need_hide_edge, need_sharp_edge, need_uv_seams);
1460 face_table.reinitialize(bm->totface);
1461 loop_table.reinitialize(bm->totloop);
1462 bm_face_loop_table_build(*bm,
1468 need_material_index,
1469 loop_layers_not_to_copy);
1470 for (const int i : loop_layers_not_to_copy) {
1471 bm->ldata.layers[i].flag |= CD_FLAG_NOCOPY;
1505 if (need_select_vert) {
1508 if (need_hide_vert) {
1511 if (need_select_edge) {
1514 if (need_sharp_edge) {
1517 if (need_uv_seams) {
1520 if (need_hide_edge) {
1523 if (need_select_poly) {
1526 if (need_hide_poly) {
1529 if (need_sharp_face) {
1532 if (need_uv_select) {
1540 if (need_material_index) {
1547 (mesh->faces_num + mesh->edges_num) > 1024,
1549 bm_to_mesh_verts(*bm, vert_table, *mesh, select_vert.span, hide_vert.span);
1552 bm, mesh->key, mesh->vert_positions_for_write(), params->active_shapekey_to_mvert);
1571 uv_select_face.
span,
1572 material_index.
span);
1581 for (
const int i : loop_layers_not_to_copy) {
1587 if (
params->calc_object_remap && (old_verts_num > 0)) {
1595 if (mesh->totselect != 0) {
1600 if (selected->htype ==
BM_VERT) {
1603 else if (selected->htype ==
BM_EDGE) {
1606 else if (selected->htype ==
BM_FACE) {
1616 if (
params->update_shapekey_indices) {
1621 if (cd_shape_keyindex_offset != -1) {
1650 const bool add_mesh_attributes)
1669 if (need_uv_select &&
bm.uv_select_sync_valid) {
1673 mesh.
runtime->deformed_only =
true;
1680 bool need_select_vert =
false;
1681 bool need_select_edge =
false;
1682 bool need_select_poly =
false;
1683 bool need_hide_vert =
false;
1684 bool need_hide_edge =
false;
1685 bool need_hide_poly =
false;
1686 bool need_material_index =
false;
1687 bool need_sharp_edge =
false;
1688 bool need_sharp_face =
false;
1689 bool need_uv_seams =
false;
1705 bm, edge_table, need_select_edge, need_hide_edge, need_sharp_edge, need_uv_seams);
1716 need_material_index,
1717 loop_layers_not_to_copy);
1718 for (
const int i : loop_layers_not_to_copy) {
1748 if (add_mesh_attributes) {
1750 if (need_select_vert) {
1754 if (need_hide_vert) {
1757 if (need_select_edge) {
1761 if (need_sharp_edge) {
1764 if (need_uv_seams) {
1767 if (need_hide_edge) {
1770 if (need_select_poly) {
1774 if (need_hide_poly) {
1777 if (need_sharp_face) {
1780 if (need_uv_select) {
1788 if (need_material_index) {
1814 uv_select_face.
span,
1815 material_index.
span);
1822 for (
const int i : loop_layers_not_to_copy) {
1827 if (add_mesh_attributes) {
1849 if (cd_mask_extra !=
nullptr) {
blender::StringRef BKE_uv_map_pin_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)
#define MAX_CUSTOMDATA_LAYER_NAME
@ ME_FLAG_UV_SELECT_SYNC_VALID
Object is a sort of wrapper for general info.
Read Guarded memory(de)allocation.
#define MEM_reallocN(vmemh, len)
#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_ELEM_SELECT_UV_EDGE
#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_test(ele, hflag)
#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, AttrType data_type)
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, MutableSpan< bool > uv_select_vert, MutableSpan< bool > uv_select_edge)
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)
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< bool > uv_select_face, MutableSpan< int > material_indices)
VecBase< float, 3 > float3
MeshRuntimeHandle * runtime
MutableVArraySpan< T > span