|
Blender V4.3
|
#include <cmath>#include <cstdlib>#include <cstring>#include "MEM_guardedalloc.h"#include "DNA_image_types.h"#include "DNA_material_types.h"#include "DNA_mesh_types.h"#include "DNA_node_types.h"#include "DNA_object_types.h"#include "DNA_scene_types.h"#include "DNA_space_types.h"#include "BLI_kdtree.h"#include "BLI_math_base.hh"#include "BLI_math_geom.h"#include "BLI_math_vector.h"#include "BLI_math_vector.hh"#include "BLI_utildefines.h"#include "BLT_translation.hh"#include "BKE_context.hh"#include "BKE_customdata.hh"#include "BKE_editmesh.hh"#include "BKE_layer.hh"#include "BKE_material.h"#include "BKE_mesh_mapping.hh"#include "BKE_mesh_types.hh"#include "BKE_node.hh"#include "DEG_depsgraph.hh"#include "DEG_depsgraph_query.hh"#include "ED_image.hh"#include "ED_mesh.hh"#include "ED_node.hh"#include "ED_screen.hh"#include "ED_uvedit.hh"#include "RNA_access.hh"#include "RNA_define.hh"#include "WM_api.hh"#include "WM_message.hh"#include "WM_types.hh"#include "UI_interface.hh"#include "UI_resources.hh"#include "UI_view2d.hh"#include "uvedit_intern.hh"Go to the source code of this file.
Hide Operator | |
| #define | UV_VERT_SEL_TEST(l, bool_test) (BM_ELEM_CD_GET_BOOL(l, offsets.select_vert) == bool_test) |
| #define | UV_EDGE_SEL_TEST(l, bool_test) (BM_ELEM_CD_GET_BOOL(l, offsets.select_edge) == bool_test) |
| static bool | bm_face_is_all_uv_sel (BMFace *f, bool select_test, const BMUVOffsets offsets) |
| static int | uv_hide_exec (bContext *C, wmOperator *op) |
| static void | UV_OT_hide (wmOperatorType *ot) |
| #define UV_EDGE_SEL_TEST | ( | l, | |
| bool_test ) (BM_ELEM_CD_GET_BOOL(l, offsets.select_edge) == bool_test) |
Definition at line 1373 of file uvedit_ops.cc.
Referenced by bm_face_is_all_uv_sel(), and uv_hide_exec().
| #define UV_VERT_SEL_TEST | ( | l, | |
| bool_test ) (BM_ELEM_CD_GET_BOOL(l, offsets.select_vert) == bool_test) |
Definition at line 1371 of file uvedit_ops.cc.
Referenced by uv_hide_exec().
Bitwise-or together, then choose loop with highest value.
| Enumerator | |
|---|---|
| UVEP_INVALID | |
| UVEP_SELECTED | |
| UVEP_PINNED | |
Definition at line 387 of file uvedit_ops.cc.
| enum eUVWeldAlign |
| Enumerator | |
|---|---|
| UV_STRAIGHTEN | |
| UV_STRAIGHTEN_X | |
| UV_STRAIGHTEN_Y | |
| UV_ALIGN_AUTO | |
| UV_ALIGN_X | |
| UV_ALIGN_Y | |
| UV_WELD | |
Definition at line 351 of file uvedit_ops.cc.
|
static |
Definition at line 1376 of file uvedit_ops.cc.
References BM_FACE_FIRST_LOOP, BMLoop::next, and UV_EDGE_SEL_TEST.
Referenced by uv_hide_exec().
| void ED_keymap_uvedit | ( | wmKeyConfig * | keyconf | ) |
Definition at line 2048 of file uvedit_ops.cc.
References ED_operator_uvedit(), wmKeyMap::poll, RGN_TYPE_WINDOW, SPACE_EMPTY, and WM_keymap_ensure().
Referenced by ED_spacetypes_keymap().
Definition at line 166 of file uvedit_ops.cc.
References BKE_object_material_get(), ED_node_tree_propagate_change(), bNode::id, Image::id, is_image_texture_node(), blender::bke::node_get_active_texture(), Material::nodetree, and Material::use_nodes.
| 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 ) |
Definition at line 114 of file uvedit_ops.cc.
References BKE_object_material_get(), BKE_object_material_get_eval(), DEG_is_evaluated_object(), Image::id, is_image_texture_node(), node, blender::bke::node_get_active_texture(), Material::nodetree, SH_NODE_TEX_ENVIRONMENT, SH_NODE_TEX_IMAGE, and Material::use_nodes.
Referenced by blender::ed::object::bake_object_check(), blender::ed::object::bake_object_image_get(), blender::ed::object::bake_targets_init_image_textures(), ED_space_image_auto_set(), ED_uvedit_get_aspect_from_material(), and blender::workbench::MaterialTexture::MaterialTexture().
|
static |
Definition at line 88 of file uvedit_ops.cc.
References CD_PROP_FLOAT2, CTX_data_active_object(), CustomData_get_layer(), Object::data, OB_MESH, and Object::type.
| void ED_operatormacros_uvedit | ( | ) |
Definition at line 2033 of file uvedit_ops.cc.
References OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorTypeMacro::ptr, RNA_boolean_set(), WM_operatortype_append_macro(), and WM_operatortype_macro_define().
Referenced by ED_spacemacros_init().
| void ED_operatortypes_uvedit | ( | ) |
Definition at line 1978 of file uvedit_ops.cc.
References UV_OT_align(), UV_OT_average_islands_scale(), UV_OT_copy(), UV_OT_cube_project(), UV_OT_cursor_set(), UV_OT_cylinder_project(), UV_OT_hide(), UV_OT_mark_seam(), UV_OT_minimize_stretch(), UV_OT_pack_islands(), UV_OT_paste(), UV_OT_pin(), UV_OT_project_from_view(), UV_OT_remove_doubles(), UV_OT_reset(), UV_OT_reveal(), UV_OT_rip(), UV_OT_seams_from_islands(), UV_OT_select(), UV_OT_select_all(), UV_OT_select_box(), UV_OT_select_circle(), UV_OT_select_edge_ring(), UV_OT_select_lasso(), UV_OT_select_less(), UV_OT_select_linked(), UV_OT_select_linked_pick(), UV_OT_select_loop(), UV_OT_select_mode(), UV_OT_select_more(), UV_OT_select_overlap(), UV_OT_select_pinned(), UV_OT_select_similar(), UV_OT_select_split(), UV_OT_shortest_path_pick(), UV_OT_shortest_path_select(), UV_OT_smart_project(), UV_OT_snap_cursor(), UV_OT_snap_selected(), UV_OT_sphere_project(), UV_OT_stitch(), UV_OT_unwrap(), UV_OT_weld(), and WM_operatortype_append().
Referenced by ED_spacetypes_init().
| bool ED_uvedit_center_from_pivot_ex | ( | SpaceImage * | sima, |
| Scene * | scene, | ||
| ViewLayer * | view_layer, | ||
| float | r_center[2], | ||
| char | mode, | ||
| bool * | r_has_select ) |
Definition at line 311 of file uvedit_ops.cc.
References BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(), copy_v2_v2(), SpaceImage::cursor, ED_uvedit_center_multi(), uvedit_select_is_any_selected_multi(), and V3D_AROUND_CURSOR.
Referenced by gizmo2d_calc_transform_pivot().
| bool ED_uvedit_center_multi | ( | const Scene * | scene, |
| Span< Object * > | objects_edit, | ||
| float | cent[2], | ||
| char | mode ) |
Definition at line 288 of file uvedit_ops.cc.
References ED_uvedit_median_multi(), ED_uvedit_minmax_multi(), mid_v2_v2v2(), min, and V3D_AROUND_CENTER_BOUNDS.
Referenced by ED_uvedit_center_from_pivot_ex(), uv_snap_cursor_to_selection(), uv_snap_selection_exec(), and uv_weld_align().
| void ED_uvedit_foreach_uv | ( | const Scene * | scene, |
| BMesh * | bm, | ||
| const bool | skip_invisible, | ||
| const bool | selected, | ||
| FunctionRef< void(float[2])> | user_fn ) |
Definition at line 198 of file uvedit_ops.cc.
References bm, BM_ELEM_CD_GET_FLOAT_P, BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_FACE, BM_uv_map_get_offsets(), l, BMesh::totvert, BMesh::totvertsel, BMUVOffsets::uv, UV_SYNC_SELECTION, uvedit_face_visible_test(), and uvedit_uv_select_test().
Referenced by ED_uvedit_foreach_uv_multi(), uv_remove_doubles_to_selected(), uv_remove_doubles_to_unselected(), uv_snap_uvs_offset(), uv_snap_uvs_to_cursor(), uv_snap_uvs_to_pixels(), and uvedit_uv_align_weld().
| 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 ) |
Definition at line 230 of file uvedit_ops.cc.
References BKE_editmesh_from_object(), BMEditMesh::bm, and ED_uvedit_foreach_uv().
Referenced by ED_uvedit_median_multi(), ED_uvedit_minmax_multi(), uv_remove_doubles_to_unselected(), and uv_weld_align().
|
static |
Definition at line 271 of file uvedit_ops.cc.
References add_v2_v2(), ED_uvedit_foreach_uv_multi(), mul_v2_fl(), and zero_v2().
Referenced by ED_uvedit_center_multi().
| bool ED_uvedit_minmax_multi | ( | const Scene * | scene, |
| const Span< Object * > | objects_edit, | ||
| float | r_min[2], | ||
| float | r_max[2] ) |
Definition at line 242 of file uvedit_ops.cc.
References ED_uvedit_foreach_uv_multi(), INIT_MINMAX2, and minmax_v2v2_v2().
Referenced by ED_uvedit_center_multi().
| void ED_uvedit_select_all | ( | BMesh * | bm | ) |
Be careful when using this, it bypasses all synchronization options.
Definition at line 256 of file uvedit_ops.cc.
References bm, BM_ELEM_CD_SET_BOOL, BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_FACE, BM_uv_map_get_offsets(), l, BMUVOffsets::select_edge, and BMUVOffsets::select_vert.
Referenced by ED_uvedit_add_simple_uvs().
| bool ED_uvedit_test | ( | Object * | obedit | ) |
Definition at line 69 of file uvedit_ops.cc.
References BKE_editmesh_from_object(), EDBM_uv_check(), OB_MESH, ret, and Object::type.
Referenced by ED_uvedit_ensure_uvs(), ED_uvedit_live_unwrap_begin(), and image_panel_uv_poll().
| ENUM_OPERATORS | ( | eUVEndPointPrecedence | , |
| UVEP_PINNED | ) |
|
static |
Definition at line 109 of file uvedit_ops.cc.
References ELEM, SH_NODE_TEX_ENVIRONMENT, and SH_NODE_TEX_IMAGE.
Referenced by ED_object_assign_active_image(), and ED_object_get_active_image().
|
static |
Definition at line 585 of file uvedit_ops.cc.
References OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), and uv_weld_align().
Referenced by UV_OT_align().
|
static |
Definition at line 1391 of file uvedit_ops.cc.
References BKE_editmesh_from_object(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(), BMEditMesh::bm, BM_edge_select_set(), bm_face_is_all_uv_sel(), BM_face_select_set(), BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_FACE, BM_mesh_select_mode_flush(), BM_select_history_validate(), BM_uv_map_ensure_edge_select_attr(), BM_uv_map_ensure_vert_select_attr(), BM_uv_map_get_offsets(), BM_vert_select_set(), CD_PROP_FLOAT2, CTX_data_scene(), CTX_data_view_layer(), CustomData_get_active_layer_name(), DEG_id_tag_update(), BMLoop::e, EDBM_mesh_hide(), EDBM_update(), ID_RECALC_SELECT, l, BMesh::ldata, NC_GEOM, ND_SELECT, BMLoop::next, OPERATOR_FINISHED, params, wmOperator::ptr, RNA_boolean_get(), SCE_SELECT_EDGE, SCE_SELECT_FACE, SCE_SELECT_VERTEX, BMEditMesh::selectmode, UV_EDGE_SEL_TEST, ToolSettings::uv_flag, UV_SELECT_EDGE, UV_SELECT_FACE, UV_SELECT_ISLAND, UV_SELECT_VERTEX, ToolSettings::uv_selectmode, UV_SYNC_SELECTION, UV_VERT_SEL_TEST, uvedit_face_select_disable(), uvedit_face_visible_test(), BMLoop::v, and WM_event_add_notifier().
Referenced by UV_OT_hide().
|
static |
Definition at line 1870 of file uvedit_ops.cc.
References BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(), bm, BMEditMesh::bm, BM_elem_flag_set, BM_ELEM_SEAM, BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_FACE, BM_uv_map_get_offsets(), CTX_data_scene(), CTX_data_view_layer(), DEG_id_tag_update(), BMLoop::e, ED_uvedit_live_unwrap(), NC_GEOM, ND_DATA, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), BMesh::totedgesel, ToolSettings::uv_flag, UV_SYNC_SELECTION, uvedit_edge_select_test(), uvedit_face_visible_test(), and WM_event_add_notifier().
Referenced by uv_mark_seam_invoke(), and UV_OT_mark_seam().
|
static |
Definition at line 1923 of file uvedit_ops.cc.
References BLT_I18NCONTEXT_OPERATOR_DEFAULT, CTX_IFACE_, wmOperatorType::idname, IFACE_, OPERATOR_INTERFACE, wmOperator::ptr, RNA_struct_property_is_set(), wmOperator::type, UI_popup_menu_begin(), UI_popup_menu_end(), UI_popup_menu_layout(), uiItemBooleanO(), uiLayoutSetOperatorContext(), uv_mark_seam_exec(), and WM_OP_EXEC_DEFAULT.
Referenced by UV_OT_mark_seam().
|
static |
Definition at line 592 of file uvedit_ops.cc.
References wmOperatorType::description, ED_operator_uvedit(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_enum(), wmOperatorType::srna, UV_ALIGN_AUTO, uv_align_exec(), UV_ALIGN_X, UV_ALIGN_Y, UV_STRAIGHTEN, UV_STRAIGHTEN_X, and UV_STRAIGHTEN_Y.
Referenced by ED_operatortypes_uvedit().
|
static |
Definition at line 1742 of file uvedit_ops.cc.
References wmOperatorType::description, ED_space_image_cursor_poll(), wmOperatorType::exec, FLT_MAX, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, ot, wmOperatorType::poll, RNA_def_float_vector(), wmOperatorType::srna, uv_set_2d_cursor_exec(), and uv_set_2d_cursor_invoke().
Referenced by ED_operatortypes_uvedit().
|
static |
Definition at line 1534 of file uvedit_ops.cc.
References wmOperatorType::description, ED_operator_uvedit(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), wmOperatorType::srna, and uv_hide_exec().
Referenced by ED_operatortypes_uvedit().
|
static |
Definition at line 1954 of file uvedit_ops.cc.
References wmOperatorType::description, ED_operator_uvedit(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), wmOperatorType::srna, uv_mark_seam_exec(), and uv_mark_seam_invoke().
Referenced by ED_operatortypes_uvedit().
|
static |
Definition at line 1336 of file uvedit_ops.cc.
References wmOperatorType::description, ED_operator_uvedit(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_property_flag(), wmOperatorType::srna, and uv_pin_exec().
Referenced by ED_operatortypes_uvedit().
|
static |
Definition at line 938 of file uvedit_ops.cc.
References wmOperatorType::description, ED_operator_uvedit(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), RNA_def_float(), wmOperatorType::srna, and uv_remove_doubles_exec().
Referenced by ED_operatortypes_uvedit().
|
static |
Definition at line 1680 of file uvedit_ops.cc.
References wmOperatorType::description, ED_operator_uvedit(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), wmOperatorType::srna, and uv_reveal_exec().
Referenced by ED_operatortypes_uvedit().
|
static |
Definition at line 1846 of file uvedit_ops.cc.
References wmOperatorType::description, ED_operator_uvedit(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), wmOperatorType::srna, and uv_seams_from_islands_exec().
Referenced by ED_operatortypes_uvedit().
|
static |
Definition at line 1064 of file uvedit_ops.cc.
References wmOperatorType::description, ED_operator_uvedit_space_image(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_enum(), wmOperatorType::srna, and uv_snap_cursor_exec().
Referenced by ED_operatortypes_uvedit().
|
static |
Definition at line 1250 of file uvedit_ops.cc.
References wmOperatorType::description, ED_operator_uvedit_space_image(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_enum(), wmOperatorType::srna, and uv_snap_selection_exec().
Referenced by ED_operatortypes_uvedit().
|
static |
Definition at line 982 of file uvedit_ops.cc.
References wmOperatorType::description, ED_operator_uvedit(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, and uv_weld_exec().
Referenced by ED_operatortypes_uvedit().
|
static |
Definition at line 1281 of file uvedit_ops.cc.
References BKE_editmesh_from_object(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(), BMEditMesh::bm, BM_ELEM_CD_GET_BOOL, BM_ELEM_CD_SET_BOOL, BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_FACE, BM_uv_map_ensure_pin_attr(), BM_uv_map_get_offsets(), CD_PROP_FLOAT2, clear(), CTX_data_scene(), CTX_data_view_layer(), CustomData_get_active_layer_name(), DEG_id_tag_update(), ID_RECALC_SYNC_TO_EVAL, invert(), l, BMesh::ldata, NC_GEOM, ND_DATA, OPERATOR_FINISHED, BMUVOffsets::pin, wmOperator::ptr, RNA_boolean_get(), BMesh::totvertsel, ToolSettings::uv_flag, UV_SYNC_SELECTION, uvedit_face_visible_test(), uvedit_uv_select_test(), and WM_event_add_notifier().
Referenced by UV_OT_pin().
|
static |
Definition at line 927 of file uvedit_ops.cc.
References wmOperator::ptr, RNA_boolean_get(), uv_remove_doubles_to_selected(), uv_remove_doubles_to_selected_shared_vertex(), and uv_remove_doubles_to_unselected().
Referenced by UV_OT_remove_doubles().
|
static |
Definition at line 641 of file uvedit_ops.cc.
References add_v2_v2(), BKE_editmesh_from_object(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(), BMEditMesh::bm, copy_v2_v2(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_space_image(), blender::Vector< T, InlineBufferCapacity, Allocator >::data(), Object::data, DEG_id_tag_update(), ED_uvedit_foreach_uv(), MEM_callocN, MEM_freeN(), mul_v2_fl(), NC_GEOM, ND_DATA, OPERATOR_FINISHED, wmOperator::ptr, RNA_float_get(), BMesh::totloop, BMesh::totvertsel, tree, ToolSettings::uv_flag, UV_SYNC_SELECTION, uvedit_live_unwrap_update(), and WM_event_add_notifier().
Referenced by uv_remove_doubles_exec().
|
static |
Definition at line 817 of file uvedit_ops.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), BKE_editmesh_from_object(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(), BLI_assert, BMEditMesh::bm, BM_ELEM_CD_GET_FLOAT_P, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_VERT, BM_uv_map_get_offsets(), BM_VERTS_OF_MESH, blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), copy_v2_v2(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_space_image(), DEG_id_tag_update(), blender::math::distance_squared(), l, len_squared_v2v2(), NC_GEOM, ND_DATA, OPERATOR_FINISHED, wmOperator::ptr, blender::Vector< T, InlineBufferCapacity, Allocator >::reserve(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), RNA_float_get(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), blender::math::square(), BMUVOffsets::uv, uvedit_live_unwrap_update(), uvedit_uv_select_test(), v, and WM_event_add_notifier().
Referenced by uv_remove_doubles_exec().
|
static |
Definition at line 759 of file uvedit_ops.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), BKE_editmesh_from_object(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(), BMEditMesh::bm, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_space_image(), DEG_id_tag_update(), ED_uvedit_foreach_uv(), ED_uvedit_foreach_uv_multi(), NC_GEOM, ND_DATA, wmOperator::ptr, RNA_float_get(), BMesh::totloop, tree, uvedit_live_unwrap_update(), and WM_event_add_notifier().
Referenced by uv_remove_doubles_exec().
|
static |
Definition at line 1557 of file uvedit_ops.cc.
References BKE_editmesh_from_object(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(), BMEditMesh::bm, BM_ELEM_CD_SET_BOOL, BM_elem_flag_disable, BM_elem_flag_enable, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ELEM_SELECT, BM_ELEM_TAG, BM_FACE, BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_FACE, BM_mesh_elem_hflag_enable_test(), BM_uv_map_ensure_edge_select_attr(), BM_uv_map_ensure_vert_select_attr(), BM_uv_map_get_offsets(), CD_PROP_FLOAT2, CTX_data_scene(), CTX_data_view_layer(), CustomData_get_active_layer_name(), DEG_id_tag_update(), BMLoop::e, EDBM_mesh_reveal(), EDBM_update(), ID_RECALC_SELECT, l, BMesh::ldata, NC_GEOM, ND_SELECT, OPERATOR_FINISHED, params, wmOperator::ptr, RNA_boolean_get(), SCE_SELECT_EDGE, SCE_SELECT_FACE, SCE_SELECT_VERTEX, select(), BMUVOffsets::select_edge, BMUVOffsets::select_vert, BMEditMesh::selectmode, ToolSettings::uv_flag, UV_SELECT_FACE, ToolSettings::uv_selectmode, UV_SYNC_SELECTION, BMLoop::v, and WM_event_add_notifier().
Referenced by UV_OT_reveal().
|
static |
Definition at line 1773 of file uvedit_ops.cc.
References BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(), bm, BMEditMesh::bm, BM_elem_flag_disable, BM_elem_flag_enable, BM_ELEM_SEAM, BM_ELEM_SMOOTH, BM_FACE_FIRST_LOOP, BM_FACES_OF_MESH, BM_ITER_MESH, BM_loop_uv_share_edge_check(), BM_uv_map_get_offsets(), CTX_data_scene(), CTX_data_view_layer(), DEG_id_tag_update(), BMLoop::e, EDBM_uv_check(), NC_GEOM, ND_DATA, BMLoop::next, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, BMLoop::radial_next, RNA_boolean_get(), BMUVOffsets::uv, uvedit_edge_select_test(), uvedit_face_visible_test(), and WM_event_add_notifier().
Referenced by UV_OT_seams_from_islands().
|
static |
Definition at line 1701 of file uvedit_ops.cc.
References CTX_wm_message_bus(), CTX_wm_screen(), CTX_wm_space_image(), SpaceImage::cursor, NC_SPACE, ND_SPACE_IMAGE, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, wmOperator::ptr, RNA_float_get_array(), WM_event_add_notifier(), and WM_msg_publish_rna_prop.
Referenced by UV_OT_cursor_set(), and uv_set_2d_cursor_invoke().
|
static |
Definition at line 1723 of file uvedit_ops.cc.
References CTX_wm_region(), CTX_wm_space_image(), ED_space_image_show_cache_and_mval_over(), wmEvent::mval, OPERATOR_PASS_THROUGH, wmOperator::ptr, RGN_TYPE_WINDOW, RNA_float_set_array(), UI_view2d_region_to_view(), and uv_set_2d_cursor_exec().
Referenced by UV_OT_cursor_set().
|
static |
Definition at line 1028 of file uvedit_ops.cc.
References BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_space_image(), SpaceImage::cursor, NC_SPACE, ND_SPACE_IMAGE, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), uv_snap_cursor_to_origin(), uv_snap_cursor_to_pixels(), uv_snap_cursor_to_selection(), and WM_event_add_notifier().
Referenced by UV_OT_snap_cursor().
|
static |
Definition at line 1022 of file uvedit_ops.cc.
Referenced by uv_snap_cursor_exec().
|
static |
Definition at line 1007 of file uvedit_ops.cc.
References SpaceImage::cursor, ED_space_image_get_size(), and uv_snap_to_pixel().
Referenced by uv_snap_cursor_exec().
|
static |
Definition at line 1015 of file uvedit_ops.cc.
References SpaceImage::around, SpaceImage::cursor, and ED_uvedit_center_multi().
Referenced by uv_snap_cursor_exec().
|
static |
Definition at line 1194 of file uvedit_ops.cc.
References SpaceImage::around, BKE_editmesh_from_object(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(), BMEditMesh::bm, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_space_image(), SpaceImage::cursor, DEG_id_tag_update(), ED_uvedit_center_multi(), NC_GEOM, ND_DATA, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), sub_v2_v2v2(), BMesh::totvertsel, ToolSettings::uv_flag, uv_snap_uvs_offset(), uv_snap_uvs_to_adjacent_unselected(), uv_snap_uvs_to_cursor(), uv_snap_uvs_to_pixels(), UV_SYNC_SELECTION, uvedit_live_unwrap_update(), and WM_event_add_notifier().
Referenced by UV_OT_snap_selected().
Definition at line 1001 of file uvedit_ops.cc.
References w().
Referenced by uv_snap_cursor_to_pixels().
Definition at line 1107 of file uvedit_ops.cc.
References BKE_editmesh_from_object(), BMEditMesh::bm, and ED_uvedit_foreach_uv().
Referenced by uv_snap_selection_exec().
Definition at line 1120 of file uvedit_ops.cc.
References add_v2_v2(), BKE_editmesh_from_object(), bm, BMEditMesh::bm, BM_ELEM_CD_GET_FLOAT_P, BM_elem_flag_disable, BM_elem_flag_enable, BM_elem_flag_set, BM_elem_flag_test, BM_ELEM_TAG, BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_FACE, BM_LOOPS_OF_VERT, BM_uv_map_get_offsets(), BMLoop::f, l, mul_v2_v2fl(), BMUVOffsets::uv, uvedit_face_visible_test(), uvedit_uv_select_test(), and BMLoop::v.
Referenced by uv_snap_selection_exec().
Definition at line 1094 of file uvedit_ops.cc.
References BKE_editmesh_from_object(), BMEditMesh::bm, and ED_uvedit_foreach_uv().
Referenced by uv_snap_selection_exec().
|
static |
Definition at line 1175 of file uvedit_ops.cc.
References BKE_editmesh_from_object(), BMEditMesh::bm, ED_space_image_get_size(), ED_uvedit_foreach_uv(), float, and w().
Referenced by uv_snap_selection_exec().
|
static |
Definition at line 539 of file uvedit_ops.cc.
References BKE_editmesh_from_object(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(), BMEditMesh::bm, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_space_image(), DEG_id_tag_update(), ED_uvedit_center_multi(), ED_uvedit_foreach_uv_multi(), ELEM, INIT_MINMAX2, min, minmax_v2v2_v2(), NC_GEOM, ND_DATA, BMesh::totvertsel, UV_ALIGN_AUTO, UV_ALIGN_X, UV_ALIGN_Y, ToolSettings::uv_flag, UV_STRAIGHTEN, UV_STRAIGHTEN_X, UV_STRAIGHTEN_Y, UV_SYNC_SELECTION, UV_WELD, uvedit_live_unwrap_update(), uvedit_uv_align_weld(), uvedit_uv_straighten(), and WM_event_add_notifier().
Referenced by uv_align_exec(), and uv_weld_exec().
|
static |
Definition at line 975 of file uvedit_ops.cc.
References OPERATOR_FINISHED, UV_WELD, and uv_weld_align().
Referenced by UV_OT_weld().
|
static |
Helper to find two endpoints (a and b) which have higher precedence, and are far apart. Note that is only a heuristic and won't always find the best two endpoints.
Definition at line 407 of file uvedit_ops.cc.
References copy_v2_v2(), len_squared_v2v2(), and uvedit_line_update_get_precedence().
Referenced by uvedit_uv_straighten_elements().
|
static |
Definition at line 394 of file uvedit_ops.cc.
References UVEP_PINNED, and UVEP_SELECTED.
Referenced by uvedit_line_update_endpoint().
| void uvedit_live_unwrap_update | ( | SpaceImage * | sima, |
| Scene * | scene, | ||
| Object * | obedit ) |
Definition at line 183 of file uvedit_ops.cc.
References ED_uvedit_live_unwrap_begin(), ED_uvedit_live_unwrap_end(), ED_uvedit_live_unwrap_re_solve(), SpaceImage::flag, and SI_LIVE_UNWRAP.
Referenced by stitch_exit(), uv_remove_doubles_to_selected(), uv_remove_doubles_to_selected_shared_vertex(), uv_remove_doubles_to_unselected(), uv_rip_exec(), uv_snap_selection_exec(), and uv_weld_align().
|
static |
Definition at line 361 of file uvedit_ops.cc.
References bm, ED_uvedit_foreach_uv(), ELEM, UV_ALIGN_X, UV_ALIGN_Y, and UV_WELD.
Referenced by uv_weld_align().
|
static |
Group selected UVs into islands, then apply uvedit_uv_straighten_elements to each island.
Definition at line 515 of file uvedit_ops.cc.
References bm, BM_uv_element_map_create(), BM_uv_element_map_free(), BM_uv_map_get_offsets(), UvElementMap::island_indices, UvElementMap::island_total_uvs, UvElementMap::storage, UvElementMap::total_islands, BMUVOffsets::uv, and uvedit_uv_straighten_elements().
Referenced by uv_weld_align().
|
static |
Find two end extreme points to specify a line, then straighten len elements by moving UVs on the X-axis, Y-axis, or the closest point on the line segment.
Definition at line 442 of file uvedit_ops.cc.
References BM_ELEM_CD_GET_BOOL, BM_ELEM_CD_GET_FLOAT_P, closest_to_line_segment_v2(), l, len, BMUVOffsets::pin, update(), BMUVOffsets::uv, UV_STRAIGHTEN, UV_STRAIGHTEN_X, UV_STRAIGHTEN_Y, uvedit_line_update_endpoint(), and UVEP_INVALID.
Referenced by uvedit_uv_straighten().