81 {0,
nullptr, 0,
nullptr,
nullptr},
139 BMLoop *l_select_vert =
nullptr;
140 BMLoop *l_select_edge =
nullptr;
141 BMLoop *l_select_edge_pair =
nullptr;
142 BMLoop *l_select_face =
nullptr;
153 if (select_edge_prev || select_edge_next) {
154 l_select_edge_pair =
l;
156 if (select_edge_prev && select_edge_next) {
157 l_select_edge_pair =
l;
165 return l_select_face;
167 if (l_select_edge_pair) {
168 return l_select_edge_pair;
171 return l_select_edge;
173 return l_select_vert;
178 if (ese && ese->
prev) {
210 BMLoop *l_select_vert =
nullptr;
211 BMLoop *l_select_face =
nullptr;
227 return l_select_face;
229 return l_select_vert;
234 if (ese && ese->
prev) {
338 return uv_selectmode;
351 const bool strict =
false;
447 const BMLoop *l_iter = l_first;
452 }
while ((l_iter = l_iter->
next) != l_first);
746 const int sticky_flag,
780 const int sticky_flag,
1015 const int sticky_flag,
1022 BMEdge *e_first, *e_iter;
1023 e_first = e_iter =
l->
e;
1025 BMLoop *l_radial_iter = e_iter->
l;
1026 if (!l_radial_iter) {
1030 if (l_radial_iter->
v ==
l->
v) {
1032 bool do_select =
false;
1045 }
while ((l_radial_iter = l_radial_iter->
radial_next) != e_iter->
l);
1112 BMLoop *l_other =
nullptr;
1114 if (l_iter != l_src) {
1120 if (l_other ==
nullptr) {
1129 }
while ((l_iter = l_iter->
radial_next) != l_src);
1143 l_step = (l_step->
v == v_pivot) ? l_step->
prev : l_step->
next;
1144 BMLoop *l_step_last =
nullptr;
1147 l_step_last = l_step;
1150 l_step = (l_step->
v == v_pivot) ? l_step->
prev : l_step->
next;
1152 }
while (l_step !=
nullptr);
1154 if (l_step_last !=
nullptr) {
1246 hit.
scale[0] = 1.0f;
1247 hit.
scale[1] = 1.0f;
1253 const short uv_selectmode)
1269 BMLoop *l_iter, *l_first, *l_best;
1279 if (dist_test_sq < dist_best_sq) {
1280 dist_best_sq = dist_test_sq;
1283 }
while ((l_iter = l_iter->
next) != l_first);
1288 BMLoop *l_iter, *l_first, *l_best;
1300 if (dist_test_sq < dist_best_sq) {
1301 dist_best_sq = dist_test_sq;
1304 }
while ((l_iter = l_iter->
next) != l_first);
1317 float *luv, *luv_next;
1347 if (dist_test_sq < hit->dist_sq) {
1364 const float penalty,
1368 for (
Object *obedit : objects) {
1402 if (dist_test_sq < hit->dist_sq) {
1428 const bool only_in_face)
1431 for (
Object *obedit : objects) {
1493 dist_test_sq =
square_f(
sqrtf(dist_test_sq) + penalty_dist);
1496 if (dist_test_sq <= hit->dist_sq) {
1497 if (dist_test_sq == hit->
dist_sq) {
1519 const float penalty_dist,
1523 for (
Object *obedit : objects) {
1534 const float scale[2],
1535 const bool ignore_selected,
1542 const float *uv_best =
nullptr;
1543 float dist_best = *dist_sq;
1550 BMLoop *l_iter, *l_first;
1561 if (dist_best > dist_test) {
1562 dist_best = dist_test;
1565 }
while ((l_iter = l_iter->
next) != l_first);
1568 if (uv_best !=
nullptr) {
1570 *dist_sq = dist_best;
1579 const float mval_fl[2],
1580 const bool ignore_selected,
1586 float scale[2], offset[2];
1593 for (
Object *obedit : objects) {
1618 BMLoop *l_found =
nullptr;
1628 if (dist_test_sq < dist_best_sq) {
1629 dist_best_sq = dist_test_sq;
1643 BMLoop *l_found =
nullptr;
1653 if (dist_test_sq < dist_best_sq) {
1654 dist_best_sq = dist_test_sq;
1711 BMLoop *l_radial_iter = e_iter->
l;
1712 if (!l_radial_iter) {
1721 BMLoop *l_other = (l_radial_iter->
v !=
l->
v) ? l_radial_iter->
next : l_radial_iter;
1727 }
while ((l_radial_iter = l_radial_iter->
radial_next) != e_iter->
l);
1740 if (l_radial_iter ==
l) {
1752 }
while ((l_radial_iter = l_radial_iter->
radial_next) !=
l);
1904 if (cd_loop_uv_offset == -1) {
1907 return std::make_unique<UVSyncSelectFromMesh>(
bm, ts.
uv_sticky);
1922 &bm_,
false, uv_pick_params, bm_verts_deselect_, bm_edges_deselect_, bm_faces_deselect_);
1925 &bm_,
true, uv_pick_params, bm_verts_select_, bm_edges_select_, bm_faces_select_);
1932 bm_verts_select_.append(
v);
1936 bm_edges_select_.append(f);
1940 bm_faces_select_.append(f);
1947 bm_verts_deselect_.append(
v);
1951 bm_edges_deselect_.append(f);
1955 bm_faces_deselect_.append(f);
1963 bm_verts_select_.append(
v);
1966 bm_verts_deselect_.append(
v);
1972 bm_edges_select_.append(f);
1975 bm_edges_deselect_.append(f);
1981 bm_faces_select_.append(f);
1984 bm_faces_deselect_.append(f);
2014 bool select_all =
true;
2019 if (!edge_selected) {
2034 bool select_all =
true;
2069 bool select_all =
true;
2093 bool select_all =
true;
2102 if (select_all ==
false) {
2128 if (l_step->
f->
len == 4) {
2130 BMLoop *l_step_over = (v_from == l_step->
v) ? l_step->
next : l_step->
prev;
2132 scene, l_step_over, offsets);
2134 return (l_step_over->
v == v_from_next) ? l_step_over->
prev : l_step_over->
next;
2147 scene, l_step, v_from_next, offsets);
2174 for (
int side = 0; side < 2; side++) {
2175 BMLoop *l_step_pair[2] = {l_init_pair[0], l_init_pair[1]};
2176 BMVert *v_from = side ? l_step_pair[0]->
e->
v1 : l_step_pair[0]->
e->
v2;
2180 while ((l_step_pair[0] !=
nullptr) && (l_step_pair[1] !=
nullptr)) {
2197 for (
int i = 0; i <
ARRAY_SIZE(l_step_pair); i++) {
2199 scene, l_step_pair[i], v_from, offsets);
2207 v_from = v_from_next;
2223 int r_count_by_select[2])
2225 if (r_count_by_select) {
2226 r_count_by_select[0] = r_count_by_select[1] = 0;
2231 for (
int side = 0; side < 2; side++) {
2236 while (l_step !=
nullptr) {
2246 if (r_count_by_select !=
nullptr) {
2249 if (r_count_by_select[0] && r_count_by_select[1]) {
2250 r_count_by_select[0] = r_count_by_select[1] = -1;
2258 BMFace *f_step_prev = l_step->
f;
2267 if (f_step_prev == l_step->
f) {
2271 v_from = v_from_next;
2294 BMLoop *l_init_pair[2] = {
2304 if (l_init_pair[1] ==
nullptr) {
2305 int count_by_select[2];
2308 scene,
bm, l_init_pair[0], offsets, boundary_mode, count_by_select);
2309 if (count_by_select[!
select] == 0) {
2314 scene,
bm, l_init_pair[0], offsets, boundary_mode, count_by_select);
2315 if (count_by_select[!
select] == 0) {
2321 if (l_init_pair[1] ==
nullptr) {
2404 for (
int side = 0; side < 2; side++) {
2405 BMLoop *l_step = l_pair[side];
2414 if (l_step->
f->
len == 4) {
2417 scene, l_step_opposite, offsets);
2432 return (
select) ? 1 : -1;
2479 for (
int side = 0; side < 2; side++) {
2480 BMLoop *l_step = l_pair[side];
2488 if (use_face_select) {
2494 else if (use_vertex_select) {
2504 if (l_step->
f->
len == 4) {
2507 scene, l_step_opposite, offsets);
2508 if (l_step ==
nullptr) {
2510 l_step = l_step_opposite;
2525 if (use_vertex_select && !use_face_select) {
2534 if (is_select ==
select) {
2541 return (
select) ? 1 : -1;
2560 const BMLoop *l_vert_step,
2573 if (
bool(delimit_mode & edge_delimit)) {
2574 const BMEdge *edges[] = {l_vert_step->
e, l_vert_step->
prev->
e};
2575 bool has_valid_edge =
false;
2576 for (
const BMEdge *
e : edges) {
2586 has_valid_edge =
true;
2589 if (!has_valid_edge) {
2603 const bool select_faces,
2624 for (
const int ob_index : objects.
index_range()) {
2625 if (hit && ob_index != 0) {
2628 Object *obedit = hit ? hit->
ob : objects[ob_index];
2634 int i, stacksize = 0, *stack;
2639 if (uv_select_sync) {
2656 if (vmap ==
nullptr) {
2663 if (hit ==
nullptr) {
2669 stack[stacksize] = a;
2677 bool add_to_stack =
true;
2707 add_to_stack =
false;
2715 stack[stacksize] = a;
2728 if (efa == hit->
efa) {
2729 stack[stacksize] = a;
2737 while (stacksize > 0) {
2740 a = stack[stacksize];
2751 for (iterv = vlist; iterv; iterv = iterv->
next) {
2760 for (iterv = startv; iterv; iterv = iterv->
next) {
2761 if ((startv != iterv) && (iterv->
separate)) {
2780 if ((toggle ==
true) && (extend ==
false) && (deselect ==
false)) {
2782 bool found_selected =
false;
2790 found_selected =
true;
2797 found_selected =
true;
2802 if (found_selected) {
2810#define SET_SELECTION(value) \
2811 if (select_faces) { \
2812 if (hflag == BM_ELEM_SELECT) { \
2813 BM_face_select_set(bm, efa, value); \
2816 BM_elem_flag_set(efa, hflag, value); \
2820 uvedit_face_select_set(scene, bm, efa, value); \
2829 const bool needs_multi_pass = uv_select_sync &&
2832 (deselect ==
false);
2833 const bool deselect_elem = !extend && !deselect && !toggle;
2835 if (needs_multi_pass ==
false) {
2838 if (deselect_elem) {
2856 if (deselect_elem) {
2878 if (uv_select_sync) {
2884 if (!select_faces) {
2963 this->scene =
scene;
2991 if (
vmap_ ==
nullptr) [[unlikely]] {
3012 stack_[stack_len++] = face_index;
3015 while (stack_len > 0) {
3016 const int i =
stack_[--stack_len];
3026 for (
UvMapVert *iterv = vlist; iterv; iterv = iterv->
next) {
3027 if (iterv->separate) {
3030 if (iterv->face_index == i) {
3036 for (
UvMapVert *iterv = startv; iterv; iterv = iterv->
next) {
3037 if ((startv != iterv) && iterv->separate) {
3042 stack_[stack_len++] = iterv->face_index;
3113 if (use_select_linked) {
3117 (*linked_helpers)[i].init(scene,
bm);
3169 *bmain, scene, view_layer,
nullptr);
3175 for (
Object *obedit : objects) {
3178 bool changed =
false;
3202 if (is_uv_face_selectmode) {
3212#define NEIGHBORING_FACE_IS_SEL 1
3213#define CURR_FACE_IS_UNSEL 2
3238#undef NEIGHBORING_FACE_IS_SEL
3239#undef CURR_FACE_IS_UNSEL
3282 if (is_uv_face_selectmode) {
3325 ot->
name =
"Select More";
3326 ot->
description =
"Select more UV vertices connected to initial selection";
3327 ot->
idname =
"UV_OT_select_more";
3343 ot->
name =
"Select Less";
3344 ot->
description =
"Deselect UV vertices at the boundary of each selection region";
3345 ot->
idname =
"UV_OT_select_less";
3386 for (
Object *obedit : objects) {
3490 bool face_select =
true;
3505 face_select =
false;
3541 bool select_all =
true;
3614 const Object *ob_exclude)
3620 for (
Object *obedit : objects) {
3621 if (ob_exclude && (obedit == ob_exclude)) {
3644 *bmain, scene, view_layer,
nullptr);
3648 for (
Object *obedit : objects) {
3658 ot->
name =
"(De)select All";
3659 ot->
description =
"Change selection of all UV vertices";
3660 ot->
idname =
"UV_OT_select_all";
3687 int selectmode, sticky;
3688 bool found_item =
false;
3695 const float penalty_dist = 3.0f *
U.pixelsize;
3722 if (use_select_linked && !found_item) {
3743 if (use_select_linked && !found_item) {
3778 bool found = found_item;
3779 bool changed =
false;
3781 bool is_selected =
false;
3811 for (
Object *obedit : objects) {
3829 BMElem *ele_active =
nullptr;
3831 if (use_select_linked) {
3844 bool select_value =
false;
3847 select_value =
true;
3851 select_value =
false;
3855 select_value = !is_selected;
3860 select_value =
true;
3894 ele_active =
reinterpret_cast<BMElem *
>(hit.
efa);
3897 ele_active =
reinterpret_cast<BMElem *
>(hit.
l->
e);
3900 ele_active =
reinterpret_cast<BMElem *
>(hit.
l->
v);
3910 flush = select_value ? 1 : -1;
3949 if (changed && found) {
3955 return changed || found;
3963 *bmain, scene, view_layer,
nullptr);
4000 ot->
name =
"Select";
4002 ot->
idname =
"UV_OT_select";
4024 "Mouse location in normalized coordinates, 0.0 to 1.0 is within the image bounds",
4053 bool found_item =
false;
4102 for (
Object *ob : objects) {
4117 *bmain, scene, view_layer,
nullptr);
4154 ot->
name =
"Loop Select";
4155 ot->
description =
"Select a loop of connected UV vertices";
4156 ot->
idname =
"UV_OT_select_loop";
4170 "Extend selection rather than clearing the existing selection");
4180 "Mouse location in normalized coordinates, 0.0 to 1.0 is within the image bounds",
4218 ot->
name =
"Edge Ring Select";
4219 ot->
description =
"Select an edge ring of connected UV vertices";
4220 ot->
idname =
"UV_OT_select_edge_ring";
4234 "Extend selection rather than clearing the existing selection");
4244 "Mouse location in normalized coordinates, 0.0 to 1.0 is within the image bounds",
4267 bool deselect =
false;
4281 *bmain, scene, view_layer,
nullptr);
4301 if (!extend && !deselect) {
4307 pick ? &hit :
nullptr,
4320 for (
Object *obedit : objects) {
4337 ot->
name =
"Select Linked";
4338 ot->
description =
"Select all UV vertices linked to the active UV map";
4339 ot->
idname =
"UV_OT_select_linked";
4354 "Delimit selection when selecting linked UVs");
4378 ot->
name =
"Select Linked Pick";
4379 ot->
description =
"Select all UV vertices linked under the mouse";
4380 ot->
idname =
"UV_OT_select_linked_pick";
4396 "Extend selection rather than clearing the existing selection");
4402 "Deselect linked UV vertices rather than selecting them");
4409 "Delimit selection when selecting linked UVs");
4418 "Mouse location in normalized coordinates, 0.0 to 1.0 is within the image bounds",
4454 "Cannot split selection with \"Sync Select\" and \"Shared Vertex\" selection enabled");
4459 bool changed_multi =
false;
4462 *bmain, scene, view_layer,
nullptr);
4464 for (
Object *obedit : objects) {
4467 bool changed =
false;
4477 bool is_sel =
false;
4478 bool is_unsel =
false;
4489 if (select_vert || select_edge) {
4492 if (!select_vert || !select_edge) {
4497 if (is_sel && is_unsel) {
4502 if (is_sel && is_unsel) {
4515 changed_multi =
true;
4527 ot->
name =
"Select Split";
4528 ot->
description =
"Select only entirely selected faces";
4529 ot->
idname =
"UV_OT_select_split";
4635 bool use_sticky =
true;
4748 bool tag_all =
true;
4749 bool tag_any =
false;
4783 bool tag_all =
true;
4784 bool tag_any =
false;
4852 bool use_sticky =
true;
4891 bool select_all =
true;
4961 bool changed_multi =
false;
4964 *bmain, scene, view_layer,
nullptr);
4966 if (use_pre_deselect) {
4971 for (
Object *obedit : objects) {
4974 bool changed =
false;
4986 if (pinned && offsets.
pin == -1) {
4992 std::optional<UVSelectLinkedHelper> linked_helper;
4993 if (use_select_linked) {
4994 linked_helper.emplace(scene,
bm);
4998 if (use_select_linked) {
4999 if (linked_helper->face_check(efa)) {
5011 if (use_select_linked) {
5012 linked_helper->face_add(efa);
5020 if (use_select_linked) {
5021 linked_helper->tag_all();
5030 std::optional<UVSelectLinkedHelper> linked_helper;
5031 if (use_select_linked) {
5032 linked_helper.emplace(scene,
bm);
5034 bool do_second_pass =
true;
5043 bool has_selected =
false;
5048 do_second_pass =
false;
5049 has_selected =
true;
5055 if (has_selected && use_select_linked) {
5056 linked_helper->face_add(efa);
5061 if (do_second_pass) {
5070 bool has_selected =
false;
5075 has_selected =
true;
5081 if (has_selected && use_select_linked) {
5082 linked_helper->face_add(efa);
5086 if (use_select_linked) {
5087 linked_helper->select_all(
select);
5097 std::optional<UVSelectLinkedHelper> linked_helper;
5098 if (use_select_linked) {
5099 linked_helper.emplace(scene,
bm);
5106 bool has_selected =
false;
5114 has_selected =
true;
5119 if (has_selected && use_select_linked) {
5120 linked_helper->face_add(efa);
5123 if (use_select_linked) {
5124 linked_helper->select_all(
select);
5132 if (changed || use_pre_deselect) {
5133 changed_multi =
true;
5150 ot->
name =
"Box Select";
5151 ot->
description =
"Select UV vertices using box selection";
5152 ot->
idname =
"UV_OT_select_box";
5178 const float offset[2],
5179 const float ellipse[2])
5182 const float co[2] = {
5183 (uv[0] - offset[0]) * ellipse[0],
5184 (uv[1] - offset[1]) * ellipse[1],
5190 const float uv_b[2],
5191 const float offset[2],
5192 const float ellipse[2])
5195 const float co_a[2] = {
5196 (uv_a[0] - offset[0]) * ellipse[0],
5197 (uv_a[1] - offset[1]) * ellipse[1],
5199 const float co_b[2] = {
5200 (uv_b[0] - offset[0]) * ellipse[0],
5201 (uv_b[1] - offset[1]) * ellipse[1],
5203 const float co_zero[2] = {0.0f, 0.0f};
5220 int x,
y, radius, width, height;
5222 float offset[2], ellipse[2];
5238 ellipse[0] = width * zoomx / radius;
5239 ellipse[1] = height * zoomy / radius;
5243 bool changed_multi =
false;
5253 if (
state ==
nullptr) {
5255 *bmain, scene, view_layer,
nullptr);
5256 state = MEM_new<UVCircleSelectState>(__func__, scene, std::move(objects), use_select_linked);
5259 gesture->user_data.use_free =
true;
5264 if (use_pre_deselect) {
5268 for (
const int ob_index : objects.
index_range()) {
5269 Object *obedit = objects[ob_index];
5272 bool changed =
false;
5284 if (use_select_linked) {
5299 if (use_select_linked) {
5314 if (use_select_linked) {
5322 if (use_select_linked) {
5324 linked_helper->
clear();
5342 bool has_selected =
false;
5347 has_selected =
true;
5353 if (has_selected && use_select_linked) {
5357 if (use_select_linked) {
5359 linked_helper->
clear();
5372 bool has_selected =
false;
5380 has_selected =
true;
5384 if (has_selected && use_select_linked) {
5388 if (use_select_linked) {
5390 linked_helper->
clear();
5398 if (changed || use_pre_deselect) {
5399 changed_multi =
true;
5416 ot->
name =
"Circle Select";
5417 ot->
description =
"Select UV vertices using circle selection";
5418 ot->
idname =
"UV_OT_select_circle";
5443 const rcti *clip_rect,
5445 const float co_test[2])
5449 ®ion->
v2d, co_test[0], co_test[1], &co_screen[0], &co_screen[1]) &&
5459 const rcti *clip_rect,
5461 const float co_test_a[2],
5462 const float co_test_b[2])
5464 int co_screen_a[2], co_screen_b[2];
5466 ®ion->
v2d, co_test_a, co_test_b, co_screen_a, co_screen_b) &&
5496 bool changed_multi =
false;
5502 *bmain, scene, view_layer,
nullptr);
5504 if (use_pre_deselect) {
5508 for (
Object *obedit : objects) {
5510 bool changed =
false;
5522 std::optional<UVSelectLinkedHelper> linked_helper;
5523 if (use_select_linked) {
5524 linked_helper.emplace(scene,
bm);
5535 if (use_select_linked) {
5536 if (linked_helper->face_check(efa)) {
5550 if (use_select_linked) {
5551 linked_helper->face_add(efa);
5558 if (use_select_linked) {
5559 linked_helper->tag_all();
5569 bool do_second_pass =
true;
5575 bool has_selected =
false;
5584 do_second_pass =
false;
5585 has_selected =
true;
5591 if (has_selected && use_select_linked) {
5592 linked_helper->face_add(efa);
5597 if (do_second_pass) {
5606 bool has_selected =
false;
5611 has_selected =
true;
5617 if (has_selected && use_select_linked) {
5618 linked_helper->face_add(efa);
5622 if (use_select_linked) {
5623 linked_helper->select_all(
select);
5636 bool has_selected =
false;
5644 has_selected =
true;
5648 if (has_selected && use_select_linked) {
5649 linked_helper->face_add(efa);
5652 if (use_select_linked) {
5653 linked_helper->select_all(
select);
5661 if (changed || use_pre_deselect) {
5662 changed_multi =
true;
5673 return changed_multi;
5691 ot->
name =
"Lasso Select UV";
5692 ot->
description =
"Select UVs using lasso selection";
5693 ot->
idname =
"UV_OT_select_lasso";
5734 *bmain, scene, view_layer,
nullptr);
5736 for (
Object *obedit : objects) {
5737 Mesh &
mesh = *id_cast<Mesh *>(obedit->data);
5745 bool changed =
false;
5785 ot->
name =
"Selected Pinned";
5786 ot->
description =
"Select all pinned UV vertices";
5787 ot->
idname =
"UV_OT_select_pinned";
5809 const float t2[3][2],
5810 const float endpoint_bias)
5857 *bmain, scene, view_layer,
nullptr);
5859 struct ChangedInfo {
5860 uint has_changed : 1 = 0;
5861 uint has_overlap : 1 = 0;
5864 struct UVOverlapData {
5870 struct UVOverlapQueryData {
5872 const UVOverlapData *all_overlap_data;
5881 uint uv_tri_len = 0;
5883 Object *obedit = objects[i];
5892 objects_tag[i].has_changed =
true;
5901 uv_tri_len += efa->
len - 2;
5912 int face_len_alloc = 3;
5919 for (
const int ob_index : objects.
index_range()) {
5920 Object *obedit = objects[ob_index];
5936 const uint face_len = efa->
len;
5937 const uint tri_len = face_len - 2;
5939 if (face_len_alloc < face_len) {
5940 MEM_delete(uv_verts);
5941 MEM_delete(indices);
5944 face_len_alloc = face_len;
5955 const int coords_sign = 0;
5962 for (
int t = 0; t < tri_len; t++) {
5963 overlap_data[data_index].ob_index = ob_index;
5964 overlap_data[data_index].face_index = face_index;
5967 const float tri[3][3] = {
5968 {
UNPACK2(uv_verts[indices[t][0]]), 0.0f},
5969 {
UNPACK2(uv_verts[indices[t][1]]), 0.0f},
5970 {
UNPACK2(uv_verts[indices[t][2]]), 0.0f},
5973 copy_v2_v2(overlap_data[data_index].tri[0], tri[0]);
5974 copy_v2_v2(overlap_data[data_index].tri[1], tri[1]);
5975 copy_v2_v2(overlap_data[data_index].tri[2], tri[2]);
5989 MEM_delete(uv_verts);
5990 MEM_delete(indices);
6005 float dummy_co[3][3] = {{0.0f}};
6009 UVOverlapQueryData query_data = {};
6010 query_data.all_overlap_data = overlap_data;
6011 query_data.objects = &objects;
6012 query_data.objects_tag = &objects_tag;
6014 auto bvh_overlap_fn = [](
void *userdata,
int ,
int index_b,
int ) ->
bool {
6015 UVOverlapQueryData *
data =
static_cast<UVOverlapQueryData *
>(userdata);
6017 const int src_i =
data->src_index;
6018 const int dst_i = index_b;
6021 if (src_i == dst_i) {
6025 const UVOverlapData *src = &
data->all_overlap_data[src_i];
6026 const UVOverlapData *dst = &
data->all_overlap_data[dst_i];
6029 if (src->ob_index == dst->ob_index && src->face_index == dst->face_index) {
6034 const float endpoint_bias = -1e-4f;
6036 Object *ob_src = (*
data->objects)[src->ob_index];
6037 Object *ob_dst = (*
data->objects)[dst->ob_index];
6048 (*
data->objects_tag)[src->ob_index].has_overlap =
true;
6049 (*
data->objects_tag)[dst->ob_index].has_overlap =
true;
6051 data->found_overlap =
true;
6058 for (
int i = 0; i < uv_tri_len; i++) {
6059 UVOverlapData *src_data = &overlap_data[i];
6060 Object *ob = objects[src_data->ob_index];
6070 for (
int j = 0; j < 3; j++) {
6072 tri_3d[j][2] = 0.0f;
6077 query_data.src_index = i;
6078 query_data.found_overlap =
false;
6083 if (select_island) {
6085 if (!objects_tag[i].has_overlap) {
6089 Object *obedit = objects[i];
6105 Object *obedit = objects[i];
6106 const ChangedInfo &tag_info = objects_tag[i];
6107 const bool select =
true;
6109 if (tag_info.has_overlap) {
6112 if (uv_select_sync) {
6128 if (tag_info.has_changed || tag_info.has_overlap) {
6136 MEM_delete(overlap_data);
6153 ot->
name =
"Select Overlap";
6154 ot->
description =
"Select all UV faces which overlap each other";
6155 ot->
idname =
"UV_OT_select_overlap";
6167 "Extend selection rather than clearing the existing selection");
6187 *bmain, scene, view_layer,
nullptr);
6193 for (
Object *obedit : objects) {
6199 bool changed =
false;
6207 if (area * winding_sign > 0.0f) {
6235 {0,
nullptr, 0,
nullptr,
nullptr},
6239 ot->
name =
"Select by Winding";
6240 ot->
description =
"Select UV faces by their winding";
6241 ot->
idname =
"UV_OT_select_by_winding";
6254 "Select faces with positive or negative winding");
6259 "Extend selection rather than clearing the existing selection");
6270 const float ob_m3[3][3],
6315 const float ob_m3[3][3],
6375 const float ob_m3[3][3],
6403 return material_remap[mat_nr];
6416 const float ob_m3[3][3],
6424 for (
int i = 0; i < island->
faces_len; i++) {
6429 for (
int i = 0; i < island->
faces_len; i++) {
6455 *bmain, scene, view_layer,
nullptr);
6460 for (
Object *ob : objects) {
6468 copy_m3_m4(ob_m3, ob->object_to_world().ptr());
6483 points_1d.
add(needle, tree_index++);
6489 for (
const auto &[pos,
index] : points_1d.
items()) {
6494 for (
Object *ob : objects) {
6507 bool changed =
false;
6511 copy_m3_m4(ob_m3, ob->object_to_world().ptr());
6567 *bmain, scene, view_layer,
nullptr);
6572 for (
Object *ob : objects) {
6580 copy_m3_m4(ob_m3, ob->object_to_world().ptr());
6596 points_1d.
add(needle, tree_index++);
6602 for (
const auto &[pos,
index] : points_1d.
items()) {
6607 for (
Object *ob : objects) {
6620 bool changed =
false;
6623 copy_m3_m4(ob_m3, ob->object_to_world().ptr());
6680 *bmain, scene, view_layer,
nullptr);
6683 std::optional<Vector<Array<int>>> material_remaps_data;
6685 material_remaps_data.emplace(objects.
size());
6688 for (
const int ob_index : objects.
index_range()) {
6689 Object *ob = objects[ob_index];
6690 const int totcol = std::max<int>(ob->
totcol, 1);
6692 for (
int i = 0; i < totcol; i++) {
6694 material_remaps[ob_index][i] = material_map.
lookup_or_add(ma, material_map.
size());
6702 for (
const int ob_index : objects.
index_range()) {
6703 Object *ob = objects[ob_index];
6710 copy_m3_m4(ob_m3, ob->object_to_world().ptr());
6713 const Span<int> material_remap = material_remaps_data ?
6714 Span<int>((*material_remaps_data)[ob_index]) :
6727 float needle =
get_uv_face_needle(type, face, ob_index, ob_m3, offsets, material_remap);
6728 points_1d.
add(needle, tree_index++);
6733 for (
const auto &[pos,
index] : points_1d.
items()) {
6738 for (
const int ob_index : objects.
index_range()) {
6739 Object *ob = objects[ob_index];
6752 bool changed =
false;
6755 copy_m3_m4(ob_m3, ob->object_to_world().ptr());
6758 const Span<int> material_remap = material_remaps_data ?
6759 Span<int>((*material_remaps_data)[ob_index]) :
6772 float needle =
get_uv_face_needle(type, face, ob_index, ob_m3, offsets, material_remap);
6820 *bmain, scene, view_layer,
nullptr);
6823 objects.
size(), __func__);
6824 int island_list_len = 0;
6828 for (
const int ob_index : objects.
index_range()) {
6829 Object *obedit = objects[ob_index];
6832 float aspect_y = 1.0f;
6834 scene,
bm, &island_list_ptr[ob_index], face_selected,
false,
false, aspect_y, offsets);
6842 for (
const int ob_index : objects.
index_range()) {
6843 Object *obedit = objects[ob_index];
6847 copy_m3_m4(ob_m3, obedit->object_to_world().ptr());
6849 for (
const auto [
index, island] : island_list_ptr[ob_index].enumerate()) {
6850 island_array[
index] = &island;
6855 points_1d.
add(needle, tree_index++);
6860 for (
const auto &[pos,
index] : points_1d.
items()) {
6865 int tot_island_index = 0;
6866 for (
const int ob_index : objects.
index_range()) {
6867 Object *obedit = objects[ob_index];
6875 copy_m3_m4(ob_m3, obedit->object_to_world().ptr());
6877 bool changed =
false;
6879 for (
const auto [
index, island] : island_list_ptr[ob_index].enumerate()) {
6880 island_array[tot_island_index++] = &island;
6889 for (
int j = 0; j < island.faces_len; j++) {
6912 BLI_assert(tot_island_index == island_list_len);
6913 for (
int i = 0; i < island_list_len; i++) {
6914 MEM_SAFE_DELETE(island_array[i]->faces);
6915 MEM_SAFE_DELETE(island_array[i]);
6918 MEM_SAFE_DELETE(island_array);
6919 MEM_SAFE_DELETE(island_list_ptr);
6941 if (use_select_linked) {
6959 {
UV_SSIM_AREA_3D,
"AREA_3D", 0,
"Area 3D",
"Area of face in 3D space"},
6967 "Face direction defined by clockwise or anti-clockwise winding (facing up or facing down)"},
6968 {
UV_SSIM_FACE,
"FACE", 0,
"Amount of Faces in Island",
""},
6990 if (use_select_linked) {
7025 ot->
name =
"Select Similar";
7026 ot->
description =
"Select similar UVs by property types";
7027 ot->
idname =
"UV_OT_select_similar";
7043 RNA_def_float(ot->
srna,
"threshold", 0.0f, 0.0f, 1.0f,
"Threshold",
"", 0.0f, 1.0f);
7066 faces[faces_len++] = f;
7067 if (faces_len == len_max) {
7075 *r_faces_len = faces_len;
7076 if (faces_len != len_max) {
7112 edges[edges_len++] = l_iter;
7113 if (edges_len == len_max) {
7124 }
while ((l_radial_iter = l_radial_iter->
radial_next) != l_iter);
7133 *r_edges_len = edges_len;
7134 if (edges_len != len_max) {
7170 verts[verts_len++] = l_iter;
7171 if (verts_len == len_max) {
7190 *r_verts_len = verts_len;
7191 if (verts_len != len_max) {
7276 *bmain, scene, view_layer,
nullptr);
7277 for (
Object *obedit : objects) {
7300 *bmain, scene, view_layer,
nullptr);
7301 for (
Object *obedit : objects) {
7320 *bmain, scene, view_layer,
nullptr);
7321 for (
Object *obedit : objects) {
7372 ot->
name =
"UV Select Mode";
7374 ot->
idname =
"UV_OT_select_mode";
7399 *bmain, scene, view_layer,
nullptr);
7403 const rctf tile_rect = {
7411 for (
Object *ob : objects) {
7415 bool changed =
false;
7467 const int2 tile =
int2(
int(sima->cursor[0]),
int(sima->cursor[1]));
7477 ot->
name =
"Select Tile";
7479 ot->
idname =
"UV_OT_select_tile";
7491 std::numeric_limits<int>::min(),
7492 std::numeric_limits<int>::max(),
7494 "Tile location to select UVs",
7495 std::numeric_limits<int>::min(),
7496 std::numeric_limits<int>::max());
7518 ot->
name =
"Set User Region";
7519 ot->
description =
"Set the boundaries of the user region";
7520 ot->
idname =
"UV_OT_custom_region_set";
CustomData interface, see also DNA_customdata_types.h.
General operations, lookup, etc. for materials.
#define ENUM_OPERATORS(_enum_type)
A min-heap / priority queue ADT.
A KD-tree for nearest neighbor search.
#define BLI_MEMARENA_STD_BUFSIZE
#define BLI_POLYFILL_ALLOC_NGON_RESERVE
#define BLT_I18NCONTEXT_ID_MESH
Object is a sort of wrapper for general info.
#define SEL_OP_USE_PRE_DESELECT(sel_op)
Read Blender memory allocation and freeing.
#define UNUSED_FUNCTION(x)
#define BLI_assert_unreachable()
#define UNUSED_VARS_NDEBUG(...)
#define BM_ELEM_CD_GET_BOOL(ele, offset)
#define BM_DISK_EDGE_NEXT(e, v)
#define BM_ELEM_SELECT_UV_EDGE
#define BM_FACE_FIRST_LOOP(p)
#define BM_ELEM_CD_GET_FLOAT_P(ele, offset)
#define BM_elem_index_get(ele)
#define BM_elem_flag_disable(ele, hflag)
#define BM_elem_flag_set(ele, hflag, val)
#define BM_elem_flag_test(ele, hflag)
#define BM_elem_flag_test_bool(ele, hflag)
#define BM_elem_flag_enable(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)
#define BM_ITER_ELEM_INDEX(ele, iter, data, itype, indexvar)
#define BM_select_history_store_notest(bm, ele)
#define BM_select_history_store(bm, ele)
#define BM_select_history_remove(bm, ele)
#define MEM_realloc_uninitialized(vmemh, len)
constexpr IndexRange()=default
bool add(const Key &key, const Value &value)
ItemIterator items() const &
Value & lookup_or_add(const Key &key, const Value &value)
constexpr int64_t size() const
constexpr IndexRange index_range() const
IndexRange index_range() const
void reinitialize(const int64_t new_size)
NonCopyable(const NonCopyable &other)=delete
NonMovable(NonMovable &&other)=delete
void vert_select_set(BMVert *v, bool value)
void face_select_disable(BMFace *f)
void vert_select_enable(BMVert *v)
void vert_select_disable(BMVert *v)
void face_select_set(BMFace *f, bool value)
void edge_select_enable(BMEdge *f)
void face_select_enable(BMFace *f)
void edge_select_set(BMEdge *f, bool value)
void edge_select_disable(BMEdge *f)
static std::unique_ptr< UVSyncSelectFromMesh > create_if_needed(const ToolSettings &ts, BMesh &bm)
float3x3 scale(float3x3 mat, float2 scale)
const ccl_global KernelWorkTile * tile
void view2d_view_to_region_fl(const View2D *v2d, float x, float y, float *r_region_x, float *r_region_y) ATTR_NONNULL()
bool view2d_view_to_region_segment_clip(const View2D *v2d, const float xy_a[2], const float xy_b[2], int r_region_a[2], int r_region_b[2]) ATTR_NONNULL()
float view2d_scale_get_y(const View2D *v2d)
void view2d_region_to_view(const View2D *v2d, float x, float y, float *r_view_x, float *r_view_y) ATTR_NONNULL()
bool view2d_view_to_region_clip(const View2D *v2d, float x, float y, int *r_region_x, int *r_region_y) ATTR_NONNULL()
float view2d_scale_get_x(const View2D *v2d)
void view2d_region_to_view_rctf(const View2D *v2d, const rctf *rect_src, rctf *rect_dst) ATTR_NONNULL()
void view2d_scale_get(const View2D *v2d, float *r_x, float *r_y)
void WM_main_add_notifier(uint type, void *reference)
void EDBM_flag_disable_all(BMesh *bm, char hflag)
bool BM_loop_edge_uvselect_test(const BMLoop *l)
static bool uvedit_select_pin_ok_or_report(const Scene *scene, ReportList *reports)
int CustomData_get_offset(const CustomData *data, eCustomDataType type)
bool uv_find_nearest_vert(Scene *scene, Object *obedit, const float co[2], float penalty_dist, UvNearestHit *hit)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
static bool uv_mouse_select(bContext *C, const float co[2], const SelectPick_Params ¶ms)
static wmOperatorStatus uv_select_mode_invoke(bContext *C, wmOperator *op, const wmEvent *)
static wmOperatorStatus uv_select_split_exec(bContext *C, wmOperator *op)
void RNA_float_set_array(PointerRNA *ptr, const char *name, const float *values)
void RNA_def_enum_funcs(PropertyRNA *prop, EnumPropertyItemFunc itemfunc)
std::string ED_select_circle_get_name(wmOperatorType *ot, PointerRNA *ptr)
BVHTreeOverlap * BLI_bvhtree_overlap_ex(const BVHTree *tree1, const BVHTree *tree2, uint *r_overlap_num, BVHTree_OverlapCallback callback, void *userdata, uint max_interactions, int flag)
void kdtree_balance(KDTree< CoordT > *tree)
void ED_uvedit_sync_uvselect_ensure_if_needed(const ToolSettings *ts, BMesh *bm)
bool BM_uv_map_attr_pin_exists(const BMesh *bm, const StringRef uv_map_name)
void BM_loop_edge_uvselect_set_shared(BMesh *bm, BMLoop *l, bool select, const int cd_loop_uv_offset)
static wmOperatorStatus uv_select_by_winding_exec(bContext *C, wmOperator *op)
wmOperatorStatus WM_menu_invoke(bContext *C, wmOperator *op, const wmEvent *)
bool uvedit_face_select_test_ex(const ToolSettings *ts, const BMesh *bm, const BMFace *efa)
static bool uv_island_selected(const Scene *scene, const BMesh *bm, FaceIsland *island)
void mid_v2_v2v2v2(float v[2], const float v1[2], const float v2[2], const float v3[2])
void BM_mesh_elem_index_ensure(BMesh *bm, const char htype)
void ED_uvedit_sticky_selectmode_update(bContext *C)
bool ED_operator_uvedit(bContext *C)
@ UV_EDGE_LOOP_BOUNDARY_LOOP
@ UV_EDGE_LOOP_BOUNDARY_ALL
static void uv_select_edgeloop_double_side_tag(const Scene *scene, BMesh *bm, BMLoop *l_init_pair[2], const BMUVOffsets &offsets)
static wmOperatorStatus uv_select_edge_ring_exec(bContext *C, wmOperator *op)
Heap * BLI_heap_new_ex(unsigned int reserve_num) ATTR_WARN_UNUSED_RESULT
void WM_operator_properties_gesture_circle(wmOperatorType *ot)
static wmOperatorStatus uv_mouse_select_loop_generic_multi(bContext *C, const Span< Object * > objects, const float co[2], const bool extend, enum eUVLoopGenericType loop_type)
void UV_OT_custom_region_set(wmOperatorType *ot)
int RNA_enum_get(PointerRNA *ptr, const char *name)
BMLoop * ED_uvedit_active_edge_loop_get(const ToolSettings *ts, BMesh *bm)
bool uv_find_nearest_face_multi_ex(Scene *scene, Span< Object * > objects, const float co[2], UvNearestHit *hit, bool only_in_face)
bool BM_edge_in_face(const BMEdge *e, const BMFace *f)
bool uvedit_edge_select_test(const Scene *scene, const BMesh *bm, const BMLoop *l, const BMUVOffsets &offsets)
static wmOperatorStatus uv_lasso_select_exec(bContext *C, wmOperator *op)
bool BM_mesh_uvselect_clear(BMesh *bm)
int bm_mesh_calc_uv_islands(const Scene *scene, BMesh *bm, ListBaseT< FaceIsland > *island_list, const bool only_selected_faces, const bool only_selected_uvs, const bool use_seams, const float aspect_y, const BMUVOffsets &offsets)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
void EDBM_selectmode_flush(BMesh *bm, short selectmode)
void EDBM_select_more(BMesh *bm, short selectmode, bool use_face_step)
static wmOperatorStatus uv_select_linked_exec(bContext *C, wmOperator *op)
MemArena * BLI_memarena_new(size_t bufsize, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL ATTR_NONNULL(2) ATTR_MALLOC
bool uvedit_vert_select_get_no_sync(const ToolSettings *ts, const BMesh *bm, const BMLoop *l)
static bool UNUSED_FUNCTION bm_loop_select_vert_check_internal(const Scene *scene, BMesh *bm, BMLoop *l)
bool BLI_rctf_isect_pt_v(const struct rctf *rect, const float xy[2])
bool uv_find_nearest_face_multi(Scene *scene, Span< Object * > objects, const float co[2], UvNearestHit *hit)
BMesh * BKE_editmesh_bmesh_get_for_write(Mesh *mesh)
static wmOperatorStatus uv_select_tile_invoke(bContext *C, wmOperator *op, const wmEvent *)
void BM_loop_edge_uvselect_set_noflush(BMesh *bm, BMLoop *l, bool select)
void UV_OT_select_linked(wmOperatorType *ot)
wmOperatorStatus WM_gesture_box_invoke(bContext *C, wmOperator *op, const wmEvent *event)
wmOperatorStatus WM_operator_flag_only_pass_through_on_press(wmOperatorStatus retval, const wmEvent *event)
void * MEM_new_array_uninitialized(size_t len, size_t size, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1
static bool uv_select_linked_delimit_check(const BMFace *f_src, const BMLoop *l_vert_step, const BMFace *f_dst, const UVDelimitMode delimit_mode)
eSelectOp ED_select_op_modal(eSelectOp sel_op, bool is_first)
void copy_m3_m4(float m1[3][3], const float m2[4][4])
static BMLoop * uvedit_loop_find_other_radial_loop_with_visible_face(const Scene *scene, BMLoop *l_src, const BMUVOffsets &offsets)
ATTR_WARN_UNUSED_RESULT const BMLoop * l
static wmOperatorStatus uv_select_tile_exec(bContext *C, wmOperator *op)
void uv_nearest_hit_elem_set_from_face(const float co[2], UvNearestHit *hit, short uv_selectmode)
void ED_uvedit_selectmode_clean_multi(bContext *C)
static BMLoop * bm_select_edgeloop_single_side_next(const Scene *scene, BMLoop *l_step, BMVert *v_from, const BMUVOffsets &offsets)
void BM_mesh_elem_table_ensure(BMesh *bm, const char htype)
bool uvedit_face_visible_test(const Scene *scene, const BMFace *efa)
bool CustomData_has_layer(const CustomData *data, eCustomDataType type)
void RNA_property_float_set(PointerRNA *ptr, PropertyRNA *prop, float value)
void ED_uvedit_select_sync_multi(bContext *C)
MINLINE void copy_v2_v2(float r[2], const float a[2])
void ED_uvedit_active_edge_loop_set(BMesh *bm, BMLoop *l)
Material * BKE_object_material_get(Object *ob, short act)
void uvedit_select_prepare_custom_data(const Scene *scene, BMesh *bm)
float BM_face_calc_area_uv(const BMFace *f, int cd_loop_uv_offset)
void BLI_bvhtree_free(BVHTree *tree)
void WM_gesture_lasso_cancel(bContext *C, wmOperator *op)
BMLoop ** ED_uvedit_selected_edges(const Scene *scene, BMesh *bm, int len_max, int *r_edges_len)
void ED_uvedit_active_vert_loop_set(BMesh *bm, BMLoop *l)
void uvedit_face_select_disable(const Scene *scene, BMesh *bm, BMFace *efa)
void uvedit_vert_select_set_no_sync(const ToolSettings *ts, const BMesh *bm, BMLoop *l, bool select)
bool uvedit_select_is_any_selected_multi(const Scene *scene, Span< Object * > objects)
void ED_uvedit_selectmode_flush(const Scene *scene, BMesh *bm)
UV Select Mode Flush.
void uvedit_uv_select_set_with_sticky(const Scene *scene, BMesh *bm, BMLoop *l, bool select, const BMUVOffsets &offsets)
static const EnumPropertyItem * uv_select_similar_type_itemf(bContext *C, PointerRNA *, PropertyRNA *, bool *r_free)
void uvedit_loop_vert_select_set(const ToolSettings *ts, const BMesh *bm, BMLoop *l, const bool select)
void ED_space_image_get_size(SpaceImage *sima, int *r_width, int *r_height)
static float get_uv_face_needle(const eUVSelectSimilar type, BMFace *face, const int ob_index, const float ob_m3[3][3], const BMUVOffsets &offsets, const Span< int > material_remap)
static const EnumPropertyItem prop_similar_compare_types[]
int isect_seg_seg_v2_point_ex(const float v0[2], const float v1[2], const float v2[2], const float v3[2], float endpoint_bias, float r_vi[2])
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
void BLI_bvhtree_balance(BVHTree *tree)
bool uvedit_edge_is_face_select_any_other(const ToolSettings *ts, const BMesh *bm, const BMLoop *l, const BMUVOffsets &offsets)
void UV_OT_select_similar(wmOperatorType *ot)
BMLoop * BM_face_edge_share_loop(BMFace *f, BMEdge *e)
Return the Loop Shared by Face and Edge.
void UV_OT_select_linked_pick(wmOperatorType *ot)
static wmOperatorStatus uv_circle_select_exec(bContext *C, wmOperator *op)
void BLI_heap_free(Heap *heap, HeapFreeFP ptrfreefp) ATTR_NONNULL(1)
bool uvedit_face_visible_test_ex(const ToolSettings *ts, const BMFace *efa)
bool BM_loop_edge_uvselect_check_other_face(BMLoop *l, const char hflag, const int cd_loop_uv_offset)
int RNA_int_get(PointerRNA *ptr, const char *name)
const float * uvedit_first_selected_uv_from_vertex(Scene *scene, const BMesh *bm, BMVert *eve, const BMUVOffsets &offsets)
MINLINE void sub_v2_v2v2(float r[2], const float a[2], const float b[2])
bool BM_face_uv_point_inside_test(const BMFace *f, const float co[2], const int cd_loop_uv_offset)
void BM_mesh_elem_hflag_disable_all(BMesh *bm, const char htype, const char hflag, const bool respecthide)
static bool uv_circle_select_is_edge_inside(const float uv_a[2], const float uv_b[2], const float offset[2], const float ellipse[2])
static wmOperatorStatus uv_mouse_select_loop_generic(bContext *C, const float co[2], const bool extend, enum eUVLoopGenericType loop_type)
static wmOperatorStatus uv_select_more_less(bContext *C, const bool select)
void BLI_polyfill_calc_arena(const float(*coords)[2], unsigned int coords_num, int coords_sign, unsigned int(*r_tris)[3], struct MemArena *arena)
ATTR_WARN_UNUSED_RESULT const BMVert * v
bool uv_find_nearest_edge_multi(Scene *scene, Span< Object * > objects, const float co[2], float penalty, UvNearestHit *hit)
wmOperatorStatus WM_gesture_lasso_modal(bContext *C, wmOperator *op, const wmEvent *event)
static void uv_select_tag_update_for_object(Depsgraph *depsgraph, const ToolSettings *ts, Object *obedit)
BMLoop * ED_uvedit_active_vert_loop_get(const ToolSettings *ts, BMesh *bm)
int isect_point_tri_v2(const float pt[2], const float v1[2], const float v2[2], const float v3[2])
static wmOperatorStatus uv_select_similar_exec(bContext *C, wmOperator *op)
static float get_uv_vert_needle(const eUVSelectSimilar type, BMVert *vert, const float ob_m3[3][3], BMLoop *loop, const BMUVOffsets &offsets)
bool BLI_lasso_is_point_inside(Span< int2 > mcoords, int sx, int sy, int error_value)
BMLoop * uv_find_nearest_loop_from_vert(Scene *scene, Object *obedit, BMVert *v, const float co[2])
void WM_gesture_circle_cancel(bContext *C, wmOperator *op)
void UV_OT_select_by_winding(wmOperatorType *ot)
void BM_mesh_uvselect_flush_from_faces_only_deselect(BMesh *bm)
void uvedit_face_select_set_with_sticky(const Scene *scene, BMesh *bm, BMFace *efa, bool select, const BMUVOffsets &offsets)
void BM_mesh_select_mode_flush(BMesh *bm)
bool BLI_bvhtree_update_node(BVHTree *tree, int index, const float co[3], const float co_moving[3], int numpoints)
bool ED_uvedit_sync_uvselect_is_valid_or_ignore(const ToolSettings *ts, const BMesh *bm)
static bool uv_mouse_select_multi(bContext *C, const Span< Object * > objects, const float co[2], const SelectPick_Params ¶ms)
static wmOperatorStatus uv_select_mode_exec(bContext *C, wmOperator *op)
BLI_INLINE bool BM_vert_in_edge(const BMEdge *e, const BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
BLI_INLINE BMVert * BM_edge_other_vert(BMEdge *e, const BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void uvedit_select_prepare(const Scene *scene, BMesh *bm)
void BM_mesh_uvselect_flush_from_loop_verts_only_deselect(BMesh *bm)
ViewLayer * CTX_data_view_layer(const bContext *C)
static void uv_select_edgeloop_single_side_tag(const Scene *scene, BMesh *bm, BMLoop *l_init, const BMUVOffsets &offsets, enum eUVEdgeLoopBoundaryMode boundary_mode, int r_count_by_select[2])
void WM_operator_properties_select_all(wmOperatorType *ot)
bool BM_loop_uv_share_vert_check(const BMLoop *l_a, const BMLoop *l_b, const int cd_loop_uv_offset)
static wmOperatorStatus uv_select_linked_internal(bContext *C, wmOperator *op, const wmEvent *event, bool pick)
void uvedit_edge_select_disable(const Scene *scene, BMesh *bm, BMLoop *l)
MINLINE void mul_v2_v2(float r[2], const float a[2])
static void uv_select_toggle_all(const Scene *scene, BMesh *bm)
static void uvedit_sync_uvselect_flush_from_v3d(const ToolSettings *ts, BMesh *bm)
PropertyRNA * RNA_def_float_vector(StructOrFunctionRNA *cont_, const char *identifier, const int len, const float *default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
float dist_squared_to_line_segment_v2(const float p[2], const float l1[2], const float l2[2])
void uvedit_edge_select_set(const Scene *scene, BMesh *bm, BMLoop *l, bool select)
Select UV Edge.
bool uvedit_uv_select_test(const Scene *scene, const BMesh *bm, const BMLoop *l, const BMUVOffsets &offsets)
void RNA_property_int_set_array(PointerRNA *ptr, PropertyRNA *prop, const int *values)
bool uv_find_nearest_vert_multi(Scene *scene, Span< Object * > objects, const float co[2], float penalty_dist, UvNearestHit *hit)
KDTree< CoordT > * kdtree_new(uint nodes_len_capacity)
static bool uvedit_nearest_uv(const Scene *scene, Object *obedit, const float co[2], const float scale[2], const bool ignore_selected, float *dist_sq, float r_uv[2])
void WM_operator_properties_border_to_rctf(wmOperator *op, rctf *r_rect)
static void uv_select_flush_from_tag_loop(const Scene *scene, Object *obedit, const bool select)
BMFace ** ED_uvedit_selected_faces(const Scene *scene, BMesh *bm, int len_max, int *r_faces_len)
void BLI_bvhtree_update_tree(BVHTree *tree)
void uvedit_face_select_shared_vert(const Scene *scene, BMesh *bm, BMFace *efa, const bool select, const BMUVOffsets &offsets)
static wmOperatorStatus uv_select_loop_exec(bContext *C, wmOperator *op)
static void uvedit_vertex_select_tagged(BMesh *bm, const Scene *scene, bool select)
bool uv_find_nearest_edge(Scene *scene, Object *obedit, const float co[2], float penalty, UvNearestHit *hit)
void UV_OT_select_circle(wmOperatorType *ot)
UvNearestHit uv_nearest_hit_init_dist_px(const View2D *v2d, float dist_px)
void uvedit_edge_select_set_no_sync(const ToolSettings *ts, const BMesh *bm, BMLoop *l, bool select)
bool BM_loop_vert_uvselect_check_other_face(BMLoop *l, const char hflag, const int cd_loop_uv_offset)
void uvedit_uv_select_enable(const Scene *scene, BMesh *bm, BMLoop *l)
void BM_mesh_uvselect_mode_flush_update(BMesh *bm, const short selectmode_old, const short selectmode_new, const int cd_loop_uv_offset)
VecBase< int32_t, 2 > int2
VecBase< float, 2 > float2
void uvedit_uv_select_disable(const Scene *scene, BMesh *bm, BMLoop *l)
bool ED_select_similar_compare_float_tree(const KDTree< float > *tree, float length, float thresh, eSimilarCmp compare)
static wmOperatorStatus uv_select_edge_ring_invoke(bContext *C, wmOperator *op, const wmEvent *event)
bool uvedit_select_is_any_selected(const Scene *scene, BMesh *bm)
void ED_uvedit_select_sync_flush(const ToolSettings *ts, BMesh *bm, bool select)
void uvedit_uv_select_shared_vert(const Scene *scene, BMesh *bm, BMLoop *l, const bool select, const int sticky_flag, const BMUVOffsets &offsets)
void ED_uvedit_selectmode_clean(const Scene *scene, Object *obedit)
UV Select Mode set.
void UV_OT_select_mode(wmOperatorType *ot)
char ED_uvedit_select_mode_get(const Scene *scene)
void UV_OT_select_loop(wmOperatorType *ot)
void BM_uv_vert_map_free(UvVertMap *vmap)
void UV_OT_select(wmOperatorType *ot)
void BM_mesh_uvselect_sync_from_mesh_sticky_disabled(BMesh *bm)
void DEG_id_tag_update(ID *id, unsigned int flags)
void BM_mesh_active_face_set(BMesh *bm, BMFace *f)
void BKE_report(ReportList *reports, eReportType type, const char *message)
MINLINE int signum_i(float a)
BMLoop * uv_find_nearest_loop_from_edge(Scene *scene, Object *obedit, BMEdge *e, const float co[2])
BMesh const char void * data
static wmOperatorStatus uv_select_less_exec(bContext *C, wmOperator *)
void RNA_int_get_array(PointerRNA *ptr, const char *name, int *values)
void BM_loop_vert_uvselect_set_noflush(BMesh *bm, BMLoop *l, bool select)
void BKE_mesh_batch_cache_dirty_tag(Mesh *mesh, eMeshBatchDirtyMode mode)
T * DEG_get_evaluated(const Depsgraph *depsgraph, T *id)
bool uv_find_nearest_face_ex(Scene *scene, Object *obedit, const float co[2], UvNearestHit *hit, bool only_in_face)
static BMLoop * bm_select_edgeloop_double_side_next(const Scene *scene, BMLoop *l_step, BMVert *v_from, const BMUVOffsets &offsets)
static bool uv_nearest_between(const BMLoop *l, const float co[2], const int cd_loop_uv_offset)
Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C, bool rna_write_check=false)
void BLI_memarena_clear(MemArena *ma) ATTR_NONNULL(1)
void BM_mesh_uvselect_sync_from_mesh_sticky_location(BMesh *bm, const int cd_loop_uv_offset)
static wmOperatorStatus uv_select_similar_vert_exec(bContext *C, wmOperator *op)
void kdtree_insert(KDTree< CoordT > *tree, int index, const CoordT &co)
bool uvedit_vert_is_face_select_any_other(const ToolSettings *ts, const BMesh *bm, const BMLoop *l, const BMUVOffsets &offsets)
void BM_face_select_set(BMesh *bm, BMFace *f, const bool select)
Select Face.
void UV_OT_select_box(wmOperatorType *ot)
void BM_face_uv_calc_center_median(const BMFace *f, const int cd_loop_uv_offset, float r_cent[2])
bool uvedit_face_select_test(const Scene *scene, const BMesh *bm, const BMFace *efa)
BVHTree * BLI_bvhtree_new(int maxsize, float epsilon, char tree_type, char axis)
wmOperatorStatus WM_gesture_circle_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static float get_uv_island_needle(const eUVSelectSimilar type, const FaceIsland *island, const float ob_m3[3][3], const BMUVOffsets &offsets)
bool uvedit_vert_is_all_other_faces_selected(const ToolSettings *ts, const BMesh *bm, const BMLoop *l, const BMUVOffsets &offsets)
static bool uv_circle_select_is_point_inside(const float uv[2], const float offset[2], const float ellipse[2])
void WM_operator_properties_mouse_select(wmOperatorType *ot)
UvNearestHit uv_nearest_hit_init_max(const View2D *v2d)
constexpr size_t ARRAY_SIZE(const T(&arg)[N]) noexcept
void ED_uvedit_deselect_all(const Scene *scene, Object *obedit, int action)
bool ED_uvedit_select_island_check(const ToolSettings *ts)
static BMLoop * uvedit_loop_find_other_boundary_loop_with_visible_face(const Scene *scene, BMLoop *l_edge, BMVert *v_pivot, const BMUVOffsets &offsets)
static bool do_lasso_select_mesh_uv_is_point_inside(const ARegion *region, const rcti *clip_rect, const Span< int2 > mcoords, const float co_test[2])
bool uvedit_vert_is_edge_select_any_other(const ToolSettings *ts, const BMesh *bm, const BMLoop *l, const BMUVOffsets &offsets)
bool uv_find_nearest_face(Scene *scene, Object *obedit, const float co[2], UvNearestHit *hit)
void uvedit_face_select_set_no_sync(const ToolSettings *ts, const BMesh *bm, BMFace *f, bool select)
void uvedit_face_select_set(const Scene *scene, BMesh *bm, BMFace *efa, bool select)
Select UV Face.
static int uv_select_faceloop(Scene *scene, Object *obedit, UvNearestHit *hit, const bool extend)
static wmOperatorStatus uv_select_all_exec(bContext *C, wmOperator *op)
void WM_operator_properties_gesture_box(wmOperatorType *ot)
static wmOperatorStatus uv_select_linked_pick_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void RNA_enum_items_add_value(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item, int value)
void BM_mesh_uvselect_flush_from_faces_only_select(BMesh *bm)
static wmOperatorStatus uv_select_overlap_exec(bContext *C, wmOperator *op)
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
ToolSettings * CTX_data_tool_settings(const bContext *C)
void BM_mesh_uvselect_flush_from_loop_edges(BMesh *bm, bool flush_down)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
static bool do_lasso_select_mesh_uv_is_edge_inside(const ARegion *region, const rcti *clip_rect, const Span< int2 > mcoords, const float co_test_a[2], const float co_test_b[2])
bool uvedit_loop_vert_select_get(const ToolSettings *ts, const BMesh *bm, const BMLoop *l)
void UV_OT_select_overlap(wmOperatorType *ot)
bool ED_uvedit_sync_uvselect_ignore(const ToolSettings *ts)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
bool ED_operator_uvedit_space_image(bContext *C)
void uvedit_loop_edge_select_set(const ToolSettings *ts, const BMesh *bm, BMLoop *l, const bool select)
void BM_vert_select_set(BMesh *bm, BMVert *v, const bool select)
Select Vert.
static EnumPropertyItem uv_select_similar_type_items[]
bool uvedit_edge_select_get_no_sync(const ToolSettings *ts, const BMesh *bm, const BMLoop *l)
float BM_face_calc_area_uv_signed(const BMFace *f, int cd_loop_uv_offset)
void BM_mesh_uvselect_flush_from_loop_verts_only_select(BMesh *bm)
void UV_OT_select_edge_ring(wmOperatorType *ot)
void uvedit_edge_select_set_with_sticky(const Scene *scene, BMesh *bm, BMLoop *l, bool select, const BMUVOffsets &offsets)
static wmOperatorStatus uv_select_similar_island_exec(bContext *C, wmOperator *op)
void EDBM_flag_enable_all(BMesh *bm, char hflag)
void BM_face_uvselect_set_noflush(BMesh *bm, BMFace *f, bool select)
void BM_select_history_validate(BMesh *bm)
void UV_OT_select_pinned(wmOperatorType *ot)
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
void UV_OT_select_tile(wmOperatorType *ot)
BMEditMesh * BKE_editmesh_from_object(Object *ob)
Return the BMEditMesh for a given object.
static int uv_select_edgeloop(Scene *scene, Object *obedit, UvNearestHit *hit, const bool extend)
static wmOperatorStatus uv_select_similar_edge_exec(bContext *C, wmOperator *op)
float RNA_property_float_get(PointerRNA *ptr, PropertyRNA *prop)
void BM_loop_vert_uvselect_set_shared(BMesh *bm, BMLoop *l, bool select, const int cd_loop_uv_offset)
SpaceImage * CTX_wm_space_image(const bContext *C)
void UV_OT_select_more(wmOperatorType *ot)
MINLINE float len_squared_v2(const float v[2]) ATTR_WARN_UNUSED_RESULT
void kdtree_free(KDTree< CoordT > *tree)
wmOperatorStatus WM_gesture_box_modal(bContext *C, wmOperator *op, const wmEvent *event)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
static bool overlap_tri_tri_uv_test(const float t1[3][2], const float t2[3][2], const float endpoint_bias)
static void uv_select_all_perform_multi(const Scene *scene, Span< Object * > objects, int action)
void uvedit_edge_select_shared_vert(const Scene *scene, BMesh *bm, BMLoop *l, const bool select, const int sticky_flag, const BMUVOffsets &offsets)
bool BLI_rcti_isect_segment(const struct rcti *rect, const int s1[2], const int s2[2])
void EDBM_select_swap(BMEditMesh *em, BMesh *bm)
void UV_OT_select_all(wmOperatorType *ot)
void uvedit_edge_select_set_noflush(const Scene *scene, BMesh *bm, BMLoop *l, const bool select, const int sticky_flag, const BMUVOffsets &offsets)
Main * CTX_data_main(const bContext *C)
static void uv_select_invert(const Scene *scene, BMEditMesh *em, BMesh *bm)
void uvedit_uv_select_set(const Scene *scene, BMesh *bm, BMLoop *l, bool select)
Select UV Vertex.
wmOperatorStatus WM_gesture_lasso_invoke(bContext *C, wmOperator *op, const wmEvent *event)
UvNearestHit uv_nearest_hit_init_max_default()
static void bm_loop_tags_clear(BMesh *bm)
static void uv_select_flush_from_loop_edge_flag(const Scene *scene, BMesh *bm)
static void uv_select_linked_multi(const Scene *scene, const Span< Object * > objects, UvNearestHit *hit, const bool extend, bool deselect, const bool toggle, const bool select_faces, const UVDelimitMode delimit_mode, const char hflag)
static void uv_select_all(const Scene *scene, BMesh *bm, bool select_all)
void BM_mesh_uvselect_mode_flush(BMesh *bm)
static bool do_lasso_select_mesh_uv(bContext *C, const Span< int2 > mcoords, const eSelectOp sel_op)
void uvedit_edge_select_enable(const Scene *scene, BMesh *bm, BMLoop *l)
static wmOperatorStatus uv_select_overlap(bContext *C, const bool extend, const bool select_island)
MINLINE float len_v2v2(const float v1[2], const float v2[2]) ATTR_WARN_UNUSED_RESULT
UvMapVert * BM_uv_vert_map_at_index(UvVertMap *vmap, unsigned int v)
Array< int2 > WM_gesture_lasso_path_to_array(bContext *, wmOperator *op)
void WM_gesture_box_cancel(bContext *C, wmOperator *op)
void BLI_bvhtree_insert(BVHTree *tree, int index, const float co[3], int numpoints)
void uvedit_face_select_enable(const Scene *scene, BMesh *bm, BMFace *efa)
MINLINE float square_f(float a)
const EnumPropertyItem rna_enum_mesh_select_mode_uv_items[]
PropertyRNA * RNA_def_int_array(StructOrFunctionRNA *cont_, const char *identifier, const int len, const int *default_value, const int hardmin, const int hardmax, const char *ui_name, const char *ui_description, const int softmin, const int softmax)
int CustomData_get_active_layer(const CustomData *data, eCustomDataType type)
PropertyRNA * RNA_def_enum_flag(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
MINLINE float line_point_side_v2(const float l1[2], const float l2[2], const float pt[2]) ATTR_WARN_UNUSED_RESULT
static wmOperatorStatus uv_select_exec(bContext *C, wmOperator *op)
void ED_space_image_get_zoom(SpaceImage *sima, const ARegion *region, float *r_zoomx, float *r_zoomy)
void BM_mesh_uvselect_sync_from_mesh_sticky_vert(BMesh *bm)
void BM_select_history_clear(BMesh *bm)
void WM_operator_properties_select_operation_simple(wmOperatorType *ot)
bool BM_loop_uv_share_edge_check(const BMLoop *l_a, const BMLoop *l_b, const int cd_loop_uv_offset)
bool EDBM_uvselect_clear(BMesh *bm)
static float get_uv_edge_needle(const eUVSelectSimilar type, BMEdge *edge, const float ob_m3[3][3], BMLoop *loop_a, BMLoop *loop_b, const BMUVOffsets &offsets)
BMLoop * BM_face_vert_share_loop(BMFace *f, BMVert *v)
Return the Loop Shared by Face and Vertex.
Scene * CTX_data_scene(const bContext *C)
bool BLI_rcti_isect_pt_v(const struct rcti *rect, const int xy[2])
static wmOperatorStatus uv_select_more_exec(bContext *C, wmOperator *)
MINLINE void sub_v2_v2(float r[2], const float a[2])
MINLINE void mul_v2_v2v2(float r[2], const float a[2], const float b[2])
bool uvedit_edge_select_test_ex(const ToolSettings *ts, const BMesh *bm, const BMLoop *l, const BMUVOffsets &offsets)
@ OPTYPE_DEPENDS_ON_CURSOR
UvVertMap * BM_uv_vert_map_create(BMesh *bm, bool use_select, bool respect_hide)
static wmOperatorStatus uv_box_select_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void BM_mesh_select_flush_from_verts(BMesh *bm, const bool select)
BLI_INLINE BMFace * BM_face_at_index(BMesh *bm, const int index)
static void uv_select_sync_update(const Scene *scene, Object *obedit)
BMUVOffsets BM_uv_map_offsets_get(const BMesh *bm)
static wmOperatorStatus uv_select_loop_invoke(bContext *C, wmOperator *op, const wmEvent *event)
bool uvedit_uv_select_test_ex(const ToolSettings *ts, const BMesh *bm, const BMLoop *l, const BMUVOffsets &offsets)
Vector< Object * > BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(const Main &bmain, const Scene *scene, ViewLayer *view_layer, const View3D *v3d)
bool WM_gesture_is_modal_first(const wmGesture *gesture)
BMLoop ** ED_uvedit_selected_verts(const Scene *scene, BMesh *bm, int len_max, int *r_verts_len)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
SelectPick_Params ED_select_pick_params_from_operator(PointerRNA *ptr) ATTR_NONNULL(1)
MINLINE float len_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
void uvedit_select_prepare_sync_select(const Scene *scene, BMesh *bm)
static bool bm_loop_select_edge_check_internal(const Scene *scene, BMesh *bm, BMLoop *l)
static const EnumPropertyItem uv_delimit_mode_items[]
MINLINE float len_squared_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
@ BKE_MESH_BATCH_DIRTY_UVEDIT_SELECT
bool BLI_lasso_is_edge_inside(Span< int2 > mcoords, int x0, int y0, int x1, int y1, int error_value)
wmOperatorStatus WM_gesture_circle_modal(bContext *C, wmOperator *op, const wmEvent *event)
void uvedit_select_flush_from_verts(const Scene *scene, BMesh *bm, bool select)
void BM_mesh_uvselect_set_elem_from_mesh(BMesh *bm, const bool select, const BMUVSelectPickParams ¶ms, const VectorList< BMVert * > &verts, const VectorList< BMEdge * > &edges, const VectorList< BMFace * > &faces)
float closest_to_line_segment_v2(float r_close[2], const float p[2], const float l1[2], const float l2[2])
void UV_OT_select_lasso(wmOperatorType *ot)
void BM_face_uvselect_set(BMesh *bm, BMFace *f, bool select)
static void bm_clear_uv_vert_selection(const Scene *scene, BMesh *bm)
static void uv_select_flush_from_tag_face(const Scene *scene, Object *obedit, const bool select)
PropertyRNA * RNA_def_float(StructOrFunctionRNA *cont_, const char *identifier, const float default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
static wmOperatorStatus uv_select_invoke(bContext *C, wmOperator *op, const wmEvent *event)
std::string ED_select_pick_get_name(wmOperatorType *ot, PointerRNA *ptr)
ARegion * CTX_wm_region(const bContext *C)
bool uvedit_loop_edge_select_get(const ToolSettings *ts, const BMesh *bm, const BMLoop *l)
static wmOperatorStatus uv_select_pinned_exec(bContext *C, wmOperator *op)
bool BLI_rctf_isect_segment(const struct rctf *rect, const float s1[2], const float s2[2])
void UV_OT_select_split(wmOperatorType *ot)
void BLI_lasso_boundbox(rcti *rect, Span< int2 > mcoords)
void BLI_heap_clear(Heap *heap, HeapFreeFP ptrfreefp) ATTR_NONNULL(1)
void BM_loop_edge_uvselect_set(BMesh *bm, BMLoop *l, bool select)
float RNA_float_get(PointerRNA *ptr, const char *name)
static wmOperatorStatus uv_box_select_exec(bContext *C, wmOperator *op)
static wmOperatorStatus uv_select_similar_face_exec(bContext *C, wmOperator *op)
void BM_mesh_uvselect_flush_shared_only_select(BMesh *bm, const int cd_loop_uv_offset)
bool RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop)
static void uv_circle_select_state_free(void *data)
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
static int uv_select_edgering(Scene *scene, Object *obedit, UvNearestHit *hit, const bool extend)
bool uvedit_face_select_get_no_sync(const ToolSettings *ts, const BMesh *bm, const BMFace *f)
void BM_mesh_uvselect_sync_to_mesh(BMesh *bm)
bool ED_uvedit_nearest_uv_multi(const View2D *v2d, const Scene *scene, Span< Object * > objects, const float mval_fl[2], const bool ignore_selected, float *dist_sq, float r_uv[2])
void RNA_float_get_array(PointerRNA *ptr, const char *name, float *values)
void BLI_polyfill_beautify(const float(*coords)[2], unsigned int coords_num, unsigned int(*tris)[3], struct MemArena *arena, struct Heap *eheap)
void BLI_memarena_free(MemArena *ma) ATTR_NONNULL(1)
float BM_face_calc_area_with_mat3(const BMFace *f, const float mat3[3][3])
void * MEM_new_array_zeroed(size_t len, size_t size, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1
static void uv_select_all_perform_multi_ex(const Scene *scene, Span< Object * > objects, int action, const Object *ob_exclude)
void EDBM_select_less(BMesh *bm, short selectmode, bool use_face_step)
void WM_operator_properties_gesture_lasso(wmOperatorType *ot)
void UV_OT_select_less(wmOperatorType *ot)
static wmOperatorStatus uv_select_linked_pick_exec(bContext *C, wmOperator *op)
static wmOperatorStatus uv_custom_region_set_exec(bContext *C, wmOperator *op)
void BM_edge_select_set(BMesh *bm, BMEdge *e, const bool select)
Select Edge.
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
struct BMEditSelection * prev
struct BMLoop * radial_next
bool uv_select_sync_valid
struct ToolSettings * toolsettings
Vector< Object * > objects
UVCircleSelectState(const Scene *scene, Vector< Object * > objects, const bool use_select_linked)
std::optional< Array< UVSelectLinkedHelper > > linked_helpers
bool face_check(BMFace *efa) const
void init(const Scene *scene, BMesh *bm)
void select_all(const bool select)
UVSelectLinkedHelper()=default
bool face_add(BMFace *efa)
UVSelectLinkedHelper(const Scene *scene, BMesh *bm)
struct BMLoop * radial_next
bool uv_select_sync_valid
ListBaseT< BMEditSelection > selected
wmOperatorStatus(*) exec(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
void(*) cancel(bContext *C, wmOperator *op)
bool(*) poll(bContext *C) ATTR_WARN_UNUSED_RESULT
wmOperatorStatus(*) invoke(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
wmOperatorStatus(*) modal(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
std::string(*) get_name(wmOperatorType *ot, PointerRNA *ptr)
struct ReportList * reports
#define SET_SELECTION(value)
#define NEIGHBORING_FACE_IS_SEL
#define CURR_FACE_IS_UNSEL