Changeset View
Changeset View
Standalone View
Standalone View
source/blender/bmesh/operators/bmo_normals.c
| Show First 20 Lines • Show All 266 Lines • ▼ Show 20 Lines | |||||
| void bmo_recalc_face_normals_exec(BMesh *bm, BMOperator *op) | void bmo_recalc_face_normals_exec(BMesh *bm, BMOperator *op) | ||||
| { | { | ||||
| int *groups_array = MEM_mallocN(sizeof(*groups_array) * bm->totface, __func__); | int *groups_array = MEM_mallocN(sizeof(*groups_array) * bm->totface, __func__); | ||||
| BMFace **faces_grp = MEM_mallocN(sizeof(*faces_grp) * bm->totface, __func__); | BMFace **faces_grp = MEM_mallocN(sizeof(*faces_grp) * bm->totface, __func__); | ||||
| int(*group_index)[2]; | int(*group_index)[2]; | ||||
| const int group_tot = BM_mesh_calc_face_groups( | const int group_tot = BM_mesh_calc_face_groups( | ||||
| bm, groups_array, &group_index, bmo_recalc_normal_loop_filter_cb, NULL, 0, BM_EDGE); | bm, groups_array, &group_index, bmo_recalc_normal_loop_filter_cb, NULL, NULL, 0, BM_EDGE); | ||||
| int i; | int i; | ||||
| BMO_slot_buffer_flag_enable(bm, op->slots_in, "faces", BM_FACE, FACE_FLAG); | BMO_slot_buffer_flag_enable(bm, op->slots_in, "faces", BM_FACE, FACE_FLAG); | ||||
| BM_mesh_elem_table_ensure(bm, BM_FACE); | BM_mesh_elem_table_ensure(bm, BM_FACE); | ||||
| for (i = 0; i < group_tot; i++) { | for (i = 0; i < group_tot; i++) { | ||||
| const int fg_sta = group_index[i][0]; | const int fg_sta = group_index[i][0]; | ||||
| Show All 22 Lines | |||||