118 const bNode **r_node,
200 const bool skip_invisible,
205 const bool synced_selection = (scene->toolsettings->uv_flag &
UV_SYNC_SELECTION) != 0;
232 const bool skip_invisible,
233 const bool skip_nonselected,
236 for (
Object *obedit : objects_edit) {
247 bool changed =
false;
293 bool changed =
false;
296 float min[2], max[2];
318 bool changed =
false;
323 if (r_has_select !=
nullptr) {
326 scene, view_layer,
nullptr);
334 scene, view_layer,
nullptr);
336 if (r_has_select !=
nullptr) {
337 *r_has_select = changed;
366 bool changed =
false;
370 if (luv[0] != cent[0]) {
376 if (luv[1] != cent[1]) {
423 if ((*prec_a < flags && 0.0f < len_sq_b) || (*prec_a == flags && len_sq_ab < len_sq_b)) {
429 if ((*prec_b < flags && 0.0f < len_sq_a) || (*prec_b == flags && len_sq_ab < len_sq_a)) {
453 for (
int i = 0; i < 10; i++) {
455 for (
int j = 0; j <
len; j++) {
473 if (uv_start[1] == uv_end[1]) {
478 a = (uv_end[0] - uv_start[0]) / (uv_end[1] - uv_start[1]);
482 if (uv_start[0] == uv_end[0]) {
487 a = (uv_end[1] - uv_start[1]) / (uv_end[0] - uv_start[0]);
491 bool changed =
false;
492 for (
int j = 0; j <
len; j++) {
499 luv[0] = a * (luv[1] - uv_start[1]) + uv_start[0];
502 luv[1] = a * (luv[0] - uv_start[0]) + uv_start[1];
518 if (offsets.
uv == -1) {
523 if (element_map ==
nullptr) {
527 bool changed =
false;
546 float cent[2],
min[2], max[2];
551 scene, view_layer,
nullptr);
555 scene, objects,
true,
true, [&](
float luv[2]) {
minmax_v2v2_v2(
min, max, luv); });
561 for (
Object *obedit : objects) {
563 bool changed =
false;
599 "Align UV vertices along the line defined by the endpoints"},
604 "Align UV vertices, moving them horizontally to the line defined by the endpoints"},
609 "Align UV vertices, moving them vertically to the line defined by the endpoints"},
614 "Automatically choose the direction on which there is most alignment already"},
615 {
UV_ALIGN_X,
"ALIGN_X", 0,
"Align Vertically",
"Align UV vertices on a vertical line"},
616 {
UV_ALIGN_Y,
"ALIGN_Y", 0,
"Align Horizontally",
"Align UV vertices on a horizontal line"},
617 {0,
nullptr, 0,
nullptr,
nullptr},
652 scene, view_layer,
nullptr);
654 bool *changed =
static_cast<bool *
>(
MEM_callocN(
sizeof(
bool) * objects.size(), __func__));
658 uint *ob_mloopuv_max_idx =
static_cast<uint *
>(
663 for (
Object *obedit : objects) {
673 KDTree_2d *
tree = BLI_kdtree_2d_new(uv_maxlen);
678 int mloopuv_count = 0;
680 for (
const int ob_index : objects.index_range()) {
681 Object *obedit = objects[ob_index];
684 BLI_kdtree_2d_insert(tree, mloopuv_count, luv);
685 duplicates.append(-1);
686 mloopuv_arr.append(luv);
690 ob_mloopuv_max_idx[ob_index] = mloopuv_count - 1;
693 BLI_kdtree_2d_balance(
tree);
694 int found_duplicates = BLI_kdtree_2d_calc_duplicates_fast(
695 tree, threshold,
false, duplicates.
data());
697 if (found_duplicates > 0) {
699 int *uv_duplicate_count =
static_cast<int *
>(
700 MEM_callocN(
sizeof(
int) * mloopuv_count, __func__));
701 for (
int i = 0; i < mloopuv_count; i++) {
702 if (duplicates[i] == -1) {
703 uv_duplicate_count[i]++;
707 if (duplicates[i] != i) {
710 add_v2_v2(mloopuv_arr[duplicates[i]], mloopuv_arr[i]);
712 uv_duplicate_count[duplicates[i]]++;
715 for (
int i = 0; i < mloopuv_count; i++) {
716 if (uv_duplicate_count[i] < 2) {
720 mul_v2_fl(mloopuv_arr[i], 1.0f /
float(uv_duplicate_count[i]));
726 for (
int i = 0; i < mloopuv_count; i++) {
730 while (ob_mloopuv_max_idx[ob_index] < i) {
734 if (duplicates[i] == -1) {
738 copy_v2_v2(mloopuv_arr[i], mloopuv_arr[duplicates[i]]);
739 changed[ob_index] =
true;
742 for (ob_index = 0; ob_index < objects.size(); ob_index++) {
743 if (changed[ob_index]) {
744 Object *obedit = objects[ob_index];
752 BLI_kdtree_2d_free(
tree);
767 scene, view_layer,
nullptr);
771 for (
Object *obedit : objects) {
776 KDTree_2d *
tree = BLI_kdtree_2d_new(uv_maxlen);
780 int mloopuv_count = 0;
784 BLI_kdtree_2d_insert(
tree, mloopuv_count, luv);
789 BLI_kdtree_2d_balance(
tree);
792 for (
Object *obedit : objects) {
793 bool changed =
false;
796 KDTreeNearest_2d nearest;
797 const int i = BLI_kdtree_2d_find_nearest(tree, luv, &nearest);
799 if (i != -1 && nearest.dist < threshold) {
800 copy_v2_v2(luv, mloopuv_arr[i]);
812 BLI_kdtree_2d_free(
tree);
826 scene, view_layer,
nullptr);
831 for (
Object *obedit : objects) {
841 bool changed =
false;
851 if (uvs.
size() <= 1) {
856 while (uvs.
size() > 1) {
857 const int uvs_num = uvs.
size();
858 float2 uv_average = {0.0f, 0.0f};
859 for (
const float *luv : uvs) {
860 uv_average +=
float2(luv);
862 uv_average /= uvs_num;
868 float *uv_ref = uvs[0];
869 int uv_ref_index = 0;
870 for (
int i = 1; i < uvs_num; i++) {
872 if (dist_test_sq < dist_best_sq) {
873 dist_best_sq = dist_test_sq;
879 const int uvs_end = uvs_num - 1;
880 std::swap(uvs[uv_ref_index], uvs[uvs_end]);
885 float2 uv_merged_average = {uv_ref[0], uv_ref[1]};
887 int uvs_num_merged = 1;
888 while (uvs[i] != uv_ref && i < uvs_num - uvs_num_merged) {
890 if (dist_test_sq < threshold_sq) {
891 uv_merged_average +=
float2(uvs[i]);
892 std::swap(uvs[i], uvs[uvs_end - uvs_num_merged]);
894 if (dist_test_sq != 0.0f) {
905 if (uvs_num_merged > 1) {
906 uv_merged_average /= uvs_num_merged;
908 for (
int j = uvs_num - uvs_num_merged; j < uvs_num; j++) {
913 uvs.
resize(uvs_num - uvs_num_merged);
941 ot->
name =
"Merge UVs by Distance";
943 "Selected UV vertices that are within a radius of each other are welded together";
944 ot->
idname =
"UV_OT_remove_doubles";
957 "Maximum distance between welded vertices",
964 "Merge selected to other unselected vertices");
966 ot->
srna,
"use_shared_vertex",
false,
"Shared Vertex",
"Weld UVs based on shared vertices");
1003 uvco[0] = roundf(uvco[0] *
w) /
w;
1004 uvco[1] = roundf(uvco[1] * h) / h;
1009 int width = 0, height = 0;
1032 bool changed =
false;
1045 scene, view_layer,
nullptr);
1067 {0,
"PIXELS", 0,
"Pixels",
""},
1068 {1,
"SELECTED", 0,
"Selected",
""},
1069 {2,
"ORIGIN", 0,
"Origin",
""},
1070 {0,
nullptr, 0,
nullptr,
nullptr},
1074 ot->
name =
"Snap Cursor";
1085 ot->
srna,
"target", target_items, 0,
"Target",
"Target to snap the selected UVs to");
1097 bool changed =
false;
1100 copy_v2_v2(luv, cursor);
1110 bool changed =
false;
1113 add_v2_v2(luv, offset);
1126 BMIter iter, liter, lsubiter;
1128 bool changed =
false;
1149 float uv[2] = {0.0f, 0.0f};
1178 int width = 0, height = 0;
1180 bool changed =
false;
1187 uv_snap_to_pixel(luv, w, h);
1202 float offset[2] = {0};
1205 scene, view_layer,
nullptr);
1215 bool changed_multi =
false;
1216 for (
Object *obedit : objects) {
1223 bool changed =
false;
1240 changed_multi =
true;
1253 {0,
"PIXELS", 0,
"Pixels",
""},
1254 {1,
"CURSOR", 0,
"Cursor",
""},
1255 {2,
"CURSOR_OFFSET", 0,
"Cursor (Offset)",
""},
1256 {3,
"ADJACENT_UNSELECTED", 0,
"Adjacent Unselected",
""},
1257 {0,
nullptr, 0,
nullptr,
nullptr},
1261 ot->
name =
"Snap Selection";
1262 ot->
description =
"Snap selected UV vertices to target type";
1263 ot->
idname =
"UV_OT_snap_selected";
1272 ot->
srna,
"target", target_items, 0,
"Target",
"Target to snap the selected UVs to");
1294 scene, view_layer,
nullptr);
1296 for (
Object *obedit : objects) {
1299 bool changed =
false;
1343 "Set/clear selected UV vertices as anchored between multiple unwrap operations";
1353 ot->
srna,
"clear",
false,
"Clear",
"Clear pinning for the selection instead of setting it");
1359 "Invert pinning for the selection instead of setting it");
1371#define UV_VERT_SEL_TEST(l, bool_test) (BM_ELEM_CD_GET_BOOL(l, offsets.select_vert) == bool_test)
1373#define UV_EDGE_SEL_TEST(l, bool_test) (BM_ELEM_CD_GET_BOOL(l, offsets.select_edge) == bool_test)
1386 }
while ((l_iter = l_iter->
next) != l_first);
1400 scene, view_layer,
nullptr);
1402 for (
Object *ob : objects) {
1415 Mesh *mesh =
static_cast<Mesh *
>(ob->data);
1417 params.calc_looptris =
true;
1418 params.calc_normals =
false;
1419 params.is_destructive =
false;
1441 if (use_face_center) {
1531#undef UV_VERT_SEL_TEST
1532#undef UV_EDGE_SEL_TEST
1537 ot->
name =
"Hide Selected";
1548 ot->
srna,
"unselected",
false,
"Unselected",
"Hide unselected rather than selected");
1567 scene, view_layer,
nullptr);
1569 for (
Object *ob : objects) {
1588 Mesh *mesh =
static_cast<Mesh *
>(ob->data);
1590 params.calc_looptris =
true;
1591 params.calc_normals =
false;
1592 params.is_destructive =
false;
1602 if (use_face_center) {
1683 ot->
name =
"Reveal Hidden";
1736 ®ion->v2d, event->
mval[0], event->
mval[1], &location[0], &location[1]);
1745 ot->
name =
"Set 2D Cursor";
1762 "Cursor location in normalized (0.0 to 1.0) coordinates",
1779 bool changed_multi =
false;
1782 scene, view_layer,
nullptr);
1784 for (
Object *ob : objects) {
1786 BMEditMesh *em = mesh->runtime->edit_mesh.get();
1795 bool changed =
false;
1822 }
while ((l_other = l_other->
radial_next) != l_iter);
1833 }
while ((l_iter = l_iter->
next) != l_first);
1837 changed_multi =
true;
1849 ot->
name =
"Seams from Islands";
1850 ot->
description =
"Set mesh seams according to island setup in the UV editor";
1851 ot->
idname =
"UV_OT_seams_from_islands";
1884 scene, view_layer,
nullptr);
1886 bool changed =
false;
1888 for (
Object *ob : objects) {
1890 BMEditMesh *em = mesh->runtime->edit_mesh.get();
2040 "Unstitch UVs and move the result",
SpaceImage * CTX_wm_space_image(const bContext *C)
bScreen * CTX_wm_screen(const bContext *C)
Object * CTX_data_active_object(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
ARegion * CTX_wm_region(const bContext *C)
wmMsgBus * CTX_wm_message_bus(const bContext *C)
ViewLayer * CTX_data_view_layer(const bContext *C)
CustomData interface, see also DNA_customdata_types.h.
const void * CustomData_get_layer(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.
struct Material * BKE_object_material_get(struct Object *ob, short act)
struct Material * BKE_object_material_get_eval(struct Object *ob, short act)
#define SH_NODE_TEX_IMAGE
#define SH_NODE_TEX_ENVIRONMENT
A KD-tree for nearest neighbor search.
float closest_to_line_segment_v2(float r_close[2], const float p[2], const float l1[2], const float l2[2])
MINLINE float len_squared_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
MINLINE void mul_v2_fl(float r[2], float f)
MINLINE void copy_v2_v2(float r[2], const float a[2])
void minmax_v2v2_v2(float min[2], float max[2], const float vec[2])
MINLINE void add_v2_v2(float r[2], const float a[2])
void mid_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE void sub_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE void zero_v2(float r[2])
MINLINE void mul_v2_v2fl(float r[2], const float a[2], float f)
#define INIT_MINMAX2(min, max)
#define UNUSED_FUNCTION(x)
#define ENUM_OPERATORS(_type, _max)
#define CTX_IFACE_(context, msgid)
#define BLT_I18NCONTEXT_OPERATOR_DEFAULT
void DEG_id_tag_update(ID *id, unsigned int flags)
bool DEG_is_evaluated_object(const Object *object)
Object is a sort of wrapper for general info.
@ V3D_AROUND_CENTER_BOUNDS
void ED_space_image_get_size(SpaceImage *sima, int *r_width, int *r_height)
bool ED_space_image_cursor_poll(bContext *C)
bool ED_space_image_show_cache_and_mval_over(const SpaceImage *sima, ARegion *region, const int mval[2])
void EDBM_update(Mesh *mesh, const EDBMUpdate_Params *params)
bool EDBM_mesh_reveal(BMEditMesh *em, bool select)
bool EDBM_uv_check(BMEditMesh *em)
void BM_uv_element_map_free(UvElementMap *element_map)
bool EDBM_mesh_hide(BMEditMesh *em, bool swap)
UvElementMap * BM_uv_element_map_create(BMesh *bm, const Scene *scene, bool uv_selected, bool use_winding, bool use_seams, bool do_islands)
void ED_node_tree_propagate_change(const bContext *C, Main *bmain, bNodeTree *ntree)
bool ED_operator_uvedit_space_image(bContext *C)
bool ED_operator_uvedit(bContext *C)
void ED_uvedit_live_unwrap_begin(Scene *scene, Object *obedit, struct wmWindow *win_modal)
bool uvedit_edge_select_test(const Scene *scene, BMLoop *l, BMUVOffsets offsets)
void ED_uvedit_live_unwrap_re_solve()
bool uvedit_face_visible_test(const Scene *scene, BMFace *efa)
void uvedit_face_select_disable(const Scene *scene, BMesh *bm, BMFace *efa, BMUVOffsets offsets)
void ED_uvedit_live_unwrap_end(bool cancel)
void ED_uvedit_live_unwrap(const Scene *scene, blender::Span< Object * > objects)
bool uvedit_uv_select_test(const Scene *scene, BMLoop *l, BMUVOffsets offsets)
Read Guarded memory(de)allocation.
void uiItemBooleanO(uiLayout *layout, const char *name, int icon, const char *opname, const char *propname, int value)
void UI_popup_menu_end(bContext *C, uiPopupMenu *pup)
uiPopupMenu * UI_popup_menu_begin(bContext *C, const char *title, int icon) ATTR_NONNULL()
uiLayout * UI_popup_menu_layout(uiPopupMenu *pup)
void uiLayoutSetOperatorContext(uiLayout *layout, wmOperatorCallContext opcontext)
void UI_view2d_region_to_view(const View2D *v2d, float x, float y, float *r_view_x, float *r_view_y) ATTR_NONNULL()
#define BM_ELEM_CD_GET_BOOL(ele, offset)
#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_flag_disable(ele, hflag)
#define BM_elem_flag_set(ele, hflag, val)
#define BM_elem_flag_test(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)
#define BM_ITER_ELEM(ele, iter, data, itype)
#define BM_ITER_MESH(ele, iter, bm, itype)
ATTR_WARN_UNUSED_RESULT 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_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_enable_test(BMesh *bm, const char htype, const char hflag, const bool respecthide, const bool overwrite, const char hflag_test)
ATTR_WARN_UNUSED_RESULT const BMLoop * l
ATTR_WARN_UNUSED_RESULT const BMVert * v
BMUVOffsets BM_uv_map_get_offsets(const BMesh *bm)
bool BM_loop_uv_share_edge_check(BMLoop *l_a, BMLoop *l_b, const int cd_loop_uv_offset)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
void append(const T &value)
void resize(const int64_t new_size)
void reserve(const int64_t min_capacity)
draw_view in_light_buf[] float
CCL_NAMESPACE_BEGIN ccl_device float invert(float color, float factor)
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)
static void clear(Message &msg)
bNode * node_get_active_texture(bNodeTree *ntree)
T distance_squared(const VecBase< T, Size > &a, const VecBase< T, Size > &b)
VecBase< float, 2 > float2
static void update(bNodeTree *ntree)
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
void RNA_float_get_array(PointerRNA *ptr, const char *name, float *values)
float RNA_float_get(PointerRNA *ptr, const char *name)
bool RNA_struct_property_is_set(PointerRNA *ptr, const char *identifier)
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)
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_flag(PropertyRNA *prop, PropertyFlag flag)
struct BMLoop * radial_next
struct bNodeTree * nodetree
bool(* poll)(struct bContext *)
bool(* poll)(bContext *C) ATTR_WARN_UNUSED_RESULT
int(* invoke)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
int(* exec)(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
struct wmOperatorType * type
void UV_OT_copy(wmOperatorType *ot)
void UV_OT_paste(wmOperatorType *ot)
void UV_OT_select_all(wmOperatorType *ot)
void UV_OT_select_edge_ring(wmOperatorType *ot)
void UV_OT_select(wmOperatorType *ot)
void UV_OT_select_split(wmOperatorType *ot)
void UV_OT_shortest_path_pick(wmOperatorType *ot)
void UV_OT_select_linked(wmOperatorType *ot)
void UV_OT_stitch(wmOperatorType *ot)
bool uvedit_select_is_any_selected_multi(const Scene *scene, blender::Span< Object * > objects)
void UV_OT_cylinder_project(wmOperatorType *ot)
void UV_OT_project_from_view(wmOperatorType *ot)
void UV_OT_smart_project(wmOperatorType *ot)
void UV_OT_unwrap(wmOperatorType *ot)
void UV_OT_select_circle(wmOperatorType *ot)
void UV_OT_select_mode(wmOperatorType *ot)
void UV_OT_select_similar(wmOperatorType *ot)
void UV_OT_sphere_project(wmOperatorType *ot)
void UV_OT_rip(wmOperatorType *ot)
void UV_OT_select_linked_pick(wmOperatorType *ot)
void UV_OT_select_more(wmOperatorType *ot)
void UV_OT_cube_project(wmOperatorType *ot)
void UV_OT_select_pinned(wmOperatorType *ot)
void UV_OT_select_loop(wmOperatorType *ot)
void UV_OT_shortest_path_select(wmOperatorType *ot)
void UV_OT_average_islands_scale(wmOperatorType *ot)
void UV_OT_reset(wmOperatorType *ot)
void UV_OT_select_overlap(wmOperatorType *ot)
void UV_OT_minimize_stretch(wmOperatorType *ot)
void UV_OT_select_lasso(wmOperatorType *ot)
void UV_OT_pack_islands(wmOperatorType *ot)
void UV_OT_select_less(wmOperatorType *ot)
void UV_OT_select_box(wmOperatorType *ot)
bool ED_object_get_active_image(Object *ob, int mat_nr, Image **r_ima, ImageUser **r_iuser, const bNode **r_node, const bNodeTree **r_ntree)
void ED_keymap_uvedit(wmKeyConfig *keyconf)
static void UV_OT_snap_cursor(wmOperatorType *ot)
static void UV_OT_cursor_set(wmOperatorType *ot)
static int uv_snap_selection_exec(bContext *C, wmOperator *op)
void ED_operatortypes_uvedit()
static int uv_remove_doubles_to_selected(bContext *C, wmOperator *op)
static int uv_remove_doubles_exec(bContext *C, wmOperator *op)
static void UV_OT_align(wmOperatorType *ot)
static bool uvedit_uv_straighten(Scene *scene, BMesh *bm, eUVWeldAlign tool)
static int uv_hide_exec(bContext *C, wmOperator *op)
static void uv_snap_cursor_to_origin(float uvco[2])
static void UV_OT_mark_seam(wmOperatorType *ot)
static void UV_OT_weld(wmOperatorType *ot)
static bool uv_snap_uvs_to_pixels(SpaceImage *sima, Scene *scene, Object *obedit)
static bool uv_snap_uvs_to_cursor(Scene *scene, Object *obedit, const float cursor[2])
bool ED_uvedit_test(Object *obedit)
static void uv_weld_align(bContext *C, eUVWeldAlign tool)
static bool uvedit_uv_align_weld(Scene *scene, BMesh *bm, const eUVWeldAlign tool, const float cent[2])
void ED_uvedit_select_all(BMesh *bm)
static void UV_OT_snap_selected(wmOperatorType *ot)
static void uv_snap_to_pixel(float uvco[2], float w, float h)
void ED_uvedit_foreach_uv_multi(const Scene *scene, const Span< Object * > objects_edit, const bool skip_invisible, const bool skip_nonselected, FunctionRef< void(float[2])> user_fn)
static bool uv_snap_uvs_to_adjacent_unselected(Scene *scene, Object *obedit)
bool ED_uvedit_center_from_pivot_ex(SpaceImage *sima, Scene *scene, ViewLayer *view_layer, float r_center[2], char mode, bool *r_has_select)
static int uv_snap_cursor_exec(bContext *C, wmOperator *op)
static eUVEndPointPrecedence uvedit_line_update_get_precedence(const bool pinned)
bool ED_uvedit_center_multi(const Scene *scene, Span< Object * > objects_edit, float cent[2], char mode)
static void UV_OT_reveal(wmOperatorType *ot)
static int uv_mark_seam_invoke(bContext *C, wmOperator *op, const wmEvent *)
static bool uv_snap_uvs_offset(Scene *scene, Object *obedit, const float offset[2])
void ED_uvedit_foreach_uv(const Scene *scene, BMesh *bm, const bool skip_invisible, const bool selected, FunctionRef< void(float[2])> user_fn)
static bool uv_snap_cursor_to_selection(Scene *scene, Span< Object * > objects_edit, SpaceImage *sima)
#define UV_EDGE_SEL_TEST(l, bool_test)
static int uv_align_exec(bContext *C, wmOperator *op)
static void UV_OT_hide(wmOperatorType *ot)
static int uv_seams_from_islands_exec(bContext *C, wmOperator *op)
static void uv_snap_cursor_to_pixels(SpaceImage *sima)
static bool uvedit_line_update_endpoint(const float *luv, const bool pinned, float uv_a[2], eUVEndPointPrecedence *prec_a, float uv_b[2], eUVEndPointPrecedence *prec_b)
static int uv_pin_exec(bContext *C, wmOperator *op)
void uvedit_live_unwrap_update(SpaceImage *sima, Scene *scene, Object *obedit)
bool ED_uvedit_minmax_multi(const Scene *scene, const Span< Object * > objects_edit, float r_min[2], float r_max[2])
static void UV_OT_seams_from_islands(wmOperatorType *ot)
static int uv_weld_exec(bContext *C, wmOperator *)
void ED_object_assign_active_image(Main *bmain, Object *ob, int mat_nr, Image *ima)
static int UNUSED_FUNCTION ED_operator_uvmap_mesh(bContext *C)
#define UV_VERT_SEL_TEST(l, bool_test)
static int uv_remove_doubles_to_selected_shared_vertex(bContext *C, wmOperator *op)
static void UV_OT_pin(wmOperatorType *ot)
static int uv_reveal_exec(bContext *C, wmOperator *op)
void ED_operatormacros_uvedit()
static bool ED_uvedit_median_multi(const Scene *scene, const Span< Object * > objects_edit, float co[2])
static int uv_set_2d_cursor_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static int uv_mark_seam_exec(bContext *C, wmOperator *op)
static int uv_remove_doubles_to_unselected(bContext *C, wmOperator *op)
static void UV_OT_remove_doubles(wmOperatorType *ot)
static bool is_image_texture_node(bNode *node)
static bool uvedit_uv_straighten_elements(const UvElement *element, const int len, const BMUVOffsets offsets, const eUVWeldAlign tool)
static int uv_set_2d_cursor_exec(bContext *C, wmOperator *op)
static bool bm_face_is_all_uv_sel(BMFace *f, bool select_test, const BMUVOffsets offsets)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
wmKeyMap * WM_keymap_ensure(wmKeyConfig *keyconf, const char *idname, int spaceid, int regionid)
#define WM_msg_publish_rna_prop(mbus, id_, data_, type_, prop_)
wmOperatorTypeMacro * WM_operatortype_macro_define(wmOperatorType *ot, const char *idname)
void WM_operatortype_append(void(*opfunc)(wmOperatorType *))
wmOperatorType * WM_operatortype_append_macro(const char *idname, const char *name, const char *description, int flag)