48 for (j = 0; j < 2; j++) {
51 l_other = j ? l_other->
next : l_other->
prev;
52 if (l_other == l_pivot) {
56 l_end_pair[j] = l_other;
70 return (((depths[0][index] != -1) && (depths[1][index] != -1)) &&
71 ((depths[0][index] + depths[1][index]) < pass));
115 const int cd_loop_uv_offset,
116 const char path_htype)
119 int ele_loops_len[2];
123 for (
int side = 0; side < 2; side++) {
124 BMElem *ele = side ? ele_dst : ele_src;
134 ele_loops[side][j++] = l_iter;
135 }
while ((l_iter = l_iter->
next) != l_first);
141 ele_loops[side][j++] =
l;
142 ele_loops[side][j++] =
l->next;
144 else if (path_htype ==
BM_VERT) {
148 ele_loops[side][j++] =
l;
157 ele_loops_len[side] = j;
160 int *depths[2] = {
nullptr};
176 bool found_all =
false;
178 for (
int side = 0; side < 2; side++) {
179 const int side_other = !side;
182 depths[side] =
static_cast<int *
>(
MEM_mallocN(
sizeof(*depths[side]) *
bm->totloop, __func__));
189 for (
int i = 0;
i < ele_loops_len[side];
i++) {
202 for (
int i = 0;
i < ele_loops_len[side];
i++) {
206 for (
int j = 0; j < 2; j++) {
208 if (depths[side][l_end_index] == -1) {
209 depths[side][l_end_index] = 0;
223 for (pass = 1; (
STACK_SIZE(stack) != 0); pass++) {
244 for (
int j = 0; j < 2; j++) {
247 if (depths[side][l_b_index] == -1) {
253 ((depths[side][l_b_index] == -1) &&
257 depths[side][l_b_index] = pass;
266 if (depths[side][l_b_index] == -1) {
271 depths[side][l_b_index] = pass;
286 for (
int i = 0;
i < ele_loops_len[side_other];
i++) {
292 if (found_all ==
true) {
302 if (found_all ==
false) {
314 if (found_all ==
false) {
317 else if (path_htype ==
BM_FACE) {
333 }
while ((l_iter = l_iter->
next) != l_first);
338 int ok_tests = f->
len > 3 ? 1 : 0;
347 }
while ((l_iter = l_iter->
next) != l_first);
356 else if (path_htype ==
BM_EDGE) {
365 const bool l_in_chain = l_in_chain_next;
367 if (l_in_chain && l_in_chain_next) {
373 else if (path_htype ==
BM_VERT) {
387 for (
int side = 0; side < 2; side++) {
405 const int cd_loop_uv_offset,
406 bool (*filter_fn)(
BMLoop *,
void *user_data),
434 const int cd_loop_uv_offset,
435 bool (*filter_fn)(
BMLoop *,
void *user_data),
463 const int cd_loop_uv_offset,
464 bool (*filter_fn)(
BMFace *,
void *user_data),
486 }
while ((l_iter = l_iter->
next) != l_first);
#define BLI_array_alloca(arr, realsize)
void void BLI_linklist_prepend(LinkNode **listp, void *ptr) ATTR_NONNULL(1)
void copy_vn_i(int *array_tar, int size, int val)
#define STACK_CLEAR(stack)
#define STACK_PUSH(stack, val)
#define STACK_DECLARE(stack)
#define STACK_SIZE(stack)
#define STACK_INIT(stack, stack_num)
#define STACK_SWAP(stack_a, stack_b)
Read Guarded memory(de)allocation.
#define BM_FACE_FIRST_LOOP(p)
#define BM_elem_index_get(ele)
#define BM_elem_flag_disable(ele, hflag)
#define BM_elem_flag_set(ele, hflag, val)
#define BM_elem_index_set(ele, index)
#define BM_elem_flag_test(ele, hflag)
#define BM_ITER_ELEM(ele, iter, data, itype)
#define BM_ITER_MESH(ele, iter, bm, itype)
#define BM_ITER_MESH_INDEX(ele, iter, bm, itype, indexvar)
void BM_mesh_elem_hflag_enable_all(BMesh *bm, const char htype, const char hflag, const bool respecthide)
void BM_mesh_elem_index_ensure(BMesh *bm, const char htype)
static bool bm_loop_pair_ends(BMLoop *l_pivot, BMLoop *l_end_pair[2])
static LinkNode * mesh_calc_path_region_elem(BMesh *bm, BMElem *ele_src, BMElem *ele_dst, const int cd_loop_uv_offset, const char path_htype)
LinkNode * BM_mesh_calc_path_uv_region_vert(BMesh *bm, BMElem *ele_src, BMElem *ele_dst, const int cd_loop_uv_offset, bool(*filter_fn)(BMLoop *, void *user_data), void *user_data)
LinkNode * BM_mesh_calc_path_uv_region_edge(BMesh *bm, BMElem *ele_src, BMElem *ele_dst, const int cd_loop_uv_offset, bool(*filter_fn)(BMLoop *, void *user_data), void *user_data)
LinkNode * BM_mesh_calc_path_uv_region_face(BMesh *bm, BMElem *ele_src, BMElem *ele_dst, const int cd_loop_uv_offset, bool(*filter_fn)(BMFace *, void *user_data), void *user_data)
static bool bm_loop_region_test(BMLoop *l, int *const depths[2], const int pass)
static bool bm_loop_region_test_chain(BMLoop *l, int *const depths[2], const int pass)
bool BM_vert_is_edge_pair_manifold(const BMVert *v)
ATTR_WARN_UNUSED_RESULT const BMLoop * l
ATTR_WARN_UNUSED_RESULT const BMLoop * l_b
bool BM_loop_uv_share_vert_check(const BMLoop *l_a, const BMLoop *l_b, const int cd_loop_uv_offset)
void * MEM_mallocN(size_t len, const char *str)
void * MEM_malloc_arrayN(size_t len, size_t size, const char *str)
void MEM_freeN(void *vmemh)