Changeset View
Changeset View
Standalone View
Standalone View
source/blender/collada/MeshImporter.cpp
| Show First 20 Lines • Show All 550 Lines • ▼ Show 20 Lines | void MeshImporter::mesh_add_edges(Mesh *mesh, int len) | ||||
| int totedge; | int totedge; | ||||
| if (len == 0) | if (len == 0) | ||||
| return; | return; | ||||
| totedge = mesh->totedge + len; | totedge = mesh->totedge + len; | ||||
| /* update customdata */ | /* update customdata */ | ||||
| CustomData_copy(&mesh->edata, &edata, CD_MASK_MESH, CD_DEFAULT, totedge); | CustomData_copy(&mesh->edata, &edata, CD_MASK_MESH.emask, CD_DEFAULT, totedge); | ||||
| CustomData_copy_data(&mesh->edata, &edata, 0, 0, mesh->totedge); | CustomData_copy_data(&mesh->edata, &edata, 0, 0, mesh->totedge); | ||||
| if (!CustomData_has_layer(&edata, CD_MEDGE)) | if (!CustomData_has_layer(&edata, CD_MEDGE)) | ||||
| CustomData_add_layer(&edata, CD_MEDGE, CD_CALLOC, NULL, totedge); | CustomData_add_layer(&edata, CD_MEDGE, CD_CALLOC, NULL, totedge); | ||||
| CustomData_free(&mesh->edata, mesh->totedge); | CustomData_free(&mesh->edata, mesh->totedge); | ||||
| mesh->edata = edata; | mesh->edata = edata; | ||||
| BKE_mesh_update_customdata_pointers(mesh, false); /* new edges don't change tessellation */ | BKE_mesh_update_customdata_pointers(mesh, false); /* new edges don't change tessellation */ | ||||
| ▲ Show 20 Lines • Show All 593 Lines • Show Last 20 Lines | |||||