120 const bNode **r_node,
202 const bool skip_invisible,
208 if (synced_selection &&
bm->totvertsel == (selected ? 0 :
bm->totvert)) {
234 const bool skip_invisible,
235 const bool skip_nonselected,
238 for (
Object *obedit : objects_edit) {
249 bool changed =
false;
293 bool changed =
false;
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;
544 float cent[2],
min[2],
max[2];
549 scene, view_layer,
nullptr);
559 for (
Object *obedit : objects) {
561 bool changed =
false;
597 "Align UV vertices along the line defined by the endpoints"},
602 "Align UV vertices, moving them horizontally to the line defined by the endpoints"},
607 "Align UV vertices, moving them vertically to the line defined by the endpoints"},
612 "Automatically choose the direction on which there is most alignment already"},
613 {
UV_ALIGN_X,
"ALIGN_X", 0,
"Align Vertically",
"Align UV vertices on a vertical line"},
614 {
UV_ALIGN_Y,
"ALIGN_Y", 0,
"Align Horizontally",
"Align UV vertices on a horizontal line"},
615 {0,
nullptr, 0,
nullptr,
nullptr},
620 ot->description =
"Aligns selected UV vertices on a line";
621 ot->idname =
"UV_OT_align";
630 ot->srna,
"axis", axis_items,
UV_ALIGN_AUTO,
"Axis",
"Axis to align UV locations on");
648 scene, view_layer,
nullptr);
658 for (
Object *obedit : objects) {
668 KDTree_2d *
tree = BLI_kdtree_2d_new(uv_maxlen);
673 int mloopuv_count = 0;
676 Object *obedit = objects[ob_index];
679 BLI_kdtree_2d_insert(tree, mloopuv_count, luv);
680 duplicates.append(-1);
681 mloopuv_arr.append(luv);
685 ob_mloopuv_max_idx[ob_index] = mloopuv_count - 1;
688 BLI_kdtree_2d_balance(
tree);
689 int found_duplicates = BLI_kdtree_2d_calc_duplicates_fast(
690 tree, threshold,
false, duplicates.
data());
692 if (found_duplicates > 0) {
695 for (
int i = 0;
i < mloopuv_count;
i++) {
696 if (duplicates[
i] == -1) {
697 uv_duplicate_count[
i]++;
701 if (duplicates[
i] !=
i) {
704 add_v2_v2(mloopuv_arr[duplicates[
i]], mloopuv_arr[
i]);
706 uv_duplicate_count[duplicates[
i]]++;
709 for (
int i = 0;
i < mloopuv_count;
i++) {
710 if (uv_duplicate_count[
i] < 2) {
714 mul_v2_fl(mloopuv_arr[
i], 1.0f /
float(uv_duplicate_count[
i]));
720 for (
int i = 0;
i < mloopuv_count;
i++) {
724 while (ob_mloopuv_max_idx[ob_index] <
i) {
728 if (duplicates[
i] == -1) {
733 changed[ob_index] =
true;
736 for (ob_index = 0; ob_index < objects.
size(); ob_index++) {
737 if (changed[ob_index]) {
738 Object *obedit = objects[ob_index];
746 BLI_kdtree_2d_free(
tree);
761 scene, view_layer,
nullptr);
765 for (
Object *obedit : objects) {
770 KDTree_2d *
tree = BLI_kdtree_2d_new(uv_maxlen);
774 int mloopuv_count = 0;
778 BLI_kdtree_2d_insert(
tree, mloopuv_count, luv);
783 BLI_kdtree_2d_balance(
tree);
786 for (
Object *obedit : objects) {
787 bool changed =
false;
790 KDTreeNearest_2d nearest;
791 const int i = BLI_kdtree_2d_find_nearest(tree, luv, &nearest);
793 if (i != -1 && nearest.dist < threshold) {
794 copy_v2_v2(luv, mloopuv_arr[i]);
806 BLI_kdtree_2d_free(
tree);
820 scene, view_layer,
nullptr);
825 for (
Object *obedit : objects) {
835 bool changed =
false;
845 if (uvs.
size() <= 1) {
850 while (uvs.
size() > 1) {
851 const int uvs_num = uvs.
size();
852 float2 uv_average = {0.0f, 0.0f};
853 for (
const float *luv : uvs) {
854 uv_average +=
float2(luv);
856 uv_average /= uvs_num;
862 float *uv_ref = uvs[0];
863 int uv_ref_index = 0;
864 for (
int i = 1;
i < uvs_num;
i++) {
866 if (dist_test_sq < dist_best_sq) {
867 dist_best_sq = dist_test_sq;
873 const int uvs_end = uvs_num - 1;
874 std::swap(uvs[uv_ref_index], uvs[uvs_end]);
879 float2 uv_merged_average = {uv_ref[0], uv_ref[1]};
881 int uvs_num_merged = 1;
882 while (uvs[
i] != uv_ref &&
i < uvs_num - uvs_num_merged) {
884 if (dist_test_sq < threshold_sq) {
885 uv_merged_average +=
float2(uvs[
i]);
886 std::swap(uvs[
i], uvs[uvs_end - uvs_num_merged]);
888 if (dist_test_sq != 0.0f) {
899 if (uvs_num_merged > 1) {
900 uv_merged_average /= uvs_num_merged;
902 for (
int j = uvs_num - uvs_num_merged; j < uvs_num; j++) {
907 uvs.resize(uvs_num - uvs_num_merged);
935 ot->name =
"Merge UVs by Distance";
937 "Selected UV vertices that are within a radius of each other are welded together";
938 ot->idname =
"UV_OT_remove_doubles";
951 "Maximum distance between welded vertices",
958 "Merge selected to other unselected vertices");
960 ot->srna,
"use_shared_vertex",
false,
"Shared Vertex",
"Weld UVs based on shared vertices");
980 ot->description =
"Weld selected UV vertices together";
981 ot->idname =
"UV_OT_weld";
997 uvco[0] = roundf(uvco[0] *
w) /
w;
998 uvco[1] = roundf(uvco[1] * h) / h;
1003 int width = 0, height = 0;
1026 bool changed =
false;
1039 scene, view_layer,
nullptr);
1061 {0,
"PIXELS", 0,
"Pixels",
""},
1062 {1,
"SELECTED", 0,
"Selected",
""},
1063 {2,
"ORIGIN", 0,
"Origin",
""},
1064 {0,
nullptr, 0,
nullptr,
nullptr},
1068 ot->name =
"Snap Cursor";
1069 ot->description =
"Snap cursor to target type";
1070 ot->idname =
"UV_OT_snap_cursor";
1079 ot->srna,
"target", target_items, 0,
"Target",
"Target to snap the selected UVs to");
1091 bool changed =
false;
1094 copy_v2_v2(luv, cursor);
1104 bool changed =
false;
1107 add_v2_v2(luv, offset);
1120 BMIter iter, liter, lsubiter;
1122 bool changed =
false;
1143 float uv[2] = {0.0f, 0.0f};
1172 int width = 0, height = 0;
1174 bool changed =
false;
1181 uv_snap_to_pixel(luv, w, h);
1194 float offset[2] = {0};
1197 scene, view_layer,
nullptr);
1207 bool changed_multi =
false;
1208 for (
Object *obedit : objects) {
1215 bool changed =
false;
1232 changed_multi =
true;
1245 {0,
"PIXELS", 0,
"Pixels",
""},
1246 {1,
"CURSOR", 0,
"Cursor",
""},
1247 {2,
"CURSOR_OFFSET", 0,
"Cursor (Offset)",
""},
1248 {3,
"ADJACENT_UNSELECTED", 0,
"Adjacent Unselected",
""},
1249 {0,
nullptr, 0,
nullptr,
nullptr},
1253 ot->name =
"Snap Selection";
1254 ot->description =
"Snap selected UV vertices to target type";
1255 ot->idname =
"UV_OT_snap_selected";
1264 ot->srna,
"target", target_items, 0,
"Target",
"Target to snap the selected UVs to");
1286 scene, view_layer,
nullptr);
1288 for (
Object *obedit : objects) {
1291 bool changed =
false;
1297 if (synced_selection) {
1348 "Set/clear selected UV vertices as anchored between multiple unwrap operations";
1349 ot->idname =
"UV_OT_pin";
1358 ot->srna,
"clear",
false,
"Clear",
"Clear pinning for the selection instead of setting it");
1364 "Invert pinning for the selection instead of setting it");
1376#define UV_VERT_SEL_TEST(l, bool_test) (BM_ELEM_CD_GET_BOOL(l, offsets.select_vert) == bool_test)
1378#define UV_EDGE_SEL_TEST(l, bool_test) (BM_ELEM_CD_GET_BOOL(l, offsets.select_edge) == bool_test)
1391 }
while ((l_iter = l_iter->
next) != l_first);
1405 scene, view_layer,
nullptr);
1407 for (
Object *ob : objects) {
1426 Mesh *mesh =
static_cast<Mesh *
>(ob->data);
1428 params.calc_looptris =
true;
1429 params.calc_normals =
false;
1430 params.is_destructive =
false;
1452 if (use_face_center) {
1542#undef UV_VERT_SEL_TEST
1543#undef UV_EDGE_SEL_TEST
1548 ot->name =
"Hide Selected";
1549 ot->description =
"Hide (un)selected UV vertices";
1550 ot->idname =
"UV_OT_hide";
1559 ot->srna,
"unselected",
false,
"Unselected",
"Hide unselected rather than selected");
1578 scene, view_layer,
nullptr);
1580 for (
Object *ob : objects) {
1605 Mesh *mesh =
static_cast<Mesh *
>(ob->data);
1607 params.calc_looptris =
true;
1608 params.calc_normals =
false;
1609 params.is_destructive =
false;
1619 if (use_face_center) {
1700 ot->name =
"Reveal Hidden";
1701 ot->description =
"Reveal all hidden UV vertices";
1702 ot->idname =
"UV_OT_reveal";
1753 ®ion->
v2d, event->
mval[0], event->
mval[1], &location[0], &location[1]);
1762 ot->name =
"Set 2D Cursor";
1763 ot->description =
"Set 2D cursor location";
1764 ot->idname =
"UV_OT_cursor_set";
1779 "Cursor location in normalized (0.0 to 1.0) coordinates",
1796 bool changed_multi =
false;
1799 scene, view_layer,
nullptr);
1801 for (
Object *ob : objects) {
1812 bool changed =
false;
1839 }
while ((l_other = l_other->
radial_next) != l_iter);
1850 }
while ((l_iter = l_iter->
next) != l_first);
1854 changed_multi =
true;
1866 ot->name =
"Seams from Islands";
1867 ot->description =
"Set mesh seams according to island setup in the UV editor";
1868 ot->idname =
"UV_OT_seams_from_islands";
1877 RNA_def_boolean(
ot->srna,
"mark_seams",
true,
"Mark Seams",
"Mark boundary edges as seams");
1878 RNA_def_boolean(
ot->srna,
"mark_sharp",
false,
"Mark Sharp",
"Mark boundary edges as sharp");
1901 scene, view_layer,
nullptr);
1903 bool changed =
false;
1905 for (
Object *ob : objects) {
1910 if (synced_selection && (
bm->totedgesel == 0)) {
1956 op_ptr = layout->
op(
1968 ot->name =
"Mark Seam";
1969 ot->description =
"Mark selected UV edges as seams";
1970 ot->idname =
"UV_OT_mark_seam";
1980 RNA_def_boolean(
ot->srna,
"clear",
false,
"Clear Seams",
"Clear instead of marking seams");
2051 "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)
void BKE_main_ensure_invariants(Main &bmain, std::optional< blender::Span< ID * > > modified_ids=std::nullopt)
General operations, lookup, etc. for materials.
Material * BKE_object_material_get(Object *ob, short act)
Material * BKE_object_material_get_eval(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(const T *id)
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)
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)
void uvedit_face_select_disable(const Scene *scene, BMesh *bm, BMFace *efa, const BMUVOffsets &offsets)
void ED_uvedit_live_unwrap_re_solve()
bool uvedit_uv_select_test(const Scene *scene, const BMLoop *l, const BMUVOffsets &offsets)
bool uvedit_edge_select_test(const Scene *scene, const BMLoop *l, const BMUVOffsets &offsets)
void ED_uvedit_live_unwrap_end(bool cancel)
bool uvedit_face_visible_test(const Scene *scene, const BMFace *efa)
void ED_uvedit_live_unwrap(const Scene *scene, blender::Span< Object * > objects)
Read Guarded memory(de)allocation.
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_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)
bool BM_uv_map_attr_vert_select_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)
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 void * element
ATTR_WARN_UNUSED_RESULT const BMLoop * l
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)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
void append(const T &value)
IndexRange index_range() const
void reserve(const int64_t min_capacity)
CCL_NAMESPACE_BEGIN ccl_device float invert(const float color, const float factor)
void * MEM_calloc_arrayN(size_t len, size_t size, const char *str)
void MEM_freeN(void *vmemh)
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
MeshRuntimeHandle * runtime
struct ToolSettings * toolsettings
PointerRNA op(wmOperatorType *ot, std::optional< blender::StringRef > name, int icon, wmOperatorCallContext context, eUI_Item_Flag flag)
bool(* poll)(struct bContext *)
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 bool uvedit_uv_straighten_elements(const UvElement *element, const int len, const BMUVOffsets &offsets, const eUVWeldAlign tool)
static wmOperatorStatus uv_seams_from_islands_exec(bContext *C, wmOperator *op)
static wmOperatorStatus uv_mark_seam_invoke(bContext *C, wmOperator *op, const wmEvent *)
static void UV_OT_cursor_set(wmOperatorType *ot)
void ED_operatortypes_uvedit()
static wmOperatorStatus uv_snap_selection_exec(bContext *C, wmOperator *op)
static void UV_OT_align(wmOperatorType *ot)
static bool uvedit_uv_straighten(Scene *scene, BMesh *bm, eUVWeldAlign tool)
static wmOperatorStatus uv_remove_doubles_to_selected_shared_vertex(bContext *C, wmOperator *op)
static void uv_snap_cursor_to_origin(float uvco[2])
static wmOperatorStatus uv_remove_doubles_to_selected(bContext *C, wmOperator *op)
static wmOperatorStatus uv_snap_cursor_exec(bContext *C, wmOperator *op)
static bool bm_face_is_all_uv_sel(BMFace *f, bool select_test, const BMUVOffsets &offsets)
static void UV_OT_mark_seam(wmOperatorType *ot)
static void UV_OT_weld(wmOperatorType *ot)
static wmOperatorStatus uv_set_2d_cursor_invoke(bContext *C, wmOperator *op, const wmEvent *event)
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 wmOperatorStatus uv_weld_exec(bContext *C, wmOperator *)
static wmOperatorStatus uv_hide_exec(bContext *C, wmOperator *op)
static bool uvedit_uv_align_weld(Scene *scene, BMesh *bm, const eUVWeldAlign tool, const float cent[2])
static wmOperatorStatus uv_remove_doubles_exec(bContext *C, wmOperator *op)
void ED_uvedit_select_all(BMesh *bm)
static void UV_OT_snap_selected(wmOperatorType *ot)
static wmOperatorStatus uv_reveal_exec(bContext *C, wmOperator *op)
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 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 bool uvedit_median_multi(const Scene *scene, const Span< Object * > objects_edit, float co[2])
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 void UV_OT_hide(wmOperatorType *ot)
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 wmOperatorStatus uv_mark_seam_exec(bContext *C, wmOperator *op)
static wmOperatorStatus uv_remove_doubles_to_unselected(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 wmOperatorStatus uv_align_exec(bContext *C, wmOperator *op)
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 wmOperatorStatus uv_set_2d_cursor_exec(bContext *C, wmOperator *op)
static void UV_OT_pin(wmOperatorType *ot)
void ED_operatormacros_uvedit()
static void UV_OT_remove_doubles(wmOperatorType *ot)
static bool is_image_texture_node(bNode *node)
static wmOperatorStatus uv_pin_exec(bContext *C, wmOperator *op)
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)