118 if (ese && ese->
prev) {
140 if (ese && ese->
prev) {
183 return uv_selectmode;
255 const BMLoop *l_iter = l_first;
260 }
while ((l_iter = l_iter->
next) != l_first);
456 const int sticky_flag,
489 const int sticky_flag,
694 const int sticky_flag,
701 e_first = e_iter =
l->e;
703 BMLoop *l_radial_iter = e_iter->
l;
704 if (!l_radial_iter) {
708 if (l_radial_iter->
v ==
l->v) {
710 bool do_select =
false;
723 }
while ((l_radial_iter = l_radial_iter->
radial_next) != e_iter->
l);
783 BMLoop *l_other =
nullptr;
785 if (l_iter != l_src) {
791 if (l_other ==
nullptr) {
814 l_step = (l_step->
v == v_pivot) ? l_step->
prev : l_step->
next;
815 BMLoop *l_step_last =
nullptr;
818 l_step_last = l_step;
821 l_step = (l_step->
v == v_pivot) ? l_step->
prev : l_step->
next;
823 }
while (l_step !=
nullptr);
825 if (l_step_last !=
nullptr) {
874 float *luv, *luv_next;
904 if (dist_test_sq < hit->dist_sq) {
925 for (
Object *obedit : objects) {
959 if (dist_test_sq < hit->dist_sq) {
985 const bool only_in_face)
988 for (
Object *obedit : objects) {
1050 dist_test_sq =
square_f(
sqrtf(dist_test_sq) + penalty_dist);
1053 if (dist_test_sq <= hit->dist_sq) {
1054 if (dist_test_sq == hit->
dist_sq) {
1076 const float penalty_dist,
1080 for (
Object *obedit : objects) {
1091 const float scale[2],
1092 const bool ignore_selected,
1099 const float *uv_best =
nullptr;
1100 float dist_best = *dist_sq;
1107 BMLoop *l_iter, *l_first;
1118 if (dist_best > dist_test) {
1119 dist_best = dist_test;
1122 }
while ((l_iter = l_iter->
next) != l_first);
1125 if (uv_best !=
nullptr) {
1127 *dist_sq = dist_best;
1136 const float mval_fl[2],
1137 const bool ignore_selected,
1143 float scale[2], offset[2];
1150 for (
Object *obedit : objects) {
1151 if (
uvedit_nearest_uv(scene, obedit, co, scale, ignore_selected, dist_sq, r_uv)) {
1175 BMLoop *l_found =
nullptr;
1185 if (dist_test_sq < dist_best_sq) {
1186 dist_best_sq = dist_test_sq;
1200 BMLoop *l_found =
nullptr;
1210 if (dist_test_sq < dist_best_sq) {
1211 dist_best_sq = dist_test_sq;
1241 BMLoop *l_radial_iter = e_iter->
l;
1242 if (!l_radial_iter) {
1251 BMLoop *l_other = (l_radial_iter->
v !=
l->v) ? l_radial_iter->
next : l_radial_iter;
1257 }
while ((l_radial_iter = l_radial_iter->
radial_next) != e_iter->
l);
1268 BMLoop *l_radial_iter =
l->radial_next;
1269 if (l_radial_iter ==
l) {
1281 }
while ((l_radial_iter = l_radial_iter->
radial_next) !=
l);
1457 if (l_step->
f->
len == 4) {
1459 BMLoop *l_step_over = (v_from == l_step->
v) ? l_step->
next : l_step->
prev;
1461 scene, l_step_over, offsets);
1463 return (l_step_over->
v == v_from_next) ? l_step_over->
prev : l_step_over->
next;
1476 scene, l_step, v_from_next, offsets);
1503 for (
int side = 0; side < 2; side++) {
1504 BMLoop *l_step_pair[2] = {l_init_pair[0], l_init_pair[1]};
1505 BMVert *v_from = side ? l_step_pair[0]->
e->
v1 : l_step_pair[0]->
e->
v2;
1509 while ((l_step_pair[0] !=
nullptr) && (l_step_pair[1] !=
nullptr)) {
1528 scene, l_step_pair[
i], v_from, offsets);
1536 v_from = v_from_next;
1552 int r_count_by_select[2])
1554 if (r_count_by_select) {
1555 r_count_by_select[0] = r_count_by_select[1] = 0;
1560 for (
int side = 0; side < 2; side++) {
1565 while (l_step !=
nullptr) {
1575 if (r_count_by_select !=
nullptr) {
1578 if (r_count_by_select[0] && r_count_by_select[1]) {
1579 r_count_by_select[0] = r_count_by_select[1] = -1;
1587 BMFace *f_step_prev = l_step->
f;
1596 if (f_step_prev == l_step->
f) {
1600 v_from = v_from_next;
1626 BMLoop *l_init_pair[2] = {
1636 if (l_init_pair[1] ==
nullptr) {
1637 int count_by_select[2];
1640 scene,
bm, l_init_pair[0], offsets, boundary_mode, count_by_select);
1641 if (count_by_select[!
select] == 0) {
1646 scene,
bm, l_init_pair[0], offsets, boundary_mode, count_by_select);
1647 if (count_by_select[!
select] == 0) {
1653 if (l_init_pair[1] ==
nullptr) {
1727 for (
int side = 0; side < 2; side++) {
1728 BMLoop *l_step = l_pair[side];
1737 if (l_step->
f->
len == 4) {
1740 scene, l_step_opposite, offsets);
1755 return (
select) ? 1 : -1;
1802 for (
int side = 0; side < 2; side++) {
1803 BMLoop *l_step = l_pair[side];
1811 if (use_face_select) {
1817 else if (use_vertex_select) {
1827 if (l_step->
f->
len == 4) {
1830 scene, l_step_opposite, offsets);
1831 if (l_step ==
nullptr) {
1833 l_step = l_step_opposite;
1857 return (
select) ? 1 : -1;
1872 const bool select_faces)
1877 for (
const int ob_index : objects.
index_range()) {
1878 if (hit && ob_index != 0) {
1881 Object *obedit = hit ? hit->
ob : objects[ob_index];
1887 int i, stacksize = 0, *stack;
1892 if (uv_sync_select) {
1909 if (vmap ==
nullptr) {
1916 if (hit ==
nullptr) {
1922 stack[stacksize] = a;
1930 bool add_to_stack =
true;
1931 if (uv_sync_select) {
1953 add_to_stack =
false;
1961 stack[stacksize] = a;
1974 if (efa == hit->
efa) {
1975 stack[stacksize] = a;
1983 while (stacksize > 0) {
1986 a = stack[stacksize];
1997 for (iterv = vlist; iterv; iterv = iterv->
next) {
2006 for (iterv = startv; iterv; iterv = iterv->
next) {
2007 if ((startv != iterv) && (iterv->
separate)) {
2020 if ((toggle ==
true) && (extend ==
false) && (deselect ==
false)) {
2022 bool found_selected =
false;
2029 found_selected =
true;
2035 found_selected =
true;
2040 if (found_selected) {
2048#define SET_SELECTION(value) \
2049 if (select_faces) { \
2050 BM_face_select_set(bm, efa, value); \
2053 uvedit_face_select_set(scene, bm, efa, value, offsets); \
2059 if (!extend && !deselect && !toggle) {
2079 if (uv_sync_select) {
2084 if (!select_faces) {
2130 scene, view_layer,
nullptr);
2134 for (
Object *obedit : objects) {
2137 bool changed =
false;
2161 if (is_uv_face_selectmode) {
2171#define NEIGHBORING_FACE_IS_SEL 1
2172#define CURR_FACE_IS_UNSEL 2
2197#undef NEIGHBORING_FACE_IS_SEL
2198#undef CURR_FACE_IS_UNSEL
2241 if (is_uv_face_selectmode) {
2272 ot->name =
"Select More";
2273 ot->description =
"Select more UV vertices connected to initial selection";
2274 ot->idname =
"UV_OT_select_more";
2290 ot->name =
"Select Less";
2291 ot->description =
"Deselect UV vertices at the boundary of each selection region";
2292 ot->idname =
"UV_OT_select_less";
2314 return (
bm->totvertsel ||
bm->totedgesel ||
bm->totfacesel);
2335 for (
Object *obedit : objects) {
2460 const Object *ob_exclude)
2466 for (
Object *obedit : objects) {
2467 if (ob_exclude && (obedit == ob_exclude)) {
2489 scene, view_layer,
nullptr);
2493 for (
Object *obedit : objects) {
2503 ot->name =
"(De)select All";
2504 ot->description =
"Change selection of all UV vertices";
2505 ot->idname =
"UV_OT_select_all";
2532 int selectmode, sticky;
2533 bool found_item =
false;
2539 const float penalty_dist = 3.0f *
U.pixelsize;
2609 bool found = found_item;
2610 bool changed =
false;
2612 bool is_selected =
false;
2633 if (hit.
l !=
nullptr) {
2643 if ((found &&
params.select_passthrough) && is_selected) {
2646 else if (found ||
params.deselect_all) {
2649 for (
Object *obedit : objects) {
2680 bool select_value =
false;
2683 select_value =
true;
2687 select_value =
false;
2691 select_value = !is_selected;
2696 select_value =
true;
2746 flush = select_value ? 1 : -1;
2765 if (changed && found) {
2771 return changed || found;
2778 scene, view_layer,
nullptr);
2815 ot->name =
"Select";
2816 ot->description =
"Select UV vertices";
2817 ot->idname =
"UV_OT_select";
2839 "Mouse location in normalized coordinates, 0.0 to 1.0 is within the image bounds",
2868 bool found_item =
false;
2905 else if (flush == -1) {
2913 for (
Object *ob : objects) {
2927 scene, view_layer,
nullptr);
2964 ot->name =
"Loop Select";
2965 ot->description =
"Select a loop of connected UV vertices";
2966 ot->idname =
"UV_OT_select_loop";
2980 "Extend selection rather than clearing the existing selection");
2990 "Mouse location in normalized coordinates, 0.0 to 1.0 is within the image bounds",
3028 ot->name =
"Edge Ring Select";
3029 ot->description =
"Select an edge ring of connected UV vertices";
3030 ot->idname =
"UV_OT_select_edge_ring";
3044 "Extend selection rather than clearing the existing selection");
3054 "Mouse location in normalized coordinates, 0.0 to 1.0 is within the image bounds",
3076 bool deselect =
false;
3088 scene, view_layer,
nullptr);
3108 if (!extend && !deselect) {
3113 scene, objects, pick ? &hit :
nullptr, extend, deselect,
false, select_faces);
3120 for (
Object *obedit : objects) {
3138 ot->name =
"Select Linked";
3139 ot->description =
"Select all UV vertices linked to the active UV map";
3140 ot->idname =
"UV_OT_select_linked";
3171 ot->name =
"Select Linked Pick";
3172 ot->description =
"Select all UV vertices linked under the mouse";
3173 ot->idname =
"UV_OT_select_linked_pick";
3189 "Extend selection rather than clearing the existing selection");
3195 "Deselect linked UV vertices rather than selecting them");
3205 "Mouse location in normalized coordinates, 0.0 to 1.0 is within the image bounds",
3239 bool changed_multi =
false;
3242 scene, view_layer,
nullptr);
3244 for (
Object *obedit : objects) {
3247 bool changed =
false;
3253 bool is_sel =
false;
3254 bool is_unsel =
false;
3275 if (is_sel && is_unsel) {
3280 if (is_sel && is_unsel) {
3291 changed_multi =
true;
3303 ot->name =
"Select Split";
3304 ot->description =
"Select only entirely selected faces";
3305 ot->idname =
"UV_OT_select_split";
3348 const BMEdge *e_iter, *e_first;
3349 e_iter = e_first =
v->e;
3351 if (e_iter->
l ==
nullptr) {
3355 BMLoop *l_iter = l_first;
3357 if (!(l_iter->
v ==
v && l_iter !=
l)) {
3366 }
while ((l_iter = l_iter->
radial_next) != l_first);
3402 bool use_sticky =
true;
3541 bool use_sticky =
true;
3625 bool changed_multi =
false;
3628 scene, view_layer,
nullptr);
3630 if (use_pre_deselect) {
3635 for (
Object *obedit : objects) {
3638 bool changed =
false;
3655 if (use_face_center && !pinned) {
3677 else if (use_edge && !pinned) {
3678 bool do_second_pass =
true;
3692 do_second_pass =
false;
3700 if (do_second_pass) {
3730 bool has_selected =
false;
3739 has_selected =
true;
3750 if (has_selected && use_select_linked) {
3763 if (changed || use_pre_deselect) {
3764 changed_multi =
true;
3781 ot->name =
"Box Select";
3782 ot->description =
"Select UV vertices using box selection";
3783 ot->idname =
"UV_OT_select_box";
3796 RNA_def_boolean(
ot->srna,
"pinned",
false,
"Pinned",
"Border select pinned UVs only");
3809 const float offset[2],
3810 const float ellipse[2])
3813 const float co[2] = {
3814 (uv[0] - offset[0]) * ellipse[0],
3815 (uv[1] - offset[1]) * ellipse[1],
3821 const float uv_b[2],
3822 const float offset[2],
3823 const float ellipse[2])
3826 const float co_a[2] = {
3827 (uv_a[0] - offset[0]) * ellipse[0],
3828 (uv_a[1] - offset[1]) * ellipse[1],
3830 const float co_b[2] = {
3831 (uv_b[0] - offset[0]) * ellipse[0],
3832 (uv_b[1] - offset[1]) * ellipse[1],
3834 const float co_zero[2] = {0.0f, 0.0f};
3850 int x,
y, radius, width, height;
3852 float offset[2], ellipse[2];
3873 ellipse[0] = width * zoomx / radius;
3874 ellipse[1] = height * zoomy / radius;
3878 bool changed_multi =
false;
3881 scene, view_layer,
nullptr);
3889 if (use_pre_deselect) {
3893 for (
Object *obedit : objects) {
3896 bool changed =
false;
3907 if (use_face_center) {
3926 else if (use_edge) {
3953 bool has_selected =
false;
3961 has_selected =
true;
3965 if (has_selected && use_select_linked) {
3978 if (changed || use_pre_deselect) {
3979 changed_multi =
true;
3996 ot->name =
"Circle Select";
3997 ot->description =
"Select UV vertices using circle selection";
3998 ot->idname =
"UV_OT_select_circle";
4023 const rcti *clip_rect,
4025 const float co_test[2])
4029 ®ion->
v2d, co_test[0], co_test[1], &co_screen[0], &co_screen[1]) &&
4039 const rcti *clip_rect,
4041 const float co_test_a[2],
4042 const float co_test_b[2])
4044 int co_screen_a[2], co_screen_b[2];
4046 ®ion->
v2d, co_test_a, co_test_b, co_screen_a, co_screen_b) &&
4079 bool changed_multi =
false;
4085 scene, view_layer,
nullptr);
4087 if (use_pre_deselect) {
4091 for (
Object *obedit : objects) {
4093 bool changed =
false;
4105 if (use_face_center) {
4124 else if (use_edge) {
4125 bool do_second_pass =
true;
4140 do_second_pass =
false;
4149 if (do_second_pass) {
4177 bool has_selected =
false;
4185 has_selected =
true;
4189 if (has_selected && use_select_linked) {
4202 if (changed || use_pre_deselect) {
4203 changed_multi =
true;
4214 return changed_multi;
4232 ot->name =
"Lasso Select UV";
4233 ot->description =
"Select UVs using lasso selection";
4234 ot->idname =
"UV_OT_select_lasso";
4277 scene, view_layer,
nullptr);
4279 for (
Object *obedit : objects) {
4287 bool changed =
false;
4324 ot->name =
"Selected Pinned";
4325 ot->description =
"Select all pinned UV vertices";
4326 ot->idname =
"UV_OT_select_pinned";
4375 const float t2[3][2],
4376 const float endpoint_bias)
4420 scene, view_layer,
nullptr);
4423 uint uv_tri_len = 0;
4424 for (
Object *obedit : objects) {
4440 uv_tri_len += efa->
len - 2;
4450 int face_len_alloc = 3;
4451 float(*uv_verts)[2] =
static_cast<float(*)[2]
>(
4452 MEM_mallocN(
sizeof(*uv_verts) * face_len_alloc,
"UvOverlapCoords"));
4459 for (
const int ob_index : objects.
index_range()) {
4460 Object *obedit = objects[ob_index];
4476 const uint face_len = efa->
len;
4477 const uint tri_len = face_len - 2;
4479 if (face_len_alloc < face_len) {
4482 uv_verts =
static_cast<float(*)[2]
>(
4483 MEM_mallocN(
sizeof(*uv_verts) * face_len,
"UvOverlapCoords"));
4486 face_len_alloc = face_len;
4497 const int coords_sign = 0;
4504 for (
int t = 0; t < tri_len; t++) {
4505 overlap_data[data_index].
ob_index = ob_index;
4506 overlap_data[data_index].
face_index = face_index;
4509 const float tri[3][3] = {
4515 copy_v2_v2(overlap_data[data_index].tri[0], tri[0]);
4516 copy_v2_v2(overlap_data[data_index].tri[1], tri[1]);
4517 copy_v2_v2(overlap_data[data_index].tri[2], tri[2]);
4536 uint tree_overlap_len;
4539 if (overlap !=
nullptr) {
4542 for (
int i = 0;
i < tree_overlap_len;
i++) {
4544 if (overlap[
i].indexA == overlap[
i].indexB) {
4584 const float endpoint_bias = -1e-4f;
4595 for (
Object *
object : objects) {
4615 ot->name =
"Select Overlap";
4616 ot->description =
"Select all UV faces which overlap each other";
4617 ot->idname =
"UV_OT_select_overlap";
4629 "Extend selection rather than clearing the existing selection");
4638 const float ob_m3[3][3],
4683 const float ob_m3[3][3],
4743 const float ob_m3[3][3],
4781 const float ob_m3[3][3],
4819 scene, view_layer,
nullptr);
4821 int max_verts_selected_all = 0;
4822 for (
Object *ob : objects) {
4830 max_verts_selected_all += face->
len;
4836 KDTree_1d *tree_1d = BLI_kdtree_1d_new(max_verts_selected_all);
4838 for (
Object *ob : objects) {
4840 if (
bm->totvertsel == 0) {
4846 copy_m3_m4(ob_m3, ob->object_to_world().ptr());
4861 BLI_kdtree_1d_insert(tree_1d, tree_index++, &needle);
4866 if (tree_1d !=
nullptr) {
4867 BLI_kdtree_1d_deduplicate(tree_1d);
4868 BLI_kdtree_1d_balance(tree_1d);
4871 for (
Object *ob : objects) {
4873 if (
bm->totvertsel == 0) {
4880 bool changed =
false;
4884 copy_m3_m4(ob_m3, ob->object_to_world().ptr());
4917 BLI_kdtree_1d_free(tree_1d);
4933 scene, view_layer,
nullptr);
4935 int max_edges_selected_all = 0;
4936 for (
Object *ob : objects) {
4944 max_edges_selected_all += face->
len;
4950 KDTree_1d *tree_1d = BLI_kdtree_1d_new(max_edges_selected_all);
4952 for (
Object *ob : objects) {
4954 if (
bm->totvertsel == 0) {
4960 copy_m3_m4(ob_m3, ob->object_to_world().ptr());
4977 BLI_kdtree_1d_insert(tree_1d, tree_index++, &needle);
4983 if (tree_1d !=
nullptr) {
4984 BLI_kdtree_1d_deduplicate(tree_1d);
4985 BLI_kdtree_1d_balance(tree_1d);
4988 for (
Object *ob : objects) {
4990 if (
bm->totvertsel == 0) {
4997 bool changed =
false;
5000 copy_m3_m4(ob_m3, ob->object_to_world().ptr());
5034 BLI_kdtree_1d_free(tree_1d);
5050 scene, view_layer,
nullptr);
5052 int max_faces_selected_all = 0;
5053 for (
Object *ob : objects) {
5055 max_faces_selected_all +=
bm->totfacesel;
5060 KDTree_1d *tree_1d = BLI_kdtree_1d_new(max_faces_selected_all);
5062 for (
const int ob_index : objects.
index_range()) {
5063 Object *ob = objects[ob_index];
5065 if (
bm->totvertsel == 0) {
5070 copy_m3_m4(ob_m3, ob->object_to_world().ptr());
5086 BLI_kdtree_1d_insert(tree_1d, tree_index++, &needle);
5091 if (tree_1d !=
nullptr) {
5092 BLI_kdtree_1d_deduplicate(tree_1d);
5093 BLI_kdtree_1d_balance(tree_1d);
5096 for (
const int ob_index : objects.
index_range()) {
5097 Object *ob = objects[ob_index];
5099 if (
bm->totvertsel == 0) {
5106 bool changed =
false;
5110 copy_m3_m4(ob_m3, ob->object_to_world().ptr());
5141 BLI_kdtree_1d_free(tree_1d);
5163 scene, view_layer,
nullptr);
5166 int island_list_len = 0;
5170 for (
const int ob_index : objects.
index_range()) {
5171 Object *obedit = objects[ob_index];
5174 float aspect_y = 1.0f;
5176 scene,
bm, &island_list_ptr[ob_index], face_selected,
false,
false, aspect_y, offsets);
5180 MEM_callocN(
sizeof(*island_array) * island_list_len, __func__));
5183 KDTree_1d *tree_1d = BLI_kdtree_1d_new(island_list_len);
5185 for (
const int ob_index : objects.
index_range()) {
5186 Object *obedit = objects[ob_index];
5188 copy_m3_m4(ob_m3, obedit->object_to_world().ptr());
5192 island_array[index] = island;
5198 BLI_kdtree_1d_insert(tree_1d, tree_index++, &needle);
5203 if (tree_1d !=
nullptr) {
5204 BLI_kdtree_1d_deduplicate(tree_1d);
5205 BLI_kdtree_1d_balance(tree_1d);
5208 int tot_island_index = 0;
5209 for (
const int ob_index : objects.
index_range()) {
5210 Object *obedit = objects[ob_index];
5213 copy_m3_m4(ob_m3, obedit->object_to_world().ptr());
5215 bool changed =
false;
5218 island_array[tot_island_index++] = island;
5227 for (
int j = 0; j < island->faces_len; j++) {
5244 BLI_assert(tot_island_index == island_list_len);
5245 for (
int i = 0;
i < island_list_len;
i++) {
5252 BLI_kdtree_1d_free(tree_1d);
5294 {
UV_SSIM_FACE,
"FACE", 0,
"Amount of Faces in Island",
""},
5347 ot->name =
"Select Similar";
5348 ot->description =
"Select similar UVs by property types";
5349 ot->idname =
"UV_OT_select_similar";
5365 RNA_def_float(
ot->srna,
"threshold", 0.0f, 0.0f, 1.0f,
"Threshold",
"", 0.0f, 1.0f);
5390 faces[faces_len++] = f;
5391 if (faces_len == len_max) {
5399 *r_faces_len = faces_len;
5400 if (faces_len != len_max) {
5436 edges[edges_len++] = l_iter;
5437 if (edges_len == len_max) {
5448 }
while ((l_radial_iter = l_radial_iter->
radial_next) != l_iter);
5457 *r_edges_len = edges_len;
5458 if (edges_len != len_max) {
5495 verts[verts_len++] = l_iter;
5496 if (verts_len == len_max) {
5515 *r_verts_len = verts_len;
5516 if (verts_len != len_max) {
5539 if (elementmap ==
nullptr) {
5560 is_island_not_selected[
element->island] =
true;
5663 scene, view_layer,
nullptr);
5664 for (
Object *obedit : objects) {
5687 scene, view_layer,
nullptr);
5688 for (
Object *obedit : objects) {
5739 ot->name =
"UV Select Mode";
5740 ot->description =
"Change UV selection mode";
5741 ot->idname =
"UV_OT_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
#define BLI_MEMARENA_STD_BUFSIZE
MemArena * BLI_memarena_new(size_t bufsize, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL ATTR_NONNULL(2) ATTR_MALLOC
void BLI_memarena_free(MemArena *ma) ATTR_NONNULL(1)
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)
T * DEG_get_evaluated(const Depsgraph *depsgraph, T *id)
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_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 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)
SelectPick_Params ED_select_pick_params_from_operator(PointerRNA *ptr) ATTR_NONNULL(1)
bool ED_select_similar_compare_float_tree(const KDTree_1d *tree, float length, float thresh, eSimilarCmp compare)
std::string ED_select_pick_get_name(wmOperatorType *ot, PointerRNA *ptr)
bool uvedit_face_select_test(const Scene *scene, const BMFace *efa, const BMUVOffsets &offsets)
bool uvedit_face_select_test_ex(const ToolSettings *ts, const BMFace *efa, const BMUVOffsets &offsets)
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, const BMUVOffsets &offsets)
bool uvedit_face_visible_test_ex(const ToolSettings *ts, const BMFace *efa)
bool uvedit_edge_select_test_ex(const ToolSettings *ts, const BMLoop *l, const BMUVOffsets &offsets)
Read Guarded memory(de)allocation.
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_attr_edge_select_ensure(BMesh *bm, const StringRef uv_map_name)
bool BM_uv_map_attr_pin_exists(const BMesh *bm, const StringRef uv_map_name)
void BM_uv_map_attr_pin_ensure(BMesh *bm, const StringRef uv_map_name)
void BM_uv_map_attr_vert_select_ensure(BMesh *bm, const StringRef uv_map_name)
#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)
void BM_select_history_clear(BMesh *bm)
void BM_mesh_select_mode_flush(BMesh *bm)
void BM_face_select_set(BMesh *bm, BMFace *f, const bool select)
Select Face.
void BM_mesh_select_flush(BMesh *bm)
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_deselect_flush(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)
ATTR_WARN_UNUSED_RESULT const void * element
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_offsets_get(const BMesh *bm)
bool BM_loop_uv_share_edge_check(const BMLoop *l_a, const BMLoop *l_b, const int cd_loop_uv_offset)
bool BM_loop_uv_share_vert_check(const BMLoop *l_a, const 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)
BPy_StructRNA * depsgraph
constexpr IndexRange index_range() const
IndexRange index_range() const
static const EnumPropertyItem prop_similar_compare_types[]
#define MEM_reallocN(vmemh, len)
void * MEM_mallocN(size_t len, const char *str)
void * MEM_calloc_arrayN(size_t len, size_t size, const char *str)
void * MEM_callocN(size_t len, const char *str)
void * MEM_malloc_arrayN(size_t len, size_t size, const char *str)
void MEM_freeN(void *vmemh)
VecBase< int32_t, 2 > int2
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
struct ToolSettings * toolsettings
struct ReportList * reports
static float get_uv_island_needle(const eUVSelectSimilar type, const FaceIsland *island, const float ob_m3[3][3], const BMUVOffsets &offsets)
static bool uv_mouse_select(bContext *C, const float co[2], const SelectPick_Params ¶ms)
void UV_OT_select_all(wmOperatorType *ot)
bool uvedit_face_select_test(const Scene *scene, const BMFace *efa, const BMUVOffsets &offsets)
void UV_OT_select_edge_ring(wmOperatorType *ot)
bool uvedit_edge_is_face_select_any_other(const ToolSettings *ts, 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])
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)
void ED_uvedit_selectmode_clean(const Scene *scene, Object *obedit)
UV Select Mode set.
#define SET_SELECTION(value)
void ED_uvedit_selectmode_clean_multi(bContext *C)
static wmOperatorStatus uv_select_overlap_exec(bContext *C, wmOperator *op)
void uvedit_uv_select_set_with_sticky(const Scene *scene, BMesh *bm, BMLoop *l, const bool select, const BMUVOffsets &offsets)
const float * uvedit_first_selected_uv_from_vertex(Scene *scene, BMVert *eve, const BMUVOffsets &offsets)
static void uv_select_tag_update_for_object(Depsgraph *depsgraph, const ToolSettings *ts, Object *obedit)
static wmOperatorStatus uv_select_linked_internal(bContext *C, wmOperator *op, const wmEvent *event, bool pick)
void uvedit_face_select_set_with_sticky(const Scene *scene, BMesh *bm, BMFace *efa, const bool select, const BMUVOffsets &offsets)
void uvedit_uv_select_shared_vert(const Scene *scene, BMesh *bm, BMLoop *l, const bool select, const int sticky_flag, const BMUVOffsets &offsets)
static void bm_loop_tags_clear(BMesh *bm)
void uvedit_face_select_disable(const Scene *scene, BMesh *bm, BMFace *efa, const BMUVOffsets &offsets)
void ED_uvedit_sticky_selectmode_update(bContext *C)
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 wmOperatorStatus uv_select_more_less(bContext *C, const bool select)
static bool uv_nearest_between(const BMLoop *l, const float co[2], const int cd_loop_uv_offset)
void UV_OT_select_linked(wmOperatorType *ot)
bool uvedit_vert_is_edge_select_any_other(const ToolSettings *ts, const BMLoop *l, const BMUVOffsets &offsets)
static int uv_select_edgeloop(Scene *scene, Object *obedit, UvNearestHit *hit, const bool extend)
static BMLoop * bm_select_edgeloop_single_side_next(const Scene *scene, BMLoop *l_step, BMVert *v_from, const BMUVOffsets &offsets)
static EnumPropertyItem uv_select_similar_type_items[]
@ 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)
BMLoop ** ED_uvedit_selected_edges(const Scene *scene, BMesh *bm, int len_max, int *r_edges_len)
void uvedit_uv_select_enable(const Scene *scene, BMesh *bm, BMLoop *l, const BMUVOffsets &offsets)
bool uvedit_face_select_test_ex(const ToolSettings *ts, const BMFace *efa, 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)
void uvedit_edge_select_set(const Scene *scene, BMesh *bm, BMLoop *l, const bool select, const BMUVOffsets &offsets)
Select UV Edge.
static wmOperatorStatus uv_select_more_exec(bContext *C, wmOperator *)
char ED_uvedit_select_mode_get(const Scene *scene)
void ED_uvedit_selectmode_flush(const Scene *scene, BMesh *bm)
UV Select Mode Flush.
bool uv_find_nearest_edge(Scene *scene, Object *obedit, const float co[2], const float penalty, UvNearestHit *hit)
#define NEIGHBORING_FACE_IS_SEL
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)
bool uvedit_uv_select_test(const Scene *scene, const BMLoop *l, const BMUVOffsets &offsets)
void uvedit_deselect_flush(const Scene *scene, BMesh *bm)
static wmOperatorStatus uv_select_linked_pick_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void uvedit_uv_select_disable(const Scene *scene, BMesh *bm, BMLoop *l, const BMUVOffsets &offsets)
bool uvedit_select_is_any_selected_multi(const Scene *scene, const Span< Object * > objects)
void UV_OT_select_circle(wmOperatorType *ot)
static BMLoop * bm_select_edgeloop_double_side_next(const Scene *scene, BMLoop *l_step, BMVert *v_from, const BMUVOffsets &offsets)
UvNearestHit uv_nearest_hit_init_max_default()
void uvedit_edge_select_set_with_sticky(const Scene *scene, BMesh *bm, BMLoop *l, const bool select, const BMUVOffsets &offsets)
bool uv_find_nearest_vert(Scene *scene, Object *obedit, float const co[2], const float penalty_dist, UvNearestHit *hit)
void UV_OT_select_mode(wmOperatorType *ot)
UvNearestHit uv_nearest_hit_init_max(const View2D *v2d)
static wmOperatorStatus uv_circle_select_exec(bContext *C, wmOperator *op)
void UV_OT_select_similar(wmOperatorType *ot)
static void uv_select_flush_from_tag_loop(const Scene *scene, Object *obedit, const bool select)
static wmOperatorStatus uv_select_pinned_exec(bContext *C, wmOperator *op)
void uvedit_edge_select_disable(const Scene *scene, BMesh *bm, BMLoop *l, const BMUVOffsets &offsets)
static wmOperatorStatus uv_select_similar_island_exec(bContext *C, wmOperator *op)
bool uvedit_edge_select_test(const Scene *scene, const BMLoop *l, const BMUVOffsets &offsets)
void ED_uvedit_select_sync_flush(const ToolSettings *ts, BMesh *bm, const bool select)
void UV_OT_select_linked_pick(wmOperatorType *ot)
static wmOperatorStatus uv_select_exec(bContext *C, wmOperator *op)
void UV_OT_select_more(wmOperatorType *ot)
BMLoop * uv_find_nearest_loop_from_edge(Scene *scene, Object *obedit, BMEdge *e, const float co[2])
static wmOperatorStatus uv_select_loop_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static void uv_select_flush_from_tag_sticky_loc_internal(const Scene *scene, BMesh *bm, BMLoop *l, const bool select, const BMUVOffsets &offsets)
static wmOperatorStatus uv_select_mode_exec(bContext *C, wmOperator *op)
void UV_OT_select_pinned(wmOperatorType *ot)
static void uv_select_flush_from_tag_face(const Scene *scene, Object *obedit, const bool select)
bool uv_find_nearest_face_multi(Scene *scene, const Span< Object * > objects, const float co[2], UvNearestHit *hit)
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)
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_split_exec(bContext *C, wmOperator *op)
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)
static void uv_isolate_selected_islands(const Scene *scene, BMesh *bm, const BMUVOffsets &offsets)
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)
static wmOperatorStatus uv_select_similar_edge_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])
static wmOperatorStatus uv_mouse_select_loop_generic(bContext *C, const float co[2], const bool extend, enum eUVLoopGenericType loop_type)
bool uv_find_nearest_face(Scene *scene, Object *obedit, const float co[2], UvNearestHit *hit)
static float get_uv_vert_needle(const eUVSelectSimilar type, BMVert *vert, const float ob_m3[3][3], BMLoop *loop, const BMUVOffsets &offsets)
static wmOperatorStatus uv_select_similar_face_exec(bContext *C, wmOperator *op)
void uvedit_face_select_set(const Scene *scene, BMesh *bm, BMFace *efa, const bool select, const BMUVOffsets &offsets)
Select UV Face.
static void bm_clear_uv_vert_selection(const Scene *scene, BMesh *bm, const BMUVOffsets &offsets)
static void uvedit_vertex_select_tagged(BMesh *bm, Scene *scene, bool select, const BMUVOffsets &offsets)
static wmOperatorStatus uv_box_select_exec(bContext *C, wmOperator *op)
bool uv_find_nearest_vert_multi(Scene *scene, const Span< Object * > objects, float const co[2], const float penalty_dist, UvNearestHit *hit)
static wmOperatorStatus uv_select_edge_ring_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static bool overlap_tri_tri_uv_test(const float t1[3][2], const float t2[3][2], const float endpoint_bias)
#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])
bool uv_find_nearest_edge_multi(Scene *scene, const Span< Object * > objects, const float co[2], const float penalty, UvNearestHit *hit)
bool uvedit_vert_is_all_other_faces_selected(const ToolSettings *ts, const BMLoop *l, const BMUVOffsets &offsets)
void uvedit_face_select_enable(const Scene *scene, BMesh *bm, BMFace *efa, const BMUVOffsets &offsets)
static wmOperatorStatus uv_lasso_select_exec(bContext *C, wmOperator *op)
static wmOperatorStatus uv_select_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static void uv_select_all(const Scene *scene, BMEditMesh *em, bool select_all)
BMLoop * ED_uvedit_active_vert_loop_get(BMesh *bm)
static wmOperatorStatus uv_select_linked_pick_exec(bContext *C, wmOperator *op)
bool uvedit_face_visible_test(const Scene *scene, const BMFace *efa)
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])
static wmOperatorStatus uv_select_mode_invoke(bContext *C, wmOperator *op, const wmEvent *)
void uvedit_edge_select_shared_vert(const Scene *scene, BMesh *bm, BMLoop *l, const bool select, const int sticky_flag, const BMUVOffsets &offsets)
bool uv_find_nearest_face_ex(Scene *scene, Object *obedit, const float co[2], UvNearestHit *hit, const bool only_in_face)
void uvedit_edge_select_set_noflush(const Scene *scene, BMLoop *l, const bool select, const int sticky_flag, const BMUVOffsets &offsets)
static BMLoop * uvedit_loop_find_other_radial_loop_with_visible_face(const Scene *scene, BMLoop *l_src, const BMUVOffsets &offsets)
void UV_OT_select_overlap(wmOperatorType *ot)
void uvedit_edge_select_enable(const Scene *scene, BMesh *bm, BMLoop *l, const BMUVOffsets &offsets)
void uvedit_face_select_shared_vert(const Scene *scene, BMesh *bm, BMFace *efa, const bool select, const BMUVOffsets &offsets)
void UV_OT_select_lasso(wmOperatorType *ot)
static bool uv_island_selected(const Scene *scene, FaceIsland *island)
static bool uv_mouse_select_multi(bContext *C, const Span< Object * > objects, const float co[2], const SelectPick_Params ¶ms)
void uvedit_uv_select_set(const Scene *scene, BMesh *bm, BMLoop *l, const bool select, const BMUVOffsets &offsets)
Select UV Vertex.
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 BMLoop * uvedit_loop_find_other_boundary_loop_with_visible_face(const Scene *scene, BMLoop *l_edge, BMVert *v_pivot, const BMUVOffsets &offsets)
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])
static int uv_select_faceloop(Scene *scene, Object *obedit, UvNearestHit *hit, const bool extend)
bool uvedit_select_is_any_selected(const Scene *scene, BMesh *bm)
void uvedit_select_prepare_custom_data(const Scene *scene, BMesh *bm)
bool uvedit_uv_select_test_ex(const ToolSettings *ts, const BMLoop *l, const BMUVOffsets &offsets)
static wmOperatorStatus uv_select_edge_ring_exec(bContext *C, wmOperator *op)
UvNearestHit uv_nearest_hit_init_dist_px(const View2D *v2d, const float dist_px)
static wmOperatorStatus uv_select_all_exec(bContext *C, wmOperator *op)
static wmOperatorStatus uv_select_less_exec(bContext *C, wmOperator *)
BMFace ** ED_uvedit_selected_faces(const Scene *scene, BMesh *bm, int len_max, int *r_faces_len)
static void uv_select_flush_from_loop_edge_flag(const Scene *scene, BMesh *bm)
static wmOperatorStatus uv_select_similar_vert_exec(bContext *C, wmOperator *op)
bool uvedit_vert_is_face_select_any_other(const ToolSettings *ts, const BMLoop *l, const BMUVOffsets &offsets)
bool uvedit_face_visible_test_ex(const ToolSettings *ts, const BMFace *efa)
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])
static wmOperatorStatus uv_select_similar_exec(bContext *C, wmOperator *op)
static wmOperatorStatus uv_select_linked_exec(bContext *C, wmOperator *op)
void uvedit_select_flush(const Scene *scene, BMesh *bm)
bool uvedit_edge_select_test_ex(const ToolSettings *ts, const BMLoop *l, const BMUVOffsets &offsets)
static float get_uv_face_needle(const eUVSelectSimilar type, BMFace *face, int ob_index, const float ob_m3[3][3], const BMUVOffsets &offsets)
static void uv_select_all_perform_multi(const Scene *scene, Span< Object * > objects, int action)
static wmOperatorStatus uv_select_loop_exec(bContext *C, wmOperator *op)
void UV_OT_select_less(wmOperatorType *ot)
BMLoop ** ED_uvedit_selected_verts(const Scene *scene, BMesh *bm, int len_max, int *r_verts_len)
void ED_uvedit_active_vert_loop_set(BMesh *bm, BMLoop *l)
static void uv_select_toggle_all(const Scene *scene, BMEditMesh *em)
static wmOperatorStatus uv_select_overlap(bContext *C, const bool extend)
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)
wmOperatorStatus WM_gesture_circle_invoke(bContext *C, wmOperator *op, const wmEvent *event)
Array< int2 > WM_gesture_lasso_path_to_array(bContext *, wmOperator *op)
wmOperatorStatus WM_gesture_lasso_modal(bContext *C, wmOperator *op, const wmEvent *event)
wmOperatorStatus WM_gesture_box_modal(bContext *C, wmOperator *op, const wmEvent *event)
wmOperatorStatus WM_gesture_box_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void WM_gesture_circle_cancel(bContext *C, wmOperator *op)
void WM_gesture_lasso_cancel(bContext *C, wmOperator *op)
wmOperatorStatus WM_gesture_circle_modal(bContext *C, wmOperator *op, const wmEvent *event)
wmOperatorStatus 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)
wmOperatorStatus WM_operator_flag_only_pass_through_on_press(wmOperatorStatus retval, const wmEvent *event)
wmOperatorStatus WM_menu_invoke(bContext *C, wmOperator *op, const wmEvent *)