forked from blender/blender
index-of-nearest-104619 #2
@ -1037,17 +1037,10 @@ Mesh *BKE_mesh_new_nomain(const int verts_num,
|
|||||||
const int polys_num,
|
const int polys_num,
|
||||||
const int loops_num)
|
const int loops_num)
|
||||||
{
|
{
|
||||||
Mesh *mesh = (Mesh *)BKE_libblock_alloc(
|
Mesh *mesh = static_cast<Mesh *>(BKE_libblock_alloc(
|
||||||
nullptr, ID_ME, BKE_idtype_idcode_to_name(ID_ME), LIB_ID_CREATE_LOCALIZE);
|
nullptr, ID_ME, BKE_idtype_idcode_to_name(ID_ME), LIB_ID_CREATE_LOCALIZE));
|
||||||
BKE_libblock_init_empty(&mesh->id);
|
BKE_libblock_init_empty(&mesh->id);
|
||||||
|
|
||||||
/* Don't use #CustomData_reset because we don't want to touch custom-data. */
|
|
||||||
copy_vn_i(mesh->vdata.typemap, CD_NUMTYPES, -1);
|
|
||||||
copy_vn_i(mesh->edata.typemap, CD_NUMTYPES, -1);
|
|
||||||
copy_vn_i(mesh->fdata.typemap, CD_NUMTYPES, -1);
|
|
||||||
copy_vn_i(mesh->pdata.typemap, CD_NUMTYPES, -1);
|
|
||||||
copy_vn_i(mesh->ldata.typemap, CD_NUMTYPES, -1);
|
|
||||||
|
|
||||||
mesh->totvert = verts_num;
|
mesh->totvert = verts_num;
|
||||||
mesh->totedge = edges_num;
|
mesh->totedge = edges_num;
|
||||||
mesh->totpoly = polys_num;
|
mesh->totpoly = polys_num;
|
||||||
|
Loading…
Reference in New Issue
Block a user