Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/mesh.c
| Show First 20 Lines • Show All 358 Lines • ▼ Show 20 Lines | IDTypeInfo IDType_ID_ME = { | ||||
| .foreach_cache = NULL, | .foreach_cache = NULL, | ||||
| .blend_write = mesh_blend_write, | .blend_write = mesh_blend_write, | ||||
| .blend_read_data = mesh_blend_read_data, | .blend_read_data = mesh_blend_read_data, | ||||
| .blend_read_lib = mesh_blend_read_lib, | .blend_read_lib = mesh_blend_read_lib, | ||||
| .blend_read_expand = mesh_read_expand, | .blend_read_expand = mesh_read_expand, | ||||
| .blend_read_undo_preserve = NULL, | .blend_read_undo_preserve = NULL, | ||||
| .lib_override_apply_post = NULL, | |||||
| }; | }; | ||||
| enum { | enum { | ||||
| MESHCMP_DVERT_WEIGHTMISMATCH = 1, | MESHCMP_DVERT_WEIGHTMISMATCH = 1, | ||||
| MESHCMP_DVERT_GROUPMISMATCH, | MESHCMP_DVERT_GROUPMISMATCH, | ||||
| MESHCMP_DVERT_TOTGROUPMISMATCH, | MESHCMP_DVERT_TOTGROUPMISMATCH, | ||||
| MESHCMP_LOOPCOLMISMATCH, | MESHCMP_LOOPCOLMISMATCH, | ||||
| MESHCMP_LOOPUVMISMATCH, | MESHCMP_LOOPUVMISMATCH, | ||||
| ▲ Show 20 Lines • Show All 559 Lines • ▼ Show 20 Lines | Mesh *BKE_mesh_new_nomain_from_template_ex(const Mesh *me_src, | ||||
| int polys_len, | int polys_len, | ||||
| CustomData_MeshMasks mask) | CustomData_MeshMasks mask) | ||||
| { | { | ||||
| /* Only do tessface if we are creating tessfaces or copying from mesh with only tessfaces. */ | /* 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))); | 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->mselect = MEM_dupallocN(me_dst->mselect); | me_dst->mselect = MEM_dupallocN(me_src->mselect); | ||||
| me_dst->totvert = verts_len; | me_dst->totvert = verts_len; | ||||
| me_dst->totedge = edges_len; | me_dst->totedge = edges_len; | ||||
| me_dst->totface = tessface_len; | me_dst->totface = tessface_len; | ||||
| me_dst->totloop = loops_len; | me_dst->totloop = loops_len; | ||||
| me_dst->totpoly = polys_len; | me_dst->totpoly = polys_len; | ||||
| me_dst->cd_flag = me_src->cd_flag; | me_dst->cd_flag = me_src->cd_flag; | ||||
| ▲ Show 20 Lines • Show All 1,205 Lines • Show Last 20 Lines | |||||