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};
177 bool found_all =
false;
179 for (
int side = 0; side < 2; side++) {
180 const int side_other = !side;
190 for (
int i = 0; i < ele_loops_len[side]; i++) {
191 BMLoop *
l = ele_loops[side][i];
203 for (
int i = 0; i < ele_loops_len[side]; i++) {
204 BMLoop *
l = ele_loops[side][i];
207 for (
int j = 0; j < 2; j++) {
209 if (depths[side][l_end_index] == -1) {
210 depths[side][l_end_index] = 0;
224 for (pass = 1; (
STACK_SIZE(stack) != 0); pass++) {
245 for (
int j = 0; j < 2; j++) {
248 if (depths[side][l_b_index] == -1) {
254 ((depths[side][l_b_index] == -1) &&
258 depths[side][l_b_index] = pass;
267 if (depths[side][l_b_index] == -1) {
272 depths[side][l_b_index] = pass;
287 for (
int i = 0; i < ele_loops_len[side_other]; i++) {
293 if (found_all ==
true) {
303 if (found_all ==
false) {
315 if (found_all ==
false) {
318 else if (path_htype ==
BM_FACE) {
334 }
while ((l_iter = l_iter->
next) != l_first);
339 int ok_tests = f->
len > 3 ? 1 : 0;
348 }
while ((l_iter = l_iter->
next) != l_first);
357 else if (path_htype ==
BM_EDGE) {
366 const bool l_in_chain = l_in_chain_next;
368 if (l_in_chain && l_in_chain_next) {
374 else if (path_htype ==
BM_VERT) {
388 for (
int side = 0; side < 2; side++) {
406 const int cd_loop_uv_offset,
407 bool (*filter_fn)(
BMLoop *,
void *user_data),
435 const int cd_loop_uv_offset,
436 bool (*filter_fn)(
BMLoop *,
void *user_data),
464 const int cd_loop_uv_offset,
465 bool (*filter_fn)(
BMFace *,
void *user_data),
487 }
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)
ATTR_WARN_UNUSED_RESULT BMesh * bm
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(BMLoop *l_a, BMLoop *l_b, const int cd_loop_uv_offset)
void *(* MEM_mallocN)(size_t len, const char *str)
void MEM_freeN(void *vmemh)