Merge branch 'blender-v2.91-release'
This commit is contained in:
commit
9d716b929d
|
@ -390,6 +390,7 @@ typedef bool (*BMVertFilterFunc)(const BMVert *, void *user_data);
|
|||
typedef bool (*BMEdgeFilterFunc)(const BMEdge *, void *user_data);
|
||||
typedef bool (*BMFaceFilterFunc)(const BMFace *, void *user_data);
|
||||
typedef bool (*BMLoopFilterFunc)(const BMLoop *, void *user_data);
|
||||
typedef bool (*BMLoopPairFilterFunc)(const BMLoop *, const BMLoop *, void *user_data);
|
||||
|
||||
/* defines */
|
||||
#define BM_ELEM_CD_SET_INT(ele, offset, f) \
|
||||
|
|
|
@ -2612,6 +2612,7 @@ int BM_mesh_calc_face_groups(BMesh *bm,
|
|||
int *r_groups_array,
|
||||
int (**r_group_index)[2],
|
||||
BMLoopFilterFunc filter_fn,
|
||||
BMLoopPairFilterFunc filter_pair_fn,
|
||||
void *user_data,
|
||||
const char hflag_test,
|
||||
const char htype_step)
|
||||
|
@ -2707,10 +2708,12 @@ int BM_mesh_calc_face_groups(BMesh *bm,
|
|||
BMLoop *l_radial_iter = l_iter->radial_next;
|
||||
if ((l_radial_iter != l_iter) && ((filter_fn == NULL) || filter_fn(l_iter, user_data))) {
|
||||
do {
|
||||
BMFace *f_other = l_radial_iter->f;
|
||||
if (BM_elem_flag_test(f_other, BM_ELEM_TAG) == false) {
|
||||
BM_elem_flag_enable(f_other, BM_ELEM_TAG);
|
||||
STACK_PUSH(stack, f_other);
|
||||
if ((filter_pair_fn == NULL) || filter_pair_fn(l_iter, l_radial_iter, user_data)) {
|
||||
BMFace *f_other = l_radial_iter->f;
|
||||
if (BM_elem_flag_test(f_other, BM_ELEM_TAG) == false) {
|
||||
BM_elem_flag_enable(f_other, BM_ELEM_TAG);
|
||||
STACK_PUSH(stack, f_other);
|
||||
}
|
||||
}
|
||||
} while ((l_radial_iter = l_radial_iter->radial_next) != l_iter);
|
||||
}
|
||||
|
@ -2725,10 +2728,12 @@ int BM_mesh_calc_face_groups(BMesh *bm,
|
|||
if ((filter_fn == NULL) || filter_fn(l_iter, user_data)) {
|
||||
BMLoop *l_other;
|
||||
BM_ITER_ELEM (l_other, &liter, l_iter, BM_LOOPS_OF_LOOP) {
|
||||
BMFace *f_other = l_other->f;
|
||||
if (BM_elem_flag_test(f_other, BM_ELEM_TAG) == false) {
|
||||
BM_elem_flag_enable(f_other, BM_ELEM_TAG);
|
||||
STACK_PUSH(stack, f_other);
|
||||
if ((filter_pair_fn == NULL) || filter_pair_fn(l_iter, l_other, user_data)) {
|
||||
BMFace *f_other = l_other->f;
|
||||
if (BM_elem_flag_test(f_other, BM_ELEM_TAG) == false) {
|
||||
BM_elem_flag_enable(f_other, BM_ELEM_TAG);
|
||||
STACK_PUSH(stack, f_other);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -254,6 +254,7 @@ int BM_mesh_calc_face_groups(BMesh *bm,
|
|||
int *r_groups_array,
|
||||
int (**r_group_index)[2],
|
||||
BMLoopFilterFunc filter_fn,
|
||||
BMLoopPairFilterFunc filter_pair_fn,
|
||||
void *user_data,
|
||||
const char hflag_test,
|
||||
const char htype_step) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 2, 3);
|
||||
|
|
|
@ -272,7 +272,7 @@ void bmo_recalc_face_normals_exec(BMesh *bm, BMOperator *op)
|
|||
|
||||
int(*group_index)[2];
|
||||
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;
|
||||
|
||||
BMO_slot_buffer_flag_enable(bm, op->slots_in, "faces", BM_FACE, FACE_FLAG);
|
||||
|
|
|
@ -1533,7 +1533,7 @@ bool BM_mesh_intersect(BMesh *bm,
|
|||
|
||||
groups_array = MEM_mallocN(sizeof(*groups_array) * (size_t)bm->totface, __func__);
|
||||
group_tot = BM_mesh_calc_face_groups(
|
||||
bm, groups_array, &group_index, bm_loop_filter_fn, &user_data_wrap, 0, BM_EDGE);
|
||||
bm, groups_array, &group_index, bm_loop_filter_fn, NULL, &user_data_wrap, 0, BM_EDGE);
|
||||
|
||||
#ifdef USE_DUMP
|
||||
printf("%s: Total face-groups: %d\n", __func__, group_tot);
|
||||
|
|
|
@ -1266,7 +1266,7 @@ static int edbm_select_similar_region_exec(bContext *C, wmOperator *op)
|
|||
|
||||
groups_array = MEM_mallocN(sizeof(*groups_array) * bm->totfacesel, __func__);
|
||||
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);
|
||||
|
||||
|
@ -2822,7 +2822,7 @@ bool EDBM_select_interior_faces(BMEditMesh *em)
|
|||
|
||||
fgroup_array = MEM_mallocN(sizeof(*fgroup_array) * bm->totface, __func__);
|
||||
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__);
|
||||
STACK_DECLARE(fgroup_recalc_stack);
|
||||
|
|
|
@ -98,7 +98,7 @@ static void editmesh_islands_info_calc(BMEditMesh *em,
|
|||
else { /* (bm->selectmode & SCE_SELECT_FACE) */
|
||||
groups_array = MEM_mallocN(sizeof(*groups_array) * bm->totfacesel, __func__);
|
||||
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);
|
||||
|
||||
htype = BM_FACE;
|
||||
itype = BM_VERTS_OF_FACE;
|
||||
|
|
Loading…
Reference in New Issue