121 if (ese && ese->
prev) {
143 if (ese && ese->
prev) {
186 return uv_selectmode;
455 const int sticky_flag,
487 const int sticky_flag,
654 const int sticky_flag,
662 e_first = e_iter =
l->
e;
664 BMLoop *l_radial_iter = e_iter->
l;
665 if (!l_radial_iter) {
669 if (l_radial_iter->
v ==
l->
v) {
671 bool do_select =
false;
684 }
while ((l_radial_iter = l_radial_iter->
radial_next) != e_iter->
l);
753 BMLoop *l_other =
nullptr;
755 if (l_iter != l_src) {
761 if (l_other ==
nullptr) {
784 l_step = (l_step->
v == v_pivot) ? l_step->
prev : l_step->
next;
785 BMLoop *l_step_last =
nullptr;
788 l_step_last = l_step;
791 l_step = (l_step->
v == v_pivot) ? l_step->
prev : l_step->
next;
793 }
while (l_step !=
nullptr);
795 if (l_step_last !=
nullptr) {
839 BLI_assert((hit->scale[0] > 0.0f) && (hit->scale[1] > 0.0f));
844 float *luv, *luv_next;
874 if (dist_test_sq < hit->dist_sq) {
880 hit->dist_sq = dist_test_sq;
895 for (
Object *obedit : objects) {
906 BLI_assert((hit->scale[0] > 0.0f) && (hit->scale[1] > 0.0f));
929 if (dist_test_sq < hit->dist_sq) {
939 hit->dist_sq = dist_test_sq;
955 const bool only_in_face)
958 for (
Object *obedit : objects) {
987 BLI_assert((hit->scale[0] > 0.0f) && (hit->scale[1] > 0.0f));
1020 dist_test_sq =
square_f(
sqrtf(dist_test_sq) + penalty_dist);
1023 if (dist_test_sq <= hit->dist_sq) {
1024 if (dist_test_sq == hit->dist_sq) {
1030 hit->dist_sq = dist_test_sq;
1046 const float penalty_dist,
1050 for (
Object *obedit : objects) {
1061 const float scale[2],
1062 const bool ignore_selected,
1069 const float *uv_best =
nullptr;
1070 float dist_best = *dist_sq;
1077 BMLoop *l_iter, *l_first;
1088 if (dist_best > dist_test) {
1089 dist_best = dist_test;
1092 }
while ((l_iter = l_iter->
next) != l_first);
1095 if (uv_best !=
nullptr) {
1097 *dist_sq = dist_best;
1106 const float mval_fl[2],
1107 const bool ignore_selected,
1113 float scale[2], offset[2];
1120 for (
Object *obedit : objects) {
1121 if (
uvedit_nearest_uv(scene, obedit, co, scale, ignore_selected, dist_sq, r_uv)) {
1145 BMLoop *l_found =
nullptr;
1155 if (dist_test_sq < dist_best_sq) {
1156 dist_best_sq = dist_test_sq;
1170 BMLoop *l_found =
nullptr;
1180 if (dist_test_sq < dist_best_sq) {
1181 dist_best_sq = dist_test_sq;
1199 BMLoop *l_radial_iter = e_iter->
l, *l_other;
1204 l_other = (l_radial_iter->
v !=
l->
v) ? l_radial_iter->
next : l_radial_iter;
1211 }
while ((l_radial_iter = l_radial_iter->
radial_next) != e_iter->
l);
1392 if (l_step->
f->
len == 4) {
1394 BMLoop *l_step_over = (v_from == l_step->
v) ? l_step->
next : l_step->
prev;
1396 scene, l_step_over, offsets);
1398 return (l_step_over->
v == v_from_next) ? l_step_over->
prev : l_step_over->
next;
1411 scene, l_step, v_from_next, offsets);
1438 for (
int side = 0; side < 2; side++) {
1439 BMLoop *l_step_pair[2] = {l_init_pair[0], l_init_pair[1]};
1440 BMVert *v_from = side ? l_step_pair[0]->
e->
v1 : l_step_pair[0]->
e->
v2;
1444 while ((l_step_pair[0] !=
nullptr) && (l_step_pair[1] !=
nullptr)) {
1461 for (
int i = 0; i <
ARRAY_SIZE(l_step_pair); i++) {
1463 scene, l_step_pair[i], v_from, offsets);
1471 v_from = v_from_next;
1487 int r_count_by_select[2])
1489 if (r_count_by_select) {
1490 r_count_by_select[0] = r_count_by_select[1] = 0;
1495 for (
int side = 0; side < 2; side++) {
1500 while (l_step !=
nullptr) {
1510 if (r_count_by_select !=
nullptr) {
1513 if (r_count_by_select[0] && r_count_by_select[1]) {
1514 r_count_by_select[0] = r_count_by_select[1] = -1;
1522 BMFace *f_step_prev = l_step->
f;
1531 if (f_step_prev == l_step->
f) {
1535 v_from = v_from_next;
1558 BMLoop *l_init_pair[2] = {
1568 if (l_init_pair[1] ==
nullptr) {
1569 int count_by_select[2];
1572 scene, em, l_init_pair[0], offsets, boundary_mode, count_by_select);
1573 if (count_by_select[!
select] == 0) {
1578 scene, em, l_init_pair[0], offsets, boundary_mode, count_by_select);
1579 if (count_by_select[!
select] == 0) {
1585 if (l_init_pair[1] ==
nullptr) {
1655 for (
int side = 0; side < 2; side++) {
1656 BMLoop *l_step = l_pair[side];
1665 if (l_step->
f->
len == 4) {
1668 scene, l_step_opposite, offsets);
1683 return (
select) ? 1 : -1;
1727 for (
int side = 0; side < 2; side++) {
1728 BMLoop *l_step = l_pair[side];
1736 if (use_face_select) {
1742 else if (use_vertex_select) {
1752 if (l_step->
f->
len == 4) {
1755 scene, l_step_opposite, offsets);
1756 if (l_step ==
nullptr) {
1758 l_step = l_step_opposite;
1782 return (
select) ? 1 : -1;
1797 const bool select_faces)
1802 for (
const int ob_index : objects.index_range()) {
1803 if (hit && ob_index != 0) {
1806 Object *obedit = hit ? hit->ob : objects[ob_index];
1812 int i, stacksize = 0, *stack;
1832 if (vmap ==
nullptr) {
1836 stack =
static_cast<int *
>(
MEM_mallocN(
sizeof(*stack) * (em->
bm->
totface + 1),
"UvLinkStack"));
1839 if (hit ==
nullptr) {
1845 stack[stacksize] = a;
1853 bool add_to_stack =
true;
1854 if (uv_sync_select) {
1876 add_to_stack =
false;
1884 stack[stacksize] = a;
1897 if (efa == hit->efa) {
1898 stack[stacksize] = a;
1906 while (stacksize > 0) {
1909 a = stack[stacksize];
1920 for (iterv = vlist; iterv; iterv = iterv->
next) {
1929 for (iterv = startv; iterv; iterv = iterv->
next) {
1930 if ((startv != iterv) && (iterv->
separate)) {
1943 if ((toggle ==
true) && (extend ==
false) && (deselect ==
false)) {
1945 bool found_selected =
false;
1952 found_selected =
true;
1958 found_selected =
true;
1963 if (found_selected) {
1971#define SET_SELECTION(value) \
1972 if (select_faces) { \
1973 BM_face_select_set(em->bm, efa, value); \
1976 uvedit_face_select_set(scene, em->bm, efa, value, false, offsets); \
1982 if (!extend && !deselect && !toggle) {
2002 if (uv_sync_select) {
2007 if (!select_faces) {
2053 scene, view_layer,
nullptr);
2057 for (
Object *obedit : objects) {
2060 bool changed =
false;
2080 if (is_uv_face_selectmode) {
2090#define NEIGHBORING_FACE_IS_SEL 1
2091#define CURR_FACE_IS_UNSEL 2
2116#undef NEIGHBORING_FACE_IS_SEL
2117#undef CURR_FACE_IS_UNSEL
2160 if (is_uv_face_selectmode) {
2191 ot->
name =
"Select More";
2192 ot->
description =
"Select more UV vertices connected to initial selection";
2209 ot->
name =
"Select Less";
2210 ot->
description =
"Deselect UV vertices at the boundary of each selection region";
2255 for (
Object *obedit : objects) {
2371 const Object *ob_exclude)
2377 for (
Object *obedit : objects) {
2378 if (ob_exclude && (obedit == ob_exclude)) {
2400 scene, view_layer,
nullptr);
2404 for (
Object *obedit : objects) {
2414 ot->
name =
"(De)select All";
2443 int selectmode, sticky;
2444 bool found_item =
false;
2450 const float penalty_dist = 3.0f *
U.pixelsize;
2520 bool found = found_item;
2521 bool changed =
false;
2523 bool is_selected =
false;
2540 if (hit.l !=
nullptr) {
2550 if ((found &&
params->select_passthrough) && is_selected) {
2553 else if (found ||
params->deselect_all) {
2556 for (
Object *obedit : objects) {
2583 bool select_value =
false;
2584 switch (
params->sel_op) {
2586 select_value =
true;
2590 select_value =
false;
2594 select_value = !is_selected;
2599 select_value =
true;
2626 if (select_value ==
false) {
2633 flush = select_value ? 1 : -1;
2652 if (changed && found) {
2658 return changed || found;
2665 scene, view_layer,
nullptr);
2727 "Mouse location in normalized coordinates, 0.0 to 1.0 is within the image bounds",
2756 bool found_item =
false;
2793 else if (flush == -1) {
2801 for (
Object *ob : objects) {
2815 scene, view_layer,
nullptr);
2852 ot->
name =
"Loop Select";
2868 "Extend selection rather than clearing the existing selection");
2878 "Mouse location in normalized coordinates, 0.0 to 1.0 is within the image bounds",
2914 ot->
name =
"Edge Ring Select";
2915 ot->
description =
"Select an edge ring of connected UV vertices";
2916 ot->
idname =
"UV_OT_select_edge_ring";
2930 "Extend selection rather than clearing the existing selection");
2940 "Mouse location in normalized coordinates, 0.0 to 1.0 is within the image bounds",
2959 bool deselect =
false;
2971 scene, view_layer,
nullptr);
2991 if (!extend && !deselect) {
2996 scene, objects, pick ? &hit :
nullptr, extend, deselect,
false, select_faces);
3003 for (
Object *obedit : objects) {
3021 ot->
name =
"Select Linked";
3022 ot->
description =
"Select all UV vertices linked to the active UV map";
3023 ot->
idname =
"UV_OT_select_linked";
3052 ot->
name =
"Select Linked Pick";
3053 ot->
description =
"Select all UV vertices linked under the mouse";
3054 ot->
idname =
"UV_OT_select_linked_pick";
3070 "Extend selection rather than clearing the existing selection");
3076 "Deselect linked UV vertices rather than selecting them");
3086 "Mouse location in normalized coordinates, 0.0 to 1.0 is within the image bounds",
3120 bool changed_multi =
false;
3123 scene, view_layer,
nullptr);
3125 for (
Object *obedit : objects) {
3128 bool changed =
false;
3136 bool is_sel =
false;
3137 bool is_unsel =
false;
3158 if (is_sel && is_unsel) {
3163 if (is_sel && is_unsel) {
3174 changed_multi =
true;
3186 ot->
name =
"Select Split";
3227 const uint efa_index,
3232 UvMapVert *start_vlist =
nullptr, *vlist_iter;
3239 while (vlist_iter) {
3240 if (vlist_iter->separate) {
3241 start_vlist = vlist_iter;
3244 if (efa_index == vlist_iter->face_index) {
3248 vlist_iter = vlist_iter->
next;
3251 vlist_iter = start_vlist;
3252 while (vlist_iter) {
3253 if (vlist_iter != start_vlist && vlist_iter->
separate) {
3257 if (efa_index != vlist_iter->face_index) {
3262 l_other =
static_cast<BMLoop *
>(
3267 vlist_iter = vlist_iter->next;
3307 if (vmap ==
nullptr) {
3317 scene, em, vmap, efa_index,
l,
select, offsets);
3323 scene, em, vmap, efa_index,
l,
select, offsets);
3396 if (vmap ==
nullptr) {
3404 scene, em, vmap, efa_index,
l,
select, offsets);
3453 if (vmap ==
nullptr) {
3466 scene, em, vmap, efa_index,
l,
true, offsets);
3468 scene, em, vmap, efa_index,
l->
next,
true, offsets);
3528 bool changed_multi =
false;
3531 scene, view_layer,
nullptr);
3533 if (use_pre_deselect) {
3538 for (
Object *obedit : objects) {
3541 bool changed =
false;
3550 if (use_face_center && !pinned) {
3572 else if (use_edge && !pinned) {
3573 bool do_second_pass =
true;
3587 do_second_pass =
false;
3595 if (do_second_pass) {
3625 bool has_selected =
false;
3634 has_selected =
true;
3645 if (has_selected && use_select_linked) {
3658 if (changed || use_pre_deselect) {
3659 changed_multi =
true;
3704 const float offset[2],
3705 const float ellipse[2])
3708 const float co[2] = {
3709 (uv[0] - offset[0]) * ellipse[0],
3710 (uv[1] - offset[1]) * ellipse[1],
3716 const float uv_b[2],
3717 const float offset[2],
3718 const float ellipse[2])
3721 const float co_a[2] = {
3722 (uv_a[0] - offset[0]) * ellipse[0],
3723 (uv_a[1] - offset[1]) * ellipse[1],
3725 const float co_b[2] = {
3726 (uv_b[0] - offset[0]) * ellipse[0],
3727 (uv_b[1] - offset[1]) * ellipse[1],
3729 const float co_zero[2] = {0.0f, 0.0f};
3745 int x,
y, radius, width, height;
3747 float offset[2], ellipse[2];
3768 ellipse[0] = width * zoomx / radius;
3769 ellipse[1] = height * zoomy / radius;
3773 bool changed_multi =
false;
3776 scene, view_layer,
nullptr);
3784 if (use_pre_deselect) {
3788 for (
Object *obedit : objects) {
3791 bool changed =
false;
3799 if (use_face_center) {
3818 else if (use_edge) {
3845 bool has_selected =
false;
3853 has_selected =
true;
3857 if (has_selected && use_select_linked) {
3870 if (changed || use_pre_deselect) {
3871 changed_multi =
true;
3888 ot->
name =
"Circle Select";
3889 ot->
description =
"Select UV vertices using circle selection";
3890 ot->
idname =
"UV_OT_select_circle";
3915 const rcti *clip_rect,
3917 const float co_test[2])
3921 ®ion->v2d, co_test[0], co_test[1], &co_screen[0], &co_screen[1]) &&
3931 const rcti *clip_rect,
3933 const float co_test_a[2],
3934 const float co_test_b[2])
3936 int co_screen_a[2], co_screen_b[2];
3938 ®ion->v2d, co_test_a, co_test_b, co_screen_a, co_screen_b) &&
3971 bool changed_multi =
false;
3977 scene, view_layer,
nullptr);
3979 if (use_pre_deselect) {
3983 for (
Object *obedit : objects) {
3985 bool changed =
false;
3994 if (use_face_center) {
4013 else if (use_edge) {
4014 bool do_second_pass =
true;
4029 do_second_pass =
false;
4038 if (do_second_pass) {
4066 bool has_selected =
false;
4074 has_selected =
true;
4078 if (has_selected && use_select_linked) {
4091 if (changed || use_pre_deselect) {
4092 changed_multi =
true;
4103 return changed_multi;
4121 ot->
name =
"Lasso Select UV";
4166 scene, view_layer,
nullptr);
4168 for (
Object *obedit : objects) {
4171 bool changed =
false;
4206 ot->
name =
"Selected Pinned";
4208 ot->
idname =
"UV_OT_select_pinned";
4239 return !((a->indexA ==
b->indexA && a->indexB ==
b->indexB) ||
4240 (a->indexA ==
b->indexB && a->indexB ==
b->indexA));
4257 const float t2[3][2],
4258 const float endpoint_bias)
4302 scene, view_layer,
nullptr);
4305 uint uv_tri_len = 0;
4306 for (
Object *obedit : objects) {
4322 uv_tri_len += efa->
len - 2;
4333 int face_len_alloc = 3;
4334 float(*uv_verts)[2] =
static_cast<float(*)[2]
>(
4335 MEM_mallocN(
sizeof(*uv_verts) * face_len_alloc,
"UvOverlapCoords"));
4336 uint(*indices)[3] =
static_cast<uint(*)[3]
>(
4337 MEM_mallocN(
sizeof(*indices) * (face_len_alloc - 2),
"UvOverlapTris"));
4342 for (
const int ob_index : objects.index_range()) {
4343 Object *obedit = objects[ob_index];
4359 const uint face_len = efa->
len;
4360 const uint tri_len = face_len - 2;
4362 if (face_len_alloc < face_len) {
4365 uv_verts =
static_cast<float(*)[2]
>(
4366 MEM_mallocN(
sizeof(*uv_verts) * face_len,
"UvOverlapCoords"));
4367 indices =
static_cast<uint(*)[3]
>(
4368 MEM_mallocN(
sizeof(*indices) * tri_len,
"UvOverlapTris"));
4369 face_len_alloc = face_len;
4380 const int coords_sign = 0;
4387 for (
int t = 0; t < tri_len; t++) {
4388 overlap_data[data_index].
ob_index = ob_index;
4389 overlap_data[data_index].
face_index = face_index;
4392 const float tri[3][3] = {
4393 {
UNPACK2(uv_verts[indices[t][0]]), 0.0f},
4394 {
UNPACK2(uv_verts[indices[t][1]]), 0.0f},
4395 {
UNPACK2(uv_verts[indices[t][2]]), 0.0f},
4398 copy_v2_v2(overlap_data[data_index].tri[0], tri[0]);
4399 copy_v2_v2(overlap_data[data_index].tri[1], tri[1]);
4400 copy_v2_v2(overlap_data[data_index].tri[2], tri[2]);
4419 uint tree_overlap_len;
4422 if (overlap !=
nullptr) {
4425 for (
int i = 0; i < tree_overlap_len; i++) {
4427 if (overlap[i].indexA == overlap[i].indexB) {
4437 const UVOverlapData *o_b = &overlap_data[overlap[i].indexB];
4461 const float endpoint_bias = -1e-4f;
4472 for (
Object *
object : objects) {
4492 ot->
name =
"Select Overlap";
4493 ot->
description =
"Select all UV faces which overlap each other";
4494 ot->
idname =
"UV_OT_select_overlap";
4506 "Extend selection rather than clearing the existing selection");
4515 const float ob_m3[3][3],
4522 float result = 0.0f;
4560 const float ob_m3[3][3],
4567 float result = 0.0f;
4591 return len_v3v3(edge->v1->co, edge->v2->co);
4620 const float ob_m3[3][3],
4625 float result = 0.0f;
4646 return face->mat_nr;
4658 const float ob_m3[3][3],
4663 float result = 0.0f;
4666 for (
int i = 0; i < island->
faces_len; i++) {
4671 for (
int i = 0; i < island->
faces_len; i++) {
4696 scene, view_layer,
nullptr);
4698 int max_verts_selected_all = 0;
4699 for (
Object *ob : objects) {
4707 max_verts_selected_all += face->len;
4713 KDTree_1d *tree_1d = BLI_kdtree_1d_new(max_verts_selected_all);
4715 for (
Object *ob : objects) {
4724 copy_m3_m4(ob_m3, ob->object_to_world().ptr());
4739 BLI_kdtree_1d_insert(tree_1d, tree_index++, &needle);
4744 if (tree_1d !=
nullptr) {
4745 BLI_kdtree_1d_deduplicate(tree_1d);
4746 BLI_kdtree_1d_balance(tree_1d);
4749 for (
Object *ob : objects) {
4756 bool changed =
false;
4760 copy_m3_m4(ob_m3, ob->object_to_world().ptr());
4787 BLI_kdtree_1d_free(tree_1d);
4803 scene, view_layer,
nullptr);
4805 int max_edges_selected_all = 0;
4806 for (
Object *ob : objects) {
4814 max_edges_selected_all += face->len;
4820 KDTree_1d *tree_1d = BLI_kdtree_1d_new(max_edges_selected_all);
4822 for (
Object *ob : objects) {
4831 copy_m3_m4(ob_m3, ob->object_to_world().ptr());
4848 BLI_kdtree_1d_insert(tree_1d, tree_index++, &needle);
4854 if (tree_1d !=
nullptr) {
4855 BLI_kdtree_1d_deduplicate(tree_1d);
4856 BLI_kdtree_1d_balance(tree_1d);
4859 for (
Object *ob : objects) {
4866 bool changed =
false;
4869 copy_m3_m4(ob_m3, ob->object_to_world().ptr());
4897 BLI_kdtree_1d_free(tree_1d);
4913 scene, view_layer,
nullptr);
4915 int max_faces_selected_all = 0;
4916 for (
Object *ob : objects) {
4923 KDTree_1d *tree_1d = BLI_kdtree_1d_new(max_faces_selected_all);
4925 for (
const int ob_index : objects.index_range()) {
4926 Object *ob = objects[ob_index];
4931 copy_m3_m4(ob_m3, ob->object_to_world().ptr());
4947 BLI_kdtree_1d_insert(tree_1d, tree_index++, &needle);
4952 if (tree_1d !=
nullptr) {
4953 BLI_kdtree_1d_deduplicate(tree_1d);
4954 BLI_kdtree_1d_balance(tree_1d);
4957 for (
const int ob_index : objects.index_range()) {
4958 Object *ob = objects[ob_index];
4961 bool changed =
false;
4966 copy_m3_m4(ob_m3, ob->object_to_world().ptr());
4991 BLI_kdtree_1d_free(tree_1d);
5013 scene, view_layer,
nullptr);
5016 MEM_callocN(
sizeof(*island_list_ptr) * objects.size(), __func__));
5017 int island_list_len = 0;
5021 for (
const int ob_index : objects.index_range()) {
5022 Object *obedit = objects[ob_index];
5025 if (offsets.
uv == -1) {
5029 float aspect_y = 1.0f;
5031 scene, em->
bm, &island_list_ptr[ob_index], face_selected,
false,
false, aspect_y, offsets);
5035 MEM_callocN(
sizeof(*island_array) * island_list_len, __func__));
5038 KDTree_1d *tree_1d = BLI_kdtree_1d_new(island_list_len);
5040 for (
const int ob_index : objects.index_range()) {
5041 Object *obedit = objects[ob_index];
5044 if (cd_loop_uv_offset == -1) {
5049 copy_m3_m4(ob_m3, obedit->object_to_world().ptr());
5053 island_array[index] = island;
5059 BLI_kdtree_1d_insert(tree_1d, tree_index++, &needle);
5064 if (tree_1d !=
nullptr) {
5065 BLI_kdtree_1d_deduplicate(tree_1d);
5066 BLI_kdtree_1d_balance(tree_1d);
5069 int tot_island_index = 0;
5070 for (
const int ob_index : objects.index_range()) {
5071 Object *obedit = objects[ob_index];
5074 if (cd_loop_uv_offset == -1) {
5078 copy_m3_m4(ob_m3, obedit->object_to_world().ptr());
5080 bool changed =
false;
5083 island_array[tot_island_index++] = island;
5093 for (
int j = 0; j < island->faces_len; j++) {
5105 BLI_assert(tot_island_index == island_list_len);
5106 for (
int i = 0; i < island_list_len; i++) {
5113 BLI_kdtree_1d_free(tree_1d);
5155 {
UV_SSIM_FACE,
"FACE", 0,
"Amount of Faces in Island",
""},
5208 ot->
name =
"Select Similar";
5210 ot->
idname =
"UV_OT_select_similar";
5251 faces[faces_len++] = f;
5252 if (faces_len == len_max) {
5260 *r_faces_len = faces_len;
5261 if (faces_len != len_max) {
5297 edges[edges_len++] = l_iter;
5298 if (edges_len == len_max) {
5309 }
while ((l_radial_iter = l_radial_iter->
radial_next) != l_iter);
5318 *r_edges_len = edges_len;
5319 if (edges_len != len_max) {
5356 verts[verts_len++] = l_iter;
5357 if (verts_len == len_max) {
5376 *r_verts_len = verts_len;
5377 if (verts_len != len_max) {
5402 if (elementmap ==
nullptr) {
5410 bool *is_island_not_selected =
static_cast<bool *
>(
5411 MEM_callocN(
sizeof(
bool) * (num_islands), __func__));
5424 is_island_not_selected[element->island] =
true;
5438 if (element && is_island_not_selected[element->island]) {
5527 scene, view_layer,
nullptr);
5528 for (
Object *obedit : objects) {
5579 ot->
name =
"UV Select Mode";
SpaceImage * CTX_wm_space_image(const bContext *C)
Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
ToolSettings * CTX_data_tool_settings(const bContext *C)
ARegion * CTX_wm_region(const bContext *C)
ViewLayer * CTX_data_view_layer(const bContext *C)
CustomData interface, see also DNA_customdata_types.h.
int CustomData_get_offset(const CustomData *data, eCustomDataType type)
const char * CustomData_get_active_layer_name(const CustomData *data, eCustomDataType type)
BMEditMesh * BKE_editmesh_from_object(Object *ob)
Return the BMEditMesh for a given object.
blender::Vector< Object * > BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(const Scene *scene, ViewLayer *view_layer, const View3D *v3d)
General operations, lookup, etc. for materials.
void BKE_mesh_batch_cache_dirty_tag(Mesh *mesh, eMeshBatchDirtyMode mode)
@ BKE_MESH_BATCH_DIRTY_UVEDIT_SELECT
void BKE_report(ReportList *reports, eReportType type, const char *message)
#define BLI_assert_unreachable()
GSet * BLI_gset_new_ex(GSetHashFP hashfp, GSetCmpFP cmpfp, const char *info, unsigned int nentries_reserve) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
void BLI_gset_free(GSet *gs, GSetKeyFreeFP keyfreefp)
bool BLI_gset_add(GSet *gs, void *key)
BLI_INLINE unsigned int BLI_hash_int_2d(unsigned int kx, unsigned int ky)
A min-heap / priority queue ADT.
void BLI_heap_free(Heap *heap, HeapFreeFP ptrfreefp) ATTR_NONNULL(1)
Heap * BLI_heap_new_ex(unsigned int reserve_num) ATTR_WARN_UNUSED_RESULT
void BLI_heap_clear(Heap *heap, HeapFreeFP ptrfreefp) ATTR_NONNULL(1)
BVHTree * BLI_bvhtree_new(int maxsize, float epsilon, char tree_type, char axis)
void BLI_bvhtree_balance(BVHTree *tree)
void BLI_bvhtree_free(BVHTree *tree)
void BLI_bvhtree_insert(BVHTree *tree, int index, const float co[3], int numpoints)
BVHTreeOverlap * BLI_bvhtree_overlap_self(const BVHTree *tree, unsigned int *r_overlap_num, BVHTree_OverlapCallback callback, void *userdata)
A KD-tree for nearest neighbor search.
bool BLI_lasso_is_point_inside(blender::Span< blender::int2 > mcoords, int sx, int sy, int error_value)
void BLI_lasso_boundbox(rcti *rect, blender::Span< blender::int2 > mcoords)
bool BLI_lasso_is_edge_inside(blender::Span< blender::int2 > mcoords, int x0, int y0, int x1, int y1, int error_value)
#define LISTBASE_FOREACH_INDEX(type, var, list, index_var)
MINLINE float square_f(float a)
MINLINE int signum_i(float a)
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])
float closest_to_line_segment_v2(float r_close[2], const float p[2], const float l1[2], const float l2[2])
int isect_point_tri_v2(const float pt[2], const float v1[2], const float v2[2], const float v3[2])
float dist_squared_to_line_segment_v2(const float p[2], const float l1[2], const float l2[2])
void copy_m3_m4(float m1[3][3], const float m2[4][4])
MINLINE float len_squared_v2(const float v[2]) ATTR_WARN_UNUSED_RESULT
MINLINE float len_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE float len_squared_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
MINLINE void mul_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE void sub_v2_v2(float r[2], const float a[2])
MINLINE void mul_v2_v2(float r[2], const float a[2])
MINLINE float len_v2v2(const float v1[2], const float v2[2]) ATTR_WARN_UNUSED_RESULT
void mid_v2_v2v2v2(float v[2], const float v1[2], const float v2[2], const float v3[2])
MINLINE void copy_v2_v2(float r[2], const float a[2])
MINLINE void sub_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE float line_point_side_v2(const float l1[2], const float l2[2], const float pt[2]) ATTR_WARN_UNUSED_RESULT
void BLI_memarena_free(struct MemArena *ma) ATTR_NONNULL(1)
struct MemArena * BLI_memarena_new(size_t bufsize, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL ATTR_NONNULL(2) ATTR_MALLOC
#define BLI_MEMARENA_STD_BUFSIZE
void void BLI_memarena_clear(MemArena *ma) ATTR_NONNULL(1)
void BLI_polyfill_calc_arena(const float(*coords)[2], unsigned int coords_num, int coords_sign, unsigned int(*r_tris)[3], struct MemArena *arena)
#define BLI_POLYFILL_ALLOC_NGON_RESERVE
void BLI_polyfill_beautify(const float(*coords)[2], unsigned int coords_num, unsigned int(*tris)[3], struct MemArena *arena, struct Heap *eheap)
bool BLI_rcti_isect_pt_v(const struct rcti *rect, const int xy[2])
bool BLI_rctf_isect_pt_v(const struct rctf *rect, const float xy[2])
bool BLI_rcti_isect_segment(const struct rcti *rect, const int s1[2], const int s2[2])
bool BLI_rctf_isect_segment(const struct rctf *rect, const float s1[2], const float s2[2])
#define UNUSED_VARS_NDEBUG(...)
#define BLT_I18NCONTEXT_ID_MESH
void DEG_id_tag_update(ID *id, unsigned int flags)
Object * DEG_get_evaluated_object(const Depsgraph *depsgraph, Object *object)
Object is a sort of wrapper for general info.
void ED_space_image_get_size(SpaceImage *sima, int *r_width, int *r_height)
void ED_space_image_get_zoom(SpaceImage *sima, const ARegion *region, float *r_zoomx, float *r_zoomy)
UvVertMap * BM_uv_vert_map_create(BMesh *bm, bool use_select)
void EDBM_flag_disable_all(BMEditMesh *em, char hflag)
UvElement * BM_uv_element_get(const UvElementMap *element_map, const BMLoop *l)
void EDBM_select_toggle_all(BMEditMesh *em)
void EDBM_select_more(BMEditMesh *em, bool use_face_step)
void EDBM_deselect_flush(BMEditMesh *em)
void EDBM_select_swap(BMEditMesh *em)
void BM_uv_element_map_free(UvElementMap *element_map)
UvElementMap * BM_uv_element_map_create(BMesh *bm, const Scene *scene, bool uv_selected, bool use_winding, bool use_seams, bool do_islands)
void EDBM_selectmode_flush(BMEditMesh *em)
UvMapVert * BM_uv_vert_map_at_index(UvVertMap *vmap, unsigned int v)
void EDBM_flag_enable_all(BMEditMesh *em, char hflag)
void EDBM_select_less(BMEditMesh *em, bool use_face_step)
void EDBM_select_flush(BMEditMesh *em)
void BM_uv_vert_map_free(UvVertMap *vmap)
bool ED_operator_uvedit_space_image(bContext *C)
bool ED_operator_uvedit(bContext *C)
eSelectOp ED_select_op_modal(eSelectOp sel_op, bool is_first)
#define SEL_OP_USE_PRE_DESELECT(sel_op)
std::string ED_select_circle_get_name(wmOperatorType *ot, PointerRNA *ptr)
void ED_select_pick_params_from_operator(PointerRNA *ptr, SelectPick_Params *params) ATTR_NONNULL(1
bool ED_select_similar_compare_float_tree(const KDTree_1d *tree, float length, float thresh, eSimilarCmp compare)
void std::string ED_select_pick_get_name(wmOperatorType *ot, PointerRNA *ptr)
int bm_mesh_calc_uv_islands(const Scene *scene, BMesh *bm, ListBase *island_list, const bool only_selected_faces, const bool only_selected_uvs, const bool use_seams, const float aspect_y, BMUVOffsets offsets)
Read Guarded memory(de)allocation.
#define MEM_reallocN(vmemh, len)
bool UI_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()
bool UI_view2d_view_to_region_clip(const View2D *v2d, float x, float y, int *r_region_x, int *r_region_y) ATTR_NONNULL()
void UI_view2d_view_to_region_fl(const View2D *v2d, float x, float y, float *r_region_x, float *r_region_y) ATTR_NONNULL()
float UI_view2d_scale_get_y(const View2D *v2d)
void UI_view2d_scale_get(const View2D *v2d, float *r_x, float *r_y)
void UI_view2d_region_to_view(const View2D *v2d, float x, float y, float *r_view_x, float *r_view_y) ATTR_NONNULL()
void UI_view2d_region_to_view_rctf(const View2D *v2d, const rctf *rect_src, rctf *rect_dst) ATTR_NONNULL()
float UI_view2d_scale_get_x(const View2D *v2d)
@ OPTYPE_DEPENDS_ON_CURSOR
#define BM_ELEM_CD_GET_BOOL(ele, offset)
#define BM_DISK_EDGE_NEXT(e, v)
#define BM_FACE_FIRST_LOOP(p)
#define BM_ELEM_CD_GET_FLOAT_P(ele, offset)
#define BM_ELEM_CD_SET_BOOL(ele, offset, f)
#define BM_elem_index_get(ele)
#define BM_elem_flag_disable(ele, hflag)
#define BM_elem_flag_test(ele, hflag)
#define BM_elem_flag_test_bool(ele, hflag)
#define BM_elem_flag_enable(ele, hflag)
void BM_uv_map_ensure_pin_attr(BMesh *bm, const char *uv_map_name)
void BM_uv_map_ensure_vert_select_attr(BMesh *bm, const char *uv_map_name)
void BM_uv_map_ensure_edge_select_attr(BMesh *bm, const char *uv_map_name)
void * BM_iter_at_index(BMesh *bm, const char itype, void *data, int index)
#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)
ATTR_WARN_UNUSED_RESULT BMesh * bm
void BM_select_history_clear(BMesh *bm)
void BM_face_select_set(BMesh *bm, BMFace *f, const bool select)
Select Face.
void BM_vert_select_set(BMesh *bm, BMVert *v, const bool select)
Select Vert.
void BM_edge_select_set(BMesh *bm, BMEdge *e, const bool select)
Select Edge.
void BM_select_history_validate(BMesh *bm)
void BM_mesh_elem_hflag_disable_all(BMesh *bm, const char htype, const char hflag, const bool respecthide)
void BM_mesh_active_face_set(BMesh *bm, BMFace *f)
#define BM_select_history_store_notest(bm, ele)
#define BM_select_history_store(bm, ele)
#define BM_select_history_remove(bm, ele)
void BM_mesh_elem_table_ensure(BMesh *bm, const char htype)
void BM_mesh_elem_index_ensure(BMesh *bm, const char htype)
BLI_INLINE BMFace * BM_face_at_index(BMesh *bm, const int index)
float BM_face_calc_area_uv(const BMFace *f, int cd_loop_uv_offset)
float BM_face_calc_area_with_mat3(const BMFace *f, const float mat3[3][3])
float BM_face_calc_area_uv_signed(const BMFace *f, int cd_loop_uv_offset)
BMLoop * BM_face_edge_share_loop(BMFace *f, BMEdge *e)
Return the Loop Shared by Face and Edge.
BMLoop * BM_face_vert_share_loop(BMFace *f, BMVert *v)
Return the Loop Shared by Face and Vertex.
BLI_INLINE BMVert * BM_edge_other_vert(BMEdge *e, const BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
BLI_INLINE bool BM_vert_in_edge(const BMEdge *e, const BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
ATTR_WARN_UNUSED_RESULT const BMLoop * l
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
ATTR_WARN_UNUSED_RESULT const BMVert * v
BMUVOffsets BM_uv_map_get_offsets(const BMesh *bm)
bool BM_loop_uv_share_vert_check(BMLoop *l_a, BMLoop *l_b, const int cd_loop_uv_offset)
bool BM_loop_uv_share_edge_check(BMLoop *l_a, BMLoop *l_b, const int cd_loop_uv_offset)
void BM_face_uv_calc_center_median(const BMFace *f, const int cd_loop_uv_offset, float r_cent[2])
bool BM_face_uv_point_inside_test(const BMFace *f, const float co[2], const int cd_loop_uv_offset)
local_group_size(16, 16) .push_constant(Type b
const Depsgraph * depsgraph
draw_view in_light_buf[] float
void *(* MEM_mallocN)(size_t len, const char *str)
void MEM_freeN(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
ccl_device_inline float4 select(const int4 mask, const float4 a, const float4 b)
float RNA_property_float_get(PointerRNA *ptr, PropertyRNA *prop)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
bool RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop)
void RNA_float_get_array(PointerRNA *ptr, const char *name, float *values)
int RNA_int_get(PointerRNA *ptr, const char *name)
float RNA_float_get(PointerRNA *ptr, const char *name)
void RNA_property_float_set(PointerRNA *ptr, PropertyRNA *prop, float value)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
void RNA_float_set_array(PointerRNA *ptr, const char *name, const float *values)
int RNA_enum_get(PointerRNA *ptr, const char *name)
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)
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)
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 RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_enum_funcs(PropertyRNA *prop, EnumPropertyItemFunc itemfunc)
void RNA_enum_items_add_value(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item, int value)
const EnumPropertyItem rna_enum_mesh_select_mode_uv_items[]
struct BMEditSelection * prev
struct BMLoop * radial_next
bool(* poll)(bContext *C) ATTR_WARN_UNUSED_RESULT
int(* modal)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
std::string(* get_name)(wmOperatorType *ot, PointerRNA *ptr)
int(* invoke)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
int(* exec)(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
void(* cancel)(bContext *C, wmOperator *op)
struct ReportList * reports
static int uv_select_similar_island_exec(bContext *C, wmOperator *op)
void UV_OT_select_all(wmOperatorType *ot)
void uvedit_uv_select_set_with_sticky(const Scene *scene, BMEditMesh *em, BMLoop *l, const bool select, const bool do_history, const BMUVOffsets offsets)
static BMLoop * uvedit_loop_find_other_boundary_loop_with_visible_face(const Scene *scene, BMLoop *l_edge, BMVert *v_pivot, const BMUVOffsets offsets)
void UV_OT_select_edge_ring(wmOperatorType *ot)
static bool uv_circle_select_is_point_inside(const float uv[2], const float offset[2], const float ellipse[2])
void ED_uvedit_selectmode_clean(const Scene *scene, Object *obedit)
UV Select Mode set.
void uvedit_edge_select_enable(const Scene *scene, BMesh *bm, BMLoop *l, const bool do_history, const BMUVOffsets offsets)
static int uv_select_mode_invoke(bContext *C, wmOperator *op, const wmEvent *)
#define SET_SELECTION(value)
void ED_uvedit_selectmode_clean_multi(bContext *C)
static int uv_select_edge_ring_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static void uv_select_tag_update_for_object(Depsgraph *depsgraph, const ToolSettings *ts, Object *obedit)
bool uvedit_face_select_test(const Scene *scene, BMFace *efa, const BMUVOffsets offsets)
void uvedit_edge_select_set(const Scene *scene, BMesh *bm, BMLoop *l, const bool select, const bool do_history, const BMUVOffsets offsets)
Select UV Edge.
static int uv_select_linked_internal(bContext *C, wmOperator *op, const wmEvent *event, bool pick)
bool uvedit_vert_is_edge_select_any_other(const Scene *scene, BMLoop *l, const BMUVOffsets offsets)
static int uv_circle_select_exec(bContext *C, wmOperator *op)
static float get_uv_face_needle(const eUVSelectSimilar type, BMFace *face, int ob_index, const float ob_m3[3][3], const BMUVOffsets offsets)
void uvedit_face_select_set(const Scene *scene, BMesh *bm, BMFace *efa, const bool select, const bool do_history, const BMUVOffsets offsets)
Select UV Face.
static int uv_select_loop_exec(bContext *C, wmOperator *op)
static void bm_loop_tags_clear(BMesh *bm)
void UV_OT_select(wmOperatorType *ot)
void ED_uvedit_active_edge_loop_set(BMesh *bm, BMLoop *l)
void UV_OT_select_split(wmOperatorType *ot)
static int uv_select_overlap(bContext *C, const bool extend)
static bool uv_nearest_between(const BMLoop *l, const float co[2], const int cd_loop_uv_offset)
static void bm_clear_uv_vert_selection(const Scene *scene, BMesh *bm, const BMUVOffsets offsets)
void UV_OT_select_linked(wmOperatorType *ot)
static int uv_select_linked_pick_exec(bContext *C, wmOperator *op)
static int uv_select_edgeloop(Scene *scene, Object *obedit, UvNearestHit *hit, const bool extend)
void uvedit_deselect_flush(const Scene *scene, BMEditMesh *em)
static void uv_select_flush_from_tag_sticky_loc_internal(const Scene *scene, BMEditMesh *em, UvVertMap *vmap, const uint efa_index, BMLoop *l, const bool select, const BMUVOffsets offsets)
static EnumPropertyItem uv_select_similar_type_items[]
static float get_uv_vert_needle(const eUVSelectSimilar type, BMVert *vert, const float ob_m3[3][3], BMLoop *loop, const BMUVOffsets offsets)
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)
@ UV_EDGE_LOOP_BOUNDARY_ALL
@ UV_EDGE_LOOP_BOUNDARY_LOOP
bool uv_find_nearest_face_multi_ex(Scene *scene, const Span< Object * > objects, const float co[2], UvNearestHit *hit, const bool only_in_face)
static int uv_select_mode_exec(bContext *C, wmOperator *op)
BMLoop ** ED_uvedit_selected_edges(const Scene *scene, BMesh *bm, int len_max, int *r_edges_len)
void uvedit_uv_select_shared_vert(const Scene *scene, BMEditMesh *em, BMLoop *l, const bool select, const int sticky_flag, const bool do_history, const BMUVOffsets offsets)
static void uv_select_all_perform(const Scene *scene, Object *obedit, int action)
BLI_INLINE bool overlap_cmp(const void *a_v, const void *b_v)
static int uv_box_select_exec(bContext *C, wmOperator *op)
void uvedit_face_select_shared_vert(const Scene *scene, BMEditMesh *em, BMFace *efa, const bool select, const bool do_history, const BMUVOffsets offsets)
void uvedit_edge_select_shared_vert(const Scene *scene, BMEditMesh *em, BMLoop *l, const bool select, const int sticky_flag, const bool do_history, const BMUVOffsets offsets)
static int uv_select_similar_exec(bContext *C, wmOperator *op)
char ED_uvedit_select_mode_get(const Scene *scene)
static int uv_select_loop_invoke(bContext *C, wmOperator *op, const wmEvent *event)
bool uv_find_nearest_edge(Scene *scene, Object *obedit, const float co[2], const float penalty, UvNearestHit *hit)
static int uv_select_less_exec(bContext *C, wmOperator *)
#define NEIGHBORING_FACE_IS_SEL
bool uvedit_edge_select_test_ex(const ToolSettings *ts, const BMLoop *l, const BMUVOffsets offsets)
void uvedit_edge_select_set_noflush(const Scene *scene, BMLoop *l, const bool select, const int sticky_flag, const BMUVOffsets offsets)
static int uv_select_similar_vert_exec(bContext *C, wmOperator *op)
static int uv_select_overlap_exec(bContext *C, wmOperator *op)
bool uvedit_select_is_any_selected_multi(const Scene *scene, const Span< Object * > objects)
void UV_OT_select_circle(wmOperatorType *ot)
void uvedit_select_flush(const Scene *scene, BMEditMesh *em)
static int uv_select_linked_exec(bContext *C, wmOperator *op)
UvNearestHit uv_nearest_hit_init_max_default()
bool uv_find_nearest_vert(Scene *scene, Object *obedit, float const co[2], const float penalty_dist, UvNearestHit *hit)
static int uv_select_all_exec(bContext *C, wmOperator *op)
void UV_OT_select_mode(wmOperatorType *ot)
UvNearestHit uv_nearest_hit_init_max(const View2D *v2d)
bool uvedit_face_visible_test_ex(const ToolSettings *ts, BMFace *efa)
void UV_OT_select_similar(wmOperatorType *ot)
static void uv_select_flush_from_tag_loop(const Scene *scene, Object *obedit, const bool select)
static bool uv_mouse_select(bContext *C, const float co[2], const SelectPick_Params *params)
void UV_OT_select_linked_pick(wmOperatorType *ot)
void UV_OT_select_more(wmOperatorType *ot)
BMLoop * uv_find_nearest_loop_from_edge(Scene *scene, Object *obedit, BMEdge *e, const float co[2])
bool uvedit_uv_select_test(const Scene *scene, BMLoop *l, const BMUVOffsets offsets)
static void uv_select_edgeloop_single_side_tag(const Scene *scene, BMEditMesh *em, BMLoop *l_init, const BMUVOffsets offsets, enum eUVEdgeLoopBoundaryMode boundary_mode, int r_count_by_select[2])
void UV_OT_select_pinned(wmOperatorType *ot)
static void uv_select_flush_from_tag_face(const Scene *scene, Object *obedit, const bool select)
void ED_uvedit_selectmode_flush(const Scene *scene, BMEditMesh *em)
UV Select Mode Flush.
bool uv_find_nearest_face_multi(Scene *scene, const Span< Object * > objects, const float co[2], UvNearestHit *hit)
static int uv_select_linked_pick_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static int uv_select_edgering(Scene *scene, Object *obedit, UvNearestHit *hit, const bool extend)
static const EnumPropertyItem * uv_select_similar_type_itemf(bContext *C, PointerRNA *, PropertyRNA *, bool *r_free)
BMLoop * ED_uvedit_active_edge_loop_get(BMesh *bm)
static bool do_lasso_select_mesh_uv(bContext *C, const Span< int2 > mcoords, const eSelectOp sel_op)
void UV_OT_select_loop(wmOperatorType *ot)
static void uv_select_all_perform_multi_ex(const Scene *scene, Span< Object * > objects, int action, const Object *ob_exclude)
BLI_INLINE uint overlap_hash(const void *overlap_v)
bool uvedit_uv_select_test_ex(const ToolSettings *ts, const BMLoop *l, const BMUVOffsets offsets)
static int uv_select_pinned_exec(bContext *C, wmOperator *op)
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 uvedit_uv_select_disable(const Scene *scene, BMesh *bm, BMLoop *l, const BMUVOffsets offsets)
bool uvedit_face_visible_test(const Scene *scene, BMFace *efa)
bool uvedit_vert_is_face_select_any_other(const Scene *scene, BMLoop *l, const BMUVOffsets offsets)
bool uv_find_nearest_face(Scene *scene, Object *obedit, const float co[2], UvNearestHit *hit)
bool uvedit_vert_is_all_other_faces_selected(const Scene *scene, BMLoop *l, const BMUVOffsets offsets)
void uvedit_face_select_set_with_sticky(const Scene *scene, BMEditMesh *em, BMFace *efa, const bool select, const bool do_history, const BMUVOffsets offsets)
bool uvedit_face_select_test_ex(const ToolSettings *ts, BMFace *efa, const BMUVOffsets offsets)
static void uv_select_flush_from_loop_edge_flag(const Scene *scene, BMEditMesh *em)
static int uv_select_similar_edge_exec(bContext *C, wmOperator *op)
static int uv_select_more_exec(bContext *C, wmOperator *)
bool uv_find_nearest_vert_multi(Scene *scene, const Span< Object * > objects, float const co[2], const float penalty_dist, UvNearestHit *hit)
static int uv_select_similar_face_exec(bContext *C, wmOperator *op)
static BMLoop * bm_select_edgeloop_single_side_next(const Scene *scene, BMLoop *l_step, BMVert *v_from, const BMUVOffsets offsets)
static bool overlap_tri_tri_uv_test(const float t1[3][2], const float t2[3][2], const float endpoint_bias)
static void uvedit_vertex_select_tagged(BMEditMesh *em, Scene *scene, bool select, const BMUVOffsets offsets)
void uvedit_edge_select_set_with_sticky(const Scene *scene, BMEditMesh *em, BMLoop *l, const bool select, const bool do_history, const BMUVOffsets offsets)
#define CURR_FACE_IS_UNSEL
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])
static int uv_select_edge_ring_exec(bContext *C, wmOperator *op)
bool uv_find_nearest_edge_multi(Scene *scene, const Span< Object * > objects, const float co[2], const float penalty, UvNearestHit *hit)
static int uv_select_split_exec(bContext *C, wmOperator *op)
static int uv_select_more_less(bContext *C, const bool select)
static int uv_select_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static BMLoop * uvedit_loop_find_other_radial_loop_with_visible_face(const Scene *scene, BMLoop *l_src, const BMUVOffsets offsets)
static bool uv_mouse_select_multi(bContext *C, const Span< Object * > objects, const float co[2], const SelectPick_Params *params)
static void uv_select_all(const Scene *scene, BMEditMesh *em, bool select_all)
BMLoop * ED_uvedit_active_vert_loop_get(BMesh *bm)
static int uv_mouse_select_loop_generic(bContext *C, const float co[2], const bool extend, enum eUVLoopGenericType loop_type)
static int uv_mouse_select_loop_generic_multi(bContext *C, const Span< Object * > objects, const float co[2], const bool extend, enum eUVLoopGenericType loop_type)
BMLoop * uv_find_nearest_loop_from_vert(Scene *scene, Object *obedit, BMVert *v, const float co[2])
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])
bool uv_find_nearest_face_ex(Scene *scene, Object *obedit, const float co[2], UvNearestHit *hit, const bool only_in_face)
static int uv_select_exec(bContext *C, wmOperator *op)
void UV_OT_select_overlap(wmOperatorType *ot)
bool uvedit_edge_select_test(const Scene *scene, BMLoop *l, const BMUVOffsets offsets)
void UV_OT_select_lasso(wmOperatorType *ot)
static bool uv_island_selected(const Scene *scene, FaceIsland *island)
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])
static EnumPropertyItem prop_similar_compare_types[]
static int uv_select_faceloop(Scene *scene, Object *obedit, UvNearestHit *hit, const bool extend)
static void uv_isolate_selected_islands(const Scene *scene, BMEditMesh *em, const BMUVOffsets offsets)
void uvedit_face_select_disable(const Scene *scene, BMesh *bm, BMFace *efa, const BMUVOffsets offsets)
void uvedit_edge_select_disable(const Scene *scene, BMesh *bm, BMLoop *l, const BMUVOffsets offsets)
UvNearestHit uv_nearest_hit_init_dist_px(const View2D *v2d, const float dist_px)
void uvedit_uv_select_set(const Scene *scene, BMesh *bm, BMLoop *l, const bool select, const bool do_history, const BMUVOffsets offsets)
Select UV Vertex.
static float get_uv_island_needle(const eUVSelectSimilar type, const FaceIsland *island, const float ob_m3[3][3], const BMUVOffsets offsets)
BMFace ** ED_uvedit_selected_faces(const Scene *scene, BMesh *bm, int len_max, int *r_faces_len)
void uvedit_uv_select_enable(const Scene *scene, BMesh *bm, BMLoop *l, const bool do_history, const BMUVOffsets offsets)
const float * uvedit_first_selected_uv_from_vertex(Scene *scene, BMVert *eve, const BMUVOffsets offsets)
static BMLoop * bm_select_edgeloop_double_side_next(const Scene *scene, BMLoop *l_step, BMVert *v_from, const BMUVOffsets offsets)
void uvedit_face_select_enable(const Scene *scene, BMesh *bm, BMFace *efa, const bool do_history, const BMUVOffsets offsets)
static int uv_lasso_select_exec(bContext *C, wmOperator *op)
static void uv_select_invert(const Scene *scene, BMEditMesh *em)
bool ED_uvedit_nearest_uv_multi(const View2D *v2d, const Scene *scene, const Span< Object * > objects, const float mval_fl[2], const bool ignore_selected, float *dist_sq, float r_uv[2])
bool uvedit_select_is_any_selected(const Scene *scene, Object *obedit)
void ED_uvedit_select_sync_flush(const ToolSettings *ts, BMEditMesh *em, const bool select)
static void uv_select_all_perform_multi(const Scene *scene, Span< Object * > objects, int action)
void UV_OT_select_less(wmOperatorType *ot)
BMLoop ** ED_uvedit_selected_verts(const Scene *scene, BMesh *bm, int len_max, int *r_verts_len)
static void uv_select_edgeloop_double_side_tag(const Scene *scene, BMEditMesh *em, BMLoop *l_init_pair[2], const BMUVOffsets offsets)
void ED_uvedit_active_vert_loop_set(BMesh *bm, BMLoop *l)
void UV_OT_select_box(wmOperatorType *ot)
static void uv_select_linked_multi(Scene *scene, const Span< Object * > objects, UvNearestHit *hit, const bool extend, bool deselect, const bool toggle, const bool select_faces)
void WM_main_add_notifier(uint type, void *reference)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
bool WM_gesture_is_modal_first(const wmGesture *gesture)
void WM_gesture_box_cancel(bContext *C, wmOperator *op)
int WM_gesture_box_invoke(bContext *C, wmOperator *op, const wmEvent *event)
int WM_gesture_circle_invoke(bContext *C, wmOperator *op, const wmEvent *event)
Array< int2 > WM_gesture_lasso_path_to_array(bContext *, wmOperator *op)
void WM_gesture_circle_cancel(bContext *C, wmOperator *op)
int WM_gesture_box_modal(bContext *C, wmOperator *op, const wmEvent *event)
int WM_gesture_circle_modal(bContext *C, wmOperator *op, const wmEvent *event)
int WM_gesture_lasso_modal(bContext *C, wmOperator *op, const wmEvent *event)
void WM_gesture_lasso_cancel(bContext *C, wmOperator *op)
int WM_gesture_lasso_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void WM_operator_properties_gesture_box(wmOperatorType *ot)
void WM_operator_properties_select_operation_simple(wmOperatorType *ot)
void WM_operator_properties_border_to_rctf(wmOperator *op, rctf *r_rect)
void WM_operator_properties_gesture_lasso(wmOperatorType *ot)
void WM_operator_properties_gesture_circle(wmOperatorType *ot)
void WM_operator_properties_select_all(wmOperatorType *ot)
void WM_operator_properties_mouse_select(wmOperatorType *ot)
int WM_operator_flag_only_pass_through_on_press(int retval, const wmEvent *event)
int WM_menu_invoke(bContext *C, wmOperator *op, const wmEvent *)
static bool do_history(const char *filepath, ReportList *reports)