Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_triangulate.c
| Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | bm = BKE_mesh_to_bmesh_ex(mesh, | ||||
| &((struct BMeshCreateParams){0}), | &((struct BMeshCreateParams){0}), | ||||
| &((struct BMeshFromMeshParams){ | &((struct BMeshFromMeshParams){ | ||||
| .calc_face_normal = true, | .calc_face_normal = true, | ||||
| .cd_mask_extra = cddata_masks, | .cd_mask_extra = cddata_masks, | ||||
| })); | })); | ||||
| BM_mesh_triangulate(bm, quad_method, ngon_method, min_vertices, false, NULL, NULL, NULL); | BM_mesh_triangulate(bm, quad_method, ngon_method, min_vertices, false, NULL, NULL, NULL); | ||||
| result = BKE_mesh_from_bmesh_for_eval_nomain(bm, &cddata_masks); | result = BKE_mesh_from_bmesh_for_eval_nomain(bm, &cddata_masks, mesh); | ||||
| BM_mesh_free(bm); | BM_mesh_free(bm); | ||||
| if (keep_clnors) { | if (keep_clnors) { | ||||
| float(*lnors)[3] = CustomData_get_layer(&result->ldata, CD_NORMAL); | float(*lnors)[3] = CustomData_get_layer(&result->ldata, CD_NORMAL); | ||||
| BLI_assert(lnors != NULL); | BLI_assert(lnors != NULL); | ||||
| BKE_mesh_set_custom_normals(result, lnors); | BKE_mesh_set_custom_normals(result, lnors); | ||||
| ▲ Show 20 Lines • Show All 69 Lines • Show Last 20 Lines | |||||