Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/mesh/editmesh_select.c
| Show First 20 Lines • Show All 1,260 Lines • ▼ Show 20 Lines | static int edbm_select_similar_region_exec(bContext *C, wmOperator *op) | ||||
| if (bm->totfacesel < 2) { | if (bm->totfacesel < 2) { | ||||
| BKE_report(op->reports, RPT_ERROR, "No face regions selected"); | BKE_report(op->reports, RPT_ERROR, "No face regions selected"); | ||||
| return OPERATOR_CANCELLED; | return OPERATOR_CANCELLED; | ||||
| } | } | ||||
| groups_array = MEM_mallocN(sizeof(*groups_array) * bm->totfacesel, __func__); | groups_array = MEM_mallocN(sizeof(*groups_array) * bm->totfacesel, __func__); | ||||
| group_tot = BM_mesh_calc_face_groups( | group_tot = BM_mesh_calc_face_groups( | ||||
| bm, groups_array, &group_index, NULL, NULL, BM_ELEM_SELECT, BM_VERT); | bm, groups_array, &group_index, NULL, NULL, NULL, BM_ELEM_SELECT, BM_VERT); | ||||
| 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++) { | ||||
| ListBase faces_regions; | ListBase faces_regions; | ||||
| int tot; | int tot; | ||||
| const int fg_sta = group_index[i][0]; | const int fg_sta = group_index[i][0]; | ||||
| ▲ Show 20 Lines • Show All 1,539 Lines • ▼ Show 20 Lines | bool EDBM_select_interior_faces(BMEditMesh *em) | ||||
| /* group vars */ | /* group vars */ | ||||
| int *fgroup_array; | int *fgroup_array; | ||||
| int(*fgroup_index)[2]; | int(*fgroup_index)[2]; | ||||
| int fgroup_len; | int fgroup_len; | ||||
| fgroup_array = MEM_mallocN(sizeof(*fgroup_array) * bm->totface, __func__); | fgroup_array = MEM_mallocN(sizeof(*fgroup_array) * bm->totface, __func__); | ||||
| fgroup_len = BM_mesh_calc_face_groups( | fgroup_len = BM_mesh_calc_face_groups( | ||||
| bm, fgroup_array, &fgroup_index, bm_interior_loop_filter_fn, NULL, 0, BM_EDGE); | bm, fgroup_array, &fgroup_index, bm_interior_loop_filter_fn, NULL, NULL, 0, BM_EDGE); | ||||
| int *fgroup_recalc_stack = MEM_mallocN(sizeof(*fgroup_recalc_stack) * fgroup_len, __func__); | int *fgroup_recalc_stack = MEM_mallocN(sizeof(*fgroup_recalc_stack) * fgroup_len, __func__); | ||||
| STACK_DECLARE(fgroup_recalc_stack); | STACK_DECLARE(fgroup_recalc_stack); | ||||
| STACK_INIT(fgroup_recalc_stack, fgroup_len); | STACK_INIT(fgroup_recalc_stack, fgroup_len); | ||||
| BM_mesh_elem_table_ensure(bm, BM_FACE); | BM_mesh_elem_table_ensure(bm, BM_FACE); | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 2,373 Lines • Show Last 20 Lines | |||||