Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/mesh.c
| Show First 20 Lines • Show All 644 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| static Mesh *mesh_new_nomain_from_template_ex( | static Mesh *mesh_new_nomain_from_template_ex( | ||||
| const Mesh *me_src, | const Mesh *me_src, | ||||
| int verts_len, int edges_len, int tessface_len, | int verts_len, int edges_len, int tessface_len, | ||||
| int loops_len, int polys_len, | int loops_len, int polys_len, | ||||
| CustomDataMask mask) | CustomDataMask mask) | ||||
| { | { | ||||
| const bool do_tessface = ((me_src->totface != 0) && (me_src->totpoly == 0)); /* only do tessface if we have no polys */ | /* Only do tessface if we are creating tessfaces or copying from mesh with only tessfaces. */ | ||||
| const bool do_tessface = (tessface_len || | |||||
| ((me_src->totface != 0) && (me_src->totpoly == 0))); | |||||
| Mesh *me_dst = BKE_id_new_nomain(ID_ME, NULL); | Mesh *me_dst = BKE_id_new_nomain(ID_ME, NULL); | ||||
| me_dst->mat = MEM_dupallocN(me_src->mat); | me_dst->mat = MEM_dupallocN(me_src->mat); | ||||
| me_dst->mselect = MEM_dupallocN(me_dst->mselect); | me_dst->mselect = MEM_dupallocN(me_dst->mselect); | ||||
| me_dst->totvert = verts_len; | me_dst->totvert = verts_len; | ||||
| me_dst->totedge = edges_len; | me_dst->totedge = edges_len; | ||||
| ▲ Show 20 Lines • Show All 1,216 Lines • Show Last 20 Lines | |||||