diff options
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_DerivedMesh.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/DerivedMesh.c | 10 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/mesh.c | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/blenkernel/BKE_DerivedMesh.h b/source/blender/blenkernel/BKE_DerivedMesh.h index 2cb9d42b479..f0df766ffde 100644 --- a/source/blender/blenkernel/BKE_DerivedMesh.h +++ b/source/blender/blenkernel/BKE_DerivedMesh.h @@ -468,7 +468,7 @@ int DM_release(DerivedMesh *dm); /** utility function to convert a DerivedMesh to a Mesh */ -void DM_to_mesh(DerivedMesh *dm, struct Mesh *me, struct Object *ob); +void DM_to_mesh(DerivedMesh *dm, struct Mesh *me, struct Object *ob, CustomDataMask mask); struct BMEditMesh *DM_to_editbmesh(struct DerivedMesh *dm, struct BMEditMesh *existing, int do_tessellate); diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index 8efd9ae133e..b728bbcf047 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -470,7 +470,7 @@ void DM_update_tessface_data(DerivedMesh *dm) dm->dirty &= ~DM_DIRTY_TESS_CDLAYERS; } -void DM_to_mesh(DerivedMesh *dm, Mesh *me, Object *ob) +void DM_to_mesh(DerivedMesh *dm, Mesh *me, Object *ob, CustomDataMask mask) { /* dm might depend on me, so we need to do everything with a local copy */ Mesh tmp = *me; @@ -489,10 +489,10 @@ void DM_to_mesh(DerivedMesh *dm, Mesh *me, Object *ob) totpoly = tmp.totpoly = dm->getNumPolys(dm); tmp.totface = 0; - CustomData_copy(&dm->vertData, &tmp.vdata, CD_MASK_MESH, CD_DUPLICATE, totvert); - CustomData_copy(&dm->edgeData, &tmp.edata, CD_MASK_MESH, CD_DUPLICATE, totedge); - CustomData_copy(&dm->loopData, &tmp.ldata, CD_MASK_MESH, CD_DUPLICATE, totloop); - CustomData_copy(&dm->polyData, &tmp.pdata, CD_MASK_MESH, CD_DUPLICATE, totpoly); + CustomData_copy(&dm->vertData, &tmp.vdata, mask, CD_DUPLICATE, totvert); + CustomData_copy(&dm->edgeData, &tmp.edata, mask, CD_DUPLICATE, totedge); + CustomData_copy(&dm->loopData, &tmp.ldata, mask, CD_DUPLICATE, totloop); + CustomData_copy(&dm->polyData, &tmp.pdata, mask, CD_DUPLICATE, totpoly); tmp.cd_flag = dm->cd_flag; if (CustomData_has_layer(&dm->vertData, CD_SHAPEKEY)) { diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index 93b398cec55..3c4900e8a6a 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -1599,7 +1599,7 @@ void BKE_mesh_from_nurbs_displist(Object *ob, ListBase *dispbase, const bool use } else { me = BKE_mesh_add(G.main, "Mesh"); - DM_to_mesh(dm, me, ob); + DM_to_mesh(dm, me, ob, CD_MASK_MESH); } me->totcol = cu->totcol; |